[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "content": "name: \"Bug report\"\ndescription: \"Something isn't working right with NexaSDK\"\nlabels: [\"bug\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for reporting a bug in NexaSDK 🙏\n\n        Before filing:\n        - Search existing issues to see if this has already been reported.\n        - Try the latest release, if possible.\n\n  - type: checkboxes\n    id: checks\n    attributes:\n      label: \"Pre-checks\"\n      options:\n        - label: \"I searched existing issues\"\n          required: true\n        - label: \"I’m using the latest NexaSDK release\"\n          required: false\n\n  - type: textarea\n    id: what-happened\n    attributes:\n      label: \"What happened?\"\n      description: \"Describe the bug and what you expected to happen.\"\n      placeholder: |\n        When I do sth with model X on backend Y, it does Z.\n        I expected it to ...\n      render: text\n    validations:\n      required: true\n\n  - type: textarea\n    id: steps-to-reproduce\n    attributes:\n      label: \"Steps to reproduce\"\n      description: \"Minimal steps or code to trigger the issue.\"\n      placeholder: |\n        1. Install NexaSDK using ...\n        2. Run: ...\n        3. See error: ...\n      render: markdown\n    validations:\n      required: true\n\n  - type: textarea\n    id: logs\n    attributes:\n      label: \"Logs & stack traces\"\n      description: \"Paste any relevant logs or error messages.\"\n      placeholder: |\n        ```text\n        <logs here>\n        ```\n      render: text\n\n  - type: textarea\n    id: models\n    attributes:\n      label: \"Model(s) and quantization\"\n      description: \"Which model(s) and quantization are you using?\"\n      placeholder: |\n        e.g. Ministral-3-3B-Instruct-2512 Q4_K_M, AutoNeural-SA8295P int4, Qwen2.5 fp16\n      render: text\n\n  - type: input\n    id: nexasdk-version\n    attributes:\n      label: \"NexaSDK version\"\n      description: 'Output of `nexa version` or `python -c \"import nexa; print(nexa.__version__)\"` or similar.'\n      placeholder: |\n        e.g.\n        NexaSDK Bridge Version: v1.0.31\n        NexaSDK CLI Version:    v0.2.60\n    validations:\n      required: true\n\n  - type: input\n    id: install-method\n    attributes:\n      label: \"Install method\"\n      description: \"How did you install NexaSDK?\"\n      placeholder: \"pip, conda, docker, from source, other\"\n    validations:\n      required: true\n\n  - type: input\n    id: os\n    attributes:\n      label: \"OS and version\"\n      placeholder: \"e.g. Windows 11, Ubuntu 22.04, macOS 15\"\n    validations:\n      required: true\n\n  - type: input\n    id: hardware\n    attributes:\n      label: \"Hardware / accelerator\"\n      description: \"CPU/GPU/NPU and device details.\"\n      placeholder: \"e.g. RTX 4090, Snapdragon X Elite NPU, SA8295P, M4 Max\"\n\n  - type: textarea\n    id: extra\n    attributes:\n      label: \"Additional context\"\n      description: \"Anything else that might help (configs, screenshots, links).\"\n      render: markdown\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "content": "name: \"Feature request\"\ndescription: \"Request a new feature or improvement for NexaSDK\"\nlabels: [\"enhancement\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Thanks for helping improve NexaSDK 🙌\n\n        Use this template for concrete improvements to the SDK.\n\n  - type: checkboxes\n    id: checks\n    attributes:\n      label: \"Pre-checks\"\n      options:\n        - label: \"I searched existing issues and discussions\"\n          required: true\n\n  - type: textarea\n    id: problem\n    attributes:\n      label: \"What problem are you trying to solve?\"\n      description: \"Describe your use case and what’s painful today.\"\n      placeholder: |\n        I’m building X (e.g. local copilot on Snapdragon PC) and I’m blocked by Y in NexaSDK.\n      render: text\n    validations:\n      required: true\n\n  - type: textarea\n    id: solution\n    attributes:\n      label: \"What would you like NexaSDK to do?\"\n      description: \"Describe your ideal solution (APIs, CLI flags, configs, etc.).\"\n      placeholder: |\n        Example:\n        - Add a `nexa run --backend npu` option that ...\n        - Provide a Python helper `nexa.auto_backend(...)` that ...\n      render: markdown\n    validations:\n      required: true\n\n  - type: textarea\n    id: alternatives\n    attributes:\n      label: \"Alternatives you've considered\"\n      description: \"Workarounds or other tools you’ve tried.\"\n      placeholder: |\n        I can currently do this by ..., but it’s slow / complex / fragile.\n      render: text\n\n  - type: textarea\n    id: impact\n    attributes:\n      label: \"Who does this help, and how much?\"\n      description: \"Rough sense of impact (devx, perf, device coverage, etc.).\"\n      placeholder: |\n        This would be useful for all Windows NPU developers using NexaSDK because ...\n      render: text\n\n  - type: textarea\n    id: extra\n    attributes:\n      label: \"Additional context\"\n      description: \"Links, mock APIs, diagrams, prior art, etc.\"\n      render: markdown\n"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/model_request.yml",
    "content": "name: \"Model request\"\ndescription: \"Request support for a new model or variant in NexaSDK\"\nlabels: [\"model-request\"]\nbody:\n  - type: markdown\n    attributes:\n      value: |\n        Request support for a new model to be added to NexaSDK.\n\n        Please include as much detail as you can so we can prioritize properly.\n\n  - type: checkboxes\n    id: checks\n    attributes:\n      label: \"Pre-checks\"\n      options:\n        - label: \"I searched existing issues and discussions for this model\"\n          required: true\n\n  - type: input\n    id: model-name\n    attributes:\n      label: \"Model name\"\n      description: \"Name of the model you’d like supported.\"\n      placeholder: \"e.g. Ministral-8x7B, Qwen3-VL-32B, etc.\"\n    validations:\n      required: true\n\n  - type: input\n    id: model-source\n    attributes:\n      label: \"Model source / link\"\n      description: \"Link to the model (Hugging Face, GitHub, vendor page, etc.).\"\n      placeholder: \"https://huggingface.co/...\"\n    validations:\n      required: true\n\n  - type: textarea\n    id: use-cases\n    attributes:\n      label: \"Primary use cases\"\n      description: \"What are you planning to build with this model?\"\n      placeholder: |\n        e.g. On-device coding assistant, in-car multimodal assistant, document RAG, etc.\n      render: text\n    validations:\n      required: true\n\n  - type: textarea\n    id: hardware\n    attributes:\n      label: \"Target hardware / backend\"\n      description: \"Where do you want this model to run?\"\n      placeholder: |\n        e.g. Snapdragon X Elite NPU, SA8295P, RTX 4080, Apple M4, CPU-only, etc.\n      render: text\n    validations:\n      required: true\n\n  - type: textarea\n    id: extra\n    attributes:\n      label: \"Additional context\"\n      description: \"Benchmarks, papers, licensing notes, or anything else that helps us evaluate.\"\n      render: markdown\n"
  },
  {
    "path": ".github/workflows/build-linux.yml",
    "content": "name: NexaCLI on Linux\n\non:\n  push:\n    tags:\n      - \"v*\"\n\njobs:\n  build-cli:\n    name: Build ${{ matrix.runner }}\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - runner: ubuntu-22.04\n            arch: x86_64\n          - runner: ubuntu-22.04-arm\n            arch: arm64\n\n    env:\n      VERSION: ${{ github.ref_name }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Setup Go\n        uses: actions/setup-go@v5\n        with:\n          go-version: 1.25.4\n          cache-dependency-path: runner/go.sum\n\n      - name: Download runtime\n        run: |\n          cd runner\n          make download\n\n      - name: Build Nexa Cli\n        run: |\n          cd runner\n          make build\n          rm build/ml.h\n\n      - name: Upload Artifact\n        uses: actions/upload-artifact@v4\n        with:\n          name: \"nexa-cli_linux_${{ matrix.arch }}\"\n          path: runner/build\n          include-hidden-files: true\n\n  package-release:\n    name: Package Release ${{ matrix.runner }}\n    needs: build-cli\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - runner: ubuntu-22.04\n            arch: x86_64\n          - runner: ubuntu-22.04-arm\n            arch: arm64\n\n    env:\n      VERSION: ${{ github.ref_name }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: \"nexa-cli_linux_${{ matrix.arch }}\"\n          path: artifacts\n\n      - name: Create Self-Contained Installer Script\n        id: package\n        run: |\n          chmod +x runner/release/linux/package.sh\n          ./runner/release/linux/package.sh artifacts \\\n            runner/release/linux/install.sh \\\n            nexa-cli_linux_${{ matrix.arch }}.sh\n\n      - name: Create GitHub Release\n        uses: softprops/action-gh-release@v2\n        with:\n          repository: NexaAI/nexa-sdk\n          tag_name: ${{ env.VERSION }}\n          files: |\n            nexa-cli_linux_${{ matrix.arch }}.sh\n          draft: ${{ contains(github.ref, '-rc') }}\n          generate_release_notes: ${{ matrix.arch == 'x86_64' }}\n          make_latest: ${{ !contains(github.ref, '-rc') }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }}\n\n      - name: Configure AWS credentials\n        if: ${{ !contains(github.ref, '-rc') }}\n        uses: aws-actions/configure-aws-credentials@v4\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          aws-region: us-west-1\n\n      - name: Sync to S3\n        if: ${{ !contains(github.ref, '-rc') }}\n        shell: bash\n        run: |\n          aws s3 cp \"nexa-cli_linux_${{ matrix.arch }}.sh\" \"s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_linux_${{ matrix.arch }}.sh\"\n\n  docker-release:\n    name: Docker Release\n    needs: build-cli\n    runs-on: ubuntu-22.04\n\n    env:\n      VERSION: ${{ github.ref_name }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          path: artifacts\n\n      - name: Prepare Build Context\n        run: |\n          mkdir -p runner/release/linux\n          mv artifacts/nexa-cli_linux_x86_64 runner/release/linux/nexa_sdk.amd64\n          mv artifacts/nexa-cli_linux_arm64 runner/release/linux/nexa_sdk.arm64\n          chmod +x runner/release/linux/*/nexa\n          chmod +x runner/release/linux/*/nexa-cli\n\n      - name: Login to Docker Hub\n        uses: docker/login-action@v3\n        with:\n          username: ${{ secrets.DOCKERHUB_USERNAME }}\n          password: ${{ secrets.DOCKERHUB_TOKEN }}\n\n      - name: Set up QEMU\n        uses: docker/setup-qemu-action@v3\n\n      - name: Set up Docker Buildx\n        uses: docker/setup-buildx-action@v3\n\n      - name: Build and Push Docker Image (Base)\n        uses: docker/build-push-action@v6\n        with:\n          context: runner/release/linux\n          push: true\n          platforms: linux/amd64,linux/arm64\n          tags: |\n            nexa4ai/nexasdk${{ contains(github.ref, '-rc') && '-test' || '' }}:${{ env.VERSION }}\n            ${{ !contains(github.ref, '-rc') && 'nexa4ai/nexasdk:latest' || '' }}\n\n      - name: Build and Push Docker Image (Cuda)\n        uses: docker/build-push-action@v6\n        with:\n          context: runner/release/linux\n          push: true\n          platforms: linux/amd64\n          build-args: |\n            BASE_IMAGE=nvidia/cuda:12.9.1-runtime-ubuntu22.04\n          tags: |\n            nexa4ai/nexasdk${{ contains(github.ref, '-rc') && '-test' || '' }}:${{ env.VERSION }}-cuda\n            ${{ !contains(github.ref, '-rc') && 'nexa4ai/nexasdk:latest-cuda' || '' }}\n"
  },
  {
    "path": ".github/workflows/build-macos.yml",
    "content": "name: NexaCLI on MacOS\n\non:\n  push:\n    tags:\n      - \"v*\"\n\njobs:\n  build-cli:\n    name: macos_${{ matrix.arch }}\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - runner: macos-15-intel\n            arch: x86_64\n          - runner: macos-15\n            arch: arm64\n\n    env:\n      VERSION: ${{ github.ref_name }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - uses: actions/setup-go@v5\n        with:\n          go-version: 1.25.4\n          cache-dependency-path: runner/go.sum\n\n      - name: Download runtime\n        run: |\n          cd runner\n          make download\n\n      - name: Build Nexa Cli\n        run: |\n          cd runner\n          make build\n          rm build/ml.h\n\n      - name: Upload Artifact\n        uses: actions/upload-artifact@v4\n        with:\n          name: nexa-cli_macos_${{ matrix.arch }}\n          path: runner/build\n          include-hidden-files: true\n\n  package-and-release:\n    name: Package for macos_${{ matrix.arch }}\n    needs: build-cli\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - runner: macos-15-intel\n            arch: x86_64\n          - runner: macos-15\n            arch: arm64\n    env:\n      VERSION: ${{ github.ref_name }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: nexa-cli_macos_${{ matrix.arch }}\n          path: artifacts\n\n      - name: Prepare file structure for packaging\n        id: prep_files\n        run: |\n          chmod +x  runner/release/darwin/scripts/prepackage.sh\n          bash  runner/release/darwin/scripts/prepackage.sh \"${{ env.VERSION }}\"\n\n      - name: Fix dylib Linkages (RPATH)\n        run: |\n          RESOURCES_PATH=\"${{ env.APP_PATH }}/Contents/Resources\"\n          install_name_tool -add_rpath \"@loader_path\" \"${RESOURCES_PATH}/nexa-cli\"\n\n      - name: Import Code Signing Certificates\n        env:\n          APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}\n          APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}\n          INSTALLER_CERTIFICATE_BASE64: ${{ secrets.APPLE_INSTALLER_CERTIFICATE_BASE64 }}\n          INSTALLER_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}\n        run: |\n          echo $APP_CERTIFICATE_BASE64 | base64 --decode > app_certificate.p12\n          echo $INSTALLER_CERTIFICATE_BASE64 | base64 --decode > installer_certificate.p12\n          security create-keychain -p \"\" build.keychain\n          security default-keychain -s build.keychain\n          security unlock-keychain -p \"\" build.keychain\n          security import app_certificate.p12 -k build.keychain -P $APP_CERTIFICATE_PASSWORD -T /usr/bin/codesign\n          security import installer_certificate.p12 -k build.keychain -P $INSTALLER_CERTIFICATE_PASSWORD -T /usr/bin/productsign\n          security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \"\" build.keychain\n\n      - name: Sign binaries and libraries\n        run: |\n          chmod +x  runner/release/darwin/scripts/sign.sh\n          bash  runner/release/darwin/scripts/sign.sh \"${{ env.APP_PATH }}\" \"${{ secrets.APPLE_ID_APPLICATION }}\"\n\n      - name: Build PKG\n        run: |\n          pkgbuild --root \"${{ steps.prep_files.outputs.STAGING_DIR }}\" \\\n                   --scripts \"${{ steps.prep_files.outputs.SCRIPTS_DIR }}\" \\\n                   --identifier \"com.nexaai.nexa-sdk\" \\\n                   --version \"${{ env.VERSION }}\" \\\n                   --install-location / \\\n                   \"artifacts/nexa-cli_macos_${{ matrix.arch }}-unsigned.pkg\"\n\n      - name: Productsign PKG\n        run: |\n          productsign --sign \"${{ secrets.APPLE_ID_INSTALLER }}\" --timestamp \"artifacts/nexa-cli_macos_${{ matrix.arch }}-unsigned.pkg\" \"artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg\"\n          pkgutil --check-signature \"artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg\"\n          rm \"artifacts/nexa-cli_macos_${{ matrix.arch }}-unsigned.pkg\"\n\n      - name: Notarize & Staple PKG\n        run: |\n          chmod +x  runner/release/darwin/scripts/notarize.sh\n          bash  runner/release/darwin/scripts/notarize.sh \\\n            \"artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg\" \\\n            \"${{ secrets.APPLE_ID }}\" \\\n            \"${{ secrets.APPLE_ID_PASSWORD }}\" \\\n            \"${{ secrets.APPLE_TEAM_ID }}\"\n\n      - name: Create GitHub Release\n        uses: softprops/action-gh-release@v2\n        with:\n          repository: NexaAI/nexa-sdk\n          tag_name: ${{ env.VERSION }}\n          files: |\n            artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg\n          draft: ${{ contains(github.ref, '-rc') }}\n          generate_release_notes: false\n          make_latest: ${{ !contains(github.ref, '-rc') }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }}\n\n      - name: Configure AWS credentials\n        if: ${{ !contains(github.ref, '-rc') }}\n        uses: aws-actions/configure-aws-credentials@v4\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          aws-region: us-west-1\n\n      - name: Sync to S3\n        if: ${{ !contains(github.ref, '-rc') }}\n        shell: bash\n        run: |\n          aws s3 cp \"artifacts/nexa-cli_macos_${{ matrix.arch }}.pkg\" \"s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_macos_${{ matrix.arch }}.pkg\"\n"
  },
  {
    "path": ".github/workflows/build-windows.yml",
    "content": "name: NexaCLI on Windows\n\non:\n  push:\n    tags:\n      - \"v*\"\n\njobs:\n  build-cli:\n    name: windows_${{ matrix.arch }}\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - runner: sdk-windows-8-core-2\n            arch: x86_64\n          - runner: windows-11-arm\n            arch: arm64\n\n    env:\n      VERSION: ${{ github.ref_name }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Setup Go\n        uses: actions/setup-go@v5\n        with:\n          go-version: 1.25.4\n          cache-dependency-path: runner/go.sum\n\n      - name: Setup MSYS2 (ARM64)\n        if: matrix.arch == 'arm64'\n        uses: msys2/setup-msys2@v2\n        with:\n          msystem: CLANGARM64\n          location: C:/Tools\n          update: true\n          install: mingw-w64-clang-aarch64-clang\n\n      - name: Setup Compile Environment (ARM64)\n        if: matrix.arch == 'arm64'\n        shell: bash\n        run: |\n          echo \"CC=C:/Tools/msys64/clangarm64/bin/clang.exe\" >> $GITHUB_ENV\n          echo \"CXX=C:/Tools/msys64/clangarm64/bin/clang++.exe\" >> $GITHUB_ENV\n\n      - name: Download runtime\n        shell: bash\n        run: |\n          cd runner\n          make download ARCH=${{ matrix.arch }}\n          ls build\n\n      - name: Build Nexa Cli\n        shell: bash\n        run: |\n          cd runner\n          make build ARCH=${{ matrix.arch }}\n          rm -f build/ml.h\n\n      - name: Upload Artifact\n        uses: actions/upload-artifact@v4\n        with:\n          name: nexa-cli_windows_${{ matrix.arch }}\n          path: runner/build\n          include-hidden-files: true\n\n  build-installer:\n    name: Build Windows Installer & Release\n    needs: build-cli\n    runs-on: ${{ matrix.runner }}\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - runner: sdk-windows-8-core-2\n            arch: x86_64\n          - runner: windows-11-arm\n            arch: arm64\n    env:\n      VERSION: ${{ github.ref_name }}\n      ARCH: ${{ matrix.arch }}\n\n    steps:\n      - name: Checkout repository\n        uses: actions/checkout@v4\n\n      - name: Download build artifacts\n        uses: actions/download-artifact@v4\n        with:\n          name: nexa-cli_windows_${{ matrix.arch }}\n          path: artifacts\n\n      - name: Build launcher with PyInstaller\n        run: |\n          pip install pyinstaller\n          pyinstaller --onefile --noconsole --distpath artifacts --name \"nexa-cli-launcher\" --icon=\"runner/release/windows/nexa_logo.ico\" runner/release/windows/nexa_launcher.py\n\n      # === Install Inno Setup (before compiling installers) ===\n      - name: Install Inno Setup\n        shell: pwsh\n        run: |\n          if (Get-Command ISCC.exe -ErrorAction SilentlyContinue) { return }\n          if (Get-Command choco -ErrorAction SilentlyContinue) {\n            choco install innosetup -y --no-progress\n          } else {\n            winget install --id JRSoftware.InnoSetup -e --accept-source-agreements --accept-package-agreements\n          }\n          $inno = \"${env:ProgramFiles(x86)}\\Inno Setup 6\"\n          if (Test-Path \"$inno\\ISCC.exe\") {\n            \"$inno\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append\n          }\n\n      - name: Sign executables with AzureSignTool\n        shell: pwsh\n        run: |\n          dotnet tool install --global AzureSignTool\n\n          Get-ChildItem -Path \"artifacts\" -Recurse -Include *.exe, *.dll | ForEach-Object {\n            azuresigntool sign `\n              -kvu \"${{ secrets.AZURE_KEY_VAULT_URI }}\" `\n              -kvc \"${{ secrets.AZURE_CERT_NAME }}\" `\n              -kvi \"${{ secrets.AZURE_CLIENT_ID }}\" `\n              -kvs \"${{ secrets.AZURE_CLIENT_SECRET }}\" `\n              --azure-key-vault-tenant-id \"${{ secrets.AZURE_TENANT_ID }}\" `\n              -tr http://timestamp.globalsign.com/tsa/advanced `\n              -td sha256 `\n              $_.FullName\n          }\n\n      - name: Prepare Installer Files (X86_64)\n        if: matrix.arch == 'x86_64'\n        shell: bash\n        run: |\n          cp -r artifacts artifacts_cuda\n          rm -r artifacts_cuda/nexaai*\n          rm -r artifacts/nexa_cuda*\n\n      - name: Compile Installer (CUDA) (X86_64)\n        if: matrix.arch == 'x86_64'\n        uses: Minionguyjpro/Inno-Setup-Action@v1.2.6\n        with:\n          path: runner/release/windows/nexa_installer.iss\n          options: /O+\n        env:\n          ORT: \"_cuda\"\n\n      - name: Compile Installer\n        uses: Minionguyjpro/Inno-Setup-Action@v1.2.6\n        with:\n          path: runner/release/windows/nexa_installer.iss\n          options: /O+\n        env:\n          ORT: \"\"\n\n      - name: Sign Installer (ARM64)\n        if: matrix.arch == 'arm64'\n        shell: pwsh\n        run: |\n          azuresigntool sign `\n            -kvu \"${{ secrets.AZURE_KEY_VAULT_URI }}\" `\n            -kvc \"${{ secrets.AZURE_CERT_NAME }}\" `\n            -kvi \"${{ secrets.AZURE_CLIENT_ID }}\" `\n            -kvs \"${{ secrets.AZURE_CLIENT_SECRET }}\" `\n            --azure-key-vault-tenant-id \"${{ secrets.AZURE_TENANT_ID }}\" `\n            -tr http://timestamp.globalsign.com/tsa/advanced `\n            -td sha256 `\n            \"nexa-cli_windows_${{ matrix.arch }}.exe\"\n\n      - name: Sign Installer (X86_64)\n        if: matrix.arch == 'x86_64'\n        run: |\n          azuresigntool sign `\n            -kvu \"${{ secrets.AZURE_KEY_VAULT_URI }}\" `\n            -kvc \"${{ secrets.AZURE_CERT_NAME }}\" `\n            -kvi \"${{ secrets.AZURE_CLIENT_ID }}\" `\n            -kvs \"${{ secrets.AZURE_CLIENT_SECRET }}\" `\n            --azure-key-vault-tenant-id \"${{ secrets.AZURE_TENANT_ID }}\" `\n            -tr http://timestamp.globalsign.com/tsa/advanced `\n            -td sha256 `\n            \"nexa-cli_windows_${{ matrix.arch }}_cuda.exe\"\n\n          azuresigntool sign `\n            -kvu \"${{ secrets.AZURE_KEY_VAULT_URI }}\" `\n            -kvc \"${{ secrets.AZURE_CERT_NAME }}\" `\n            -kvi \"${{ secrets.AZURE_CLIENT_ID }}\" `\n            -kvs \"${{ secrets.AZURE_CLIENT_SECRET }}\" `\n            --azure-key-vault-tenant-id \"${{ secrets.AZURE_TENANT_ID }}\" `\n            -tr http://timestamp.globalsign.com/tsa/advanced `\n            -td sha256 `\n            \"nexa-cli_windows_${{ matrix.arch }}.exe\"\n\n      - name: Create GitHub Release\n        uses: softprops/action-gh-release@v2\n        with:\n          repository: NexaAI/nexa-sdk\n          tag_name: ${{ env.VERSION }}\n          files: |\n            nexa-cli_windows_${{ matrix.arch }}_cuda.exe\n            nexa-cli_windows_${{ matrix.arch }}.exe\n          draft: ${{ contains(github.ref, '-rc') }}\n          generate_release_notes: false\n          make_latest: ${{ !contains(github.ref, '-rc') }}\n        env:\n          GITHUB_TOKEN: ${{ secrets.ZACK_ACCESS_TOKEN }}\n\n      - name: Configure AWS credentials\n        if: ${{ !contains(github.ref, '-rc') }}\n        uses: aws-actions/configure-aws-credentials@v4\n        with:\n          aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}\n          aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n          aws-region: us-west-1\n\n      - name: Sync to S3\n        if: ${{ !contains(github.ref, '-rc') }}\n        shell: bash\n        run: |\n          aws s3 cp \"nexa-cli_windows_${{ matrix.arch }}.exe\" \"s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_windows_${{ matrix.arch }}.exe\"\n\n      - name: Sync to S3 (CUDA) (X86_64)\n        if: ${{ !contains(github.ref, '-rc') && matrix.arch == 'x86_64' }}\n        shell: bash\n        run: |\n          aws s3 cp \"nexa-cli_windows_${{ matrix.arch }}_cuda.exe\" \"s3://nexa-model-hub-bucket/public/nexa_sdk/downloads/nexa-cli_windows_${{ matrix.arch }}_cuda.exe\"\n"
  },
  {
    "path": ".github/workflows/lint.yml",
    "content": "name: Lint\n\non:\n  pull_request:\n    branches: [main]\n    paths:\n      - 'runner/**'\n      - '.github/workflows/lint.yml'\n\njobs:\n  lint:\n    runs-on: ubuntu-22.04\n    steps:\n      - uses: actions/checkout@v4\n      - uses: actions/setup-go@v5\n        with:\n          go-version: '1.25'\n          cache-dependency-path: runner/go.sum\n      - name: go fmt\n        working-directory: runner\n        run: |\n          unformatted=$(gofmt -s -l .)\n          [ -z \"$unformatted\" ] || (echo \"Unformatted: $unformatted\"; exit 1)\n      - name: Download runtime\n        working-directory: runner\n        run: make download\n      - name: go vet\n        working-directory: runner\n        run: go vet ./...\n"
  },
  {
    "path": ".github/workflows/test.yml",
    "content": "name: Test\n\non:\n  # pull_request:\n  #   branches: [main, main-test]\n  workflow_dispatch:\n\njobs:\n  test-llm:\n    name: ${{ matrix.os }} / ${{ matrix.backend }}\n    runs-on: ${{ matrix.os }}\n    strategy:\n      fail-fast: false\n      matrix:\n        os: [macos-15]\n        backend: [llama-cpp-metal]\n    steps:\n      - name: Checkout code\n        uses: actions/checkout@v4\n\n      - name: Setup Go\n        uses: actions/setup-go@v5\n        with:\n          go-version: 1.24.3\n          cache-dependency-path: runner/go.sum\n\n      - name: Download backend runtime\n        run: make download BRIDGE_BACKEND=${{ matrix.backend }}\n\n      - name: Cache Nexa model files\n        uses: actions/cache@v4\n        with:\n          path: ~/.cache/models/Qwen3-0.6B-Q8_0.gguf\n          key: Qwen3-0.6B-Q8_0.gguf\n          restore-keys: |\n            Qwen3-0.6B-Q8_0.gguf\n\n      - name: Download model\n        shell: bash\n        run: |\n          MODEL_PATH=\"$HOME/.cache/models/Qwen3-0.6B-Q8_0.gguf\"\n          if [ ! -f \"$MODEL_PATH\" ]; then\n            mkdir -p \"$(dirname \"$MODEL_PATH\")\"\n            wget -nv -O \"$MODEL_PATH\" https://huggingface.co/nexaml/Qwen3-0.6B/resolve/main/Qwen3-0.6B-Q8_0.gguf\n          else\n            echo \"Model already cached, skip download.\"\n          fi\n\n      - name: Test LLM Multi-Turn Chat\n        shell: bash\n        run: |\n          if [[ \"$RUNNER_OS\" == \"macOS\" ]]; then\n            export DYLD_LIBRARY_PATH=\"$PWD/build/lib/${{ matrix.backend }}\"\n          elif [[ \"$RUNNER_OS\" == \"Linux\" ]]; then\n            export LD_LIBRARY_PATH=\"$PWD/build/lib/${{ matrix.backend }}\"\n          elif [[ \"$RUNNER_OS\" == \"Windows\" ]]; then\n            export PATH=\"$PWD/build/lib/${{ matrix.backend }};$PATH\"\n          fi\n          export CGO_LDFLAGS=\"-L$PWD/build/lib/${{ matrix.backend }}\"\n          cd runner/nexa-sdk && go test -v -run \"Test.*LLM|TestChatMultiTurn\"\n"
  },
  {
    "path": ".gitignore",
    "content": ".DS_Store\n.vscode/\ntempnexaai-env/\n"
  },
  {
    "path": "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 2024-2026 Nexa AI, Inc.\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": "NOTICE",
    "content": "# Third-Party Licenses\n\nThis document provides information about third-party libraries used in the NexaSDK project and their respective licenses. All libraries listed below are licensed under permissive open-source licenses (MIT, Apache 2.0, BSD, or equivalent) that are compatible with NexaSDK's Apache 2.0 license.\n\n---\n\n## Go Dependencies\n\n### gin-gonic/gin\n\n- **License**: MIT License\n- **URL**: https://github.com/gin-gonic/gin\n- **Description**: HTTP web framework written in Go\n\n### spf13/cobra\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/spf13/cobra\n- **Description**: Commander for modern Go CLI applications\n\n### spf13/viper\n\n- **License**: MIT License\n- **URL**: https://github.com/spf13/viper\n- **Description**: Go configuration with fangs\n\n### AWS SDK for Go v2\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/aws/aws-sdk-go-v2\n- **Description**: AWS SDK for the Go programming language\n- **Packages**: aws-sdk-go-v2, aws-sdk-go-v2/config, aws-sdk-go-v2/service/s3\n\n### bytedance/sonic\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/bytedance/sonic\n- **Description**: Blazingly fast JSON serializing & deserializing library\n\n### charmbracelet/huh\n\n- **License**: MIT License\n- **URL**: https://github.com/charmbracelet/huh\n- **Description**: Build terminal forms and prompts\n\n### charmbracelet/lipgloss\n\n- **License**: MIT License\n- **URL**: https://github.com/charmbracelet/lipgloss\n- **Description**: Style definitions for nice terminal layouts\n\n### charmbracelet/bubbletea\n\n- **License**: MIT License\n- **URL**: https://github.com/charmbracelet/bubbletea\n- **Description**: Powerful little TUI framework\n\n### dustin/go-humanize\n\n- **License**: MIT License\n- **URL**: https://github.com/dustin/go-humanize\n- **Description**: Formatters for units to human friendly sizes\n\n### gofrs/flock\n\n- **License**: BSD 3-Clause License\n- **URL**: https://github.com/gofrs/flock\n- **Description**: Thread-safe file locking library\n\n### chzyer/readline\n\n- **License**: MIT License\n- **URL**: https://github.com/chzyer/readline\n- **Description**: Pure Go readline library with support for command line editing and history\n\n### openai/openai-go\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/openai/openai-go\n- **Description**: OpenAI Go API library\n\n### schollz/progressbar\n\n- **License**: MIT License\n- **URL**: https://github.com/schollz/progressbar\n- **Description**: Simple command line progress bar\n\n### valyala/fasthttp\n\n- **License**: MIT License\n- **URL**: https://github.com/valyala/fasthttp\n- **Description**: Fast HTTP implementation for Go\n\n---\n\n## C/C++ Dependencies\n\n### ggml\n\n- **License**: MIT License\n- **Copyright**: Copyright (c) 2023-2024 The ggml authors\n- **URL**: https://github.com/ggml-org/ggml\n- **Description**: Tensor library for machine learning\n- **License File**: https://github.com/ggml-org/ggml/blob/master/LICENSE\n\n### pybind11\n\n- **License**: BSD 3-Clause License\n- **Copyright**: Copyright (c) 2016 Wenzel Jakob\n- **URL**: https://github.com/pybind/pybind11\n- **Description**: Seamless operability between C++11 and Python\n- **License File**: [nexasdk-bridge/third-party/pybind11/LICENSE](https://github.com/pybind/pybind11/blob/master/LICENSE)\n\n### mlx-audio\n\n- **License**: MIT License\n- **Copyright**: Copyright (c) 2024 Prince Canuma\n- **URL**: https://github.com/Blaizzy/mlx-audio\n- **Description**: Audio processing with MLX\n- **License File**: [nexasdk-bridge/third-party/mlx-audio/LICENSE](https://github.com/Blaizzy/mlx-audio/blob/main/LICENSE)\n\n### mlx-vlm\n\n- **License**: MIT License\n- **Copyright**: Copyright © 2023 Apple Inc.\n- **URL**: https://github.com/Blaizzy/mlx-vlm\n- **Description**: Vision-language models with MLX\n- **License File**: [nexasdk-bridge/third-party/mlx-vlm/LICENSE](https://github.com/Blaizzy/mlx-vlm/blob/main/LICENSE)\n\n### xtensor\n\n- **License**: BSD 3-Clause License\n- **Copyright**: Copyright (c) 2016 Johan Mabille, Sylvain Corlay and Wolf Vollprecht, Copyright (c) 2016 QuantStack\n- **URL**: https://github.com/xtensor-stack/xtensor\n- **Description**: C++ tensors with broadcasting and lazy computing\n- **License File**: https://github.com/xtensor-stack/xtensor/blob/master/LICENSE\n\n### cpp-httplib\n\n- **License**: MIT License\n- **Copyright**: Copyright (c) 2017 yhirose\n- **URL**: https://github.com/yhirose/cpp-httplib\n- **Description**: C++ single-file header-only HTTP/HTTPS library\n- **Used in**: llama.cpp\n- **License File**: [nexasdk-bridge/third-party/llama.cpp/licenses/LICENSE-httplib](https://github.com/ggerganov/llama.cpp/blob/master/licenses/LICENSE-httplib)\n\n### nlohmann/json\n\n- **License**: MIT License\n- **Copyright**: Copyright (c) 2013-2025 Niels Lohmann\n- **URL**: https://github.com/nlohmann/json\n- **Description**: JSON for Modern C++\n- **Used in**: llama.cpp\n- **License File**: [nexasdk-bridge/third-party/llama.cpp/licenses/LICENSE-jsonhpp](https://github.com/ggerganov/llama.cpp/blob/master/licenses/LICENSE-jsonhpp)\n\n---\n\n## Python Dependencies\n\n### gradio\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/gradio-app/gradio\n- **Description**: Build machine learning web apps\n\n### requests\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/psf/requests\n- **Description**: HTTP library for Python\n\n### Flask\n\n- **License**: BSD 3-Clause License\n- **URL**: https://github.com/pallets/flask\n- **Description**: Lightweight WSGI web application framework\n\n### faiss-cpu\n\n- **License**: MIT License\n- **URL**: https://github.com/facebookresearch/faiss\n- **Description**: Library for efficient similarity search and clustering of dense vectors\n\n### sentence-transformers\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/UKPLab/sentence-transformers\n- **Description**: Compute dense vector representations for sentences and paragraphs\n\n### langchain\n\n- **License**: MIT License\n- **URL**: https://github.com/langchain-ai/langchain\n- **Description**: Building applications with LLMs through composability\n\n### pydantic\n\n- **License**: MIT License\n- **URL**: https://github.com/pydantic/pydantic\n- **Description**: Data validation using Python type hints\n\n### python-docx\n\n- **License**: MIT License\n- **URL**: https://github.com/python-openxml/python-docx\n- **Description**: Create and modify Word documents with Python\n\n### psutil\n\n- **License**: BSD 3-Clause License\n- **URL**: https://github.com/giampaolo/psutil\n- **Description**: Cross-platform library for process and system monitoring\n\n### openai\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/openai/openai-python\n- **Description**: Python library for the OpenAI API\n\n### mcp\n\n- **License**: MIT License\n- **URL**: https://github.com/modelcontextprotocol/python-sdk\n- **Description**: Model Context Protocol Python SDK\n\n---\n\n## Android/Java Dependencies (from bindings/android)\n\n### AndroidX Libraries\n\n- **License**: Apache License 2.0\n- **URL**: https://developer.android.com/jetpack/androidx\n- **Description**: Android Jetpack libraries\n- **Packages**: core-ktx, lifecycle-runtime-ktx, activity-compose, compose-bom, appcompat, constraintlayout\n\n### Kotlin Standard Library\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/JetBrains/kotlin\n- **Description**: Kotlin programming language standard library\n\n### AWS Android SDK S3\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/aws/aws-sdk-android\n- **Description**: AWS SDK for Android - S3 support\n\n### OkHttp\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/square/okhttp\n- **Description**: HTTP client for Android and Java\n\n### Gson\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/google/gson\n- **Description**: Java serialization/deserialization library to convert Java Objects into JSON\n\n### Glide\n\n- **License**: BSD, MIT, and Apache License 2.0 (Multi-license)\n- **URL**: https://github.com/bumptech/glide\n- **Description**: Fast and efficient image loading library for Android\n\n### Kotlinx Serialization\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/Kotlin/kotlinx.serialization\n- **Description**: Multiplatform serialization for Kotlin\n\n### Kotlinx Coroutines\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/Kotlin/kotlinx.coroutines\n- **Description**: Library support for Kotlin coroutines\n\n### Material Components for Android\n\n- **License**: Apache License 2.0\n- **URL**: https://github.com/material-components/material-components-android\n- **Description**: Modular and customizable Material Design UI components\n\n---\n\n## Summary\n\nAll third-party libraries used in NexaSDK are licensed under permissive open-source licenses that allow for commercial and non-commercial use, modification, and distribution. The primary licenses used are:\n\n- **MIT License**: Highly permissive, allows almost unrestricted use\n- **Apache License 2.0**: Permissive license with patent grant and attribution requirements\n- **BSD 3-Clause License**: Permissive license with attribution requirements\n"
  },
  {
    "path": "README.md",
    "content": "<div align=\"center\" style=\"text-decoration: none;\">\n  <img width=\"100%\" src=\"assets/banner1.png\" alt=\"Nexa AI Banner\">\n  <p style=\"font-size: 1.3em; font-weight: 600; margin-bottom: 20px;\"> \n    <a href=\"README_zh.md\"> 简体中文 </a>\n    |\n    <a href=\"README.md\"> English </a>\n  </p>\n  <p style=\"font-size: 1.3em; font-weight: 600; margin-bottom: 20px;\">🤝 Supported chipmakers </p>\n    <picture>\n      <source srcset=\"assets/chipmakers-dark.png\" media=\"(prefers-color-scheme: dark)\">\n      <source srcset=\"assets/chipmakers.png\" media=\"(prefers-color-scheme: light)\">\n      <img src=\"assets/chipmakers-dark.png\" style=\"max-height:30px; height:auto; width:auto;\">\n    </picture>\n  </p>\n  <p>\n    <a href=\"https://www.producthunt.com/products/nexasdk-for-mobile?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-nexasdk-for-mobile\" target=\"_blank\" rel=\"noopener noreferrer\">\n        <img alt=\"NexaSDK for Mobile - #1 Product of the Day\" width=\"180\" height=\"39\" src=\"https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1049998&theme=dark&period=daily&t=1765991451976\">\n    </a>\n    <a href=\"https://trendshift.io/repositories/12239\" target=\"_blank\" rel=\"noopener noreferrer\">\n        <img alt=\"NexaAI/nexa-sdk - #1 Repository of the Day\" height=\"39\" src=\"https://trendshift.io/api/badge/repositories/12239\">\n    </a>\n  </p>\n  <p>\n    <a href=\"https://docs.nexa.ai\">\n        <img src=\"https://img.shields.io/badge/docs-website-brightgreen?logo=readthedocs\" alt=\"Documentation\">\n    </a>\n    <a href=\"https://sdk.nexa.ai/wishlist\">\n        <img src=\"https://img.shields.io/badge/🎯_Vote_for-Next_Models-ff69b4?style=flat-square\" alt=\"Vote for Next Models\">\n    </a>\n    <a href=\"https://x.com/nexa_ai\"><img alt=\"X account\" src=\"https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40Nexa_AI\"></a>\n    <a href=\"https://discord.com/invite/nexa-ai\">\n        <img src=\"https://img.shields.io/discord/1192186167391682711?color=5865F2&logo=discord&logoColor=white&style=flat-square\" alt=\"Join us on Discord\">\n    </a>\n    <a href=\"https://join.slack.com/t/nexa-ai-community/shared_invite/zt-3837k9xpe-LEty0disTTUnTUQ4O3uuNw\">\n        <img src=\"https://img.shields.io/badge/slack-join%20chat-4A154B?logo=slack&logoColor=white\" alt=\"Join us on Slack\">\n    </a>\n  </p>\n</div>\n\n# NexaSDK\n\n**NexaSDK lets you build the smartest and fastest on-device AI with minimum energy.** It is a highly performant local inference framework that runs the latest multimodal AI models locally on NPU, GPU, and CPU - across Android, Windows, Linux, macOS, and iOS devices with a few lines of code.\n\nNexaSDK supports latest models **weeks or months before anyone else** — Qwen3-VL, DeepSeek-OCR, Gemma3n (Vision), and more.\n\n> ⭐ **Star this repo** to keep up with exciting updates and new releases about latest on-device AI capabilities.\n\n## 🏆 Recognized Milestones\n\n- **Qualcomm** featured us **3 times** in official blogs.\n  - [Innovating Multimodal AI on Qualcomm Hexagon NPU](https://www.qualcomm.com/developer/blog/2025/09/omnineural-4b-nexaml-qualcomm-hexagon-npu).\n  - [First-ever Day-0 model support on Qualcomm Hexagon NPU for compute and mobile platforms, Auto and IoT](https://www.qualcomm.com/developer/blog/2025/10/granite-4-0-to-the-edge-on-device-ai-for-real-world-performance).\n  - [A simple way to bring on-device AI to smartphones with Snapdragon](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon)\n- **Qwen** featured us for [Day-0 Qwen3-VL support on NPU, GPU, and CPU](https://x.com/Alibaba_Qwen/status/1978154384098754943). We were 3 weeks ahead of Ollama and llama.cpp on GGUF support, and no one else supports it on NPU to date.\n- **IBM** featured our NexaML inference engine alongside vLLM, llama.cpp, and MLX in [official IBM blog](https://www.ibm.com/new/announcements/ibm-granite-4-0-hyper-efficient-high-performance-hybrid-models) and also for Day-0 Granite 4.0 support.\n- **Google** featured us for [EmbeddingGemma Day-0 NPU support](https://x.com/googleaidevs/status/1969188152049889511).\n- **AMD** featured us for [enabling SDXL-turbo image generation on AMD NPU](https://www.amd.com/en/developer/resources/technical-articles/2025/advancing-ai-with-nexa-ai--image-generation-on-amd-npu-with-sdxl.html).\n- **NVIDIA** featured Hyperlink, a viral local AI app powered by NexaSDK, in their [official blog](https://blogs.nvidia.com/blog/rtx-ai-garage-nexa-hyperlink-local-agent/).\n- **Microsoft** presented us on stage at Microsoft Ignite 2025 as [official partner](https://www.linkedin.com/posts/mixen_excited-to-celebrate-our-developer-partnerships-activity-7396601602327007232-AmCR?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k).\n- **Intel** featured us for [Intel NPU support in NexaSDK](https://www.linkedin.com/posts/intel-software_ai-ondeviceai-nexasdk-activity-7376337062087667712-xw7i?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k).\n\n## 🚀 Quick Start\n\n| Platform        | Links                                                                                     |\n| --------------- | ----------------------------------------------------------------------------------------- |\n| 🖥️ CLI          | [Quick Start](#-cli) ｜ [Docs](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI)               |\n| 🐍 Python       | [Quick Start](#-python-sdk) ｜ [Docs](https://docs.nexa.ai/en/nexa-sdk-python/overview)   |\n| 🤖 Android      | [Quick Start](#-android-sdk) ｜ [Docs](https://docs.nexa.ai/en/nexa-sdk-android/overview) |\n| 🐳 Linux Docker | [Quick Start](#-linux-docker) ｜ [Docs](https://docs.nexa.ai/en/nexa-sdk-docker/overview) |\n| 🍎 iOS          | [Quick Start](#-ios-sdk) ｜ [Docs](https://docs.nexa.ai/en/nexa-sdk-ios/overview)         |\n\n---\n\n### 🖥️ CLI\n\n**Download:**\n\n| Windows                                                                                                  | macOS                                                                                                   | Linux                                                                                        |\n| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| [arm64 (Qualcomm NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_arm64.exe) | [arm64 (Apple Silicon)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_arm64.pkg) | [arm64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_arm64.sh) |\n| [x64 (Intel/AMD NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_x86_64.exe) | [x64](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_x86_64.pkg)                  | [x64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_x86_64.sh)  |\n\n**Run your first model:**\n\n```bash\n# Chat with Qwen3\nnexa infer ggml-org/Qwen3-1.7B-GGUF\n\n# Multimodal: drag images into the CLI\nnexa infer NexaAI/Qwen3-VL-4B-Instruct-GGUF\n\n# NPU (Windows arm64 with Snapdragon X Elite)\nnexa infer NexaAI/OmniNeural-4B\n```\n\n- **Models:** LLM, Multimodal, ASR, OCR, Rerank, Object Detection, Image Generation, Embedding\n- **Formats:** GGUF, MLX, NEXA\n- **NPU Models:** [Model Hub](https://sdk.nexa.ai/model)\n- 📖 [CLI Reference Docs](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI)\n\n---\n\n### 🐍 Python SDK\n\n```bash\npip install nexaai\n```\n\n```python\nfrom nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage\n\nllm = LLM.from_(model=\"NexaAI/Qwen3-0.6B-GGUF\", config=ModelConfig())\n\nconversation = [\n    LlmChatMessage(role=\"user\", content=\"Hello, tell me a joke\")\n]\nprompt = llm.apply_chat_template(conversation)\nfor token in llm.generate_stream(prompt, GenerationConfig(max_tokens=100)):\n    print(token, end=\"\", flush=True)\n```\n\n- **Models:** LLM, Multimodal, ASR, OCR, Rerank, Object Detection, Image Generation, Embedding\n- **Formats:** GGUF, MLX, NEXA\n- **NPU Models:** [Model Hub](https://sdk.nexa.ai/model)\n- 📖 [Python SDK Docs](https://docs.nexa.ai/en/nexa-sdk-python/quickstart)\n\n---\n\n### 🤖 Android SDK\n\nAdd to your `app/AndroidManifest.xml`\n\n```xml\n<application android:extractNativeLibs=\"true\">\n```\n\nAdd to your `build.gradle.kts`:\n\n```kotlin\ndependencies {\n    implementation(\"ai.nexa:core:0.0.19\")\n}\n```\n\n```kotlin\n// Initialize SDK\nNexaSdk.getInstance().init(this)\n\n// Load and run model\nVlmWrapper.builder()\n    .vlmCreateInput(VlmCreateInput(\n        model_name = \"omni-neural\",\n        model_path = \"/data/data/your.app/files/models/OmniNeural-4B/files-1-1.nexa\",\n        plugin_id = \"npu\",\n        config = ModelConfig()\n    ))\n    .build()\n    .onSuccess { vlm ->\n        vlm.generateStreamFlow(\"Hello!\", GenerationConfig()).collect { print(it) }\n    }\n```\n\n- **Requirements:** Android minSdk 27, Qualcomm Snapdragon 8 Gen 4 Chip\n- **Models:** LLM, Multimodal, ASR, OCR, Rerank, Embedding\n- **NPU Models:** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-android/overview#supported-models)\n- 📖 [Android SDK Docs](https://docs.nexa.ai/en/nexa-sdk-android/quickstart)\n\n---\n\n### 🐳 Linux Docker\n\n```bash\ndocker pull nexa4ai/nexasdk:latest\n\nexport NEXA_TOKEN=\"your_token_here\"\ndocker run --rm -it --privileged \\\n  -e NEXA_TOKEN \\\n  nexa4ai/nexasdk:latest infer NexaAI/Granite-4.0-h-350M-NPU\n```\n\n- **Requirements:** Qualcomm Dragonwing IQ9, ARM64 systems\n- **Models:** LLM, VLM, ASR, CV, Rerank, Embedding\n- **NPU Models:** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-docker/overview#supported-models)\n- 📖 [Linux Docker Docs](https://docs.nexa.ai/en/nexa-sdk-docker/quickstart)\n\n---\n\n### 🍎 iOS SDK\n\nDownload [NexaSdk.xcframework](https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/ios/latest/NexaSdk.xcframework.zip) and add to your Xcode project.\n\n```swift\nimport NexaSdk\n\n// Example: Speech Recognition\nlet asr = try Asr(plugin: .ane)\ntry await asr.load(from: modelURL)\n\nlet result = try await asr.transcribe(options: .init(audioPath: \"audio.wav\"))\nprint(result.asrResult.transcript)\n```\n\n- **Requirements:** iOS 17.0+ / macOS 15.0+, Swift 5.9+\n- **Models:** LLM, ASR, OCR, Rerank, Embedding\n- **ANE Models:** [Apple Neural Engine Models](https://huggingface.co/collections/NexaAI/apple-neural-engine)\n- 📖 [iOS SDK Docs](https://docs.nexa.ai/en/nexa-sdk-ios/quickstart)\n\n## ⚙️ Features & Comparisons\n\n<div align=\"center\">\n\n| Features                                 | **NexaSDK**                                                | **Ollama** | **llama.cpp** | **LM Studio** |\n| ---------------------------------------- | ---------------------------------------------------------- | ---------- | ------------- | ------------- |\n| NPU support                              | ✅ NPU-first                                               | ❌         | ❌            | ❌            |\n| Android/iOS SDK support                  | ✅ NPU/GPU/CPU support                                     | ⚠️         | ⚠️            | ❌            |\n| Linux support (Docker image)             | ✅                                                         | ✅         | ✅            | ❌            |\n| Day-0 model support in GGUF, MLX, NEXA   | ✅                                                         | ❌         | ⚠️            | ❌            |\n| Full multimodality support               | ✅ Image, Audio, Text, Embedding, Rerank, ASR, TTS         | ⚠️         | ⚠️            | ⚠️            |\n| Cross-platform support                   | ✅ Desktop, Mobile (Android, iOS), Automotive, IoT (Linux) | ⚠️         | ⚠️            | ⚠️            |\n| One line of code to run                  | ✅                                                         | ✅         | ⚠️            | ✅            |\n| OpenAI-compatible API + Function calling | ✅                                                         | ✅         | ✅            | ✅            |\n\n<p align=\"center\" style=\"margin-top:14px\">\n  <i>\n      <b>Legend:</b>\n      <span title=\"Full support\">✅ Supported</span> &nbsp; | &nbsp;\n      <span title=\"Partial or limited support\">⚠️ Partial or limited support </span> &nbsp; | &nbsp;\n      <span title=\"Not Supported\">❌ No</span>\n  </i>\n</p>\n</div>\n\n## 🙏 Acknowledgements\n\nWe would like to thank the following projects:\n\n- [ggml](https://github.com/ggml-org/ggml)\n- [mlx-lm](https://github.com/ml-explore/mlx-lm)\n- [mlx-vlm](https://github.com/Blaizzy/mlx-vlm)\n- [mlx-audio](https://github.com/Blaizzy/mlx-audio)\n\n## 📄 License\n\nNexaSDK uses a dual licensing model:\n\n### CPU/GPU Components\n\nLicensed under [Apache License 2.0](LICENSE).\n\n### NPU Components\n\n- **Personal Use**: Free license key available from [Nexa AI Model Hub](https://sdk.nexa.ai/model). Each key activates 1 device for NPU usage.\n- **Commercial Use**: Contact [hello@nexa.ai](mailto:hello@nexa.ai) for licensing.\n\n## 🤝 Contact & Community Support\n\n### Business Inquiries\n\nFor model launching partner, business inquiries, or any other questions, please schedule a call with us [here](https://nexa.ai/book-a-call).\n\n### Community & Support\n\nWant more model support, backend support, device support or other features? We'd love to hear from you!\n\nFeel free to [submit an issue](https://github.com/NexaAI/nexa-sdk/issues) on our GitHub repository with your requests, suggestions, or feedback. Your input helps us prioritize what to build next.\n\nJoin our community:\n\n- [Discord](https://discord.gg/thRu2HaK4D)\n- [Slack](https://join.slack.com/t/nexaai/shared_invite/zt-30a8yfv8k-1JqAXv~OjKJKLqvbKqHJxA)\n- **[Nexa Wishlist](https://sdk.nexa.ai/wishlist)** — Request and vote for the models you want to run on-device.\n\n## 🏆 Nexa × Qualcomm On-Device Bounty Program\n\nRound 1: Build a working Android AI app that runs fully on-device on Qualcomm Hexagon NPU with NexaSDK.\n\nTimeline (PT): Jan 15 → Feb 15\nPrizes: $6,500 cash prize, Qualcomm official spotlight, flagship Snapdragon device, expert mentorship, and more\n\n👉 Join & details: [https://sdk.nexa.ai/bounty](https://sdk.nexa.ai/bounty)\n"
  },
  {
    "path": "README_zh.md",
    "content": "<div align=\"center\" style=\"text-decoration: none;\">\n\t<img width=\"100%\" src=\"assets/banner1.png\" alt=\"Nexa AI Banner\">\n\t<p style=\"font-size: 1.3em; font-weight: 600; margin-bottom: 20px;\"> \n\t\t<a href=\"README_zh.md\"> 简体中文 </a>\n\t\t|\n\t\t<a href=\"README.md\"> English </a>\n\t</p>\n\t<p style=\"font-size: 1.3em; font-weight: 600; margin-bottom: 20px;\">🤝 支持的芯片厂商 </p>\n\t\t<picture>\n\t\t\t<source srcset=\"assets/chipmakers-dark.png\" media=\"(prefers-color-scheme: dark)\">\n\t\t\t<source srcset=\"assets/chipmakers.png\" media=\"(prefers-color-scheme: light)\">\n\t\t\t<img src=\"assets/chipmakers.png\" style=\"max-height:30px; height:auto; width:auto;\">\n\t\t</picture>\n\t</p>\n\t<p>\n\t\t<a href=\"https://www.producthunt.com/products/nexasdk-for-mobile?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-nexasdk-for-mobile\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t<img alt=\"NexaSDK for Mobile - #1 Product of the Day\" width=\"180\" height=\"39\" src=\"https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1049998&theme=dark&period=daily&t=1765991451976\">\n\t\t</a>\n\t\t<a href=\"https://trendshift.io/repositories/12239\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t<img alt=\"NexaAI/nexa-sdk - #1 Repository of the Day\" height=\"39\" src=\"https://trendshift.io/api/badge/repositories/12239\">\n\t\t</a>\n\t</p>\n\t<p>\n\t\t<a href=\"https://docs.nexa.ai\">\n\t\t\t\t<img src=\"https://img.shields.io/badge/docs-website-brightgreen?logo=readthedocs\" alt=\"Documentation\">\n\t\t</a>\n\t\t<a href=\"https://sdk.nexa.ai/wishlist\">\n\t\t\t\t<img src=\"https://img.shields.io/badge/🎯_Vote_for-Next_Models-ff69b4?style=flat-square\" alt=\"Vote for Next Models\">\n\t\t</a>\n\t\t<a href=\"https://x.com/nexa_ai\"><img alt=\"X account\" src=\"https://img.shields.io/twitter/url/https/twitter.com/diffuserslib.svg?style=social&label=Follow%20%40Nexa_AI\"></a>\n\t\t<a href=\"https://discord.com/invite/nexa-ai\">\n\t\t\t\t<img src=\"https://img.shields.io/discord/1192186167391682711?color=5865F2&logo=discord&logoColor=white&style=flat-square\" alt=\"Join us on Discord\">\n\t\t</a>\n\t\t<a href=\"https://join.slack.com/t/nexa-ai-community/shared_invite/zt-3837k9xpe-LEty0disTTUnTUQ4O3uuNw\">\n\t\t\t\t<img src=\"https://img.shields.io/badge/slack-join%20chat-4A154B?logo=slack&logoColor=white\" alt=\"Join us on Slack\">\n\t\t</a>\n\t</p>\n</div>\n\n# NexaSDK\n\n**NexaSDK 让你用极低能耗打造最快、最聪明的本地 AI。** 它是一套高性能本地推理框架，只需几行代码即可在 Android、Windows、Linux、macOS 与 iOS 的 NPU、GPU、CPU 上运行最新的多模态 AI 模型。\n\nNexaSDK 往往能比其他人提前数周甚至数月支持最新模型 —— Qwen3-VL、DeepSeek-OCR、Gemma3n（视觉版）等。\n\n> ⭐ **star本仓库**，及时获取最新的本地 AI 能力更新与发布。\n\n## 🏆 重要里程碑\n\n- **Qualcomm** 官方博客中 3 次重点介绍我们。\n\t- [在 Qualcomm Hexagon NPU 上创新多模态 AI](https://www.qualcomm.com/developer/blog/2025/09/omnineural-4b-nexaml-qualcomm-hexagon-npu)。\n\t- [Qualcomm Hexagon NPU 在计算与移动平台（汽车与 IoT）上的首个 Day-0 模型支持](https://www.qualcomm.com/developer/blog/2025/10/granite-4-0-to-the-edge-on-device-ai-for-real-world-performance)。\n\t- [在 Snapdragon 手机上体验端侧 AI 的简单方式](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon)\n- **Qwen** 为我们在 NPU、GPU、CPU 上 [Day-0 支持 Qwen3-VL](https://x.com/Alibaba_Qwen/status/1978154384098754943) 做了官方推荐。我们在 GGUF 支持上领先 Ollama 和 llama.cpp 3 周，并且目前只有我们支持 NPU。\n- **IBM** 在[官方博客](https://www.ibm.com/new/announcements/ibm-granite-4-0-hyper-efficient-high-performance-hybrid-models)中，将 NexaML 推理引擎与 vLLM、llama.cpp、MLX 并列介绍，感谢我们 Day-0 支持 Granite 4.0。\n- **Google** 认可我们对 EmbeddingGemma Day-0 的 NPU 支持（[官方致谢](https://x.com/googleaidevs/status/1969188152049889511)）。\n- **AMD** 在[官方博客](https://www.amd.com/en/developer/resources/technical-articles/2025/advancing-ai-with-nexa-ai--image-generation-on-amd-npu-with-sdxl.html)报道我们在 AMD NPU 上实现 SDXL-turbo 图像生成。\n- **NVIDIA** 在[官方博客](https://blogs.nvidia.com/blog/rtx-ai-garage-nexa-hyperlink-local-agent/)中介绍了由 NexaSDK 支撑的火爆本地 AI 应用 Hyperlink。\n- **Microsoft** 在 Microsoft Ignite 2025 上台展示了我们作为[官方合作伙伴](https://www.linkedin.com/posts/mixen_excited-to-celebrate-our-developer-partnerships-activity-7396601602327007232-AmCR?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k)。\n- **Intel** 在[官方帖子](https://www.linkedin.com/posts/intel-software_ai-ondeviceai-nexasdk-activity-7376337062087667712-xw7i?utm_source=share&utm_medium=member_desktop&rcm=ACoAAChXnS8B4gqbBLUlWfwt-ck0XAv472NzT4k)中提到我们对 Intel NPU 的支持。\n\n## 🚀 快速开始\n\n| 平台            | 链接                                                                                           |\n| --------------- | ---------------------------------------------------------------------------------------------- |\n| 🖥️ CLI          | [快速开始](#-cli) ｜ [文档](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI)                        |\n| 🐍 Python       | [快速开始](#-python-sdk) ｜ [文档](https://docs.nexa.ai/en/nexa-sdk-python/overview)            |\n| 🤖 Android      | [快速开始](#-android-sdk) ｜ [文档](https://docs.nexa.ai/en/nexa-sdk-android/overview)          |\n| 🐳 Linux Docker | [快速开始](#-linux-docker) ｜ [文档](https://docs.nexa.ai/en/nexa-sdk-docker/overview)          |\n| 🍎 iOS          | [快速开始](#-ios-sdk) ｜ [文档](https://docs.nexa.ai/en/nexa-sdk-ios/overview)                  |\n\n---\n\n### 🖥️ CLI\n\n**下载：**\n\n| Windows                                                                                                  | macOS                                                                                                   | Linux                                                                                        |\n| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| [arm64 (Qualcomm NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_arm64.exe) | [arm64 (Apple Silicon)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_arm64.pkg) | [arm64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_arm64.sh) |\n| [x64 (Intel/AMD NPU)](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_windows_x86_64.exe) | [x64](https://public-storage.nexa4ai.com/nexa_sdk/downloads/nexa-cli_macos_x86_64.pkg)                  | [x64](https://github.com/NexaAI/nexa-sdk/releases/latest/download/nexa-cli_linux_x86_64.sh)  |\n\n**运行你的第一个模型：**\n\n```bash\n# 与 Qwen3 对话\nnexa infer ggml-org/Qwen3-1.7B-GGUF\n\n# 多模态：在 CLI 中拖入图片\nnexa infer NexaAI/Qwen3-VL-4B-Instruct-GGUF\n\n# NPU（Windows arm64，Snapdragon X Elite）\nnexa infer NexaAI/OmniNeural-4B\n```\n\n- **模型类型：** LLM、多模态、ASR、OCR、Rerank、目标检测、图像生成、Embedding\n- **格式：** GGUF、MLX、NEXA\n- **NPU 模型：** [Model Hub](https://sdk.nexa.ai/model)\n- 📖 [CLI 参考文档](https://docs.nexa.ai/en/nexa-sdk-go/NexaCLI)\n\n---\n\n### 🐍 Python SDK\n\n```bash\npip install nexaai\n```\n\n```python\nfrom nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage\n\nllm = LLM.from_(model=\"NexaAI/Qwen3-0.6B-GGUF\", config=ModelConfig())\n\nconversation = [\n\t\tLlmChatMessage(role=\"user\", content=\"Hello, tell me a joke\")\n]\nprompt = llm.apply_chat_template(conversation)\nfor token in llm.generate_stream(prompt, GenerationConfig(max_tokens=100)):\n\t\tprint(token, end=\"\", flush=True)\n```\n\n- **模型类型：** LLM、多模态、ASR、OCR、Rerank、目标检测、图像生成、Embedding\n- **格式：** GGUF、MLX、NEXA\n- **NPU 模型：** [Model Hub](https://sdk.nexa.ai/model)\n- 📖 [Python SDK 文档](https://docs.nexa.ai/en/nexa-sdk-python/quickstart)\n\n---\n\n### 🤖 Android SDK\n\n在 `app/AndroidManifest.xml` 中添加：\n\n```xml\n<application android:extractNativeLibs=\"true\">\n```\n\n在 `build.gradle.kts` 中添加：\n\n```kotlin\ndependencies {\n\t\timplementation(\"ai.nexa:core:0.0.19\")\n}\n```\n\n```kotlin\n// 初始化 SDK\nNexaSdk.getInstance().init(this)\n\n// 加载并运行模型\nVlmWrapper.builder()\n\t\t.vlmCreateInput(VlmCreateInput(\n\t\t\t\tmodel_name = \"omni-neural\",\n\t\t\t\tmodel_path = \"/data/data/your.app/files/models/OmniNeural-4B/files-1-1.nexa\",\n\t\t\t\tplugin_id = \"npu\",\n\t\t\t\tconfig = ModelConfig()\n\t\t))\n\t\t.build()\n\t\t.onSuccess { vlm ->\n\t\t\t\tvlm.generateStreamFlow(\"Hello!\", GenerationConfig()).collect { print(it) }\n\t\t}\n```\n\n- **要求：** Android minSdk 27，Qualcomm Snapdragon 8 Gen 4 芯片\n- **模型类型：** LLM、多模态、ASR、OCR、Rerank、Embedding\n- **NPU 模型：** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-android/overview#supported-models)\n- 📖 [Android SDK 文档](https://docs.nexa.ai/en/nexa-sdk-android/quickstart)\n\n---\n\n### 🐳 Linux Docker\n\n```bash\ndocker pull nexa4ai/nexasdk:latest\n\nexport NEXA_TOKEN=\"your_token_here\"\ndocker run --rm -it --privileged \\\n\t-e NEXA_TOKEN \\\n\tnexa4ai/nexasdk:latest infer NexaAI/Granite-4.0-h-350M-NPU\n```\n\n- **要求：** Qualcomm Dragonwing IQ9，ARM64 系统\n- **模型类型：** LLM、VLM、ASR、CV、Rerank、Embedding\n- **NPU 模型：** [Supported Models](https://docs.nexa.ai/en/nexa-sdk-docker/overview#supported-models)\n- 📖 [Linux Docker 文档](https://docs.nexa.ai/en/nexa-sdk-docker/quickstart)\n\n---\n\n### 🍎 iOS SDK\n\n下载 [NexaSdk.xcframework](https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/ios/latest/NexaSdk.xcframework.zip) 并添加到 Xcode 项目。\n\n```swift\nimport NexaSdk\n\n// 示例：语音识别\nlet asr = try Asr(plugin: .ane)\ntry await asr.load(from: modelURL)\n\nlet result = try await asr.transcribe(options: .init(audioPath: \"audio.wav\"))\nprint(result.asrResult.transcript)\n```\n\n- **要求：** iOS 17.0+ / macOS 15.0+，Swift 5.9+\n- **模型类型：** LLM、ASR、OCR、Rerank、Embedding\n- **ANE 模型：** [Apple Neural Engine Models](https://huggingface.co/collections/NexaAI/apple-neural-engine)\n- 📖 [iOS SDK 文档](https://docs.nexa.ai/en/nexa-sdk-ios/quickstart)\n\n## ⚙️ 功能与对比\n\n<div align=\"center\">\n\n| 功能                                   | **NexaSDK**                                                | **Ollama** | **llama.cpp** | **LM Studio** |\n| -------------------------------------- | ---------------------------------------------------------- | ---------- | ------------- | ------------- |\n| NPU 支持                               | ✅ NPU 优先                                                | ❌         | ❌            | ❌            |\n| Android/iOS SDK 支持                   | ✅ NPU/GPU/CPU 支持                                        | ⚠️         | ⚠️            | ❌            |\n| Linux 支持（Docker 镜像）              | ✅                                                         | ✅         | ✅            | ❌            |\n| Day-0 支持 GGUF、MLX、NEXA             | ✅                                                         | ❌         | ⚠️            | ❌            |\n| 完整多模态支持                         | ✅ 图像、音频、文本、Embedding、Rerank、ASR、TTS           | ⚠️         | ⚠️            | ⚠️            |\n| 跨平台支持                             | ✅ 桌面、移动（Android、iOS）、车载、IoT（Linux）          | ⚠️         | ⚠️            | ⚠️            |\n| 一行代码即可运行                       | ✅                                                         | ✅         | ⚠️            | ✅            |\n| OpenAI 兼容 API + Function calling     | ✅                                                         | ✅         | ✅            | ✅            |\n\n<p align=\"center\" style=\"margin-top:14px\">\n\t<i>\n\t\t\t<b>图例：</b>\n\t\t\t<span title=\"Full support\">✅ Supported</span> &nbsp; | &nbsp;\n\t\t\t<span title=\"Partial or limited support\">⚠️ Partial or limited support </span> &nbsp; | &nbsp;\n\t\t\t<span title=\"Not Supported\">❌ No</span>\n\t</i>\n</p>\n</div>\n\n## 🙏 致谢\n\n我们感谢以下项目：\n\n- [ggml](https://github.com/ggml-org/ggml)\n- [mlx-lm](https://github.com/ml-explore/mlx-lm)\n- [mlx-vlm](https://github.com/Blaizzy/mlx-vlm)\n- [mlx-audio](https://github.com/Blaizzy/mlx-audio)\n\n## 📄 许可证\n\nNexaSDK 采用双重许可模式：\n\n### CPU/GPU 组件\n\n基于 [Apache License 2.0](LICENSE)。\n\n### NPU 组件\n\n- **个人使用**：可从 [Nexa AI Model Hub](https://sdk.nexa.ai/model) 免费获取许可密钥。每个密钥激活 1 台设备的 NPU 使用。\n- **商业使用**：联系 [hello@nexa.ai](mailto:hello@nexa.ai) 获取授权。\n\n## 🤝 联系与社区支持\n\n### 商务合作\n\n如需模型发布合作、商务洽谈或其他问题，请在[此处](https://nexa.ai/book-a-call)安排会议。\n\n### 社区与支持\n\n想要更多模型支持、后端支持、设备支持或新功能？我们很乐意听到你的声音！\n\n欢迎在 GitHub [提交 issue](https://github.com/NexaAI/nexa-sdk/issues)，提出你的需求、建议或反馈。你的意见帮助我们确定优先级。\n\n加入社区：\n\n- [Discord](https://discord.gg/thRu2HaK4D)\n- [Slack](https://join.slack.com/t/nexaai/shared_invite/zt-30a8yfv8k-1JqAXv~OjKJKLqvbKqHJxA)\n- **[Nexa Wishlist](https://sdk.nexa.ai/wishlist)** —— 提交并为你想要运行在本地的模型投票。\n"
  },
  {
    "path": "bindings/android/.gitignore",
    "content": "# Gradle files\n.gradle/\nbuild/\narm64-v8a/\n.DS_Store\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Log/OS Files\n*.log\n\n# Android Studio generated files and folders\ncaptures/\n.externalNativeBuild/\n.cxx/\n*.aab\n*.apk\noutput-metadata.json\n\n# IntelliJ\n*.iml\n.idea/\nmisc.xml\ndeploymentTargetDropDown.xml\nrender.experimental.xml\n\n# Keystore files\n*.jks\n*.keystore\n\n# Google Services (e.g. APIs or Firebase)\ngoogle-services.json\n\n# Android Profiling\n*.hprof\napp/libs/app-release.aar\napp/libs/app-debug.aar\napp/release/\nrepo/"
  },
  {
    "path": "bindings/android/README.md",
    "content": "# Nexa Android SDK Demo App\n\n[![Product Hunt](https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1049998&theme=dark&period=daily&t=1765991451976)](https://www.producthunt.com/products/nexasdk-for-mobile)\n\n> 📣 **NexaSDK for Android** is highlighted by [Qualcomm blog](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon) as \"a simple way to bring on-device AI to smartphones with Snapdragon\"\n\n## Overview\n\nThe Nexa AI Android SDK enables on-device AI inference for Android applications with NPU acceleration. Run Large Language Models (LLMs), Vision-Language Models (VLMs), Embeddings, Speech Recognition (ASR), Reranking, and Computer Vision models on Android devices with support for NPU, GPU, and CPU inference. \n\n📖 For full documentation, see [Android SDK Doc](https://docs.nexa.ai/en/nexa-sdk-android/overview).\n\n## Device Compatibility\n\n### Supported Hardware\n\n| Component | Requirement |\n|-----------|-------------|\n| **NPU** | Qualcomm Snapdragon 8 Gen 4 (optimized) |\n| **GPU** | Qualcomm Adreno GPU |\n| **CPU** | ARM64-v8a |\n| **RAM** | 4GB+ recommended |\n| **Storage** | 100MB - 4GB (varies by model) |\n\n### Minimum Requirements\n\n- Android API Level 27+ (Android 8.1 Oreo)\n- Architecture: ARM64-v8a\n\n## Quick Start with APK\n\n### Standard Demo App\n\nDownload and install the pre-built APK:\n\n```bash\n# Download: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/android-demo-release/nexaai-demo-app.apk\nadb install nexaai-demo-app.apk\n```\n\n### GPT-OSS NPU Demo\n\nFor running GPT-OSS model on Qualcomm NPU:\n\n```bash\n# Download: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/gpt-oss-android-demo/nexaai-gpt-oss-npu.apk\nadb install nexaai-gpt-oss-npu.apk\n```\n\n## Build from Source\n\n> 🎬 Watch the [tutorial video](https://www.linkedin.com/feed/update/urn:li:activity:7394055404562935809) showing how to run the sample app in 40 seconds.\n\n### Step-by-Step Instructions\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/NexaAI/nexa-sdk/\n   ```\n\n2. **Open in Android Studio**\n   \n   Open the `bindings/android` folder in Android Studio.\n\n3. **Download a model**\n   \n   Follow the [Android SDK Doc](https://docs.nexa.ai/en/nexa-sdk-android/overview) to download a model. Below are some examples to download:\n   - [Granite-4.0-h-350M-NPU](https://huggingface.co/NexaAI/Granite-4.0-h-350M-NPU-mobile)\n   - [Granite-4-Micro-NPU](https://huggingface.co/NexaAI/Granite-4-Micro-NPU-mobile)\n   - [OmniNeural-4B](https://huggingface.co/NexaAI/OmniNeural-4B-mobile)\n   \n   Place the model in the app's data directory:\n   ```\n   /data/data/com.nexa.demo/files/models/<model-name>\n   ```\n\n4. **Build and run** the app in Android Studio\n\n## Tutorial: LFM2-24B-A2B-Preview-GGUF\n\nThis walkthrough uses the [LFM2-24B-A2B-Preview-GGUF](https://huggingface.co/NexaAI/LFM2-24B-A2B-Preview-GGUF) model in the demo app.\n\n1. **Install the app**  \n   Install the demo app (APK or build from source as above).\n\n2. **Select the model**  \n   Open the model selector (dropdown next to the model name) and choose **LFM2-24B-A2B-Preview-GGUF**.\n\n   <img src=\"../../assets/lfm0.png\" width=\"240\" alt=\"LFM2-24B-A2B-Preview-GGUF in demo app\" />\n\n3. **Download**  \n   Tap **Download** to fetch the model to your device. Wait until the download finishes.\n\n4. **Load**  \n   Tap **Load**. A **load model config** dialog appears: choose **CPU**, **GPU**, or **NPU** (for Qualcomm NPU), then tap **SURE**. Once the model is loaded, the chat area becomes available.\n\n   <img src=\"../../assets/lfm1.png\" width=\"240\" alt=\"load model config\" />\n\n5. **Chat**  \n   Type your message in the input field at the bottom, then tap **Send** to get a response. Use **Clear** to clear the input or conversation as needed.\n\n   <img src=\"../../assets/lfm2.png\" width=\"240\" alt=\"Chat with model response\" />\n"
  },
  {
    "path": "bindings/android/README_zh.md",
    "content": "# Nexa Android SDK 演示 App\n\n[![Product Hunt](https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1049998&theme=dark&period=daily&t=1765991451976)](https://www.producthunt.com/products/nexasdk-for-mobile)\n\n> 📣 **NexaSDK for Android** 被 [Qualcomm 博客](https://www.qualcomm.com/developer/blog/2025/11/nexa-ai-for-android-simple-way-to-bring-on-device-ai-to-smartphones-with-snapdragon) 评价为\"将端侧 AI 引入 Snapdragon 智能手机的简易方案\"\n\n## 概述\n\nNexa AI Android SDK 让 Android 应用可以在设备端使用 NPU 加速进行 AI 推理。支持在 Android 设备上运行大型语言模型（LLMs）、视觉语言模型（VLMs）、嵌入模型、语音识别（ASR）、重排序和计算机视觉模型，并可在 NPU、GPU 或 CPU 上进行推理。\n\n📖 完整文档请参考 [Android SDK 文档](https://docs.nexa.ai/cn/nexa-sdk-android/overview)。\n\n## 设备兼容性\n\n### 支持的硬件\n\n| 组件 | 要求 |\n|-----------|-------------|\n| **NPU** | 高通骁龙 8 Gen 4（已优化） |\n| **GPU** | 高通 Adreno GPU |\n| **CPU** | ARM64-v8a |\n| **RAM** | 推荐 4GB 及以上 |\n| **存储** | 100MB - 4GB（具体取决于模型） |\n\n### 最低要求\n\n- Android API 等级 27 及以上（Android 8.1 Oreo）\n- 架构：ARM64-v8a\n\n## 快速开始（APK 安装）\n\n### 标准演示 App\n\n下载并安装预编译的 APK：\n\n```bash\n# 下载地址: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/android-demo-release/nexaai-demo-app.apk\nadb install nexaai-demo-app.apk\n```\n\n### GPT-OSS NPU 演示\n\n在高通 NPU 上运行 GPT-OSS 模型：\n\n```bash\n# 下载地址: https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/gpt-oss-android-demo/nexaai-gpt-oss-npu.apk\nadb install nexaai-gpt-oss-npu.apk\n```\n\n## 从源码编译\n\n> 🎬 观看 [教程视频](https://www.linkedin.com/feed/update/urn:li:activity:7394055404562935809)，只需 40 秒即可体验如何运行示例 App。\n\n### 详细步骤\n\n1. **克隆仓库**\n\n   ```bash\n   git clone https://github.com/NexaAI/nexa-sdk/\n   ```\n\n2. **用 Android Studio 打开**\n   \n   用 Android Studio 打开 `bindings/android` 文件夹。\n\n3. **下载模型**\n   \n   按照 [Android SDK 文档](https://docs.nexa.ai/cn/nexa-sdk-android/overview) 的说明下载模型。以下是一些可下载的示例：\n   - [Granite-4.0-h-350M-NPU](https://huggingface.co/NexaAI/Granite-4.0-h-350M-NPU-mobile)\n   - [Granite-4-Micro-NPU](https://huggingface.co/NexaAI/Granite-4-Micro-NPU-mobile)\n   - [OmniNeural-4B](https://huggingface.co/NexaAI/OmniNeural-4B-mobile)\n   \n   将模型放到 App 的数据目录：\n   ```\n   /data/data/com.nexa.demo/files/models/<model-name>\n   ```\n\n4. **编译并运行** 在 Android Studio 中编译并运行应用\n"
  },
  {
    "path": "bindings/android/app/.gitignore",
    "content": "/build\n/src/main/assets/model_list_backup.json\n/src/main/assets/model_list_local.json"
  },
  {
    "path": "bindings/android/app/build.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\nplugins {\n    alias(libs.plugins.android.application)\n    alias(libs.plugins.kotlin.android)\n    alias(libs.plugins.kotlin.compose)\n    id(\"org.jetbrains.kotlin.plugin.serialization\") version \"1.9.23\"\n}\n\nandroid {\n    namespace = \"com.nexa.demo\"\n    compileSdk = 36\n\n    signingConfigs {\n        create(\"release\") {\n            // Note: For production builds, use environment variables or local.properties\n            // Example: storePassword = System.getenv(\"KEYSTORE_PASSWORD\") ?: \"\"\n            storeFile = file(\"test\")\n            storePassword = project.findProperty(\"KEYSTORE_PASSWORD\")?.toString() ?: \"123456\"\n            keyAlias = \"test\"\n            keyPassword = project.findProperty(\"KEY_PASSWORD\")?.toString() ?: \"123456\"\n        }\n    }\n\n    defaultConfig {\n        applicationId = \"com.nexa.demo\"\n        minSdk = 27\n        targetSdk = 36\n        versionCode = 1\n        versionName = \"1.0\"\n\n        testInstrumentationRunner = \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n\n    buildTypes {\n        release {\n            isMinifyEnabled = false\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n            signingConfig = signingConfigs.getByName(\"release\")\n        }\n\n        debug {\n            isMinifyEnabled = false\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n            signingConfig = signingConfigs.getByName(\"release\")\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_11\n        targetCompatibility = JavaVersion.VERSION_11\n    }\n    kotlinOptions {\n        jvmTarget = \"11\"\n    }\n//    sourceSets {\n//        getByName(\"main\") {\n//            jniLibs.srcDirs(\"src/main/jniLibs\")\n//        }\n//    }\n    packagingOptions {\n        jniLibs.useLegacyPackaging = true\n    }\n\n    buildFeatures {\n        viewBinding = true\n        dataBinding = true\n        compose = true\n        buildConfig = true\n    }\n}\n\nval bridgePathExist = gradle.extra[\"bridgePathExist\"] as Boolean\nprint(\"bridgePathExist: $bridgePathExist\\n\")\n\ndependencies {\n\n    // ===== NEXA CLOUD SDK =====\n    // Using cloud SDK instead of local bridge - latest version\n    implementation(\"ai.nexa:core:+\")\n    // ===== NEXA CLOUD SDK END =====\n    implementation(project(\":transform\"))\n    implementation(\":okdownload-core@aar\")\n    implementation(\":okdownload-sqlite@aar\")\n    implementation(\":okdownload-okhttp@aar\")\n    implementation(\":okdownload-ktx@aar\")\n    implementation(kotlin(\"reflect\"))\n    implementation(libs.glide)\n    implementation(libs.gson)\n    implementation(libs.markwon.core)\n    implementation(libs.markwon.strikethrough)\n    implementation(libs.markwon.tables)\n    implementation(libs.markwon.linkify)\n    implementation(libs.markwon.latex)\n    implementation(libs.markwon.inline.parser)\n    implementation(libs.recyclerview)\n    implementation(libs.toaster)\n    implementation(libs.material)\n    implementation(libs.imm.bar)\n    implementation(libs.imm.bar.ktx)\n    implementation(libs.auto.size)\n    implementation(libs.okhttp)\n    implementation(libs.kotlinx.serialization.json)\n    implementation(libs.androidx.core.ktx)\n    implementation(libs.androidx.lifecycle.runtime.ktx)\n    implementation(libs.androidx.activity.compose)\n    implementation(platform(libs.androidx.compose.bom))\n    implementation(libs.androidx.ui)\n    implementation(libs.androidx.ui.graphics)\n    implementation(libs.androidx.ui.tooling.preview)\n    implementation(libs.androidx.material3)\n    implementation(libs.androidx.appcompat)\n    implementation(libs.androidx.activity)\n    implementation(libs.androidx.constraintlayout)\n    testImplementation(libs.junit)\n    androidTestImplementation(libs.androidx.junit)\n    androidTestImplementation(libs.androidx.espresso.core)\n    androidTestImplementation(platform(libs.androidx.compose.bom))\n    androidTestImplementation(libs.androidx.ui.test.junit4)\n    debugImplementation(libs.androidx.ui.tooling)\n    debugImplementation(libs.androidx.ui.test.manifest)\n}"
  },
  {
    "path": "bindings/android/app/proguard-rules.pro",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "bindings/android/app/src/androidTest/java/com/nexa/demo/ExampleInstrumentedTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getInstrumentation().targetContext\n        assertEquals(\"com.nexa.demo\", appContext.packageName)\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n    <uses-permission android:name=\"android.permission.CAMERA\" />\n    <uses-permission android:name=\"android.permission.MANAGE_EXTERNAL_STORAGE\" />\n\n    <application\n        android:name=\".MyApplication\"\n        android:allowBackup=\"true\"\n        android:dataExtractionRules=\"@xml/data_extraction_rules\"\n        android:extractNativeLibs=\"true\"\n        android:fullBackupContent=\"@xml/backup_rules\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Theme.MaterialComponents.Light.NoActionBar\">\n        <activity\n            android:name=\".activity.FileContentActivity\"\n            android:exported=\"false\" />\n\n        <meta-data\n            android:name=\"design_width_in_dp\"\n            android:value=\"360\" />\n        <meta-data\n            android:name=\"design_height_in_dp\"\n            android:value=\"724\" />\n\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n        <provider\n            android:name=\"androidx.core.content.FileProvider\"\n            android:authorities=\"${applicationId}.fileprovider\"\n            android:exported=\"false\"\n            android:grantUriPermissions=\"true\">\n            <meta-data\n                android:name=\"android.support.FILE_PROVIDER_PATHS\"\n                android:resource=\"@xml/file_paths\" />\n        </provider>\n    </application>\n\n</manifest>"
  },
  {
    "path": "bindings/android/app/src/main/assets/model_list.json",
    "content": "[\n  {\n    \"id\": \"Llama3.2-3B-NPU-Turbo-NPU\",\n    \"displayName\": \"Llama3.2-3B-NPU-Turbo-NPU\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Llama3.2-3B-NPU-Turbo-NPU-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"Llama-3.2-3B-Instruct-GGUF\",\n    \"displayName\": \"Llama-3.2-3B-Instruct-GGUF\",\n    \"modelName\": \"Llama-3.2-3B-Instruct-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"modelUrl\": \"https://huggingface.co/bartowski/Llama-3.2-3B-Instruct-GGUF/resolve/main/Llama-3.2-3B-Instruct-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Qwen3-4B-Instruct-2507-npu\",\n    \"displayName\": \"Qwen3-4B-Instruct-2507-npu\",\n    \"modelName\": \"files-1-1.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Qwen3-4B-Instruct-2507-npu-mobile/\",\n    \"modelUrl\": \"files-1-1.nexa\"\n  },\n  {\n    \"id\": \"gpt-oss-20b-GGUF\",\n    \"displayName\": \"gpt-oss-20b-GGUF\",\n    \"modelName\": \"gpt-oss-20b-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"modelUrl\": \"https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Qwen3-4B-GGUF\",\n    \"displayName\": \"Qwen3-4B-GGUF\",\n    \"modelName\": \"Qwen3-4B-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"modelUrl\": \"https://huggingface.co/unsloth/Qwen3-4B-GGUF/resolve/main/Qwen3-4B-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Granite-4-Micro-NPU\",\n    \"displayName\": \"Granite-4.0-Micro 3B\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Granite-4-Micro-NPU-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"LFM2-1.2B-npu\",\n    \"displayName\": \"LFM2-1.2B-npu\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/LFM2-1.2B-npu-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"LFM2.5-1.2B-mobile\",\n    \"displayName\": \"LFM2.5-1.2B-npu\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/LFM2.5-1.2B-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"OmniNeural-4B\",\n    \"displayName\": \"OmniNeural-4B\",\n    \"modelName\": \"files-1-1.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/OmniNeural-4B-mobile/\",\n    \"modelUrl\": \"files-1-1.nexa\"\n  },\n  {\n    \"id\": \"paddleocr-npu\",\n    \"displayName\": \"paddleocr-npu\",\n    \"modelName\": \"weights-1-1.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/paddleocr-npu-mobile/\",\n    \"modelUrl\": \"weights-1-1.nexa\"\n  },\n  {\n    \"id\": \"yolo26x-npu\",\n    \"displayName\": \"yolo26x-npu\",\n    \"modelName\": \"weights-1-1.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/yolo26x-npu-mobile/\",\n    \"modelUrl\": \"weights-1-1.nexa\"\n  },\n  {\n    \"id\": \"depth-anything-v2-npu\",\n    \"displayName\": \"depth-anything-v2-npu\",\n    \"modelName\": \"weights-1-1.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/depth-anything-v2-npu-mobile/\",\n    \"modelUrl\": \"weights-1-1.nexa\"\n  },\n  {\n    \"id\": \"embeddinggemma-300m-npu\",\n    \"displayName\": \"embeddinggemma-300m-npu\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/embeddinggemma-300m-npu-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"LFM2-1.2B-GGUF-GGUF\",\n    \"displayName\": \"LFM2-1.2B-GGUF-GGUF\",\n    \"modelName\": \"LFM2-1.2B-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"modelUrl\": \"https://huggingface.co/LiquidAI/LFM2-1.2B-GGUF/resolve/main/LFM2-1.2B-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Llama-3.2-1B-Instruct-GGUF\",\n    \"displayName\": \"Llama-3.2-1B-Instruct-GGUF\",\n    \"modelName\": \"Llama-3.2-1B-Instruct-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"modelUrl\": \"https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"LFM2-24B-A2B-Preview-GGUF\",\n    \"displayName\": \"LFM2-24B-A2B-Preview-GGUF\",\n    \"modelName\": \"LFM2-24B-A2B-Preview-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"modelUrl\": \"https://huggingface.co/NexaAI/LFM2-24B-A2B-Preview-GGUF/resolve/main/LFM2-24B-A2B-Preview-Q4_0.gguf\"\n  }\n]\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/ChatAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.content.Intent\nimport android.graphics.BitmapFactory\nimport android.net.Uri\nimport android.text.method.LinkMovementMethod\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport io.noties.markwon.Markwon\nimport io.noties.markwon.ext.latex.JLatexMathPlugin\nimport io.noties.markwon.ext.strikethrough.StrikethroughPlugin\nimport io.noties.markwon.ext.tables.TablePlugin\nimport io.noties.markwon.inlineparser.MarkwonInlineParserPlugin\nimport io.noties.markwon.linkify.LinkifyPlugin\nimport java.io.File\n\n\ndata class Message(\n    val content: String,\n    val type: MessageType,\n    val images: List<File> = emptyList(),\n    val audio: List<File> = emptyList()\n)\n\nenum class MessageType(val value: Int) {\n    USER(0),\n    ASSISTANT(1),\n    PROFILE(2),\n    IMAGES(3),\n    ASSISTANT_IMAGES(4);\n\n    companion object {\n        fun from(value: Int): MessageType =\n            entries.firstOrNull { it.value == value } ?: PROFILE\n    }\n}\n\nclass ChatAdapter(private val messages: List<Message>) :\n    RecyclerView.Adapter<RecyclerView.ViewHolder>() {\n\n    override fun getItemViewType(position: Int): Int {\n        val message = messages[position]\n        return message.type.value\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {\n        val inflater = LayoutInflater.from(parent.context)\n        val type = MessageType.from(viewType)\n        return when (type) {\n            MessageType.USER -> UserViewHolder(inflater.inflate(R.layout.item_user_message, parent, false))\n            MessageType.ASSISTANT -> AiViewHolder(inflater.inflate(R.layout.item_ai_message, parent, false))\n            MessageType.IMAGES -> ImagesViewHolder(inflater.inflate(R.layout.item_image_message, parent, false))\n            MessageType.ASSISTANT_IMAGES -> ImagesViewHolder(\n                inflater.inflate(\n                    R.layout.item_assistant_image_message,\n                    parent,\n                    false\n                )\n            )\n\n            else -> ProfileViewHolder(inflater.inflate(R.layout.item_profile_message, parent, false))\n        }\n    }\n\n    override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {\n        val message = messages[position]\n        if (holder is UserViewHolder) holder.bind(message)\n        if (holder is AiViewHolder) holder.bind(message)\n        if (holder is ImagesViewHolder) holder.bind(message)\n        if (holder is ProfileViewHolder) holder.bind(message)\n    }\n\n    override fun getItemCount() = messages.size\n\n    class UserViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)\n        fun bind(message: Message) {\n            tvMessage.text = message.content\n        }\n    }\n\n    class AiViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)\n        private val markwon: Markwon = Markwon.builder(itemView.context)\n            .usePlugin(StrikethroughPlugin.create())\n            .usePlugin(TablePlugin.create(itemView.context))\n            .usePlugin(LinkifyPlugin.create())\n            .usePlugin(MarkwonInlineParserPlugin.create())\n            .usePlugin(JLatexMathPlugin.create(tvMessage.textSize) { builder ->\n                builder.inlinesEnabled(true)\n                builder.blocksEnabled(true)\n            })\n            .build()\n\n        fun bind(message: Message) {\n            markwon.setMarkdown(tvMessage, message.content.trim())\n            tvMessage.movementMethod = LinkMovementMethod.getInstance()\n        }\n    }\n\n    class ProfileViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)\n\n        fun bind(message: Message) {\n            tvMessage.text = message.content\n        }\n\n        private fun dpToPx(dp: Int, context: android.content.Context): Int {\n            return (dp * context.resources.displayMetrics.density).toInt()\n        }\n    }\n\n    class ImagesViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val imageContainer: LinearLayout = itemView.findViewById(R.id.image_container)\n        fun bind(message: Message) {\n            val savedImageFiles = message.images\n            imageContainer.removeAllViews()\n            val context = itemView.context\n\n            for (file in savedImageFiles) {\n                val itemView = LayoutInflater.from(context)\n                    .inflate(R.layout.item_image_item_message, imageContainer, false)\n                val ivImage = itemView.findViewById<ImageView>(R.id.iv_image)\n                val bitmap = BitmapFactory.decodeFile(file.absolutePath)\n                if (bitmap != null) {\n                    ivImage.setImageBitmap(bitmap)\n                }\n                imageContainer.addView(itemView)\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/FileConfig.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.content.Context\nimport java.io.File\n\nclass FileConfig {\n    companion object {\n        val modelsDir = fun(context: Context): File {\n            return File(context.filesDir, \"models\").apply { if (!exists()) mkdirs() }\n        }\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/GenerationConfigSample.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport com.nexa.sdk.bean.GenerationConfig\nimport com.nexa.sdk.bean.SamplerConfig\n\n// Configuration sample for generation with defaults compatible with bridge\n// maxTokens: 0 = no limit, generates until model's natural stopping point\ndata class GenerationConfigSample(\n    var maxTokens: Int = 2048,\n    var stopWords: List<String>? = null,\n    var stopCount: Int = 0,\n    var nPast: Int = 0,\n    var imagePaths: List<String>? = null,\n    var imageCount: Int = 0,\n    var audioPaths: List<String>? = null,\n    var audioCount: Int = 0,\n    var systemPrompt: String = \"\"\n) {\n    // Convert to GenerationConfig with minimal sampler setup for bridge compatibility\n    // Sampler config uses bridge defaults (no custom parameters applied)\n    fun toGenerationConfig(grammarString:String? = null): GenerationConfig {\n        return GenerationConfig(\n            maxTokens = this.maxTokens,\n            stopWords = this.stopWords?.toTypedArray(),\n            stopCount = this.stopCount,\n            nPast = this.nPast,\n            //samplerConfig = SamplerConfig(\n            //    grammarString = grammarString\n                // All other sampler parameters use bridge defaults\n                // No temperature, topK, topP, penalties applied\n            //),\n            imagePaths = this.imagePaths?.toTypedArray(),\n            imageCount = this.imageCount,\n            audioPaths = this.audioPaths?.toTypedArray(),\n            audioCount = this.audioCount\n        )\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/MainActivity.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.Manifest\nimport android.app.Activity\nimport android.content.Context\nimport android.content.DialogInterface\nimport android.content.Intent\nimport android.content.SharedPreferences\nimport android.content.pm.PackageManager\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.graphics.Canvas\nimport android.graphics.Color\nimport android.graphics.Paint\nimport android.graphics.RectF\nimport android.net.Uri\nimport android.os.Bundle\nimport android.os.Environment\nimport android.provider.MediaStore\nimport android.system.Os\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.inputmethod.InputMethodManager\nimport android.widget.AdapterView\nimport android.widget.Button\nimport android.widget.EditText\nimport android.widget.HorizontalScrollView\nimport android.widget.ImageButton\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.PopupWindow\nimport android.widget.ProgressBar\nimport android.widget.SimpleAdapter\nimport android.widget.Spinner\nimport android.widget.TextView\nimport android.widget.Toast\nimport androidx.appcompat.app.AlertDialog\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport androidx.core.content.FileProvider\nimport androidx.fragment.app.FragmentActivity\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.bottomsheet.BottomSheetDialog\nimport com.gyf.immersionbar.ktx.immersionBar\nimport com.hjq.toast.Toaster\nimport com.liulishuo.okdownload.DownloadContext\nimport com.liulishuo.okdownload.DownloadTask\nimport com.liulishuo.okdownload.OkDownload\nimport com.liulishuo.okdownload.core.cause.EndCause\nimport com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection\nimport com.liulishuo.okdownload.kotlin.listener.createDownloadContextListener\nimport com.liulishuo.okdownload.kotlin.listener.createListener1\nimport com.nexa.demo.bean.DownloadableFile\nimport com.nexa.demo.bean.DownloadableFileWithFallback\nimport com.nexa.demo.bean.DownloadState\nimport com.nexa.demo.bean.ModelData\nimport com.nexa.demo.bean.downloadableFiles\nimport com.nexa.demo.bean.downloadableFilesWithFallback\nimport com.nexa.demo.bean.getNexaManifest\nimport com.nexa.demo.bean.getNonExistModelFile\nimport com.nexa.demo.bean.getSupportPluginIds\nimport com.nexa.demo.bean.isNpuModel\nimport com.nexa.demo.bean.mmprojTokenFile\nimport com.nexa.demo.bean.modelDir\nimport com.nexa.demo.bean.modelFile\nimport com.nexa.demo.bean.tokenFile\nimport com.nexa.demo.bean.withFallbackUrls\nimport com.nexa.demo.utils.ModelFileListingUtil\nimport com.nexa.demo.databinding.ActivityMainBinding\nimport com.nexa.demo.databinding.DialogSelectPluginIdBinding\nimport com.nexa.demo.listeners.CustomDialogInterface\nimport com.nexa.demo.utils.ExecShell\nimport com.nexa.demo.utils.ImgUtil\nimport com.nexa.demo.utils.WavRecorder\nimport com.nexa.demo.utils.inflate\nimport com.nexa.sdk.AsrWrapper\nimport com.nexa.sdk.CvWrapper\nimport com.nexa.sdk.EmbedderWrapper\nimport com.nexa.sdk.LlmWrapper\nimport com.nexa.sdk.NexaSdk\nimport com.nexa.sdk.RerankerWrapper\nimport com.nexa.sdk.VlmWrapper\nimport com.nexa.sdk.bean.AsrCreateInput\nimport com.nexa.sdk.bean.AsrTranscribeInput\nimport com.nexa.sdk.bean.CVCapability\nimport com.nexa.sdk.bean.CVCreateInput\nimport com.nexa.sdk.bean.CVModelConfig\nimport com.nexa.sdk.bean.ChatMessage\nimport com.nexa.sdk.bean.EmbedderCreateInput\nimport com.nexa.sdk.bean.EmbeddingConfig\nimport com.nexa.sdk.bean.LlmCreateInput\nimport com.nexa.sdk.bean.LlmStreamResult\nimport com.nexa.sdk.bean.ModelConfig\nimport com.nexa.sdk.bean.RerankConfig\nimport com.nexa.sdk.bean.RerankerCreateInput\nimport com.nexa.sdk.bean.VlmChatMessage\nimport com.nexa.sdk.bean.VlmContent\nimport com.nexa.sdk.bean.VlmCreateInput\nimport com.nexa.sdk.bean.DeviceIdValue\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.async\nimport kotlinx.coroutines.awaitAll\nimport kotlinx.coroutines.launch\nimport kotlinx.serialization.json.Json\nimport okhttp3.OkHttpClient\nimport okhttp3.Request\nimport java.io.File\nimport java.io.FileNotFoundException\nimport java.io.FileOutputStream\nimport java.security.SecureRandom\nimport java.security.cert.CertificateException\nimport java.security.cert.X509Certificate\nimport javax.net.ssl.SSLContext\nimport javax.net.ssl.SSLSession\nimport javax.net.ssl.SSLSocketFactory\nimport javax.net.ssl.TrustManager\nimport javax.net.ssl.X509TrustManager\n\nclass MainActivity : FragmentActivity() {\n\n    private val binding: ActivityMainBinding by inflate()\n    private var downloadContext: DownloadContext? = null\n    private var downloadState = DownloadState.IDLE\n    private var downloadingModelData: ModelData? = null\n    private lateinit var spDownloaded: SharedPreferences\n    private lateinit var llDownloading: LinearLayout\n    private lateinit var tvDownloadProgress: TextView\n    private lateinit var pbDownloading: ProgressBar\n    private lateinit var spModelList: Spinner\n    private lateinit var btnDownload: Button\n    private lateinit var btnLoadModel: Button\n    private lateinit var btnUnloadModel: Button\n    private lateinit var btnStop: Button\n    private lateinit var etInput: EditText\n    private lateinit var btnSend: Button\n    private lateinit var btnClearHistory: Button\n    private lateinit var btnAddImage: Button\n    private lateinit var btnAudioRecord: Button\n\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var adapter: ChatAdapter\n    private lateinit var bottomPanel: LinearLayout\n    private lateinit var btnAudioDone: Button\n    private lateinit var btnAudioCancel: Button\n\n    private lateinit var scrollImages: HorizontalScrollView\n    private lateinit var topScrollContainer: LinearLayout\n    private lateinit var llLoading: LinearLayout\n    private lateinit var vTip: View\n\n    private lateinit var llmWrapper: LlmWrapper\n    private lateinit var vlmWrapper: VlmWrapper\n    var embedderWrapper: EmbedderWrapper? = null\n    private lateinit var rerankerWrapper: RerankerWrapper\n    private lateinit var cvWrapper: CvWrapper\n    private lateinit var asrWrapper: AsrWrapper\n    private val modelScope = CoroutineScope(Dispatchers.IO)\n\n    private val chatList = arrayListOf<ChatMessage>()\n    private lateinit var llmSystemPrompt: ChatMessage\n    private val vlmChatList = arrayListOf<VlmChatMessage>()\n    private lateinit var vlmSystemPrompty: VlmChatMessage\n    private lateinit var modelList: List<ModelData>\n    private var selectModelId = \"\"\n\n    // ADD: Track which model type is loaded\n    private var isLoadLlmModel = false\n    private var isLoadVlmModel = false\n    private var isLoadEmbedderModel = false\n    private var isLoadRerankerModel = false\n    private var isLoadCVModel = false\n    private var isLoadAsrModel = false\n\n    private var enableThinking = false\n\n    private var wavRecorder: WavRecorder? = null\n    private var audioFile: File? = null\n\n    private val savedImageFiles = mutableListOf<File>()\n    private val messages = arrayListOf<Message>()\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        immersionBar {\n            statusBarColorInt(Color.WHITE)\n            statusBarDarkFont(true)\n        }\n        requestPermissions(arrayOf(Manifest.permission.RECORD_AUDIO), 1002)\n        okdownload()\n        initData()\n        initView()\n        setListeners()\n    }\n\n    private fun resetLoadState() {\n        isLoadLlmModel = false\n        isLoadVlmModel = false\n        isLoadEmbedderModel = false\n        isLoadRerankerModel = false\n        isLoadCVModel = false\n        isLoadAsrModel = false\n    }\n\n    private fun initView() {\n        adapter = ChatAdapter(messages)\n        binding.rvChat.adapter = adapter\n\n        llDownloading = findViewById(R.id.ll_downloading)\n        tvDownloadProgress = findViewById(R.id.tv_download_progress)\n        pbDownloading = findViewById(R.id.pb_downloading)\n        spModelList = findViewById(R.id.sp_model_list)\n        spModelList.adapter = object : SimpleAdapter(this, modelList.map {\n            val map = mutableMapOf<String, String>()\n            map[\"displayName\"] = it.displayName\n            map\n        }, R.layout.item_model, arrayOf(\"displayName\"), intArrayOf(R.id.tv_model_id)) {\n\n        }\n        spModelList.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {\n            override fun onItemSelected(\n                parent: AdapterView<*>?, view: View?, position: Int, id: Long\n            ) {\n                selectModelId = modelList[position].id\n\n                messages.clear()\n                adapter.notifyDataSetChanged()\n                binding.rvChat.scrollTo(0, 0)\n            }\n\n            override fun onNothingSelected(parent: AdapterView<*>?) {\n                selectModelId = \"\"\n            }\n        }\n        btnDownload = findViewById(R.id.btn_download)\n        btnLoadModel = findViewById(R.id.btn_load_model)\n        btnUnloadModel = findViewById(R.id.btn_unload_model)\n        btnStop = findViewById(R.id.btn_stop)\n        etInput = findViewById(R.id.et_input)\n        btnAddImage = findViewById(R.id.btn_add_image)\n        btnAudioRecord = findViewById(R.id.btn_voice)\n\n        bottomPanel = findViewById(R.id.bottom_panel)\n        btnAudioCancel = findViewById(R.id.btn_audio_cancel)\n        btnAudioDone = findViewById(R.id.btn_audio_done)\n\n        btnSend = findViewById(R.id.btn_send)\n        btnClearHistory = findViewById(R.id.btn_clear_history)\n        scrollImages = findViewById(R.id.scroll_images)\n        topScrollContainer = findViewById(R.id.ll_images_container)\n        llLoading = findViewById(R.id.ll_loading)\n        vTip = findViewById<View>(R.id.v_tip)\n\n        btnAudioCancel.setOnClickListener {\n            stopRecord(true)\n        }\n\n        btnAudioDone.setOnClickListener {\n            stopRecord(false)\n        }\n\n        findViewById<Button>(R.id.btn_test).setOnClickListener {\n            Thread {\n                val exeFile = File(filesDir, \"nexa_test_llm\")\n                val chmodProcess = Runtime.getRuntime().exec(\"chmod 755 \" + exeFile.absolutePath);\n                chmodProcess.waitFor()\n                Log.d(\"nfl\", \"exeFile exe? ${exeFile.canExecute()}\")\n                Log.d(\"nfl\", \"Exe Thread:${Thread.currentThread().name}\")\n                ExecShell().executeCommand(\n                    arrayOf(\n                        //                        exeFile.absolutePath,\n//                        \"--test-suite=\\\"npu\\\"\", \"--success \"\n                        \"cat\",\n                        \"/sys/devices/soc0/sku\"\n//                        \"/data/local/tmp/test_cat.txt\"\n                    )\n                ).forEach {\n                    Log.d(\"nfl\", \"cmd:$it\")\n                }\n            }.start()\n        }\n\n        findViewById<View>(R.id.v_tip).setOnClickListener {\n            Toast.makeText(this, \"please unload model first\", Toast.LENGTH_SHORT).show()\n        }\n    }\n\n    private fun parseModelList() {\n        try {\n            val baseJson = assets.open(\"model_list.json\").bufferedReader().use { it.readText() }\n            modelList = Json.decodeFromString<List<ModelData>>(baseJson)\n        } catch (e: Exception) {\n            Log.e(\"nfl\", \"parseModelList: $e\")\n        }\n    }\n\n    /**\n     * Step 0. Preparing to download the model file.\n     */\n    private fun initData() {\n        spDownloaded = getSharedPreferences(SP_DOWNLOADED, MODE_PRIVATE)\n//        spDownloaded.edit().putBoolean(\"Qwen3-0.6B-Q8_0\", false).commit()\n//        spDownloaded.edit().putBoolean(\"Qwen3-0.6B-IQ4_NL\", false).commit()\n//        spDownloaded.edit().putBoolean(\"LFM2-1.2B-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"embeddinggemma-300m-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"jina-v2-rerank-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"paddleocr-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"parakeet-tdt-0.6b-v3-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"OmniNeural-4B\", false).commit()\n//        spDownloaded.edit().putBoolean(\"Granite-4.0-h-350M-NPU\", false).commit()\n//        spDownloaded.edit().putBoolean(\"Granite-4-Micro-NPU\", false).commit()\n        parseModelList()\n        //\n        initNexaSdk()\n        //\n        val sysPrompt = \"\"\"\\\nYou are Nays Campaign Manager, an AI assistant responsible for managing customer campaigns and investigating campaign-related issues.\n\nWhen a customer inquiry comes in, you need to:\n1. Analyze the customer's request to understand their campaign needs\n2. Check if it's related to campaign limits or issues\n3. Use the campaign_investigation function when needed to check campaign status\n4. Provide appropriate responses based on the investigation results\n\nYour responsibilities include:\n- Investigating campaign performance and limits\n- Determining if customers have reached their campaign limits\n- Providing helpful messages when limits are reached\n- Directing customers to support when limits haven't been reached\n- Ensuring smooth campaign operations for all customers\n\nWhen you receive a query about campaigns, you should:\n1. First understand what the customer is asking about\n2. If it's campaign-related, use the campaign_investigation tool to check the status\n3. Based on the tool's response, provide appropriate guidance\n\nAlways be professional, helpful, and focused on resolving campaign-related issues efficiently.\n\nNote: You must use the campaign_investigation function whenever a customer asks about campaign limits, issues, or status.\n\"\"\"\n        // It works better with Chinese prompt words.\n        val sysPrompt2 = \"Must reply in markdown format\"\n//        addSystemPrompt(sysPrompt2)\n    }\n\n    /**\n     * Step 1. initNexaSdk environment\n     */\n    private fun initNexaSdk() {\n        // Initialize NexaSdk with context\n        NexaSdk.getInstance().init(this, object : NexaSdk.InitCallback {\n            override fun onSuccess() {\n            }\n\n            override fun onFailure(reason: String) {\n                Log.e(TAG, \"NexaSdk init failed: $reason\")\n            }\n        })\n\n        val testLocalPath = false\n        if (testLocalPath) {\n            // FIXME: Set directory according to terminal format\n            val pluginNativeLibPath = filesDir.absolutePath\n            val pluginAdspLibPath = File(filesDir, \"npu/htp-files\").absolutePath\n            val pluginLdLibraryPath =\n                \"$pluginNativeLibPath:$pluginNativeLibPath/npu:$pluginAdspLibPath:\\$LD_LIBRARY_PATH\"\n            // FIXME: Set directory with flattened .so files\n            val NEXA_PLUGIN_PATH = pluginNativeLibPath\n            val LD_LIBRARY_PATH = pluginLdLibraryPath\n            val ADSP_LIBRARY_PATH = pluginAdspLibPath\n            Log.d(\"nfl\", \"NEXA_PLUGIN_PATH:$NEXA_PLUGIN_PATH\")\n            Log.d(\"nfl\", \"LD_LIBRARY_PATH:$LD_LIBRARY_PATH\")\n            Log.d(\"nfl\", \"ADSP_LIBRARY_PATH:$ADSP_LIBRARY_PATH\")\n\n            Os.setenv(\"NEXA_PLUGIN_PATH\", NEXA_PLUGIN_PATH, true)\n            Os.setenv(\"LD_LIBRARY_PATH\", LD_LIBRARY_PATH, true)\n            Os.setenv(\"ADSP_LIBRARY_PATH\", ADSP_LIBRARY_PATH, true)\n        }\n    }\n\n    /**\n     * Step 2. add system prompt, such as : output markdown style, contains emoji etc.(Options)\n     */\n    private fun addSystemPrompt(sysPrompt: String) {\n        llmSystemPrompt = ChatMessage(\"system\", sysPrompt)\n        chatList.add(llmSystemPrompt)\n        vlmSystemPrompty =\n            VlmChatMessage(\n                \"system\",\n                listOf(VlmContent(\"text\", sysPrompt))\n            )\n        vlmChatList.add(vlmSystemPrompty)\n    }\n\n    private fun getHfToken(model: ModelData, url: String): String? {\n        // Replace with your own HuggingFace token if needed for private models\n        return null\n    }\n\n    private fun onLoadModelSuccess(tip: String) {\n        runOnUiThread {\n            Toast.makeText(\n                this@MainActivity, tip, Toast.LENGTH_SHORT\n            ).show()\n            // change UI\n            btnAddImage.visibility = View.INVISIBLE\n            btnAudioRecord.visibility = View.INVISIBLE\n            if (isLoadVlmModel) {\n                btnAddImage.visibility = View.VISIBLE\n                btnAudioRecord.visibility = View.VISIBLE\n            }\n            if (isLoadCVModel) {\n                btnAddImage.visibility = View.VISIBLE\n            }\n            if (isLoadAsrModel) {\n                btnAudioRecord.visibility = View.VISIBLE\n            }\n            //\n            btnUnloadModel.visibility = View.VISIBLE\n            llLoading.visibility = View.INVISIBLE\n            //\n            if (isLoadEmbedderModel || isLoadRerankerModel || isLoadAsrModel || isLoadCVModel) {\n                btnStop.visibility = View.GONE\n            } else {\n                btnStop.visibility = View.VISIBLE\n            }\n        }\n    }\n\n    private fun onLoadModelFailed(tip: String) {\n        runOnUiThread {\n            vTip.visibility = View.GONE\n\n            // Check if files exist locally first\n            val selectModelData = modelList.firstOrNull { it.id == selectModelId }\n            val fileName = isModelDownloaded(selectModelData!!)\n            val filesExist = fileName == null\n\n            if (!filesExist) {\n                Toaster.showLong(\"The \\\"$fileName\\\" file is missing. Please download it first.\")\n            } else {\n                Toast.makeText(this@MainActivity, tip, Toast.LENGTH_SHORT)\n                    .show()\n            }\n\n            // change UI\n            btnAddImage.visibility = View.INVISIBLE\n            btnAudioRecord.visibility = View.INVISIBLE\n            btnUnloadModel.visibility = View.GONE\n            llLoading.visibility = View.INVISIBLE\n        }\n    }\n\n    private fun hasLoadedModel(): Boolean {\n        return isLoadLlmModel || isLoadVlmModel || isLoadEmbedderModel ||\n                isLoadRerankerModel || isLoadCVModel || isLoadAsrModel\n    }\n\n    /**\n     * Helper function to check if model files exist locally\n     * @return null if all files exist locally. or file's name which is missing.\n     */\n    private fun isModelDownloaded(modelData: ModelData): String? {\n        val modelDir = modelData.modelDir(this@MainActivity)\n        val fileName = modelData.getNonExistModelFile(modelDir)\n        val filesExist = fileName == null\n        // Sync SharedPreferences with actual file existence\n        if (filesExist && !spDownloaded.getBoolean(modelData.id, false)) {\n            Log.d(TAG, \"Model files found locally for ${modelData.id}, updating SharedPreferences\")\n            spDownloaded.edit().putBoolean(modelData.id, true).commit()\n        }\n\n        return fileName\n    }\n\n    /**\n     * Draw bounding boxes on the image for object detection results\n     */\n    private fun drawBoundingBoxes(originalBitmap: Bitmap, results: List<com.nexa.sdk.bean.CVResult>): Bitmap {\n        val mutableBitmap = originalBitmap.copy(Bitmap.Config.ARGB_8888, true)\n        val canvas = Canvas(mutableBitmap)\n\n        // Prepare paint for bounding boxes\n        val boxPaint = Paint().apply {\n            style = Paint.Style.STROKE\n            strokeWidth = 2f\n            isAntiAlias = true\n        }\n\n        // Prepare paint for text background\n        val textBgPaint = Paint().apply {\n            style = Paint.Style.FILL\n            isAntiAlias = true\n        }\n\n        // Prepare paint for text\n        val textPaint = Paint().apply {\n            color = Color.WHITE\n            textSize = 20f\n            isAntiAlias = true\n            isFakeBoldText = true\n        }\n\n        // Color palette for different classes\n        val colors = listOf(\n            Color.rgb(255, 0, 0),     // Red\n            Color.rgb(0, 255, 0),     // Green\n            Color.rgb(0, 0, 255),     // Blue\n            Color.rgb(255, 255, 0),   // Yellow\n            Color.rgb(255, 0, 255),   // Magenta\n            Color.rgb(0, 255, 255),   // Cyan\n            Color.rgb(255, 128, 0),   // Orange\n            Color.rgb(128, 0, 255)    // Purple\n        )\n\n        results.forEachIndexed { index, result ->\n            result.bbox?.let { bbox ->\n                // bbox already has pixel values (not normalized 0-1)\n                val x1 = bbox.x\n                val y1 = bbox.y\n                val x2 = bbox.x + bbox.width\n                val y2 = bbox.y + bbox.height\n\n                // Select color based on index\n                val color = colors[index % colors.size]\n                boxPaint.color = color\n                textBgPaint.color = color\n\n                // Draw bounding box\n                val rect = RectF(x1, y1, x2, y2)\n                canvas.drawRect(rect, boxPaint)\n\n                // Prepare label text\n                val label = result.text ?: \"object\"\n                val confidence = result.confidence ?: 0.0\n                val labelText = \"$label ${String.format(\"%.2f\", confidence)}\"\n\n                // Measure text\n                val textBounds = android.graphics.Rect()\n                textPaint.getTextBounds(labelText, 0, labelText.length, textBounds)\n\n                // Draw text background\n                val textBgRect = RectF(\n                    x1,\n                    y1 - textBounds.height() - 4f,\n                    x1 + textBounds.width() + 8f,\n                    y1\n                )\n                canvas.drawRect(textBgRect, textBgPaint)\n\n                // Draw text\n                canvas.drawText(labelText, x1 + 4f, y1 - 4f, textPaint)\n            }\n        }\n\n        return mutableBitmap\n    }\n\n    private fun loadModel(selectModelData: ModelData, modelDataPluginId: String, nGpuLayers: Int, deviceId: String? = null) {\n        modelScope.launch {\n            resetLoadState()\n            val nexaManifestBean = selectModelData.getNexaManifest(this@MainActivity)\n            val pluginId = nexaManifestBean?.PluginId ?: modelDataPluginId\n            when (nexaManifestBean?.ModelType ?: selectModelData.type) {\n                \"chat\", \"llm\" -> {\n\n                    val conf = ModelConfig(\n                        nCtx = 1024,\n                        nGpuLayers = nGpuLayers,\n                        enable_thinking = enableThinking,\n                        npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                        npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath\n                    )\n                    // Build and initialize LlmWrapper for chat model\n                    LlmWrapper.builder().llmCreateInput(\n                        LlmCreateInput(\n                            model_name = nexaManifestBean?.ModelName ?: \"\",\n                            model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                            tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,\n                            config = conf,\n                            plugin_id = pluginId,\n                            device_id = deviceId ?: DeviceIdValue.NPU.value\n                        )\n                    ).build().onSuccess { wrapper ->\n                        isLoadLlmModel = true\n                        llmWrapper = wrapper\n                        onLoadModelSuccess(\"llm model loaded\")\n                    }.onFailure { error ->\n                        onLoadModelFailed(error.message.toString())\n                    }\n\n                }\n\n                \"embedder\" -> {\n                    // Handle embedder model loading with NPU paths using EmbedderCreateInput\n                    // embed-gemma\n                    val embedderCreateInput = EmbedderCreateInput(\n                        model_name = nexaManifestBean?.ModelName\n                            ?: \"\",  // Model name for NPU plugin\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,\n                        config = ModelConfig(\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            nGpuLayers = nGpuLayers\n                        ),\n                        plugin_id = pluginId,\n                        device_id = DeviceIdValue.CPU.value\n                    )\n\n                    EmbedderWrapper.builder()\n                        .embedderCreateInput(embedderCreateInput)\n                        .build().onSuccess { wrapper ->\n                            isLoadEmbedderModel = true\n                            embedderWrapper = wrapper\n                            onLoadModelSuccess(\"embedder model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n\n                }\n\n                \"reranker\" -> {\n                    // Handle reranker model loading with NPU paths using RerankerCreateInput\n                    // jina-v2-rerank-npu\n                    val rerankerCreateInput = RerankerCreateInput(\n                        model_name = nexaManifestBean?.ModelName\n                            ?: \"\",  // Model name for NPU plugin\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,\n                        config = ModelConfig(\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            nGpuLayers = nGpuLayers\n                        ),\n                        plugin_id = pluginId,\n                        device_id = DeviceIdValue.CPU.value\n                    )\n\n                    RerankerWrapper.builder()\n                        .rerankerCreateInput(rerankerCreateInput)\n                        .build().onSuccess { wrapper ->\n                            isLoadRerankerModel = true\n                            rerankerWrapper = wrapper\n                            onLoadModelSuccess(\"reranker model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n\n                }\n\n                \"cv\" -> {\n                    // paddleocr-npu\n                    val cvCreateInput = CVCreateInput(\n                        model_name = nexaManifestBean?.ModelName ?: \"\",\n                        config = CVModelConfig(\n                            capabilities = CVCapability.OCR,\n                            det_model_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            rec_model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                            char_dict_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir\n                        ),\n                        plugin_id = pluginId\n                    )\n                    CvWrapper.builder()\n                        .createInput(cvCreateInput)\n                        .build().onSuccess {\n                            isLoadCVModel = true\n                            cvWrapper = it\n                            onLoadModelSuccess(\"cv model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n                }\n\n                \"asr\" -> {\n                    // ADD: Handle ASR model loading\n                    // parakeet-tdt-0.6b-v3-npu\n                    val asrCreateInput = AsrCreateInput(\n                        model_name = nexaManifestBean?.ModelName ?: \"\",\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        config = ModelConfig(\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            nGpuLayers = nGpuLayers\n                        ),\n                        plugin_id = pluginId\n                    )\n\n                    AsrWrapper.builder()\n                        .asrCreateInput(asrCreateInput)\n                        .build().onSuccess { wrapper ->\n                            isLoadAsrModel = true\n                            asrWrapper = wrapper\n                            onLoadModelSuccess(\"ASR model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n                }\n\n                \"multimodal\", \"vlm\" -> {\n                    // VLM model\n                    val isNpuVlm = nexaManifestBean?.PluginId == \"npu\"\n                    val config = if (isNpuVlm) {\n                        ModelConfig(\n                            nCtx = 2048,\n                            nThreads = 8,\n                            enable_thinking = enableThinking,\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath\n                        )\n                    } else {\n                        ModelConfig(\n                            nCtx = 1024,\n                            nThreads = 4,\n                            nBatch = 1,\n                            nUBatch = 1,\n                            nGpuLayers = nGpuLayers,\n                            enable_thinking = enableThinking\n                        )\n                    }\n\n                    val vlmCreateInput = VlmCreateInput(\n                        model_name = nexaManifestBean?.ModelName ?: \"\",\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        mmproj_path = selectModelData.mmprojTokenFile(this@MainActivity)?.absolutePath,\n                        config = config,\n                        plugin_id = pluginId,\n                        device_id = \"HTP0\"\n                    )\n\n                    VlmWrapper.builder()\n                        .vlmCreateInput(vlmCreateInput)\n                        .build().onSuccess {\n                            isLoadVlmModel = true\n                            vlmWrapper = it\n                            onLoadModelSuccess(\"vlm model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n                }\n\n                else -> {\n                    onLoadModelFailed(\"model type error\")\n                }\n            }\n        }\n    }\n\n    private fun downloadModel(selectModelData: ModelData) {\n        // Check local files first before SharedPreferences\n        val fileName = isModelDownloaded(selectModelData)\n        if (fileName == null || hasLoadedModel()) {\n            Toast.makeText(this@MainActivity, \"model already downloaded\", Toast.LENGTH_SHORT)\n                .show()\n        } else {\n            downloadState = DownloadState.DOWNLOADING\n            downloadingModelData = selectModelData\n            llDownloading.visibility = View.VISIBLE\n            tvDownloadProgress.text = \"0%\"\n            modelScope.launch {\n                val selectModelData = modelList.first { it.id == selectModelId }\n                val unsafeClient = getUnsafeOkHttpClient().build()\n\n                // Track URL mapping for fallback: primary URL -> fallback URL\n                val fallbackUrlMap = mutableMapOf<String, String>()\n                // Track failed downloads for fallback retry\n                val failedDownloads = mutableListOf<DownloadableFileWithFallback>()\n\n                // For NPU models without explicit files list, fetch file list with fallback support\n                val filesToDownloadWithFallback: List<DownloadableFileWithFallback> =\n                    if (selectModelData.isNpuModel() &&\n                        selectModelData.files.isNullOrEmpty() &&\n                        !selectModelData.baseUrl.isNullOrEmpty()\n                    ) {\n\n                        Log.d(TAG, \"NPU model detected, fetching file list: ${selectModelData.baseUrl}\")\n\n                        // Fetch file list with fallback support\n                        val result = ModelFileListingUtil.listFilesWithFallback(selectModelData.baseUrl!!, unsafeClient)\n\n                        if (result.files.isEmpty()) {\n                            Log.e(TAG, \"Failed to fetch file list for ${selectModelData.id}\")\n                            runOnUiThread {\n                                downloadState = DownloadState.IDLE\n                                llDownloading.visibility = View.GONE\n                                Toaster.show(\"Failed to fetch file list.\")\n                            }\n                            return@launch\n                        }\n\n                        val useHfUrls = result.source == ModelFileListingUtil.FileListResult.Source.HUGGINGFACE\n                        Log.d(TAG, \"Found ${result.files.size} files from ${result.source}: ${result.files}\")\n\n                        selectModelData.downloadableFilesWithFallback(\n                            selectModelData.modelDir(this@MainActivity),\n                            result.files,\n                            useHfUrls\n                        )\n                    } else {\n                        // For non-NPU models or models with explicit files, use the original method with fallback\n                        selectModelData.downloadableFiles(selectModelData.modelDir(this@MainActivity))\n                            .withFallbackUrls()\n                    }\n\n                // Build fallback URL map\n                filesToDownloadWithFallback.forEach {\n                    fallbackUrlMap[it.primaryUrl] = it.fallbackUrl\n                }\n\n                // Convert to simple DownloadableFile for initial download attempt\n                val filesToDownload = filesToDownloadWithFallback.map {\n                    DownloadableFile(it.file, it.primaryUrl)\n                }\n\n                Log.d(TAG, \"filesToDownload: $filesToDownload\")\n                if (filesToDownload.isEmpty()) throw IllegalArgumentException(\"No download URL\")\n\n                fun getUrlFileSize(client: OkHttpClient, url: String): Long {\n                    val hostname = try {\n                        url.substringAfter(\"://\").substringBefore(\"/\")\n                    } catch (e: Exception) {\n                        \"unknown\"\n                    }\n\n                    Log.d(TAG, \"Requesting file size: $hostname\")\n\n                    val builder = Request.Builder().url(url).head()\n                    getHfToken(selectModelData, url)?.let {\n                        builder.addHeader(\"Authorization\", \"Bearer $it\")\n                    }\n                    val request = builder.build()\n                    try {\n                        client.newCall(request).execute().use { resp ->\n                            val size = resp.header(\"Content-Length\")?.toLongOrNull() ?: 0L\n                            Log.d(TAG, \"Response: code=${resp.code}, size=$size\")\n                            return size\n                        }\n                    } catch (e: java.net.UnknownHostException) {\n                        Log.e(TAG, \"DNS resolution failed for $hostname - Check DNS/network\")\n                        return 0L\n                    } catch (e: java.net.SocketTimeoutException) {\n                        Log.e(TAG, \"Connection timeout to $hostname - Possible firewall/proxy issue\")\n                        return 0L\n                    } catch (e: java.net.ConnectException) {\n                        Log.e(TAG, \"Connection refused by $hostname - Server unreachable\")\n                        return 0L\n                    } catch (e: javax.net.ssl.SSLException) {\n                        Log.e(TAG, \"SSL/TLS error to $hostname - ${e.message}\")\n                        return 0L\n                    } catch (e: Exception) {\n                        Log.e(TAG, \"Network error: ${e.javaClass.simpleName} - ${e.message}\")\n                        return 0L\n                    }\n                }\n\n                // Try to get file sizes, with fallback to HF if S3 fails\n                val fileSizeMap = mutableMapOf<String, Long>()\n                filesToDownloadWithFallback.forEach { fileWithFallback ->\n                    var size = getUrlFileSize(unsafeClient, fileWithFallback.primaryUrl)\n                    if (size == 0L && fileWithFallback.fallbackUrl != fileWithFallback.primaryUrl) {\n                        Log.w(TAG, \"Primary URL failed, trying fallback for size: ${fileWithFallback.file.name}\")\n                        size = getUrlFileSize(unsafeClient, fileWithFallback.fallbackUrl)\n                    }\n                    fileSizeMap[fileWithFallback.primaryUrl] = size\n                }\n\n                val totalSizes = filesToDownload.map { fileSizeMap[it.url] ?: 0L }\n\n                // Only fail if essential model files (.nexa, .gguf, .bin) have size=0\n                // Allow size=0 for config files like .json, .md, .txt, .gitattributes\n                val essentialExtensions = listOf(\".nexa\", \".gguf\", \".bin\", \".safetensors\")\n                val essentialFilesWithZeroSize = filesToDownload.filterIndexed { index, file ->\n                    val isEssential = essentialExtensions.any { file.file.name.endsWith(it, ignoreCase = true) }\n                    isEssential && totalSizes[index] == 0L\n                }\n\n                if (essentialFilesWithZeroSize.isNotEmpty()) {\n                    Log.e(TAG, \"Essential files with zero size: ${essentialFilesWithZeroSize.map { it.file.name }}\")\n                    runOnUiThread {\n                        downloadState = DownloadState.IDLE\n                        llDownloading.visibility = View.GONE\n                        Toaster.show(\"Download failed - could not get file sizes for essential model files.\")\n                    }\n                    return@launch\n                }\n\n                // Filter out non-essential files with size=0 (like config.json that may not exist)\n                val filesToDownloadFiltered = filesToDownload.filterIndexed { index, _ ->\n                    totalSizes[index] > 0L\n                }\n                val filesToDownloadWithFallbackFiltered = filesToDownloadWithFallback.filter { fileWithFallback ->\n                    fileSizeMap[fileWithFallback.primaryUrl]?.let { it > 0L } ?: false\n                }\n\n                if (filesToDownloadFiltered.isEmpty()) {\n                    runOnUiThread {\n                        downloadState = DownloadState.IDLE\n                        llDownloading.visibility = View.GONE\n                        Toaster.show(\"No files to download.\")\n                    }\n                    return@launch\n                }\n\n                Log.d(\n                    TAG,\n                    \"Filtered ${filesToDownload.size - filesToDownloadFiltered.size} files with size=0, downloading ${filesToDownloadFiltered.size} files\"\n                )\n\n                val alreadyDownloaded = mutableMapOf<String, Long>()\n                val totalBytes = totalSizes.sum()\n                Log.d(TAG, \"all model size: $totalBytes\")\n\n                val startTime = System.currentTimeMillis()\n                var lastProgressTime = 0L\n                val progressInterval = 500L\n\n                fun onProgress(\n                    modelId: String,\n                    percent: Int,\n                    downloaded: Long,\n                    totalBytes: Long,\n                    etaSec: Long,\n                    speedStr: String\n                ) {\n                    runOnUiThread {\n                        if (100 == percent) {\n                            llDownloading.visibility = View.GONE\n                            spDownloaded.edit().putBoolean(selectModelId, true).commit()\n                            Toaster.show(\"${downloadingModelData?.displayName} downloaded\")\n                        } else {\n                            tvDownloadProgress.text = \"$percent%\"\n                        }\n                    }\n                }\n\n                fun reportProgress(force: Boolean = false) {\n                    val now = System.currentTimeMillis()\n                    if (force || now - lastProgressTime > progressInterval) {\n                        val elapsedMs = now - startTime\n                        val downloaded = alreadyDownloaded.values.sum()\n                        val percent =\n                            if (totalBytes > 0) ((downloaded * 100) / totalBytes).toInt() else 0\n                        val speedAvg =\n                            if (elapsedMs > 0) downloaded / (elapsedMs / 1000.0) else 0.0\n                        val etaSec =\n                            if (speedAvg > 0) ((totalBytes - downloaded) / speedAvg).toLong() else -1L\n                        val speedStr = if (speedAvg > 1024 * 1024) {\n                            String.format(\"%.2f MB/s\", speedAvg / (1024 * 1024))\n                        } else {\n                            String.format(\"%.1f KB/s\", speedAvg / 1024)\n                        }\n                        onProgress(selectModelId, percent, downloaded, totalBytes, etaSec, speedStr)\n                        lastProgressTime = now\n                    }\n                }\n\n                // Function to start download for a list of files\n                fun startDownload(\n                    downloadFiles: List<DownloadableFile>,\n                    isFallbackAttempt: Boolean = false\n                ) {\n                    if (downloadFiles.isEmpty()) {\n                        if (failedDownloads.isEmpty()) {\n                            // All downloads complete\n                            downloadState = DownloadState.IDLE\n                            reportProgress(force = true)\n                            onProgress(selectModelId, 100, totalBytes, totalBytes, 0, \"0 KB/s\")\n                        } else {\n                            runOnUiThread {\n                                downloadState = DownloadState.IDLE\n                                llDownloading.visibility = View.GONE\n                                Toaster.show(\"Download failed for some files.\")\n                            }\n                        }\n                        return\n                    }\n\n                    val queueSet = DownloadContext.QueueSet()\n                        .setParentPathFile(downloadFiles[0].file.parentFile)\n                        .setMinIntervalMillisCallbackProcess(300)\n                    val builder = queueSet.commit()\n\n                    downloadFiles.forEach { item ->\n                        val taskBuilder = DownloadTask.Builder(item.url, item.file)\n                        getHfToken(selectModelData, item.url)?.let {\n                            taskBuilder.addHeader(\"Authorization\", \"Bearer $it\")\n                        }\n                        val task = taskBuilder.build()\n                        task.info?.let {\n                            alreadyDownloaded[it.url] = it.totalOffset\n                        }\n                        builder.bindSetTask(task)\n                    }\n\n                    val totalCount = filesToDownloadFiltered.size\n                    var currentCount = filesToDownloadFiltered.size - downloadFiles.size\n                    val pendingFallbacks = mutableListOf<DownloadableFile>()\n\n                    downloadContext = builder.setListener(createDownloadContextListener {}).build()\n                    downloadContext?.start(\n                        createListener1(taskStart = { task, _ ->\n                            Log.d(TAG, \"download task ${task.id} Start${if (isFallbackAttempt) \" (fallback)\" else \"\"}\")\n                        }, retry = { task, _ ->\n                            Log.d(TAG, \"download task ${task.id} retry\")\n                        }, connected = { task, _, _, _ ->\n                            Log.d(TAG, \"download task ${task.id} connected\")\n                        }, progress = { task, currentOffset, totalLength ->\n                            Log.d(TAG, \"download task ${task.id} progress $currentOffset $totalLength\")\n                            alreadyDownloaded[task.url] = currentOffset\n                            reportProgress(true)\n                        }) { task, cause, exception, _ ->\n                            when (cause) {\n                                EndCause.CANCELED -> {\n                                    // do nothing\n                                }\n\n                                EndCause.COMPLETED -> {\n                                    Log.d(TAG, \"download task ${task.id} end\")\n                                    currentCount += 1\n                                    Log.d(\n                                        TAG,\n                                        \"download task process currentCount:$currentCount, totalCount:$totalCount\"\n                                    )\n\n                                    if (currentCount >= totalCount) {\n                                        downloadState = DownloadState.IDLE\n                                        reportProgress(force = true)\n                                        onProgress(selectModelId, 100, totalBytes, totalBytes, 0, \"0 KB/s\")\n                                    }\n                                }\n\n                                else -> {\n                                    Log.e(TAG, \"download task ${task.id} error: $cause, ${exception?.message}\")\n\n                                    // Try fallback URL if available and not already a fallback attempt\n                                    if (!isFallbackAttempt) {\n                                        val fallbackUrl = fallbackUrlMap[task.url]\n                                        if (fallbackUrl != null && fallbackUrl != task.url && task.file != null) {\n                                            Log.w(TAG, \"Primary download failed, queuing fallback: ${task.file?.name}\")\n                                            pendingFallbacks.add(DownloadableFile(task.file!!, fallbackUrl))\n                                        } else {\n                                            val failedFile =\n                                                filesToDownloadWithFallback.find { it.primaryUrl == task.url }\n                                            if (failedFile != null) {\n                                                failedDownloads.add(failedFile)\n                                            }\n                                        }\n                                    } else {\n                                        val failedFile = filesToDownloadWithFallback.find {\n                                            it.primaryUrl == task.url || it.fallbackUrl == task.url\n                                        }\n                                        if (failedFile != null) {\n                                            failedDownloads.add(failedFile)\n                                        }\n                                    }\n\n                                    currentCount += 1\n                                    if (currentCount >= totalCount && pendingFallbacks.isEmpty()) {\n                                        if (failedDownloads.isEmpty()) {\n                                            downloadState = DownloadState.IDLE\n                                            reportProgress(force = true)\n                                            onProgress(selectModelId, 100, totalBytes, totalBytes, 0, \"0 KB/s\")\n                                        } else {\n                                            runOnUiThread {\n                                                downloadState = DownloadState.IDLE\n                                                llDownloading.visibility = View.GONE\n                                                Toaster.show(\"Download failed for ${failedDownloads.size} file(s).\")\n                                            }\n                                        }\n                                    } else if (pendingFallbacks.isNotEmpty()) {\n                                        Log.d(TAG, \"Starting ${pendingFallbacks.size} fallback downloads\")\n                                        modelScope.launch {\n                                            startDownload(pendingFallbacks.toList(), isFallbackAttempt = true)\n                                        }\n                                        pendingFallbacks.clear()\n                                    }\n                                }\n                            }\n                        }, true\n                    )\n                }\n\n                // Start initial download with primary URLs\n                startDownload(filesToDownloadFiltered)\n            }\n        }\n    }\n\n    private fun setListeners() {\n\n        btnAddImage.setOnClickListener {\n            openGallery()\n        }\n\n        btnAudioRecord.setOnClickListener {\n            startRecord()\n        }\n\n        btnClearHistory.setOnClickListener {\n            clearHistory()\n        }\n        /**\n         * Step 3. download model\n         */\n        binding.btnCancelDownload.setOnClickListener {\n            downloadContext?.stop()\n            tvDownloadProgress.text = \"0%\"\n            downloadingModelData?.downloadableFiles(downloadingModelData!!.modelDir(this))\n                ?.forEach {\n                    it.file.delete()\n                }\n            binding.btnDismissDownload.performClick()\n        }\n        binding.btnRetryDownload.setOnClickListener {\n            downloadContext?.stop()\n            downloadState = DownloadState.IDLE\n            downloadModel(downloadingModelData!!)\n        }\n        binding.btnDismissDownload.setOnClickListener {\n            binding.llDownloading.visibility = View.GONE\n        }\n        btnDownload.setOnClickListener {\n            if (downloadState == DownloadState.DOWNLOADING) {\n                if (downloadingModelData?.id == selectModelId) {\n                    binding.llDownloading.visibility = View.VISIBLE\n                } else {\n                    Toaster.show(\"${downloadingModelData?.displayName} is currently downloading.\")\n                }\n                return@setOnClickListener\n            }\n            val selectModelData = modelList.first { it.id == selectModelId }\n            downloadModel(selectModelData)\n        }\n        /**\n         * Step 4. load model\n         */\n        btnLoadModel.setOnClickListener {\n            val selectModelData = modelList.first { it.id == selectModelId }\n            if (selectModelData == null) {\n                Toast.makeText(this@MainActivity, \"model not selected\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n            Log.d(TAG, \"current select model data:$selectModelData\")\n            if (hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"please unload first\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n\n            // Check if model files exist locally before attempting to load\n            val fileName = isModelDownloaded(selectModelData)\n            if (fileName != null) {\n                Toaster.showLong(\"The \\\"$fileName\\\" file is missing. Please download it first.\")\n                return@setOnClickListener\n            }\n\n            vTip.visibility = View.VISIBLE\n            llLoading.visibility = View.VISIBLE\n\n            val supportPluginIds = selectModelData.getSupportPluginIds()\n            Log.d(TAG, \"support plugin_id:$supportPluginIds\")\n            var modelDataPluginId = \"cpu_gpu\"\n            var nGpuLayers = 0\n            if (supportPluginIds.size > 1) {\n                val dialogBinding = DialogSelectPluginIdBinding.inflate(layoutInflater)\n                val isGgufLlmModel = !selectModelData.isNpuModel() &&\n                    (selectModelData.type == \"chat\" || selectModelData.type == \"llm\")\n                supportPluginIds.forEach {\n                    when (it) {\n                        \"cpu\" -> {\n                            dialogBinding.rbCpu.visibility = View.VISIBLE\n                            dialogBinding.rbCpu.isChecked = true\n                        }\n\n                        \"gpu\" -> {\n                            dialogBinding.rbGpu.visibility = View.VISIBLE\n                        }\n\n                        \"npu\" -> {\n                            dialogBinding.rbNpu.visibility = View.VISIBLE\n                            dialogBinding.rbNpu.isChecked = true\n                        }\n                    }\n                }\n                if (isGgufLlmModel) {\n                    dialogBinding.rbNpu.visibility = View.VISIBLE\n                }\n                dialogBinding.rgSelectPluginId.setOnCheckedChangeListener { group, checkedId ->\n                    dialogBinding.llGpuLayers.visibility =\n                        if (checkedId == R.id.rb_gpu) View.VISIBLE else View.GONE\n                }\n\n                val dialogOnClickListener = object : CustomDialogInterface.OnClickListener() {\n                    override fun onClick(\n                        dialog: DialogInterface?,\n                        which: Int\n                    ) {\n                        nGpuLayers = 0\n                        var ggufLlmDeviceId: String? = null\n                        val checkedId = dialogBinding.rgSelectPluginId.checkedRadioButtonId\n                        if (checkedId == R.id.rb_gpu) {\n                            if (dialogBinding.llGpuLayers.visibility == View.VISIBLE) {\n                                nGpuLayers = dialogBinding.etGpuLayers.text.toString().toInt()\n                                if (nGpuLayers == 0) {\n                                    Toast.makeText(\n                                        this@MainActivity,\n                                        \"nGpuLayers min value is 1\",\n                                        Toast.LENGTH_SHORT\n                                    ).show()\n                                    return\n                                }\n                            }\n                            ggufLlmDeviceId = DeviceIdValue.GPU.value\n                        } else if (checkedId == R.id.rb_npu && isGgufLlmModel) {\n                            nGpuLayers = 999\n                            ggufLlmDeviceId = DeviceIdValue.NPU.value\n                        }\n                        when (which) {\n                            DialogInterface.BUTTON_POSITIVE -> {\n                                dialog?.dismiss()\n                                loadModel(selectModelData, modelDataPluginId, nGpuLayers, ggufLlmDeviceId)\n                            }\n\n                            DialogInterface.BUTTON_NEGATIVE -> {\n                                llLoading.visibility = View.INVISIBLE\n                                vTip.visibility = View.GONE\n                            }\n                        }\n                    }\n\n                }\n                val alertDialog = AlertDialog.Builder(this).setView(dialogBinding.root)\n                    .setNegativeButton(\"cancel\", dialogOnClickListener)\n                    .setPositiveButton(\"sure\", dialogOnClickListener)\n                    .setCancelable(false)\n                    .create()\n                alertDialog.show()\n                dialogOnClickListener.resetPositiveButton(alertDialog)\n            } else {\n                if (\"npu\" == supportPluginIds[0]) {\n                    modelDataPluginId = \"npu\"\n                }\n                loadModel(selectModelData, modelDataPluginId, nGpuLayers)\n            }\n        }\n\n        /**\n         * Step 5. send message\n         */\n        btnSend.setOnClickListener {\n            if (!hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"please load model first\", Toast.LENGTH_SHORT)\n                    .show()\n                return@setOnClickListener\n            }\n\n            if (savedImageFiles.isNotEmpty()) {\n                messages.add(Message(\"\", MessageType.IMAGES, savedImageFiles.map { it }))\n                reloadRecycleView()\n            }\n\n            val inputString = etInput.text.trim().toString()\n            etInput.setText(\"\")\n            etInput.clearFocus()\n            val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager\n            imm.hideSoftInputFromWindow(etInput.windowToken, 0)\n\n            if (inputString.isNotEmpty()) {\n                messages.add(Message(inputString, MessageType.USER))\n                reloadRecycleView()\n            }\n\n            val supportFunctionCall = false\n            var tools: String? = null\n            var grammarString: String? = null\n            if (supportFunctionCall) {\n                // if this model support 'function call'\n                tools =\n                    \"[{\\\"type\\\":\\\"function\\\",\\\"function\\\":{\\\"name\\\": \\\"campaign_investigation\\\",\\\"description\\\": \\\"Check campaign limits and determine appropriate action. If customer has reached limit, return a message (hardcoded or generated by model). If limit not reached, contact support.\\\",\\\"parameters\\\": {\\\"type\\\": \\\"object\\\", \\\"properties\\\":{\\\"campaign_name\\\":{\\\"type\\\": \\\"string\\\",\\\"description\\\": \\\"The name of the campaign to investigate\\\"}}, \\\"required\\\":[\\\"campaign_name\\\"]}}}]\"\n                grammarString = \"\"\"\nroot ::= \"<tool_call>\" space object \"</tool_call>\" space\nobject ::= \"{\" space campaign-name-kv \"}\" space\ncampaign-name-kv ::= \"\\\"campaign_name\\\"\" space \":\" space string\nstring ::= \"\\\"\" char* \"\\\"\" space\nchar ::= [^\"\\\\\\x7F\\x00-\\x1F] | [\\\\] ([\"\\\\bfnrt] | \"u\" hex hex hex hex)\nhex ::= [0-9a-fA-F]\nspace ::= | \" \" | \"\\n\" | \"\\r\" | \"\\t\"\n\"\"\"\n            }\n\n            if (!hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"model not loaded\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n\n            modelScope.launch {\n                val selectModelData = modelList.first { it.id == selectModelId }\n                val isNpu = selectModelData.getNexaManifest(this@MainActivity)?.PluginId == \"npu\"\n                Log.d(TAG, \"isNpu: $isNpu\")\n\n                val sb = StringBuilder()\n                if (isLoadCVModel) {\n                    // FIXME: Temporarily select the last image\n                    if (savedImageFiles.isEmpty()) {\n                        runOnUiThread {\n                            Toast.makeText(\n                                this@MainActivity,\n                                \"Please select one picture.\",\n                                Toast.LENGTH_SHORT\n                            ).show()\n                        }\n                        return@launch\n                    }\n                    val imagePath = savedImageFiles.last().absolutePath\n                    runOnUiThread {\n                        messages.add(Message(\"\", MessageType.IMAGES, savedImageFiles))\n                        reloadRecycleView()\n                        clearImages()\n                    }\n                    cvWrapper.infer(imagePath).onSuccess { results ->\n                        Log.d(\"nfl\", \"infer result:$results\")\n                        runOnUiThread {\n                            val outputImageFiles = results.flatMap { r ->\n                                r.image_paths?.map { File(it) }?.filter { it.exists() } ?: emptyList()\n                            }\n                            val isObjectDetection = results.firstOrNull()?.bbox != null\n                            Log.d(\"nfl\", \"outputImageFiles: ${outputImageFiles.size}, isObjectDetection: $isObjectDetection, results count: ${results.size}\")\n\n                            when {\n                                outputImageFiles.isNotEmpty() -> {\n                                    messages.add(Message(\"\", MessageType.ASSISTANT_IMAGES, outputImageFiles))\n                                }\n                                isObjectDetection -> {\n                                    try {\n                                        val originalBitmap = BitmapFactory.decodeFile(imagePath)\n                                        Log.d(\"nfl\", \"Loaded bitmap: $originalBitmap\")\n                                        if (originalBitmap == null) {\n                                            messages.add(Message(\"Failed to load image: $imagePath\", MessageType.PROFILE))\n                                            reloadRecycleView()\n                                            return@runOnUiThread\n                                        }\n                                        val resultBitmap = drawBoundingBoxes(originalBitmap, results)\n                                        Log.d(\"nfl\", \"Drew bounding boxes: $resultBitmap\")\n                                        val resultFile = File(filesDir, \"detection_result_${System.currentTimeMillis()}.jpg\")\n                                        resultFile.outputStream().use { out ->\n                                            resultBitmap.compress(Bitmap.CompressFormat.JPEG, 95, out)\n                                        }\n                                        Log.d(\"nfl\", \"Saved detection result to: ${resultFile.absolutePath}\")\n                                        messages.add(Message(\"\", MessageType.ASSISTANT_IMAGES, listOf(resultFile)))\n                                        val summary = results.mapIndexed { idx, result ->\n                                            val label = result.text ?: \"object\"\n                                            val conf = String.format(\"%.2f\", result.confidence ?: 0.0)\n                                            \"${idx + 1}. $label ($conf)\"\n                                        }.joinToString(\"\\n\")\n                                        messages.add(Message(\"Detected ${results.size} objects:\\n$summary\", MessageType.ASSISTANT))\n                                    } catch (e: Exception) {\n                                        Log.e(\"nfl\", \"Error drawing bounding boxes\", e)\n                                        messages.add(Message(\"Error processing detection: ${e.message}\", MessageType.PROFILE))\n                                    }\n                                }\n                                else -> {\n                                    Log.d(\"nfl\", \"Processing as OCR, results: $results\")\n                                    val content = results.map { result ->\n                                        \"[${result.confidence}] ${result.text}\"\n                                    }.joinToString(separator = \"\\n\")\n                                    messages.add(Message(content, MessageType.ASSISTANT))\n                                }\n                            }\n                            reloadRecycleView()\n                        }\n                    }.onFailure { error ->\n                        runOnUiThread {\n                            messages.add(Message(error.toString(), MessageType.PROFILE))\n                            reloadRecycleView()\n                        }\n                        Log.d(\"nfl\", \"infer result error:$error\")\n                    }\n                } else if (isLoadAsrModel) {\n                    if (audioFile == null) {\n                        runOnUiThread {\n                            Toast.makeText(this@MainActivity, \"no audio file\", Toast.LENGTH_SHORT)\n                                .show()\n                        }\n                    } else {\n//                        val audioFilePath = audioFile!!.absolutePath\n                        val audioFilePath = \"/sdcard/Download/assets/OSR_us_000_0010_16k.wav\"\n                        asrWrapper.transcribe(\n                            AsrTranscribeInput(\n                                audioFilePath,  // Use hardcoded path instead of inputString\n                                \"en\",  // Language code\n                                null   // Optional timestamps\n                            )\n                        ).onSuccess { transcription ->\n                            runOnUiThread {\n                                messages.add(\n                                    Message(\n                                        transcription.result.transcript ?: \"\",\n                                        MessageType.ASSISTANT\n                                    )\n                                )\n                                reloadRecycleView()\n                            }\n                        }.onFailure { error ->\n                            runOnUiThread {\n                                messages.add(\n                                    Message(\n                                        \"Error: ${error.message}\",\n                                        MessageType.PROFILE\n                                    )\n                                )\n                                reloadRecycleView()\n                            }\n                        }\n                    }\n                } else if (isLoadEmbedderModel) {\n                    // ADD: Handle embedder inference\n                    // Input format: single text or multiple texts separated by \"|\"\n                    val texts = inputString.split(\"|\").map { it.trim() }.toTypedArray()\n                    embedderWrapper!!.embed(texts, EmbeddingConfig()).onSuccess { embedResult ->\n                        runOnUiThread {\n                            val result = StringBuilder()\n                            val flatEmbeddings = embedResult.embeddings\n                            val embeddingDim = flatEmbeddings.size / texts.size\n\n                            texts.forEachIndexed { idx, text ->\n                                val start = idx * embeddingDim\n                                val end = start + embeddingDim\n                                val embedding = flatEmbeddings.sliceArray(start until end)\n\n                                // Calculate mean and variance\n                                val mean = embedding.average()\n                                val variance = embedding.map { (it - mean) * (it - mean) }.average()\n\n                                result.append(\"Text ${idx + 1}: \\\"$text\\\"\\n\")\n                                result.append(\"Embedding dimension: $embeddingDim\\n\")\n                                result.append(\"Mean: ${\"%.4f\".format(mean)}\\n\")\n                                result.append(\"Variance: ${\"%.4f\".format(variance)}\\n\")\n                                result.append(\"First 5 values: [\")\n                                result.append(\n                                    embedding.take(5).joinToString(\", \") { \"%.4f\".format(it) })\n                                result.append(\"...]\\n\\n\")\n                            }\n\n                            messages.add(Message(result.toString(), MessageType.ASSISTANT))\n                            reloadRecycleView()\n                        }\n                    }.onFailure { error ->\n                        runOnUiThread {\n                            messages.add(Message(\"Error: ${error.message}\", MessageType.PROFILE))\n                            reloadRecycleView()\n                        }\n                    }\n                } else if (isLoadRerankerModel) {\n                    // Reranker input format: \"query\\ndoc1\\ndoc2\\ndoc3...\"\n                    // First line is query, remaining lines are documents\n                    val query = inputString.split(\"\\n\")[0]  // Get first line as query\n                    val documents =\n                        inputString.split(\"\\n\").drop(1).toTypedArray()  // Get rest as docs\n                    rerankerWrapper.rerank(query, documents, RerankConfig())\n                        .onSuccess { rerankerResult ->\n                            runOnUiThread {\n                                val result = StringBuilder()\n                                result.append(\"Rerank Results:\\n\")\n                                // Sort by score descending to show best matches first\n                                rerankerResult.scores?.withIndex()?.sortedByDescending { it.value }\n                                    ?.forEach { (idx, score) ->\n                                        result.append(\"${idx + 1}. Score: ${\"%.4f\".format(score)}\\n\")\n                                        result.append(\"   ${documents[idx]}\\n\\n\")\n                                    }\n                                messages.add(Message(result.toString(), MessageType.ASSISTANT))\n                                reloadRecycleView()\n                            }\n                        }.onFailure { error ->\n                            runOnUiThread {\n                                \"Error: ${error.message}\".also {\n                                    messages.add(Message(it, MessageType.PROFILE))\n                                    reloadRecycleView()\n                                }\n                            }\n                        }\n                } else if (isLoadVlmModel) {\n                    val contents = savedImageFiles.map {\n                        VlmContent(\"image\", it.absolutePath)\n                    }.toMutableList()\n                    audioFile?.let {\n                        contents.add(VlmContent(\"audio\", it.absolutePath))\n                    }\n                    contents.add(VlmContent(\"text\", inputString))\n                    audioFile = null\n                    clearImages()\n                    val sendMsg = VlmChatMessage(role = \"user\", contents = contents)\n                    // VlmContentTransfer(\n                    //     this@MainActivity, VlmContent(\n                    //         \"image\", inputString\n                    //     )\n                    // ).forUrl()\n\n                    // vlmChatList.clear()\n                    vlmChatList.add(sendMsg)\n\n                    Log.d(TAG, \"before apply chat template:$vlmChatList\")\n                    vlmWrapper.applyChatTemplate(vlmChatList.toTypedArray(), tools, enableThinking)\n                        .onSuccess { result ->\n                            Log.d(TAG, \"vlm chat template:${result.formattedText}\")\n                            val baseConfig =\n                                GenerationConfigSample().toGenerationConfig(grammarString)\n                            val configWithMedia = vlmWrapper.injectMediaPathsToConfig(\n                                vlmChatList.toTypedArray(),\n                                baseConfig\n                            )\n\n                            Log.d(TAG, \"Config has ${configWithMedia.imageCount} images\")\n\n                            vlmWrapper.generateStreamFlow(\n                                if (isNpu || true) inputString else result.formattedText,\n                                configWithMedia  // Use the updated config with media paths\n                            ).collect { handleResult(sb, it) }\n                        }.onFailure {\n                            runOnUiThread {\n                                Toast.makeText(\n                                    this@MainActivity, it.message, Toast.LENGTH_SHORT\n                                ).show()\n                            }\n                        }\n                } else {\n                    chatList.add(ChatMessage(role = \"user\", inputString))\n                    // Apply chat template and generate\n                    llmWrapper.applyChatTemplate(\n                        chatList.toTypedArray(),\n                        tools,\n                        enableThinking\n                    ).onSuccess { templateOutput ->\n                        Log.d(TAG, \"chat template:${templateOutput.formattedText}\")\n                        llmWrapper.generateStreamFlow(\n                            templateOutput.formattedText,\n                            GenerationConfigSample().toGenerationConfig(grammarString)\n                        ).collect { streamResult ->\n                            handleResult(sb, streamResult)\n                        }\n                    }.onFailure { error ->\n                        runOnUiThread {\n                            Toast.makeText(\n                                this@MainActivity, error.message, Toast.LENGTH_SHORT\n                            ).show()\n                        }\n                    }\n                }\n\n                clearImages()\n            }\n\n        }\n\n        /**\n         * Step 6. others\n         */\n        btnUnloadModel.setOnClickListener {\n            if (!hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"model not loaded\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n            // Unload model and cleanup\n            val handleUnloadResult = fun(result: Int) {\n                resetLoadState()\n                runOnUiThread {\n                    vTip.visibility = View.GONE\n                    btnUnloadModel.visibility = View.GONE\n                    btnStop.visibility = View.GONE\n                    btnAddImage.visibility = View.INVISIBLE\n                    btnAudioRecord.visibility = View.INVISIBLE\n                    Toast.makeText(\n                        this@MainActivity, if (result == 0) {\n                            \"unload success\"\n                        } else {\n                            \"unload failed and error code: $result\"\n                        }, Toast.LENGTH_SHORT\n                    ).show()\n                }\n            }\n            modelScope.launch {\n                if (isLoadVlmModel) {\n                    vlmWrapper.stopStream()\n                    vlmWrapper.destroy()\n                    vlmChatList.clear()\n                    // TODO:\n                    handleUnloadResult(0)\n                } else if (isLoadEmbedderModel) {\n                    // ADD: Unload embedder\n                    embedderWrapper!!.destroy()\n                    handleUnloadResult(0)\n                } else if (isLoadRerankerModel) {\n                    // ADD: Unload reranker\n                    handleUnloadResult(rerankerWrapper.destroy())\n                } else if (isLoadCVModel) {\n                    // ADD: Unload CV model\n                    cvWrapper.destroy()\n                    // TODO:\n                    handleUnloadResult(0)\n                } else if (isLoadAsrModel) {\n                    // ADD: Unload ASR model\n                    asrWrapper.destroy()\n                    // TODO:\n                    handleUnloadResult(0)\n                } else if (isLoadLlmModel) {\n                    llmWrapper.stopStream()\n                    llmWrapper.destroy()\n                    chatList.clear()\n                    // TODO:\n                    handleUnloadResult(0)\n                } else {\n                    handleUnloadResult(0)\n                }\n            }\n        }\n        btnStop.setOnClickListener {\n            if (!hasLoadedModel()) {\n                Toast.makeText(\n                    this@MainActivity,\n                    \"model not loaded\",\n                    Toast.LENGTH_SHORT\n                ).show()\n                return@setOnClickListener\n            }\n            // MODIFY: Stop button only works for LLM/VLM (not embedder/reranker)\n            if (isLoadEmbedderModel || isLoadRerankerModel || isLoadAsrModel || isLoadCVModel) {\n                Toast.makeText(\n                    this@MainActivity,\n                    \"Stop not applicable for embedder/reranker/asr/cv\",\n                    Toast.LENGTH_SHORT\n                ).show()\n                return@setOnClickListener\n            }\n            // Stop streaming\n            modelScope.launch {\n                if (isLoadVlmModel) {\n                    vlmWrapper.stopStream()\n                } else if (isLoadLlmModel) {\n                    llmWrapper.stopStream()\n                }\n            }\n        }\n    }\n\n    fun handleResult(sb: StringBuilder, streamResult: LlmStreamResult) {\n        when (streamResult) {\n            is LlmStreamResult.Token -> {\n                runOnUiThread {\n                    sb.append(streamResult.text)\n                    Message(sb.toString(), MessageType.ASSISTANT).let { lastMsg ->\n                        val size = messages.size\n                        messages[size - 1].let { msg ->\n                            if (msg.type != MessageType.ASSISTANT) {\n                                messages.add(lastMsg)\n                            } else {\n                                messages[size - 1] = lastMsg\n                            }\n                        }\n                    }\n                    adapter.notifyDataSetChanged()\n                }\n                Log.d(TAG, \"Token: ${streamResult.text}\")\n            }\n\n            is LlmStreamResult.Completed -> {\n                if (isLoadVlmModel) {\n                    vlmChatList.add(\n                        VlmChatMessage(\n                            \"assistant\",\n                            listOf(VlmContent(\"text\", sb.toString()))\n                        )\n                    )\n                } else {\n                    chatList.add(ChatMessage(\"assistant\", sb.toString()))\n                }\n\n                runOnUiThread {\n                    var content = sb.toString()\n                    val size = messages.size\n                    messages[size - 1] = Message(content, MessageType.ASSISTANT)\n\n                    val ttft = String.format(null, \"%.2f\", streamResult.profile.ttftMs)\n                    val promptTokens = streamResult.profile.promptTokens\n                    val prefillSpeed =\n                        String.format(null, \"%.2f\", streamResult.profile.prefillSpeed)\n\n                    val generatedTokens = streamResult.profile.generatedTokens\n                    val decodingSpeed =\n                        String.format(null, \"%.2f\", streamResult.profile.decodingSpeed)\n\n                    val profileData =\n                        \"TTFT: $ttft ms; Prompt Tokens: $promptTokens; \\nPrefilling Speed: $prefillSpeed tok/s\\nGenerated Tokens: $generatedTokens; Decoding Speed: $decodingSpeed tok/s\"\n                    messages.add(\n                        Message(\n                            profileData,\n                            MessageType.PROFILE\n                        )\n                    )\n                    reloadRecycleView()\n                }\n                Log.d(TAG, \"Completed: ${streamResult.profile}\")\n            }\n\n            is LlmStreamResult.Error -> {\n                runOnUiThread {\n                    val content =\n                        \"your conversation is out of model’s context length, please start a new conversation or click clear button\"\n                    messages.add(Message(content, MessageType.PROFILE))\n                    reloadRecycleView()\n                }\n                Log.d(TAG, \"Error: $streamResult\")\n            }\n        }\n    }\n\n    private fun okdownload() {\n        val okDownloadBuilder = OkDownload.Builder(this)\n        val factory = DownloadOkHttp3Connection.Factory()\n        factory.setBuilder(getUnsafeOkHttpClient())\n        okDownloadBuilder.connectionFactory(factory)\n        try {\n            OkDownload.setSingletonInstance(okDownloadBuilder.build())\n        } catch (e: java.lang.Exception) {\n            Log.e(\"download\", \"download init failed\")\n        }\n    }\n\n    private fun getUnsafeOkHttpClient(): OkHttpClient.Builder {\n        try {\n            val x509m: X509TrustManager = object : X509TrustManager {\n                override fun getAcceptedIssuers(): Array<X509Certificate?>? {\n                    //Note: Cannot return null here, otherwise it will throw an error\n                    val x509Certificates = arrayOfNulls<X509Certificate>(0)\n                    return x509Certificates\n                }\n\n                @Throws(CertificateException::class)\n                override fun checkServerTrusted(\n                    chain: Array<X509Certificate?>?, authType: String?\n                ) {\n// Do not throw exception to trust all server certificates\n                }\n\n                @Throws(CertificateException::class)\n                override fun checkClientTrusted(\n                    chain: Array<X509Certificate?>?, authType: String?\n                ) {\n// Default trust mechanism\n                }\n            }\n            // Create a TrustManager that trusts all certificates\n            val trustAllCerts = arrayOf<TrustManager>(x509m)\n\n            // Initialize SSLContext\n            val sslContext = SSLContext.getInstance(\"SSL\")\n            sslContext.init(null, trustAllCerts, SecureRandom())\n\n            // Create SSLSocketFactory\n            val sslSocketFactory: SSLSocketFactory = sslContext.getSocketFactory()\n\n            // Build OkHttpClient\n            return OkHttpClient.Builder().sslSocketFactory(\n                sslSocketFactory, (trustAllCerts[0] as X509TrustManager?)!!\n            ).hostnameVerifier { hostname: String?, session: SSLSession? -> true }\n        } catch (e: Exception) {\n            throw RuntimeException(e)\n        }\n    }\n\n    private fun openGallery() {\n        val intent = Intent(Intent.ACTION_PICK, null)\n        intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, \"image/*\")\n        startActivityForResult(intent, 1)\n    }\n\n    override fun onRequestPermissionsResult(\n        requestCode: Int,\n        permissions: Array<out String>,\n        grantResults: IntArray\n    ) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n\n        if (requestCode == 0) {\n            if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n                openGallery()\n            } else {\n                Toast.makeText(this, \"Not allow\", Toast.LENGTH_SHORT).show()\n            }\n        } else if (requestCode == 2001) {\n            if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n                openCamera()\n            } else {\n                Toast.makeText(this, \"Camera not allow\", Toast.LENGTH_SHORT).show()\n            }\n        }\n    }\n\n    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {\n        super.onActivityResult(requestCode, resultCode, data)\n\n        var bitmap: Bitmap? = null\n        if (requestCode == 1) {\n            if (resultCode == Activity.RESULT_OK && data != null) {\n                val inputStream = contentResolver.openInputStream(data.data!!)\n                bitmap = BitmapFactory.decodeStream(inputStream)\n            }\n        } else if (requestCode == 1001 && resultCode == Activity.RESULT_OK) {\n            photoFile?.let {\n                bitmap = BitmapFactory.decodeFile(it.absolutePath)\n            }\n        }\n\n        bitmap?.let {\n            try {\n                val file = File(filesDir, \"chat_${System.currentTimeMillis()}.jpg\")\n                val success = saveBitmapToFile(it, file)\n                if (success) {\n                    Log.d(TAG, \"Save success：${file.absolutePath}\")\n                    savedImageFiles.add(file)\n                    refreshTopScrollContainer()\n                } else {\n                    Toast.makeText(this, \"Save Image failed\", Toast.LENGTH_SHORT).show()\n                }\n            } catch (e: FileNotFoundException) {\n                e.printStackTrace()\n            }\n        }\n    }\n\n    private fun saveBitmapToFile(bitmap: Bitmap, file: File): Boolean {\n        return try {\n            val tempDir = File(this.filesDir, \"tmp\").apply { if (!exists()) mkdirs() }\n\n            val tempFile = File(\n                tempDir,\n                \"tmp_${System.currentTimeMillis()}.jpg\"\n            )\n            FileOutputStream(tempFile).use { out ->\n                bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out)\n            }\n\n            val outFile = File(\n                tempDir,\n                \"out_${System.currentTimeMillis()}.jpg\"\n            )\n            ImgUtil.squareCrop(\n                ImgUtil.downscaleAndSave(\n                    imageFile = tempFile,\n                    outFile = outFile,\n                    maxSize = 448,\n                    format = Bitmap.CompressFormat.JPEG,\n                    quality = 90\n                ), file, 448\n            )\n            true\n        } catch (e: Exception) {\n            e.printStackTrace()\n            false\n        }\n    }\n\n    private fun stopRecord(cancel: Boolean) {\n        wavRecorder?.stopRecording()\n        wavRecorder = null\n        bottomPanel.visibility = View.GONE\n        if (cancel) {\n            audioFile = null\n        }\n        refreshTopScrollContainer()\n    }\n\n    private fun startRecord() {\n        bottomPanel.visibility = View.VISIBLE\n\n        val file = File(filesDir, \"audio\")\n        if (!file.exists()) {\n            file.mkdirs()\n        }\n        audioFile =\n            File(file, \"audio_${System.currentTimeMillis()}.wav\")\n        Log.d(TAG, \"audioFile: ${audioFile!!.absolutePath}\")\n        wavRecorder = WavRecorder()\n\n        wavRecorder?.startRecording(audioFile!!)\n    }\n\n    private fun clearHistory() {\n        if (isLoadLlmModel) {\n            chatList.clear()\n            modelScope.launch {\n                llmWrapper.reset()\n            }\n        }\n        if (isLoadVlmModel) {\n            vlmChatList.clear()\n            modelScope.launch {\n                vlmWrapper.reset()\n            }\n        }\n        messages.clear()\n        audioFile = null\n        clearImages()\n        reloadRecycleView()\n    }\n\n    private var popupWindow: PopupWindow? = null\n    private fun showPopupMenu(anchorView: View) {\n        if (popupWindow?.isShowing == true) {\n            popupWindow?.dismiss()\n            return\n        }\n\n        val popupView = LayoutInflater.from(this).inflate(R.layout.menu_layout, null)\n\n        popupWindow = PopupWindow(\n            popupView,\n            anchorView.width * 2,\n            android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\n            true\n        )\n\n        popupWindow?.isOutsideTouchable = true\n        popupWindow?.elevation = 10f\n\n        val btnCamera = popupView.findViewById<Button>(R.id.btn_camera)\n        val btnPhoto = popupView.findViewById<Button>(R.id.btn_photo)\n\n        btnCamera.setOnClickListener {\n            popupWindow?.dismiss()\n            checkAndOpenCamera()\n        }\n        btnPhoto.setOnClickListener {\n            popupWindow?.dismiss()\n            openGallery()\n        }\n\n        popupView.measure(\n            View.MeasureSpec.UNSPECIFIED,\n            View.MeasureSpec.UNSPECIFIED\n        )\n        val popupHeight = popupView.measuredHeight\n        popupWindow?.showAsDropDown(anchorView, 0, -anchorView.height - popupHeight)\n    }\n\n    private var photoUri: Uri? = null\n    private var photoFile: File? = null\n\n    private fun checkAndOpenCamera() {\n        if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n            != PackageManager.PERMISSION_GRANTED\n        ) {\n            ActivityCompat.requestPermissions(\n                this,\n                arrayOf(Manifest.permission.CAMERA),\n                2001\n            )\n        } else {\n            openCamera()\n        }\n    }\n\n    private fun openCamera() {\n        val intent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)\n        photoFile = File(\n            getExternalFilesDir(Environment.DIRECTORY_PICTURES),\n            \"photo_${System.currentTimeMillis()}.jpg\"\n        )\n        photoUri = FileProvider.getUriForFile(\n            this,\n            \"${applicationContext.packageName}.fileprovider\",\n            photoFile!!\n        )\n\n        intent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri)\n        intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)\n        startActivityForResult(intent, 1001)\n    }\n\n    private fun clearImages() {\n        savedImageFiles.clear()\n        refreshTopScrollContainer()\n    }\n\n    private fun refreshTopScrollContainer() {\n        runOnUiThread {\n            topScrollContainer.removeAllViews()\n            if (savedImageFiles.isEmpty() && audioFile == null) {\n                scrollImages.visibility = View.GONE\n                return@runOnUiThread\n            }\n\n            scrollImages.visibility = View.VISIBLE\n\n            for (file in savedImageFiles) {\n                val itemView = LayoutInflater.from(this)\n                    .inflate(R.layout.item_image_scroll, topScrollContainer, false)\n                val ivImage = itemView.findViewById<ImageView>(R.id.iv_image)\n                val btnRemove = itemView.findViewById<ImageButton>(R.id.btn_remove)\n\n                ivImage.setImageURI(Uri.fromFile(file))\n\n                btnRemove.setOnClickListener {\n                    savedImageFiles.remove(file)\n                    refreshTopScrollContainer()\n                }\n                topScrollContainer.addView(itemView)\n            }\n\n            if (audioFile != null) {\n                val audioView = LayoutInflater.from(this)\n                    .inflate(R.layout.item_audio_scroll, topScrollContainer, false)\n                val audioName = audioView.findViewById<TextView>(R.id.tv_audio_name)\n                val audioType = audioView.findViewById<TextView>(R.id.tv_audio_type)\n                val btnRemove = audioView.findViewById<ImageButton>(R.id.btn_audio_remove)\n                audioName.text = audioFile!!.name\n                // TODO: hard code\n                audioType.text = \"wav\"\n\n                btnRemove.setOnClickListener {\n                    audioFile = null\n                    refreshTopScrollContainer()\n                }\n                topScrollContainer.addView(audioView)\n            }\n        }\n    }\n\n    private fun reloadRecycleView() {\n        adapter.notifyDataSetChanged()\n        binding.rvChat.scrollToPosition(messages.size - 1)\n    }\n\n    companion object {\n        private const val SP_DOWNLOADED = \"sp_downloaded\"\n        private const val TAG = \"MainActivity\"\n    }\n}\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/MyApplication.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.app.Application\nimport com.hjq.toast.Toaster\n\nclass MyApplication: Application() {\n\n    override fun onCreate() {\n        super.onCreate()\n        Toaster.init(this)\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/activity/FileContentActivity.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.activity\n\nimport android.app.Activity\nimport android.graphics.Color\nimport android.os.Bundle\nimport com.gyf.immersionbar.ktx.immersionBar\nimport com.nexa.demo.databinding.ActivityFileContentBinding\nimport com.nexa.demo.utils.inflate\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport java.io.File\n\nclass FileContentActivity : Activity() {\n\n    private val binding by inflate<ActivityFileContentBinding>()\n    private var filePath: String? = null\n    private var promptContent: String? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        immersionBar {\n            statusBarColorInt(Color.WHITE)\n            statusBarDarkFont(true)\n            fitsSystemWindows(true)\n        }\n        filePath = intent.getStringExtra(KEY_FILE_PATH)\n        promptContent = intent.getStringExtra(KEY_PROMPT_CONTENT)\n        \n        binding.btnBack.setOnClickListener {\n            finish()\n        }\n        \n        // Handle either file path or prompt content\n        if (promptContent != null) {\n            // Display prompt content directly\n            binding.tvContent.text = promptContent\n        } else if (filePath != null) {\n            // Read file content\n            CoroutineScope(Dispatchers.IO).launch {\n                val text = File(filePath).readText()\n                runOnUiThread {\n                    binding.tvContent.text = text\n                }\n            }\n        }\n    }\n\n    companion object {\n        const val KEY_FILE_PATH = \"key_file_path\"\n        const val KEY_PROMPT_CONTENT = \"key_prompt_content\"\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/bean/DownloadFileConfig.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.annotation.SuppressLint\nimport kotlinx.serialization.Serializable\n\n@SuppressLint(\"UnsafeOptInUsageError\")\n@Serializable\ndata class DownloadFileConfig (\n    val name:String,\n    /**\n     * Path relative to model dir\n     */\n    val path:String? = \"\",\n    val url:String? = \"\"\n)"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/bean/DownloadState.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nenum class DownloadState {\n    IDLE, DOWNLOADING\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/bean/DownloadableFile.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\n\nimport java.io.File\n\ndata class DownloadableFile(\n    val file: File,\n    val url: String\n)"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/bean/ModelData.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.text.TextUtils\nimport com.nexa.demo.FileConfig\nimport com.nexa.demo.utils.ModelFileListingUtil\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.json.Json\nimport java.io.File\n\n/**\n * Extended downloadable file with fallback URL support.\n * Primary URL is S3, fallback URL is Hugging Face.\n */\ndata class DownloadableFileWithFallback(\n    val file: File,\n    val primaryUrl: String,      // S3 URL\n    val fallbackUrl: String      // HuggingFace URL\n)\n\n@SuppressLint(\"UnsafeOptInUsageError\")\n@Serializable\ndata class ModelData(\n    val id: String,\n    val displayName: String,\n    val modelName: String,\n    /**\n     * support plugin_id\n     * 0: default, will use cpu;\n     * 0x1: cpu, 0x10:gpu, 0x100:npu\n     * cpu: 1,\n     * gpu: 16,\n     * npu: 256,\n     * cpu_gpu: 17,\n     * cpu_npu: 257,\n     * gpu_npu: 272,\n     * cpu_gpu_npu: 273\n     */\n    val pluginIds: Int? = 0,\n    val baseUrl: String? = null,\n    val mmprojOrTokenName: String? = null,\n    val tokenName: String = \"\",\n    val embeddingName: String = \"\",\n    val extConfigName: String = \"\",\n    val modelUrl: String? = null,\n    val mmprojOrTokenUrl: String? = null,\n    val embeddingUrl: String? = null,\n    val extConfigUrl: String? = null,\n    val sizeGb: Double? = 0.0,\n    val params: String? = null,\n    val features: List<String>? = null,\n    val type: String? = null,\n    /**\n     * Used to indicate the version number of ModelData, mainly for handling the storage location of downloaded files.\n     * 0: Default value — files are stored directly under the files/models directory.\n     * 1: Files are stored under the files/models/modelId/ directory.\n     */\n    val versionCode: Int? = 0,\n    // NPU-Vision-name\n    val patchEmbedName: String = \"\",\n    val vitModelName: String = \"\",\n    val vitConfigFileName: String = \"\",\n    val audioEncoderHelper0Name: String = \"\",\n    val audioEncoderHelper1Name: String = \"\",\n    val audioEncoderModelName: String = \"\",\n    val audioEncoderConfigFileName: String = \"\",\n    // NPU-Vision-url\n    val tokenUrl: String? = null,\n    val patchEmbedPathUrl: String? = null,\n    val vitModelPathUrl: String? = null,\n    val vitConfigFilePathUrl: String? = null,\n    val audioEncoderHelper0PathUrl: String? = null,\n    val audioEncoderHelper1PathUrl: String? = null,\n    val audioEncoderModelPathUrl: String? = null,\n    val audioEncoderConfigFilePathUrl: String? = null,\n    val files: ArrayList<DownloadFileConfig>? = null\n) {\n    var isSupport = true\n}\n\nfun ModelData.modelDir(context: Context): File =\n    if (versionCode == 1) {\n        File(FileConfig.modelsDir(context), id).apply { if (!exists()) mkdirs() }\n    } else {\n        FileConfig.modelsDir(context)\n    }\n\n\nfun ModelData.modelFile(context: Context): File? =\n    modelUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), modelName)\n    }\n\nfun ModelData.mmprojTokenFile(context: Context): File? =\n    mmprojOrTokenUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), mmprojOrTokenName)\n    }\n\nfun ModelData.tokenFile(context: Context): File? =\n    tokenUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), tokenName)\n    }\n\nfun ModelData.embederFile(context: Context): File? =\n    embeddingUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), embeddingName)\n    }\n\nfun ModelData.extConfigFile(context: Context): File? =\n    extConfigUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), extConfigName)\n    }\n\nfun ModelData.patchEmbedFile(context: Context): File? =\n    patchEmbedPathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), patchEmbedName)\n    }\n\nfun ModelData.vitModelFile(context: Context): File? =\n    vitModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), vitModelName)\n    }\n\nfun ModelData.vitConfigFile(context: Context): File? =\n    vitConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), vitConfigFileName)\n    }\n\nfun ModelData.audioEncoderHelper0File(context: Context): File? =\n    audioEncoderHelper0PathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderHelper0Name)\n    }\n\nfun ModelData.audioEncoderHelper1File(context: Context): File? =\n    audioEncoderHelper1PathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderHelper1Name)\n    }\n\nfun ModelData.audioEncoderModelFile(context: Context): File? =\n    audioEncoderModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderModelName)\n    }\n\nfun ModelData.audioEncoderConfigFile(context: Context): File? =\n    audioEncoderConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderConfigFileName)\n    }\n\nprivate fun ModelData.getRealUrl(url: String) = if (TextUtils.isEmpty(baseUrl)) {\n    url\n} else {\n    if (url.startsWith(\"http://\", true) || url.startsWith(\"https://\", true)) {\n        url\n    } else {\n        if (baseUrl!!.endsWith(\"/\")) {\n            \"$baseUrl$url\"\n        } else {\n            \"$baseUrl/$url\"\n        }\n    }\n}\n\nfun ModelData.downloadableFiles(modelDir: File): List<DownloadableFile> = listOfNotNull(\n    modelUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, modelName), getRealUrl(it))\n    },\n    mmprojOrTokenUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, mmprojOrTokenName), getRealUrl(it))\n    },\n    tokenUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, tokenName), getRealUrl(it))\n    },\n    embeddingUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, embeddingName), getRealUrl(it))\n    },\n    extConfigUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, extConfigName), getRealUrl(it))\n    },\n    patchEmbedPathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, patchEmbedName), getRealUrl(it))\n    },\n    vitModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, vitModelName), getRealUrl(it))\n    },\n    vitConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, vitConfigFileName), getRealUrl(it))\n    },\n    audioEncoderHelper0PathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderHelper0Name), getRealUrl(it))\n    },\n    audioEncoderHelper1PathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderHelper1Name), getRealUrl(it))\n    },\n    audioEncoderModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderModelName), getRealUrl(it))\n    },\n    audioEncoderConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderConfigFileName), getRealUrl(it))\n    }\n).let {\n    val temp = arrayListOf<DownloadableFile>()\n    files?.takeIf { it.isNotEmpty() }?.let { allFiles ->\n        allFiles.forEach { fileConfig ->\n            temp.add(\n                DownloadableFile(\n                    File(\n                        modelDir,\n                        fileConfig.path + File.separator + fileConfig.name\n                    ), if (TextUtils.isEmpty(fileConfig.url)) {\n                        getRealUrl(fileConfig.name)\n                    } else {\n                        getRealUrl(fileConfig.url!!)\n                    }\n                )\n            )\n        }\n    }\n    it + temp\n}\n\n\nfun ModelData.allModelFilesExist(modelDir: File): Boolean {\n    val files = this.downloadableFiles(modelDir).map { it.file }\n    return files.all { it.exists() && it.length() > 0 }\n}\n\nfun ModelData.getNonExistModelFile(modelDir: File): String? {\n    this.downloadableFiles(modelDir).forEach {\n        if (!(it.file.exists() && it.file.length() > 0)) {\n            return it.file.absolutePath.replace(\"/data/user/0\", \"/data/data\")\n        }\n    }\n    return null\n}\n\nfun ModelData.getNexaManifest(context: Context): NexaManifestBean? {\n    try {\n        val str = File(modelDir(context), \"nexa.manifest\").bufferedReader().use { it.readText() }\n        return Json {\n            ignoreUnknownKeys = true\n        }.decodeFromString<NexaManifestBean>(str)\n    } catch (e: Exception) {\n        e.printStackTrace()\n        return null\n    }\n}\n\nfun ModelData.getSupportPluginIds(): ArrayList<String> {\n    val pluginIds = arrayListOf<String>()\n    if (this.pluginIds == 0) {\n        pluginIds.add(\"cpu\")\n    } else {\n        if (this.pluginIds!! and 0x100 == 0x100) {\n            pluginIds.add(\"npu\")\n        }\n        if (this.pluginIds and 0x10 == 0x10) {\n            pluginIds.add(\"gpu\")\n        }\n        if (this.pluginIds and 0x1 == 0x1) {\n            pluginIds.add(\"cpu\")\n        }\n    }\n    return pluginIds\n}\n\n/**\n * Checks if this model is an NPU model.\n * NPU models are identified by:\n * - \"NPU\" (case-insensitive) in the model id, OR\n * - \".nexa\" suffix in modelName\n */\nfun ModelData.isNpuModel(): Boolean {\n    return id.contains(\"NPU\", ignoreCase = true) || \n           id.contains(\"npu\", ignoreCase = true) ||\n           modelName.endsWith(\".nexa\", ignoreCase = true)\n}\n\n/**\n * Downloads files for NPU models using a dynamically fetched file list.\n * This overload is used when files are fetched from S3/HF listing instead of\n * being specified in model_list.json.\n *\n * @param modelDir Directory where model files will be stored\n * @param npuFileNames List of file names fetched from listing\n * @return List of DownloadableFile objects representing files to download\n */\nfun ModelData.downloadableFilesWithNpuList(\n    modelDir: File,\n    npuFileNames: List<String>\n): List<DownloadableFile> {\n    val npuFiles = arrayListOf<DownloadableFile>()\n    npuFileNames.forEach { fileName ->\n        val url = if (baseUrl.isNullOrEmpty()) {\n            fileName\n        } else {\n            if (baseUrl.endsWith(\"/\")) \"$baseUrl$fileName\" else \"$baseUrl/$fileName\"\n        }\n        npuFiles.add(DownloadableFile(File(modelDir, fileName), url))\n    }\n    return npuFiles\n}\n\n/**\n * Downloads files for NPU models with fallback URL support.\n * Primary URL is S3, fallback URL is Hugging Face.\n *\n * @param modelDir Directory where model files will be stored\n * @param npuFileNames List of file names fetched from listing\n * @param useHfUrls If true, use HF URLs as primary (when S3 listing failed)\n * @return List of DownloadableFileWithFallback objects\n */\nfun ModelData.downloadableFilesWithFallback(\n    modelDir: File,\n    npuFileNames: List<String>,\n    useHfUrls: Boolean = false\n): List<DownloadableFileWithFallback> {\n    val npuFiles = arrayListOf<DownloadableFileWithFallback>()\n    val repoId = if (!baseUrl.isNullOrEmpty()) {\n        ModelFileListingUtil.getHfRepoId(baseUrl)\n    } else {\n        \"NexaAI/$id\"\n    }\n\n    npuFileNames.forEach { fileName ->\n        val s3Url = if (baseUrl.isNullOrEmpty()) {\n            fileName\n        } else {\n            if (baseUrl.endsWith(\"/\")) \"$baseUrl$fileName\" else \"$baseUrl/$fileName\"\n        }\n        val hfUrl = ModelFileListingUtil.getHfDownloadUrl(repoId, fileName)\n        \n        // If useHfUrls is true, swap primary and fallback\n        if (useHfUrls) {\n            npuFiles.add(DownloadableFileWithFallback(File(modelDir, fileName), hfUrl, s3Url))\n        } else {\n            npuFiles.add(DownloadableFileWithFallback(File(modelDir, fileName), s3Url, hfUrl))\n        }\n    }\n\n    return npuFiles\n}\n\n/**\n * Converts a list of DownloadableFile to DownloadableFileWithFallback.\n * Adds HuggingFace fallback URLs for each file.\n */\nfun List<DownloadableFile>.withFallbackUrls(): List<DownloadableFileWithFallback> {\n    return map { df ->\n        val fallbackUrl = ModelFileListingUtil.getHfUrlForGgufFile(df.url)\n        DownloadableFileWithFallback(df.file, df.url, fallbackUrl)\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/bean/NexaManifestBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.annotation.SuppressLint\nimport kotlinx.serialization.Serializable\n\n@SuppressLint(\"UnsafeOptInUsageError\")\n@Serializable\ndata class NexaManifestBean(\n    val ModelName: String? = null,\n    val ModelType: String? = null,\n    val PluginId: String? = null\n)"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/bean/S3FileBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.util.Log\nimport java.text.SimpleDateFormat\nimport java.util.Calendar\nimport java.util.TimeZone\n\ndata class S3FileBean(val url: String, val startDate: String) {\n\n\n\n    companion object {\n        private const val TAG = \"S3FileBean\"\n        /**\n         * Default valid for 5 hours before expiration\n         */\n        fun isValid(startDate: String): Boolean {\n            val allHours = 24\n            val delayHours = 5\n            try {\n                val tz: TimeZone = TimeZone.getTimeZone(\"UTC\")\n                val sdf = SimpleDateFormat(\"yyyyMMdd'T'HHmmss'Z'\")\n                sdf.timeZone = tz\n                return Calendar.getInstance(tz).timeInMillis - sdf.parse(startDate).time < (allHours - delayHours) * 60 * 60 * 1000\n            } catch (e: Exception) {\n            }\n            return false\n        }\n        fun getStartDateFromUrl(url: String): String {\n            try {\n                val tag = \"X-Amz-Date=\"\n                val start = url.indexOf(tag) + tag.length\n                return url.substring(start, start + 16)\n            } catch (e: Exception) {\n                Log.e(TAG, \"getStartDateFromUrl failed:${e.message}\")\n            }\n            return \"\"\n        }\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/listeners/CustomDialogInterface.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.listeners\n\nimport android.app.AlertDialog\nimport android.content.DialogInterface\nimport android.view.View\n\nabstract class CustomDialogInterface : DialogInterface {\n\n    abstract class OnClickListener : View.OnClickListener, DialogInterface.OnClickListener {\n        private var dialog: DialogInterface? = null\n        protected val SUBMIT: Int = DialogInterface.BUTTON_POSITIVE\n        protected val CANCLE: Int = DialogInterface.BUTTON_NEGATIVE\n\n        constructor()\n\n        override fun onClick(v: View?) {\n            dialog?.let {\n                var positiveBtn: View? = null\n                var negativeBtn: View? = null\n                var neutralBtn: View? = null\n                if (it is AlertDialog) {\n                    (dialog as AlertDialog).let {\n                        positiveBtn = it.getButton(DialogInterface.BUTTON_POSITIVE)\n                        negativeBtn = it.getButton(DialogInterface.BUTTON_NEGATIVE)\n                        neutralBtn = it.getButton(DialogInterface.BUTTON_NEUTRAL)\n                    }\n                } else if (it is androidx.appcompat.app.AlertDialog) {\n                    (dialog as androidx.appcompat.app.AlertDialog).let {\n                        positiveBtn = it.getButton(DialogInterface.BUTTON_POSITIVE)\n                        negativeBtn = it.getButton(DialogInterface.BUTTON_NEGATIVE)\n                        neutralBtn = it.getButton(DialogInterface.BUTTON_NEUTRAL)\n                    }\n                }\n\n                if (v === positiveBtn) {\n                    onClick(dialog, DialogInterface.BUTTON_POSITIVE)\n                } else if (v === negativeBtn) {\n                    onClick(dialog, DialogInterface.BUTTON_NEGATIVE)\n                } else if (v === neutralBtn) {\n                    onClick(dialog, DialogInterface.BUTTON_NEUTRAL)\n                }\n            }\n        }\n\n        fun resetPositiveButton(dialog: DialogInterface) {\n            resetButton(dialog, DialogInterface.BUTTON_POSITIVE)\n        }\n\n        private fun resetButton(dialog: DialogInterface, which: Int) {\n            this.dialog = dialog\n            if (dialog is AlertDialog) {\n                dialog.getButton(which)\n            } else if (dialog is androidx.appcompat.app.AlertDialog) {\n                dialog.getButton(which)\n            } else {\n                null\n            }?.setOnClickListener(this)\n        }\n    }\n\n    override fun cancel() {\n    }\n\n    override fun dismiss() {\n    }\n}\n\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/ui/theme/Color.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.ui.theme\n\nimport androidx.compose.ui.graphics.Color\n\nval Purple80 = Color(0xFFD0BCFF)\nval PurpleGrey80 = Color(0xFFCCC2DC)\nval Pink80 = Color(0xFFEFB8C8)\n\nval Purple40 = Color(0xFF6650a4)\nval PurpleGrey40 = Color(0xFF625b71)\nval Pink40 = Color(0xFF7D5260)"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/ui/theme/Theme.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.ui.theme\n\nimport android.app.Activity\nimport android.os.Build\nimport androidx.compose.foundation.isSystemInDarkTheme\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compose.material3.darkColorScheme\nimport androidx.compose.material3.dynamicDarkColorScheme\nimport androidx.compose.material3.dynamicLightColorScheme\nimport androidx.compose.material3.lightColorScheme\nimport androidx.compose.runtime.Composable\nimport androidx.compose.ui.platform.LocalContext\n\nprivate val DarkColorScheme = darkColorScheme(\n    primary = Purple80,\n    secondary = PurpleGrey80,\n    tertiary = Pink80\n)\n\nprivate val LightColorScheme = lightColorScheme(\n    primary = Purple40,\n    secondary = PurpleGrey40,\n    tertiary = Pink40\n\n    /* Other default colors to override\n    background = Color(0xFFFFFBFE),\n    surface = Color(0xFFFFFBFE),\n    onPrimary = Color.White,\n    onSecondary = Color.White,\n    onTertiary = Color.White,\n    onBackground = Color(0xFF1C1B1F),\n    onSurface = Color(0xFF1C1B1F),\n    */\n)\n\n@Composable\nfun NexaDemoTheme(\n    darkTheme: Boolean = isSystemInDarkTheme(),\n    // Dynamic color is available on Android 12+\n    dynamicColor: Boolean = true,\n    content: @Composable () -> Unit\n) {\n    val colorScheme = when {\n        dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {\n            val context = LocalContext.current\n            if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)\n        }\n\n        darkTheme -> DarkColorScheme\n        else -> LightColorScheme\n    }\n\n    MaterialTheme(\n        colorScheme = colorScheme,\n        typography = Typography,\n        content = content\n    )\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/ui/theme/Type.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.ui.theme\n\nimport androidx.compose.material3.Typography\nimport androidx.compose.ui.text.TextStyle\nimport androidx.compose.ui.text.font.FontFamily\nimport androidx.compose.ui.text.font.FontWeight\nimport androidx.compose.ui.unit.sp\n\n// Set of Material typography styles to start with\nval Typography = Typography(\n    bodyLarge = TextStyle(\n        fontFamily = FontFamily.Default,\n        fontWeight = FontWeight.Normal,\n        fontSize = 16.sp,\n        lineHeight = 24.sp,\n        letterSpacing = 0.5.sp\n    )\n    /* Other default text styles to override\n    titleLarge = TextStyle(\n        fontFamily = FontFamily.Default,\n        fontWeight = FontWeight.Normal,\n        fontSize = 22.sp,\n        lineHeight = 28.sp,\n        letterSpacing = 0.sp\n    ),\n    labelSmall = TextStyle(\n        fontFamily = FontFamily.Default,\n        fontWeight = FontWeight.Medium,\n        fontSize = 11.sp,\n        lineHeight = 16.sp,\n        letterSpacing = 0.5.sp\n    )\n    */\n)"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/BugFixTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\n//package com.nexa.demo.utils\n//\n//import com.nexa.sdk.LlmWrapper\n//import com.nexa.sdk.bean.ChatMessage\n//import com.nexa.sdk.bean.LlmApplyChatTemplateOutput\n//import com.nexa.sdk.jni.LLmExt\n//import kotlinx.coroutines.Dispatchers\n//import kotlinx.coroutines.withContext\n//import kotlin.reflect.full.memberProperties\n//import kotlin.reflect.jvm.isAccessible\n//\n//class BugFixTest {\n//\n//    companion object {\n//        suspend fun applyChatTemplate(\n//            lLmExt: LLmExt,\n//            llmWrapper: LlmWrapper,\n//            messages: Array<ChatMessage>,\n//            tools: String?,\n//            enableThinking: Boolean\n//        ): Result<LlmApplyChatTemplateOutput> =\n//            withContext(Dispatchers.IO) {\n//                var handle = 0L\n//                llmWrapper::class.memberProperties.forEach {\n//                    if (it.name == \"handle\") {\n//                        it.isAccessible = true\n//                        handle = it.call(llmWrapper) as Long\n//                        return@forEach\n//                    }\n//                }\n//                if (handle == 0L) {\n//                    return@withContext Result.failure(IllegalStateException(\"LLM not initialized\"))\n//                }\n//                runCatching {\n//                    lLmExt.applyChatTemplateExt(handle, messages, tools, enableThinking)\n//                }\n//            }\n//    }\n//}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/ExecShell.java",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils;\n/**\n * Created by fuli.niu on 2016/8/19.\n */\n\nimport android.util.Log;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.util.ArrayList;\n\n/**\n * Created by fuli.niu 2016/8/19\n */\npublic class ExecShell {\n    private static String LOG_TAG = ExecShell.class.getName();\n\n    public enum SHELL_CMD {\n        check_su_binary(new String[]{\"/system/xbin/which\", \"su\"});\n        String[] command;\n\n        SHELL_CMD(String[] command) {\n            this.command = command;\n        }\n    }\n\n    public ArrayList<String> executeCommand(String[] commands) {\n        String line = null;\n        ArrayList<String> fullResponse = new ArrayList<String>();\n        Process localProcess = null;\n        try {\n            localProcess = Runtime.getRuntime().exec(commands);\n        } catch (Exception e) {\n            Log.e(\"nfl\",\"Command line execution failed\");\n            e.printStackTrace();\n            return null;\n        }\n        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(localProcess.getOutputStream()));\n        BufferedReader in = new BufferedReader(new InputStreamReader(localProcess.getInputStream()));\n        try {\n            while ((line = in.readLine()) != null) {\n                fullResponse.add(line);\n            }\n        } catch (Exception e) {\n            Log.e(\"nfl\", \"Command line result processing failed\");\n            e.printStackTrace();\n        }\n        return fullResponse;\n    }\n\n    public ArrayList<String> executeCommand(SHELL_CMD shellCmd) {\n        return executeCommand(shellCmd.command);\n    }\n}\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/ImgUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils;\n\nimport android.content.ContentValues\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.graphics.Canvas\nimport android.graphics.Matrix\nimport android.media.ExifInterface\nimport android.os.Build\nimport android.provider.MediaStore\nimport androidx.core.graphics.createBitmap\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.io.IOException\n\nclass ImgUtil {\n    companion object {\n        /** Downscale imageFile to maxSize on longest edge, rotate upright, save to outFile (JPEG/WebP), return result file */\n        fun downscaleAndSave(\n            imageFile: File,\n            outFile: File,\n            maxSize: Int = 448,\n            format: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG,\n            quality: Int = 90\n        ): File {\n            val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }\n            BitmapFactory.decodeFile(imageFile.absolutePath, bounds)\n\n            val inSample = run {\n                val (h, w) = bounds.outHeight to bounds.outWidth\n                var s = 1\n                var halfH = h / 2\n                var halfW = w / 2\n                while (halfH / s >= maxSize && halfW / s >= maxSize) s *= 2\n                s\n            }\n\n            val opts = BitmapFactory.Options().apply {\n                inJustDecodeBounds = false\n                inSampleSize = inSample\n                inPreferredConfig = Bitmap.Config.ARGB_8888\n            }\n            var bmp = BitmapFactory.decodeFile(imageFile.absolutePath, opts) ?: error(\"decode fail\")\n\n            val exif = ExifInterface(imageFile.absolutePath)\n            val orientation = exif.getAttributeInt(\n                ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL\n            )\n            val matrix = Matrix().apply {\n                when (orientation) {\n                    ExifInterface.ORIENTATION_ROTATE_90 -> postRotate(90f)\n                    ExifInterface.ORIENTATION_ROTATE_180 -> postRotate(180f)\n                    ExifInterface.ORIENTATION_ROTATE_270 -> postRotate(270f)\n                    ExifInterface.ORIENTATION_FLIP_HORIZONTAL -> postScale(-1f, 1f)\n                    ExifInterface.ORIENTATION_FLIP_VERTICAL -> postScale(1f, -1f)\n                    ExifInterface.ORIENTATION_TRANSPOSE -> {\n                        postRotate(90f); postScale(-1f, 1f)\n                    }\n\n                    ExifInterface.ORIENTATION_TRANSVERSE -> {\n                        postRotate(270f); postScale(-1f, 1f)\n                    }\n                }\n            }\n            if (!matrix.isIdentity) {\n                val rotated = Bitmap.createBitmap(bmp, 0, 0, bmp.width, bmp.height, matrix, true)\n                if (rotated !== bmp) {\n                    bmp.recycle(); bmp = rotated\n                }\n            }\n\n            val scale = maxOf(bmp.width, bmp.height).toFloat() / maxSize\n            val targetW = (bmp.width / scale).toInt().coerceAtLeast(1)\n            val targetH = (bmp.height / scale).toInt().coerceAtLeast(1)\n            val resized = if (bmp.width != targetW || bmp.height != targetH)\n                Bitmap.createScaledBitmap(bmp, targetW, targetH, true) else bmp\n            if (resized !== bmp) bmp.recycle()\n\n            // 6) Re-compress and save to outFile (this step actually reduces file size)\n            FileOutputStream(outFile).use { fos ->\n                resized.compress(format, quality, fos)\n            }\n            if (!resized.isRecycled) resized.recycle()\n            return outFile\n        }\n\n        fun squareCrop(imageFile: File, outFile: File, size: Int = 448): File {\n            val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }\n            BitmapFactory.decodeFile(imageFile.absolutePath, bounds)\n\n            val options = BitmapFactory.Options().apply {\n                inSampleSize = 1\n                inJustDecodeBounds = false\n            }\n            val bitmap = BitmapFactory.decodeFile(imageFile.absolutePath, options)\n            val cropped = createBitmap(size, size)\n            val canvas = Canvas(cropped)\n            canvas.drawBitmap(\n                bitmap,\n                (size - bitmap.width).toFloat() / 2,\n                (size - bitmap.height).toFloat() / 2,\n                null\n            )\n            if (!bitmap.isRecycled) bitmap.recycle()\n            FileOutputStream(outFile).use { fos ->\n                cropped.compress(Bitmap.CompressFormat.JPEG, 100, fos)\n            }\n            if (!cropped.isRecycled) cropped.recycle()\n            return outFile\n        }\n\n        fun saveImageToGallery(context: Context, imgPath: String) {\n            saveImageToGallery(context, BitmapFactory.decodeFile(imgPath))\n        }\n\n        fun saveImageToGallery(context: Context, file: File) {\n            saveImageToGallery(context, BitmapFactory.decodeFile(file.absolutePath))\n        }\n\n        fun saveImageToGallery(context: Context, bitmap: Bitmap) {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n                val resolver = context.contentResolver\n                val contentValues = ContentValues().apply {\n                    put(MediaStore.MediaColumns.DISPLAY_NAME, \"Image_${System.currentTimeMillis()}.jpg\")\n                    put(MediaStore.MediaColumns.MIME_TYPE, \"image/jpeg\")\n                    put(MediaStore.MediaColumns.RELATIVE_PATH, \"Pictures/Saved Images\")\n                }\n\n                val uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues)\n                uri?.let {\n                    resolver.openOutputStream(it).use { outputStream ->\n                        if (!bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream!!)) {\n                            // throw IOException(\"Unable to save image\")\n                        }\n                        outputStream.close()\n                    }\n                }\n            } else {\n                // Old Android save method\n                // Please implement according to your needs\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/KeyboardUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.content.Context\nimport android.view.inputmethod.InputMethodManager\nimport android.widget.EditText\n\nclass KeyboardUtil {\n    companion object {\n        fun hide(editText: EditText) {\n            val context = editText.context\n            val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager\n            imm.hideSoftInputFromWindow(editText.windowToken, 0)\n        }\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/KotlinUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.app.Activity\nimport android.app.Dialog\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.Lifecycle\nimport androidx.lifecycle.LifecycleObserver\nimport androidx.lifecycle.OnLifecycleEvent\nimport androidx.viewbinding.ViewBinding\nimport kotlin.properties.ReadOnlyProperty\nimport kotlin.reflect.KProperty\n\nclass KotlinUtil {\n    companion object {\n        const val TAG = \"KotlinUtil\"\n    }\n}\n\ninline fun <reified VB : ViewBinding> Activity.inflate() =\n    lazy(LazyThreadSafetyMode.NONE) {\n        inflateBinding<VB>(layoutInflater).apply { setContentView(root) }\n    }\n\ninline fun <T : ViewBinding> Activity.viewBinding(crossinline bindingInflater: (LayoutInflater) -> T) =\n    lazy(LazyThreadSafetyMode.NONE) {\n        val invoke = bindingInflater.invoke(layoutInflater)\n        setContentView(invoke.root) //可选\n        invoke\n    }\n\ninline fun <reified VB : ViewBinding> Dialog.inflate() = lazy {\n    inflateBinding<VB>(layoutInflater).apply { setContentView(root) }\n}\n\n@Suppress(\"UNCHECKED_CAST\")\ninline fun <reified VB : ViewBinding> inflateBinding(layoutInflater: LayoutInflater) =\n    VB::class.java.getMethod(\"inflate\", LayoutInflater::class.java)\n        .invoke(null, layoutInflater) as VB\n\ninline fun <reified VB : ViewBinding> Fragment.bindView() =\n    FragmentBindingDelegate(VB::class.java)\n\nclass FragmentBindingDelegate<VB : ViewBinding>(private val clazz: Class<VB>) :\n    ReadOnlyProperty<Fragment, VB> {\n\n    private var isInitialized = false\n    private var _binding: VB? = null\n    private val binding: VB get() = _binding!!\n\n    override fun getValue(thisRef: Fragment, property: KProperty<*>): VB {\n        if (!isInitialized) {\n            thisRef.viewLifecycleOwner.lifecycle.addObserver(object : LifecycleObserver {\n                @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)\n                fun onDestroyView() {\n                    Log.d(KotlinUtil.TAG, \"KotlinUtil.FragmentBindingDelegate.ON_DESTROY $thisRef\")\n                    _binding = null\n                }\n            })\n            _binding = clazz.getMethod(\"bind\", View::class.java)\n                .invoke(null, thisRef.view) as VB\n            isInitialized = true\n        } else {\n            if (_binding == null) {\n                _binding = clazz.getMethod(\"bind\", View::class.java)\n                    .invoke(null, thisRef.view) as VB\n            }\n        }\n        return binding\n    }\n}\n\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/MD5Utils.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport java.io.File\nimport java.io.FileInputStream\nimport java.io.IOException\nimport java.io.RandomAccessFile\nimport java.lang.Long\nimport java.security.MessageDigest\nimport java.util.Locale\nimport java.util.zip.CRC32\nimport kotlin.ByteArray\nimport kotlin.CharArray\nimport kotlin.Exception\nimport kotlin.Int\nimport kotlin.String\nimport kotlin.Throws\nimport kotlin.also\nimport kotlin.math.max\nimport kotlin.math.min\nimport kotlin.text.uppercase\n\n\nclass MD5Utils {\n    companion object {\n        private val HEX_ARRAY: CharArray = \"0123456789ABCDEF\".toCharArray()\n\n        fun bytesToHex(bytes: ByteArray?): String? {\n            if (bytes == null) return null\n\n            val hexChars = CharArray(bytes.size * 2)\n            for (i in bytes.indices) {\n                val v = bytes[i].toInt() and 0xFF\n                hexChars[i * 2] = HEX_ARRAY[v ushr 4]\n                hexChars[i * 2 + 1] = HEX_ARRAY[v and 0x0F]\n            }\n            return String(hexChars)\n        }\n\n        fun getFileMD5(file: File): String? {\n            try {\n                val md5 = MessageDigest.getInstance(\"MD5\")\n                val fis = FileInputStream(file)\n                val buffer = ByteArray(1024)\n                var length: Int\n                while ((fis.read(buffer).also { length = it }) != -1) {\n                    md5.update(buffer, 0, length)\n                }\n                fis.close()\n                val digest = md5.digest()\n                val sb = StringBuilder()\n                for (b in digest) {\n                    sb.append(Integer.toHexString((b.toInt() and 0xFF) or 0x100).substring(1, 3))\n                }\n                return sb.toString().uppercase(Locale.getDefault())\n            } catch (e: Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n\n        fun getFileSHA256(file: File): String? {\n            try {\n                val digest = MessageDigest.getInstance(\"SHA-256\")\n                val fis = FileInputStream(file)\n                val buffer = ByteArray(1024)\n                var length: Int\n                while ((fis.read(buffer).also { length = it }) != -1) {\n                    digest.update(buffer, 0, length)\n                }\n                fis.close()\n                val hash = digest.digest()\n\n                val hexString = java.lang.StringBuilder()\n                for (b in hash) {\n                    val hex = Integer.toHexString(0xff and b.toInt())\n                    if (hex.length == 1) hexString.append('0')\n                    hexString.append(hex)\n                }\n                return hexString.toString()\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n\n        fun getFileCRC32(file: File): String? {\n            try {\n                val crc32 = CRC32()\n                val fis = FileInputStream(file)\n                val buffer = ByteArray(1024)\n                var length: Int\n                while ((fis.read(buffer).also { length = it }) != -1) {\n                    crc32.update(buffer, 0, length)\n                }\n                fis.close()\n                val value = crc32.value\n                return Long.toHexString(value).uppercase(Locale.getDefault())\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n\n        fun getQuickCRC32(file: File): kotlin.Long {\n            try {\n                val crc32 = CRC32()\n                val raf = RandomAccessFile(file, \"r\")\n                val fileSize = raf.length()\n                val buffer = ByteArray(1024 * 1024)\n\n                // start\n                raf.seek(0)\n                var read = raf.read(buffer)\n                if (read > 0) crc32.update(buffer, 0, read)\n\n                // middle\n                if (fileSize > 2 * buffer.size) {\n                    raf.seek(fileSize / 2)\n                    read = raf.read(buffer)\n                    if (read > 0) crc32.update(buffer, 0, read)\n                }\n\n                // end\n                if (fileSize > buffer.size) {\n                    raf.seek(fileSize - buffer.size)\n                    read = raf.read(buffer)\n                    if (read > 0) crc32.update(buffer, 0, read)\n                }\n\n                raf.close()\n                return crc32.getValue()\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return -1\n            }\n        }\n\n        @Throws(IOException::class)\n        fun getFilePartialHash(file: File, partSize: kotlin.Long): String? {\n            val fileLength = file.length()\n            if (fileLength < partSize * 3) {\n                return getFileSHA256(file)\n            }\n            val digest = MessageDigest.getInstance(\"SHA-256\")\n            val fis = FileInputStream(file)\n            val buffer = ByteArray(8192)\n\n            // read start\n            var bytesRead: kotlin.Long = 0\n            while (bytesRead < partSize) {\n                val length =\n                    fis.read(buffer, 0, min(buffer.size.toLong(), partSize - bytesRead).toInt())\n                if (length == -1) break\n                digest.update(buffer, 0, length)\n                bytesRead += length.toLong()\n            }\n\n            // read middle\n            val middleStart = (fileLength - partSize) / 2\n            fis.getChannel().position(middleStart)\n            bytesRead = 0\n            while (bytesRead < partSize) {\n                val length =\n                    fis.read(buffer, 0, min(buffer.size.toLong(), partSize - bytesRead).toInt())\n                if (length == -1) break\n                digest.update(buffer, 0, length)\n                bytesRead += length.toLong()\n            }\n\n            // read end\n            fis.getChannel().position(fileLength - partSize)\n            bytesRead = 0\n            while (bytesRead < partSize) {\n                val length =\n                    fis.read(buffer, 0, min(buffer.size.toLong(), partSize - bytesRead).toInt())\n                if (length == -1) break\n                digest.update(buffer, 0, length)\n                bytesRead += length.toLong()\n            }\n\n            fis.close()\n            return bytesToHex(digest.digest())\n        }\n\n        fun getPartialFileHash(file: File, sampleCount: Int): String? {\n            try {\n                val digest = MessageDigest.getInstance(\"SHA-256\")\n                val raf = RandomAccessFile(file, \"r\")\n                val fileSize = raf.length()\n\n                for (i in 0..<sampleCount) {\n                    val position = (fileSize * i) / sampleCount\n                    raf.seek(position)\n\n                    val buffer = ByteArray(4096)\n                    val bytesRead = raf.read(buffer)\n                    if (bytesRead > 0) {\n                        digest.update(buffer, 0, bytesRead)\n                    }\n                }\n\n                raf.seek(0)\n                val header = ByteArray(1024)\n                val headerRead = raf.read(header)\n                if (headerRead > 0) digest.update(header, 0, headerRead)\n\n                raf.seek(max(0, fileSize - 1024))\n                val footer = ByteArray(1024)\n                val footerRead = raf.read(footer)\n                if (footerRead > 0) digest.update(footer, 0, footerRead)\n\n                raf.close()\n                return bytesToHex(digest.digest())\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/ModelFileListingUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.util.Log\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.withContext\nimport okhttp3.OkHttpClient\nimport okhttp3.Request\nimport org.json.JSONArray\nimport org.xmlpull.v1.XmlPullParser\nimport org.xmlpull.v1.XmlPullParserFactory\nimport java.io.StringReader\n\n/**\n * Utility class to list and download model files from S3 or Hugging Face Hub.\n * Provides fallback mechanism: tries S3 first, then falls back to HF if S3 fails.\n */\nobject ModelFileListingUtil {\n    private const val TAG = \"ModelFileListingUtil\"\n    private const val HF_OWNER = \"NexaAI\"\n\n    /**\n     * Result of file listing operation\n     */\n    data class FileListResult(\n        val files: List<String>,\n        val source: Source,\n        val repoId: String? = null  // Only set for HF source\n    ) {\n        enum class Source { S3, HUGGINGFACE, FAILED }\n    }\n\n    /**\n     * Represents a downloadable file with both S3 and HF URLs\n     */\n    data class DownloadableFileWithFallback(\n        val fileName: String,\n        val s3Url: String,\n        val hfUrl: String\n    )\n\n    /**\n     * Extracts repo name from S3 URL.\n     * \n     * Examples:\n     * - https://...../embeddinggemma-300m-npu-mobile/ -> embeddinggemma-300m-npu-mobile\n     * - https://...../LFM2-1.2B-GGUF/LFM2-1.2B-Q4_0.gguf -> LFM2-1.2B-GGUF\n     */\n    fun extractRepoNameFromS3Url(s3Url: String): String {\n        val path = s3Url.removePrefix(\"https://\").removePrefix(\"http://\")\n            .substringAfter(\"/\")  // Remove host\n            .trimEnd('/')\n        \n        val segments = path.split(\"/\").filter { it.isNotEmpty() }\n        \n        // Check if last segment is a file (has extension)\n        return if (segments.isNotEmpty()) {\n            val lastSegment = segments.last()\n            if (lastSegment.contains(\".\") && !lastSegment.endsWith(\"/\")) {\n                // It's a file, get the parent directory name\n                if (segments.size >= 2) segments[segments.size - 2] else lastSegment\n            } else {\n                // It's a directory\n                lastSegment\n            }\n        } else {\n            \"\"\n        }\n    }\n\n    /**\n     * Constructs HF repo ID from S3 URL.\n     * @return repo ID in format \"NexaAI/{repo_name}\"\n     */\n    fun getHfRepoId(s3Url: String): String {\n        val repoName = extractRepoNameFromS3Url(s3Url)\n        return \"$HF_OWNER/$repoName\"\n    }\n\n    /**\n     * Constructs HF download URL for a file.\n     * @param repoId HF repo ID (e.g., \"NexaAI/embeddinggemma-300m-npu-mobile\")\n     * @param fileName File name to download\n     * @return Full HF download URL\n     */\n    fun getHfDownloadUrl(repoId: String, fileName: String): String {\n        return \"https://huggingface.co/$repoId/resolve/main/$fileName?download=true\"\n    }\n\n    /**\n     * Lists all files under a given S3 base URL, with fallback to Hugging Face.\n     *\n     * @param baseUrl The S3 base URL\n     * @param client OkHttpClient instance\n     * @return FileListResult containing files and source information\n     */\n    suspend fun listFilesWithFallback(\n        baseUrl: String,\n        client: OkHttpClient\n    ): FileListResult = withContext(Dispatchers.IO) {\n        // Try S3 first\n        val s3Files = listFilesFromS3(baseUrl, client)\n        if (s3Files.isNotEmpty()) {\n            Log.d(TAG, \"Successfully listed ${s3Files.size} files from S3\")\n            return@withContext FileListResult(s3Files, FileListResult.Source.S3)\n        }\n\n        // Fallback to Hugging Face\n        Log.w(TAG, \"S3 listing failed, falling back to Hugging Face\")\n        val repoId = getHfRepoId(baseUrl)\n        val hfFiles = listFilesFromHuggingFace(repoId, client)\n        if (hfFiles.isNotEmpty()) {\n            Log.d(TAG, \"Successfully listed ${hfFiles.size} files from HuggingFace: $repoId\")\n            return@withContext FileListResult(hfFiles, FileListResult.Source.HUGGINGFACE, repoId)\n        }\n\n        Log.e(TAG, \"Failed to list files from both S3 and HuggingFace\")\n        FileListResult(emptyList(), FileListResult.Source.FAILED)\n    }\n\n    /**\n     * Lists all files under a given S3 base URL.\n     */\n    suspend fun listFilesFromS3(baseUrl: String, client: OkHttpClient): List<String> = withContext(Dispatchers.IO) {\n        try {\n            val urlWithoutProtocol = baseUrl.removePrefix(\"https://\").removePrefix(\"http://\")\n            val hostEndIndex = urlWithoutProtocol.indexOf('/')\n            if (hostEndIndex == -1) {\n                Log.e(TAG, \"Invalid S3 URL format: $baseUrl\")\n                return@withContext emptyList()\n            }\n\n            val host = urlWithoutProtocol.substring(0, hostEndIndex)\n            val prefix = urlWithoutProtocol.substring(hostEndIndex + 1).trimEnd('/')\n\n            val listUrl = \"https://$host/?list-type=2&prefix=$prefix/\"\n            Log.d(TAG, \"Listing S3 bucket: $listUrl\")\n\n            val request = Request.Builder()\n                .url(listUrl)\n                .get()\n                .build()\n\n            val response = client.newCall(request).execute()\n            if (!response.isSuccessful) {\n                Log.e(TAG, \"Failed to list S3 bucket: ${response.code}\")\n                return@withContext emptyList()\n            }\n\n            val xmlContent = response.body?.string() ?: return@withContext emptyList()\n            Log.d(TAG, \"S3 response received, parsing XML...\")\n\n            val files = parseS3ListResponse(xmlContent, prefix)\n            Log.d(TAG, \"Found ${files.size} files from S3: $files\")\n            files\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error listing S3 files: ${e.message}\", e)\n            emptyList()\n        }\n    }\n\n    /**\n     * Lists all files from a Hugging Face repository.\n     * \n     * @param repoId HF repo ID (e.g., \"NexaAI/embeddinggemma-300m-npu-mobile\")\n     * @param client OkHttpClient instance\n     * @return List of file names in the repository\n     */\n    suspend fun listFilesFromHuggingFace(repoId: String, client: OkHttpClient): List<String> = withContext(Dispatchers.IO) {\n        try {\n            // HF API endpoint to list files in a repo\n            val apiUrl = \"https://huggingface.co/api/models/$repoId/tree/main\"\n            Log.d(TAG, \"Listing HuggingFace repo: $apiUrl\")\n\n            val request = Request.Builder()\n                .url(apiUrl)\n                .get()\n                .build()\n\n            val response = client.newCall(request).execute()\n            if (!response.isSuccessful) {\n                Log.e(TAG, \"Failed to list HuggingFace repo: ${response.code}\")\n                return@withContext emptyList()\n            }\n\n            val jsonContent = response.body?.string() ?: return@withContext emptyList()\n            Log.d(TAG, \"HuggingFace response received, parsing JSON...\")\n\n            val files = parseHuggingFaceResponse(jsonContent)\n            Log.d(TAG, \"Found ${files.size} files from HuggingFace: $files\")\n            files\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error listing HuggingFace files: ${e.message}\", e)\n            emptyList()\n        }\n    }\n\n    /**\n     * Parses the S3 ListObjectsV2 XML response and extracts file names.\n     */\n    private fun parseS3ListResponse(xmlContent: String, prefix: String): List<String> {\n        val files = mutableListOf<String>()\n        try {\n            val factory = XmlPullParserFactory.newInstance()\n            factory.isNamespaceAware = false\n            val parser = factory.newPullParser()\n            parser.setInput(StringReader(xmlContent))\n\n            var eventType = parser.eventType\n            var currentTag = \"\"\n            val prefixWithSlash = if (prefix.endsWith(\"/\")) prefix else \"$prefix/\"\n\n            while (eventType != XmlPullParser.END_DOCUMENT) {\n                when (eventType) {\n                    XmlPullParser.START_TAG -> {\n                        currentTag = parser.name\n                    }\n                    XmlPullParser.TEXT -> {\n                        if (currentTag == \"Key\") {\n                            val key = parser.text\n                            if (key.startsWith(prefixWithSlash) && key.length > prefixWithSlash.length) {\n                                val relativePath = key.removePrefix(prefixWithSlash)\n                                if (!relativePath.endsWith(\"/\") && relativePath.isNotEmpty()) {\n                                    files.add(relativePath)\n                                }\n                            }\n                        }\n                    }\n                    XmlPullParser.END_TAG -> {\n                        currentTag = \"\"\n                    }\n                }\n                eventType = parser.next()\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error parsing S3 XML response: ${e.message}\", e)\n        }\n        return files\n    }\n\n    /**\n     * Parses the Hugging Face API JSON response and extracts file names.\n     * The response is an array of objects with \"path\" and \"type\" fields.\n     */\n    private fun parseHuggingFaceResponse(jsonContent: String): List<String> {\n        val files = mutableListOf<String>()\n        try {\n            val jsonArray = JSONArray(jsonContent)\n            for (i in 0 until jsonArray.length()) {\n                val item = jsonArray.getJSONObject(i)\n                val type = item.optString(\"type\", \"\")\n                val path = item.optString(\"path\", \"\")\n                \n                // Only include files, not directories\n                if (type == \"file\" && path.isNotEmpty()) {\n                    files.add(path)\n                }\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error parsing HuggingFace JSON response: ${e.message}\", e)\n        }\n        return files\n    }\n\n    /**\n     * Builds downloadable file entries with both S3 and HF fallback URLs.\n     * \n     * @param baseUrl S3 base URL\n     * @param fileNames List of file names to download\n     * @return List of DownloadableFileWithFallback entries\n     */\n    fun buildDownloadableFilesWithFallback(\n        baseUrl: String,\n        fileNames: List<String>\n    ): List<DownloadableFileWithFallback> {\n        val repoId = getHfRepoId(baseUrl)\n        return fileNames.map { fileName ->\n            val s3Url = if (baseUrl.endsWith(\"/\")) \"$baseUrl$fileName\" else \"$baseUrl/$fileName\"\n            val hfUrl = getHfDownloadUrl(repoId, fileName)\n            DownloadableFileWithFallback(fileName, s3Url, hfUrl)\n        }\n    }\n\n    /**\n     * Gets the HF download URL for a specific .gguf file from its S3 URL.\n     * Used for non-NPU models that have direct file URLs.\n     * \n     * @param s3FileUrl Full S3 URL to the .gguf file\n     * @return HF download URL for the same file\n     */\n    fun getHfUrlForGgufFile(s3FileUrl: String): String {\n        val repoId = getHfRepoId(s3FileUrl)\n        val fileName = s3FileUrl.substringAfterLast(\"/\")\n        return getHfDownloadUrl(repoId, fileName)\n    }\n}\n"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/PermissionUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.Manifest\nimport android.content.Context\nimport android.content.DialogInterface\nimport android.content.DialogInterface.BUTTON_POSITIVE\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.net.Uri\nimport android.os.Build\nimport android.os.Environment\nimport android.provider.Settings\nimport androidx.activity.ComponentActivity\nimport androidx.activity.result.contract.ActivityResultContracts\nimport androidx.appcompat.app.AlertDialog\nimport androidx.core.content.ContextCompat\n\nclass PermissionUtil {\n    companion object {\n\n        fun requestManageStoragePermission(activity: ComponentActivity) {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n                try {\n                    val intent =\n                        Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION)\n                    intent.data = Uri.parse(\"package:${activity.packageName}\")\n                    activity.startActivity(intent)\n                } catch (e: Exception) {\n                    val intent =\n                        Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION)\n                    activity.startActivity(intent)\n                }\n            } else {\n                activity.registerForActivityResult(\n                    ActivityResultContracts.RequestPermission()\n                ) {}\n            }\n        }\n\n        fun showRequestManageStoragePermissionDialog(activity: ComponentActivity) {\n            val onClickListener = DialogInterface.OnClickListener { dialog, which ->\n                when (which) {\n                    BUTTON_POSITIVE -> {\n                        requestManageStoragePermission(activity = activity)\n                    }\n\n                    else -> {}\n                }\n                dialog?.dismiss()\n            }\n            AlertDialog.Builder(activity)\n                .setMessage(\"Index files need MANAGE_EXTERNAL_STORAGE permission, please agree it.\")\n                .setNegativeButton(\"cancel\", onClickListener)\n                .setPositiveButton(\"sure\", onClickListener)\n                .show()\n        }\n\n        fun checkManageStoragePermission(context: Context): Boolean {\n            return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n                Environment.isExternalStorageManager()\n            } else {\n                ContextCompat.checkSelfPermission(\n                    context,\n                    Manifest.permission.WRITE_EXTERNAL_STORAGE\n                ) == PackageManager.PERMISSION_GRANTED\n            }\n        }\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/SharePreferenceKeys.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nclass SharePreferenceKeys {\n    companion object {\n        const val KEY_LAST_LOAD_MODEL_ID = \"last_load_model_id\"\n        /**\n         * When navigation pops, since it will load the initial modelId, cannot directly load model,\n         * should let MainChatScreen load it\n         */\n        const val KEY_PREPARE_LOAD_MODEL_ID = \"prepare_load_model_id\"\n        const val KEY_SHOW_OPERATION_POPUP = \"show_operation_popup\"\n    }\n    enum class FileName(val fileName: String) {\n        ModelDownloadState(\"mode_download_state\"),\n        CommonConfig(\"common_config\")\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/java/com/nexa/demo/utils/WavRecorder.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils;\n\nimport android.Manifest\nimport android.media.AudioFormat\nimport android.media.AudioRecord\nimport android.media.MediaRecorder\nimport android.media.audiofx.Visualizer\nimport android.media.audiofx.Visualizer.OnDataCaptureListener\nimport android.util.Log\nimport androidx.annotation.RequiresPermission\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.io.RandomAccessFile\nimport kotlin.math.log10\n\n\nclass WavRecorder(\n    private val sampleRate: Int = 16000,\n    private val channelConfig: Int = AudioFormat.CHANNEL_IN_MONO,\n    private val audioFormat: Int = AudioFormat.ENCODING_PCM_16BIT,\n    private val maxDurationMs: Long = MAX_DURATION_MINUTE * 1000L,\n    private val onVolumeDbChangeListener: OnVolumeDbChangeListener = object :\n        OnVolumeDbChangeListener {\n        override fun onVolumeDbChange(volumeDb: Double) {\n        }\n    },\n    private val onMaxDurationReached: (() -> Unit)? = null\n) {\n    private var recorder: AudioRecord? = null\n    @Volatile\n    private var isRecording = false\n    private var recordingThread: Thread? = null\n    private var visualizer: Visualizer? = null\n\n    companion object {\n        const val MAX_DURATION_MINUTE = 20\n    }\n\n    @RequiresPermission(Manifest.permission.RECORD_AUDIO)\n    fun startRecording(outputFile: File) {\n        val minBuffer = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)\n        recorder = AudioRecord(\n            MediaRecorder.AudioSource.MIC,\n            sampleRate,\n            channelConfig,\n            audioFormat,\n            minBuffer\n        )\n\n        recorder?.startRecording()\n        isRecording = true\n\n        recordingThread = Thread {\n            writePcmToWav(outputFile, minBuffer)\n        }.apply { start() }\n    }\n\n    fun stopRecording() {\n        isRecording = false\n        try {\n            recorder?.stop()\n            recorder?.release()\n            visualizer?.enabled = false\n            visualizer?.release()\n        } catch (_: Exception) {\n        }\n        recorder = null\n        recordingThread = null\n        visualizer = null\n    }\n\n    private fun writePcmToWav(outputFile: File, bufferSize: Int) {\n        val data = ByteArray(bufferSize)\n        var totalAudioLen: Long = 0\n        val startTime = System.currentTimeMillis()\n        FileOutputStream(outputFile).use { fos ->\n            writeWavHeader(fos, sampleRate, 1, 16, 0)\n            var nowTime = System.currentTimeMillis()\n            while (isRecording) {\n                val currentTime = System.currentTimeMillis()\n                val elapsedTime = currentTime - startTime\n                \n                // Check if maximum duration is reached\n                if (elapsedTime >= maxDurationMs) {\n                    onMaxDurationReached?.invoke()\n                    break\n                }\n                \n                val read = recorder?.read(data, 0, data.size) ?: 0\n                if (read > 0) {\n                    fos.write(data, 0, read)\n                    totalAudioLen += read\n                    // Process audio decibels\n                    // Calculate sum of squares\n                    val lastTime = System.currentTimeMillis()\n                    if (lastTime - nowTime > 60) {\n                        var sum: Long = 0\n                        for (i in 0..<read) {\n                            sum += data[i] * data[i]\n                        }\n                        // Calculate average and convert to decibels\n                        val mean = sum / read.toDouble()\n                        val volumeDb = 10 * log10(mean)\n                        onVolumeDbChangeListener.onVolumeDbChange(volumeDb)\n                        nowTime = lastTime\n                    }\n                }\n            }\n            // Fill back header\n            updateWavHeader(outputFile, totalAudioLen, sampleRate, 1, 16)\n        }\n    }\n\n    private fun writeWavHeader(\n        out: FileOutputStream, sampleRate: Int, channels: Int,\n        bitsPerSample: Int, dataSize: Long\n    ) {\n        val byteRate = sampleRate * channels * bitsPerSample / 8\n        val totalDataLen = 36 + dataSize\n        val header = ByteArray(44)\n\n        fun putLE(value: Long, offset: Int) {\n            header[offset] = (value and 0xff).toByte()\n            header[offset + 1] = ((value shr 8) and 0xff).toByte()\n            header[offset + 2] = ((value shr 16) and 0xff).toByte()\n            header[offset + 3] = ((value shr 24) and 0xff).toByte()\n        }\n\n        // ChunkID \"RIFF\"\n        header[0] = 'R'.code.toByte(); header[1] = 'I'.code.toByte()\n        header[2] = 'F'.code.toByte(); header[3] = 'F'.code.toByte()\n        putLE(totalDataLen, 4)\n\n        // Format \"WAVE\"\n        header[8] = 'W'.code.toByte(); header[9] = 'A'.code.toByte()\n        header[10] = 'V'.code.toByte(); header[11] = 'E'.code.toByte()\n\n        // Subchunk1 \"fmt \"\n        header[12] = 'f'.code.toByte(); header[13] = 'm'.code.toByte()\n        header[14] = 't'.code.toByte(); header[15] = ' '.code.toByte()\n        putLE(16, 16) // Subchunk1 size\n        header[20] = 1; header[21] = 0 // PCM\n        header[22] = channels.toByte(); header[23] = 0\n        putLE(sampleRate.toLong(), 24)\n        putLE(byteRate.toLong(), 28)\n        header[32] = (channels * bitsPerSample / 8).toByte(); header[33] = 0\n        header[34] = bitsPerSample.toByte(); header[35] = 0\n\n        // Subchunk2 \"data\"\n        header[36] = 'd'.code.toByte(); header[37] = 'a'.code.toByte()\n        header[38] = 't'.code.toByte(); header[39] = 'a'.code.toByte()\n        putLE(dataSize, 40)\n\n        out.write(header, 0, 44)\n    }\n\n    private fun updateWavHeader(\n        wavFile: File, dataSize: Long,\n        sampleRate: Int, channels: Int, bitsPerSample: Int\n    ) {\n        val totalDataLen = 36 + dataSize\n        val byteRate = sampleRate * channels * bitsPerSample / 8\n\n        RandomAccessFile(wavFile, \"rw\").use { raf ->\n            fun putLE(offset: Long, value: Long) {\n                raf.seek(offset)\n                raf.write(\n                    byteArrayOf(\n                        (value and 0xff).toByte(),\n                        ((value shr 8) and 0xff).toByte(),\n                        ((value shr 16) and 0xff).toByte(),\n                        ((value shr 24) and 0xff).toByte()\n                    )\n                )\n            }\n            putLE(4, totalDataLen)\n            putLE(40, dataSize)\n        }\n    }\n\n    @Deprecated(\"Has issues, temporarily using decibel solution\")\n    private fun initVisualizer(audioSessionId: Int) {\n        val captureSize = Visualizer.getCaptureSizeRange()[1]\n        visualizer = Visualizer(audioSessionId)\n        visualizer!!.captureSize = captureSize\n        visualizer!!.setDataCaptureListener(\n            object : OnDataCaptureListener {\n                override fun onWaveFormDataCapture(\n                    visualizer: Visualizer?,\n                    waveform: ByteArray?,\n                    samplingRate: Int\n                ) {\n                    // Process waveform data\n                    waveform?.let {\n                        val size = it.size.coerceAtMost(100)\n                        for (i in 0 until size) {\n                            Log.d(\"nfl\", \"$i : ${it[i]}\")\n                        }\n                    }\n                }\n\n                override fun onFftDataCapture(\n                    visualizer: Visualizer?,\n                    fft: ByteArray?,\n                    samplingRate: Int\n                ) {\n                    // Process FFT data\n                }\n            },\n            Visualizer.getMaxCaptureRate() / 2,\n            true,\n            true\n        )\n        visualizer!!.enabled = true\n    }\n\n    interface OnVolumeDbChangeListener {\n        /**\n         * Current decibel value, typically 30~90\n         */\n        fun onVolumeDbChange(volumeDb: Double)\n    }\n}"
  },
  {
    "path": "bindings/android/app/src/main/res/color/btn_enable_color.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"#1F1F1F\" android:state_enabled=\"true\" />\n    <item android:color=\"#ADADAD\" android:state_enabled=\"false\" />\n</selector>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/bg_ai_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#DBEAEB\"/>\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/bg_audio_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"120dp\"\n    android:height=\"54dp\"\n    android:viewportWidth=\"120\"\n    android:viewportHeight=\"54\"\n    >\n    <group>\n        <clip-path\n            android:pathData=\"M16 0H104C112.837 0 120 7.16344 120 16V38C120 46.8366 112.837 54 104 54H16C7.16344 54 0 46.8366 0 38V16C0 7.16344 7.16344 0 16 0Z\"\n            />\n        <path\n            android:pathData=\"M16 0H104C112.837 0 120 7.16344 120 16V38C120 46.8366 112.837 54 104 54H16C7.16344 54 0 46.8366 0 38V16C0 7.16344 7.16344 0 16 0Z\"\n            android:strokeWidth=\"2\"\n            android:strokeColor=\"#E7E7E7\"\n            />\n    </group>\n</vector>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/bg_input_box_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#ffffff\" />\n    <corners\n        android:topLeftRadius=\"24dp\"\n        android:topRightRadius=\"24dp\"\n        android:bottomLeftRadius=\"0dp\"\n        android:bottomRightRadius=\"0dp\" />\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/bg_user_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#DBEAEB\"/>\n    <corners android:radius=\"16dp\"/>\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/btn_rounded_black_bg_18.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"18dp\" />\n    <solid android:color=\"#454545\" />\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/btn_rounded_border.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"12dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#454545\" />\n    <solid android:color=\"#FFFFFFFF\" />\n    <padding\n        android:left=\"2dp\"\n        android:top=\"0dp\"\n        android:right=\"2dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/btn_rounded_border_18.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"18dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#454545\" />\n    <solid android:color=\"#FFFFFFFF\" />\n    <padding\n        android:left=\"2dp\"\n        android:top=\"0dp\"\n        android:right=\"2dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/btn_rounded_border_gray.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"12dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#E7E7E7\" />\n    <solid android:color=\"#FCFCFC\" />\n    <padding\n        android:left=\"0dp\"\n        android:top=\"0dp\"\n        android:right=\"0dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillColor=\"#3DDC84\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n</vector>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path android:pathData=\"M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"85.84757\"\n                android:endY=\"92.4963\"\n                android:startX=\"42.9492\"\n                android:startY=\"49.59793\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z\"\n        android:strokeWidth=\"1\"\n        android:strokeColor=\"#00000000\" />\n</vector>"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/icon_back.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M8,15L1,8M1,8L8,1M1,8H15\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"2\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/icon_close.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"14dp\"\n    android:height=\"14dp\"\n    android:viewportWidth=\"14\"\n    android:viewportHeight=\"14\">\n  <path\n      android:pathData=\"M13,1L1,13M1,1L13,13\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"2\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/icon_database.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M14,3.333C14,4.438 11.314,5.333 8,5.333C4.686,5.333 2,4.438 2,3.333M14,3.333C14,2.229 11.314,1.334 8,1.334C4.686,1.334 2,2.229 2,3.333M14,3.333V12.667C14,13.197 13.368,13.706 12.243,14.081C11.117,14.456 9.591,14.667 8,14.667C6.409,14.667 4.883,14.456 3.757,14.081C2.632,13.706 2,13.197 2,12.667V3.333M2,8C2,8.531 2.632,9.039 3.757,9.414C4.883,9.789 6.409,10 8,10C9.591,10 11.117,9.789 12.243,9.414C13.368,9.039 14,8.531 14,8\"\n      android:strokeLineJoin=\"round\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/drawable/icon_file.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M9.333,1.333V4C9.333,4.354 9.474,4.693 9.724,4.943C9.974,5.193 10.313,5.333 10.667,5.333H13.333M10,1.333H4C3.646,1.333 3.307,1.474 3.057,1.724C2.807,1.974 2.667,2.313 2.667,2.667V13.333C2.667,13.687 2.807,14.026 3.057,14.276C3.307,14.526 3.646,14.667 4,14.667H12C12.354,14.667 12.693,14.526 12.943,14.276C13.193,14.026 13.333,13.687 13.333,13.333V4.667L10,1.333Z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n  <path\n      android:pathData=\"M5.333,10.667C5.687,10.667 6.026,10.526 6.276,10.276C6.526,10.026 6.667,9.687 6.667,9.333V8H5.333M9.333,10.667C9.687,10.667 10.026,10.526 10.276,10.276C10.526,10.026 10.667,9.687 10.667,9.333V8H9.333\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/activity_file_content.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/main\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/bg_normal\"\n    android:orientation=\"vertical\"\n    tools:context=\".activity.FileContentActivity\">\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"40dp\"\n        android:background=\"@color/white\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/btn_back\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical\"\n            android:paddingVertical=\"10dp\"\n            android:paddingLeft=\"20dp\"\n            android:paddingRight=\"20dp\"\n            android:src=\"@drawable/icon_back\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:text=\"Select Folder\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"#1f1f1f\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n    </FrameLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"#E7E7E7\" />\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <TextView\n            android:id=\"@+id/tv_content\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"16dp\"\n            android:letterSpacing=\"0.02\"\n            android:textColor=\"#1F1F1F\"\n            android:textSize=\"16sp\" />\n    </ScrollView>\n\n\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_marginStart=\"0dp\"\n    android:layout_marginEnd=\"0dp\"\n    android:layout_marginBottom=\"20dp\"\n    android:background=\"@color/bg_normal\"\n    android:fitsSystemWindows=\"true\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <!-- Spinner for model selection -->\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"50dp\"\n            android:layout_marginBottom=\"5dp\">\n\n            <Spinner\n                android:id=\"@+id/sp_model_list\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:paddingLeft=\"10dp\" />\n\n            <View\n                android:id=\"@+id/v_tip\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"50dp\"\n                android:visibility=\"gone\" />\n        </FrameLayout>\n\n\n        <!-- Control buttons section -->\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center_vertical\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/btn_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"26dp\"\n                android:layout_marginStart=\"16dp\"\n                android:layout_marginEnd=\"8dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Download\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\" />\n\n            <Button\n                android:id=\"@+id/btn_load_model\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"26dp\"\n                android:layout_marginEnd=\"8dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Load\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\" />\n\n            <Button\n                android:id=\"@+id/btn_unload_model\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"26dp\"\n                android:layout_marginEnd=\"8dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Unload\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\"\n                android:visibility=\"gone\"\n                tools:visibility=\"gone\" />\n\n            <Button\n                android:id=\"@+id/btn_stop\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"26dp\"\n                android:layout_marginEnd=\"8dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Stop\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\"\n                android:visibility=\"gone\"\n                tools:visibility=\"gone\" />\n\n        </LinearLayout>\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:layout_marginTop=\"8dp\"\n            android:background=\"#E7E7E7\" />\n\n        <Button\n            android:id=\"@+id/btn_test\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"test\"\n            android:visibility=\"gone\" />\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:orientation=\"vertical\">\n\n                <!-- chat display area -->\n                <androidx.recyclerview.widget.RecyclerView\n                    android:id=\"@+id/rv_chat\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"0dp\"\n                    android:layout_weight=\"1\"\n                    android:clipToPadding=\"false\"\n                    android:padding=\"8dp\"\n                    android:scrollbars=\"vertical\"\n                    app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" />\n\n                <!-- Input section at bottom -->\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:background=\"@drawable/bg_input_box_background\"\n                    android:orientation=\"vertical\"\n                    android:paddingLeft=\"8dp\"\n                    android:paddingTop=\"6dp\"\n                    android:paddingRight=\"8dp\">\n\n                    <HorizontalScrollView\n                        android:id=\"@+id/scroll_images\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"100dp\"\n                        android:layout_margin=\"6dp\"\n                        android:overScrollMode=\"never\"\n                        android:visibility=\"gone\">\n\n                        <LinearLayout\n                            android:id=\"@+id/ll_images_container\"\n                            android:layout_width=\"wrap_content\"\n                            android:layout_height=\"match_parent\"\n                            android:layout_marginLeft=\"6dp\"\n                            android:layout_marginEnd=\"6dp\"\n                            android:orientation=\"horizontal\" />\n                    </HorizontalScrollView>\n\n                    <EditText\n                        android:id=\"@+id/et_input\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"6dp\"\n                        android:layout_marginBottom=\"6dp\"\n                        android:background=\"@null\"\n                        android:hint=\"Type prompt...\"\n                        android:padding=\"6dp\"\n                        android:text=\"hi\"\n                        android:textColorHint=\"#ADADAD\"\n                        android:imeOptions=\"actionSend\"\n                        android:inputType=\"text\" />\n\n                    <LinearLayout\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:orientation=\"horizontal\"\n                        android:paddingTop=\"8dp\"\n                        android:paddingBottom=\"8dp\">\n\n                        <LinearLayout\n                            android:layout_width=\"0dp\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_marginRight=\"4dp\"\n                            android:layout_weight=\"1\"\n                            android:gravity=\"start\"\n                            android:orientation=\"horizontal\">\n\n                            <Button\n                                android:id=\"@+id/btn_add_image\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_marginLeft=\"4dp\"\n                                android:layout_marginRight=\"4dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Add Image\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\"\n                                android:visibility=\"invisible\" />\n\n                            <Button\n                                android:id=\"@+id/btn_voice\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Record\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\"\n                                android:visibility=\"invisible\" />\n                        </LinearLayout>\n\n                        <LinearLayout\n                            android:layout_width=\"0dp\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_weight=\"1\"\n                            android:gravity=\"end\"\n                            android:orientation=\"horizontal\">\n\n                            <Button\n                                android:id=\"@+id/btn_clear_history\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_marginRight=\"4dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Clear\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\" />\n\n                            <Button\n                                android:id=\"@+id/btn_send\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_marginEnd=\"4dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Send\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\" />\n                        </LinearLayout>\n                    </LinearLayout>\n                </LinearLayout>\n            </LinearLayout>\n        </FrameLayout>\n\n    </LinearLayout>\n\n    <!-- audio panel -->\n    <LinearLayout\n        android:id=\"@+id/bottom_panel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"110dp\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"#FFFFFF\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\">\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"10dp\"\n            android:gravity=\"center_horizontal\"\n            android:text=\"Recording...\" />\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"44dp\"\n            android:paddingTop=\"8dp\">\n\n            <Button\n                android:id=\"@+id/btn_audio_cancel\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"32dp\"\n                android:layout_marginLeft=\"16dp\"\n                android:layout_weight=\"1\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Cancel\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\" />\n\n            <View\n                android:id=\"@+id/view\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"2\" />\n\n            <Button\n                android:id=\"@+id/btn_audio_done\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"32dp\"\n                android:layout_marginRight=\"16dp\"\n                android:layout_weight=\"1\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Done\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\" />\n        </LinearLayout>\n\n    </LinearLayout>\n    <!-- Download progress overlay -->\n    <LinearLayout\n        android:id=\"@+id/ll_downloading\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\"\n        android:visibility=\"invisible\"\n        tools:visibility=\"visible\">\n\n        <ProgressBar\n            android:id=\"@+id/pb_downloading\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\" />\n\n        <TextView\n            android:id=\"@+id/tv_download_progress\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"0%\" />\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"20dp\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/btn_cancel_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"30dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"cancel\"\n                android:textAllCaps=\"false\" />\n\n            <Button\n                android:id=\"@+id/btn_retry_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"30dp\"\n                android:layout_marginLeft=\"20dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"retry\"\n                android:textAllCaps=\"false\" />\n\n            <Button\n                android:id=\"@+id/btn_dismiss_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"30dp\"\n                android:layout_marginLeft=\"20dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"dismiss\"\n                android:textAllCaps=\"false\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/ll_loading\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\"\n        android:visibility=\"invisible\"\n        tools:visibility=\"gone\">\n\n        <ProgressBar\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Loading\" />\n    </LinearLayout>\n\n</RelativeLayout>\n"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/dialog_select_plugin_id.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    android:padding=\"15dp\">\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"load model config:\"\n        android:textSize=\"16sp\"\n        android:textStyle=\"bold\" />\n\n    <RadioGroup\n        android:id=\"@+id/rg_select_plugin_id\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"15dp\"\n        android:orientation=\"horizontal\">\n\n        <RadioButton\n            android:id=\"@+id/rb_cpu\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"CPU\"\n            android:visibility=\"gone\" />\n\n        <RadioButton\n            android:id=\"@+id/rb_gpu\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"GPU\"\n            android:visibility=\"gone\"\n            tools:visibility=\"visible\" />\n\n        <RadioButton\n            android:id=\"@+id/rb_npu\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:text=\"NPU\"\n            android:visibility=\"gone\" />\n    </RadioGroup>\n\n    <LinearLayout\n        android:id=\"@+id/ll_gpu_layers\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\"\n        android:visibility=\"gone\"\n        tools:visibility=\"visible\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"nGpuLayers 1~999 : \" />\n\n        <EditText\n            android:id=\"@+id/et_gpu_layers\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"right\"\n            android:inputType=\"number\"\n            android:maxLength=\"3\"\n            android:text=\"999\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_ai_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"start\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <TextView\n        android:id=\"@+id/tv_message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:letterSpacing=\"0.02\"\n        android:maxWidth=\"320dp\"\n        android:text=\"Hello, I am Assistant\"\n        android:textColor=\"#1F1F1F\"\n        android:textSize=\"16sp\"\n        android:textIsSelectable=\"true\"\n        android:linksClickable=\"true\" />\n\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_assistant_image_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"start\"\n    android:padding=\"8dp\">\n\n        <HorizontalScrollView\n            android:id=\"@+id/scroller_container\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:scrollbars=\"none\"\n            android:overScrollMode=\"never\">\n\n            <LinearLayout\n                android:id=\"@+id/image_container\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\" />\n        </HorizontalScrollView>\n</LinearLayout>\n\n"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_audio_scroll.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"120dp\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginEnd=\"8dp\"\n    android:layout_gravity=\"center\"\n    android:padding=\"12dp\"\n    android:background=\"@drawable/bg_audio_background\"\n    >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\"\n        android:gravity=\"center\"\n        android:layout_marginTop=\"8dp\"\n        android:layout_marginLeft=\"8dp\"\n        android:layout_marginBottom=\"8dp\"\n        android:layout_marginEnd=\"24dp\"\n        >\n\n        <TextView\n            android:id=\"@+id/tv_audio_name\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:ellipsize=\"end\"\n            android:maxLines=\"1\"\n            android:singleLine=\"true\"\n            android:text=\"TextView\"\n            android:textAppearance=\"@android:style/TextAppearance.Material.Small\"\n            android:textColor=\"#1F1F1F\"\n            android:textSize=\"12sp\"\n            android:textStyle=\"bold\" />\n\n        <TextView\n            android:id=\"@+id/tv_audio_type\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"WAV\"\n            android:textColor=\"#888888\"\n            android:textSize=\"12sp\" />\n    </LinearLayout>\n\n    <ImageButton\n        android:id=\"@+id/btn_audio_remove\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_gravity=\"top|end\"\n        android:background=\"@android:color/transparent\"\n        android:src=\"@android:drawable/ic_menu_close_clear_cancel\"/>\n</FrameLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_image_item_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"100dp\"\n    android:layout_height=\"100dp\"\n    android:layout_marginEnd=\"8dp\">\n    <ImageView\n        android:id=\"@+id/iv_image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scaleType=\"centerCrop\"/>\n</FrameLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_image_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"end\"\n    android:padding=\"8dp\">\n\n        <HorizontalScrollView\n            android:id=\"@+id/scroller_container\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:scrollbars=\"none\"\n            android:overScrollMode=\"never\">\n\n            <LinearLayout\n                android:id=\"@+id/image_container\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\" />\n        </HorizontalScrollView>\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_image_scroll.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"100dp\"\n    android:layout_height=\"100dp\"\n    android:layout_marginEnd=\"8dp\">\n\n    <ImageView\n        android:id=\"@+id/iv_image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scaleType=\"centerCrop\"/>\n\n    <ImageButton\n        android:id=\"@+id/btn_remove\"\n        android:layout_marginRight=\"4dp\"\n        android:layout_marginTop=\"4dp\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_gravity=\"top|end\"\n        android:background=\"@android:color/transparent\"\n        android:src=\"@android:drawable/ic_menu_close_clear_cancel\"/>\n</FrameLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_model.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center_vertical\"\n    android:orientation=\"vertical\">\n\n    <TextView\n        android:id=\"@+id/tv_model_id\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"15dp\"\n        android:textSize=\"14sp\"\n        android:letterSpacing=\"0.01\"\n        android:textColor=\"#1F1F1F\"\n        tools:text=\"test\" />\n\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_profile_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"start\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <TextView\n        android:id=\"@+id/tv_message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:letterSpacing=\"0.02\"\n        android:maxWidth=\"320dp\"\n        android:text=\"Profile data\"\n        android:textColor=\"#888888\"\n        android:textSize=\"12sp\" />\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/item_user_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"8dp\"\n    android:gravity=\"end\">\n\n    <TextView\n        android:id=\"@+id/tv_message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textColor=\"#1F1F1F\"\n        android:background=\"@drawable/bg_user_message\"\n        android:padding=\"12dp\"\n        android:textSize=\"16sp\"\n        android:maxWidth=\"320dp\"\n        android:text=\"Hello\"/>\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/layout/menu_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:background=\"#ffffff\"\n    android:padding=\"8dp\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\">\n\n    <Button\n        android:id=\"@+id/btn_camera\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Camera\"\n        android:visibility=\"gone\"\n        android:background=\"#ffffff\"\n        android:textColor=\"#1F1F1F\"\n        android:textAllCaps=\"false\" />\n\n    <Button\n        android:id=\"@+id/btn_photo\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Photos\"\n        android:textAllCaps=\"false\"\n        android:background=\"#ffffff\"\n        android:textColor=\"#1F1F1F\"\n        android:layout_marginTop=\"4dp\"/>\n</LinearLayout>"
  },
  {
    "path": "bindings/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "bindings/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "bindings/android/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <color name=\"purple_200\">#FFBB86FC</color>\n    <color name=\"purple_500\">#FF6200EE</color>\n    <color name=\"purple_700\">#FF3700B3</color>\n    <color name=\"teal_200\">#FF03DAC5</color>\n    <color name=\"teal_700\">#FF018786</color>\n    <color name=\"black\">#FF000000</color>\n    <color name=\"white\">#FFFFFFFF</color>\n    <color name=\"bg_normal\">#F6F7F9</color>\n    <color name=\"font_black\">#1F1F1F</color>\n</resources>"
  },
  {
    "path": "bindings/android/app/src/main/res/values/strings.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <string name=\"app_name\">NexaDemo</string>\n    <string name=\"blank_index_tip\">Please import files before starting your search.</string>\n    <string name=\"hello_blank_fragment\">Hello blank fragment</string>\n</resources>"
  },
  {
    "path": "bindings/android/app/src/main/res/values/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <style name=\"Theme.NexaDemo\" parent=\"android:Theme.Material.Light.NoActionBar\" />\n\n    <style name=\"TransparentBottomSheetDialog\" parent=\"Theme.Design.Light.BottomSheetDialog\">\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\n    </style>\n</resources>"
  },
  {
    "path": "bindings/android/app/src/main/res/xml/backup_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<!--\n   Sample backup rules file; uncomment and customize as necessary.\n   See https://developer.android.com/guide/topics/data/autobackup\n   for details.\n   Note: This file is ignored for devices older than API 31\n   See https://developer.android.com/about/versions/12/backup-restore\n-->\n<full-backup-content>\n    <!--\n   <include domain=\"sharedpref\" path=\".\"/>\n   <exclude domain=\"sharedpref\" path=\"device.xml\"/>\n-->\n</full-backup-content>"
  },
  {
    "path": "bindings/android/app/src/main/res/xml/data_extraction_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<!--\n   Sample data extraction rules file; uncomment and customize as necessary.\n   See https://developer.android.com/about/versions/12/backup-restore#xml-changes\n   for details.\n-->\n<data-extraction-rules>\n    <cloud-backup>\n        <!-- TODO: Use <include> and <exclude> to control what is backed up.\n        <include .../>\n        <exclude .../>\n        -->\n    </cloud-backup>\n    <!--\n    <device-transfer>\n        <include .../>\n        <exclude .../>\n    </device-transfer>\n    -->\n</data-extraction-rules>"
  },
  {
    "path": "bindings/android/app/src/main/res/xml/file_paths.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<paths xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <external-files-path\n        name=\"pictures\"\n        path=\"Pictures/\" />\n\n    <files-path\n        name=\"internal_files\"\n        path=\".\" />\n</paths>"
  },
  {
    "path": "bindings/android/app/src/test/java/com/nexa/demo/ExampleUnitTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}"
  },
  {
    "path": "bindings/android/build.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\n// Top-level build file where you can add configuration options common to all sub-projects/modules.\nplugins {\n    alias(libs.plugins.android.application) apply false\n    alias(libs.plugins.kotlin.android) apply false\n    alias(libs.plugins.kotlin.compose) apply false\n    alias(libs.plugins.android.library) apply false\n}"
  },
  {
    "path": "bindings/android/gradle/libs.versions.toml",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n[versions]\naiNexaCore = \"0.0.22\"\nagp = \"8.12.1\"\nkotlin = \"2.2.0\"\ncoreKtx = \"1.10.1\"\njunit = \"4.13.2\"\njunitVersion = \"1.1.5\"\nespressoCore = \"3.5.1\"\nlifecycleRuntimeKtx = \"2.6.1\"\nactivityCompose = \"1.8.0\"\ncomposeBom = \"2024.09.00\"\nkotlinx-serialization =\"1.6.3\"\nokhttp = \"5.1.0\"\nappcompat = \"1.6.1\"\nmaterial = \"1.10.0\"\nkotlinxCoroutinesAndroid = \"1.7.3\"\nconstraintlayout = \"2.1.4\"\naws-android-s3 = '2.81.0'\nautoSize = \"v1.2.1\"\nimmBar = \"3.2.2\"\nactivity = \"1.11.0\"\ntoaster = \"13.8\"\nrecyclerview = \"1.3.1\"\ngson = \"2.10.1\"\nglide = \"5.0.5\"\nactivityVersion = \"1.12.2\"\nmarkwon = \"4.6.2\"\n\n[libraries]\nglide = {group = \"com.github.bumptech.glide\", name = \"glide\", version.ref = \"glide\"}\ngson = {group = \"com.google.code.gson\", name = \"gson\", version.ref = \"gson\"}\nrecyclerview = {group = \"androidx.recyclerview\", name = \"recyclerview\", version.ref = \"recyclerview\"}\ntoaster = {group = \"com.github.getActivity\", name = \"Toaster\", version.ref = \"toaster\"}\nimm-bar-ktx = {group = \"com.geyifeng.immersionbar\", name = \"immersionbar-ktx\", version.ref = \"immBar\"}\nimm-bar = {group = \"com.geyifeng.immersionbar\", name = \"immersionbar\", version.ref = \"immBar\"}\nauto-size = {group = \"com.github.JessYanCoding\", name = \"AndroidAutoSize\", version.ref = \"autoSize\"}\naws-android-sdk-s3 = {group = \"com.amazonaws\", name = \"aws-android-sdk-s3\", version.ref = \"aws-android-s3\"}\nandroidx-core-ktx = { group = \"androidx.core\", name = \"core-ktx\", version.ref = \"coreKtx\" }\njunit = { group = \"junit\", name = \"junit\", version.ref = \"junit\" }\nandroidx-junit = { group = \"androidx.test.ext\", name = \"junit\", version.ref = \"junitVersion\" }\nandroidx-espresso-core = { group = \"androidx.test.espresso\", name = \"espresso-core\", version.ref = \"espressoCore\" }\nandroidx-lifecycle-runtime-ktx = { group = \"androidx.lifecycle\", name = \"lifecycle-runtime-ktx\", version.ref = \"lifecycleRuntimeKtx\" }\nandroidx-activity-compose = { group = \"androidx.activity\", name = \"activity-compose\", version.ref = \"activityCompose\" }\nandroidx-compose-bom = { group = \"androidx.compose\", name = \"compose-bom\", version.ref = \"composeBom\" }\nandroidx-ui = { group = \"androidx.compose.ui\", name = \"ui\" }\nandroidx-ui-graphics = { group = \"androidx.compose.ui\", name = \"ui-graphics\" }\nandroidx-ui-tooling = { group = \"androidx.compose.ui\", name = \"ui-tooling\" }\nandroidx-ui-tooling-preview = { group = \"androidx.compose.ui\", name = \"ui-tooling-preview\" }\nandroidx-ui-test-manifest = { group = \"androidx.compose.ui\", name = \"ui-test-manifest\" }\nandroidx-ui-test-junit4 = { group = \"androidx.compose.ui\", name = \"ui-test-junit4\" }\nandroidx-material3 = { group = \"androidx.compose.material3\", name = \"material3\" }\nkotlinx-serialization-json = { module = \"org.jetbrains.kotlinx:kotlinx-serialization-json\", version.ref = \"kotlinx-serialization\" }\nokhttp = { group = \"com.squareup.okhttp3\", name=\"okhttp\", version.ref = \"okhttp\" }\nandroidx-appcompat = { group = \"androidx.appcompat\", name = \"appcompat\", version.ref = \"appcompat\" }\nmaterial = { group = \"com.google.android.material\", name = \"material\", version.ref = \"material\" }\nkotlinx-coroutines-android = { module = \"org.jetbrains.kotlinx:kotlinx-coroutines-android\", version.ref = \"kotlinxCoroutinesAndroid\" }\nandroidx-constraintlayout = { group = \"androidx.constraintlayout\", name = \"constraintlayout\", version.ref = \"constraintlayout\" }\nai-nexa-core = {group = \"ai.nexa\", name = \"core\", version.ref = \"aiNexaCore\"}\nandroidx-activity = { group = \"androidx.activity\", name = \"activity\", version.ref = \"activityVersion\" }\nmarkwon-core = { group = \"io.noties.markwon\", name = \"core\", version.ref = \"markwon\" }\nmarkwon-strikethrough = { group = \"io.noties.markwon\", name = \"ext-strikethrough\", version.ref = \"markwon\" }\nmarkwon-tables = { group = \"io.noties.markwon\", name = \"ext-tables\", version.ref = \"markwon\" }\nmarkwon-linkify = { group = \"io.noties.markwon\", name = \"linkify\", version.ref = \"markwon\" }\nmarkwon-latex = { group = \"io.noties.markwon\", name = \"ext-latex\", version.ref = \"markwon\" }\nmarkwon-inline-parser = { group = \"io.noties.markwon\", name = \"inline-parser\", version.ref = \"markwon\" }\n\n[plugins]\nandroid-application = { id = \"com.android.application\", version.ref = \"agp\" }\nkotlin-android = { id = \"org.jetbrains.kotlin.android\", version.ref = \"kotlin\" }\nkotlin-compose = { id = \"org.jetbrains.kotlin.plugin.compose\", version.ref = \"kotlin\" }\nandroid-library = { id = \"com.android.library\", version.ref = \"agp\" }\n\n"
  },
  {
    "path": "bindings/android/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Fri Aug 22 13:22:30 CST 2025\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.13-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "bindings/android/gradle.properties",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. For more details, visit\n# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\n# Enables namespacing of each library's R class so that its R class includes only the\n# resources declared in the library itself and none from the library's dependencies,\n# thereby reducing the size of the R class for that library\nandroid.nonTransitiveRClass=true\nandroid.injected.testOnly=false"
  },
  {
    "path": "bindings/android/gradlew",
    "content": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\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#      https://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#\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif [ \"$cygwin\" = \"true\" -o \"$msys\" = \"true\" ] ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=`expr $i + 1`\n    done\n    case $i in\n        0) set -- ;;\n        1) set -- \"$args0\" ;;\n        2) set -- \"$args0\" \"$args1\" ;;\n        3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=`save \"$@\"`\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "bindings/android/gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n\n@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto execute\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "bindings/android/settings.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\nenableFeaturePreview(\"TYPESAFE_PROJECT_ACCESSORS\")\n\npluginManagement {\n    repositories {\n        google {\n            content {\n                includeGroupByRegex(\"com\\\\.android.*\")\n                includeGroupByRegex(\"com\\\\.google.*\")\n                includeGroupByRegex(\"androidx.*\")\n            }\n        }\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url = uri(\"https://jitpack.io\") } // Added JitPack for AndroidAutoSize\n//        maven {\n//            url = uri(\"https://raw.githubusercontent.com/NexaAI/core/main\")\n//        }\n        flatDir {\n            dirs(\"app/libs\")\n        }\n    }\n}\n\nrootProject.name = \"NexaDemo\"\n\n// Using cloud SDK - no bridge library needed\ngradle.extra[\"bridgePathExist\"] = false\n\ninclude(\":transform\")\ninclude(\":app\")\n\n"
  },
  {
    "path": "bindings/android/transform/.gitignore",
    "content": "/build"
  },
  {
    "path": "bindings/android/transform/build.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\nplugins {\n    alias(libs.plugins.android.library)\n    alias(libs.plugins.kotlin.android)\n}\n\nandroid {\n    namespace = \"ai.nexa.transform\"\n    compileSdk = 36\n\n    defaultConfig {\n        minSdk = 24\n\n        testInstrumentationRunner = \"androidx.test.runner.AndroidJUnitRunner\"\n        consumerProguardFiles(\"consumer-rules.pro\")\n    }\n\n    buildTypes {\n        release {\n            isMinifyEnabled = false\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_11\n        targetCompatibility = JavaVersion.VERSION_11\n    }\n    kotlinOptions {\n        jvmTarget = \"11\"\n    }\n}\n\ndependencies {\n    compileOnly(libs.ai.nexa.core)\n    compileOnly(libs.androidx.core.ktx)\n//    implementation(libs.androidx.appcompat)\n//    implementation(libs.material)\n    testImplementation(libs.junit)\n    androidTestImplementation(libs.androidx.junit)\n    androidTestImplementation(libs.androidx.espresso.core)\n}"
  },
  {
    "path": "bindings/android/transform/consumer-rules.pro",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n"
  },
  {
    "path": "bindings/android/transform/proguard-rules.pro",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "bindings/android/transform/src/androidTest/java/ai/nexa/transform/ExampleInstrumentedTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getInstrumentation().targetContext\n        assertEquals(\"ai.nexa.transform.test\", appContext.packageName)\n    }\n}"
  },
  {
    "path": "bindings/android/transform/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n<uses-permission android:name=\"android.permission.INTERNET\" />\n</manifest>"
  },
  {
    "path": "bindings/android/transform/src/main/java/ai/nexa/transform/DownloadUtils.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport android.text.TextUtils\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.net.HttpURLConnection\nimport java.net.URL\n\nclass DownloadUtils {\n    companion object {\n        // Download image to specified path\n        fun downloadImage(imageUrl: String?, saveFile: File): Boolean {\n            if (TextUtils.isEmpty(imageUrl) || imageUrl?.startsWith(\"http\", true) == false) {\n                return false\n            }\n            return try {\n                val url = URL(imageUrl)\n                val connection = url.openConnection() as HttpURLConnection\n                connection.connectTimeout = 15000\n                connection.readTimeout = 15000\n                connection.doInput = true\n                connection.connect()\n                if (connection.responseCode == HttpURLConnection.HTTP_OK) {\n                    val inputStream = connection.inputStream\n                    // Ensure directory exists\n                    saveFile.parentFile?.mkdirs()\n                    FileOutputStream(saveFile).use { outputStream ->\n                        inputStream.copyTo(outputStream)\n                    }\n                    inputStream.close()\n                    true\n                } else {\n                    false\n                }\n            } catch (e: Exception) {\n                e.printStackTrace()\n                false\n            }\n        }\n    }\n}"
  },
  {
    "path": "bindings/android/transform/src/main/java/ai/nexa/transform/ImageUtils.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport android.util.Base64\nimport java.io.File\nimport java.io.FileOutputStream\n\nclass ImageUtils {\n    companion object {\n        fun saveBase64ToFile(base64String: String?, filePath: String): Boolean {\n            return saveBase64ToFile(base64String, File(filePath))\n        }\n\n        fun saveBase64ToFile(base64String: String?, file: File): Boolean {\n            return try {\n                val pureBase64 = base64String?.substringAfter(\",\")\n                val decodedBytes = Base64.decode(pureBase64, Base64.DEFAULT)\n                FileOutputStream(file).use { fos ->\n                    fos.write(decodedBytes)\n                }\n                true\n            } catch (e: Exception) {\n                e.printStackTrace()\n                false\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "bindings/android/transform/src/main/java/ai/nexa/transform/VlmContentTransfer.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport android.content.Context\nimport com.nexa.sdk.bean.VlmContent\nimport java.io.File\n\nclass VlmContentTransfer(context: Context, val content: VlmContent) {\n\n    private var filesDir: File = File(context.filesDir, \"nexa_vlm_files\")\n\n    init {\n        if (!filesDir.exists()) {\n            filesDir.mkdirs()\n        }\n    }\n    suspend fun forBase64(): VlmContent? {\n        val imageFile = File(filesDir, \"${System.currentTimeMillis()}.jpg\")\n        val result = ImageUtils.saveBase64ToFile(content.text, imageFile)\n        if (result) {\n            return VlmContent(content.type, imageFile.absolutePath)\n        }\n        return null\n    }\n\n    suspend fun forUrl(): VlmContent? {\n        val imageFile = File(filesDir, \"${System.currentTimeMillis()}.jpg\")\n        val result = DownloadUtils.downloadImage(content.text, imageFile)\n        if (result) {\n            return VlmContent(content.type, imageFile.absolutePath)\n        }\n        return null\n    }\n}\n"
  },
  {
    "path": "bindings/android/transform/src/test/java/ai/nexa/transform/ExampleUnitTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}"
  },
  {
    "path": "bindings/ios/.gitignore",
    "content": ""
  },
  {
    "path": "bindings/ios/README.md",
    "content": "## Overview\n\nNexa SDK enables on-device AI inference on iPhone / iPad / macOS (on supported platforms). It covers a wide range of capabilities including Large Language Models (LLM), Vision-Language Models (VLM), Text Embeddings (Embedder), Automatic Speech Recognition (ASR), Reranking (Reranker), and more.\n\nThe SDK supports accelerated inference using Apple Neural Engine (ANE), Metal GPU, and CPU, making it easy to integrate offline or edge AI capabilities into iOS and macOS applications.\n\nFor more detailed documentation, please refer to the official [docs](https://docs.nexa.ai/en/nexa-sdk-ios/overview)\n\n## Device Compatibility\n\n### Supported Inference Backends\n- **Apple Neural Engine (ANE)**: Provides optimal performance on supported Apple silicon.\n- **GPU (Metal)**: Accelerated inference on the GPU.\n- **CPU**: Fallback option when hardware acceleration is unavailable.\n\n### Minimum Requirements (Recommended)\n- **Xcode**: 16.4 or later (recommended)\n- **iOS/macOS**: iOS 17+ / macOS 15+\n- **Architecture**: arm64\n- **Device**: Devices with ANE are recommended for optimal performance\n\n## Installation\n- Download [NexaSdk.xcframework](https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/ios/latest/NexaSdk.xcframework.zip).\n- Unzip and add it to your Xcode Project / Workspace.\n- Make sure the framework is listed under Frameworks, Libraries, and Embedded Content for your target, and set it to Embed & Sign if required.\n\n## Models\n\nDownload and prepare models according to the SDK documentation or the model repository instructions. Optional example models include:\n- [`NexaAI/parakeet-tdt-0.6b-v3-ane`](https://huggingface.co/NexaAI/parakeet-tdt-0.6b-v3-ane)\n- [`NexaAI/EmbedNeural`](https://huggingface.co/NexaAI/EmbedNeural)\n- [`NexaAI/Qwen3-0.6B-GGUF`](https://huggingface.co/NexaAI/Qwen3-0.6B-GGUF)\n\nPlace model files in a location accessible by the app:\n- During development, you can drag models into App Resources in Xcode\n- In production, models can be downloaded from a remote source into the app sandbox and loaded by the SDK\n\n## Quick Start (Swift)\n\nBelow are Swift examples for common use cases\n\n### ASR (Automatic Speech Recognition)\n\n```swift\nimport NexaSdk\nimport Foundation\n\nlet repoDir: URL = URL(string: \"...\")!\nlet asr = try Asr()\ntry await asr.load(from: repoDir)\n\nprint(asr.supportedLanguages())\n\nlet audioPath = Bundle.main.path(forResource: \"test\", ofType: \"wav\")!\nlet result = try await asr.transcribe(options: .init(audioPath: audioPath))\n\nprint(result.asrResult)\n```\n\n### Embedder (Text Embeddings)\n\n```swift\nimport NexaSdk\nimport Foundation\n\nlet repoDir: URL = URL(string: \"...\")!\nlet embedder = try Embedder(from: repoDir)\n\nlet texts = [\n    \"Hello world\", \"Good morning\",\n    \"Machine learning is fascinating\",\n    \"Natural language processing\"\n]\n\nlet result = try embedder.embed(\n    texts: texts,\n    config: .init(batchSize: Int32(texts.count))\n)\n\nprint(result.embeddings.prefix(10))\n```\n\n### LLM (Large Language Model)\n\n```swift\nimport NexaSdk\nimport Foundation\n\nlet llm = try LLM()\n\nlet repoDir: URL = URL(string: \"...\")!\ntry await llm.load(from: repoDir)\n\nvar messages: [ChatMessage] = [\n    ChatMessage(role: .user, content: \"Hello, tell me a story\")\n]\n\nlet prompt = try await llm.applyChatTemplate(messages: messages)\nlet stream = await llm.generateAsyncStream(prompt: prompt)\n\nvar response = \"\"\nfor try await token in stream {\n    print(token, terminator: \"\")\n    response += token\n}\n```\n\nFor more examples, please refer to the API Reference￼.\n\n### Additional\n\n```swift\n// Set log levels\nNexaAI.install([.error, .trace, .debug])\n\n// Print SDK version\nprint(NexaAI.version)\n```\n\n## FAQ & Debugging\n- If model loading fails, verify that the model path is correct and that all model files are complete.\n- When testing ANE/Metal acceleration on real devices, first confirm the device OS version and chip support.\n- If you encounter crashes or missing symbols, ensure that `NexaSdk.xcframework` is correctly set to `Embed & Sign` in your target settings."
  },
  {
    "path": "bindings/ios/README_zh.md",
    "content": "\n## 概述\n\nNexa SDK 支持在 iPhone / iPad / macOS（在适配平台）上进行本地 AI 推理，覆盖大语言模型（LLM）、视觉-语言模型（VLM）、文本向量化（Embedder）、语音识别（ASR）、重排序（Reranker）等能力。SDK 支持使用 Apple Neural Engine（ANE）、Metal GPU 与 CPU 进行加速推理，方便将离线或边缘推理能力集成到 iOS/macOS 应用中。\n\n更多详细内容请参见[官方文档](https://docs.nexa.ai/cn/nexa-sdk-ios/overview)\n\n## 设备兼容性\n\n### 支持的推理后端\n\n- **Apple Neural Engine (ANE)**: 在支持的 Apple 芯片上可获得最优性能。  \n- **GPU (Metal)**: 在 GPU 上加速推理。  \n- **CPU**: 在无硬件加速时回退到 CPU。\n\n### 最低要求（建议）\n\n- **Xcode**: 16.4 或更高（推荐）。  \n- **iOS/macOS**: iOS 17+ / macOS 15+（运行时依赖具体模型需求，建议使用较新系统以获得最佳性能）。  \n- **架构**: arm64。  \n- **设备**: 推荐具备 ANE 的设备以发挥最佳性能。  \n\n## 安装\n\n- 下载[`NexaSdk.xcframework`](https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/ios/latest/NexaSdk.xcframework.zip)\n- 将Framework添加到目标的 **Frameworks, Libraries, and Embedded Content**，并根据需要设置为 **Embed & Sign**  \n\n## 模型\n\n按照 iOS SDK 文档或模型仓库的说明下载并准备模型。示例模型（可选）包括：  \n- [`NexaAI/parakeet-tdt-0.6b-v3-ane`](https://huggingface.co/NexaAI/parakeet-tdt-0.6b-v3-ane)\n- [`NexaAI/EmbedNeural`](https://huggingface.co/NexaAI/EmbedNeural)\n- [`NexaAI/Qwen3-0.6B-GGUF`](https://huggingface.co/NexaAI/Qwen3-0.6B-GGUF) \n\n将模型文件放入 App 可访问的位置：  \n- 开发调试阶段可以将模型拖入 Xcode 的 App Resources  \n- 生产环境中建议从远端下载到应用的沙盒目录并由 SDK 加载\n\n## 快速使用（Swift）\n\n下面给出若干常用功能的 Swift 示例。这些示例与 SDK 的接口一致，可直接在 iOS/macOS 项目中调用。\n\n### ASR（语音识别）示例\n\n```swift\nimport NexaSdk\nimport Foundation\n\nlet repoDir: URL = URL(string: \"...\")!\nlet asr = try Asr()\ntry await asr.load(from: repoDir)\n\nprint(asr.supportedLanguages())\n\nlet audioPath = Bundle.main.path(forResource: \"test\", ofType: \"wav\")!\nlet result = try await asr.transcribe(options: .init(audioPath: audioPath))\n\nprint(result.asrResult)\n```\n\n### Embedder（文本向量化）示例\n\n```swift\nimport NexaSdk\nimport Foundation\n\nlet repoDir: URL = URL(string: \"...\")\nlet embedder = try Embedder(from: repoDir)\n\nlet texts = [\n    \"Hello world\", \"Good morning\",\n    \"Machine learning is fascinating\",\n    \"Natural language processing\"\n]\nlet result = try embedder.embed(texts: texts, config: .init(batchSize: Int32(texts.count)))\nprint(result.embeddings.prefix(10))\n```\n\n### LLM（大语言模型）示例\n\n```swift\nimport NexaSdk\nimport Foundation\n\nlet llm = try LLM()\n\nlet repoDir: URL = URL(string: \"...\")!\ntry await llm.load(from: repoDir)\n\nvar messages: [ChatMessage] = [\n    ChatMessage(role: .user, content: \"Hello, Tell me a story\")\n]\n\nvar prompt = try await llm.applyChatTemplate(messages: messages)\nvar stream = await llm.generateAsyncStream(prompt: prompt)\nvar response = \"\"\nfor try await token in stream {\n    print(token, terminator: \"\")\n    response += token\n}\n```\n\n更多示例参考接口[说明文档](http://localhost:3000/en/nexa-sdk-ios/APIReference)\n\n### 其他\n\n```swift\n// 设置日志等级\nNexaAI.install([.error, .trace, .debug])\n\n// 查看 SDK 版本\nprint(NexaAI.version)\n```\n\n## 常见问题与调试\n\n- 如果模型加载失败，请确认模型路径正确且模型文件完整。  \n- 在真机上测试 ANE/Metal 加速时，优先检查设备系统版本和芯片支持列表。  \n- 若遇到崩溃或符号缺失，确保 `NexaSdk.xcframework` 已被正确 `Embed & Sign`。\n"
  },
  {
    "path": "bindings/python/.gitignore",
    "content": "__pycache__/\n"
  },
  {
    "path": "bindings/python/README.md",
    "content": "# NexaAI Python SDK\n\nThis directory contains the NexaAI Python SDK and comprehensive examples for various AI inference tasks.\n\n## Quick Start\n\nThe easiest way to get started with NexaAI is through our interactive Jupyter notebooks. You can find example notebooks in the [`notebook/`](notebook/) directory.\n\nEach notebook includes:\n- **LLM (Large Language Model)**: Text generation and conversation\n- **VLM (Vision Language Model)**: Multimodal understanding and generation  \n- **Embedder**: Text vectorization and similarity computation\n- **Reranker**: Document reranking\n- **ASR (Automatic Speech Recognition)**: Speech-to-text transcription\n- **TTS (Text-to-Speech)**: Text-to-speech synthesis\n- **Diarize**: Speaker diarization\n- **ImageGen**: Image generation from text or image-to-image transformation\n- **CV (Computer Vision)**: OCR/text recognition\n\n## Prerequisites\n\n- Python 3\n- Nexa CLI installed\n## Installation\n\n```bash\npip install nexaai -v\n```\n\n## Command Line Examples\n\nIf you prefer command-line usage, here are the basic examples:\n\n### LLM\n```bash\npython llm.py\n```\n\n### Multi-Modal\n```bash\npython vlm.py\n```\n\n### Reranker\n```bash\npython rerank.py\n```\n\n### Embedder\n```bash\npython embedder.py\n```\n\n### Computer Vision\n```bash\npython cv_ocr.py\n```\n\n### TTS (Text-to-Speech)\n```bash\npython tts.py --text \"Hello, world!\"\n```\n\n### Diarize\n```bash\npython diarize.py --audio path/to/audio.wav\n```\n\n### ImageGen\n```bash\n# Text-to-image\npython image_gen.py --prompt \"A beautiful sunset over the ocean\"\n\n# Image-to-image\npython image_gen.py --prompt \"A beautiful sunset\" --init-image path/to/image.png\n```\n\n## Common Arguments\n\n- `--model`: Path to the model file\n- `--device`: Device to run on (cpu, gpu, etc.)\n- `--max-tokens`: Maximum tokens to generate (for LLM/VLM)\n- `--batch-size`: Batch size for processing\n- `--system`: System message for chat models\n- `--plugin-id`: Plugin ID to use (default: cpu_gpu)\n\n## Plugin ID Options\n\nThe `--plugin-id` parameter supports different backends:\n\n- `cpu_gpu`: Default, supports both CPU and GPU\n- `metal`: Apple Silicon optimized (for supported models)\n- `npu`: Qualcomm NPU optimized (for supported models)\n- `nexaml`: NexaML optimized (for supported models)\n\n### Supported Models by Backend\n\n| Backend | Supported Models |\n|---------|------------------|\n| `cpu_gpu` | GGUF models (default backend) |\n| `metal` | Models with MLX format (e.g., Qwen3-VL-4B-MLX-4bit, gpt-oss-20b-MLX-4bit) |\n| `npu` | **LLM:** Granite-4-Micro-NPU, phi4-mini-npu-turbo, Qwen3-4B-Instruct-2507-npu, Qwen3-4B-Thinking-2507-npu, Llama3.2-3B-NPU-Turbo, jan-v1-4B-npu, qwen3-4B-npu, phi3.5-mini-npu<br>**VLM:** Qwen3-VL-4B-Instruct-NPU, OmniNeural-4B, LFM2-1.2B-npu<br>**Embedder:** embeddinggemma-300m-npu<br>**ASR:** parakeet-tdt-0.6b-v3-npu<br>**CV:** convnext-tiny-npu, paddleocr-npu, yolov12-npu<br>**Reranker:** jina-v2-rerank-npu |\n| `nexaml` | **VLM:** Qwen3-VL-4B-Instruct-GGUF:Q4_0, Qwen3-VL-4B-Thinking-GGUF:Q4_0 |\n\n## Getting Started\n\n1. **Open a notebook** from the [`notebook/`](notebook/) directory\n2. **Follow the setup instructions** in the notebook\n3. **Run the examples** step by step to explore different AI capabilities\n4. **Customize the examples** for your specific use cases\n\nFor detailed setup instructions, please refer to the individual notebooks.\n"
  },
  {
    "path": "bindings/python/README_env_setup.md",
    "content": "# ARM64 Python Environment Setup for Nexa SDK\n\n## Setup\n\nRun the PowerShell script from the project root to create a virtual environment with Python ARM64:\n\n```powershell\n.\\bindings\\python\\env_setup.ps1\n```\n\nThe script will automatically activate the virtual environment when complete.\n\n## Usage\n\n### Activate the Virtual Environment\n\nIf the environment was previously installed, activate it with:\n\n```powershell\n.\\venv\\Scripts\\Activate.ps1\n```\n\n### Option 1: Run Jupyter Notebook\n\nOpen the ARM64 notebook directly:\n\n```powershell\njupyter-notebook \"bindings\\python\\notebook\\windows(arm64).ipynb\"\n```\n\n**Important:** When the notebook opens, select the kernel:\n- **Kernel** → **Change Kernel** → **Python (Nexa SDK ARM64)**\n\n### Option 2: Run Python Files\n\nExecute any Python binding file:\n\n```powershell\npython bindings\\python\\llm.py\npython bindings\\python\\asr.py\npython bindings\\python\\vlm.py\n# ... or any other .py file in bindings\\python\\\n```\n\n---\n"
  },
  {
    "path": "bindings/python/README_zh.md",
    "content": "# NexaAI Python SDK\n\n本目录包含 NexaAI Python SDK 及多种 AI 推理任务的全面示例。\n\n## 快速开始\n\n最简单的方式是通过我们的交互式 Jupyter notebook。你可以在 [`notebook/`](notebook/) 文件夹中找到示例 notebook。\n\n每个 notebook 包含：\n- **LLM（大型语言模型）**：文本生成与对话\n- **VLM（视觉语言模型）**：多模态理解与生成\n- **Embedder（嵌入模型）**：文本向量化与相似性计算\n- **Reranker（重排序）**：文档重排序\n- **ASR（自动语音识别）**：语音转文本\n- **TTS（文本转语音）**：文本生成语音\n- **Diarize（说话人分离）**：说话人分离\n- **ImageGen（图像生成）**：文本生成图像或图像到图像转换\n- **CV（计算机视觉）**：OCR/文本识别\n\n## 前提条件\n\n- Python 3\n- 已安装 Nexa CLI\n\n## 安装\n\n```bash\npip install nexaai -v\n```\n\n## 命令行示例\n\n如果你更喜欢命令行用法，这里有基础示例：\n\n### LLM\n```bash\npython llm.py\n```\n\n### 多模态\n```bash\npython vlm.py\n```\n\n### 重排序\n```bash\npython rerank.py\n```\n\n### 嵌入模型\n```bash\npython embedder.py\n```\n\n### 计算机视觉\n```bash\npython cv_ocr.py\n```\n\n### TTS（文本转语音）\n```bash\npython tts.py --text \"Hello, world!\"\n```\n\n### 说话人分离\n```bash\npython diarize.py --audio path/to/audio.wav\n```\n\n### 图像生成\n```bash\n# 文本生成图像\npython image_gen.py --prompt \"A beautiful sunset over the ocean\"\n\n# 图像到图像\npython image_gen.py --prompt \"A beautiful sunset\" --init-image path/to/image.png\n```\n\n## 通用参数\n\n- `--model`：模型文件路径\n- `--device`：推理设备（cpu，gpu等）\n- `--max-tokens`：生成最大 tokens（适用 LLM/VLM）\n- `--batch-size`：处理批量大小\n- `--system`：聊天模型的 system 消息\n- `--plugin-id`：指定插件 ID（默认 cpu_gpu）\n\n## 插件 ID 选项\n\n`--plugin-id` 参数支持不同后端：\n\n- `cpu_gpu`：默认，同时支持 CPU 和 GPU\n- `metal`：Apple Silicon 优化（支持相关模型）\n- `npu`：高通 NPU 优化（支持相关模型）\n- `nexaml`：NexaML 优化（支持相关模型）\n\n### 各后端支持的模型\n\n| 后端 | 支持的模型 |\n|------|------------|\n| `cpu_gpu` | GGUF 格式模型（默认后端） |\n| `metal` | MLX 格式模型（如 Qwen3-VL-4B-MLX-4bit, gpt-oss-20b-MLX-4bit） |\n| `npu` | **LLM：** Granite-4-Micro-NPU, phi4-mini-npu-turbo, Qwen3-4B-Instruct-2507-npu, Qwen3-4B-Thinking-2507-npu, Llama3.2-3B-NPU-Turbo, jan-v1-4B-npu, qwen3-4B-npu, phi3.5-mini-npu<br>**VLM：** Qwen3-VL-4B-Instruct-NPU, OmniNeural-4B, LFM2-1.2B-npu<br>**Embedder：** embeddinggemma-300m-npu<br>**ASR：** parakeet-tdt-0.6b-v3-npu<br>**CV：** convnext-tiny-npu, paddleocr-npu, yolov12-npu<br>**Reranker：** jina-v2-rerank-npu |\n| `nexaml` | **VLM：** Qwen3-VL-4B-Instruct-GGUF:Q4_0, Qwen3-VL-4B-Thinking-GGUF:Q4_0 |\n\n## 使用方法\n\n1. **打开 notebook**（见 [`notebook/`](notebook/) 目录）\n2. **按照 notebook 内设置说明进行环境准备**\n3. **逐步运行示例**，体验各类 AI 能力\n4. **根据自身需求自定义示例代码**\n\n详细环境设置请参见具体 notebook 的说明。\n\n"
  },
  {
    "path": "bindings/python/asr.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\n\"\"\"\r\nNexaAI ASR Example - Speech to Text\r\n\r\nThis example demonstrates how to use the NexaAI SDK to transcribe an audio file\r\nor perform real-time streaming transcription from microphone input.\r\n\r\nUsage:\r\n    # Non-streaming: transcribe audio file\r\n    python asr.py --model model_id --audio audio.wav\r\n\r\n    # Streaming: real-time microphone transcription\r\n    python asr.py --model model_id --stream\r\n\"\"\"\r\n\r\nimport argparse\r\nimport logging\r\nimport os\r\nimport subprocess\r\nimport sys\r\n\r\nimport numpy as np\r\n\r\nfrom nexaai import setup_logging\r\nfrom nexaai.asr import ASR, ASRStreamConfig\r\n\r\n\r\ndef transcribe_audio(asr: ASR, audio_path: str, language: str, timestamps: str, beam_size: int):\r\n    \"\"\"\r\n    Transcribe an audio file.\r\n\r\n    Args:\r\n        asr: ASR instance\r\n        audio_path: Path to audio file\r\n        language: Language code\r\n        timestamps: Timestamp granularity\r\n        beam_size: Beam size for decoding\r\n    \"\"\"\r\n    logging.info(f'Transcribing audio file: {audio_path}')\r\n\r\n    result = asr.transcribe(\r\n        audio_path=audio_path,\r\n        language=language,\r\n        timestamps=timestamps,\r\n        beam_size=beam_size,\r\n    )\r\n\r\n    print('\\n' + '=' * 50)\r\n    print('Transcription Result:')\r\n    print('=' * 50)\r\n    print(result.transcript)\r\n    print('=' * 50)\r\n\r\n\r\ndef stream_microphone(asr: ASR, language: str, beam_size: int, timestamps: str):\r\n    \"\"\"\r\n    Stream audio from microphone for real-time transcription using sox.\r\n\r\n    Args:\r\n        asr: ASR instance\r\n        language: Language code\r\n        beam_size: Beam size for decoding\r\n        timestamps: Timestamp granularity\r\n    \"\"\"\r\n    SAMPLE_RATE = 16000\r\n    CHUNK_SIZE = 4096\r\n\r\n    # Check if sox is available\r\n    try:\r\n        subprocess.run(['sox', '--version'], capture_output=True, check=True)\r\n    except (FileNotFoundError, subprocess.CalledProcessError):\r\n        print('Error: sox is not installed or not in PATH.')\r\n        print('Install sox:')\r\n        print('  Windows: choco install sox  (or download from https://sourceforge.net/projects/sox)')\r\n        print('  Linux: sudo apt-get install sox')\r\n        print('  macOS: brew install sox')\r\n        sys.exit(1)\r\n\r\n    config = ASRStreamConfig(\r\n        sample_rate=SAMPLE_RATE,\r\n        chunk_duration=2.0,\r\n        overlap_duration=1.0,\r\n        max_queue_size=10,\r\n        buffer_size=CHUNK_SIZE,\r\n        timestamps=timestamps,\r\n        beam_size=beam_size,\r\n    )\r\n\r\n    print('\\n' + '=' * 50)\r\n    print(f'Streaming Mode - Language: {language}')\r\n    print('Recording... Press Ctrl+C to stop and show final result')\r\n    print('=' * 50 + '\\n')\r\n\r\n    # Build sox command for microphone input\r\n    if sys.platform == 'win32':\r\n        sox_cmd = ['sox', '-t', 'waveaudio', '-c', '1', '-r', str(SAMPLE_RATE), '-d', '-t', 's16', '-']\r\n    else:  # Linux, macOS\r\n        sox_cmd = ['sox', '-d', '-t', 's16', '-r', str(SAMPLE_RATE), '-c', '1', '-']\r\n\r\n    transcription_buffer = []\r\n    chunks_processed = [0]\r\n\r\n    def on_transcription(text: str):\r\n        transcription_buffer.append(text)\r\n        chunks_processed[0] += 1\r\n        try:\r\n            import shutil\r\n\r\n            term_width = shutil.get_terminal_size().columns\r\n        except Exception:\r\n            term_width = 80\r\n\r\n        display_text = text if len(text) <= term_width - 10 else '...' + text[-(term_width - 13) :]\r\n        print(f'\\r[{chunks_processed[0]}] {display_text}', end='', flush=True)\r\n\r\n    try:\r\n        sox_process = subprocess.Popen(sox_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)\r\n\r\n        # Check if sox started successfully\r\n        import time\r\n\r\n        time.sleep(0.2)\r\n        if sox_process.poll() is not None:\r\n            _, stderr = sox_process.communicate()\r\n            error_msg = stderr.decode('utf-8', errors='ignore')\r\n            print(f'Error: sox failed to start\\n{error_msg}')\r\n            sys.exit(1)\r\n\r\n        if sox_process.stdout is None:\r\n            raise RuntimeError('Failed to open sox stdout pipe.')\r\n\r\n        with asr.stream(language=language, config=config) as stream:\r\n            stream.start(on_transcription=on_transcription)\r\n\r\n            try:\r\n                while True:\r\n                    audio_bytes = sox_process.stdout.read(CHUNK_SIZE * 2)\r\n                    if not audio_bytes:\r\n                        break\r\n                    audio_array = np.frombuffer(audio_bytes, dtype=np.int16).astype(np.float32) / 32768.0\r\n                    stream.push_audio(audio_array.tolist())\r\n            except Exception as e:\r\n                logging.error(f'Error reading audio: {e}')\r\n\r\n            stream.stop(graceful=True)\r\n\r\n    except KeyboardInterrupt:\r\n        print('\\n')\r\n        logging.info('Recording stopped by user')\r\n    except Exception as e:\r\n        print(f'\\nError: {e}')\r\n        logging.exception('Streaming error')\r\n    finally:\r\n        try:\r\n            sox_process.terminate()\r\n            sox_process.wait(timeout=2)\r\n        except Exception:\r\n            try:\r\n                sox_process.kill()\r\n            except Exception:\r\n                pass\r\n\r\n    if transcription_buffer:\r\n        print('\\n' + '=' * 50)\r\n        print('Final Transcription Result:')\r\n        print('=' * 50)\r\n        print(' '.join(transcription_buffer))\r\n        print('=' * 50)\r\n\r\n\r\ndef main():\r\n    setup_logging(level=logging.DEBUG)\r\n    parser = argparse.ArgumentParser(\r\n        description='NexaAI ASR Example - Speech to Text',\r\n        formatter_class=argparse.RawDescriptionHelpFormatter,\r\n        epilog=\"\"\"\r\nExamples:\r\n  python asr.py --model NexaAI/parakeet-npu --audio audio.wav\r\n  python asr.py --model NexaAI/parakeet-npu --stream\r\n  python asr.py --model NexaAI/parakeet-npu --audio audio.wav --language zh\r\n        \"\"\",\r\n    )\r\n    parser.add_argument('-m', '--model', default='NexaAI/parakeet-npu', help='Model id or path')\r\n    parser.add_argument('--audio', help='Path to audio file')\r\n    parser.add_argument('--stream', action='store_true', help='Stream from microphone')\r\n    parser.add_argument('--language', default='en', help='Language code (en, zh, etc.)')\r\n    parser.add_argument('--beam-size', type=int, default=5, help='Beam size for decoding')\r\n    parser.add_argument('--timestamps', default='segment', help='Timestamps: none|segment|word')\r\n    parser.add_argument('--plugin-id', default=None, help='Plugin ID (metal, ort, cpu, etc.)')\r\n    parser.add_argument('--device', default=None, help='Device (cpu, gpu, 0, etc.)')\r\n\r\n    args = parser.parse_args()\r\n\r\n    if not args.stream and not args.audio:\r\n        parser.print_help()\r\n        print('\\nError: Either --audio or --stream must be provided')\r\n        sys.exit(1)\r\n\r\n    asr = ASR.from_(\r\n        model=os.path.expanduser(args.model),\r\n        plugin_id=args.plugin_id,\r\n        device_id=args.device,\r\n    )\r\n\r\n    if args.stream:\r\n        stream_microphone(asr, args.language, args.beam_size, args.timestamps)\r\n    else:\r\n        audio_path = os.path.expanduser(args.audio)\r\n        if not os.path.exists(audio_path):\r\n            raise FileNotFoundError(f'Audio file not found: {audio_path}')\r\n        transcribe_audio(asr, audio_path, args.language, args.timestamps, args.beam_size)\r\n\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n"
  },
  {
    "path": "bindings/python/cv_ocr.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\"\"\"\nNexaAI CV OCR Example\n\nThis example demonstrates how to use the NexaAI SDK to perform OCR on an image.\n\"\"\"\n\nimport argparse\nimport logging\nimport os\n\nfrom nexaai.cv import CV\nfrom nexaai import setup_logging\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI CV OCR Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"NexaAI/paddleocr-npu\",\n        help=\"Model path\",\n    )\n    parser.add_argument(\n        \"--image\",\n        default=\"path/to/image.png\",\n        help=\"Path to input image\",\n    )\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    args = parser.parse_args()\n\n    image_path = os.path.expanduser(args.image)\n\n    if not os.path.exists(image_path):\n        raise FileNotFoundError(f\"Image file not found: {image_path}\")\n\n    cv: CV = CV.from_(\n        model=os.path.expanduser(args.model),\n        capabilities=0,  # 0=OCR\n        plugin_id=args.plugin_id,\n    )\n    results = cv.infer(image_path)\n\n    print(f\"Number of results: {len(results.results)}\")\n    for result in results.results:\n        print(f\"[{result.confidence:.2f}] {result.text}\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/diarize.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\"\"\"\nNexaAI Diarize Example - Speaker Diarization\n\nThis example demonstrates how to use the NexaAI SDK to perform speaker diarization on an audio file.\n\"\"\"\n\nimport argparse\nimport logging\nimport os\n\nfrom nexaai.diarize import Diarize\nfrom nexaai import setup_logging\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI Diarize Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"NexaAI/Pyannote-NPU\",\n        help=\"Model id or path\",\n    )\n    parser.add_argument(\n        \"--audio\",\n        required=True,\n        help=\"Path to the input audio file\",\n    )\n    parser.add_argument(\n        \"--min-speakers\",\n        type=int,\n        default=0,\n        help=\"Minimum number of speakers (0 for auto-detect)\",\n    )\n    parser.add_argument(\n        \"--max-speakers\",\n        type=int,\n        default=0,\n        help=\"Maximum number of speakers (0 for no limit)\",\n    )\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    parser.add_argument(\n        \"--device\", default=None, help=\"Device to run on (e.g., cpu, gpu, 0)\"\n    )\n    args = parser.parse_args()\n\n    audio_path = os.path.expanduser(args.audio)\n\n    if not os.path.exists(audio_path):\n        raise FileNotFoundError(f\"Audio file not found: {audio_path}\")\n\n    diarize = Diarize.from_(\n        model=os.path.expanduser(args.model),\n        plugin_id=args.plugin_id,\n        device_id=args.device,\n    )\n\n    result = diarize.infer(\n        audio_path=audio_path,\n        min_speakers=args.min_speakers if args.min_speakers > 0 else None,\n        max_speakers=args.max_speakers if args.max_speakers > 0 else None,\n    )\n\n    print(f\"Number of speakers: {result.num_speakers}\")\n    print(f\"Duration: {result.duration:.2f}s\")\n    print(f\"Number of segments: {len(result.segments)}\")\n    print(\"\\nSegments:\")\n    for segment in result.segments:\n        print(\n            f\"[{segment.start_time:.2f}s - {segment.end_time:.2f}s] {segment.speaker_label}\"\n        )\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/embedder.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\n\"\"\"\nNexaAI Embedding Example - Text Embedding Generation\n\nThis example demonstrates how to use the NexaAI SDK to generate text embeddings.\nIt includes basic model initialization, single and batch embedding generation, and embedding analysis.\n\"\"\"\n\nimport argparse\nimport logging\nimport os\n\nfrom nexaai.embedding import Embedder\nfrom nexaai import setup_logging\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI Embedding Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"NexaAI/jina-v2-fp16-mlx\",\n        help=\"Path to the embedding model\",\n    )\n    parser.add_argument(\n        \"--texts\",\n        nargs=\"+\",\n        default=[\n            \"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\",\n            \"Nexa AI allows you to run state-of-the-art AI models locally on CPU, GPU, or NPU — from instant use cases to production deployments.\",\n            \"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\",\n            \"The capital of France is Paris.\",\n        ],\n        help=\"Texts to embed\",\n    )\n    parser.add_argument(\n        \"--query\",\n        default=\"what is on device AI\",\n        help=\"Query text for similarity analysis\",\n    )\n    parser.add_argument(\"--batch-size\", type=int, help=\"Batch size for processing\")\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    args = parser.parse_args()\n\n    embedder = Embedder.from_(\n        model=os.path.expanduser(args.model),\n        plugin_id=args.plugin_id,\n    )\n    print(\"Embedder loaded successfully!\")\n\n    dim = embedder.embedding_dim()\n    print(f\"Dimension: {dim}\")\n\n    batch_size = args.batch_size or len(args.texts)\n    result = embedder.embed(\n        texts=args.texts,\n        batch_size=batch_size,\n    )\n    embeddings = result.embeddings\n\n    print(\"\\n\" + \"=\" * 80)\n    print(\"GENERATED EMBEDDINGS\")\n    print(\"=\" * 80)\n\n    for i, (text, embedding) in enumerate(zip(args.texts, embeddings)):\n        print(f\"\\nText {i+1}:\")\n        print(f\"  Content: {text}\")\n        print(f\"  Embedding shape: {len(embedding)} dimensions\")\n        print(f\"  First 10 elements: {embedding[:10]}\")\n        print(\"-\" * 70)\n\n    print(\"\\n\" + \"=\" * 80)\n    print(\"QUERY PROCESSING\")\n    print(\"=\" * 80)\n    print(f\"Query: '{args.query}'\")\n\n    query_result = embedder.embed(\n        texts=[args.query],\n        batch_size=1,\n    )\n    query_embedding = query_result.embeddings[0]\n    print(f\"Query embedding shape: {len(query_embedding)} dimensions\")\n\n    print(\"\\n\" + \"=\" * 80)\n    print(\"SIMILARITY ANALYSIS (Inner Product)\")\n    print(\"=\" * 80)\n\n    for i, (text, embedding) in enumerate(zip(args.texts, embeddings)):\n        inner_product = sum(a * b for a, b in zip(query_embedding, embedding))\n        print(f\"\\nText {i+1}:\")\n        print(f\"  Content: {text}\")\n        print(f\"  Inner product with query: {inner_product:.6f}\")\n        print(\"-\" * 70)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/env_setup.ps1",
    "content": "# PowerShell script to setup ARM64 Python and install nexaai\n# This script will:\n# 1. Download and install ARM64 Python silently\n# 2. Create a virtual environment using absolute paths\n# 3. Install nexaai in the virtual environment\n\n$ErrorActionPreference = \"Stop\"\n\n# Configuration\n$PYTHON_VERSION = \"3.11.9\"  # Adjust version as needed\n$PYTHON_INSTALLER_URL = \"https://www.python.org/ftp/python/$PYTHON_VERSION/python-$PYTHON_VERSION-arm64.exe\"\n$PYTHON_INSTALL_DIR = \"$env:LOCALAPPDATA\\Programs\\Python\\Python311-ARM64\"\n$VENV_DIR = Join-Path $PSScriptRoot \"venv\"\n$TEMP_INSTALLER = Join-Path $env:TEMP \"python-installer-arm64.exe\"\n\nWrite-Host \"================================================\" -ForegroundColor Cyan\nWrite-Host \"ARM64 Python Environment Setup for Nexa AI\" -ForegroundColor Cyan\nWrite-Host \"================================================\" -ForegroundColor Cyan\nWrite-Host \"\"\n\n# Step 1: Download Python ARM64 installer\nWrite-Host \"[1/4] Downloading Python $PYTHON_VERSION ARM64 installer...\" -ForegroundColor Yellow\ntry {\n    # Use .NET WebClient for better progress and reliability\n    $webClient = New-Object System.Net.WebClient\n    $webClient.DownloadFile($PYTHON_INSTALLER_URL, $TEMP_INSTALLER)\n    Write-Host \"      Download completed: $TEMP_INSTALLER\" -ForegroundColor Green\n} catch {\n    Write-Host \"      Error downloading Python installer: $_\" -ForegroundColor Red\n    exit 1\n}\n\n# Step 2: Install Python silently\nWrite-Host \"[2/4] Installing Python ARM64 to $PYTHON_INSTALL_DIR...\" -ForegroundColor Yellow\ntry {\n    # Install Python with the following options:\n    # /quiet - No UI during installation\n    # InstallAllUsers=0 - Install for current user only\n    # TargetDir - Specify installation directory\n    # PrependPath=0 - Don't modify PATH (we'll use absolute paths)\n    # Include_test=0 - Don't include test suite\n    # Include_pip=1 - Include pip\n    # Include_dev=0 - Don't include development headers\n    \n    $installArgs = @(\n        \"/quiet\",\n        \"InstallAllUsers=0\",\n        \"TargetDir=$PYTHON_INSTALL_DIR\",\n        \"PrependPath=0\",\n        \"Include_test=0\",\n        \"Include_pip=1\",\n        \"Include_dev=0\",\n        \"Include_launcher=0\"\n    )\n    \n    $process = Start-Process -FilePath $TEMP_INSTALLER -ArgumentList $installArgs -Wait -PassThru\n    \n    if ($process.ExitCode -ne 0) {\n        Write-Host \"      Python installation failed with exit code: $($process.ExitCode)\" -ForegroundColor Red\n        exit 1\n    }\n    \n    Write-Host \"      Python installed successfully\" -ForegroundColor Green\n} catch {\n    Write-Host \"      Error installing Python: $_\" -ForegroundColor Red\n    exit 1\n} finally {\n    # Clean up installer\n    if (Test-Path $TEMP_INSTALLER) {\n        Remove-Item $TEMP_INSTALLER -Force\n    }\n}\n\n# Step 3: Create virtual environment using absolute path\nWrite-Host \"[3/4] Creating virtual environment at $VENV_DIR...\" -ForegroundColor Yellow\n\n$PYTHON_EXE = Join-Path $PYTHON_INSTALL_DIR \"python.exe\"\n\n# Verify Python installation\nif (-not (Test-Path $PYTHON_EXE)) {\n    Write-Host \"      Error: Python executable not found at $PYTHON_EXE\" -ForegroundColor Red\n    exit 1\n}\n\n# Display Python version\n$pythonVersion = & $PYTHON_EXE --version\nWrite-Host \"      Using Python: $pythonVersion\" -ForegroundColor Cyan\n\n# Remove existing venv if it exists\nif (Test-Path $VENV_DIR) {\n    Write-Host \"      Removing existing virtual environment...\" -ForegroundColor Yellow\n    Remove-Item $VENV_DIR -Recurse -Force\n}\n\n# Create virtual environment using absolute path\ntry {\n    & $PYTHON_EXE -m venv $VENV_DIR\n    Write-Host \"      Virtual environment created successfully\" -ForegroundColor Green\n} catch {\n    Write-Host \"      Error creating virtual environment: $_\" -ForegroundColor Red\n    exit 1\n}\n\n# Step 4: Install packages in the virtual environment\nWrite-Host \"[4/5] Installing packages in the virtual environment...\" -ForegroundColor Yellow\n\n$VENV_PYTHON = Join-Path $VENV_DIR \"Scripts\\python.exe\"\n$VENV_PIP = Join-Path $VENV_DIR \"Scripts\\pip.exe\"\n\nif (-not (Test-Path $VENV_PYTHON)) {\n    Write-Host \"      Error: Virtual environment Python not found at $VENV_PYTHON\" -ForegroundColor Red\n    exit 1\n}\n\ntry {\n    # Upgrade pip first\n    Write-Host \"      Upgrading pip...\" -ForegroundColor Cyan\n    & $VENV_PYTHON -m pip install --upgrade pip --quiet\n    \n    # Install nexaai\n    Write-Host \"      Installing nexaai...\" -ForegroundColor Cyan\n    & $VENV_PIP install nexaai\n    \n    # Install pre-built pywinpty wheel for ARM64 Windows\n    Write-Host \"      Installing pywinpty (pre-built wheel for ARM64)...\" -ForegroundColor Cyan\n    $PYWINPTY_WHEEL_URL = \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/downloads/pywinpty-2.0.12-cp311-none-win_arm64.whl\"\n    & $VENV_PIP install $PYWINPTY_WHEEL_URL\n    \n    # Install Jupyter Notebook and ipykernel\n    Write-Host \"      Installing Jupyter Notebook and ipykernel...\" -ForegroundColor Cyan\n    & $VENV_PIP install jupyter notebook ipykernel\n    \n    Write-Host \"      All packages installed successfully\" -ForegroundColor Green\n} catch {\n    Write-Host \"      Error installing packages: $_\" -ForegroundColor Red\n    exit 1\n}\n\n# Step 5: Register virtual environment as Jupyter kernel\nWrite-Host \"[5/5] Registering virtual environment as Jupyter kernel...\" -ForegroundColor Yellow\n\n$KERNEL_NAME = \"nexa-sdk-arm64\"\n$KERNEL_DISPLAY_NAME = \"Python (Nexa SDK ARM64)\"\n\ntry {\n    & $VENV_PYTHON -m ipykernel install --user --name=$KERNEL_NAME --display-name=\"$KERNEL_DISPLAY_NAME\"\n    Write-Host \"      Kernel '$KERNEL_DISPLAY_NAME' registered successfully\" -ForegroundColor Green\n} catch {\n    Write-Host \"      Error registering Jupyter kernel: $_\" -ForegroundColor Red\n    exit 1\n}\n\n# Summary\nWrite-Host \"\"\nWrite-Host \"================================================\" -ForegroundColor Cyan\nWrite-Host \"Setup Complete!\" -ForegroundColor Green\nWrite-Host \"================================================\" -ForegroundColor Cyan\nWrite-Host \"\"\nWrite-Host \"Python Installation: $PYTHON_INSTALL_DIR\" -ForegroundColor White\nWrite-Host \"Virtual Environment: $VENV_DIR\" -ForegroundColor White\nWrite-Host \"Jupyter Kernel Name: $KERNEL_NAME\" -ForegroundColor White\nWrite-Host \"\"\nWrite-Host \"To activate the virtual environment, run:\" -ForegroundColor Yellow\nWrite-Host \"  .\\venv\\Scripts\\Activate.ps1\" -ForegroundColor Cyan\nWrite-Host \"\"\nWrite-Host \"To start Jupyter Notebook:\" -ForegroundColor Yellow\nWrite-Host \"  .\\venv\\Scripts\\jupyter-notebook.exe\" -ForegroundColor Cyan\nWrite-Host \"\"\nWrite-Host \"Or use the Python directly:\" -ForegroundColor Yellow\nWrite-Host \"  .\\venv\\Scripts\\python.exe\" -ForegroundColor Cyan\nWrite-Host \"\"\nWrite-Host \"The kernel '$KERNEL_DISPLAY_NAME' is now available in Jupyter!\" -ForegroundColor Green\nWrite-Host \"\"\n\n# Activate the virtual environment in the current session\nWrite-Host \"Activating virtual environment in current session...\" -ForegroundColor Yellow\n$ACTIVATE_SCRIPT = Join-Path $VENV_DIR \"Scripts\\Activate.ps1\"\n\nif (Test-Path $ACTIVATE_SCRIPT) {\n    # Use dot-sourcing to run the activation script in the current scope\n    . $ACTIVATE_SCRIPT\n    Write-Host \"Virtual environment activated!\" -ForegroundColor Green\n    Write-Host \"You can now use 'python' and 'pip' commands directly.\" -ForegroundColor Cyan\n} else {\n    Write-Host \"Warning: Activation script not found at $ACTIVATE_SCRIPT\" -ForegroundColor Red\n    Write-Host \"You can manually activate it later using: .\\venv\\Scripts\\Activate.ps1\" -ForegroundColor Yellow\n}"
  },
  {
    "path": "bindings/python/image_gen.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\"\"\"\nNexaAI ImageGen Example - Text to Image / Image to Image\n\nThis example demonstrates how to use the NexaAI SDK to generate images from text prompts\nor modify existing images with text prompts.\n\"\"\"\n\nimport argparse\nimport logging\nimport os\nimport time\n\nfrom nexaai.image_gen import ImageGen\nfrom nexaai import setup_logging\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI ImageGen Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"NexaAI/sdxl-turbo\",\n        help=\"Model id or path\",\n    )\n    parser.add_argument(\n        \"--prompt\",\n        required=True,\n        help=\"Text prompt for image generation\",\n    )\n    parser.add_argument(\n        \"--output\",\n        default=None,\n        help=\"Output image file path (default: auto-generated)\",\n    )\n    parser.add_argument(\n        \"--init-image\",\n        default=None,\n        help=\"Initial image path for img2img (optional)\",\n    )\n    parser.add_argument(\n        \"--negative-prompt\",\n        default=None,\n        help=\"Negative prompt (optional)\",\n    )\n    parser.add_argument(\n        \"--height\",\n        type=int,\n        default=512,\n        help=\"Image height in pixels (default: 512)\",\n    )\n    parser.add_argument(\n        \"--width\",\n        type=int,\n        default=512,\n        help=\"Image width in pixels (default: 512)\",\n    )\n    parser.add_argument(\n        \"--steps\",\n        type=int,\n        default=50,\n        help=\"Number of diffusion steps (default: 50)\",\n    )\n    parser.add_argument(\n        \"--guidance-scale\",\n        type=float,\n        default=7.5,\n        help=\"Guidance scale for classifier-free guidance (default: 7.5)\",\n    )\n    parser.add_argument(\n        \"--strength\",\n        type=float,\n        default=0.8,\n        help=\"Strength parameter for img2img (0.0-1.0, default: 0.8)\",\n    )\n    parser.add_argument(\n        \"--seed\",\n        type=int,\n        default=-1,\n        help=\"Random seed (-1 for random, default: -1)\",\n    )\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    parser.add_argument(\n        \"--device\", default=None, help=\"Device to run on (e.g., cpu, gpu, 0)\"\n    )\n    args = parser.parse_args()\n\n    # Generate output filename if not specified\n    if args.output:\n        output_path = os.path.expanduser(args.output)\n    else:\n        output_path = f\"imagegen_output_{int(time.time())}.png\"\n\n    # Create ImageGen instance\n    image_gen = ImageGen.from_(\n        model=os.path.expanduser(args.model),\n        plugin_id=args.plugin_id,\n        device_id=args.device,\n    )\n\n    # Prepare negative prompts\n    negative_prompts = None\n    if args.negative_prompt:\n        negative_prompts = [args.negative_prompt]\n\n    # Generate image\n    if args.init_image:\n        # Image-to-image generation\n        init_image_path = os.path.expanduser(args.init_image)\n        if not os.path.exists(init_image_path):\n            raise FileNotFoundError(f\"Initial image file not found: {init_image_path}\")\n\n        print(f\"Generating image from: {init_image_path}\")\n        print(f\"Prompt: {args.prompt}\")\n        result = image_gen.img2img(\n            init_image_path=init_image_path,\n            prompt=args.prompt,\n            output_path=output_path,\n            negative_prompts=negative_prompts,\n            height=args.height,\n            width=args.width,\n            steps=args.steps,\n            guidance_scale=args.guidance_scale,\n            seed=args.seed,\n            strength=args.strength,\n        )\n    else:\n        # Text-to-image generation\n        print(f\"Generating image from text prompt: {args.prompt}\")\n        result = image_gen.txt2img(\n            prompt=args.prompt,\n            output_path=output_path,\n            negative_prompts=negative_prompts,\n            height=args.height,\n            width=args.width,\n            steps=args.steps,\n            guidance_scale=args.guidance_scale,\n            seed=args.seed,\n        )\n\n    print(f\"Image saved to: {result.output_image_path}\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/llm.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\n\"\"\"\r\nNexaAI LLM Example\r\n\r\nThis example demonstrates how to use the NexaAI SDK to work with LLM models.\r\n\"\"\"\r\n\r\nimport argparse\r\nimport io\r\nimport logging\r\nimport os\r\nfrom typing import List\r\n\r\nfrom nexaai import LLM, GenerationConfig, LlmChatMessage, ModelConfig, setup_logging\r\n\r\n\r\ndef main():\r\n    setup_logging(level=logging.DEBUG)\r\n    parser = argparse.ArgumentParser(description='NexaAI LLM Example')\r\n    parser.add_argument(\r\n        '-m',\r\n        '--model',\r\n        default='NexaAI/Qwen3-0.6B-GGUF',\r\n        help='Path to the LLM model',\r\n    )\r\n    parser.add_argument('--device', default=None, help='Device to run on')\r\n    parser.add_argument('--max-tokens', type=int, default=128, help='Maximum tokens to generate')\r\n    parser.add_argument('--system', default='You are a helpful assistant.', help='System message')\r\n    parser.add_argument('--plugin-id', default=None, help='Plugin ID to use')\r\n    parser.add_argument('--quant', default=None, help='Quantization specification (e.g., Q4_K_M, Q2_K)')\r\n    args = parser.parse_args()\r\n\r\n    model_path = os.path.expanduser(args.model)\r\n    config = ModelConfig()\r\n\r\n    instance: LLM = LLM.from_(model=model_path, quant=args.quant, plugin_id=args.plugin_id, config=config)\r\n\r\n    conversation: List[LlmChatMessage] = [LlmChatMessage(role='system', content=args.system)]\r\n    strbuff = io.StringIO()\r\n    print(\"Multi-round conversation started. Type '/quit' or '/exit' to end.\")\r\n    print('=' * 50)\r\n    while True:\r\n        user_input = input('\\nUser: ').strip()\r\n\r\n        if user_input.startswith('/'):\r\n            cmds = user_input.split()\r\n            if cmds[0] in {'/quit', '/exit', '/q'}:\r\n                print('Goodbye!')\r\n                break\r\n            elif cmds[0] in {'/save', '/s'}:\r\n                instance.save_kv_cache(cmds[1])\r\n                print('KV cache saved to', cmds[1])\r\n                continue\r\n            elif cmds[0] in {'/load', '/l'}:\r\n                instance.load_kv_cache(cmds[1])\r\n                print('KV cache loaded from', cmds[1])\r\n                continue\r\n            elif cmds[0] in {'/reset', '/r'}:\r\n                instance.reset()\r\n                print('Conversation reset')\r\n                continue\r\n            else:\r\n                print('Unknown command')\r\n                continue\r\n\r\n        if not user_input:\r\n            print(\"Please provide an input or type '/quit' to exit.\")\r\n            continue\r\n\r\n        conversation.append(LlmChatMessage(role='user', content=user_input))\r\n        prompt = instance.apply_chat_template(conversation)\r\n\r\n        strbuff.truncate(0)\r\n        strbuff.seek(0)\r\n\r\n        print('Assistant: ', end='', flush=True)\r\n        gen = instance.generate_stream(prompt, GenerationConfig(max_tokens=args.max_tokens))\r\n        result = None\r\n        try:\r\n            while True:\r\n                token = next(gen)\r\n                print(token, end='', flush=True)\r\n                strbuff.write(token)\r\n        except StopIteration as e:\r\n            result = e.value\r\n\r\n        if result and hasattr(result, 'profile_data') and result.profile_data:\r\n            print(f'\\n{result.profile_data}')\r\n\r\n        conversation.append(LlmChatMessage(role='assistant', content=strbuff.getvalue()))\r\n\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n"
  },
  {
    "path": "bindings/python/models.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\"\"\"\nExample script demonstrating how to use the model management API.\n\nUsage:\n    python models.py [--model MODEL_ID] [--quant QUANT_SPEC] [--token HF_TOKEN] [--no-progress]\n\"\"\"\n\nimport argparse\nimport logging\nimport time\nfrom typing import Dict\n\nfrom nexaai import (\n    DownloadProgressInfo,\n    download_model,\n    get_plugin_list,\n    list_models,\n    nexa_version,\n    remove_model,\n    setup_logging,\n    version,\n)\nfrom tqdm import tqdm\n\n_progress_bars: Dict[str, tqdm] = {}\n\n\ndef progress_callback(info: DownloadProgressInfo) -> None:\n    print(info)\n\n\ndef main():\n    parser = argparse.ArgumentParser(description=\"NexaAI Model Management Examples\")\n    parser.add_argument(\n        \"-m\", \"--model\", default=\"NexaAI/yolov12-npu\", help=\"HuggingFace repository ID\"\n    )\n    parser.add_argument(\n        \"--quant\", default=None, help=\"Quantization specification (e.g., Q4_K_M)\"\n    )\n    parser.add_argument(\n        \"--token\", default=None, help=\"HuggingFace token for private repos\"\n    )\n    parser.add_argument(\n        \"--no-progress\", action=\"store_true\", help=\"Disable progress bar\"\n    )\n    args = parser.parse_args()\n\n    setup_logging(logging.NOTSET)\n    print(\"NexaAI Model Management Examples\")\n    print(\"=\" * 50)\n    print(f\"Python Version: {version()}\")\n    print(f\"SDK Version: {nexa_version()}\\n\")\n    print(f\"Available plugins: {', '.join(get_plugin_list())}\\n\")\n\n    repo_id = args.model\n    if any(m.repo_id == repo_id for m in list_models()):\n        print(f\"Removing existing model {repo_id}...\")\n        remove_model(repo_id)\n        print()\n\n    print(f\"Downloading model: {repo_id}\")\n    if args.quant:\n        print(f\"Quantization: {args.quant}\")\n    print()\n\n    try:\n        download_model(\n            repo_id=repo_id,\n            quant_spec=args.quant,\n            token=args.token,\n            progress_callback=None if args.no_progress else progress_callback,\n        )\n        time.sleep(0.5)\n        print(f\"\\n✓ Successfully downloaded {repo_id}\")\n    finally:\n        for pbar in _progress_bars.values():\n            if not pbar.disable:\n                pbar.close()\n        _progress_bars.clear()\n\n    models = list_models()\n    print(f\"\\nFound {len(models)} model(s) in local store:\\n\")\n    for m in models:\n        size_gb = m.size / (1024**3) if m.size > 0 else 0\n        print(f\"  Repository ID: {m.repo_id}\")\n        print(f\"  Model Name: {m.model_name}\")\n        print(f\"  Model Type: {m.model_type}\")\n        print(f\"  Size: {size_gb:.2f} GB\")\n        print(f\"  Plugin ID: {m.plugin_id or 'default'}\")\n        print(f\"  Device ID: {m.device_id or 'default'}\\n\")\n\n    print(f\"Removing model: {repo_id}\")\n    success = remove_model(repo_id)\n    print(\n        f\"{'✓' if success else '✗'} {'Successfully removed' if success else 'Failed to remove'} {repo_id}\"\n    )\n\n    print(\"\\n\" + \"=\" * 50)\n    print(\"Examples completed!\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/notebook/macos.ipynb",
    "content": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"# NexaAI macOS Inference Examples\\n\",\n        \"\\n\",\n        \"This notebook demonstrates how to use the NexaAI SDK for various AI inference tasks on macOS, including:\\n\",\n        \"\\n\",\n        \"- **LLM (Large Language Model)**: Text generation and conversation\\n\",\n        \"- **VLM (Vision Language Model)**: Multimodal understanding and generation\\n\",\n        \"- **Embedder**: Text vectorization and similarity computation\\n\",\n        \"- **Reranker**: Document reranking\\n\",\n        \"- **ASR (Automatic Speech Recognition)**: Speech-to-text transcription\\n\",\n        \"- **CV (Computer Vision)**: OCR/text recognition\\n\",\n        \"\\n\",\n        \"## Prerequisites\\n\",\n        \"\\n\",\n        \"### 1. Install the correct Python version\\n\",\n        \"\\n\",\n        \"NexaAI requires **Python 3.10** on macOS\\n\",\n        \"\\n\",\n        \"Verify the installation:\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python -c \\\"import sys, platform; print(f'Python version: {sys.version}')\\\"\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"Your output should look like:\\n\",\n        \"\\n\",\n        \"> Python version: 3.10.18 (main, Jun 3 2025, 18:23:41) [Clang 17.0.0 (clang-1700.0.13.5)]\\n\",\n        \"\\n\",\n        \"Expected output must contain version `3.10.x`\\n\",\n        \"\\n\",\n        \"Here are suggested ways to install Python 3.10:\\n\",\n        \"\\n\",\n        \"**Option 1: Using Homebrew**\\n\",\n        \"\\n\",\n        \"If you don't have Homebrew, first install it from [https://brew.sh/](https://brew.sh/). Then, in your Terminal:\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"brew install python@3.10\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"**Option 2: Using Anaconda**\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"conda create -n nexaai python=3.10\\n\",\n        \"conda activate nexaai\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"After installation, you may need to access Python 3.10 using `python3.10`:\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python3.10 --version\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"### 2. Create and activate a virtual environment\\n\",\n        \"\\n\",\n        \"`cd` to the current project root directory `cd path/to/nexa-sdk`.\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python -m venv nexaai-env\\n\",\n        \"source nexaai-env/bin/activate\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 3. Install the NexaAI SDK\\n\",\n        \"\\n\",\n        \"```bash\\n\",\n        \"pip install 'nexaai[mlx]'\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 4. Select the venv as your Jupyter Notebook kernel\\n\",\n        \"\\n\",\n        \"- Depending on the editor you are using, the way to change kernel might be different. For Cursor / VS Code, they are located at the top right corner of your code window.\\n\",\n        \"- Look for and select the `nexaai-env`, or the custom virtual environment you have created. The kernel should automatically reload in most IDEs.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"### Verification of Kernel\\n\",\n        \"\\n\",\n        \"Run the following code to ensure you have the right kernel running.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import sys\\n\",\n        \"import platform\\n\",\n        \"\\n\",\n        \"current_ver = sys.version_info\\n\",\n        \"arch = platform.machine()\\n\",\n        \"\\n\",\n        \"if current_ver.major != 3 or current_ver.minor != 10:\\n\",\n        \"    print(f\\\"❌ Error: Python {current_ver.major}.{current_ver.minor} detected\\\")\\n\",\n        \"    print(\\\"✅ Required: Python 3.10\\\")\\n\",\n        \"    print(\\\"Please install Python 3.10 and restart the kernel.\\\")\\n\",\n        \"    sys.exit(1)\\n\",\n        \"else:\\n\",\n        \"    print(\\\"✅ Python 3.10 running natively on Apple Silicon - Ready to proceed!\\\")\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 1. LLM (Large Language Model) Inference\\n\",\n        \"\\n\",\n        \"Using -accelerated large language models for text generation and conversation. Llama3.2-3B--Turbo is specifically optimized for .\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import io\\n\",\n        \"import os\\n\",\n        \"\\n\",\n        \"from nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def llm_example():\\n\",\n        \"    \\\"\\\"\\\"LLM Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== LLM Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface Repo ID\\n\",\n        \"    model_name = \\\"NexaAI/Qwen3-1.7B-4bit-MLX\\\"\\n\",\n        \"\\n\",\n        \"    max_tokens = 100\\n\",\n        \"    system_message = \\\"You are a helpful assistant.\\\"\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"\\n\",\n        \"    # Create model instance\\n\",\n        \"    config = ModelConfig()\\n\",\n        \"    llm = LLM.from_(model=model_name, plugin_id=\\\"mlx\\\", config=config)\\n\",\n        \"\\n\",\n        \"    # Create conversation history\\n\",\n        \"    conversation = [LlmChatMessage(role=\\\"system\\\", content=system_message)]\\n\",\n        \"\\n\",\n        \"    # Example conversations\\n\",\n        \"    test_prompts = [\\n\",\n        \"        \\\"What is artificial intelligence?\\\",\\n\",\n        \"        \\\"Explain the benefits of on-device AI processing.\\\",\\n\",\n        \"        \\\"How does NPU acceleration work?\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    for i, prompt in enumerate(test_prompts, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Conversation {i} ---\\\")\\n\",\n        \"        print(f\\\"User: {prompt}\\\")\\n\",\n        \"\\n\",\n        \"        # Add user message\\n\",\n        \"        conversation.append(LlmChatMessage(role=\\\"user\\\", content=prompt))\\n\",\n        \"\\n\",\n        \"        # Apply chat template\\n\",\n        \"        formatted_prompt = llm.apply_chat_template(conversation)\\n\",\n        \"\\n\",\n        \"        # Generate response\\n\",\n        \"        print(\\\"Assistant: \\\", end=\\\"\\\", flush=True)\\n\",\n        \"        response_buffer = io.StringIO()\\n\",\n        \"\\n\",\n        \"        gen = llm.generate_stream(formatted_prompt, GenerationConfig(max_tokens=max_tokens))\\n\",\n        \"        result = None\\n\",\n        \"        try:\\n\",\n        \"            while True:\\n\",\n        \"                token = next(gen)\\n\",\n        \"                print(token, end=\\\"\\\", flush=True)\\n\",\n        \"                response_buffer.write(token)\\n\",\n        \"        except StopIteration as e:\\n\",\n        \"            result = e.value\\n\",\n        \"\\n\",\n        \"        # Get profiling data\\n\",\n        \"        if result and hasattr(result, \\\"profile_data\\\") and result.profile_data:\\n\",\n        \"            print(f\\\"\\\\n{result.profile_data}\\\")\\n\",\n        \"\\n\",\n        \"        # Add assistant response to conversation history\\n\",\n        \"        conversation.append(LlmChatMessage(role=\\\"assistant\\\", content=response_buffer.getvalue()))\\n\",\n        \"        print(\\\"\\\\n\\\" + \\\"=\\\" * 50)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"llm_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 2. VLM (Vision Language Model) Inference\\n\",\n        \"\\n\",\n        \"Using vision language models for multimodal understanding and generation. OmniNeural-4B supports joint processing of images and text.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"import io\\n\",\n        \"\\n\",\n        \"from nexaai import (\\n\",\n        \"    GenerationConfig,\\n\",\n        \"    ModelConfig,\\n\",\n        \"    VlmChatMessage,\\n\",\n        \"    VlmContent,\\n\",\n        \")\\n\",\n        \"from nexaai.vlm import VLM\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def vlm_example():\\n\",\n        \"    \\\"\\\"\\\"VLM Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== VLM Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/gemma-3n-E2B-it-4bit-MLX\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"mlx\\\"\\n\",\n        \"    \\n\",\n        \"    max_tokens = 100\\n\",\n        \"    system_message = \\\"You are a helpful assistant that can understand images and text.\\\"\\n\",\n        \"    image_path = '/your/image/path'  # Replace with actual image path if available\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    # Check for image existence\\n\",\n        \"    if not (image_path and os.path.exists(image_path)):\\n\",\n        \"        print(\\n\",\n        \"            f\\\"\\\\033[93mWARNING: The specified image_path ('{image_path}') does not exist or was not provided. Multimodal prompts will not include image input.\\\\033[0m\\\")\\n\",\n        \"\\n\",\n        \"    # Create model instance\\n\",\n        \"    config = ModelConfig()\\n\",\n        \"    vlm = VLM.from_(model=model_name, config=config, plugin_id=plugin_id)\\n\",\n        \"\\n\",\n        \"    # Create conversation history\\n\",\n        \"    conversation = [\\n\",\n        \"        VlmChatMessage(\\n\",\n        \"            role=\\\"system\\\",\\n\",\n        \"            contents=[VlmContent(type=\\\"text\\\", text=system_message)]\\n\",\n        \"        )\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    # Example multimodal conversations\\n\",\n        \"    test_cases = [\\n\",\n        \"        {\\n\",\n        \"            \\\"text\\\": \\\"What do you see in this image?\\\",\\n\",\n        \"            \\\"image_path\\\": image_path\\n\",\n        \"        }\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    for i, case in enumerate(test_cases, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Multimodal Conversation {i} ---\\\")\\n\",\n        \"        print(f\\\"User: {case['text']}\\\")\\n\",\n        \"\\n\",\n        \"        # Build message content\\n\",\n        \"        contents = []\\n\",\n        \"        if case['text']:\\n\",\n        \"            contents.append(VlmContent(type=\\\"text\\\", text=case['text']))\\n\",\n        \"\\n\",\n        \"        # Add image content if available\\n\",\n        \"        if case['image_path'] and os.path.exists(case['image_path']):\\n\",\n        \"            contents.append(VlmContent(type=\\\"image\\\", text=case['image_path']))\\n\",\n        \"            print(f\\\"Including image: {case['image_path']}\\\")\\n\",\n        \"\\n\",\n        \"        # Add user message\\n\",\n        \"        conversation.append(VlmChatMessage(role=\\\"user\\\", contents=contents))\\n\",\n        \"\\n\",\n        \"        # Apply chat template\\n\",\n        \"        formatted_prompt = vlm.apply_chat_template(conversation)\\n\",\n        \"\\n\",\n        \"        # Generate response\\n\",\n        \"        print(\\\"Assistant: \\\", end=\\\"\\\", flush=True)\\n\",\n        \"        response_buffer = io.StringIO()\\n\",\n        \"\\n\",\n        \"        # Prepare image and audio paths\\n\",\n        \"        image_paths = [case['image_path']] if case['image_path'] and os.path.exists(case['image_path']) else None\\n\",\n        \"        audio_paths = None\\n\",\n        \"\\n\",\n        \"        gen = vlm.generate_stream(\\n\",\n        \"            formatted_prompt,\\n\",\n        \"            config=GenerationConfig(\\n\",\n        \"                max_tokens=max_tokens,\\n\",\n        \"                image_paths=image_paths,\\n\",\n        \"                audio_paths=audio_paths\\n\",\n        \"            )\\n\",\n        \"        )\\n\",\n        \"        result = None\\n\",\n        \"        try:\\n\",\n        \"            while True:\\n\",\n        \"                token = next(gen)\\n\",\n        \"                print(token, end=\\\"\\\", flush=True)\\n\",\n        \"                response_buffer.write(token)\\n\",\n        \"        except StopIteration as e:\\n\",\n        \"            result = e.value\\n\",\n        \"\\n\",\n        \"        # Get profiling data\\n\",\n        \"        if result and hasattr(result, \\\"profile_data\\\") and result.profile_data:\\n\",\n        \"            print(f\\\"\\\\n{result.profile_data}\\\")\\n\",\n        \"\\n\",\n        \"        # Add assistant response to conversation history\\n\",\n        \"        conversation.append(\\n\",\n        \"            VlmChatMessage(\\n\",\n        \"                role=\\\"assistant\\\",\\n\",\n        \"                contents=[\\n\",\n        \"                    VlmContent(type=\\\"text\\\", text=response_buffer.getvalue())\\n\",\n        \"                ]\\n\",\n        \"            )\\n\",\n        \"        )\\n\",\n        \"        print(\\\"\\\\n\\\" + \\\"=\\\" * 50)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"vlm_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 3. Embedder Inference\\n\",\n        \"\\n\",\n        \"Using embedding models for text vectorization and similarity computation.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import numpy as np\\n\",\n        \"import os\\n\",\n        \"from nexaai.embedding import Embedder\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def embedder_example():\\n\",\n        \"    \\\"\\\"\\\"Embedder Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Embedder Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID for MLX Community embedding model\\n\",\n        \"    model_name = \\\"mlx-community/embeddinggemma-300m-bf16\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"mlx\\\"\\n\",\n        \"    batch_size = 2\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"    print(f\\\"Batch size: {batch_size}\\\")\\n\",\n        \"\\n\",\n        \"    # Create embedder instance\\n\",\n        \"    embedder = Embedder.from_(model=model_name, plugin_id=plugin_id)\\n\",\n        \"    print('Embedder loaded successfully!')\\n\",\n        \"\\n\",\n        \"    # Get embedding dimension\\n\",\n        \"    dim = embedder.embedding_dim()\\n\",\n        \"    print(f\\\"Dimension: {dim}\\\")\\n\",\n        \"\\n\",\n        \"    # Example texts\\n\",\n        \"    texts = [\\n\",\n        \"        \\\"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\\\",\\n\",\n        \"        \\\"Nexa AI allows you to run state-of-the-art AI models locally on CPU, GPU, or NPU — from instant use cases to production deployments.\\\",\\n\",\n        \"        \\\"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\\\",\\n\",\n        \"        \\\"The capital of France is Paris.\\\",\\n\",\n        \"        \\\"NPU acceleration provides significant performance improvements for AI workloads.\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    query = \\\"what is on device AI\\\"\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Generating Embeddings ===\\\")\\n\",\n        \"    print(f\\\"Processing {len(texts)} texts...\\\")\\n\",\n        \"\\n\",\n        \"    # Generate embeddings\\n\",\n        \"    result = embedder.embed(\\n\",\n        \"        texts=texts,\\n\",\n        \"        batch_size=batch_size,\\n\",\n        \"    )\\n\",\n        \"    embeddings = result.embeddings\\n\",\n        \"\\n\",\n        \"    print(f\\\"Successfully generated {len(embeddings)} embeddings\\\")\\n\",\n        \"\\n\",\n        \"    # Display embedding information\\n\",\n        \"    print(f\\\"\\\\n=== Embedding Details ===\\\")\\n\",\n        \"    for i, (text, embedding) in enumerate(zip(texts, embeddings)):\\n\",\n        \"        print(f\\\"\\\\nText {i + 1}:\\\")\\n\",\n        \"        print(f\\\"  Content: {text}\\\")\\n\",\n        \"        print(f\\\"  Embedding shape: {len(embedding)} dimensions\\\")\\n\",\n        \"        print(f\\\"  First 10 elements: {embedding[:10]}\\\")\\n\",\n        \"        print(\\\"-\\\" * 70)\\n\",\n        \"\\n\",\n        \"    # Query processing\\n\",\n        \"    print(f\\\"\\\\n=== Query Processing ===\\\")\\n\",\n        \"    print(f\\\"Query: '{query}'\\\")\\n\",\n        \"\\n\",\n        \"    query_result = embedder.embed(\\n\",\n        \"        texts=[query],\\n\",\n        \"        batch_size=1,\\n\",\n        \"    )\\n\",\n        \"    query_embedding = query_result.embeddings[0]\\n\",\n        \"\\n\",\n        \"    print(f\\\"Query embedding shape: {len(query_embedding)} dimensions\\\")\\n\",\n        \"\\n\",\n        \"    # Similarity analysis\\n\",\n        \"    print(f\\\"\\\\n=== Similarity Analysis (Inner Product) ===\\\")\\n\",\n        \"    similarities = []\\n\",\n        \"\\n\",\n        \"    for i, (text, embedding) in enumerate(zip(texts, embeddings)):\\n\",\n        \"        inner_product = sum(a * b for a, b in zip(query_embedding, embedding))\\n\",\n        \"        similarities.append((i, text, inner_product))\\n\",\n        \"\\n\",\n        \"        print(f\\\"\\\\nText {i + 1}:\\\")\\n\",\n        \"        print(f\\\"  Content: {text}\\\")\\n\",\n        \"        print(f\\\"  Inner product with query: {inner_product:.6f}\\\")\\n\",\n        \"        print(\\\"-\\\" * 70)\\n\",\n        \"\\n\",\n        \"    # Sort and display most similar texts\\n\",\n        \"    similarities.sort(key=lambda x: x[2], reverse=True)\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Similarity Ranking Results ===\\\")\\n\",\n        \"    for rank, (idx, text, score) in enumerate(similarities, 1):\\n\",\n        \"        print(f\\\"Rank {rank}: [{score:.6f}] {text}\\\")\\n\",\n        \"\\n\",\n        \"    return embeddings, query_embedding, similarities\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"embeddings, query_emb, similarities = embedder_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 4. ASR (Automatic Speech Recognition) Inference\\n\",\n        \"\\n\",\n        \"Using speech recognition models for speech-to-text transcription.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"import time\\n\",\n        \"\\n\",\n        \"from nexaai.asr import ASR\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def asr_example():\\n\",\n        \"    \\\"\\\"\\\"ASR Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== ASR Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface Repo ID\\n\",\n        \"    model_name = \\\"NexaAI/parakeet-tdt-0.6b-v2-MLX\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"mlx\\\"\\n\",\n        \"    # Example audio file (replace with your actual audio file)\\n\",\n        \"    audio_file = r\\\"path/to/audio\\\"  # Replace with actual audio file path\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    audio_path = os.path.expanduser(audio_file)\\n\",\n        \"\\n\",\n        \"    if not os.path.exists(audio_path):\\n\",\n        \"        raise FileNotFoundError(f\\\"Audio file not found: {audio_path}\\\")\\n\",\n        \"\\n\",\n        \"    # Create ASR instance\\n\",\n        \"    asr = ASR.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        plugin_id=plugin_id,\\n\",\n        \"        device_id=None,\\n\",\n        \"    )\\n\",\n        \"    print('ASR model loaded successfully!')\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Starting Transcription ===\\\")\\n\",\n        \"    start_time = time.time()\\n\",\n        \"\\n\",\n        \"    # Perform transcription\\n\",\n        \"    result = asr.transcribe(\\n\",\n        \"        audio_path=audio_path,\\n\",\n        \"        language=\\\"en\\\",\\n\",\n        \"        timestamps=\\\"segment\\\",\\n\",\n        \"        beam_size=5,\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    end_time = time.time()\\n\",\n        \"    transcription_time = end_time - start_time\\n\",\n        \"\\n\",\n        \"    # Display results\\n\",\n        \"    print(f\\\"\\\\n=== Transcription Results ===\\\")\\n\",\n        \"    print(f\\\"Transcription: {result.transcript}\\\")\\n\",\n        \"    print(f\\\"Processing time: {transcription_time:.2f} seconds\\\")\\n\",\n        \"\\n\",\n        \"    return result\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"result = asr_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 5. Reranker Inference\\n\",\n        \"\\n\",\n        \"Using reranking models for document reranking. \\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"from nexaai.rerank import Reranker\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def reranker_example():\\n\",\n        \"    \\\"\\\"\\\"Reranker Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Reranker Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/jina-v2-rerank-mlx\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"mlx\\\"\\n\",\n        \"    batch_size = 4\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"    print(f\\\"Batch size: {batch_size}\\\")\\n\",\n        \"\\n\",\n        \"    # Create reranker instance\\n\",\n        \"    reranker = Reranker.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        plugin_id=plugin_id,\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    # Example queries and documents\\n\",\n        \"    queries = [\\n\",\n        \"        \\\"Where is on-device AI?\\\",\\n\",\n        \"        \\\"What is NPU acceleration?\\\",\\n\",\n        \"        \\\"How does machine learning work?\\\",\\n\",\n        \"        \\\"Tell me about computer vision\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    documents = [\\n\",\n        \"        \\\"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\\\",\\n\",\n        \"        \\\"NPU acceleration provides significant performance improvements for AI workloads on specialized hardware.\\\",\\n\",\n        \"        \\\"Edge computing brings computation and data storage closer to the sources of data.\\\",\\n\",\n        \"        \\\"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\\\",\\n\",\n        \"        \\\"The capital of France is Paris, a beautiful city known for its art and culture.\\\",\\n\",\n        \"        \\\"Machine learning is a subset of artificial intelligence that enables computers to learn without being explicitly programmed.\\\",\\n\",\n        \"        \\\"Computer vision is a field of artificial intelligence that trains computers to interpret and understand visual information.\\\",\\n\",\n        \"        \\\"Deep learning uses neural networks with multiple layers to model and understand complex patterns in data.\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Document Reranking Test ===\\\")\\n\",\n        \"    print(f\\\"Number of documents: {len(documents)}\\\")\\n\",\n        \"\\n\",\n        \"    # Rerank for each query\\n\",\n        \"    for i, query in enumerate(queries, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Query {i} ---\\\")\\n\",\n        \"        print(f\\\"Query: '{query}'\\\")\\n\",\n        \"        print(\\\"-\\\" * 50)\\n\",\n        \"\\n\",\n        \"        # Perform reranking\\n\",\n        \"        result = reranker.rerank(\\n\",\n        \"            query=query,\\n\",\n        \"            documents=documents,\\n\",\n        \"            batch_size=batch_size,\\n\",\n        \"        )\\n\",\n        \"        scores = result.scores\\n\",\n        \"\\n\",\n        \"        # Create (document, score) pairs and sort\\n\",\n        \"        doc_scores = list(zip(documents, scores))\\n\",\n        \"        doc_scores.sort(key=lambda x: x[1], reverse=True)\\n\",\n        \"\\n\",\n        \"        # Display ranking results\\n\",\n        \"        print(\\\"Reranking results:\\\")\\n\",\n        \"        for rank, (doc, score) in enumerate(doc_scores, 1):\\n\",\n        \"            print(f\\\"  {rank:2d}. [{score:.4f}] {doc}\\\")\\n\",\n        \"\\n\",\n        \"        # Display most relevant documents\\n\",\n        \"        print(f\\\"\\\\nMost relevant documents (top 3):\\\")\\n\",\n        \"        for rank, (doc, score) in enumerate(doc_scores[:3], 1):\\n\",\n        \"            print(f\\\"  {rank}. {doc}\\\")\\n\",\n        \"\\n\",\n        \"        print(\\\"=\\\" * 80)\\n\",\n        \"\\n\",\n        \"    return reranker\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"reranker = reranker_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 6. Computer Vision (CV) Inference\\n\",\n        \"\\n\",\n        \"Run computer vision tasks (e.g., OCR/text recognition) on images.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"from nexaai.cv import CV\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def cv_ocr_example():\\n\",\n        \"    \\\"\\\"\\\"CV OCR example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== CV OCR Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/paddle-ocr-mlx\\\"\\n\",\n        \"\\n\",\n        \"    image_path = r\\\"path/to/image\\\"\\n\",\n        \"\\n\",\n        \"    image_path = os.path.expanduser(image_path)\\n\",\n        \"\\n\",\n        \"    if not os.path.exists(image_path):\\n\",\n        \"        raise FileNotFoundError(f\\\"Image file not found: {image_path}\\\")\\n\",\n        \"\\n\",\n        \"    cv = CV.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        capabilities=0,  # 0=OCR\\n\",\n        \"        plugin_id='mlx',\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    results = cv.infer(image_path)\\n\",\n        \"\\n\",\n        \"    print(f\\\"Number of results: {len(results.results)}\\\")\\n\",\n        \"    for result in results.results:\\n\",\n        \"        print(f\\\"[{result.confidence:.2f}] {result.text}\\\")\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"cv_ocr_example()\\n\"\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"nexaai\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.10.19\"\n    }\n  },\n  \"nbformat\": 4,\n  \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "bindings/python/notebook/windows(arm64).ipynb",
    "content": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"# NexaAI NPU Inference Examples\\n\",\n        \"\\n\",\n        \"This notebook demonstrates how to use the NexaAI SDK for various AI inference tasks on NPU devices, including:\\n\",\n        \"\\n\",\n        \"- **LLM (Large Language Model)**: Text generation and conversation\\n\",\n        \"- **VLM (Vision Language Model)**: Multimodal understanding and generation\\n\",\n        \"- **Embedder**: Text vectorization and similarity computation\\n\",\n        \"- **Reranker**: Document reranking\\n\",\n        \"- **ASR (Automatic Speech Recognition)**: Speech-to-text transcription\\n\",\n        \"- **CV (Computer Vision)**: OCR/text recognition\\n\",\n        \"\\n\",\n        \"## Prerequisites\\n\",\n        \"\\n\",\n        \"### 1. Install the correct Python version\\n\",\n        \"\\n\",\n        \"If you prefer, we also offer a video tutorial for the installation. Check it out [here](https://www.youtube.com/watch?v=ziXKPRX0Ufo).\\n\",\n        \"\\n\",\n        \"NexaAI requires **Python 3.11 – 3.13 (ARM64 build)** on Windows ARM.\\n\",\n        \"Please **download and install the official ARM64 Python** from the [python-3.11.1-arm64.exe](https://www.python.org/ftp/python/3.11.1/python-3.11.1-arm64.exe). Make sure you read the instructions below carefully before proceeding.\\n\",\n        \"\\n\",\n        \"> ❗ **IMPORTANT**: Make sure you select \\\"Add python.exe to PATH\\\" on the first screen of the installation wizard.\\n\",\n        \"\\n\",\n        \"> 🛑 Make sure you restart the terminal or your IDE after installation.\\n\",\n        \"\\n\",\n        \"> ⚠️ Do **not** use Conda or x86 builds — they are incompatible with native ARM64 binaries. If you are in a conda environment, run `conda deactivate` first.\\n\",\n        \"\\n\",\n        \"Verify the installation:\\n\",\n        \"\\n\",\n        \"In case your environment path gets overriden by some environment manager, we recommend you to run the following commands to restore PATH variable from system settings.\\n\",\n        \"```powershell\\n\",\n        \"$systemPath = [Environment]::GetEnvironmentVariable('Path', 'Machine')\\n\",\n        \"$userPath   = [Environment]::GetEnvironmentVariable('Path', 'User')\\n\",\n        \"$env:Path   = \\\"$userPath;$systemPath\\\"\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"Then verify your python executable has the correct architecture and version (3.11 - 3.13)\\n\",\n        \"```sh\\n\",\n        \"python -c \\\"import sys, platform; print(f'Python version: {sys.version}')\\\"\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"Your output should look like:\\n\",\n        \"\\n\",\n        \"> Python version: 3.11.0 (main, Oct 24 2022, 18:15:22) [MSC v.1933 64 bit (ARM64)]\\n\",\n        \"\\n\",\n        \"Expected output must contain version `3.11.0` and architecture `ARM64`.\\n\",\n        \"\\n\",\n        \"If it does show `AMD64` or incorrect version, try the following:\\n\",\n        \"\\n\",\n        \"- (If you have conda installed) Run `conda deactivate` to deactivate the current conda environment.\\n\",\n        \"- (If your `python` executable points to the x86 version) You may need to make the ARM64 Python come before the x86 Python in your PATH.\\n\",\n        \"  - Hit the `Win` key, and type `env`, and hit Enter to select `Edit the system environment variables` setting.\\n\",\n        \"  - Click on `Environment Variables...` button.\\n\",\n        \"  - Select `Path` and click `Edit...`.\\n\",\n        \"  - Find your ARM64 Python installation path, and move it to the top of the list.\\n\",\n        \"  - Hit `OK` for several times to close all the dialogs and save the changes.\\n\",\n        \"- (If you forgot to select \\\"Add python.exe to PATH\\\" on the first screen of the installation wizard)\\n\",\n        \"  - Run the installation wizard again, follow the instructions to remove the current installation, and then reinstall from the Wizard. Make sure to select \\\"Add python.exe to PATH\\\" this time.\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 2. Create and activate a virtual environment\\n\",\n        \"\\n\",\n        \"`cd` to the current project root directory `cd path/to/nexa-sdk`.\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python -m venv nexaai-env\\n\",\n        \"nexaai-env\\\\Scripts\\\\activate\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 3. Install the NexaAI SDK\\n\",\n        \"\\n\",\n        \"```bash\\n\",\n        \"pip install nexaai -v\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 4. Select the venv as your Jupyter Notebook kernel\\n\",\n        \"\\n\",\n        \"- Depending the editor you are using, the way to change kernel might be different. For Cursor / VS Code, they are located at the top right corner of you code window.\\n\",\n        \"- Look for and select the `nexaai-env`, or the custom virtual environment you have created. The kernel should automatically reload in most IDEs.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"### Verification of Kernel\\n\",\n        \"\\n\",\n        \"Run the following code to ensure you have the right kernel running.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import sys\\n\",\n        \"import platform\\n\",\n        \"\\n\",\n        \"# ANSI color codes\\n\",\n        \"RED = \\\"\\\\033[91m\\\"\\n\",\n        \"GREEN = \\\"\\\\033[92m\\\"\\n\",\n        \"YELLOW = \\\"\\\\033[93m\\\"\\n\",\n        \"BOLD = \\\"\\\\033[1m\\\"\\n\",\n        \"RESET = \\\"\\\\033[0m\\\"\\n\",\n        \"\\n\",\n        \"min_ver = (3, 11)\\n\",\n        \"max_ver = (3, 13)\\n\",\n        \"current_ver = sys.version_info\\n\",\n        \"arch = platform.machine()\\n\",\n        \"\\n\",\n        \"if not (min_ver <= (current_ver.major, current_ver.minor) < max_ver) or arch.lower() != \\\"arm64\\\":\\n\",\n        \"    print(\\\"\\\\n\\\" + \\\"=\\\" * 80)\\n\",\n        \"    print(f\\\"{BOLD}{RED}WARNING: Your Python version or architecture is not compatible.{RESET}\\\")\\n\",\n        \"    print(f\\\"Detected version: {current_ver.major}.{current_ver.minor}, architecture: {arch}\\\")\\n\",\n        \"    print(f\\\"{YELLOW}Required: Python 3.11 - 3.13 & architecture 'arm64'.{RESET}\\\")\\n\",\n        \"    print(\\\"=\\\" * 80)\\n\",\n        \"    print(f\\\"{RED}DO NOT continue to the following code!{RESET}\\\\n\\\")\\n\",\n        \"    print(\\\"To install arm64 Python:\\\")\\n\",\n        \"    print(\\\"  - Download Python 3.11-3.13 for arm64 from https://www.python.org/downloads/\\\")\\n\",\n        \"    print(\\\"  - Install and verify by running: python3 --version and python3 -c 'import platform; print(platform.machine())'\\\")\\n\",\n        \"    print(\\\"  - Launch Jupyter and make sure to select the arm64 Python kernel in 'Kernel > Change kernel'.\\\")\\n\",\n        \"    sys.exit(1)\\n\",\n        \"else:\\n\",\n        \"    print(f\\\"{GREEN}[VERIFICATION PASSED] Python version and architecture are correct. You may continue to the following sections.{RESET}\\\")\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## Authentication Setup\\n\",\n        \"\\n\",\n        \"Before running any examples, you need to set up your NexaAI authentication token.\\n\",\n        \"\\n\",\n        \"### Set Token in Code\\n\",\n        \"\\n\",\n        \"Replace `\\\"YOUR_NEXA_TOKEN_HERE\\\"` with your actual NexaAI token from [https://sdk.nexa.ai/](https://sdk.nexa.ai/):\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"\\n\",\n        \"# Replace \\\"YOUR_NEXA_TOKEN_HERE\\\" with your actual token from https://sdk.nexa.ai/\\n\",\n        \"os.environ[\\\"NEXA_TOKEN\\\"] = \\\"YOUR_NEXA_TOKEN_HERE\\\"\\n\",\n        \"# Suppress HF warnings\\n\",\n        \"os.environ[\\\"HF_HUB_VERBOSITY\\\"] = \\\"error\\\"\\n\",\n        \"\\n\",\n        \"assert os.environ.get(\\\"NEXA_TOKEN\\\", \\\"\\\").startswith(\\n\",\n        \"    \\\"key/\\\"), \\\"ERROR: NEXA_TOKEN must start with 'key/'. Please check your token.\\\"\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 1. LLM (Large Language Model) NPU Inference\\n\",\n        \"\\n\",\n        \"Using NPU-accelerated large language models for text generation and conversation. Llama3.2-3B-NPU-Turbo is specifically optimized for NPU.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import io\\n\",\n        \"import os\\n\",\n        \"\\n\",\n        \"from nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def llm_npu_example():\\n\",\n        \"    \\\"\\\"\\\"LLM NPU inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== LLM NPU Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface Repo ID\\n\",\n        \"    model_name = \\\"NexaAI/Llama3.2-3B-NPU-Turbo\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\Llama3.2-3B-NPU-Turbo\\\\weights-1-3.nexa\\\")\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"npu\\\"\\n\",\n        \"    max_tokens = 100\\n\",\n        \"    system_message = \\\"You are a helpful assistant.\\\"\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    # Create model instance\\n\",\n        \"    config = ModelConfig()\\n\",\n        \"    llm = LLM.from_(model=model_name, plugin_id=plugin_id, config=config)\\n\",\n        \"\\n\",\n        \"    # Create conversation history\\n\",\n        \"    conversation = [LlmChatMessage(role=\\\"system\\\", content=system_message)]\\n\",\n        \"\\n\",\n        \"    # Example conversations\\n\",\n        \"    test_prompts = [\\n\",\n        \"        \\\"What is artificial intelligence?\\\",\\n\",\n        \"        \\\"Explain the benefits of on-device AI processing.\\\",\\n\",\n        \"        \\\"How does NPU acceleration work?\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    for i, prompt in enumerate(test_prompts, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Conversation {i} ---\\\")\\n\",\n        \"        print(f\\\"User: {prompt}\\\")\\n\",\n        \"\\n\",\n        \"        # Add user message\\n\",\n        \"        conversation.append(LlmChatMessage(role=\\\"user\\\", content=prompt))\\n\",\n        \"\\n\",\n        \"        # Apply chat template\\n\",\n        \"        formatted_prompt = llm.apply_chat_template(conversation)\\n\",\n        \"\\n\",\n        \"        # Generate response\\n\",\n        \"        print(\\\"Assistant: \\\", end=\\\"\\\", flush=True)\\n\",\n        \"        response_buffer = io.StringIO()\\n\",\n        \"\\n\",\n        \"        gen = llm.generate_stream(formatted_prompt, GenerationConfig(max_tokens=max_tokens))\\n\",\n        \"        result = None\\n\",\n        \"        try:\\n\",\n        \"            while True:\\n\",\n        \"                token = next(gen)\\n\",\n        \"                print(token, end=\\\"\\\", flush=True)\\n\",\n        \"                response_buffer.write(token)\\n\",\n        \"        except StopIteration as e:\\n\",\n        \"            result = e.value\\n\",\n        \"\\n\",\n        \"        # Get profiling data\\n\",\n        \"        if result and hasattr(result, \\\"profile_data\\\") and result.profile_data:\\n\",\n        \"            print(f\\\"\\\\n{result.profile_data}\\\")\\n\",\n        \"\\n\",\n        \"        # Add assistant response to conversation history\\n\",\n        \"        conversation.append(LlmChatMessage(role=\\\"assistant\\\", content=response_buffer.getvalue()))\\n\",\n        \"        print(\\\"\\\\n\\\" + \\\"=\\\" * 50)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"llm_npu_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 2. VLM (Vision Language Model) NPU Inference\\n\",\n        \"\\n\",\n        \"Using NPU-accelerated vision language models for multimodal understanding and generation. OmniNeural-4B supports joint processing of images and text.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"import io\\n\",\n        \"\\n\",\n        \"from nexaai import (\\n\",\n        \"    GenerationConfig,\\n\",\n        \"    ModelConfig,\\n\",\n        \"    VlmChatMessage,\\n\",\n        \"    VlmContent,\\n\",\n        \")\\n\",\n        \"from nexaai.vlm import VLM\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def vlm_npu_example():\\n\",\n        \"    \\\"\\\"\\\"VLM NPU inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== VLM NPU Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/OmniNeural-4B\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\OmniNeural-4B\\\\weights-1-8.nexa\\\")\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"npu\\\"\\n\",\n        \"    max_tokens = 100\\n\",\n        \"    system_message = \\\"You are a helpful assistant that can understand images and text.\\\"\\n\",\n        \"    image_path = '/your/image/path'  # Replace with actual image path if available\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    # Check for image existence\\n\",\n        \"    if not (image_path and os.path.exists(image_path)):\\n\",\n        \"        print(\\n\",\n        \"            f\\\"\\\\033[93mWARNING: The specified image_path ('{image_path}') does not exist or was not provided. Multimodal prompts will not include image input.\\\\033[0m\\\")\\n\",\n        \"\\n\",\n        \"    # Create model instance\\n\",\n        \"    config = ModelConfig()\\n\",\n        \"    vlm = VLM.from_(model=model_name, config=config, plugin_id=plugin_id)\\n\",\n        \"\\n\",\n        \"    # Create conversation history\\n\",\n        \"    conversation = [\\n\",\n        \"        VlmChatMessage(\\n\",\n        \"            role=\\\"system\\\",\\n\",\n        \"            contents=[VlmContent(type=\\\"text\\\", text=system_message)]\\n\",\n        \"        )\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    # Example multimodal conversations\\n\",\n        \"    test_cases = [\\n\",\n        \"        {\\n\",\n        \"            \\\"text\\\": \\\"What do you see in this image?\\\",\\n\",\n        \"            \\\"image_path\\\": image_path\\n\",\n        \"        }\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    for i, case in enumerate(test_cases, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Multimodal Conversation {i} ---\\\")\\n\",\n        \"        print(f\\\"User: {case['text']}\\\")\\n\",\n        \"\\n\",\n        \"        # Build message content\\n\",\n        \"        contents = []\\n\",\n        \"        if case['text']:\\n\",\n        \"            contents.append(VlmContent(type=\\\"text\\\", text=case['text']))\\n\",\n        \"\\n\",\n        \"        # Add image content if available\\n\",\n        \"        if case['image_path'] and os.path.exists(case['image_path']):\\n\",\n        \"            contents.append(VlmContent(type=\\\"image\\\", text=case['image_path']))\\n\",\n        \"            print(f\\\"Including image: {case['image_path']}\\\")\\n\",\n        \"\\n\",\n        \"        # Add user message\\n\",\n        \"        conversation.append(VlmChatMessage(role=\\\"user\\\", contents=contents))\\n\",\n        \"\\n\",\n        \"        # Apply chat template\\n\",\n        \"        formatted_prompt = vlm.apply_chat_template(conversation)\\n\",\n        \"\\n\",\n        \"        # Generate response\\n\",\n        \"        print(\\\"Assistant: \\\", end=\\\"\\\", flush=True)\\n\",\n        \"        response_buffer = io.StringIO()\\n\",\n        \"\\n\",\n        \"        # Prepare image and audio paths\\n\",\n        \"        image_paths = [case['image_path']] if case['image_path'] and os.path.exists(case['image_path']) else None\\n\",\n        \"        audio_paths = None\\n\",\n        \"\\n\",\n        \"        gen = vlm.generate_stream(\\n\",\n        \"            formatted_prompt,\\n\",\n        \"            config=GenerationConfig(\\n\",\n        \"                max_tokens=max_tokens,\\n\",\n        \"                image_paths=image_paths,\\n\",\n        \"                audio_paths=audio_paths\\n\",\n        \"            )\\n\",\n        \"        )\\n\",\n        \"        result = None\\n\",\n        \"        try:\\n\",\n        \"            while True:\\n\",\n        \"                token = next(gen)\\n\",\n        \"                print(token, end=\\\"\\\", flush=True)\\n\",\n        \"                response_buffer.write(token)\\n\",\n        \"        except StopIteration as e:\\n\",\n        \"            result = e.value\\n\",\n        \"\\n\",\n        \"        # Get profiling data\\n\",\n        \"        if result and hasattr(result, \\\"profile_data\\\") and result.profile_data:\\n\",\n        \"            print(f\\\"\\\\n{result.profile_data}\\\")\\n\",\n        \"\\n\",\n        \"        # Add assistant response to conversation history\\n\",\n        \"        conversation.append(\\n\",\n        \"            VlmChatMessage(\\n\",\n        \"                role=\\\"assistant\\\",\\n\",\n        \"                contents=[\\n\",\n        \"                    VlmContent(type=\\\"text\\\", text=response_buffer.getvalue())\\n\",\n        \"                ]\\n\",\n        \"            )\\n\",\n        \"        )\\n\",\n        \"        print(\\\"\\\\n\\\" + \\\"=\\\" * 50)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"vlm_npu_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 3. Embedder NPU Inference\\n\",\n        \"\\n\",\n        \"Using NPU-accelerated embedding models for text vectorization and similarity computation. embeddinggemma-300m-npu is a lightweight embedding model specifically optimized for NPU.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import numpy as np\\n\",\n        \"import os\\n\",\n        \"from nexaai.embedding import Embedder\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def embedder_npu_example():\\n\",\n        \"    \\\"\\\"\\\"Embedder NPU inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Embedder NPU Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/embeddinggemma-300m-npu\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\embeddinggemma-300m-npu\\\\weights-1-2.nexa\\\")\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"npu\\\"\\n\",\n        \"    batch_size = 2\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"    print(f\\\"Batch size: {batch_size}\\\")\\n\",\n        \"\\n\",\n        \"    # Create embedder instance\\n\",\n        \"    embedder = Embedder.from_(model=model_name, plugin_id=plugin_id)\\n\",\n        \"    print('Embedder loaded successfully!')\\n\",\n        \"\\n\",\n        \"    # Get embedding dimension\\n\",\n        \"    dim = embedder.embedding_dim()\\n\",\n        \"    print(f\\\"Dimension: {dim}\\\")\\n\",\n        \"\\n\",\n        \"    # Example texts\\n\",\n        \"    texts = [\\n\",\n        \"        \\\"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\\\",\\n\",\n        \"        \\\"Nexa AI allows you to run state-of-the-art AI models locally on CPU, GPU, or NPU — from instant use cases to production deployments.\\\",\\n\",\n        \"        \\\"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\\\",\\n\",\n        \"        \\\"The capital of France is Paris.\\\",\\n\",\n        \"        \\\"NPU acceleration provides significant performance improvements for AI workloads.\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    query = \\\"what is on device AI\\\"\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Generating Embeddings ===\\\")\\n\",\n        \"    print(f\\\"Processing {len(texts)} texts...\\\")\\n\",\n        \"\\n\",\n        \"    # Generate embeddings\\n\",\n        \"    result = embedder.embed(\\n\",\n        \"        texts=texts,\\n\",\n        \"        batch_size=batch_size,\\n\",\n        \"    )\\n\",\n        \"    embeddings = result.embeddings\\n\",\n        \"\\n\",\n        \"    print(f\\\"Successfully generated {len(embeddings)} embeddings\\\")\\n\",\n        \"\\n\",\n        \"    # Display embedding information\\n\",\n        \"    print(f\\\"\\\\n=== Embedding Details ===\\\")\\n\",\n        \"    for i, (text, embedding) in enumerate(zip(texts, embeddings)):\\n\",\n        \"        print(f\\\"\\\\nText {i + 1}:\\\")\\n\",\n        \"        print(f\\\"  Content: {text}\\\")\\n\",\n        \"        print(f\\\"  Embedding shape: {len(embedding)} dimensions\\\")\\n\",\n        \"        print(f\\\"  First 10 elements: {embedding[:10]}\\\")\\n\",\n        \"        print(\\\"-\\\" * 70)\\n\",\n        \"\\n\",\n        \"    # Query processing\\n\",\n        \"    print(f\\\"\\\\n=== Query Processing ===\\\")\\n\",\n        \"    print(f\\\"Query: '{query}'\\\")\\n\",\n        \"\\n\",\n        \"    query_result = embedder.embed(\\n\",\n        \"        texts=[query],\\n\",\n        \"        batch_size=1,\\n\",\n        \"    )\\n\",\n        \"    query_embedding = query_result.embeddings[0]\\n\",\n        \"\\n\",\n        \"    print(f\\\"Query embedding shape: {len(query_embedding)} dimensions\\\")\\n\",\n        \"\\n\",\n        \"    # Similarity analysis\\n\",\n        \"    print(f\\\"\\\\n=== Similarity Analysis (Inner Product) ===\\\")\\n\",\n        \"    similarities = []\\n\",\n        \"\\n\",\n        \"    for i, (text, embedding) in enumerate(zip(texts, embeddings)):\\n\",\n        \"        inner_product = sum(a * b for a, b in zip(query_embedding, embedding))\\n\",\n        \"        similarities.append((i, text, inner_product))\\n\",\n        \"\\n\",\n        \"        print(f\\\"\\\\nText {i + 1}:\\\")\\n\",\n        \"        print(f\\\"  Content: {text}\\\")\\n\",\n        \"        print(f\\\"  Inner product with query: {inner_product:.6f}\\\")\\n\",\n        \"        print(\\\"-\\\" * 70)\\n\",\n        \"\\n\",\n        \"    # Sort and display most similar texts\\n\",\n        \"    similarities.sort(key=lambda x: x[2], reverse=True)\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Similarity Ranking Results ===\\\")\\n\",\n        \"    for rank, (idx, text, score) in enumerate(similarities, 1):\\n\",\n        \"        print(f\\\"Rank {rank}: [{score:.6f}] {text}\\\")\\n\",\n        \"\\n\",\n        \"    return embeddings, query_embedding, similarities\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"embeddings, query_emb, similarities = embedder_npu_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 4. ASR (Automatic Speech Recognition) NPU Inference\\n\",\n        \"\\n\",\n        \"Using NPU-accelerated speech recognition models for speech-to-text transcription. parakeet-npu provides high-quality speech recognition with NPU acceleration.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"import time\\n\",\n        \"\\n\",\n        \"from nexaai.asr import ASR\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def asr_npu_example():\\n\",\n        \"    \\\"\\\"\\\"ASR NPU inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== ASR NPU Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface Repo ID\\n\",\n        \"    model_name = \\\"NexaAI/parakeet-npu\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\parakeet-npu\\\\weights-1-5.nexa\\\")\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"npu\\\"\\n\",\n        \"    # Example audio file (replace with your actual audio file)\\n\",\n        \"    audio_file = r\\\"path/to/audio\\\"  # Replace with actual audio file path\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    audio_path = os.path.expanduser(audio_file)\\n\",\n        \"\\n\",\n        \"    if not os.path.exists(audio_path):\\n\",\n        \"        raise FileNotFoundError(f\\\"Audio file not found: {audio_path}\\\")\\n\",\n        \"\\n\",\n        \"    # Create ASR instance\\n\",\n        \"    asr = ASR.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        plugin_id=plugin_id,\\n\",\n        \"        device_id=None,\\n\",\n        \"    )\\n\",\n        \"    print('ASR model loaded successfully!')\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Starting Transcription ===\\\")\\n\",\n        \"    start_time = time.time()\\n\",\n        \"\\n\",\n        \"    # Perform transcription\\n\",\n        \"    result = asr.transcribe(\\n\",\n        \"        audio_path=audio_path,\\n\",\n        \"        language=\\\"en\\\",\\n\",\n        \"        timestamps=\\\"segment\\\",\\n\",\n        \"        beam_size=5,\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    end_time = time.time()\\n\",\n        \"    transcription_time = end_time - start_time\\n\",\n        \"\\n\",\n        \"    # Display results\\n\",\n        \"    print(f\\\"\\\\n=== Transcription Results ===\\\")\\n\",\n        \"    print(f\\\"Transcription: {result.transcript}\\\")\\n\",\n        \"    print(f\\\"Processing time: {transcription_time:.2f} seconds\\\")\\n\",\n        \"\\n\",\n        \"    return result\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"result = asr_npu_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 5. Reranker NPU Inference\\n\",\n        \"\\n\",\n        \"Using NPU-accelerated reranking models for document reranking. jina-v2-rerank-npu can perform precise similarity-based document ranking based on queries.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"from nexaai.rerank import Reranker\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def reranker_npu_example():\\n\",\n        \"    \\\"\\\"\\\"Reranker NPU inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Reranker NPU Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/jina-v2-rerank-npu\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\jina-v2-rerank-npu\\\\weights-1-4.nexa\\\")\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"npu\\\"\\n\",\n        \"    batch_size = 4\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"    print(f\\\"Batch size: {batch_size}\\\")\\n\",\n        \"\\n\",\n        \"    # Create reranker instance\\n\",\n        \"    reranker = Reranker.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        plugin_id=plugin_id,\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    # Example queries and documents\\n\",\n        \"    queries = [\\n\",\n        \"        \\\"Where is on-device AI?\\\",\\n\",\n        \"        \\\"What is NPU acceleration?\\\",\\n\",\n        \"        \\\"How does machine learning work?\\\",\\n\",\n        \"        \\\"Tell me about computer vision\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    documents = [\\n\",\n        \"        \\\"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\\\",\\n\",\n        \"        \\\"NPU acceleration provides significant performance improvements for AI workloads on specialized hardware.\\\",\\n\",\n        \"        \\\"Edge computing brings computation and data storage closer to the sources of data.\\\",\\n\",\n        \"        \\\"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\\\",\\n\",\n        \"        \\\"The capital of France is Paris, a beautiful city known for its art and culture.\\\",\\n\",\n        \"        \\\"Machine learning is a subset of artificial intelligence that enables computers to learn without being explicitly programmed.\\\",\\n\",\n        \"        \\\"Computer vision is a field of artificial intelligence that trains computers to interpret and understand visual information.\\\",\\n\",\n        \"        \\\"Deep learning uses neural networks with multiple layers to model and understand complex patterns in data.\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Document Reranking Test ===\\\")\\n\",\n        \"    print(f\\\"Number of documents: {len(documents)}\\\")\\n\",\n        \"\\n\",\n        \"    # Rerank for each query\\n\",\n        \"    for i, query in enumerate(queries, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Query {i} ---\\\")\\n\",\n        \"        print(f\\\"Query: '{query}'\\\")\\n\",\n        \"        print(\\\"-\\\" * 50)\\n\",\n        \"\\n\",\n        \"        # Perform reranking\\n\",\n        \"        result = reranker.rerank(\\n\",\n        \"            query=query,\\n\",\n        \"            documents=documents,\\n\",\n        \"            batch_size=batch_size,\\n\",\n        \"        )\\n\",\n        \"        scores = result.scores\\n\",\n        \"\\n\",\n        \"        # Create (document, score) pairs and sort\\n\",\n        \"        doc_scores = list(zip(documents, scores))\\n\",\n        \"        doc_scores.sort(key=lambda x: x[1], reverse=True)\\n\",\n        \"\\n\",\n        \"        # Display ranking results\\n\",\n        \"        print(\\\"Reranking results:\\\")\\n\",\n        \"        for rank, (doc, score) in enumerate(doc_scores, 1):\\n\",\n        \"            print(f\\\"  {rank:2d}. [{score:.4f}] {doc}\\\")\\n\",\n        \"\\n\",\n        \"        # Display most relevant documents\\n\",\n        \"        print(f\\\"\\\\nMost relevant documents (top 3):\\\")\\n\",\n        \"        for rank, (doc, score) in enumerate(doc_scores[:3], 1):\\n\",\n        \"            print(f\\\"  {rank}. {doc}\\\")\\n\",\n        \"\\n\",\n        \"        print(\\\"=\\\" * 80)\\n\",\n        \"\\n\",\n        \"    return reranker\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"reranker = reranker_npu_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 6. Computer Vision (CV) NPU Inference\\n\",\n        \"\\n\",\n        \"Run NPU-accelerated computer vision tasks (e.g., OCR/text recognition) on images.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"from nexaai.cv import CV\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def cv_ocr_example():\\n\",\n        \"    \\\"\\\"\\\"CV OCR example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== CV OCR Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/paddleocr-npu\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\paddleocr-npu\\\\weights-1-1.nexa\\\")\\n\",\n        \"\\n\",\n        \"    image_path = r\\\"path/to/image\\\"\\n\",\n        \"\\n\",\n        \"    image_path = os.path.expanduser(image_path)\\n\",\n        \"\\n\",\n        \"    if not os.path.exists(image_path):\\n\",\n        \"        raise FileNotFoundError(f\\\"Image file not found: {image_path}\\\")\\n\",\n        \"\\n\",\n        \"    cv = CV.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        capabilities=0,  # 0=OCR\\n\",\n        \"        plugin_id='npu',\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    results = cv.infer(image_path)\\n\",\n        \"\\n\",\n        \"    print(f\\\"Number of results: {len(results.results)}\\\")\\n\",\n        \"    for result in results.results:\\n\",\n        \"        print(f\\\"[{result.confidence:.2f}] {result.text}\\\")\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"cv_ocr_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 7. Speech Diarization NPU Inference\\n\",\n        \"\\n\",\n        \"Run NPU-accelerated speech diarization tasks on audio files.\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"from nexaai.diarize import Diarize\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def diarize_example():\\n\",\n        \"    \\\"\\\"\\\"Diarize NPU inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Diarize NPU Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"NexaAI/Pyannote-NPU\\\"\\n\",\n        \"    # Alternatively, use local path\\n\",\n        \"    # model_name = os.path.expanduser(r\\\"~\\\\.cache\\\\nexa.ai\\\\nexa_sdk\\\\models\\\\NexaAI\\\\Pyannote-NPU\\\\weights-1-1.nexa\\\")\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"npu\\\"\\n\",\n        \"    audio_path = r\\\"path/to/audio\\\"  # Replace with actual audio file path\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    audio_path = os.path.expanduser(audio_path)\\n\",\n        \"\\n\",\n        \"    if not os.path.exists(audio_path):\\n\",\n        \"        raise FileNotFoundError(f\\\"Audio file not found: {audio_path}\\\")\\n\",\n        \"\\n\",\n        \"    # Create Diarize instance\\n\",\n        \"    diarize = Diarize.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        plugin_id=plugin_id,\\n\",\n        \"        device_id=None,\\n\",\n        \"    )\\n\",\n        \"    print('Diarize model loaded successfully!')\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Starting Diarization ===\\\")\\n\",\n        \"\\n\",\n        \"    # Perform diarization\\n\",\n        \"    result = diarize.infer(\\n\",\n        \"        audio_path=audio_path,\\n\",\n        \"        min_speakers=0,  # Auto-detect\\n\",\n        \"        max_speakers=0,  # No limit\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    # Display results\\n\",\n        \"    print(f\\\"\\\\n=== Diarization Results ===\\\")\\n\",\n        \"    print(f\\\"Number of speakers: {result.num_speakers}\\\")\\n\",\n        \"    print(f\\\"Duration: {result.duration:.2f}s\\\")\\n\",\n        \"    print(f\\\"Number of segments: {len(result.segments)}\\\")\\n\",\n        \"    print(\\\"\\\\nSegments:\\\")\\n\",\n        \"    for segment in result.segments:\\n\",\n        \"        print(\\n\",\n        \"            f\\\"[{segment.start_time:.2f}s - {segment.end_time:.2f}s] {segment.speaker_label}\\\"\\n\",\n        \"        )\\n\",\n        \"\\n\",\n        \"    return result\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"result = diarize_example()\\n\"\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"Python 3\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.11.9\"\n    }\n  },\n  \"nbformat\": 4,\n  \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "bindings/python/notebook/windows(x64).ipynb",
    "content": "{\n  \"cells\": [\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"# NexaAI windows(x64) Inference Examples\\n\",\n        \"\\n\",\n        \"This notebook demonstrates how to use the NexaAI SDK for various AI inference tasks on windows(x64), including:\\n\",\n        \"\\n\",\n        \"- **LLM (Large Language Model)**: Text generation and conversation\\n\",\n        \"- **VLM (Vision Language Model)**: Multimodal understanding and generation\\n\",\n        \"- **Embedder**: Text vectorization and similarity computation\\n\",\n        \"- **Reranker**: Document reranking\\n\",\n        \"- **ASR (Automatic Speech Recognition)**: Speech-to-text transcription\\n\",\n        \"- **CV (Computer Vision)**: OCR/text recognition\\n\",\n        \"\\n\",\n        \"## Prerequisites\\n\",\n        \"\\n\",\n        \"### 1. Install the correct Python version\\n\",\n        \"\\n\",\n        \"NexaAI requires **Python 3.10** on windows(x64)\\n\",\n        \"\\n\",\n        \"Verify the installation:\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python -c \\\"import sys, platform; print(f'Python version: {sys.version}')\\\"\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"Your output should look like:\\n\",\n        \"\\n\",\n        \"> Python version: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]\\n\",\n        \"\\n\",\n        \"Expected output must contain version `3.10.x\\n\",\n        \"\\n\",\n        \"Here are suggested ways to install Python 3.10:\\n\",\n        \"\\n\",\n        \"**Using Anaconda**\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"conda create -n nexaai python=3.10\\n\",\n        \"conda activate nexaai\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"After installation, you may need to access Python 3.10 using `python3.10`:\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python3.10 --version\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"### 2. Create and activate a virtual environment\\n\",\n        \"\\n\",\n        \"`cd` to the current project root directory `cd path/to/nexa-sdk`.\\n\",\n        \"\\n\",\n        \"```sh\\n\",\n        \"python -m venv nexaai-env\\n\",\n        \"source nexaai-env/bin/activate\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 3. Install the NexaAI SDK\\n\",\n        \"\\n\",\n        \"```bash\\n\",\n        \"pip install 'nexaai'\\n\",\n        \"```\\n\",\n        \"\\n\",\n        \"---\\n\",\n        \"\\n\",\n        \"### 4. Select the venv as your Jupyter Notebook kernel\\n\",\n        \"\\n\",\n        \"- Depending on the editor you are using, the way to change kernel might be different. For Cursor / VS Code, they are located at the top right corner of your code window.\\n\",\n        \"- Look for and select the `nexaai-env`, or the custom virtual environment you have created. The kernel should automatically reload in most IDEs.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"### Verification of Kernel\\n\",\n        \"\\n\",\n        \"Run the following code to ensure you have the right kernel running.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import sys\\n\",\n        \"import platform\\n\",\n        \"\\n\",\n        \"current_ver = sys.version_info\\n\",\n        \"arch = platform.machine()\\n\",\n        \"\\n\",\n        \"if current_ver.major != 3 or current_ver.minor != 10:\\n\",\n        \"    print(f\\\"❌ Error: Python {current_ver.major}.{current_ver.minor} detected\\\")\\n\",\n        \"    print(\\\"✅ Required: Python 3.10\\\")\\n\",\n        \"    print(\\\"Please install Python 3.10 and restart the kernel.\\\")\\n\",\n        \"    sys.exit(1)\\n\",\n        \"else:\\n\",\n        \"    print(\\\"✅ Python 3.10 ready to proceed!\\\")\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 1. LLM (Large Language Model) Inference\\n\",\n        \"\\n\",\n        \"Using -accelerated large language models for text generation and conversation. Llama3.2-3B--Turbo is specifically optimized for .\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import io\\n\",\n        \"import os\\n\",\n        \"\\n\",\n        \"from nexaai import LLM, GenerationConfig, ModelConfig, LlmChatMessage\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def llm_example():\\n\",\n        \"    \\\"\\\"\\\"LLM Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== LLM Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    model_name = \\\"Qwen/Qwen3-1.7B-GGUF/Qwen3-1.7B-Q8_0.gguf\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"cpu_gpu\\\"\\n\",\n        \"    max_tokens = 100\\n\",\n        \"    system_message = \\\"You are a helpful assistant.\\\"\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"\\n\",\n        \"    # Create model instance\\n\",\n        \"    config = ModelConfig()\\n\",\n        \"    llm = LLM.from_(model=model_name, plugin_id=plugin_id, config=config)\\n\",\n        \"\\n\",\n        \"    # Create conversation history\\n\",\n        \"    conversation = [LlmChatMessage(role=\\\"system\\\", content=system_message)]\\n\",\n        \"\\n\",\n        \"    # Example conversations\\n\",\n        \"    test_prompts = [\\n\",\n        \"        \\\"What is artificial intelligence?\\\",\\n\",\n        \"        \\\"Explain the benefits of on-device AI processing.\\\",\\n\",\n        \"        \\\"How does NPU acceleration work?\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    for i, prompt in enumerate(test_prompts, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Conversation {i} ---\\\")\\n\",\n        \"        print(f\\\"User: {prompt}\\\")\\n\",\n        \"\\n\",\n        \"        # Add user message\\n\",\n        \"        conversation.append(LlmChatMessage(role=\\\"user\\\", content=prompt))\\n\",\n        \"\\n\",\n        \"        # Apply chat template\\n\",\n        \"        formatted_prompt = llm.apply_chat_template(conversation)\\n\",\n        \"\\n\",\n        \"        # Generate response\\n\",\n        \"        print(\\\"Assistant: \\\", end=\\\"\\\", flush=True)\\n\",\n        \"        response_buffer = io.StringIO()\\n\",\n        \"\\n\",\n        \"        gen = llm.generate_stream(formatted_prompt, GenerationConfig(max_tokens=max_tokens))\\n\",\n        \"        result = None\\n\",\n        \"        try:\\n\",\n        \"            while True:\\n\",\n        \"                token = next(gen)\\n\",\n        \"                print(token, end=\\\"\\\", flush=True)\\n\",\n        \"                response_buffer.write(token)\\n\",\n        \"        except StopIteration as e:\\n\",\n        \"            result = e.value\\n\",\n        \"\\n\",\n        \"        # Get profiling data\\n\",\n        \"        if result and hasattr(result, \\\"profile_data\\\") and result.profile_data:\\n\",\n        \"            print(f\\\"\\\\n{result.profile_data}\\\")\\n\",\n        \"\\n\",\n        \"        # Add assistant response to conversation history\\n\",\n        \"        conversation.append(LlmChatMessage(role=\\\"assistant\\\", content=response_buffer.getvalue()))\\n\",\n        \"        print(\\\"\\\\n\\\" + \\\"=\\\" * 50)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"llm_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 2. VLM (Vision Language Model) Inference\\n\",\n        \"\\n\",\n        \"Using vision language models for multimodal understanding and generation. OmniNeural-4B supports joint processing of images and text.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"import io\\n\",\n        \"\\n\",\n        \"from nexaai import (\\n\",\n        \"    GenerationConfig,\\n\",\n        \"    ModelConfig,\\n\",\n        \"    VlmChatMessage,\\n\",\n        \"    VlmContent,\\n\",\n        \")\\n\",\n        \"from nexaai.vlm import VLM\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def vlm_example():\\n\",\n        \"    \\\"\\\"\\\"VLM Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== VLM Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    model_name = \\\"ggml-org/gemma-3-4b-it-GGUF/gemma-3-4b-it-Q4_K_M.gguf\\\"\\n\",\n        \"    mmproj_path = \\\"ggml-org/gemma-3-4b-it-GGUF/mmproj-model-f16.gguf\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"cpu_gpu\\\"\\n\",\n        \"    max_tokens = 100\\n\",\n        \"    system_message = \\\"You are a helpful assistant that can understand images and text.\\\"\\n\",\n        \"    image_path = '/your/image/path'  # Replace with actual image path if available\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"\\n\",\n        \"    # Check for image existence\\n\",\n        \"    if not (image_path and os.path.exists(image_path)):\\n\",\n        \"        print(\\n\",\n        \"            f\\\"\\\\033[93mWARNING: The specified image_path ('{image_path}') does not exist or was not provided. Multimodal prompts will not include image input.\\\\033[0m\\\")\\n\",\n        \"\\n\",\n        \"    # Create model instance\\n\",\n        \"    config = ModelConfig()\\n\",\n        \"    vlm = VLM.from_(model=model_name, mmproj_path=mmproj_path, config=config, plugin_id=plugin_id)\\n\",\n        \"\\n\",\n        \"    # Create conversation history\\n\",\n        \"    conversation = [\\n\",\n        \"        VlmChatMessage(\\n\",\n        \"            role=\\\"system\\\",\\n\",\n        \"            contents=[VlmContent(type=\\\"text\\\", text=system_message)]\\n\",\n        \"        )\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    # Example multimodal conversations\\n\",\n        \"    test_cases = [\\n\",\n        \"        {\\n\",\n        \"            \\\"text\\\": \\\"What do you see in this image?\\\",\\n\",\n        \"            \\\"image_path\\\": image_path\\n\",\n        \"        }\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    for i, case in enumerate(test_cases, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Multimodal Conversation {i} ---\\\")\\n\",\n        \"        print(f\\\"User: {case['text']}\\\")\\n\",\n        \"\\n\",\n        \"        # Build message content\\n\",\n        \"        contents = []\\n\",\n        \"        if case['text']:\\n\",\n        \"            contents.append(VlmContent(type=\\\"text\\\", text=case['text']))\\n\",\n        \"\\n\",\n        \"        # Add image content if available\\n\",\n        \"        if case['image_path'] and os.path.exists(case['image_path']):\\n\",\n        \"            contents.append(VlmContent(type=\\\"image\\\", text=case['image_path']))\\n\",\n        \"            print(f\\\"Including image: {case['image_path']}\\\")\\n\",\n        \"\\n\",\n        \"        # Add user message\\n\",\n        \"        conversation.append(VlmChatMessage(role=\\\"user\\\", contents=contents))\\n\",\n        \"\\n\",\n        \"        # Apply chat template\\n\",\n        \"        formatted_prompt = vlm.apply_chat_template(conversation)\\n\",\n        \"\\n\",\n        \"        # Generate response\\n\",\n        \"        print(\\\"Assistant: \\\", end=\\\"\\\", flush=True)\\n\",\n        \"        response_buffer = io.StringIO()\\n\",\n        \"\\n\",\n        \"        # Prepare image and audio paths\\n\",\n        \"        image_paths = [case['image_path']] if case['image_path'] and os.path.exists(case['image_path']) else None\\n\",\n        \"        audio_paths = None\\n\",\n        \"\\n\",\n        \"        gen = vlm.generate_stream(\\n\",\n        \"            formatted_prompt,\\n\",\n        \"            config=GenerationConfig(\\n\",\n        \"                max_tokens=max_tokens,\\n\",\n        \"                image_paths=image_paths,\\n\",\n        \"                audio_paths=audio_paths\\n\",\n        \"            )\\n\",\n        \"        )\\n\",\n        \"        result = None\\n\",\n        \"        try:\\n\",\n        \"            while True:\\n\",\n        \"                token = next(gen)\\n\",\n        \"                print(token, end=\\\"\\\", flush=True)\\n\",\n        \"                response_buffer.write(token)\\n\",\n        \"        except StopIteration as e:\\n\",\n        \"            result = e.value\\n\",\n        \"\\n\",\n        \"        # Get profiling data\\n\",\n        \"        if result and hasattr(result, \\\"profile_data\\\") and result.profile_data:\\n\",\n        \"            print(f\\\"\\\\n{result.profile_data}\\\")\\n\",\n        \"\\n\",\n        \"        # Add assistant response to conversation history\\n\",\n        \"        conversation.append(\\n\",\n        \"            VlmChatMessage(\\n\",\n        \"                role=\\\"assistant\\\",\\n\",\n        \"                contents=[\\n\",\n        \"                    VlmContent(type=\\\"text\\\", text=response_buffer.getvalue())\\n\",\n        \"                ]\\n\",\n        \"            )\\n\",\n        \"        )\\n\",\n        \"        print(\\\"\\\\n\\\" + \\\"=\\\" * 50)\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"vlm_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 3. Embedder Inference\\n\",\n        \"\\n\",\n        \"Using embedding models for text vectorization and similarity computation.\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import numpy as np\\n\",\n        \"import os\\n\",\n        \"from nexaai.embedding import Embedder\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def embedder_example():\\n\",\n        \"    \\\"\\\"\\\"Embedder Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Embedder Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    model_name = \\\"djuna/jina-embeddings-v2-small-en-Q5_K_M-GGUF/jina-embeddings-v2-small-en-q5_k_m.gguf\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"cpu_gpu\\\"\\n\",\n        \"    batch_size = 2\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"    print(f\\\"Batch size: {batch_size}\\\")\\n\",\n        \"\\n\",\n        \"    # Create embedder instance\\n\",\n        \"    embedder = Embedder.from_(model=model_name, plugin_id=plugin_id)\\n\",\n        \"    print('Embedder loaded successfully!')\\n\",\n        \"\\n\",\n        \"    # Get embedding dimension\\n\",\n        \"    dim = embedder.embedding_dim()\\n\",\n        \"    print(f\\\"Dimension: {dim}\\\")\\n\",\n        \"\\n\",\n        \"    # Example texts\\n\",\n        \"    texts = [\\n\",\n        \"        \\\"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\\\",\\n\",\n        \"        \\\"Nexa AI allows you to run state-of-the-art AI models locally on CPU, GPU, or NPU — from instant use cases to production deployments.\\\",\\n\",\n        \"        \\\"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\\\",\\n\",\n        \"        \\\"The capital of France is Paris.\\\",\\n\",\n        \"        \\\"NPU acceleration provides significant performance improvements for AI workloads.\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    query = \\\"what is on device AI\\\"\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Generating Embeddings ===\\\")\\n\",\n        \"    print(f\\\"Processing {len(texts)} texts...\\\")\\n\",\n        \"\\n\",\n        \"    # Generate embeddings\\n\",\n        \"    result = embedder.embed(\\n\",\n        \"        texts=texts,\\n\",\n        \"        batch_size=batch_size,\\n\",\n        \"    )\\n\",\n        \"    embeddings = result.embeddings\\n\",\n        \"\\n\",\n        \"    print(f\\\"Successfully generated {len(embeddings)} embeddings\\\")\\n\",\n        \"\\n\",\n        \"    # Display embedding information\\n\",\n        \"    print(f\\\"\\\\n=== Embedding Details ===\\\")\\n\",\n        \"    for i, (text, embedding) in enumerate(zip(texts, embeddings)):\\n\",\n        \"        print(f\\\"\\\\nText {i + 1}:\\\")\\n\",\n        \"        print(f\\\"  Content: {text}\\\")\\n\",\n        \"        print(f\\\"  Embedding shape: {len(embedding)} dimensions\\\")\\n\",\n        \"        print(f\\\"  First 10 elements: {embedding[:10]}\\\")\\n\",\n        \"        print(\\\"-\\\" * 70)\\n\",\n        \"\\n\",\n        \"    # Query processing\\n\",\n        \"    print(f\\\"\\\\n=== Query Processing ===\\\")\\n\",\n        \"    print(f\\\"Query: '{query}'\\\")\\n\",\n        \"\\n\",\n        \"    query_result = embedder.embed(\\n\",\n        \"        texts=[query],\\n\",\n        \"        batch_size=1,\\n\",\n        \"    )\\n\",\n        \"    query_embedding = query_result.embeddings[0]\\n\",\n        \"\\n\",\n        \"    print(f\\\"Query embedding shape: {len(query_embedding)} dimensions\\\")\\n\",\n        \"\\n\",\n        \"    # Similarity analysis\\n\",\n        \"    print(f\\\"\\\\n=== Similarity Analysis (Inner Product) ===\\\")\\n\",\n        \"    similarities = []\\n\",\n        \"\\n\",\n        \"    for i, (text, embedding) in enumerate(zip(texts, embeddings)):\\n\",\n        \"        inner_product = sum(a * b for a, b in zip(query_embedding, embedding))\\n\",\n        \"        similarities.append((i, text, inner_product))\\n\",\n        \"\\n\",\n        \"        print(f\\\"\\\\nText {i + 1}:\\\")\\n\",\n        \"        print(f\\\"  Content: {text}\\\")\\n\",\n        \"        print(f\\\"  Inner product with query: {inner_product:.6f}\\\")\\n\",\n        \"        print(\\\"-\\\" * 70)\\n\",\n        \"\\n\",\n        \"    # Sort and display most similar texts\\n\",\n        \"    similarities.sort(key=lambda x: x[2], reverse=True)\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Similarity Ranking Results ===\\\")\\n\",\n        \"    for rank, (idx, text, score) in enumerate(similarities, 1):\\n\",\n        \"        print(f\\\"Rank {rank}: [{score:.6f}] {text}\\\")\\n\",\n        \"\\n\",\n        \"    return embeddings, query_embedding, similarities\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"embeddings, query_emb, similarities = embedder_example()\\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"markdown\",\n      \"metadata\": {},\n      \"source\": [\n        \"## 4. Reranker Inference\\n\",\n        \"\\n\",\n        \"Using reranking models for document reranking. \\n\"\n      ]\n    },\n    {\n      \"cell_type\": \"code\",\n      \"execution_count\": null,\n      \"metadata\": {},\n      \"outputs\": [],\n      \"source\": [\n        \"import os\\n\",\n        \"from nexaai.rerank import Reranker\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"def reranker_example():\\n\",\n        \"    \\\"\\\"\\\"Reranker Inference example\\\"\\\"\\\"\\n\",\n        \"    print(\\\"=== Reranker Inference Example ===\\\")\\n\",\n        \"\\n\",\n        \"    # Model configuration\\n\",\n        \"\\n\",\n        \"    # Use huggingface repo ID\\n\",\n        \"    model_name = \\\"pqnet/bge-reranker-v2-m3-Q8_0-GGUF/bge-reranker-v2-m3-q8_0.gguf\\\"\\n\",\n        \"\\n\",\n        \"    plugin_id = \\\"cpu_gpu\\\"\\n\",\n        \"    batch_size = 4\\n\",\n        \"\\n\",\n        \"    print(f\\\"Loading model: {model_name}\\\")\\n\",\n        \"    print(f\\\"Using plugin: {plugin_id}\\\")\\n\",\n        \"    print(f\\\"Batch size: {batch_size}\\\")\\n\",\n        \"\\n\",\n        \"    # Create reranker instance\\n\",\n        \"    reranker = Reranker.from_(\\n\",\n        \"        model=os.path.expanduser(model_name),\\n\",\n        \"        plugin_id=plugin_id,\\n\",\n        \"    )\\n\",\n        \"\\n\",\n        \"    # Example queries and documents\\n\",\n        \"    queries = [\\n\",\n        \"        \\\"Where is on-device AI?\\\",\\n\",\n        \"        \\\"What is NPU acceleration?\\\",\\n\",\n        \"        \\\"How does machine learning work?\\\",\\n\",\n        \"        \\\"Tell me about computer vision\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    documents = [\\n\",\n        \"        \\\"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\\\",\\n\",\n        \"        \\\"NPU acceleration provides significant performance improvements for AI workloads on specialized hardware.\\\",\\n\",\n        \"        \\\"Edge computing brings computation and data storage closer to the sources of data.\\\",\\n\",\n        \"        \\\"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\\\",\\n\",\n        \"        \\\"The capital of France is Paris, a beautiful city known for its art and culture.\\\",\\n\",\n        \"        \\\"Machine learning is a subset of artificial intelligence that enables computers to learn without being explicitly programmed.\\\",\\n\",\n        \"        \\\"Computer vision is a field of artificial intelligence that trains computers to interpret and understand visual information.\\\",\\n\",\n        \"        \\\"Deep learning uses neural networks with multiple layers to model and understand complex patterns in data.\\\"\\n\",\n        \"    ]\\n\",\n        \"\\n\",\n        \"    print(f\\\"\\\\n=== Document Reranking Test ===\\\")\\n\",\n        \"    print(f\\\"Number of documents: {len(documents)}\\\")\\n\",\n        \"\\n\",\n        \"    # Rerank for each query\\n\",\n        \"    for i, query in enumerate(queries, 1):\\n\",\n        \"        print(f\\\"\\\\n--- Query {i} ---\\\")\\n\",\n        \"        print(f\\\"Query: '{query}'\\\")\\n\",\n        \"        print(\\\"-\\\" * 50)\\n\",\n        \"\\n\",\n        \"        # Perform reranking\\n\",\n        \"        result = reranker.rerank(\\n\",\n        \"            query=query,\\n\",\n        \"            documents=documents,\\n\",\n        \"            batch_size=batch_size,\\n\",\n        \"        )\\n\",\n        \"        scores = result.scores\\n\",\n        \"\\n\",\n        \"        # Create (document, score) pairs and sort\\n\",\n        \"        doc_scores = list(zip(documents, scores))\\n\",\n        \"        doc_scores.sort(key=lambda x: x[1], reverse=True)\\n\",\n        \"\\n\",\n        \"        # Display ranking results\\n\",\n        \"        print(\\\"Reranking results:\\\")\\n\",\n        \"        for rank, (doc, score) in enumerate(doc_scores, 1):\\n\",\n        \"            print(f\\\"  {rank:2d}. [{score:.4f}] {doc}\\\")\\n\",\n        \"\\n\",\n        \"        # Display most relevant documents\\n\",\n        \"        print(f\\\"\\\\nMost relevant documents (top 3):\\\")\\n\",\n        \"        for rank, (doc, score) in enumerate(doc_scores[:3], 1):\\n\",\n        \"            print(f\\\"  {rank}. {doc}\\\")\\n\",\n        \"\\n\",\n        \"        print(\\\"=\\\" * 80)\\n\",\n        \"\\n\",\n        \"    return reranker\\n\",\n        \"\\n\",\n        \"\\n\",\n        \"reranker = reranker_example()\\n\"\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"kernelspec\": {\n      \"display_name\": \"sdk\",\n      \"language\": \"python\",\n      \"name\": \"python3\"\n    },\n    \"language_info\": {\n      \"codemirror_mode\": {\n        \"name\": \"ipython\",\n        \"version\": 3\n      },\n      \"file_extension\": \".py\",\n      \"mimetype\": \"text/x-python\",\n      \"name\": \"python\",\n      \"nbconvert_exporter\": \"python\",\n      \"pygments_lexer\": \"ipython3\",\n      \"version\": \"3.10.19\"\n    }\n  },\n  \"nbformat\": 4,\n  \"nbformat_minor\": 2\n}\n"
  },
  {
    "path": "bindings/python/rerank.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\n\"\"\"\nNexaAI Rerank Example - Document Reranking\n\nThis example demonstrates how to use the NexaAI SDK to rerank documents based on a query.\nIt includes basic model initialization, document reranking, and score analysis.\n\"\"\"\n\nimport argparse\nimport logging\nimport os\n\nfrom nexaai.rerank import Reranker\nfrom nexaai import setup_logging\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI Rerank Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"~/.cache/nexa.ai/nexa_sdk/models/NexaAI/jina-v2-rerank-mlx/jina-reranker-v2-base-multilingual-f16.safetensors\",\n        help=\"Path to the rerank model\",\n    )\n    parser.add_argument(\n        \"--query\",\n        default=\"Where is on-device AI?\",\n        help=\"Query text for reranking\",\n    )\n    parser.add_argument(\n        \"--documents\",\n        nargs=\"+\",\n        default=[\n            \"On-device AI is a type of AI that is processed on the device itself, rather than in the cloud.\",\n            \"edge computing\",\n            \"A ragdoll is a breed of cat that is known for its long, flowing hair and gentle personality.\",\n            \"The capital of France is Paris.\",\n        ],\n        help=\"Documents to rerank\",\n    )\n    parser.add_argument(\"--batch-size\", type=int, help=\"Batch size for processing\")\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    args = parser.parse_args()\n\n    reranker = Reranker.from_(\n        model=os.path.expanduser(args.model),\n        plugin_id=args.plugin_id,\n    )\n\n    batch_size = args.batch_size or len(args.documents)\n    result = reranker.rerank(\n        query=args.query,\n        documents=args.documents,\n        batch_size=batch_size,\n    )\n    scores = result.scores\n\n    print(f\"Query: {args.query}\")\n    print(f\"Documents: {len(args.documents)} documents\")\n    print(\"-\" * 50)\n    for i, score in enumerate(scores):\n        print(f\"[{score:.4f}] : {args.documents[i]}\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/tts.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\"\"\"\nNexaAI TTS Example - Text to Speech\n\nThis example demonstrates how to use the NexaAI SDK to synthesize speech from text.\n\"\"\"\n\nimport argparse\nimport logging\nimport os\n\nfrom nexaai.tts import TTS\nfrom nexaai import setup_logging\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI TTS Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"NexaAI/Kokoro-82M-bf16-MLX\",\n        help=\"Model id or path\",\n    )\n    parser.add_argument(\n        \"--text\",\n        required=True,\n        help=\"Text to synthesize\",\n    )\n    parser.add_argument(\n        \"--output\",\n        default=None,\n        help=\"Output audio file path (default: auto-generated)\",\n    )\n    parser.add_argument(\n        \"--voice\",\n        default=None,\n        help=\"Voice identifier (if supported by model)\",\n    )\n    parser.add_argument(\n        \"--speed\",\n        type=float,\n        default=1.0,\n        help=\"Speech speed multiplier (default: 1.0)\",\n    )\n    parser.add_argument(\n        \"--sample-rate\",\n        type=int,\n        default=22050,\n        help=\"Audio sample rate (default: 22050)\",\n    )\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    parser.add_argument(\n        \"--device\", default=None, help=\"Device to run on (e.g., cpu, gpu, 0)\"\n    )\n    args = parser.parse_args()\n\n    # Generate output filename if not specified\n    if args.output:\n        output_path = os.path.expanduser(args.output)\n    else:\n        import time\n        output_path = f\"tts_output_{int(time.time())}.wav\"\n\n    # Create TTS instance\n    tts = TTS.from_(\n        model=os.path.expanduser(args.model),\n        plugin_id=args.plugin_id,\n        device_id=args.device,\n    )\n\n    # Synthesize speech\n    result = tts.synthesize(\n        text=args.text,\n        output_path=output_path,\n        voice=args.voice,\n        speed=args.speed,\n        sample_rate=args.sample_rate,\n    )\n\n    print(f\"Audio saved to: {result.audio_path}\")\n    print(f\"Duration: {result.duration_seconds:.2f}s\")\n    print(f\"Sample rate: {result.sample_rate} Hz\")\n    print(f\"Channels: {result.channels}\")\n    print(f\"Number of samples: {result.num_samples}\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "bindings/python/vlm.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\n\"\"\"\nNexaAI VLM Example - Llama Model Testing\n\nThis example demonstrates how to use the NexaAI SDK to work with Llama models.\nIt includes basic model initialization, text generation, streaming, and chat template functionality.\n\"\"\"\n\nimport os\nimport argparse\nimport io\nimport logging\nimport shlex\nfrom pathlib import Path\nfrom typing import Optional, List, Tuple\n\nfrom nexaai import (\n    GenerationConfig,\n    ModelConfig,\n    VlmChatMessage,\n    VlmContent,\n    setup_logging,\n)\nfrom nexaai.vlm import VLM\n\n\ndef parse_media_from_input(\n    user_input: str,\n) -> Tuple[str, Optional[List[str]], Optional[List[str]]]:\n    tokens = shlex.split(user_input, posix=False)\n    image_exts = {\".png\", \".jpg\", \".jpeg\", \".gif\", \".bmp\", \".tiff\", \".webp\"}\n    audio_exts = {\".mp3\", \".wav\", \".flac\", \".aac\", \".ogg\", \".m4a\"}\n\n    image_paths, audio_paths, prompt_parts = [], [], []\n\n    for token in tokens:\n        path = Path(os.path.expanduser(token))\n        if path.exists():\n            ext = path.suffix.lower()\n            if ext in image_exts:\n                image_paths.append(str(path))\n            elif ext in audio_exts:\n                audio_paths.append(str(path))\n            else:\n                prompt_parts.append(token)\n        else:\n            prompt_parts.append(token)\n\n    prompt = \" \".join(prompt_parts).strip()\n    return prompt, image_paths or None, audio_paths or None\n\n\ndef main():\n    setup_logging(level=logging.DEBUG)\n    parser = argparse.ArgumentParser(description=\"NexaAI VLM Example\")\n    parser.add_argument(\n        \"-m\",\n        \"--model\",\n        default=\"NexaAI/Qwen2.5-Omni-3B-GGUF\",\n        help=\"Path to the VLM model\",\n    )\n    parser.add_argument(\n        \"--max-tokens\", type=int, default=128, help=\"Maximum tokens to generate\"\n    )\n    parser.add_argument(\n        \"--system\", default=\"You are a helpful assistant.\", help=\"System message\"\n    )\n    parser.add_argument(\"--plugin-id\", default=None, help=\"Plugin ID to use\")\n    args = parser.parse_args()\n\n    instance: VLM = VLM.from_(\n        model=os.path.expanduser(args.model),\n        config=ModelConfig(),\n        plugin_id=args.plugin_id,\n    )\n\n    conversation: List[VlmChatMessage] = [\n        VlmChatMessage(\n            role=\"system\",\n            contents=[VlmContent(type=\"text\", text=args.system)],\n        )\n    ]\n    strbuff = io.StringIO()\n\n    print(\"Multi-round conversation started. Type '/quit' or '/exit' to end.\")\n    print(\"=\" * 50)\n\n    while True:\n        user_input = input(\"\\nUser: \").strip()\n        if not user_input:\n            print(\"Please provide an input or type '/quit' to exit.\")\n            continue\n\n        if user_input.startswith(\"/\"):\n            cmds = user_input.split()\n            if cmds[0] in {\"/quit\", \"/exit\", \"/q\"}:\n                print(\"Goodbye!\")\n                break\n            elif cmds[0] in {\"/reset\", \"/r\"}:\n                instance.reset()\n                print(\"Conversation reset\")\n                continue\n            else:\n                print(\"Unknown command. Available commands: /quit, /exit, /reset\")\n                continue\n\n        prompt, images, audios = parse_media_from_input(user_input)\n\n        contents = []\n        if prompt:\n            contents.append(VlmContent(type=\"text\", text=prompt))\n        if images:\n            for image in images:\n                contents.append(VlmContent(type=\"image\", text=image))\n        if audios:\n            for audio in audios:\n                contents.append(VlmContent(type=\"audio\", text=audio))\n        conversation.append(VlmChatMessage(role=\"user\", contents=contents))\n\n        prompt = instance.apply_chat_template(conversation)\n        strbuff.truncate(0)\n        strbuff.seek(0)\n\n        print(\"Assistant: \", end=\"\", flush=True)\n        gen = instance.generate_stream(\n            prompt,\n            config=GenerationConfig(\n                max_tokens=args.max_tokens, image_paths=images, audio_paths=audios\n            ),\n        )\n        result = None\n        try:\n            while True:\n                token = next(gen)\n                print(token, end=\"\", flush=True)\n                strbuff.write(token)\n        except StopIteration as e:\n            result = e.value\n\n        if result and hasattr(result, \"profile_data\") and result.profile_data:\n            print(f\"\\n{result.profile_data}\")\n\n        conversation.append(\n            VlmChatMessage(\n                role=\"assistant\",\n                contents=[\n                    VlmContent(type=\"text\", text=strbuff.getvalue())\n                ],\n            )\n        )\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/.gitignore",
    "content": "__pycache__/\nnexaai-env/"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Python-Binding-Example/README.md",
    "content": "## About\n\nThis demo showcases a function tool implementation using NexaAI Python binding. \n\n## Setup\n\n### Prerequisites\n\n| Platform | Required Python | \n|----------|----------------|\n| **Windows (ARM64, Snapdragon X Elite)** | **3.11 – 3.13 (arm64)** |\n| **macOS / Windows (x64)** | **3.10 (x64)** |\n\nFor python install, you can check our interactive Jupyter notebooks. Choose the appropriate notebook for your platform:\n- [macOS Installation Guide](../../../bindings/python/notebook/macos.ipynb)\n- [windows(x64) Installation Guide](../../../bindings/python/notebook/windows(x64).ipynb)\n- [windows(ARM64) Installation Guide](../../../bindings/python/notebook/winodws(arm64).ipynb)\n\n### Install Dependencies\n\n```bash\n# Navigate to the example directory\ncd Python-Binding-Example\n\n# Create a Python virtual environment\npython -m venv .venv\n\n# Activate the virtual environment\n.\\.venv\\Scripts\\activate # windows\n\nsource .venv/bin/activate # macOS\n\n\n# Install all required dependencies\npip install gradio\npip install -r requirements.txt\n```\n\n## Running the Example\n\n```bash\n# Run the CLI version which provides an interactive terminal interface\n# This version allows direct interaction with the agent through command line\npython agent_nexa.py\n\n# Run the Gradio UI version\n# This starts a local web server with a chat interface at http://localhost:7860\npython gradio_ui.py\n\n```\n\n## Usage Examples\n\n- **Web Search**: \"What's the latest AI news?\"\n- **File Operations**: \"Save this conversation to notes.txt\"\n"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Python-Binding-Example/agent_nexa.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom __future__ import annotations\nimport sys\nimport platform\nimport re\nimport json\nimport argparse\nimport requests\nfrom typing import Any, Tuple, Optional, List\nfrom serpapi import GoogleSearch\n\nfrom nexaai.llm import LLM, GenerationConfig\nfrom nexaai.common import ModelConfig, ChatMessage\n\nfrom dataclasses import dataclass\nimport sys\nimport platform\nimport os\n\n@dataclass\nclass ModelInfo:\n    \"\"\"Model info for different platforms.\"\"\"\n    model: str\n    plugin_id: str\n    device_id: str\n\ndef get_model_info() -> ModelInfo:\n    \"\"\"Return the default model info based on current OS and architecture.\"\"\"\n    default_model = ModelInfo(\n        model=\"NexaAI/granite-4.0-micro-GGUF/granite-4.0-micro-Q4_0.gguf\",\n        plugin_id=\"cpu_gpu\",\n        device_id=\"gpu\",\n    )\n    if sys.platform == \"darwin\":\n        # macOS\n        return default_model\n\n    elif sys.platform.startswith(\"win\"):\n        machine = platform.machine().lower()\n        if \"arm\" in machine:\n            # Windows ARM64\n            return ModelInfo(\n                model=\"NexaAI/Granite-4-Micro-NPU\",\n                plugin_id=\"npu\",\n                device_id=\"npu\",\n            )\n        else:\n            # Windows x64\n            return default_model\n\n    # other\n    return default_model\n\n# Default model info\nDEFAULT_MODEL = get_model_info()\n\n# You can get a free API key from https://serpapi.com/\nSEARCH_API_KEY = \"7467f292f9d4ce3324da285ca111ea11477ba7fc84ee7e9fa5f867a9d1b35856\"\n\n# ... existing code ...\n\nSYSTEM_PROMPT = \"\"\"You are Granite Agent with function calling.\n\nYour goals:\n- Understand the user's request.\n- Decide whether a function call is needed.\n- If yes, output a structured JSON function call (no explanations).\n- If no, directly respond to the user in natural language.\n\nFunctions:\n1. search_web(query: string) - Web search\n2. write_to_file(file_path: string) - Save text to file\n\nOutput JSON for function calls:\n{\"name\": \"function_name\", \"arguments\": {\"key\": \"value\"}}\n\nRules:\n- JSON only for functions (no explanations)\n- Summarize results in 2-3 sentences\n- Never invent function names\n\nExamples:\nUser: Latest AI news?\nAssistant: {\"name\": \"search_web\", \"arguments\": {\"query\": \"latest AI news\"}}\n\nUser: Save that.\nAssistant: {\"name\": \"write_to_file\", \"arguments\": {\"file_path\": \"notes.txt\"}}\n\nUser: Hello\nAssistant: How can I assist you today?\n\"\"\"\n\nFUNCTION_TOOLS = [\n    {\n        \"type\": \"function\", \n        \"function\": {\n            \"name\": \"search_web\",\n            \"description\": \"Searches the web for a given query and returns the latest information.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\n                    \"query\": {\"type\": \"string\", \"description\": \"User search query\"}\n                },\n                \"required\": [\"query\"],\n            }\n        },\n    },\n    {\n        \"type\": \"function\", \n        \"function\": {\n            \"name\": \"write_to_file\",\n            \"description\": \"Writes text content into a file on the local filesystem.\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": {\"path\": {\"type\": \"string\"}},\n                \"required\": [\"path\"],\n            }\n        },\n    }\n]\n\n\ndef search_web(query: str):\n    \"\"\"Search the web using SerpAPI\"\"\"\n    params = {\n        \"engine\": \"google\",\n        \"q\": query,\n        \"google_domain\": \"google.com\",\n        \"num\": \"2\",\n        \"start\": \"1\",\n        \"safe\": \"active\",\n        \"api_key\": SEARCH_API_KEY,\n    }\n    search = GoogleSearch(params)\n    results = search.get_dict()\n    organic_results = results.get(\"organic_results\", [])\n\n    # Print search results for debugging\n    print(f\"\\n[Web Search Results for '{query}']:\")\n    for idx, result in enumerate(organic_results, 1):\n        print(f\"{idx}. {result.get('title', 'N/A')}\")\n        print(f\"   URL: {result.get('link', 'N/A')}\")\n        print(f\"   Snippet: {result.get('snippet', 'N/A')[:200]}...\")\n        print()\n\n    return organic_results\n\n\ndef write_to_file(file_path: str, content: str):\n    \"\"\"Write content to a file\"\"\"\n    with open(file_path, \"a\", encoding=\"utf-8\") as f:\n        f.write(content + \"\\n\")\n\n\nFUNCTION_REGISTRY = {\"search_web\": search_web, \"write_to_file\": write_to_file}\n\n\ndef handle_function_call(\n    func_name: str, func_args: dict, model: ModelInfo, system_prompt: str = \"\"\n):\n    \"\"\"\n    Execute the registered function, print the tool result, then call Nexa to produce\n    a natural language summary based on the tool output.\n    \"\"\"\n    if isinstance(func_args, str):\n        try:\n            func_args = json.loads(func_args)\n        except json.JSONDecodeError:\n            func_args = {}\n\n    tool_result = FUNCTION_REGISTRY[func_name](**func_args)\n\n    # Customize prompt based on function type\n    if func_name == \"search_web\":\n        user_followup_prompt = f\"\"\"\n        You called search_web with query: {func_args.get('query')}\n        \n        Here are the search results:\n        {tool_result}\n        \n        Please provide a short summary of these web search results in 2-3 bullet points. For each result:\n        - Include the title\n        - Mention the source/website\n        - Summarize the key information from the snippet\n        - Make it informative and comprehensive\n        \n        Be verbose and helpful. Do NOT call any function again.\n        \"\"\"\n    else:\n        user_followup_prompt = f\"\"\"\n        You previously decided to call the function `{func_name}` with arguments {func_args}.\n        Here is the result returned by that function:\n\n        {tool_result}\n\n        Now, based on this result, please summarize and respond naturally to the user.\n        Do NOT call any function again.\n        \"\"\"\n\n    try:\n        # Pass system prompt for NPU compatibility\n        for piece in nexa_chat_stream(model, user_followup_prompt, system_prompt):\n            yield piece\n    except Exception as e:\n        print(f\"[error] failed to call nexa for followup: {e}\")\n        yield f\"\\n[Error: {e}]\"\n        return\n\n\ndef nexa_chat_stream(model: ModelInfo, prompt: str, system_prompt: str = \"\"):\n    \"\"\"\n    Generate streaming conversation with local LLM\n    NPU requires system prompt to be passed during model creation via ModelConfig\n    \"\"\"\n    m_cfg = ModelConfig(\n        system_prompt=system_prompt  # Pass system prompt for NPU plugin\n    )\n    llm = LLM.from_(model.model, plugin_id=model.plugin_id, device_id=model.device_id, m_cfg=m_cfg)\n\n    messages: List[ChatMessage] = [ChatMessage(role=\"user\", content=prompt)]\n    prompt = llm.apply_chat_template(messages)\n\n    for token in llm.generate_stream(prompt, g_cfg=GenerationConfig(max_tokens=512)):\n        yield token\n\n\ndef nexa_chat_completion(model: ModelInfo, messages: list, system_prompt: str = \"\"):\n    \"\"\"\n    Non-streaming conversation with local LLM\n    NPU requires system prompt to be passed during model creation via ModelConfig\n    \"\"\"\n    m_cfg = ModelConfig(\n        system_prompt=system_prompt  # Pass system prompt for NPU plugin\n    )\n    \n    llm = LLM.from_(model.model, plugin_id=model.plugin_id, device_id=model.device_id, m_cfg=m_cfg)\n\n    if model.plugin_id == 'npu':\n        # Convert messages to ChatMessage format, excluding system messages\n        # (system prompt is already in model config for NPU)\n        chat_messages = [\n            ChatMessage(role=msg[\"role\"], content=msg[\"content\"])\n            for msg in messages\n            if msg[\"role\"] != \"system\"  # Skip system messages - already in ModelConfig\n        ]\n    else:\n        chat_messages = messages\n\n    prompt = llm.apply_chat_template(chat_messages, tools=FUNCTION_TOOLS)\n\n    return llm.generate(prompt, g_cfg=GenerationConfig(max_tokens=512))\n\n\ndef extract_function_call(text: str) -> Optional[Tuple[str, dict]]:\n    \"\"\"\n    Extract function call JSON from LLM response using regex.\n    Handles cases where JSON is embedded in text or has extra tokens.\n\n    Returns:\n        Tuple of (function_name, arguments) if found, None otherwise\n    \"\"\"\n    # Clean up common LLM artifacts\n    text = text.strip()\n\n    # Remove special tokens like <|end_of_text|>, <|im_end|>, etc.\n    text = re.sub(r\"<\\|[^|]+\\|>\", \"\", text)\n    text = text.strip()\n\n    # Try to find JSON-like structure with \"name\" and \"arguments\" fields\n    # Pattern matches: { \"name\": \"...\", \"arguments\": { ... } }\n    json_pattern = (\n        r'\\{[^{}]*\"name\"\\s*:\\s*\"([^\"]+)\"[^{}]*\"arguments\"\\s*:\\s*(\\{[^}]*\\})[^{}]*\\}'\n    )\n\n    match = re.search(json_pattern, text, re.DOTALL)\n    if match:\n        func_name = match.group(1)\n        try:\n            # Try to parse the arguments\n            args_str = match.group(2)\n            func_args = json.loads(args_str)\n            return func_name, func_args\n        except json.JSONDecodeError:\n            # If arguments parsing fails, try to extract manually\n            # Pattern for simple key-value like { \"query\": \"...\" }\n            args_match = re.search(r'\"(\\w+)\"\\s*:\\s*\"([^\"]*)\"', match.group(2))\n            if args_match:\n                return func_name, {args_match.group(1): args_match.group(2)}\n\n    # Fallback: try to parse the entire cleaned text as JSON\n    try:\n        parsed = json.loads(text)\n        if isinstance(parsed, dict) and \"name\" in parsed:\n            func_name = parsed.get(\"name\")\n            func_args = parsed.get(\"arguments\", {})\n            return func_name, func_args\n    except json.JSONDecodeError:\n        pass\n\n    return None\n\n\ndef nexa_start_search_stream(\n    query: str,\n    last_message: str = \"\",\n    model: ModelInfo = DEFAULT_MODEL,\n):\n    \"\"\"\n    Main agent function that handles user query and function calling.\n    Yields JSON-formatted status messages.\n    \"\"\"\n    # For NPU, don't include system prompt in messages - pass it via ModelConfig\n    messages = [\n        {\"role\": \"user\", \"content\": query},\n    ]\n\n    try:\n        yield json.dumps({\"status\": \"proccess\", \"message\": \"Starting analysis...\"})\n        # Pass system prompt via ModelConfig for NPU compatibility\n        result = nexa_chat_completion(model, messages, system_prompt=SYSTEM_PROMPT)\n\n        # Try to extract function call using helper function\n        function_call = extract_function_call(result)\n\n        if function_call:\n            func_name, func_args = function_call\n\n            # Validate function exists in registry\n            if func_name in FUNCTION_REGISTRY:\n                yield json.dumps(\n                    {\n                        \"status\": \"function\",\n                        \"message\": json.dumps(\n                            {\"name\": func_name, \"arguments\": func_args}\n                        ),\n                    }\n                )\n\n                if func_name == \"write_to_file\":\n                    yield json.dumps(\n                        {\"status\": \"proccess\", \"message\": \"Function calling...\"}\n                    )\n\n                    file_path = func_args.get(\"file_path\") or func_args.get(\"path\")\n                    write_to_file(file_path, last_message)\n\n                    yield json.dumps(\n                        {\n                            \"status\": \"proccess\",\n                            \"message\": \"Function call finished.\",\n                        }\n                    )\n\n                    message = f\"Successfully saved the previous answer to **{file_path}**. You can check it anytime!\"\n                    yield json.dumps({\"status\": \"stream\", \"message\": message})\n                else:\n                    # Execute the function and stream results\n                    try:\n                        yield json.dumps(\n                            {\"status\": \"proccess\", \"message\": \"Function calling...\"}\n                        )\n                        flag = False\n                        for piece in handle_function_call(\n                            func_name, func_args, model, SYSTEM_PROMPT\n                        ):\n                            if not flag:\n                                yield json.dumps(\n                                    {\n                                        \"status\": \"proccess\",\n                                        \"message\": \"Function call finished.\",\n                                    }\n                                )\n                                flag = True\n\n                            yield json.dumps({\"status\": \"stream\", \"message\": piece})\n                    except Exception as e:\n                        yield json.dumps(\n                            {\"status\": \"function_call_error\", \"message\": f\"{e}\"}\n                        )\n                        # try again\n                        try:\n                            for piece in handle_function_call(\n                                func_name, func_args, model, SYSTEM_PROMPT\n                            ):\n                                yield json.dumps({\"status\": \"stream\", \"message\": piece})\n                        except Exception as retry_error:\n                            yield json.dumps(\n                                {\n                                    \"status\": \"error\",\n                                    \"message\": f\"Retry failed: {retry_error}\",\n                                }\n                            )\n            else:\n                # Function not in registry, treat as regular response\n                yield json.dumps({\"status\": \"stream\", \"message\": result})\n        else:\n            # No function call detected, treat as regular response\n            yield json.dumps({\"status\": \"stream\", \"message\": result})\n\n    except (ConnectionError, TimeoutError) as e:\n        yield json.dumps({\"status\": \"error\", \"message\": f\"Connection error: {e}\"})\n    except requests.HTTPError as e:\n        yield json.dumps({\"status\": \"error\", \"message\": f\"HTTP error: {e}\"})\n    except Exception as e:\n        yield json.dumps({\"status\": \"error\", \"message\": f\"Unexpected error: {e}\"})\n\n\n# CLI\ndef main():\n    \"\"\"Main CLI entry point\"\"\"\n    \n    ap = argparse.ArgumentParser(description=\"Function Tool with Nexa SDK server\")\n    ap.add_argument(\"--model\", default=DEFAULT_MODEL.model, help=\"Nexa model path.\")\n    ap.add_argument(\"--plugin_id\", default=DEFAULT_MODEL.plugin_id, help=\"Plugin id.\")\n    ap.add_argument(\"--device_id\", default=DEFAULT_MODEL.device_id, help=\"Device id\")\n    args = ap.parse_args()\n\n    print(f\"[info] Ready. Using model={args.model}, plugin_id={args.plugin_id}, device_id={args.device_id}\")\n    print(\"Type your question (or just press Enter to quit):\")\n    \n    model = ModelInfo(model=args.model, plugin_id=args.plugin_id, device_id=args.device_id)\n    last_message = \"\"\n    while True:\n        try:\n            q = input(\"[user] \").strip()\n            if not q:\n                break\n\n            print(\"[assistant] \", end=\"\", flush=True)\n            response_content = \"\"\n\n            # Parse JSON responses and display nicely\n            for piece in nexa_start_search_stream(q, last_message, model):\n                try:\n                    parsed = json.loads(piece)\n                    status = parsed.get(\"status\")\n                    message = parsed.get(\"message\", \"\")\n\n                    if status == \"proccess\":\n                        print(f\"\\n[{message}]\", end=\" \", flush=True)\n                    elif status == \"function\":\n                        print(f\"\\n[Function call: {message}]\", flush=True)\n                    elif status == \"stream\":\n                        print(message, end=\"\", flush=True)\n                        response_content += message\n                    elif status == \"error\":\n                        print(f\"\\n[ERROR: {message}]\", flush=True)\n                    elif status == \"function_call_error\":\n                        print(f\"\\n[Function call error: {message}]\", flush=True)\n                    else:\n                        print(message, end=\"\", flush=True)\n                        response_content += message\n                except json.JSONDecodeError:\n                    # If not JSON, just print it\n                    print(piece, end=\"\", flush=True)\n                    response_content += piece\n\n            last_message = response_content\n            print()  # newline after response\n\n        except KeyboardInterrupt:\n            print(\"\\n[info] Bye.\")\n            break\n        except Exception as e:\n            print(f\"\\n[error] {e}\")\n            continue\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Python-Binding-Example/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\nimport gradio as gr\nfrom gradio import ChatMessage\nimport json\n\nfrom agent_nexa import (\n    nexa_start_search_stream\n)\n\n# Chat streaming with Nexa\ndef chat_stream_search(query: str, history: list):\n    \"\"\"\n    Parse JSON lines emitted by backend stream and update chat + input.\n\n    Backend lines are JSON strings with format:\n      {\"status\": \"loading\", \"message\": \"start query...\"}\n      {\"status\": \"function\", \"message\": result}\n      {\"status\": \"stream\", \"message\": piece}\n\n    We write status messages into the input box so the user sees progress.\n    \"\"\"\n    if history is None:\n        history = []\n\n    # Append the user's message to history\n    history.append(ChatMessage(role=\"user\", content=query))\n\n    yield history, \"\"\n\n    assistant_appended = False\n\n    # Keep last_message if needed by backend (not used here)\n    last_message = history[-2]['content'] if len(history) > 1 else \"\"\n\n    try:\n        for raw in nexa_start_search_stream(query, last_message):\n            # raw is expected to be a JSON string\n            parsed = None\n            if isinstance(raw, str):\n                try:\n                    parsed = json.loads(raw)\n                except Exception:\n                    # Not JSON: treat as raw stream chunk\n                    parsed = None\n\n            if parsed and isinstance(parsed, dict) and \"status\" in parsed:\n                st = parsed.get(\"status\")\n                msg = parsed.get(\"message\", \"\")\n\n                if st == \"function_call_error\":\n                    history.append(ChatMessage(\n                        role=\"assistant\",\n                        content=f\"{msg}\",\n                        metadata={\"title\": f\"🛠️ **Function call error**\"},\n                    ))\n                    history.append(\n                        ChatMessage(\n                            role=\"assistant\",\n                            content=\"I will try again, please wait...\\n\",\n                        )\n                    )\n                    yield history, \"\"\n                    continue\n                    \n                if st == \"error\":\n                    history.append(ChatMessage(\n                        role=\"assistant\",\n                        content=f\"(Error: {msg})\",\n                        metadata={\"title\": f\"❌ **Error occurred**\"},\n                    ))\n                    yield history, \"\"\n                    continue\n                \n                if st == \"proccess\":\n                    history.append(ChatMessage(\n                        role=\"assistant\",\n                        content=\"\",\n                        metadata={\"title\": f\"🛠️ **{msg}**\"}\n                    ))\n                    yield history, \"\"\n                    continue\n                    \n                if st == \"function\":\n                    try: \n                        func_desc = json.loads(msg)\n                        func_name = func_desc.get(\"name\")\n                        content = f\"\"\"```json\n                        {json.dumps(func_desc)}\n                        ```\"\"\"\n                        history.append(ChatMessage(\n                            role=\"assistant\",\n                            content=content,\n                            metadata={\"title\": f\"🛠️ **Used tool '{func_name}'**\"},\n                        ))\n                    except Exception:\n                        history.append(ChatMessage(\n                            role=\"assistant\",\n                            content=f\"{msg}\",\n                        ))\n                    yield history, \"\"\n                    continue\n\n                if st == \"stream\":\n                    piece = msg\n                    # append or create assistant message\n                    if not assistant_appended:\n                        history.append(ChatMessage(role=\"assistant\", content=piece))\n                        assistant_appended = True\n                    else:\n                        # extend last assistant content\n                        history[-1].content += piece\n\n                    # clear input while streaming\n                    yield history, \"\"\n                    continue\n\n                # unknown status -> show raw message in input\n                history.append(ChatMessage(role=\"assistant\", content=str(msg)))\n                yield history, \"\"\n                continue\n\n            # fallback: raw chunk string\n            if isinstance(raw, str):\n                piece = raw\n                if not assistant_appended:\n                    history.append(ChatMessage(role=\"assistant\", content=piece))\n                    assistant_appended = True\n                else:\n                    history[-1].content += piece\n                yield history, \"\"\n\n    except Exception as e:\n        # append error to assistant message\n        if assistant_appended:\n            history[-1].content += f\"\\n(Streaming failed: {e})\"\n        else:\n            history.append(ChatMessage(role=\"assistant\", content=f\"(Streaming failed: {e})\"))\n        yield history, \"\"\n\n# UI\nCUSTOM_CSS = \"\"\"\n/* Make cards cleaner and add subtle shadows */\n.gradio-container { max-width: 1600px !important; }\n.rounded-card { border-radius: 16px; box-shadow: 0 1px 8px rgba(0,0,0,.06); background: white; }\n.pad { padding: 14px; }\n.section-title { font-weight: 700; font-size: 16px; opacity: .8; margin-bottom: 8px; }\n#info-panel .gallery { background: #101114; } /* darker bg for images */\n\"\"\"\n\nwith gr.Blocks(title=\"Function call with NexaSDK\", css=CUSTOM_CSS) as demo:\n    gr.Markdown(\"## Function call with NexaSDK\")\n\n    with gr.Column(scale=2, elem_classes=[\"rounded-card\", \"pad\"]):\n        chat = gr.Chatbot(type=\"messages\", height=500, show_copy_button=True)\n        chat_input = gr.Textbox(placeholder=\"Input your query...\", label=\"Your question\")\n        with gr.Row():\n            btn_send = gr.Button(\"Send\", variant=\"primary\", elem_id=\"btn-send\")\n            btn_clear = gr.Button(\"Clear chat\")\n\n    # Events\n    def on_clear():\n        # Clear chat history and input box\n        return [], \"\"\n\n    btn_clear.click(fn=on_clear, outputs=[chat, chat_input])\n\n    # Chat send (streaming)\n    btn_send.click(\n        fn=chat_stream_search,\n        inputs=[chat_input, chat],\n        outputs=[chat, chat_input],\n    )\n    chat_input.submit(\n        fn=chat_stream_search,\n        inputs=[chat_input, chat],\n        outputs=[chat, chat_input],\n    )\n\nif __name__ == \"__main__\":\n    demo.launch()\n"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Python-Binding-Example/requirements.txt",
    "content": "requests>=2.32.4\npydantic>=2.4.0\npsutil\ngoogle-search-results"
  },
  {
    "path": "cookbook/PC/Agent-Granite/README.md",
    "content": "# Agent with Granite-4-Micro model\n\n## Overview\n\nThis project showcases a lightweight on-device AI assistant powered by Nexa SDK's Granite-4-Micro model. The agent executes tasks through function calling, including web searches. Built with a Gradio interface for local agentic workflows.\n\n## Examples\n- [Python-Binding-Example](./Python-Binding-Example)\n- [Serve-Example](./Serve-Example)\n"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Serve-Example/README.md",
    "content": "## About\n\nThis demo showcases a function tool implementation using Nexa Sdk. \n\n## Setup\n\n### Prerequisites\n\n- Nexa SDK Installed ([Installation Guide](https://github.com/NexaAI/nexa-sdk?tab=readme-ov-file#step-1-download-nexa-cli-with-one-click))\n- Python 3.11 – 3.13\n\n### Download Models\n\nIf you use the `NexaAI/Granite-4.0-h-350M-NPU` model, you will need an access token, which can be obtained from ([sdk.nexa.ai](https://sdk.nexa.ai/)), and then set the token using the `nexa config` command below. \n\n```bash\n# Set access token\nnexa config set license '<access_token>'\n```\n\n```bash\n# Download model — only required on Windows platform\nnexa pull NexaAI/Granite-4.0-h-350M-NPU\n\n# Download model (compatible with both Windows and macOS)\nnexa pull NexaAI/granite-4.0-micro-GGUF\n\n```\n\n### Install Dependencies\n\n```bash\n# Navigate to the example directory\ncd Serve-Example\n\n# Create a Python virtual environment\npython -m venv .venv\n\n# Activate the virtual environment\n.\\.venv\\Scripts\\activate # windows\n\nsource .venv/bin/activate # macOS\n\n# Install all required dependencies\npip install gradio\npip install -r requirements.txt\n```\n\n### Running the Example\n\nFirst, open a new terminal window and start the Nexa server:\n```bash\n# Start Nexa server\nnexa serve\n```\n\nIn a new terminal window, you can run either the CLI or Gradio UI version:\n\n```bash\n# Option 1: Run the CLI version which provides an interactive terminal interface\n# This version allows direct interaction with the agent through command line\npython agent_nexa.py\n\n# Option 2: Run the Gradio UI version\n# This starts a local web server with a chat interface at http://localhost:7860\npython gradio_ui.py\n\n```"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Serve-Example/agent_nexa.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom __future__ import annotations\n\nimport re\nimport json\nimport argparse\nimport requests\nfrom typing import Any, Tuple, Optional\nfrom serpapi import GoogleSearch\n\nfrom dataclasses import dataclass\nimport sys\nimport platform\n\n# Nexa config\nif sys.platform == \"darwin\":\n    DEFAULT_MODEL = \"NexaAI/granite-4.0-micro-GGUF\"\nelif sys.platform.startswith(\"win\"):\n    machine = platform.machine().lower()\n    if \"arm\" in machine:\n        # Windows ARM\n        DEFAULT_MODEL = \"NexaAI/Granite-4.0-h-350M-NPU\"\n    else:\n        # Windows x64\n        DEFAULT_MODEL = \"NexaAI/granite-4.0-micro-GGUF\"\nelse:\n    DEFAULT_MODEL = \"NexaAI/granite-4.0-micro-GGUF\"\n\nDEFAULT_ENDPOINT = \"http://127.0.0.1:18181\"\n# You can get a free API key from https://serpapi.com/\nSEARCH_API_KEY = \"7467f292f9d4ce3324da285ca111ea11477ba7fc84ee7e9fa5f867a9d1b35856\"\n\n# ... existing code ...\n\nSYSTEM_PROMPT = \"\"\"You are Granite Agent with function calling.\n\nYour goals:\n- Understand the user's request.\n- Decide whether a function call is needed.\n- If yes, output a structured JSON function call (no explanations).\n- If no, directly respond to the user in natural language.\n\nFunctions:\n1. search_web(query: string) - Web search\n2. write_to_file(file_path: string) - Save text to file\n\nOutput JSON for function calls:\n{\"name\": \"function_name\", \"arguments\": {\"key\": \"value\"}}\n\nRules:\n- JSON only for functions (no explanations)\n- Summarize results in 2-3 sentences\n- Never invent function names\n\nExamples:\nUser: Latest AI news?\nAssistant: {\"name\": \"search_web\", \"arguments\": {\"query\": \"latest AI news\"}}\n\nUser: Save that.\nAssistant: {\"name\": \"write_to_file\", \"arguments\": {\"file_path\": \"notes.txt\"}}\n\nUser: Hello\nAssistant: How can I assist you today?\n\"\"\"\n\n\ndef search_web(query: str):\n    \"\"\"Search the web using SerpAPI\"\"\"\n    params = {\n        \"engine\": \"google\",\n        \"q\": query,\n        \"google_domain\": \"google.com\",\n        \"num\": \"2\",\n        \"start\": \"1\",\n        \"safe\": \"active\",\n        \"api_key\": SEARCH_API_KEY,\n    }\n    search = GoogleSearch(params)\n    results = search.get_dict()\n    organic_results = results.get(\"organic_results\", [])\n\n    # Print search results for debugging\n    print(f\"\\n[Web Search Results for '{query}']:\")\n    for idx, result in enumerate(organic_results, 1):\n        print(f\"{idx}. {result.get('title', 'N/A')}\")\n        print(f\"   URL: {result.get('link', 'N/A')}\")\n        print(f\"   Snippet: {result.get('snippet', 'N/A')[:200]}...\")\n        print()\n\n    return organic_results\n\n\ndef write_to_file(file_path: str, content: str):\n    \"\"\"Write content to a file\"\"\"\n    with open(file_path, \"a\", encoding=\"utf-8\") as f:\n        f.write(content + \"\\n\")\n\n\nFUNCTION_REGISTRY = {\"search_web\": search_web, \"write_to_file\": write_to_file}\n\n\ndef handle_function_call(func_name: str, func_args: dict, model: str, endpoint: str):\n    \"\"\"\n    Execute the registered function, print the tool result, then call Nexa to produce\n    a natural language summary based on the tool output.\n    \"\"\"\n    if isinstance(func_args, str):\n        try:\n            func_args = json.loads(func_args)\n        except json.JSONDecodeError:\n            func_args = {}\n\n    tool_result = FUNCTION_REGISTRY[func_name](**func_args)\n\n    # Customize prompt based on function type\n    if func_name == \"search_web\":\n        user_followup_prompt = f\"\"\"\n        You called search_web with query: {func_args.get('query')}\n        \n        Here are the search results:\n        {tool_result}\n        \n        Please provide a short summary of these web search results in 2-3 bullet points. For each result:\n        - Include the title\n        - Mention the source/website\n        - Summarize the key information from the snippet\n        - Make it informative and comprehensive\n        \n        Be verbose and helpful. Do NOT call any function again.\n        \"\"\"\n    else:\n        user_followup_prompt = f\"\"\"\n        You previously decided to call the function `{func_name}` with arguments {func_args}.\n        Here is the result returned by that function:\n\n        {tool_result}\n\n        Now, based on this result, please summarize and respond naturally to the user.\n        Do NOT call any function again.\n        \"\"\"\n\n    try:\n        for piece in stream_call_nexa_chat(model, user_followup_prompt, endpoint):\n            yield piece\n    except Exception as e:\n        print(f\"[error] failed to call nexa for followup: {e}\")\n        yield f\"\\n[Error: {e}]\"\n        return\n\n\n# Nexa low-level call with better error handling\ndef _post_json(url: str, payload: dict, timeout: int = 300) -> dict:\n    \"\"\"Make a POST request with JSON payload\"\"\"\n    headers = {\"Content-Type\": \"application/json\"}\n    try:\n        resp = requests.post(\n            url, headers=headers, data=json.dumps(payload), timeout=timeout\n        )\n        if resp.status_code >= 400:\n            raise requests.HTTPError(\n                f\"{resp.status_code} {url}\\n{resp.text}\", response=resp\n            )\n        return resp.json()\n    except requests.exceptions.ConnectionError as e:\n        raise ConnectionError(\n            f\"Failed to connect to {url}. Is the Nexa server running? Error: {e}\"\n        )\n    except requests.exceptions.Timeout as e:\n        raise TimeoutError(f\"Request to {url} timed out after {timeout}s\")\n\n\ndef call_nexa_chat(model: str, prompt: str, base: str) -> str:\n    \"\"\"Call Nexa chat completion endpoint\"\"\"\n    url = base.rstrip(\"/\") + \"/v1/chat/completions\"\n    data = _post_json(\n        url,\n        {\n            \"model\": model,\n            \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n            \"stream\": False,\n            \"max_tokens\": 512,\n        },\n    )\n\n    try:\n        return data[\"choices\"][0][\"message\"][\"content\"]\n    except Exception:\n        # tolerate slight variants\n        return data.get(\"text\", \"\") or data.get(\"response\", \"\")\n\n\ndef call_nexa(prompt: str, model: str, endpoint_base: str) -> str:\n    \"\"\"\n    Use /v1/chat/completions endpoint.\n    \"\"\"\n    return call_nexa_chat(model, prompt, endpoint_base)\n\n\ndef stream_call_nexa_chat(model: str, prompt: str, base: str):\n    \"\"\"\n    Stream /v1/chat/completions.\n    Yields incremental text pieces as they arrive.\n    \"\"\"\n    url = base.rstrip(\"/\") + \"/v1/chat/completions\"\n    headers = {\"Content-Type\": \"application/json\"}\n    payload = {\n        \"model\": model,\n        \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n        \"stream\": True,\n        \"max_tokens\": 512,\n    }\n\n    try:\n        with requests.post(\n            url, headers=headers, data=json.dumps(payload), stream=True, timeout=300\n        ) as resp:\n            resp.raise_for_status()\n            for raw in resp.iter_lines(decode_unicode=True):\n                if not raw:\n                    continue\n                # typical line: \"data: {json}\" or \"data: [DONE]\"\n                if raw.startswith(\"data:\"):\n                    data = raw[len(\"data:\") :].strip()\n                    if data == \"[DONE]\":\n                        break\n                    try:\n                        obj = json.loads(data)\n                    except Exception:\n                        continue\n                    # chat stream usually in choices[0].delta.content\n                    choices = obj.get(\"choices\", [])\n                    if choices:\n                        delta = choices[0].get(\"delta\") or {}\n                        piece = delta.get(\"content\", \"\")\n                        if piece:\n                            yield piece\n    except requests.exceptions.ConnectionError as e:\n        raise ConnectionError(f\"Connection lost to {url}. The server may have crashed.\")\n\n\ndef nexa_chat_messages(model: str, messages: list, base: str):\n    \"\"\"\n    Use /v1/chat/completions.\n    By default this function returns the full response string.\n    \"\"\"\n    url = base.rstrip(\"/\") + \"/v1/chat/completions\"\n    data = _post_json(\n        url, {\"model\": model, \"messages\": messages, \"stream\": False, \"max_tokens\": 512}\n    )\n    try:\n        return data[\"choices\"][0][\"message\"][\"content\"]\n    except Exception:\n        # tolerate slight variants\n        return data.get(\"text\", \"\") or data.get(\"response\", \"\")\n\n\ndef extract_function_call(text: str) -> Optional[Tuple[str, dict]]:\n    \"\"\"\n    Extract function call JSON from LLM response using regex.\n    Handles cases where JSON is embedded in text or has extra tokens.\n\n    Returns:\n        Tuple of (function_name, arguments) if found, None otherwise\n    \"\"\"\n    # Clean up common LLM artifacts\n    text = text.strip()\n\n    # Remove special tokens like <|end_of_text|>, <|im_end|>, etc.\n    text = re.sub(r\"<\\|[^|]+\\|>\", \"\", text)\n    text = text.strip()\n\n    # Try to find JSON-like structure with \"name\" and \"arguments\" fields\n    # Pattern matches: { \"name\": \"...\", \"arguments\": { ... } }\n    json_pattern = (\n        r'\\{[^{}]*\"name\"\\s*:\\s*\"([^\"]+)\"[^{}]*\"arguments\"\\s*:\\s*(\\{[^}]*\\})[^{}]*\\}'\n    )\n\n    match = re.search(json_pattern, text, re.DOTALL)\n    if match:\n        func_name = match.group(1)\n        try:\n            # Try to parse the arguments\n            args_str = match.group(2)\n            func_args = json.loads(args_str)\n            return func_name, func_args\n        except json.JSONDecodeError:\n            # If arguments parsing fails, try to extract manually\n            # Pattern for simple key-value like { \"query\": \"...\" }\n            args_match = re.search(r'\"(\\w+)\"\\s*:\\s*\"([^\"]*)\"', match.group(2))\n            if args_match:\n                return func_name, {args_match.group(1): args_match.group(2)}\n\n    # Fallback: try to parse the entire cleaned text as JSON\n    try:\n        parsed = json.loads(text)\n        if isinstance(parsed, dict) and \"name\" in parsed:\n            func_name = parsed.get(\"name\")\n            func_args = parsed.get(\"arguments\", {})\n            return func_name, func_args\n    except json.JSONDecodeError:\n        pass\n\n    return None\n\n\ndef nexa_start_search_stream(\n    query: str,\n    last_message: str = \"\",\n    model: str = DEFAULT_MODEL,\n    endpoint: str = DEFAULT_ENDPOINT,\n):\n    \"\"\"\n    Main agent function that handles user query and function calling.\n    Yields JSON-formatted status messages.\n    \"\"\"\n    messages = [\n        {\"role\": \"system\", \"content\": SYSTEM_PROMPT},\n        {\"role\": \"user\", \"content\": query},\n    ]\n\n    try:\n        yield json.dumps({\"status\": \"proccess\", \"message\": \"Starting analysis...\"})\n        result = nexa_chat_messages(model, messages, endpoint)\n\n        # Try to extract function call using helper function\n        function_call = extract_function_call(result)\n\n        if function_call:\n            func_name, func_args = function_call\n\n            # Validate function exists in registry\n            if func_name in FUNCTION_REGISTRY:\n                yield json.dumps(\n                    {\n                        \"status\": \"function\",\n                        \"message\": json.dumps(\n                            {\"name\": func_name, \"arguments\": func_args}\n                        ),\n                    }\n                )\n\n                if func_name == \"write_to_file\":\n                    yield json.dumps(\n                        {\"status\": \"proccess\", \"message\": \"Function calling...\"}\n                    )\n\n                    file_path = func_args.get(\"file_path\") or func_args.get(\"path\")\n                    write_to_file(file_path, last_message)\n\n                    yield json.dumps(\n                        {\n                            \"status\": \"proccess\",\n                            \"message\": \"Function call finished.\",\n                        }\n                    )\n\n                    message = f\"Successfully saved the previous answer to **{file_path}**. You can check it anytime!\"\n                    yield json.dumps({\"status\": \"stream\", \"message\": message})\n                else:\n                    # Execute the function and stream results\n                    try:\n                        yield json.dumps(\n                            {\"status\": \"proccess\", \"message\": \"Function calling...\"}\n                        )\n                        flag = False\n                        for piece in handle_function_call(\n                            func_name, func_args, model, endpoint\n                        ):\n                            if not flag:\n                                yield json.dumps(\n                                    {\n                                        \"status\": \"proccess\",\n                                        \"message\": \"Function call finished.\",\n                                    }\n                                )\n                                flag = True\n\n                            yield json.dumps({\"status\": \"stream\", \"message\": piece})\n                    except Exception as e:\n                        yield json.dumps(\n                            {\"status\": \"function_call_error\", \"message\": f\"{e}\"}\n                        )\n                        # try again\n                        try:\n                            for piece in handle_function_call(\n                                func_name, func_args, model, endpoint\n                            ):\n                                yield json.dumps({\"status\": \"stream\", \"message\": piece})\n                        except Exception as retry_error:\n                            yield json.dumps(\n                                {\n                                    \"status\": \"error\",\n                                    \"message\": f\"Retry failed: {retry_error}\",\n                                }\n                            )\n            else:\n                # Function not in registry, treat as regular response\n                yield json.dumps({\"status\": \"stream\", \"message\": result})\n        else:\n            # No function call detected, treat as regular response\n            yield json.dumps({\"status\": \"stream\", \"message\": result})\n\n    except (ConnectionError, TimeoutError) as e:\n        yield json.dumps({\"status\": \"error\", \"message\": f\"Connection error: {e}\"})\n    except requests.HTTPError as e:\n        yield json.dumps({\"status\": \"error\", \"message\": f\"HTTP error: {e}\"})\n    except Exception as e:\n        yield json.dumps({\"status\": \"error\", \"message\": f\"Unexpected error: {e}\"})\n\n\n# CLI\ndef main():\n    \"\"\"Main CLI entry point\"\"\"\n    ap = argparse.ArgumentParser(description=\"Function Tool with Nexa SDK server\")\n    ap.add_argument(\"--model\", default=DEFAULT_MODEL, help=\"Nexa model name or alias.\")\n    ap.add_argument(\n        \"--endpoint\",\n        default=DEFAULT_ENDPOINT,\n        help=\"Nexa base endpoint, e.g. http://127.0.0.1:18181\",\n    )\n    args = ap.parse_args()\n\n    print(f\"[info] Ready. Using model={args.model} endpoint={args.endpoint}\")\n    print(\"Type your question (or just press Enter to quit):\")\n\n    last_message = \"\"\n    while True:\n        try:\n            q = input(\"[user] \").strip()\n            if not q:\n                break\n\n            print(\"[assistant] \", end=\"\", flush=True)\n            response_content = \"\"\n\n            # Parse JSON responses and display nicely\n            for piece in nexa_start_search_stream(\n                q, last_message, args.model, args.endpoint\n            ):\n                try:\n                    parsed = json.loads(piece)\n                    status = parsed.get(\"status\")\n                    message = parsed.get(\"message\", \"\")\n\n                    if status == \"proccess\":\n                        print(f\"\\n[{message}]\", end=\" \", flush=True)\n                    elif status == \"function\":\n                        print(f\"\\n[Function call: {message}]\", flush=True)\n                    elif status == \"stream\":\n                        print(message, end=\"\", flush=True)\n                        response_content += message\n                    elif status == \"error\":\n                        print(f\"\\n[ERROR: {message}]\", flush=True)\n                    elif status == \"function_call_error\":\n                        print(f\"\\n[Function call error: {message}]\", flush=True)\n                    else:\n                        print(message, end=\"\", flush=True)\n                        response_content += message\n                except json.JSONDecodeError:\n                    # If not JSON, just print it\n                    print(piece, end=\"\", flush=True)\n                    response_content += piece\n\n            last_message = response_content\n            print()  # newline after response\n\n        except KeyboardInterrupt:\n            print(\"\\n[info] Bye.\")\n            break\n        except Exception as e:\n            print(f\"\\n[error] {e}\")\n            continue\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Serve-Example/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\nimport gradio as gr\nfrom gradio import ChatMessage\nimport json\n\nfrom agent_nexa import (\n    nexa_start_search_stream\n)\n\n# Chat streaming with Nexa\ndef chat_stream_search(query: str, history: list):\n    \"\"\"\n    Parse JSON lines emitted by backend stream and update chat + input.\n\n    Backend lines are JSON strings with format:\n      {\"status\": \"loading\", \"message\": \"start query...\"}\n      {\"status\": \"function\", \"message\": result}\n      {\"status\": \"stream\", \"message\": piece}\n\n    We write status messages into the input box so the user sees progress.\n    \"\"\"\n    if history is None:\n        history = []\n\n    # Append the user's message to history\n    history.append(ChatMessage(role=\"user\", content=query))\n\n    yield history, \"\"\n\n    assistant_appended = False\n\n    # Keep last_message if needed by backend (not used here)\n    last_message = history[-2]['content'] if len(history) > 1 else \"\"\n\n    try:\n        for raw in nexa_start_search_stream(query, last_message):\n            # raw is expected to be a JSON string\n            parsed = None\n            if isinstance(raw, str):\n                try:\n                    parsed = json.loads(raw)\n                except Exception:\n                    # Not JSON: treat as raw stream chunk\n                    parsed = None\n\n            if parsed and isinstance(parsed, dict) and \"status\" in parsed:\n                st = parsed.get(\"status\")\n                msg = parsed.get(\"message\", \"\")\n\n                if st == \"function_call_error\":\n                    history.append(ChatMessage(\n                        role=\"assistant\",\n                        content=f\"{msg}\",\n                        metadata={\"title\": f\"🛠️ **Function call error**\"},\n                    ))\n                    history.append(\n                        ChatMessage(\n                            role=\"assistant\",\n                            content=\"I will try again, please wait...\\n\",\n                        )\n                    )\n                    yield history, \"\"\n                    continue\n                    \n                if st == \"error\":\n                    history.append(ChatMessage(\n                        role=\"assistant\",\n                        content=f\"(Error: {msg})\",\n                        metadata={\"title\": f\"❌ **Error occurred**\"},\n                    ))\n                    yield history, \"\"\n                    continue\n                \n                if st == \"proccess\":\n                    history.append(ChatMessage(\n                        role=\"assistant\",\n                        content=\"\",\n                        metadata={\"title\": f\"🛠️ **{msg}**\"}\n                    ))\n                    yield history, \"\"\n                    continue\n                    \n                if st == \"function\":\n                    try: \n                        func_desc = json.loads(msg)\n                        func_name = func_desc.get(\"name\")\n                        content = f\"\"\"```json\n                        {json.dumps(func_desc)}\n                        ```\"\"\"\n                        history.append(ChatMessage(\n                            role=\"assistant\",\n                            content=content,\n                            metadata={\"title\": f\"🛠️ **Used tool '{func_name}'**\"},\n                        ))\n                    except Exception:\n                        history.append(ChatMessage(\n                            role=\"assistant\",\n                            content=f\"{msg}\",\n                        ))\n                    yield history, \"\"\n                    continue\n\n                if st == \"stream\":\n                    piece = msg\n                    # append or create assistant message\n                    if not assistant_appended:\n                        history.append(ChatMessage(role=\"assistant\", content=piece))\n                        assistant_appended = True\n                    else:\n                        # extend last assistant content\n                        history[-1].content += piece\n\n                    # clear input while streaming\n                    yield history, \"\"\n                    continue\n\n                # unknown status -> show raw message in input\n                history.append(ChatMessage(role=\"assistant\", content=str(msg)))\n                yield history, \"\"\n                continue\n\n            # fallback: raw chunk string\n            if isinstance(raw, str):\n                piece = raw\n                if not assistant_appended:\n                    history.append(ChatMessage(role=\"assistant\", content=piece))\n                    assistant_appended = True\n                else:\n                    history[-1].content += piece\n                yield history, \"\"\n\n    except Exception as e:\n        # append error to assistant message\n        if assistant_appended:\n            history[-1].content += f\"\\n(Streaming failed: {e})\"\n        else:\n            history.append(ChatMessage(role=\"assistant\", content=f\"(Streaming failed: {e})\"))\n        yield history, \"\"\n\n# UI\nCUSTOM_CSS = \"\"\"\n/* Make cards cleaner and add subtle shadows */\n.gradio-container { max-width: 1600px !important; }\n.rounded-card { border-radius: 16px; box-shadow: 0 1px 8px rgba(0,0,0,.06); background: white; }\n.pad { padding: 14px; }\n.section-title { font-weight: 700; font-size: 16px; opacity: .8; margin-bottom: 8px; }\n#info-panel .gallery { background: #101114; } /* darker bg for images */\n\"\"\"\n\nwith gr.Blocks(title=\"Function call with NexaSDK\", css=CUSTOM_CSS) as demo:\n    gr.Markdown(\"## Function call with NexaSDK\")\n\n    with gr.Column(scale=2, elem_classes=[\"rounded-card\", \"pad\"]):\n        chat = gr.Chatbot(type=\"messages\", height=500, show_copy_button=True)\n        chat_input = gr.Textbox(placeholder=\"Input your query...\", label=\"Your question\")\n        with gr.Row():\n            btn_send = gr.Button(\"Send\", variant=\"primary\", elem_id=\"btn-send\")\n            btn_clear = gr.Button(\"Clear chat\")\n\n    # Events\n    def on_clear():\n        # Clear chat history and input box\n        return [], \"\"\n\n    btn_clear.click(fn=on_clear, outputs=[chat, chat_input])\n\n    # Chat send (streaming)\n    btn_send.click(\n        fn=chat_stream_search,\n        inputs=[chat_input, chat],\n        outputs=[chat, chat_input],\n    )\n    chat_input.submit(\n        fn=chat_stream_search,\n        inputs=[chat_input, chat],\n        outputs=[chat, chat_input],\n    )\n\nif __name__ == \"__main__\":\n    demo.launch()\n"
  },
  {
    "path": "cookbook/PC/Agent-Granite/Serve-Example/requirements.txt",
    "content": "requests>=2.32.4\npydantic>=2.4.0\npsutil\ngoogle-search-results"
  },
  {
    "path": "cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# !/usr/bin/env python3\n\nimport gradio as gr\nfrom gradio import ChatMessage\n\nfrom typing import Dict, Any\nfrom vlm_viewmodel import (VLMViewModel)\n\nvlm_vm = VLMViewModel()\n\n# Call streaming response\ndef stream_response(\n    history: list,\n    message: Dict[str, Any],\n    system_prompt: str,\n    repo_id: str,\n    plugin_id: str,\n    device_id: str,\n    max_tokens: int, \n    temperature: float, \n    top_p: float\n):\n    \"\"\"Handle send button click event.\"\"\"\n    \n    images = []\n    prompt = \"\"\n    for file in message[\"files\"]:\n        history.append(ChatMessage(content=gr.Image(file), role=\"user\"))\n        images.append(file)\n    if message[\"text\"] is not None:\n        history.append(ChatMessage(content=message[\"text\"], role=\"user\"))\n        prompt = message[\"text\"]\n        \n    yield history, gr.MultimodalTextbox(value=None, interactive=False)\n    \n    history.append(ChatMessage(content=\"Loading...\", role=\"assistant\"))\n    \n    yield history, None\n    \n    try:\n        vlm_vm.create(\n            repo_id=repo_id,\n            plugin_id=plugin_id,\n            device=device_id,\n            system_prompt=system_prompt\n        )\n    \n        history[-1].content = \"\"\n        for token in vlm_vm.stream_response(\n            prompt=prompt, \n            images=images, \n            max_tokens=max_tokens, \n            temperature=temperature, \n            top_p=top_p\n        ):\n            history[-1].content += token\n            yield history, None\n            \n    except Exception as e:\n        history[-1].content = f\"\\n\\n[Error occurred: {str(e)}]\"\n        yield history, None\n\n# Build Gradio UI\nwith gr.Blocks(title=\"VLM Example with Nexa Python Binding\", fill_height=True) as demo:\n    gr.Markdown(\"## VLM Example with Nexa Python Binding\")\n\n    with gr.Row(equal_height=True):\n        with gr.Column(scale=1, elem_classes=[\"rounded-card\", \"pad\"]):\n            system_prompt = gr.Textbox(\n                label=\"System Prompt\", \n                placeholder=\"Enter system prompt here...\",\n                value=\"\", \n                lines=20, \n                interactive=True,\n            )\n            \n        with gr.Column(scale=4):\n            chatbot = gr.Chatbot(\n                type='messages', \n                show_copy_button=True,\n                height=500\n            )\n            \n            # Input area with chat input \n            chat_input = gr.MultimodalTextbox(\n                interactive=True,\n                placeholder=\"Enter message...\",\n                file_types=[\"image\"],\n                file_count=\"multiple\",\n                show_label=False,\n            )\n        with gr.Column(scale=1):\n            with gr.Row():\n                default_model = vlm_vm.models[0]\n                all_models_repids = [model.repo_id for model in vlm_vm.models]\n                repo_id = gr.Dropdown(all_models_repids, label=\"Model repo Id\", value=default_model.repo_id)\n                plugin_id = gr.Dropdown(default_model.plugin_ids, label=\"Plugin Id\", value=default_model.plugin_ids[0], interactive=True)\n                device = gr.Dropdown(default_model.devices, label=\"Device\", value=default_model.devices[0], interactive=True)\n                \n                temperature = gr.Slider(0.0, 1.0, value=0.8, step=0.05, label=\"Temperature\", interactive=True)\n                max_tokens = gr.Slider(200, 65535, value=200, step=10, label=\"Max Tokens\", interactive=True)\n                top_p = gr.Slider(0.0, 1.0, value=0.95, step=0.05, label=\"Top-p\", interactive=True)\n    \n        def on_model_repo_change(repo_id):\n            vlm_vm.reset()\n            selected_model = next((model for model in vlm_vm.models if model.repo_id == repo_id), None)\n            if selected_model:\n                return [\n                    gr.update(\n                        choices=selected_model.plugin_ids,\n                        value=selected_model.plugin_ids[0]\n                    ), \n                    gr.update(\n                        choices=selected_model.devices,\n                        value=selected_model.devices[0]\n                    ), \n                    []\n                ]\n            \n            return [\n                gr.update(\n                    choices=[\"nexaml\"],\n                    value=\"nexaml\"\n                ), \n                gr.update(\n                    choices=[\"gpu\"],\n                    value=\"gpu\"\n                ),\n                []\n            ]\n           \n        def on_system_prompt_change(new_prompt):\n            vlm_vm.update_system_prompt(new_prompt)\n         \n        def on_id_change():\n            vlm_vm.reset\n            \n        system_prompt.change(\n            fn=on_system_prompt_change,\n            inputs=system_prompt,\n            outputs=[]\n        )\n        \n        repo_id.change(\n            fn=on_model_repo_change,\n            inputs=repo_id,\n            outputs=[plugin_id, device, chatbot]\n        )\n        \n        plugin_id.change(\n            fn=on_id_change\n        )\n        \n        device.change(\n            fn=on_id_change\n        )\n        \n        stream = chat_input.submit(\n            fn=stream_response, \n            inputs=[chatbot, chat_input, system_prompt, repo_id, plugin_id, device, max_tokens, temperature, top_p],\n            outputs=[chatbot, chat_input]\n        )\n        \n        stream.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])\n\n\nif __name__ == \"__main__\":\n\tdemo.launch()\n"
  },
  {
    "path": "cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/vlm_service.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\"\"\"\nNexaAI VLM Service\n\"\"\"\n\nimport os\nimport argparse\nimport io\nimport re\n\nfrom typing import List, Optional\n\nfrom nexaai.vlm import VLM, GenerationConfig\nfrom nexaai.common import ModelConfig, MultiModalMessage, MultiModalMessageContent, SamplerConfig\n\ndefault_system_prompt = \"\"\"\nYou are a witty, sarcastic, and sassy AI who comments on images with humor and attitude.\nYou always respond in JSON format according to the grammar.\nYour humor should be clever and lighthearted, never mean or offensive.\n\nGrammar:\n{\n  \"response\": string,  // Your main sarcastic or witty comment about the image\n  \"comeback\"?: string  // Optional humorous follow-up or playful comeback\n}\n\nConstraints:\n- Always produce valid JSON.\n- The response should reflect a strong personality (sarcastic, witty, or sassy).\n- The \"comeback\" is optional — include it only if it naturally fits.\n\"\"\"\n\nclass VLMService:\n    \"\"\"\n    NexaAI vlm service\n    \"\"\"\n\n    def __init__(\n        self, \n        model_name: str, \n        mmproj_name: str,\n        plugin_id: str = \"nexaml\", \n        device: str = \"gpu\",\n        system_prompt: str = \"\"\n    ):\n        self.model_name = model_name\n        self.mmproj_name = mmproj_name\n        self.plugin_id = plugin_id\n        self.device = device\n        if len(system_prompt.strip()) > 0:\n            self.system_prompt = system_prompt\n        else:\n            self.system_prompt = default_system_prompt\n            \n        self._model = None\n        self._conversation: List[MultiModalMessage] = []\n        self._init_model()\n\n    def _init_model(self):\n        \"\"\"Initialize the VLM model and conversation context.\"\"\"\n        m_cfg = ModelConfig()\n        \n        print(\"[debug: ]\", self.model_name, self.plugin_id, self.device, self.mmproj_name)\n        self._model = VLM.from_(\n            name_or_path=self.model_name,\n            m_cfg=m_cfg,\n            plugin_id=self.plugin_id,\n            device_id=self.device,\n            mmproj_path=self.mmproj_name\n        )\n        \n        # initialize conversation with system prompt\n        self._conversation = [\n            MultiModalMessage(\n                role=\"system\",\n                content=[MultiModalMessageContent(type=\"text\", text=self.system_prompt)]\n            )\n        ]\n\n    # -------------------------------------------------------------\n    # Public API\n    # -------------------------------------------------------------\n    def stream_response(\n        self,\n        prompt: str,\n        images: Optional[List[str]] = None,\n        audios: Optional[List[str]] = None,\n        max_tokens: int = 200,\n        temperature: float = 0.7,\n        top_p: float = 0.9\n    ):\n        \"\"\"\n        Stream generate\n\n        Args:\n            prompt: User input text\n            images: List of image paths (optional)\n            audios: List of audio paths (optional)\n            max_tokens: Maximum generation length\n\n        Returns:\n            dict: { \"text\": Model output text, \"images\": Image paths}\n        \"\"\"\n        contents = []\n        if prompt:\n            contents.append(MultiModalMessageContent(type=\"text\", text=prompt))\n        if images:\n            for img in images:\n                contents.append(MultiModalMessageContent(type=\"image\", path=img))\n        if audios:\n            for audio in audios:\n                contents.append(MultiModalMessageContent(type=\"audio\", path=audio))\n\n        user_msg = MultiModalMessage(role=\"user\", content=contents)\n        self._conversation.append(user_msg)\n\n        prompt = self._model.apply_chat_template(self._conversation)\n     \n        sampler_config = SamplerConfig()\n        sampler_config.temperature = temperature\n        sampler_config.top_p = top_p\n        sampler_config.grammar_string=r\"\"\"\n        char ::= [^\"\\\\\\x7F\\x00-\\x1F] | [\\\\] ([\"\\\\bfnrt] | \"u\" [0-9a-fA-F]{4})\n        comeback-kv ::= \"\\\"comeback\\\"\" space \":\" space string\n        response-kv ::= \"\\\"response\\\"\" space \":\" space string\n        root ::= \"{\" space response-kv ( \",\" space ( comeback-kv ) )? \"}\" space\n        space ::= | \" \" | \"\\n\"{1,2} [ \\t]{0,20}\n        string ::= \"\\\"\" char* \"\\\"\" space\n        \"\"\"\n    \n        gen_cfg = GenerationConfig(\n            max_tokens=max_tokens, \n            sampler_config=sampler_config,\n            image_paths=images,\n            audio_paths=audios\n        )\n        \n        \n        strbuff = io.StringIO()\n        strbuff.truncate(0)\n        strbuff.seek(0)\n        for token in self._model.generate_stream(prompt, gen_cfg):\n            strbuff.write(token)\n            yield token\n        \n        self._conversation.append(MultiModalMessage(role=\"assistant\", content=[MultiModalMessageContent(type=\"text\", text=strbuff.getvalue())]))\n\n    def update_system_prompt(self, system_prompt: str):\n        \"\"\"\n        Update system prompt and reset conversation\n        \"\"\"\n        self.system_prompt = system_prompt\n        self.reset()\n        print(f\"[Info] System prompt updated to: {system_prompt}\")\n    \n    def reset(self):\n        \"\"\"\n        Reset conversation context\n        \"\"\"\n        self._conversation = [\n            MultiModalMessage(\n                role=\"system\",\n                content=[MultiModalMessageContent(type=\"text\", text=self.system_prompt)]\n            )\n        ]\n        self._model.reset()\n\n    def save_cache(self, path: str):\n        \"\"\"Save KV cache\"\"\"\n        self._model.save_kv_cache(path)\n\n    def load_cache(self, path: str):\n        \"\"\"Load KV cache\"\"\"\n        self._model.load_kv_cache(path)\n            \n\ndef parse_media_from_input(user_input: str) -> tuple[str, Optional[List[str]], Optional[List[str]]]:\n    quoted_pattern = r'[\"\\']([^\"\\']*)[\"\\']'\n    quoted_matches = re.findall(quoted_pattern, user_input)\n\n    prompt = re.sub(quoted_pattern, '', user_input).strip()\n\n    image_extensions = {'.png', '.jpg', '.jpeg', '.gif', '.bmp', '.tiff', '.webp'}\n    audio_extensions = {'.mp3', '.wav', '.flac', '.aac', '.ogg', '.m4a'}\n\n    image_paths = []\n    audio_paths = []\n\n    for quoted_file in quoted_matches:\n        if quoted_file:\n            if quoted_file.startswith('~'):\n                quoted_file = os.path.expanduser(quoted_file)\n\n            if not os.path.exists(quoted_file):\n                print(f\"Warning: File '{quoted_file}' not found\")\n                continue\n\n            file_ext = os.path.splitext(quoted_file.lower())[1]\n            if file_ext in image_extensions:\n                image_paths.append(quoted_file)\n            elif file_ext in audio_extensions:\n                audio_paths.append(quoted_file)\n\n    return prompt, image_paths if image_paths else None, audio_paths if audio_paths else None\n\n\ndef main():\n\n    parser = argparse.ArgumentParser(description=\"NexaAI VLM Example\")\n    parser.add_argument(\"--model\", \n                       default=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF/Qwen3-VL-4B-Instruct.Q4_0.gguf\",\n                       help=\"Path to the VLM model\")\n    parser.add_argument(\"--mmproj\", \n                       default=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF/mmproj.F32.gguf\",\n                       help=\"Path to the mmproj\")\n    parser.add_argument(\"--max-tokens\", type=int, default=100, help=\"Maximum tokens to generate\")\n    parser.add_argument(\"--system\", default=default_system_prompt, \n                       help=\"System message\")\n    parser.add_argument(\"--plugin-id\", default=\"nexaml\", help=\"Plugin ID to use\")\n    parser.add_argument(\"--device\", default=\"gpu\", help=\"Device to run on\")\n    \n    args = parser.parse_args()\n    # Create VLM service via the viewmodel so UI can share the same instance\n    vlm_service = VLMService(\n        model_name=args.model,\n        mmproj_name=args.mmproj,\n        plugin_id=args.plugin_id,\n        device=args.device,\n        system_prompt=args.system,\n    )\n    \n    print(\"NexaAI VLM Service is ready. Type 'exit' to quit.\")\n    while True:\n        user_input = input(\"User: \")\n        if user_input.lower() == \"exit\":\n            break\n\n        prompt, image_paths, audio_paths = parse_media_from_input(user_input)\n        \n        flag = False\n        for token in vlm_service.stream_response(\n            prompt=prompt,\n            images=image_paths,\n            audios=audio_paths,\n            max_tokens=args.max_tokens\n        ):\n            if not flag:\n                print(\"Assistant: \", end=\"\", flush=True)\n                flag = True\n            print(token, end=\"\", flush=True)\n        print()\n    \nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/PC/Multimodal-Qwen3VL/Python-Binding-Example/vlm_viewmodel.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\nfrom dataclasses import dataclass\nfrom typing import Optional, List\n\nfrom vlm_service import VLMService\n\n@dataclass\nclass ModelInfo:\n    repo_id: str\n    plugin_ids: List[str]\n    model_path: str\n    mmproj_path: str\n    devices: List[str]\n\nclass VLMViewModel:\n    \"\"\"ViewModel wrapper around VLMService for UI layers (e.g. Gradio).\n    \"\"\"\n\n    def __init__(self) -> None:\n        self._vlm: Optional[VLMService] = None\n\n    def reset(self) -> None:\n        \"\"\"Reset and dispose the current VLMService instance.\"\"\"\n        if self._vlm is not None:\n            self._vlm.reset()\n            self._vlm = None\n\n    def create(\n        self,\n        repo_id: str,\n        plugin_id: str,\n        device: str,\n        system_prompt: str,\n    ):\n        \"\"\"Lazily create (or return existing) VLMService instance.\n\n        Returns the active VLMService instance.\n        \"\"\"\n        model_info = self._model_of_repo(repo_id=repo_id)\n        \n        if self._vlm is None:\n            self._vlm = VLMService(\n                model_name=model_info.model_path,\n                mmproj_name=model_info.mmproj_path,\n                plugin_id=plugin_id,\n                device=device,\n                system_prompt=system_prompt,\n            )\n\n    def stream_response(\n        self,\n        prompt: str,\n        images: Optional[List[str]] = None,\n        audios: Optional[List[str]] = None,\n        max_tokens: int = 200,\n        temperature: float = 0.7,\n        top_p: float = 0.9\n    ):\n        yield from self._vlm.stream_response(\n            prompt=prompt, \n            images=images, \n            audios=audios, \n            max_tokens=max_tokens, \n            temperature=temperature,top_p=top_p\n        )\n        \n    def _model_of_repo(self, repo_id: str) -> ModelInfo:\n        return next((model for model in self.models if model.repo_id == repo_id), None)\n        \n    def update_system_prompt(self, system_prompt: str) -> None:\n        \"\"\"Update the system prompt of the active VLM and reset conversation.\"\"\"\n        if self._vlm is not None:\n            self._vlm.update_system_prompt(system_prompt)\n            \n    @property\n    def models(self) -> List[ModelInfo]:\n        \"\"\"All models\"\"\"\n        return [\n            ModelInfo(\n                repo_id=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\",\n                plugin_ids=[\"nexaml\"],\n                model_path=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF/Qwen3-VL-4B-Instruct.Q4_0.gguf\",\n                mmproj_path=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF/mmproj.F32.gguf\",\n                devices=[\"gpu\", \"cpu\"]\n            )\n        ]\n"
  },
  {
    "path": "cookbook/PC/Multimodal-Qwen3VL/README.md",
    "content": "## About\n\nThis demo showcases how to use NexaAI Python Binding to build a Vision-Language Model (VLM) application that supports structured JSON outputs, multi-image input, and custom system prompt control.\n\n## Setup\n\n### Prerequisites\n| Platform | Required Python | \n|----------|----------------|\n| **Windows (ARM64, Snapdragon X Elite)** | **3.11 – 3.13 (arm64)** |\n| **macOS / Windows (x64)** | **3.10 (x64)** |\n\n### Install Dependencies\n\n```bash\n# Navigate to the example directory\ncd Python-Binding-Example\n\n# Create a Python virtual environment\npython -m venv .venv\n\n# Activate the virtual environment (windows)\n.\\.venv\\Scripts\\activate\n\n# Activate the virtual environment (macOS)\nsource .venv/bin/activate\n\n# Install all required dependencies\npip install nexaai\npip install gradio\n\n```\n\n## Running the Example\n\n```bash\n# Run the CLI version which provides an interactive terminal interface\npython vlm_serve.py\n\n# Run the Gradio UI version\npython gradio_ui.py\n\n```"
  },
  {
    "path": "cookbook/PC/RAG-LLM/Python-Binding-Example/README.md",
    "content": "## About\n\nThis demo showcases a RAG implementation using NexaAI Python binding. \n\n## Setup\n\n### Prerequisites\n\n| Platform | Required Python | \n|----------|----------------|\n| **Windows (ARM64, Snapdragon X Elite)** | **3.11 – 3.13 (arm64)** |\n| **macOS / Windows (x64)** | **3.10 (x64)** |\n\nFor python install, you can check our interactive Jupyter notebooks. Choose the appropriate notebook for your platform:\n- [macOS Installation Guide](../../../bindings/python/notebook/macos.ipynb)\n- [windows(x64) Installation Guide](../../../bindings/python/notebook/windows(x64).ipynb)\n- [windows(ARM64) Installation Guide](../../../bindings/python/notebook/winodws(arm64).ipynb)\n\n### Install Dependencies\n\n```bash\n# Navigate to the example directory\ncd Python-Binding-Example\n\n# Create a Python virtual environment\npython -m venv .venv\n\n# Activate the virtual environment\n.\\.venv\\Scripts\\activate # windows\n\nsource .venv/bin/activate # macOS\n\n# Install all required dependencies\npip install -r requirements.txt\n```\n\n## Running the Example\n\n```bash\n# Run the CLI version which provides an interactive terminal interface\n# This version allows direct interaction with the agent through command line\npython rag_nexa.py --data ../docs\n\n# Run the Gradio UI version\n# This starts a local web server with a chat interface at http://localhost:7860\npython gradio_ui.py\n\n```\n"
  },
  {
    "path": "cookbook/PC/RAG-LLM/Python-Binding-Example/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\n# Fix for ARM64 Windows matplotlib compatibility issue\nimport os\nimport sys\nfrom gradio import ChatMessage\n\n# Disable Gradio's matplotlib backend manager on ARM64 Windows\nif sys.platform == \"win32\" and os.environ.get(\"PROCESSOR_ARCHITECTURE\") == \"ARM64\":\n    os.environ[\"MPLBACKEND\"] = \"Agg\"\n    os.environ[\"_GRADIO_SKIP_MATPLOTLIB_MANAGER\"] = \"1\"\n\nimport platform\nimport subprocess\nfrom typing import List, Tuple, Optional, Dict, Any\n\nimport gradio as gr\n\nfrom rag_nexa import (\n    DEFAULT_MODEL, DEFAULT_INDEX_JSON, DEFAULT_EMBED_MODEL, DEFAULT_MODEL_FOLDER,\n    build_json_index, load_json_index, search_numpy, call_nexa_chat, call_nexa_chat_completion\n)\n\nDOCS_DIR_DEFAULT = \"../docs\"\n\n\n# ============================================================================\n# Helper Functions\n# ============================================================================\n\ndef ensure_docs_dir(path: str) -> None:\n    \"\"\"\n    Create directory if it doesn't exist.\n    \n    Args:\n        path: Directory path to create\n    \"\"\"\n    try:\n        if not os.path.exists(path):\n            os.makedirs(path, exist_ok=True)\n    except OSError as e:\n        raise OSError(f\"Failed to create directory {path}: {e}\")\n\n\ndef save_uploaded_files(files: List[gr.File], dest_dir: str) -> int:\n    \"\"\"\n    Save uploaded files to destination directory.\n    \n    Args:\n        files: List of uploaded Gradio File objects\n        dest_dir: Destination directory path\n        \n    Returns:\n        Number of files successfully saved\n    \"\"\"\n    if not files:\n        return 0\n    \n    saved_count = 0\n    for file in files:\n        try:\n            # Extract file path from Gradio File object\n            src = getattr(file, \"name\", None) or file\n            if not src:\n                continue\n            \n            # Copy file to destination\n            filename = os.path.basename(src)\n            out_path = os.path.join(dest_dir, filename)\n            \n            with open(src, \"rb\") as r, open(out_path, \"wb\") as w:\n                w.write(r.read())\n            \n            saved_count += 1\n        except Exception as e:\n            # Log error but continue with other files\n            print(f\"Warning: Failed to save {src}: {e}\")\n            continue\n    \n    return saved_count\n\n\ndef open_folder(path: str) -> Tuple[bool, Optional[str]]:\n    \"\"\"\n    Open folder in system file explorer.\n    \n    Args:\n        path: Folder path to open\n        \n    Returns:\n        Tuple of (success: bool, error_message: str or None)\n    \"\"\"\n    if not os.path.exists(path):\n        return False, f\"Path does not exist: {path}\"\n    \n    try:\n        system = platform.system()\n        \n        # Platform-specific folder opening\n        if system == \"Windows\":\n            subprocess.Popen([\"explorer\", os.path.normpath(path)])\n        elif system == \"Darwin\":  # macOS\n            subprocess.Popen([\"open\", path])\n        else:  # Linux and others\n            subprocess.Popen([\"xdg-open\", path])\n        \n        return True, None\n    except Exception as e:\n        return False, str(e)\n\n\n# ============================================================================\n# Core RAG Functions\n# ============================================================================\n\ndef do_rebuild(docs_dir: str, k: int, chunk_size: int, chunk_overlap: int) -> Tuple[Optional[Dict[str, Any]], str]:\n    \"\"\"\n    Build or rebuild the document index from files in docs_dir.\n    \n    Args:\n        docs_dir: Directory containing documents to index\n        k: Number of top results (unused in this function)\n        chunk_size: Size of text chunks for splitting\n        chunk_overlap: Overlap between consecutive chunks\n        \n    Returns:\n        Tuple of (index_dict or None, status_message)\n    \"\"\"\n    try:\n        # Validate inputs\n        if chunk_overlap >= chunk_size:\n            return None, \"Error: Chunk overlap must be less than chunk size\"\n        \n        # Ensure docs directory exists\n        ensure_docs_dir(docs_dir)\n        \n        # Index path resides inside docs folder to keep UX simple\n        index_json_path = os.path.join(docs_dir, os.path.basename(DEFAULT_INDEX_JSON))\n        \n        # Build JSON index then load into memory\n        n_docs, n_chunks = build_json_index(\n            docs_dir, index_json_path, DEFAULT_EMBED_MODEL, \n            chunk_size, chunk_overlap\n        )\n        \n        # Load the built index into memory\n        index = load_json_index(index_json_path)\n        status = f\"✓ Indexed {n_chunks} text chunks from {n_docs} document(s)\"\n        \n        return index, status\n        \n    except FileNotFoundError as e:\n        return None, f\"Error: Directory not found - {e}\"\n    except ValueError as e:\n        return None, f\"Error: Invalid parameter value - {e}\"\n    except Exception as e:\n        return None, f\"Error: Failed to build index - {e}\"\n\n\ndef chat_stream(message: str, history: list, index: Optional[Dict[str, Any]], k: int):\n    \"\"\"\n    Stream chat responses using RAG (Retrieval-Augmented Generation).\n    \n    Args:\n        message: User's question\n        history: Chat history as list of [user_msg, assistant_msg] pairs\n        index: In-memory index with document chunks and embeddings\n        k: Number of top-k chunks to retrieve\n        \n    Yields:\n        Updated chat history with streaming response\n    \"\"\"\n    # Validate index exists\n    if history is None:\n        history = []\n        \n    if index is None:\n        history.append(ChatMessage(role=\"assistant\", content=\"⚠️ Index is empty. Please upload documents and click 'Build/Rebuild' first.\"))\n        yield history, \"\"\n        return\n    \n    # Validate message\n    if not message or not message.strip():\n        history.append(ChatMessage(role=\"assistant\", content=\"⚠️ Please enter a question.\"))\n        yield history, \"\"\n        return\n    \n    # Retrieve relevant document chunks using NumPy cosine similarity search\n    try:\n        top_idx, top_sims = search_numpy(\n            message, index, DEFAULT_EMBED_MODEL, top_k=int(k)\n        )\n    except Exception as e:\n        history.append(ChatMessage(role=\"assistant\", content=f\"⚠️ Search failed: {e}\"))\n        yield history, \"\"\n        return\n    \n    # No results found\n    if len(top_idx) == 0:\n        history.append(ChatMessage(role=\"assistant\", content=f\"⚠️ No relevant documents found.\"))\n        yield history, \"\"\n        return\n    \n    # Compose context from retrieved chunks\n    context_text = \"\\n\\n\".join(index[\"texts\"][i] for i in top_idx.tolist())\n    \n    history.append(ChatMessage(role=\"user\", content=message))\n    yield history, \"\"\n        \n    # Build messages for LLM with system prompt containing context\n    messages = [\n        {\n            \"role\": \"user\", \"content\": (\n                \"You are a careful assistant. Use ONLY the provided context to answer. \"\n                f\"Context:\\n{context_text}\\n\"\n                f\"Question:\\n {message}\\n\"\n        )},\n    ]\n   \n    history.append(ChatMessage(role=\"assistant\", content=\"\"))\n    # Initialize assistant turn in chat history\n    yield history, \"\"\n    \n    # Stream response from LLM\n    try:\n        for piece in call_nexa_chat(DEFAULT_MODEL, messages):\n            history[-1].content += piece\n            yield history, \"\"\n            \n    except Exception as e:\n        # Fallback to non-streaming mode if streaming fails\n        try:\n            response = call_nexa_chat_completion(DEFAULT_MODEL, messages) or \"\"\n            history[-1].content = response\n            yield history, \"\"\n        except Exception as e2:\n            history[-1].content = \"⚠️ Generation failed: {e2}}\"\n            yield history, \"\"\n\n# ============================================================================\n# Gradio UI\n# ============================================================================\n\nwith gr.Blocks(title=\"RAG System\") as demo:\n    gr.Markdown(\"## RAG System - Retrieval-Augmented Generation\")\n    \n    with gr.Row():\n        # Left column: Data upload and settings\n        with gr.Column(scale=1):\n            gr.Markdown(\"**Data & Settings**\")\n            \n            # Document folder management\n            docs_dir = gr.Textbox(label=\"Docs folder\", value=DOCS_DIR_DEFAULT)\n            btn_open = gr.Button(\"📁 Open docs folder\")\n            \n            # File uploader for documents\n            uploader = gr.Files(\n                label=\"Upload files (txt/docx)\",\n                file_types=[\".txt\", \".docx\"],\n                file_count=\"multiple\",\n            )\n            \n            # Retrieval and chunking parameters\n            k = gr.Slider(1, 20, value=5, step=1, label=\"Top-k (number of chunks to retrieve)\")\n            chunk_size = gr.Slider(300, 2000, value=1000, step=50, label=\"Chunk size (characters)\")\n            chunk_overlap = gr.Slider(0, 400, value=150, step=10, label=\"Chunk overlap (characters)\")\n            \n            # Action buttons\n            with gr.Row():\n                btn_rebuild = gr.Button(\"🔄 Build/Rebuild Index\", variant=\"primary\")\n                btn_clear = gr.Button(\"🗑️ Clear chat\")\n            \n            # Status display\n            status = gr.Textbox(label=\"Status\", value=\"Ready\", interactive=False)\n        \n        # Right column: Chat interface\n        with gr.Column(scale=2):\n            chat = gr.Chatbot(type=\"messages\", height=480, show_copy_button=True)\n            chat_input = gr.Textbox(\n                placeholder=\"Ask something about your documents...\", \n                label=\"Your question\"\n            )\n            btn_send = gr.Button(\"📤 Send\", variant=\"primary\")\n    \n    # State: stores in-memory NumPy index dictionary\n    index_state = gr.State(None)\n    \n    # ============================================================================\n    # Event Handlers\n    # ============================================================================\n    \n    def on_upload(files, folder):\n        \"\"\"Handle file upload event.\"\"\"\n        try:\n            ensure_docs_dir(folder)\n            n = save_uploaded_files(files, folder)\n            return f\"✓ Saved {n} file(s) to {folder}\"\n        except Exception as e:\n            return f\"⚠️ Upload failed: {e}\"\n    \n    uploader.upload(fn=on_upload, inputs=[uploader, docs_dir], outputs=status)\n    \n    def on_rebuild(d, k_, cs, co):\n        \"\"\"Handle index rebuild event.\"\"\"\n        idx, msg = do_rebuild(d, k_, cs, co)\n        return idx, msg\n    \n    btn_rebuild.click(\n        fn=on_rebuild,\n        inputs=[docs_dir, k, chunk_size, chunk_overlap],\n        outputs=[index_state, status],\n    )\n    \n    def on_open(folder):\n        \"\"\"Handle open folder event.\"\"\"\n        ok, err = open_folder(folder)\n        return \"\" if ok else f\"⚠️ Failed to open: {err}\"\n    \n    btn_open.click(fn=on_open, inputs=docs_dir, outputs=status)\n    \n    def on_clear():\n        \"\"\"Handle clear chat event.\"\"\"\n        return []\n    \n    btn_clear.click(fn=on_clear, outputs=chat)\n    \n    # Stream chat responses (both button click and enter key)\n    btn_send.click(\n        fn=chat_stream,\n        inputs=[chat_input, chat, index_state, k],\n        outputs=[chat, chat_input],\n    )\n    chat_input.submit(\n        fn=chat_stream,\n        inputs=[chat_input, chat, index_state, k],\n        outputs=[chat, chat_input],\n    )\n\n\nif __name__ == \"__main__\":\n    # Ensure default docs directory exists on startup\n    ensure_docs_dir(DOCS_DIR_DEFAULT)\n    demo.launch()\n"
  },
  {
    "path": "cookbook/PC/RAG-LLM/Python-Binding-Example/rag_nexa.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\nfrom __future__ import annotations\n\nimport os\nimport re\nimport json\nimport argparse\nfrom typing import List, Dict, Any, Iterable, Tuple\nfrom pathlib import Path\nimport requests\n\nimport docx\n\nimport warnings\nimport sys\nimport platform\nfrom io import StringIO\nfrom contextlib import contextmanager\nfrom dataclasses import dataclass\n\nfrom nexaai.llm import LLM, GenerationConfig\nfrom nexaai.common import ModelConfig\nfrom nexaai.embedder import Embedder, EmbeddingConfig\nfrom nexaai.rerank import Reranker, RerankConfig\n\n# ============================================================================\n# Configuration Constants\n# ============================================================================\n@dataclass\nclass ModelInfo:\n    \"\"\"Model info for different platforms.\"\"\"\n    model: str\n    plugin_id: str\n    device_id: str\n\ndef get_model_info() -> ModelInfo:\n    \"\"\"Return the default model info based on current OS and architecture.\"\"\"\n    gguf_model = ModelInfo(\n        model=\"NexaAI/Qwen3-4B-GGUF/Qwen3-4B-Q4_0.gguf\",\n        plugin_id=\"cpu_gpu\",\n        device_id=\"cpu\",\n    )\n    if sys.platform == \"darwin\":\n        # macOS\n        return gguf_model\n\n    if sys.platform.startswith(\"win\"):\n        machine = platform.machine().lower()\n        if \"arm\" in machine:\n            # Windows ARM64\n            return ModelInfo(\n                model=\"NexaAI/Llama3.2-3B-NPU-Turbo\",\n                plugin_id=\"npu\",\n                device_id=\"npu\",\n            )\n        else:\n            # Windows x64\n            return gguf_model\n    # other\n    return gguf_model\n\ndef get_embedding_model_info() -> ModelInfo:\n    \"\"\"Return the default model info based on current OS and architecture.\"\"\"\n    gguf_model = ModelInfo(\n        model=\"jinaai/jina-embeddings-v4-text-retrieval-GGUF/jina-embeddings-v4-text-retrieval-Q4_K_M.gguf\",\n        plugin_id=\"cpu_gpu\",\n        device_id=\"cpu\",\n    )\n    if sys.platform == \"darwin\":\n        # macOS\n        return gguf_model\n\n    if sys.platform.startswith(\"win\"):\n        machine = platform.machine().lower()\n        if \"arm\" in machine:\n            # Windows ARM64\n            return ModelInfo(\n                model=\"NexaAI/embeddinggemma-300m-npu\",\n                plugin_id=\"npu\",\n                device_id=\"npu\",\n            )\n        else:\n            # Windows x64\n            return gguf_model\n    # other\n    return gguf_model\n\ndef get_rerank_model_info() -> ModelInfo:\n    \"\"\"Return the default model info based on current OS and architecture.\"\"\"\n    gguf_model = ModelInfo(\n        model=\"jinaai/jina-reranker-v3-GGUF/jina-reranker-v3-Q4_K_M.gguf\",\n        plugin_id=\"cpu_gpu\",\n        device_id=\"cpu\",\n    )\n    if sys.platform == \"darwin\":\n        # macOS\n        return gguf_model\n\n    if sys.platform.startswith(\"win\"):\n        machine = platform.machine().lower()\n        if \"arm\" in machine:\n            # Windows ARM64\n            return ModelInfo(\n                model=\"NexaAI/jina-v2-rerank-npu\",\n                plugin_id=\"npu\",\n                device_id=\"npu\",\n            )\n        else:\n            # Windows x64\n            return gguf_model\n    # other\n    return gguf_model\n\nDEFAULT_MODEL = get_model_info()\nDEFAULT_EMBED_MODEL = get_embedding_model_info()\nDEFAULT_RERANK_MODEL = get_rerank_model_info()\nDEFAULT_INDEX_JSON = \"./vecdb.json\"\nDEFAULT_MODEL_FOLDER = \"~/.cache/nexa.ai/nexa_sdk/models\"\n\n# ============================================================================\n# File System Utilities\n# ============================================================================\ndef get_default_data_folder() -> str:\n    \"\"\"\n    Get the default data folder path in user's Downloads directory.\n    Creates the folder if it doesn't exist.\n    \n    Returns:\n        str: Path to the data folder\n    \"\"\"\n    downloads_folder = Path.home() / \"Downloads\" / \"nexa-rag-docs\"\n    downloads_folder.mkdir(parents=True, exist_ok=True)\n    return str(downloads_folder)\n\n\n# ============================================================================\n# Nexa SDK Python binding API Calls\n# ============================================================================\ndef call_nexa_chat(model: ModelInfo, messages: List[Dict[str, Any]]):\n    \"\"\"\n    Call python binding(llm).\n    \n    Args:\n        model: ModelInfo\n        messages: List of chat messages with 'role' and 'content'\n        stream: If True, yields text pieces; if False, returns full text \n    Returns:\n        str (if stream=False): Complete response text\n        Generator[str] (if stream=True): Yields text pieces incrementally\n    \"\"\"\n    \n    m_cfg = ModelConfig()\n    llm = LLM.from_(model.model, plugin_id=model.plugin_id, device_id=model.device_id, m_cfg=m_cfg)\n    \n    prompt = llm.apply_chat_template(messages, enable_thinking=False)\n    g_cfg=GenerationConfig(max_tokens=512)\n    for token in llm.generate_stream(prompt, g_cfg=g_cfg):\n        yield token\n\ndef call_nexa_chat_completion(model: ModelInfo, messages: List[Dict[str, Any]]):\n    \"\"\"\n    Call python binding(llm).\n    \n    Args:\n        model: ModelInfo\n        messages: List of chat messages with 'role' and 'content'\n        stream: If True, yields text pieces; if False, returns full text \n    Returns:\n        str (if stream=False): Complete response text\n        Generator[str] (if stream=True): Yields text pieces incrementally\n    \"\"\"\n    \n    m_cfg = ModelConfig()\n    llm = LLM.from_(model.model, plugin_id=model.plugin_id, device_id=model.device_id, m_cfg=m_cfg)\n    \n    prompt = llm.apply_chat_template(messages, enable_thinking=False)\n    g_cfg=GenerationConfig(max_tokens=512)\n    return llm.generate(prompt, g_cfg=g_cfg)\n        \ndef call_nexa_embeddings(embed_model: ModelInfo, inputs: List[str], model_folder: str) -> List[List[float]]:\n    \"\"\"\n    Call Nexa-compatible /v1/embeddings endpoint to embed a batch of strings.\n    \n    Args:\n        embed_model: Embedding model\n        inputs: List of text strings to embed\n        model_folder: model folder path\n        \n    Returns:\n        List[List[float]]: List of embedding vectors aligned to input order\n    \"\"\"\n    if not inputs:\n        return []\n    \n    out: List[List[float]] = []\n     \n    embedder = Embedder.from_(name_or_path=embed_model.model, plugin_id=embed_model.plugin_id)\n\n    # Process in batches to avoid large payloads\n    BATCH_SIZE = 64\n    for i in range(0, len(inputs), BATCH_SIZE):\n        batch = inputs[i:i+BATCH_SIZE]\n        batch_size = len(batch)\n        embeddings = embedder.generate(\n        texts=batch, config=EmbeddingConfig(batch_size=batch_size))\n        \n        for embedding in embeddings:\n            out.append(embedding.tolist())\n           \n    return out\n\n\ndef call_nexa_rerank(rerank_model: ModelInfo, query: str, documents: List[str], model_folder: str, top_n: int = 3) -> List[int]:\n    \"\"\"\n    Call Nexa-compatible /v1/reranking endpoint to rerank documents.\n    \n    Args:\n        rerank_model: Reranking model name\n        query: Search query string\n        documents: List of document texts to rerank\n        model_folder: model folder path\n        top_n: Number of top documents to return\n        \n    Returns:\n        List[int]: List of document indices in reranked order (best first)\n\n    \"\"\"\n    if not documents:\n        return []\n    \n    reranker = Reranker.from_(name_or_path=rerank_model.model, plugin_id=rerank_model.plugin_id)\n    \n    batch_size = len(documents)\n    scores = reranker.rerank(query=query, documents=documents, \n                           config=RerankConfig(batch_size=batch_size))\n\n    # Sort by relevance score (descending) and return top_n indices\n    sorted_results = sorted(scores,reverse=True)\n    return [r[\"index\"] for r in sorted_results[:top_n]]\n\n\n# ============================================================================\n# Document Loaders\n# ============================================================================\ndef load_txt(path: str) -> str:\n    \"\"\"\n    Load text file with multiple encoding fallbacks.\n    \n    Args:\n        path: Path to text file\n        \n    Returns:\n        str: File contents (empty string if all encodings fail)\n    \"\"\"\n    for enc in (\"utf-8\", \"utf-8-sig\", \"latin-1\"):\n        try:\n            with open(path, \"r\", encoding=enc, errors=\"ignore\") as f:\n                return f.read()\n        except Exception:\n            continue\n    return \"\"\n\n\n@contextmanager\ndef suppress_stderr():\n    \"\"\"Context manager to temporarily suppress stderr output.\"\"\"\n    old_stderr = sys.stderr\n    try:\n        with open(os.devnull, 'w') as devnull:\n            sys.stderr = devnull\n            yield\n    finally:\n        sys.stderr = old_stderr\n\n\ndef fix_missing_spaces(text: str) -> str:\n    \"\"\"\n    Fix common cases where spaces are missing in extracted PDF text.\n    Applies heuristics to add spaces between:\n    - lowercase followed by uppercase (camelCase issues)\n    - letters and numbers\n    - punctuation and following letters\n    \n    Args:\n        text: Input text with potential spacing issues\n        \n    Returns:\n        str: Text with improved spacing\n    \"\"\"\n    # Add space between lowercase and uppercase\n    text = re.sub(r'([a-z])([A-Z])', r'\\1 \\2', text)\n    # Add space between letter and number\n    text = re.sub(r'([a-zA-Z])(\\d)', r'\\1 \\2', text)\n    # Add space between number and letter\n    text = re.sub(r'(\\d)([a-zA-Z])', r'\\1 \\2', text)\n    # Add space after punctuation if followed by letter\n    text = re.sub(r'([.,;:!?])([A-Za-z])', r'\\1 \\2', text)\n    # Add space after closing bracket/paren if followed by uppercase\n    text = re.sub(r'([\\)\\]])([A-Z])', r'\\1 \\2', text)\n    return text\n\n\ndef load_pdf(path: str) -> str:\n    \"\"\"\n    Load PDF text.\n    \n    Args:\n        path: Path to PDF file\n        \n    Returns:\n        str: Extracted text (empty string if extraction fails)\n    \"\"\"\n    return \"\"\n\n\ndef load_docx(path: str) -> str:\n    \"\"\"\n    Load text from Word document.\n    \n    Args:\n        path: Path to .docx file\n        \n    Returns:\n        str: Extracted text from all paragraphs\n    \"\"\"\n    try:\n        d = docx.Document(path)\n        paras = [p.text for p in d.paragraphs]\n        return \"\\n\".join(paras)\n    except Exception as e:\n        print(f\"[warn] Error reading docx {path}: {e}\")\n        return \"\"\n\n\ndef normalize_ws(s: str) -> str:\n    \"\"\"\n    Normalize whitespace: collapse multiple spaces/tabs into single space.\n    \n    Args:\n        s: Input string\n        \n    Returns:\n        str: String with normalized whitespace\n    \"\"\"\n    return re.sub(r\"[ \\t\\u3000]+\", \" \", s).strip()\n\n\ndef yield_files(root: str, exts=(\".txt\", \".docx\")) -> Iterable[str]:\n    \"\"\"\n    Recursively yield file paths matching specified extensions.\n    \n    Args:\n        root: Root directory to search\n        exts: Tuple of file extensions to include\n        \n    Yields:\n        str: File paths matching extensions\n    \"\"\"\n    for base, _, files in os.walk(root):\n        for name in files:\n            if name.lower().endswith(exts):\n                yield os.path.join(base, name)\n\n\n# ============================================================================\n# Text Chunking\n# ============================================================================\ndef simple_chunk(text: str, chunk_size: int = 1000, overlap: int = 150) -> List[str]:\n    \"\"\"\n    Simple character-level chunking with overlap.\n    Creates chunks of approximately chunk_size characters with overlap\n    to preserve context at chunk boundaries.\n    \n    Args:\n        text: Input text to chunk\n        chunk_size: Target size of each chunk in characters\n        overlap: Number of overlapping characters between chunks\n        \n    Returns:\n        List[str]: List of text chunks\n    \"\"\"\n    text = text.replace(\"\\r\\n\", \"\\n\")\n    n = len(text)\n    \n    if n == 0:\n        return []\n    \n    chunks = []\n    start = 0\n    \n    while start < n:\n        end = min(start + chunk_size, n)\n        chunks.append(text[start:end])\n        \n        if end == n:\n            break\n        \n        # Move start forward with overlap\n        start = end - overlap\n        if start < 0:\n            start = 0\n    \n    return chunks\n\n\n# ============================================================================\n# Index Building and Loading\n# ============================================================================\ndef build_json_index(\n    data_folder: str, \n    index_path: str, \n    embed_model: ModelInfo, \n    chunk_size: int, \n    overlap: int,\n    model_folder: str = DEFAULT_MODEL_FOLDER\n) -> Tuple[int, int]:\n    \"\"\"\n    Build JSON-based vector index from documents in a folder.\n    \n    Process:\n    1. Read all supported documents from folder\n    2. Chunk each document with overlap\n    3. Embed chunks using Python binding API\n    4. Save to JSON file with metadata\n    \n    Args:\n        data_folder: Folder containing documents to index\n        index_path: Output path for JSON index file\n        embed_model: Embedding model name\n        chunk_size: Size of text chunks in characters\n        overlap: Overlap between chunks in characters\n        model_folder: model folder path\n        \n    Returns:\n        Tuple[int, int]: (number of documents processed, number of chunks created)\n        \n    Raises:\n        RuntimeError: If no chunks were created\n    \"\"\"\n    items = []\n    num_docs = 0\n    \n    for path in yield_files(data_folder):\n        num_docs += 1\n        \n        # Load document based on file type\n        lower = path.lower()\n        try:\n            if lower.endswith(\".txt\"):\n                raw = load_txt(path)\n            elif lower.endswith(\".docx\"):\n                raw = load_docx(path)\n            else:\n                continue\n        except Exception as e:\n            print(f\"[warn] Failed to read {path}: {e}\")\n            continue\n\n        # Normalize and validate\n        raw = normalize_ws(raw)\n        if not raw:\n            print(f\"[warn] Empty content from {path}, skipping\")\n            continue\n\n        # Chunk the document\n        chunks = simple_chunk(raw, chunk_size, overlap)\n        if not chunks:\n            continue\n            \n        # Embed chunks via API\n        try:\n            vectors = call_nexa_embeddings(embed_model, chunks, model_folder)\n        except Exception as e:\n            print(f\"[warn] Failed to embed chunks from {path}: {e}\")\n            continue\n\n        # Store chunk metadata\n        for i, (txt, vec) in enumerate(zip(chunks, vectors)):\n            items.append({\n                \"id\": len(items),\n                \"text\": txt,\n                \"source\": os.path.abspath(path),\n                \"chunk_index\": i,\n                \"vector\": vec,\n            })\n\n    if not items:\n        raise RuntimeError(\"No chunks found. Check your --data path and files.\")\n\n    # Build and save index\n    dim = len(items[0][\"vector\"])\n    payload = {\n        \"embed_model\": embed_model.model,\n        \"dim\": dim,\n        \"items\": items,\n    }\n    \n    with open(index_path, \"w\", encoding=\"utf-8\") as f:\n        json.dump(payload, f, ensure_ascii=False)\n\n    return num_docs, len(items)\n\n\ndef load_json_index(index_path: str) -> Dict[str, Any]:\n    \"\"\"\n    Load JSON vector index into memory as NumPy arrays.\n    \n    Args:\n        index_path: Path to JSON index file\n        \n    Returns:\n        dict: Index data containing:\n            - embed_model: Model used for embeddings\n            - dim: Embedding dimension\n            - matrix: NumPy array of shape (N, D) with all vectors\n            - texts: List of chunk texts\n            - sources: List of source file paths\n            - chunk_ids: List of chunk indices within documents\n            \n    Raises:\n        FileNotFoundError: If index file doesn't exist\n        json.JSONDecodeError: If index file is malformed\n        ValueError: If index structure is invalid\n    \"\"\"\n    if not os.path.exists(index_path):\n        raise FileNotFoundError(f\"Index file not found: {index_path}\")\n    \n    try:\n        with open(index_path, \"r\", encoding=\"utf-8\") as f:\n            data = json.load(f)\n    except json.JSONDecodeError as e:\n        raise json.JSONDecodeError(f\"Malformed index file: {index_path}\", e.doc, e.pos)\n    \n    # Validate structure\n    if \"items\" not in data:\n        raise ValueError(\"Index file missing 'items' field\")\n    \n    items = data[\"items\"]\n    if not items:\n        raise ValueError(\"Index contains no items\")\n    \n    # Extract fields\n    texts = [it[\"text\"] for it in items]\n    sources = [it[\"source\"] for it in items]\n    chunk_ids = [it[\"chunk_index\"] for it in items]\n    \n    # Build embedding matrix\n    mat = np.array([it[\"vector\"] for it in items], dtype=np.float32)\n    \n    return {\n        \"embed_model\": data.get(\"embed_model\", \"\"),\n        \"dim\": data.get(\"dim\", mat.shape[1]),\n        \"matrix\": mat,         # (N, D)\n        \"texts\": texts,        # list[str]\n        \"sources\": sources,    # list[str]\n        \"chunk_ids\": chunk_ids # list[int]\n    }\n\n\n# ============================================================================\n# Vector Search\n# ============================================================================\ndef embed_query_server(query: str, embed_model: ModelInfo, model_folder: str) -> np.ndarray:\n    \"\"\"\n    Embed a single query string via API.\n    \n    Args:\n        query: Query text to embed\n        embed_model: Embedding model name\n        model_folder: model folder path\n        \n    Returns:\n        np.ndarray: Query embedding vector\n    \"\"\"\n    vecs = call_nexa_embeddings(embed_model, [query], model_folder)\n    return np.array(vecs[0], dtype=np.float32)\n\n\ndef search_numpy(\n    query: str, \n    index: dict, \n    embed_model: ModelInfo, \n    model_folder: str = DEFAULT_MODEL_FOLDER,\n    top_k: int = 5\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"\n    Search vector index using cosine similarity.\n    \n    Args:\n        query: Search query text\n        index: Loaded index dictionary from load_json_index()\n        embed_model: Embedding model name\n        model_folder: model folder path\n        top_k: Number of top results to return\n        \n    Returns:\n        Tuple[np.ndarray, np.ndarray]: \n            - Array of top-k indices\n            - Array of corresponding similarity scores\n    \"\"\"\n    # Embed query\n    q_vec = embed_query_server(query, embed_model, model_folder)  # (D,)\n    db = index[\"matrix\"]  # (N, D)\n\n    # Normalize vectors to compute cosine similarity\n    q_norm = q_vec / (np.linalg.norm(q_vec) + 1e-8)  # (D,)\n    db_norm = db / (np.linalg.norm(db, axis=1, keepdims=True) + 1e-8)  # (N, D)\n\n    # Compute cosine similarity = dot product of normalized vectors\n    sims = db_norm @ q_norm  # (N,)\n    \n    # Get top-k indices (sorted by similarity descending)\n    top_idx = np.argsort(-sims)[:top_k]\n    return top_idx, sims[top_idx]\n\n\n# ============================================================================\n# Main CLI Application\n# ============================================================================\ndef main():\n    \"\"\"Main CLI application for RAG system.\"\"\"\n    # Get default data folder in Downloads\n    default_data_folder = get_default_data_folder()\n    \n    # Parse command-line arguments\n    ap = argparse.ArgumentParser(\n        description=\"Local-files RAG (text-only) using JSON index + NumPy search\"\n    )\n    ap.add_argument(\n        \"--data\", \n        default=default_data_folder, \n        help=f\"Folder with txt/pdf/docx (default: {default_data_folder})\"\n    )\n    ap.add_argument(\n        \"--index_json\", \n        default=DEFAULT_INDEX_JSON, \n        help=\"Path to embeddings JSON index\"\n    )\n    ap.add_argument(\n        \"--embed_model\", \n        default=DEFAULT_EMBED_MODEL.model, \n        help=\"Embedding model name\"\n    )\n    ap.add_argument(\n        \"--chunk_size\", \n        type=int, \n        default=1000, \n        help=\"Chunk size in characters\"\n    )\n    ap.add_argument(\n        \"--chunk_overlap\", \n        type=int, \n        default=150, \n        help=\"Chunk overlap in characters\"\n    )\n    ap.add_argument(\n        \"--k\", \n        type=int, \n        default=5, \n        help=\"Top-k retrieval\"\n    )\n    ap.add_argument(\n        \"--rerank_top_n\", \n        type=int, \n        default=3, \n        help=\"Top-n after reranking\"\n    )\n    ap.add_argument(\n        \"--rerank_model\", \n        default=DEFAULT_RERANK_MODEL.model, \n        help=\"Rerank model name\"\n    )\n    ap.add_argument(\n        \"--use_rerank\", \n        action=\"store_true\", \n        help=\"Enable reranking step\"\n    )\n    ap.add_argument(\n        \"--model\", \n        default=DEFAULT_MODEL.model, \n        help=\"LLM model for generation\"\n    )\n    \n    ap.add_argument(\n        \"--model_folder\", \n        default=DEFAULT_MODEL_FOLDER, \n        help=\"Model folder path\"\n    )\n    \n    ap.add_argument(\n        \"--rebuild\", \n        action=\"store_true\", \n        help=\"Rebuild JSON index before starting chat\"\n    )\n    args = ap.parse_args()\n\n    model = DEFAULT_MODEL\n    model.model = args.model\n    \n    embed_model = DEFAULT_EMBED_MODEL\n    embed_model.model = args.embed_model\n    \n    rerank_model = DEFAULT_RERANK_MODEL\n    rerank_model.model = args.rerank_model\n    \n    # Setup directories\n    os.makedirs(args.data, exist_ok=True)\n    print(f\"[info] Using data folder: {args.data}\")\n    \n    os.makedirs(os.path.dirname(args.index_json) or \".\", exist_ok=True)\n\n    # Build or load index\n    if args.rebuild or (not os.path.exists(args.index_json)):\n        print(f\"[build] Building JSON index via embeddings → {args.index_json}\")\n        try:\n            n_docs, n_chunks = build_json_index(\n                args.data, \n                args.index_json, \n                embed_model, \n                args.chunk_size, \n                args.chunk_overlap,\n                args.model_folder,\n            )\n            print(f\"[build] Done. docs={n_docs}, chunks={n_chunks}\")\n        except Exception as e:\n            print(f\"[error] Failed to build index: {e}\")\n            return\n    else:\n        print(f\"[info] Using existing index: {args.index_json}\")\n\n    # Load index into memory\n    try:\n        index = load_json_index(args.index_json)\n        print(f\"[info] Loaded index: dim={index['dim']}, rows={index['matrix'].shape[0]}, embed_model={index['embed_model']}\")\n    except Exception as e:\n        print(f\"[error] Failed to load index: {e}\")\n        return\n\n    print(f\"[info] Ready. model={args.model}\")\n    print(\"Type your question (Enter to quit). Commands: :reload (rebuild index)\")\n\n    # Interactive chat loop\n    while True:\n        try:\n            q = input(\"[user] \").strip()\n        except (EOFError, KeyboardInterrupt):\n            break\n            \n        if not q:\n            break\n            \n        # Handle special commands\n        if q.lower() == \":reload\":\n            print(\"[build] Rebuilding JSON index ...\")\n            try:\n                n_docs, n_chunks = build_json_index(\n                    args.data, \n                    args.index_json, \n                    embed_model, \n                    args.chunk_size, \n                    args.chunk_overlap,\n                    args.model_folder,\n                )\n                index = load_json_index(args.index_json)\n                print(f\"[build] Done. docs={n_docs}, chunks={n_chunks}\")\n            except Exception as e:\n                print(f\"[error] Failed to rebuild index: {e}\")\n            continue\n\n        # Perform vector search\n        try:\n            top_idx, top_sims = search_numpy(\n                q, \n                index, \n                embed_model, \n                args.model_folder,\n                top_k=args.k\n            )\n        except Exception as e:\n            print(f\"[error] Search failed: {e}\")\n            continue\n\n        # Optional reranking step\n        if args.use_rerank and len(top_idx) > 0:\n            try:\n                # Get candidate documents from initial search\n                candidate_docs = [index[\"texts\"][i] for i in top_idx.tolist()]\n                \n                # Rerank and get top_n indices (relative to candidate_docs)\n                reranked_local_idx = call_nexa_rerank(\n                    rerank_model, \n                    q, \n                    candidate_docs,\n                    args.model_folder,\n                    top_n=args.rerank_top_n\n                )\n                \n                # Map back to original index positions\n                top_idx = top_idx[reranked_local_idx]\n                print(f\"[rerank] Reranked to top {len(reranked_local_idx)} documents\")\n            except Exception as e:\n                print(f\"[warn] Reranking failed, using original search results: {e}\")\n\n        # Build context from retrieved chunks\n        context_text = \"\\n\\n\".join([index[\"texts\"][i] for i in top_idx.tolist()])\n        messages = [\n            {\n                \"role\": \"system\",\n                \"content\": (\n                    \"You are a careful assistant. Use ONLY the provided context to answer.\\n\\n\"\n                    f\"<context>\\n{context_text}\\n</context>\"\n                ),\n            },\n            {\"role\": \"user\", \"content\": q},\n        ]\n\n        # Generate response\n        print(\"\\n[assistant]\", end=\"\", flush=True)\n        try:\n            # Try streaming first\n            for piece in call_nexa_chat(model, messages):\n                print(piece, end=\"\", flush=True)\n            print()\n        except requests.HTTPError as e:\n            # Fallback to non-streaming\n            print(f\"\\n[warn] Streaming failed, fallback to non-stream. Reason: {e}\")\n            try:\n                full = call_nexa_chat_completion(model, messages)\n                print(full)\n            except Exception as e2:\n                print(f\"[error] Non-stream request also failed: {e2}\")\n\n    print(\"[info] Bye.\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/PC/RAG-LLM/README.md",
    "content": "# RAG Pipeline Demo\n\n## About\nThis project is a demo for building a Retrieval-Augmented Generation (RAG) pipeline using NexaSDK and NexaAI Python binding.\nIt showcases how to combine state-of-the-art embeddings, reranking, and generation models to answer questions over your own documents.\n\n**Key features:**\n- 🌐 Multi-platform support — Works on Snapdragon NPU (Windows ARM), macOS, and Windows x64\n- 🔄 End-to-end RAG demo — From document ingestion to retrieval and answer generation\n- 💻 Local execution — All processing happens on your device; no data leaves your machine\n- ⚡ Easy to run — Minimal setup to explore NexaSDK / NexaAI capabilities\n\nBring your own files (PDFs, Word docs, text) and ask questions—the system retrieves relevant context and generates answers entirely on your device.\n\n## Examples\n- [Python-Binding-Example](./Python-Binding-Example)\n- [Serve-Example](./Serve-Example)"
  },
  {
    "path": "cookbook/PC/RAG-LLM/Serve-Example/README.md",
    "content": "## About\n\nThis demo showcases a RAG implementation using Nexa Sdk.\n\n## Setup\n\n### Prerequisites\n\n- Nexa SDK Installed ([Installation Guide](https://github.com/NexaAI/nexa-sdk?tab=readme-ov-file#step-1-download-nexa-cli-with-one-click))\n- Python 3.11 – 3.13\n\n## Download Models\n\n### Snapdragon NPU (Windows ARM64)\nThese models are optimized for Qualcomm NPU:\n\n```bash\nnexa pull NexaAI/embeddinggemma-300m-npu\n\nnexa pull NexaAI/jina-v2-rerank-npu\n\nnexa pull NexaAI/Llama3.2-3B-NPU-Turbo\n```\n\n### macOS & Windows x64\n\n```bash\nnexa pull NexaAI/Qwen3-4B-GGUF\n\nnexa pull jinaai/jina-embeddings-v4-text-retrieval-GGUF\n\nnexa pull jinaai/jina-reranker-v3-GGUF\n```\n💡 These models are fully compatible with macOS and Windows x64.\nNo NPU is required; they run on CPU/GPU.\n\n\n### Install Dependencies\n\n```bash\n# Navigate to the example directory\ncd Serve-Example\n\n# Create a Python virtual environment\npython -m venv .venv\n\n# Activate the virtual environment\n.\\.venv\\Scripts\\activate # windows\n\nsource .venv/bin/activate # macOS\n\n# Install all required dependencies\npip install -r requirements.txt\n```\n\n### Running the Example\n\nFirst, open a new terminal window and start the Nexa server:\n```bash\n# Start Nexa server\nnexa serve\n```\n\nIn a new terminal window, you can run either the CLI or Gradio UI version:\n\n```bash\n# Option 1: Run the CLI version which provides an interactive terminal interface\n# This version allows direct interaction with the agent through command line\npython rag_nexa.py --data ../docs\n\n# Option 2: Run the Gradio UI version\n# This starts a local web server with a chat interface at http://localhost:7860\npython gradio_ui.py\n\n```"
  },
  {
    "path": "cookbook/PC/RAG-LLM/Serve-Example/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\n# Fix for ARM64 Windows matplotlib compatibility issue\nimport os\nimport sys\nfrom gradio import ChatMessage\n\n# Disable Gradio's matplotlib backend manager on ARM64 Windows\nif sys.platform == \"win32\" and os.environ.get(\"PROCESSOR_ARCHITECTURE\") == \"ARM64\":\n    os.environ[\"MPLBACKEND\"] = \"Agg\"\n    os.environ[\"_GRADIO_SKIP_MATPLOTLIB_MANAGER\"] = \"1\"\n\nimport platform\nimport subprocess\nfrom typing import List, Tuple, Optional, Dict, Any\n\nimport gradio as gr\n\nfrom rag_nexa import (\n    DEFAULT_MODEL, DEFAULT_ENDPOINT, DEFAULT_INDEX_JSON, DEFAULT_EMBED_MODEL,\n    build_json_index, load_json_index, search_numpy, call_nexa_chat\n)\n\nDOCS_DIR_DEFAULT = \"../docs\"\n\n\n# ============================================================================\n# Helper Functions\n# ============================================================================\n\ndef ensure_docs_dir(path: str) -> None:\n    \"\"\"\n    Create directory if it doesn't exist.\n    \n    Args:\n        path: Directory path to create\n    \"\"\"\n    try:\n        if not os.path.exists(path):\n            os.makedirs(path, exist_ok=True)\n    except OSError as e:\n        raise OSError(f\"Failed to create directory {path}: {e}\")\n\n\ndef save_uploaded_files(files: List[gr.File], dest_dir: str) -> int:\n    \"\"\"\n    Save uploaded files to destination directory.\n    \n    Args:\n        files: List of uploaded Gradio File objects\n        dest_dir: Destination directory path\n        \n    Returns:\n        Number of files successfully saved\n    \"\"\"\n    if not files:\n        return 0\n    \n    saved_count = 0\n    for file in files:\n        try:\n            # Extract file path from Gradio File object\n            src = getattr(file, \"name\", None) or file\n            if not src:\n                continue\n            \n            # Copy file to destination\n            filename = os.path.basename(src)\n            out_path = os.path.join(dest_dir, filename)\n            \n            with open(src, \"rb\") as r, open(out_path, \"wb\") as w:\n                w.write(r.read())\n            \n            saved_count += 1\n        except Exception as e:\n            # Log error but continue with other files\n            print(f\"Warning: Failed to save {src}: {e}\")\n            continue\n    \n    return saved_count\n\n\ndef open_folder(path: str) -> Tuple[bool, Optional[str]]:\n    \"\"\"\n    Open folder in system file explorer.\n    \n    Args:\n        path: Folder path to open\n        \n    Returns:\n        Tuple of (success: bool, error_message: str or None)\n    \"\"\"\n    if not os.path.exists(path):\n        return False, f\"Path does not exist: {path}\"\n    \n    try:\n        system = platform.system()\n        \n        # Platform-specific folder opening\n        if system == \"Windows\":\n            subprocess.Popen([\"explorer\", os.path.normpath(path)])\n        elif system == \"Darwin\":  # macOS\n            subprocess.Popen([\"open\", path])\n        else:  # Linux and others\n            subprocess.Popen([\"xdg-open\", path])\n        \n        return True, None\n    except Exception as e:\n        return False, str(e)\n\n\n# ============================================================================\n# Core RAG Functions\n# ============================================================================\n\ndef do_rebuild(docs_dir: str, k: int, chunk_size: int, chunk_overlap: int,\n               _model: str, endpoint: str) -> Tuple[Optional[Dict[str, Any]], str]:\n    \"\"\"\n    Build or rebuild the document index from files in docs_dir.\n    \n    Args:\n        docs_dir: Directory containing documents to index\n        k: Number of top results (unused in this function)\n        chunk_size: Size of text chunks for splitting\n        chunk_overlap: Overlap between consecutive chunks\n        _model: Model name (unused, using DEFAULT_EMBED_MODEL)\n        endpoint: API endpoint for embedding service\n        \n    Returns:\n        Tuple of (index_dict or None, status_message)\n    \"\"\"\n    try:\n        # Validate inputs\n        if chunk_overlap >= chunk_size:\n            return None, \"Error: Chunk overlap must be less than chunk size\"\n        \n        # Ensure docs directory exists\n        ensure_docs_dir(docs_dir)\n        \n        # Index path resides inside docs folder to keep UX simple\n        index_json_path = os.path.join(docs_dir, os.path.basename(DEFAULT_INDEX_JSON))\n        \n        # Build JSON index then load into memory\n        n_docs, n_chunks = build_json_index(\n            docs_dir, index_json_path, DEFAULT_EMBED_MODEL, \n            chunk_size, chunk_overlap, endpoint\n        )\n        \n        # Load the built index into memory\n        index = load_json_index(index_json_path)\n        status = f\"✓ Indexed {n_chunks} text chunks from {n_docs} document(s)\"\n        \n        return index, status\n        \n    except FileNotFoundError as e:\n        return None, f\"Error: Directory not found - {e}\"\n    except ValueError as e:\n        return None, f\"Error: Invalid parameter value - {e}\"\n    except Exception as e:\n        return None, f\"Error: Failed to build index - {e}\"\n\n\ndef chat_stream(message: str, history: list, index: Optional[Dict[str, Any]],\n                model: str, endpoint: str, k: int):\n    \"\"\"\n    Stream chat responses using RAG (Retrieval-Augmented Generation).\n    \n    Args:\n        message: User's question\n        history: Chat history as list of [user_msg, assistant_msg] pairs\n        index: In-memory index with document chunks and embeddings\n        model: LLM model name\n        endpoint: API endpoint for chat service\n        k: Number of top-k chunks to retrieve\n        \n    Yields:\n        Updated chat history with streaming response\n    \"\"\"\n    if history is None:\n        history = []\n        \n    # Validate message\n    if not message or not message.strip():\n        history.append(ChatMessage(role=\"assistant\", content=\"⚠️ Please enter a question.\"))\n        yield history, \"\"\n        return\n    \n    history.append(ChatMessage(role=\"user\", content=message))\n    yield history, \"\"\n    \n    # Validate index exists\n    if index is None:\n        history.append(ChatMessage(role=\"assistant\", content=\"⚠️ Index is empty. Please upload documents and click 'Build/Rebuild' first.\"))\n        yield history, \"\"\n        return\n    \n    \n    # Retrieve relevant document chunks using NumPy cosine similarity search\n    try:\n        top_idx, top_sims = search_numpy(\n            message, index, DEFAULT_EMBED_MODEL, endpoint, top_k=int(k)\n        )\n    except Exception as e:\n        history.append(ChatMessage(role=\"assistant\", content=\"⚠️ Search failed: {e}\"))\n        yield history, \"\"\n        return\n    \n    # No results found\n    if len(top_idx) == 0:\n        history.append(ChatMessage(role=\"assistant\", content=\"⚠️ No relevant documents found.\"))\n        yield history, \"\"\n        return\n    \n    # Compose context from retrieved chunks\n    context_text = \"\\n\\n\".join(index[\"texts\"][i] for i in top_idx.tolist())\n    \n    # Build messages for LLM with system prompt containing context\n    messages = [\n        {\n            \"role\": \"user\", \"content\": (\n                \"You are a careful assistant. Use ONLY the provided context to answer. \"\n                f\"Context:\\n{context_text}\\n\"\n                f\"Question:\\n {message}\\n\"\n        )},\n    ]\n    \n    \n    # Initialize assistant turn in chat history\n    history.append(ChatMessage(role=\"assistant\", content=\"\"))\n    yield history, \"\"\n    \n    # Stream response from LLM\n    try:\n        for piece in call_nexa_chat(model, messages, endpoint, stream=True):\n            history[-1].content += piece or \"\"\n            yield history, \"\"\n            \n    except Exception as e:\n        # Fallback to non-streaming mode if streaming fails\n        try:\n            response = call_nexa_chat(model, messages, endpoint, stream=False) or \"\"\n            history[-1].content = response\n            yield history, \"\"\n        except Exception as e2:\n            history[-1].content = f\"⚠️ Generation failed: {e2}\"\n            yield history, \"\"\n\n\n# ============================================================================\n# Gradio UI\n# ============================================================================\n\nwith gr.Blocks(title=\"RAG System\") as demo:\n    gr.Markdown(\"## RAG System - Retrieval-Augmented Generation\")\n    \n    with gr.Row():\n        # Left column: Data upload and settings\n        with gr.Column(scale=1):\n            gr.Markdown(\"**Data & Settings**\")\n            \n            # Document folder management\n            docs_dir = gr.Textbox(label=\"Docs folder\", value=DOCS_DIR_DEFAULT)\n            btn_open = gr.Button(\"📁 Open docs folder\")\n            \n            # File uploader for documents\n            uploader = gr.Files(\n                label=\"Upload files (txt/docx)\",\n                file_types=[\".txt\", \".docx\"],\n                file_count=\"multiple\",\n            )\n            \n            # Model configuration\n            model = gr.Textbox(label=\"Model\", value=DEFAULT_MODEL)\n            endpoint = gr.Textbox(label=\"Endpoint\", value=DEFAULT_ENDPOINT)\n            \n            # Retrieval and chunking parameters\n            k = gr.Slider(1, 20, value=5, step=1, label=\"Top-k (number of chunks to retrieve)\")\n            chunk_size = gr.Slider(300, 2000, value=1000, step=50, label=\"Chunk size (characters)\")\n            chunk_overlap = gr.Slider(0, 400, value=150, step=10, label=\"Chunk overlap (characters)\")\n            \n            # Action buttons\n            with gr.Row():\n                btn_rebuild = gr.Button(\"🔄 Build/Rebuild Index\", variant=\"primary\")\n                btn_clear = gr.Button(\"🗑️ Clear chat\")\n            \n            # Status display\n            status = gr.Textbox(label=\"Status\", value=\"Ready\", interactive=False)\n        \n        # Right column: Chat interface\n        with gr.Column(scale=2):\n            chat = gr.Chatbot(type=\"messages\", height=480, show_copy_button=True)\n            chat_input = gr.Textbox(\n                placeholder=\"Ask something about your documents...\", \n                label=\"Your question\"\n            )\n            btn_send = gr.Button(\"📤 Send\", variant=\"primary\")\n    \n    # State: stores in-memory NumPy index dictionary\n    index_state = gr.State(None)\n    \n    # ============================================================================\n    # Event Handlers\n    # ============================================================================\n    \n    def on_upload(files, folder):\n        \"\"\"Handle file upload event.\"\"\"\n        try:\n            ensure_docs_dir(folder)\n            n = save_uploaded_files(files, folder)\n            return f\"✓ Saved {n} file(s) to {folder}\"\n        except Exception as e:\n            return f\"⚠️ Upload failed: {e}\"\n    \n    uploader.upload(fn=on_upload, inputs=[uploader, docs_dir], outputs=status)\n    \n    def on_rebuild(d, k_, cs, co, m, e):\n        \"\"\"Handle index rebuild event.\"\"\"\n        idx, msg = do_rebuild(d, k_, cs, co, m, e)\n        return idx, msg\n    \n    btn_rebuild.click(\n        fn=on_rebuild,\n        inputs=[docs_dir, k, chunk_size, chunk_overlap, model, endpoint],\n        outputs=[index_state, status],\n    )\n    \n    def on_open(folder):\n        \"\"\"Handle open folder event.\"\"\"\n        ok, err = open_folder(folder)\n        return \"\" if ok else f\"⚠️ Failed to open: {err}\"\n    \n    btn_open.click(fn=on_open, inputs=docs_dir, outputs=status)\n    \n    def on_clear():\n        \"\"\"Handle clear chat event.\"\"\"\n        return []\n    \n    btn_clear.click(fn=on_clear, outputs=chat)\n    \n    # Stream chat responses (both button click and enter key)\n    btn_send.click(\n        fn=chat_stream,\n        inputs=[chat_input, chat, index_state, model, endpoint, k],\n        outputs=[chat, chat_input],\n    )\n    chat_input.submit(\n        fn=chat_stream,\n        inputs=[chat_input, chat, index_state, model, endpoint, k],\n        outputs=[chat, chat_input]\n    )\n\n\nif __name__ == \"__main__\":\n    # Ensure default docs directory exists on startup\n    ensure_docs_dir(DOCS_DIR_DEFAULT)\n    demo.launch()\n"
  },
  {
    "path": "cookbook/PC/RAG-LLM/Serve-Example/rag_nexa.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\nfrom __future__ import annotations\n\nimport os\nimport re\nimport json\nimport argparse\nfrom typing import List, Dict, Any, Iterable, Tuple\nfrom pathlib import Path\nimport requests\n\nimport docx\n\nimport warnings\nimport platform\nimport sys\nfrom io import StringIO\nfrom contextlib import contextmanager\n\n# ============================================================================\n# Configuration Constants\n# ============================================================================\n\n# Nexa config\nif sys.platform == \"darwin\":\n    DEFAULT_MODEL = \"NexaAI/Qwen3-4B-GGUF\"\n    DEFAULT_EMBED_MODEL = \"jinaai/jina-embeddings-v4-text-retrieval-GGUF\"\n    DEFAULT_RERANK_MODEL = \"jinaai/jina-reranker-v3-GGUF\"\nelif sys.platform.startswith(\"win\"):\n    machine = platform.machine().lower()\n    if \"arm\" in machine:\n        # Windows ARM\n        DEFAULT_MODEL = \"NexaAI/Llama3.2-3B-NPU-Turbo\"\n        DEFAULT_EMBED_MODEL = \"NexaAI/embeddinggemma-300m-npu\"\n        DEFAULT_RERANK_MODEL = \"NexaAI/jina-v2-rerank-npu\"\n    else:\n        # Windows x64\n        DEFAULT_MODEL = \"NexaAI/Qwen3-4B-GGUF\"\n        DEFAULT_EMBED_MODEL = \"jinaai/jina-embeddings-v4-text-retrieval-GGUF\"\n        DEFAULT_RERANK_MODEL = \"jinaai/jina-reranker-v3-GGUF\"\nelse:\n    DEFAULT_MODEL = \"NexaAI/Qwen3-4B-GGUF\"\n    DEFAULT_EMBED_MODEL = \"jinaai/jina-embeddings-v4-text-retrieval-GGUF\"\n    DEFAULT_RERANK_MODEL = \"jinaai/jina-reranker-v3-GGUF\"\n\nDEFAULT_ENDPOINT = \"http://127.0.0.1:18181\"\nDEFAULT_INDEX_JSON = \"./vecdb.json\"\n\n# ============================================================================\n# File System Utilities\n# ============================================================================\ndef get_default_data_folder() -> str:\n    \"\"\"\n    Get the default data folder path in user's Downloads directory.\n    Creates the folder if it doesn't exist.\n    \n    Returns:\n        str: Path to the data folder\n    \"\"\"\n    downloads_folder = Path.home() / \"Downloads\" / \"nexa-rag-docs\"\n    downloads_folder.mkdir(parents=True, exist_ok=True)\n    return str(downloads_folder)\n\n\n# ============================================================================\n# HTTP and API Communication\n# ============================================================================\ndef _post_json(url: str, payload: dict, timeout: int = 300) -> dict:\n    \"\"\"\n    Send POST request with JSON payload.\n    \n    Args:\n        url: Target endpoint URL\n        payload: JSON payload dictionary\n        timeout: Request timeout in seconds\n        \n    Returns:\n        dict: Parsed JSON response\n        \n    Raises:\n        requests.HTTPError: If request fails with 4xx or 5xx status\n    \"\"\"\n    headers = {\"Content-Type\": \"application/json\"}\n    try:\n        resp = requests.post(url, headers=headers, data=json.dumps(payload), timeout=timeout)\n        if resp.status_code >= 400:\n            raise requests.HTTPError(f\"{resp.status_code} {url}\\n{resp.text}\", response=resp)\n        return resp.json()\n    except requests.Timeout:\n        raise requests.HTTPError(f\"Request timeout after {timeout}s: {url}\")\n    except requests.RequestException as e:\n        raise requests.HTTPError(f\"Request failed: {url}\\n{str(e)}\")\n\n\ndef call_nexa_chat(model: str, messages: List[Dict[str, Any]], base: str, stream: bool = False):\n    \"\"\"\n    Call Nexa-compatible /v1/chat/completions endpoint.\n    \n    Args:\n        model: Model name/identifier\n        messages: List of chat messages with 'role' and 'content'\n        base: Base URL for the API endpoint\n        stream: If True, yields text pieces; if False, returns full text\n        \n    Returns:\n        str (if stream=False): Complete response text\n        Generator[str] (if stream=True): Yields text pieces incrementally\n        \n    Raises:\n        requests.HTTPError: If API request fails\n    \"\"\"\n    url = base.rstrip(\"/\") + \"/v1/chat/completions\"\n    headers = {\"Content-Type\": \"application/json\"}\n    payload = {\"model\": model, \"messages\": messages, \"stream\": stream, \"max_tokens\": 512, \"enable_think\": False}\n\n    if not stream:\n        # Non-streaming: return complete text\n        data = _post_json(url, payload)\n        try:\n            return data[\"choices\"][0][\"message\"][\"content\"]\n        except (KeyError, IndexError):\n            # Fallback for non-standard response formats\n            return data.get(\"text\", \"\") or data.get(\"response\", \"\")\n\n    # Streaming mode: yield text pieces via SSE\n    try:\n        with requests.post(url, headers=headers, data=json.dumps(payload), stream=True, timeout=300) as resp:\n            resp.raise_for_status()\n            for raw in resp.iter_lines(decode_unicode=True):\n                if not raw:\n                    continue\n                if raw.startswith(\"data:\"):\n                    chunk = raw[len(\"data:\"):].strip()\n                    if chunk == \"[DONE]\":\n                        break\n                    try:\n                        obj = json.loads(chunk)\n                        choices = obj.get(\"choices\", [])\n                        if choices:\n                            delta = choices[0].get(\"delta\") or {}\n                            piece = delta.get(\"content\", \"\")\n                            if piece:\n                                yield piece\n                    except json.JSONDecodeError:\n                        continue  # Skip malformed JSON chunks\n    except requests.RequestException as e:\n        raise requests.HTTPError(f\"Streaming request failed: {str(e)}\")\n\n\ndef call_nexa_embeddings(embed_model: str, inputs: List[str], base: str) -> List[List[float]]:\n    \"\"\"\n    Call Nexa-compatible /v1/embeddings endpoint to embed a batch of strings.\n    \n    Args:\n        embed_model: Embedding model name\n        inputs: List of text strings to embed\n        base: Base URL for the API endpoint\n        \n    Returns:\n        List[List[float]]: List of embedding vectors aligned to input order\n        \n    Raises:\n        requests.HTTPError: If API request fails\n        ValueError: If response format is invalid\n    \"\"\"\n    if not inputs:\n        return []\n    \n    url = base.rstrip(\"/\") + \"/v1/embeddings\"\n    out: List[List[float]] = []\n    \n    # Process in batches to avoid large payloads\n    BATCH_SIZE = 64\n    for i in range(0, len(inputs), BATCH_SIZE):\n        batch = inputs[i:i+BATCH_SIZE]\n        payload = {\n            \"model\": embed_model,\n            \"input\": batch,\n            \"encoding_format\": \"float\"\n        }\n        data = _post_json(url, payload)\n        \n        # Parse response and sort by index\n        vecs = [None] * len(batch)\n        for item in data.get(\"data\", []):\n            idx = item.get(\"index\", 0)\n            vec = item.get(\"embedding\", [])\n            if 0 <= idx < len(batch):\n                vecs[idx] = vec\n        \n        # Fallback: assume response order matches input order\n        if any(v is None for v in vecs):\n            vecs = [item.get(\"embedding\", []) for item in data.get(\"data\", [])]\n        \n        # Validate we got embeddings for all inputs\n        if len(vecs) != len(batch):\n            raise ValueError(f\"Expected {len(batch)} embeddings, got {len(vecs)}\")\n            \n        out.extend(vecs)\n    \n    return out\n\n\ndef call_nexa_rerank(rerank_model: str, query: str, documents: List[str], base: str, top_n: int = 3) -> List[int]:\n    \"\"\"\n    Call Nexa-compatible /v1/reranking endpoint to rerank documents.\n    \n    Args:\n        rerank_model: Reranking model name\n        query: Search query string\n        documents: List of document texts to rerank\n        base: Base URL for the API endpoint\n        top_n: Number of top documents to return\n        \n    Returns:\n        List[int]: List of document indices in reranked order (best first)\n        \n    Raises:\n        requests.HTTPError: If API request fails\n    \"\"\"\n    if not documents:\n        return []\n    \n    url = base.rstrip(\"/\") + \"/v1/reranking\"\n    payload = {\n        \"model\": rerank_model,\n        \"query\": query,\n        \"documents\": documents,\n        \"batch_size\": len(documents),\n        \"normalize\": True,\n        \"normalize_method\": \"softmax\"\n    }\n    data = _post_json(url, payload)\n    \n    # Sort by relevance score (descending) and return top_n indices\n    results = data.get(\"results\", [])\n    sorted_results = sorted(results, key=lambda x: x.get(\"relevance_score\", 0), reverse=True)\n    return [r[\"index\"] for r in sorted_results[:top_n]]\n\n\n# ============================================================================\n# Document Loaders\n# ============================================================================\ndef load_txt(path: str) -> str:\n    \"\"\"\n    Load text file with multiple encoding fallbacks.\n    \n    Args:\n        path: Path to text file\n        \n    Returns:\n        str: File contents (empty string if all encodings fail)\n    \"\"\"\n    for enc in (\"utf-8\", \"utf-8-sig\", \"latin-1\"):\n        try:\n            with open(path, \"r\", encoding=enc, errors=\"ignore\") as f:\n                return f.read()\n        except Exception:\n            continue\n    return \"\"\n\n\n@contextmanager\ndef suppress_stderr():\n    \"\"\"Context manager to temporarily suppress stderr output.\"\"\"\n    old_stderr = sys.stderr\n    try:\n        with open(os.devnull, 'w') as devnull:\n            sys.stderr = devnull\n            yield\n    finally:\n        sys.stderr = old_stderr\n\n\ndef fix_missing_spaces(text: str) -> str:\n    \"\"\"\n    Fix common cases where spaces are missing in extracted PDF text.\n    Applies heuristics to add spaces between:\n    - lowercase followed by uppercase (camelCase issues)\n    - letters and numbers\n    - punctuation and following letters\n    \n    Args:\n        text: Input text with potential spacing issues\n        \n    Returns:\n        str: Text with improved spacing\n    \"\"\"\n    # Add space between lowercase and uppercase\n    text = re.sub(r'([a-z])([A-Z])', r'\\1 \\2', text)\n    # Add space between letter and number\n    text = re.sub(r'([a-zA-Z])(\\d)', r'\\1 \\2', text)\n    # Add space between number and letter\n    text = re.sub(r'(\\d)([a-zA-Z])', r'\\1 \\2', text)\n    # Add space after punctuation if followed by letter\n    text = re.sub(r'([.,;:!?])([A-Za-z])', r'\\1 \\2', text)\n    # Add space after closing bracket/paren if followed by uppercase\n    text = re.sub(r'([\\)\\]])([A-Z])', r'\\1 \\2', text)\n    return text\n\n\ndef load_pdf(path: str) -> str:\n    \"\"\"\n    Load PDF text.\n    \n    Args:\n        path: Path to PDF file\n        \n    Returns:\n        str: Extracted text (empty string if extraction fails)\n    \"\"\"\n    return \"\"\n\n\ndef load_docx(path: str) -> str:\n    \"\"\"\n    Load text from Word document.\n    \n    Args:\n        path: Path to .docx file\n        \n    Returns:\n        str: Extracted text from all paragraphs\n    \"\"\"\n    try:\n        d = docx.Document(path)\n        paras = [p.text for p in d.paragraphs]\n        return \"\\n\".join(paras)\n    except Exception as e:\n        print(f\"[warn] Error reading docx {path}: {e}\")\n        return \"\"\n\n\ndef normalize_ws(s: str) -> str:\n    \"\"\"\n    Normalize whitespace: collapse multiple spaces/tabs into single space.\n    \n    Args:\n        s: Input string\n        \n    Returns:\n        str: String with normalized whitespace\n    \"\"\"\n    return re.sub(r\"[ \\t\\u3000]+\", \" \", s).strip()\n\n\ndef yield_files(root: str, exts=(\".txt\", \".docx\")) -> Iterable[str]:\n    \"\"\"\n    Recursively yield file paths matching specified extensions.\n    \n    Args:\n        root: Root directory to search\n        exts: Tuple of file extensions to include\n        \n    Yields:\n        str: File paths matching extensions\n    \"\"\"\n    for base, _, files in os.walk(root):\n        for name in files:\n            if name.lower().endswith(exts):\n                yield os.path.join(base, name)\n\n\n# ============================================================================\n# Text Chunking\n# ============================================================================\ndef simple_chunk(text: str, chunk_size: int = 1000, overlap: int = 150) -> List[str]:\n    \"\"\"\n    Simple character-level chunking with overlap.\n    Creates chunks of approximately chunk_size characters with overlap\n    to preserve context at chunk boundaries.\n    \n    Args:\n        text: Input text to chunk\n        chunk_size: Target size of each chunk in characters\n        overlap: Number of overlapping characters between chunks\n        \n    Returns:\n        List[str]: List of text chunks\n    \"\"\"\n    text = text.replace(\"\\r\\n\", \"\\n\")\n    n = len(text)\n    \n    if n == 0:\n        return []\n    \n    chunks = []\n    start = 0\n    \n    while start < n:\n        end = min(start + chunk_size, n)\n        chunks.append(text[start:end])\n        \n        if end == n:\n            break\n        \n        # Move start forward with overlap\n        start = end - overlap\n        if start < 0:\n            start = 0\n    \n    return chunks\n\n\n# ============================================================================\n# Index Building and Loading\n# ============================================================================\ndef build_json_index(\n    data_folder: str, \n    index_path: str, \n    embed_model: str, \n    chunk_size: int, \n    overlap: int, \n    endpoint_base: str\n) -> Tuple[int, int]:\n    \"\"\"\n    Build JSON-based vector index from documents in a folder.\n    \n    Process:\n    1. Read all supported documents from folder\n    2. Chunk each document with overlap\n    3. Embed chunks using API\n    4. Save to JSON file with metadata\n    \n    Args:\n        data_folder: Folder containing documents to index\n        index_path: Output path for JSON index file\n        embed_model: Embedding model name\n        chunk_size: Size of text chunks in characters\n        overlap: Overlap between chunks in characters\n        endpoint_base: Base URL for API endpoint\n        \n    Returns:\n        Tuple[int, int]: (number of documents processed, number of chunks created)\n        \n    Raises:\n        RuntimeError: If no chunks were created\n    \"\"\"\n    items = []\n    num_docs = 0\n    \n    for path in yield_files(data_folder):\n        num_docs += 1\n        \n        # Load document based on file type\n        lower = path.lower()\n        try:\n            if lower.endswith(\".txt\"):\n                raw = load_txt(path)\n            elif lower.endswith(\".docx\"):\n                raw = load_docx(path)\n            else:\n                continue\n        except Exception as e:\n            print(f\"[warn] Failed to read {path}: {e}\")\n            continue\n\n        # Normalize and validate\n        raw = normalize_ws(raw)\n        if not raw:\n            print(f\"[warn] Empty content from {path}, skipping\")\n            continue\n\n        # Chunk the document\n        chunks = simple_chunk(raw, chunk_size, overlap)\n        if not chunks:\n            continue\n            \n        # Embed chunks via API\n        try:\n            vectors = call_nexa_embeddings(embed_model, chunks, endpoint_base)\n        except Exception as e:\n            print(f\"[warn] Failed to embed chunks from {path}: {e}\")\n            continue\n\n        # Store chunk metadata\n        for i, (txt, vec) in enumerate(zip(chunks, vectors)):\n            items.append({\n                \"id\": len(items),\n                \"text\": txt,\n                \"source\": os.path.abspath(path),\n                \"chunk_index\": i,\n                \"vector\": vec,\n            })\n\n    if not items:\n        raise RuntimeError(\"No chunks found. Check your --data path and files.\")\n\n    # Build and save index\n    dim = len(items[0][\"vector\"])\n    payload = {\n        \"embed_model\": embed_model,\n        \"dim\": dim,\n        \"items\": items,\n    }\n    \n    with open(index_path, \"w\", encoding=\"utf-8\") as f:\n        json.dump(payload, f, ensure_ascii=False)\n\n    return num_docs, len(items)\n\n\ndef load_json_index(index_path: str) -> Dict[str, Any]:\n    \"\"\"\n    Load JSON vector index into memory as NumPy arrays.\n    \n    Args:\n        index_path: Path to JSON index file\n        \n    Returns:\n        dict: Index data containing:\n            - embed_model: Model used for embeddings\n            - dim: Embedding dimension\n            - matrix: NumPy array of shape (N, D) with all vectors\n            - texts: List of chunk texts\n            - sources: List of source file paths\n            - chunk_ids: List of chunk indices within documents\n            \n    Raises:\n        FileNotFoundError: If index file doesn't exist\n        json.JSONDecodeError: If index file is malformed\n        ValueError: If index structure is invalid\n    \"\"\"\n    if not os.path.exists(index_path):\n        raise FileNotFoundError(f\"Index file not found: {index_path}\")\n    \n    try:\n        with open(index_path, \"r\", encoding=\"utf-8\") as f:\n            data = json.load(f)\n    except json.JSONDecodeError as e:\n        raise json.JSONDecodeError(f\"Malformed index file: {index_path}\", e.doc, e.pos)\n    \n    # Validate structure\n    if \"items\" not in data:\n        raise ValueError(\"Index file missing 'items' field\")\n    \n    items = data[\"items\"]\n    if not items:\n        raise ValueError(\"Index contains no items\")\n    \n    # Extract fields\n    texts = [it[\"text\"] for it in items]\n    sources = [it[\"source\"] for it in items]\n    chunk_ids = [it[\"chunk_index\"] for it in items]\n    \n    # Build embedding matrix\n    mat = np.array([it[\"vector\"] for it in items], dtype=np.float32)\n    \n    return {\n        \"embed_model\": data.get(\"embed_model\", \"\"),\n        \"dim\": data.get(\"dim\", mat.shape[1]),\n        \"matrix\": mat,         # (N, D)\n        \"texts\": texts,        # list[str]\n        \"sources\": sources,    # list[str]\n        \"chunk_ids\": chunk_ids # list[int]\n    }\n\n\n# ============================================================================\n# Vector Search\n# ============================================================================\ndef embed_query_server(query: str, embed_model: str, endpoint_base: str) -> np.ndarray:\n    \"\"\"\n    Embed a single query string via API.\n    \n    Args:\n        query: Query text to embed\n        embed_model: Embedding model name\n        endpoint_base: Base URL for API endpoint\n        \n    Returns:\n        np.ndarray: Query embedding vector\n    \"\"\"\n    vecs = call_nexa_embeddings(embed_model, [query], endpoint_base)\n    return np.array(vecs[0], dtype=np.float32)\n\n\ndef search_numpy(\n    query: str, \n    index: dict, \n    embed_model: str, \n    endpoint_base: str, \n    top_k: int = 5\n) -> Tuple[np.ndarray, np.ndarray]:\n    \"\"\"\n    Search vector index using cosine similarity.\n    \n    Args:\n        query: Search query text\n        index: Loaded index dictionary from load_json_index()\n        embed_model: Embedding model name\n        endpoint_base: Base URL for API endpoint\n        top_k: Number of top results to return\n        \n    Returns:\n        Tuple[np.ndarray, np.ndarray]: \n            - Array of top-k indices\n            - Array of corresponding similarity scores\n    \"\"\"\n    # Embed query\n    q_vec = embed_query_server(query, embed_model, endpoint_base)  # (D,)\n    db = index[\"matrix\"]  # (N, D)\n\n    # Normalize vectors to compute cosine similarity\n    q_norm = q_vec / (np.linalg.norm(q_vec) + 1e-8)  # (D,)\n    db_norm = db / (np.linalg.norm(db, axis=1, keepdims=True) + 1e-8)  # (N, D)\n\n    # Compute cosine similarity = dot product of normalized vectors\n    sims = db_norm @ q_norm  # (N,)\n    \n    # Get top-k indices (sorted by similarity descending)\n    top_idx = np.argsort(-sims)[:top_k]\n    return top_idx, sims[top_idx]\n\n\n# ============================================================================\n# Main CLI Application\n# ============================================================================\ndef main():\n    \"\"\"Main CLI application for RAG system.\"\"\"\n    # Get default data folder in Downloads\n    default_data_folder = get_default_data_folder()\n    \n    # Parse command-line arguments\n    ap = argparse.ArgumentParser(\n        description=\"Local-files RAG (text-only) using JSON index + NumPy search\"\n    )\n    ap.add_argument(\n        \"--data\", \n        default=default_data_folder, \n        help=f\"Folder with txt/pdf/docx (default: {default_data_folder})\"\n    )\n    ap.add_argument(\n        \"--index_json\", \n        default=DEFAULT_INDEX_JSON, \n        help=\"Path to embeddings JSON index\"\n    )\n    ap.add_argument(\n        \"--embed_model\", \n        default=DEFAULT_EMBED_MODEL, \n        help=\"Embedding model name\"\n    )\n    ap.add_argument(\n        \"--chunk_size\", \n        type=int, \n        default=1000, \n        help=\"Chunk size in characters\"\n    )\n    ap.add_argument(\n        \"--chunk_overlap\", \n        type=int, \n        default=150, \n        help=\"Chunk overlap in characters\"\n    )\n    ap.add_argument(\n        \"--k\", \n        type=int, \n        default=5, \n        help=\"Top-k retrieval\"\n    )\n    ap.add_argument(\n        \"--rerank_top_n\", \n        type=int, \n        default=3, \n        help=\"Top-n after reranking\"\n    )\n    ap.add_argument(\n        \"--rerank_model\", \n        default=DEFAULT_RERANK_MODEL, \n        help=\"Rerank model name\"\n    )\n    ap.add_argument(\n        \"--use_rerank\", \n        action=\"store_true\", \n        help=\"Enable reranking step\"\n    )\n    ap.add_argument(\n        \"--model\", \n        default=DEFAULT_MODEL, \n        help=\"LLM model for generation\"\n    )\n    ap.add_argument(\n        \"--endpoint\", \n        default=DEFAULT_ENDPOINT, \n        help=\"Nexa endpoint base URL\"\n    )\n    ap.add_argument(\n        \"--rebuild\", \n        action=\"store_true\", \n        help=\"Rebuild JSON index before starting chat\"\n    )\n    args = ap.parse_args()\n\n    # Setup directories\n    os.makedirs(args.data, exist_ok=True)\n    print(f\"[info] Using data folder: {args.data}\")\n    \n    os.makedirs(os.path.dirname(args.index_json) or \".\", exist_ok=True)\n\n    # Build or load index\n    if args.rebuild or (not os.path.exists(args.index_json)):\n        print(f\"[build] Building JSON index via server embeddings → {args.index_json}\")\n        try:\n            n_docs, n_chunks = build_json_index(\n                args.data, \n                args.index_json, \n                args.embed_model, \n                args.chunk_size, \n                args.chunk_overlap, \n                args.endpoint\n            )\n            print(f\"[build] Done. docs={n_docs}, chunks={n_chunks}\")\n        except Exception as e:\n            print(f\"[error] Failed to build index: {e}\")\n            return\n    else:\n        print(f\"[info] Using existing index: {args.index_json}\")\n\n    # Load index into memory\n    try:\n        index = load_json_index(args.index_json)\n        print(f\"[info] Loaded index: dim={index['dim']}, rows={index['matrix'].shape[0]}, embed_model={index['embed_model']}\")\n    except Exception as e:\n        print(f\"[error] Failed to load index: {e}\")\n        return\n\n    print(f\"[info] Ready. model={args.model} endpoint={args.endpoint}\")\n    print(\"Type your question (Enter to quit). Commands: :reload (rebuild index)\")\n\n    # Interactive chat loop\n    while True:\n        try:\n            q = input(\"[user] \").strip()\n        except (EOFError, KeyboardInterrupt):\n            break\n            \n        if not q:\n            break\n            \n        # Handle special commands\n        if q.lower() == \":reload\":\n            print(\"[build] Rebuilding JSON index ...\")\n            try:\n                n_docs, n_chunks = build_json_index(\n                    args.data, \n                    args.index_json, \n                    args.embed_model, \n                    args.chunk_size, \n                    args.chunk_overlap, \n                    args.endpoint\n                )\n                index = load_json_index(args.index_json)\n                print(f\"[build] Done. docs={n_docs}, chunks={n_chunks}\")\n            except Exception as e:\n                print(f\"[error] Failed to rebuild index: {e}\")\n            continue\n\n        # Perform vector search\n        try:\n            top_idx, top_sims = search_numpy(\n                q, \n                index, \n                args.embed_model, \n                args.endpoint, \n                top_k=args.k\n            )\n        except Exception as e:\n            print(f\"[error] Search failed: {e}\")\n            continue\n\n        # Optional reranking step\n        if args.use_rerank and len(top_idx) > 0:\n            try:\n                # Get candidate documents from initial search\n                candidate_docs = [index[\"texts\"][i] for i in top_idx.tolist()]\n                \n                # Rerank and get top_n indices (relative to candidate_docs)\n                reranked_local_idx = call_nexa_rerank(\n                    args.rerank_model, \n                    q, \n                    candidate_docs, \n                    args.endpoint, \n                    top_n=args.rerank_top_n\n                )\n                \n                # Map back to original index positions\n                top_idx = top_idx[reranked_local_idx]\n                print(f\"[rerank] Reranked to top {len(reranked_local_idx)} documents\")\n            except Exception as e:\n                print(f\"[warn] Reranking failed, using original search results: {e}\")\n\n        # Build context from retrieved chunks\n        context_text = \"\\n\\n\".join([index[\"texts\"][i] for i in top_idx.tolist()])\n        messages = [\n            {\n                \"role\": \"system\",\n                \"content\": (\n                    \"You are a careful assistant. Use ONLY the provided context to answer.\\n\\n\"\n                    f\"<context>\\n{context_text}\\n</context>\"\n                ),\n            },\n            {\"role\": \"user\", \"content\": q},\n        ]\n\n        # Generate response\n        print(\"\\n[assistant]\", end=\"\", flush=True)\n        try:\n            # Try streaming first\n            for piece in call_nexa_chat(args.model, messages, args.endpoint, stream=True):\n                print(piece, end=\"\", flush=True)\n            print()\n        except requests.HTTPError as e:\n            # Fallback to non-streaming\n            print(f\"\\n[warn] Streaming failed, fallback to non-stream. Reason: {e}\")\n            try:\n                full = call_nexa_chat(args.model, messages, args.endpoint, stream=False)\n                print(full)\n            except Exception as e2:\n                print(f\"[error] Non-stream request also failed: {e2}\")\n\n    print(\"[info] Bye.\")\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/PC/RAG-VLM/.gitignore",
    "content": "docs/*\nvecdb.json\n__pycache__"
  },
  {
    "path": "cookbook/PC/RAG-VLM/README.md",
    "content": "# RAG with Qwen3VL and Nexa Serve\n\n## 1. About\nThis project is a lightweight **Retrieval-Augmented Generation (RAG)** system built on top of **[nexa serve](https://github.com/NexaAI/nexa-sdk)** with the **Qwen3VL** multimodal model.  \n\nThe system lets you bring your own files — such as **PDFs, Word docs, text files, or images** — and automatically builds a small database from them. When you ask a question, and the model retrieves relevant chunks from your files and responds based on the resources you provided.  \n\nYou can run the system directly from the **CLI**, or launch a simple **Gradio UI** for an interactive experience.\n\n\n## 2. Preparation\nBefore running this project, make sure you have the **Nexa SDK** installed. Please refer to the [Nexa SDK repository](https://github.com/NexaAI/nexa-sdk) for installation instructions.  \n\nOnce installed, you need to download the **Qwen3VL model** with the following command:\n\n```bash\nnexa pull NexaAI/Qwen3-VL-4B-Instruct-GGUF\nnexa pull djuna/jina-embeddings-v2-small-en-Q5_K_M-GGUF\n```\n\nAfter the model is ready, start the Nexa server in a separate terminal:\n\n```bash\nnexa serve\n```\n\nThen back to this project, create a new conda environment (optional) and install dependencies:\n\n```bash\n# Create a new conda environment (optional)\nconda create -n rag-nexa python=3.10 -y\nconda activate rag-nexa\n\n# install python dependencies\npip install gradio\npip install -r requirements.txt\n```\n\n\n## 3. Run from CLI\nTo run the RAG pipeline from the command line:\n\n```bash\npython rag_nexa.py --data ./docs\n```\n\n### Adding files\n- Place your files into the `./docs` folder. Supported formats: **.pdf, .txt, .docx, .png, .jpg, .jpeg, .webp, .bmp**  \n- After adding new files, you need to **rebuild** the index by restarting the script or triggering the rebuild function inside the UI.  \n  Rebuilding is required because it re-indexes the new files so the model can use them.\n\nOnce running, simply type your question in the terminal and the system will answer using your documents.\n\n\n## 4. Run with Gradio UI\nYou can also start an interactive **Gradio web UI**:\n\n```bash\npython gradio_ui.py\n```\n\nOpen the browser at [http://127.0.0.1:7860](http://127.0.0.1:7860).  \n\n### Using the UI\n- On the **left panel**, you can:\n  - Upload new files into the `./docs` folder (PDFs, docs, text, or images).\n  - Click **Rebuild** after uploading to refresh the database.\n- On the **right panel**, use the chat window to ask questions.\n- The model will **stream answers** based on your documents.\n"
  },
  {
    "path": "cookbook/PC/RAG-VLM/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nimport os\nimport platform\nimport subprocess\nfrom typing import List, Tuple\n\nimport gradio as gr\n\nfrom rag_nexa import (\n    DEFAULT_MODEL, DEFAULT_ENDPOINT, DEFAULT_EMBED_MODEL,\n    build_chunks_from_folder, build_retriever,\n    stream_nexa_chat_messages,\n    yield_images, build_image_index, retrieve_topk_images,\n)\n\nDOCS_DIR_DEFAULT = \"./docs\"\nIMG_TOPK_DEFAULT = 1\n\n\n# Helpers\ndef ensure_docs_dir(path: str) -> None:\n    if not os.path.exists(path):\n        os.makedirs(path, exist_ok=True)\n\ndef save_uploaded_files(files: List[gr.File], dest_dir: str) -> int:\n    \"\"\"Save uploaded files to dest_dir (txt/pdf/docx and common images).\"\"\"\n    if not files:\n        return 0\n    n = 0\n    for f in files:\n        src = getattr(f, \"name\", None) or f  # local temp path\n        if not src:\n            continue\n        filename = os.path.basename(src)\n        out_path = os.path.join(dest_dir, filename)\n        with open(src, \"rb\") as r, open(out_path, \"wb\") as w:\n            w.write(r.read())\n        n += 1\n    return n\n\ndef open_folder(path: str) -> Tuple[bool, str | None]:\n    \"\"\"Open folder in OS file explorer (success returns no UI message).\"\"\"\n    try:\n        system = platform.system()\n        if system == \"Windows\":\n            subprocess.Popen([\"explorer\", os.path.normpath(path)])\n        elif system == \"Darwin\":\n            subprocess.Popen([\"open\", path])\n        else:\n            subprocess.Popen([\"xdg-open\", path])\n        return True, None\n    except Exception as e:\n        return False, str(e)\n\n\n# Build / Rebuild pipeline\ndef do_rebuild(docs_dir: str, k: int, chunk_size: int, chunk_overlap: int,\n                _model: str, _endpoint: str):\n    \"\"\"\n    Return:\n        retriever (text),\n        img_index, img_paths_kept, clip_model (images),\n        status text\n    \"\"\"\n    ensure_docs_dir(docs_dir)\n    docs = build_chunks_from_folder(docs_dir, chunk_size=chunk_size, chunk_overlap=chunk_overlap)\n    retriever = build_retriever(docs, k=k, endpoint=_endpoint, embed_model=DEFAULT_EMBED_MODEL) if docs else None\n\n    # Build image index from docs_dir\n    all_imgs = yield_images(docs_dir)\n    img_index, img_paths_kept, clip_model = build_image_index(all_imgs)\n\n    if (not docs) and (not img_paths_kept):\n        status = f\"No files found in {docs_dir}. Please upload txt/pdf/docx or images.\"\n    else:\n        status = f\"Indexed text chunks: {len(docs) if docs else 0}, images: {len(img_paths_kept)}.\"\n\n    return retriever, img_index, img_paths_kept, clip_model, status\n\n\n# Chat\ndef chat_stream(message: str,\n                history: list,\n                retriever,\n                img_index,\n                img_paths_kept,\n                clip_model,\n                model: str,\n                endpoint: str,\n                img_topk: int):\n    \"\"\"\n    Generator for Gradio Chatbot: retrieval + streaming generation.\n    - Text retrieval from retriever\n    - Image retrieval via CLIP FAISS (retrieve_topk_images)\n    - Generation via /v1/chat/completions, stream=True\n    \"\"\"\n    has_text = retriever is not None\n    has_images = (img_index is not None) and (clip_model is not None) and bool(img_paths_kept)\n\n    if not has_text and not has_images:\n        # Empty evidence\n        yield history + [[message, \"Index is empty. Please upload files and click Rebuild.\"]], [], \"### Retrieved text\\n_(no text hits)_\"\n        return\n\n    # Text retrieval\n    ctx_docs = retriever.get_relevant_documents(message) if has_text else []\n    context_text = \"\\n\\n\".join([d.page_content for d in ctx_docs]) if ctx_docs else \"\"\n\n    # Build text evidence markdown (filename#chunkN + snippet)\n    def _mk_snippet(text: str, n: int = 160) -> str:\n        t = (text or \"\").replace(\"\\n\", \" \").strip()\n        return (t[:n] + \"…\") if len(t) > n else t\n\n    if ctx_docs:\n        lines = []\n        for i, d in enumerate(ctx_docs, 1):\n            src = os.path.basename(d.metadata.get(\"source\", \"\") or \"\")\n            idx = d.metadata.get(\"chunk_index\", -1)\n            snippet = _mk_snippet(d.page_content)\n            lines.append(f\"**{i}.** `{src}#chunk{idx}`\\n\\n> {snippet}\")\n        chunks_md = \"### Retrieved text\\n\" + \"\\n\\n\".join(lines)\n    else:\n        chunks_md = \"### Retrieved text\\n_(no text hits)_\"\n\n    # Image retrieval\n    topk_imgs = []\n    if img_index is not None and clip_model is not None and img_paths_kept and img_topk > 0:\n        topk_imgs = retrieve_topk_images(message, max(1, img_topk), img_index, img_paths_kept, clip_model)\n\n    img_contents = [{\"type\": \"image_url\", \"image_url\": {\"url\": p}} for p in topk_imgs]\n    img_gallery = topk_imgs  # Right panel gallery\n\n    # Compose messages\n    messages = [\n        {\n            \"role\": \"system\",\n            \"content\": (\n                \"You are a careful assistant. Use ONLY the provided context to answer.\\n\\n\"\n                f\"<context>\\n{context_text}\\n</context>\"\n            ),\n        },\n        {\n            \"role\": \"user\",\n            \"content\": [{\"type\": \"text\", \"text\": message}] + img_contents\n        },\n    ]\n\n    # Streaming: render evidence on first frame\n    partial = \"\"\n    yield history + [[message, partial]], img_gallery, chunks_md\n\n    try:\n        for piece in stream_nexa_chat_messages(model, messages, endpoint):\n            partial += piece\n            yield history + [[message, partial]], img_gallery, chunks_md\n    except Exception as e:\n        yield history + [[message, f\"(Streaming failed: {e})\"]], img_gallery, chunks_md\n\n\n# UI\nCUSTOM_CSS = \"\"\"\n/* Make cards cleaner and add subtle shadows */\n.gradio-container { max-width: 1600px !important; }\n.rounded-card { border-radius: 16px; box-shadow: 0 1px 8px rgba(0,0,0,.06); background: white; }\n.pad { padding: 14px; }\n.section-title { font-weight: 700; font-size: 14px; opacity: .8; margin-bottom: 8px; }\n#info-panel .gallery { background: #101114; } /* darker bg for images */\n\"\"\"\n\nwith gr.Blocks(title=\"RAG with Qwen3vl\", css=CUSTOM_CSS) as demo:\n    gr.Markdown(\"## RAG with Qwen3vl\")\n\n    with gr.Row():\n        # Left column: settings / files\n        with gr.Column(scale=1, elem_classes=[\"rounded-card\", \"pad\"]):\n            gr.Markdown(\"**Data & Settings**\")\n\n            docs_dir = gr.Textbox(label=\"Docs folder\", value=DOCS_DIR_DEFAULT)\n            btn_open = gr.Button(\"Open docs folder\")\n\n            uploader = gr.Files(\n                label=\"Upload files (txt/pdf/docx/png/jpg/jpeg/webp/bmp)\",\n                file_types=[\".txt\", \".pdf\", \".docx\", \".png\", \".jpg\", \".jpeg\", \".webp\", \".bmp\"],\n                file_count=\"multiple\",\n            )\n\n            with gr.Accordion(\"Model & Retrieval settings\", open=False):\n                model = gr.Textbox(label=\"Model\", value=DEFAULT_MODEL)\n                endpoint = gr.Textbox(label=\"Endpoint\", value=DEFAULT_ENDPOINT)\n\n                k = gr.Slider(1, 20, value=5, step=1, label=\"Top-k (text)\")\n                img_topk = gr.Slider(0, 6, value=IMG_TOPK_DEFAULT, step=1, label=\"Top-k images (0=disable)\")\n                chunk_size = gr.Slider(300, 2000, value=1000, step=50, label=\"Chunk size\")\n                chunk_overlap = gr.Slider(0, 400, value=150, step=10, label=\"Chunk overlap\")\n\n            with gr.Row():\n                btn_rebuild = gr.Button(\"Build/Rebuild\", variant=\"primary\")\n                btn_clear = gr.Button(\"Clear chat\")\n\n            status = gr.Textbox(label=\"Status\", value=\"\", interactive=False)\n\n        # Middle column: chat\n        with gr.Column(scale=2, elem_classes=[\"rounded-card\", \"pad\"]):\n            chat = gr.Chatbot(height=600, show_copy_button=True)\n            chat_input = gr.Textbox(placeholder=\"Ask something about your documents...\", label=\"Your question\")\n            btn_send = gr.Button(\"Send\", variant=\"primary\", elem_id=\"btn-send\")\n\n        # Right column: information panel (evidence)\n        with gr.Column(scale=2):\n            with gr.Accordion(\"Retrieved evidence\", open=True):\n                evid_gallery = gr.Gallery(\n                    label=\"Images\",\n                    columns=3,\n                    height=260,\n                    show_label=True\n                )\n                evid_text = gr.Markdown()\n\n    # States\n    retriever_state = gr.State(None)\n    img_index_state = gr.State(None)\n    img_paths_state = gr.State([])\n    clip_model_state = gr.State(None)\n\n    # Events\n    def on_upload(files, folder):\n        ensure_docs_dir(folder)\n        n = save_uploaded_files(files, folder)\n        return f\"Saved {n} file(s) to {folder}\"\n\n    uploader.upload(fn=on_upload, inputs=[uploader, docs_dir], outputs=status)\n\n    def on_rebuild(d, k_, cs, co, m, e):\n        r, img_idx, img_paths, clip_m, msg = do_rebuild(d, k_, cs, co, m, e)\n        return r, img_idx, img_paths, clip_m, msg\n\n    btn_rebuild.click(\n        fn=on_rebuild,\n        inputs=[docs_dir, k, chunk_size, chunk_overlap, model, endpoint],\n        outputs=[retriever_state, img_index_state, img_paths_state, clip_model_state, status],\n    )\n\n    def on_open(folder):\n        ok, err = open_folder(folder)\n        return \"\" if ok else f\"Failed to open: {err}\"\n\n    btn_open.click(fn=on_open, inputs=docs_dir, outputs=status)\n\n    def on_clear():\n        return []\n    btn_clear.click(fn=on_clear, outputs=chat)\n\n    # Chat send (streaming)\n    btn_send.click(\n        fn=chat_stream,\n        inputs=[chat_input, chat, retriever_state, img_index_state, img_paths_state, clip_model_state, model, endpoint, img_topk],\n        outputs=[chat, evid_gallery, evid_text],\n    )\n    chat_input.submit(\n        fn=chat_stream,\n        inputs=[chat_input, chat, retriever_state, img_index_state, img_paths_state, clip_model_state, model, endpoint, img_topk],\n        outputs=[chat, evid_gallery, evid_text],\n    )\n\nif __name__ == \"__main__\":\n    ensure_docs_dir(DOCS_DIR_DEFAULT)\n    demo.launch()\n"
  },
  {
    "path": "cookbook/PC/RAG-VLM/rag_nexa.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom __future__ import annotations\n\nimport os\nimport re\nimport json\nimport argparse\nimport requests\nimport faiss\nfrom sentence_transformers import SentenceTransformer\nfrom typing import List, Dict, Any, Iterable, Tuple\n\nimport docx\n\nfrom langchain_core.language_models.llms import LLM\nfrom langchain.text_splitter import RecursiveCharacterTextSplitter\nfrom langchain.schema import Document\nfrom langchain.prompts import ChatPromptTemplate, MessagesPlaceholder\nfrom langchain.chains.combine_documents import create_stuff_documents_chain\nfrom langchain.schema.runnable import RunnableLambda\n\n\n# Nexa config\nDEFAULT_MODEL = \"NexaAI/Qwen3-VL-4B-Instruct-GGUF\"\nDEFAULT_ENDPOINT = \"http://127.0.0.1:18181\"\nDEFAULT_EMBED_MODEL = \"djuna/jina-embeddings-v2-small-en-Q5_K_M-GGUF\" \n\n\n# Nexa low-level call\ndef _post_json(url: str, payload: dict, timeout: int = 300) -> dict:\n    headers = {\"Content-Type\": \"application/json\"}\n    resp = requests.post(url, headers=headers, data=json.dumps(payload), timeout=timeout)\n    if resp.status_code >= 400:\n        raise requests.HTTPError(f\"{resp.status_code} {url}\\n{resp.text}\", response=resp)\n    return resp.json()\n\ndef call_nexa_chat(model: str, prompt: str, base: str) -> str:\n    url = base.rstrip(\"/\") + \"/v1/chat/completions\"\n    data = _post_json(url, {\n        \"model\": model,\n        \"messages\": [{\"role\": \"user\", \"content\": prompt}],\n        \"stream\": False,\n        \"max_tokens\": 512\n    })\n    \n    try:\n        return data[\"choices\"][0][\"message\"][\"content\"]\n    except Exception:\n        # tolerate slight variants\n        return data.get(\"text\", \"\") or data.get(\"response\", \"\")\n\ndef call_nexa(prompt: str, model: str, endpoint_base: str) -> str:\n    \"\"\"\n    Use /v1/chat/completions endpoint.\n    \"\"\"\n    return call_nexa_chat(model, prompt, endpoint_base)\n\ndef stream_nexa_chat_messages(model: str, messages: list, base: str):\n    \"\"\"\n    Stream /v1/chat/completions.\n    Yields incremental text pieces as they arrive.\n    \"\"\"\n    url = base.rstrip(\"/\") + \"/v1/chat/completions\"\n    headers = {\"Content-Type\": \"application/json\"}\n    payload = {\"model\": model, \"messages\": messages, \"stream\": True, \"max_tokens\": 512}\n\n    with requests.post(url, headers=headers, data=json.dumps(payload), stream=True, timeout=300) as resp:\n        resp.raise_for_status()\n        for raw in resp.iter_lines(decode_unicode=True):\n            if not raw:\n                continue\n            # typical line: \"data: {json}\" or \"data: [DONE]\"\n            if raw.startswith(\"data:\"):\n                data = raw[len(\"data:\"):].strip()\n                if data == \"[DONE]\":\n                    break\n                try:\n                    obj = json.loads(data)\n                except Exception:\n                    continue\n                # chat stream usually in choices[0].delta.content\n                choices = obj.get(\"choices\", [])\n                if choices:\n                    delta = choices[0].get(\"delta\") or {}\n                    piece = delta.get(\"content\", \"\")\n                    if piece:\n                        yield piece\n\ndef call_nexa_embeddings(embed_model: str, inputs: List[str], base: str) -> List[List[float]]:\n    \"\"\"\n    Call Nexa /v1/embeddings to embed batch texts. Return list of vectors aligned with inputs.\n    \"\"\"\n    url = base.rstrip(\"/\") + \"/v1/embeddings\"\n    out: List[List[float]] = []\n    B = 64\n    for i in range(0, len(inputs), B):\n        batch = inputs[i:i+B]\n        payload = {\n            \"model\": embed_model,\n            \"input\": batch,\n            \"encoding_format\": \"float\"\n        }\n        data = _post_json(url, payload)\n        # Expected: {\"data\":[{\"embedding\":[...],\"index\":0}, ...]}\n        vecs = [None] * len(batch)\n        for item in data.get(\"data\", []):\n            idx = item.get(\"index\", 0)\n            vec = item.get(\"embedding\", [])\n            if 0 <= idx < len(batch):\n                vecs[idx] = vec\n        if any(v is None for v in vecs):\n            vecs = [d.get(\"embedding\", []) for d in data.get(\"data\", [])]\n        out.extend(vecs)\n    return out\n\n\nclass NexaLLM(LLM):\n    \"\"\"A minimal LangChain LLM adapter that calls Nexa's OpenAI-style endpoints.\"\"\"\n    model: str = DEFAULT_MODEL\n    endpoint: str = DEFAULT_ENDPOINT\n\n    def _call(self, prompt: str, **kwargs: Any) -> str:\n        return call_nexa(prompt, self.model, self.endpoint)\n\n    @property\n    def _llm_type(self) -> str:\n        return f\"nexa:{self.model}\"\n\n\n# File loaders\ndef load_txt(path: str) -> str:\n    \"\"\"Read UTF-8 text; fall back to latin-1 if needed.\"\"\"\n    for enc in (\"utf-8\", \"utf-8-sig\", \"latin-1\"):\n        try:\n            with open(path, \"r\", encoding=enc, errors=\"ignore\") as f:\n                return f.read()\n        except Exception:\n            continue\n    return \"\"\n\ndef load_pdf(path: str) -> str:\n    \"\"\"Extract text from PDF using python-docx text extraction.\"\"\"\n    return \"\"\n\ndef load_docx(path: str) -> str:\n    \"\"\"Extract text from .docx using python-docx.\"\"\"\n    d = docx.Document(path)\n    paras = [p.text for p in d.paragraphs]\n    return \"\\n\".join(paras)\n\ndef normalize_ws(s: str) -> str:\n    \"\"\"Collapse consecutive whitespace for cleaner chunks.\"\"\"\n    return re.sub(r\"[ \\t\\u3000]+\", \" \", s).strip()\n\ndef yield_files(root: str, exts: Tuple[str, ...] = (\".txt\", \".docx\")) -> Iterable[str]:\n    \"\"\"Iterate all files (recursively) under root with given extensions.\"\"\"\n    for base, _, files in os.walk(root):\n        for name in files:\n            if name.lower().endswith(exts):\n                yield os.path.join(base, name)\n\ndef load_file(path: str) -> str:\n    \"\"\"Dispatch by extension to proper loader.\"\"\"\n    lower = path.lower()\n    try:\n        if lower.endswith(\".txt\"):\n            return load_txt(path)\n        if lower.endswith(\".docx\"):\n            return load_docx(path)\n    except Exception as e:\n        print(f\"[warn] Failed to read {path}: {e}\")\n        return \"\"\n    return \"\"\n\ndef yield_images(root: str, exts: Tuple[str, ...] = (\".png\", \".jpg\", \".jpeg\", \".webp\", \".bmp\")) -> List[str]:\n    \"\"\"Collect image file paths under root (recursive).\"\"\"\n    paths: List[str] = []\n    for base, _, files in os.walk(root):\n        for name in files:\n            if name.lower().endswith(exts):\n                p = os.path.abspath(os.path.join(base, name)).replace(\"\\\\\", \"/\")\n                paths.append(p)\n    return paths\n\n\ndef build_image_index(image_paths: List[str],\n                      model_name: str = \"clip-ViT-B-32\") -> tuple:\n    \"\"\"\n    Build a FAISS index for images using a CLIP model (cross-modal).\n    Returns: (faiss_index, paths, clip_model)\n    \"\"\"\n    return None, [], None\n\ndef retrieve_topk_images(query: str, k: int,\n                        index,\n                        paths: List[str],\n                        clip_model) -> List[str]:\n    \"\"\"\n    Text->image retrieval: encode text with CLIP and search the image FAISS.\n    \"\"\"\n    return []\n\n\n# Chunking & retriever\ndef build_chunks_from_folder(folder: str,\n                            chunk_size: int = 1000,\n                            chunk_overlap: int = 150) -> List[Document]:\n    \"\"\"Load files from folder, split into chunks, attach metadata.\"\"\"\n    splitter = RecursiveCharacterTextSplitter(\n        chunk_size=chunk_size,\n        chunk_overlap=chunk_overlap,\n        separators=[\"\\n\\n\", \"\\n\", \". \", \"。\", \"；\", \"，\", \" \", \"\"],\n    )\n\n    docs: List[Document] = []\n    for path in yield_files(folder):\n        raw = load_file(path)\n        raw = normalize_ws(raw)\n        if not raw:\n            continue\n\n        chunks = splitter.split_text(raw)\n        for i, ch in enumerate(chunks):\n            docs.append(\n                Document(\n                    page_content=ch,\n                    metadata={\n                        \"source\": os.path.abspath(path),\n                        \"chunk_index\": i,\n                        \"total_chars\": len(raw),\n                    },\n                )\n            )\n    return docs\n\nclass _ServerEmbeddingRetriever:\n    \"\"\"\n    Minimal retriever that queries Nexa /v1/embeddings for both index-building\n    and query embedding, and searches with FAISS (cosine via inner product).\n    \"\"\"\n    def __init__(self, texts: List[str], metas: List[dict], k: int, endpoint: str, embed_model: str):\n        self.endpoint = endpoint\n        self.embed_model = embed_model\n        self.k = k\n        self.texts = texts\n        self.metas = metas\n\n        vecs = call_nexa_embeddings(self.embed_model, self.texts, self.endpoint)\n        mat = [[v for v in vec] for vec in vecs]\n        mat_flat = []\n        for vec in mat:\n            norm = sum(x**2 for x in vec) ** 0.5 + 1e-8\n            mat_flat.append([x / norm for x in vec])\n\n        import array\n        dim = len(mat_flat[0]) if mat_flat else 128\n        self.index = faiss.IndexFlatIP(dim)\n        for vec in mat_flat:\n            arr = array.array('f', vec)\n            self.index.add(arr.tobytes())\n\n    def get_relevant_documents(self, query: str) -> List[Document]:\n        q_vec = call_nexa_embeddings(self.embed_model, [query], self.endpoint)[0]\n        norm = sum(x**2 for x in q_vec) ** 0.5 + 1e-8\n        q = [x / norm for x in q_vec]\n        \n        import array\n        q_arr = array.array('f', q)\n        D, I = self.index.search(q_arr.tobytes(), self.k)\n        docs: List[Document] = []\n        for i in I[0]:\n            if 0 <= i < len(self.texts):\n                docs.append(Document(page_content=self.texts[i], metadata=self.metas[i]))\n        return docs\n\ndef build_retriever(docs: List[Document], k: int = 5, endpoint: str = DEFAULT_ENDPOINT, embed_model: str = DEFAULT_EMBED_MODEL):\n    \"\"\"Create FAISS retriever using server-side embeddings; attach metadata.\"\"\"\n    texts = [d.page_content for d in docs]\n    metas = [d.metadata for d in docs]\n    if not texts:\n        return None\n    return _ServerEmbeddingRetriever(texts, metas, k=k, endpoint=endpoint, embed_model=embed_model)\n\n\n# Prompt template\nSYSTEM_TEMPLATE = \"\"\"\nYou are a careful assistant. Use ONLY the provided context to answer.\nIf the answer is not contained in the context, say you don't know and ask for more info.\n\n<context>\n{context}\n</context>\n\"\"\"\n\nprompt = ChatPromptTemplate.from_messages(\n    [\n        (\"system\", SYSTEM_TEMPLATE),\n        MessagesPlaceholder(\"messages\"),\n    ]\n)\n\ndef build_chain(retriever, model_name: str, endpoint: str):\n    \"\"\"Compose retrieval -> stuff documents -> Nexa LLM.\"\"\"\n    llm = NexaLLM(model=model_name, endpoint=endpoint)\n    doc_chain = create_stuff_documents_chain(llm, prompt)\n\n    def add_context(params: Dict[str, Any]) -> Dict[str, Any]:\n        q = params[\"messages\"][-1].content\n        docs = retriever.get_relevant_documents(q) if retriever else []\n        return {\"messages\": params[\"messages\"], \"context\": docs}\n\n    chain = RunnableLambda(add_context) | doc_chain\n    return chain\n\n\n# CLI\ndef main():\n    ap = argparse.ArgumentParser(description=\"Local-files RAG with Nexa SDK server\")\n    ap.add_argument(\"--data\", default=\"./docs\", help=\"Folder containing txt/docx (recursive).\")\n    ap.add_argument(\"--k\", type=int, default=5, help=\"Top-k documents to retrieve.\")\n    ap.add_argument(\"--chunk_size\", type=int, default=1000, help=\"Chunk size for splitting.\")\n    ap.add_argument(\"--chunk_overlap\", type=int, default=150, help=\"Chunk overlap for splitting.\")\n    ap.add_argument(\"--model\", default=DEFAULT_MODEL, help=\"Nexa model name or alias.\")\n    ap.add_argument(\"--endpoint\", default=DEFAULT_ENDPOINT, help=\"Nexa base endpoint, e.g. http://127.0.0.1:18181\")\n    ap.add_argument(\"--embed_model\", default=DEFAULT_EMBED_MODEL, help=\"Embedding model served by Nexa /v1/embeddings\")\n    args = ap.parse_args()\n\n    if not os.path.exists(args.data):\n        os.makedirs(args.data)\n        print(f\"[info] Created empty data folder: {args.data}\")\n        \n    print(f\"[info] Loading files from: {args.data}\")\n    docs = build_chunks_from_folder(args.data, args.chunk_size, args.chunk_overlap)\n    if not docs:\n        print(\"[error] No documents loaded. Check your --data path and file types.\")\n        return\n    print(f\"[info] Built {len(docs)} chunks.\")\n\n    # Build image index once (from ./docs)\n    img_paths_all = yield_images(args.data)\n    img_index, img_paths_kept, clip_model = build_image_index(img_paths_all)\n\n    retriever = build_retriever(docs, k=args.k, endpoint=args.endpoint, embed_model=args.embed_model)\n    chain = build_chain(retriever, model_name=args.model, endpoint=args.endpoint)\n\n    print(f\"[info] Ready. Using model={args.model} endpoint={args.endpoint}\")\n    print(\"Type your question (or just press Enter to quit):\")\n\n    while True:\n        try:\n            q = input(\"[user] \").strip()\n            if not q:\n                break\n\n            # Hot-reload index on demand\n            if q.lower() == \":reload\":\n                print(\"[info] Rebuilding index ...\")\n                docs = build_chunks_from_folder(args.data, args.chunk_size, args.chunk_overlap)\n                retriever = build_retriever(docs, k=args.k, endpoint=args.endpoint, embed_model=args.embed_model)\n                print(f\"[info] Rebuilt. Chunks: {len(docs)}\")\n                continue\n\n            # Retrieval only (no LLM call here)\n            ctx_docs = retriever.get_relevant_documents(q) if retriever else []\n\n            # Show retrieved evidence\n            print(\"\\n[retrieved]\")\n            for i, d in enumerate(ctx_docs, start=1):\n                src = d.metadata.get(\"source\", \"\")\n                idx = d.metadata.get(\"chunk_index\", -1)\n                snippet = d.page_content[:160].replace(\"\\n\", \" \")\n                print(f\"  {i}. {os.path.basename(src)}#chunk{idx}: {snippet}...\")\n\n            # Streaming generation\n            context_text = \"\\n\\n\".join([d.page_content for d in ctx_docs])\n            IMG_TOPK = 1\n            topk_imgs = retrieve_topk_images(q, IMG_TOPK, img_index, img_paths_kept, clip_model)\n\n            # For logging\n            if topk_imgs:\n                print(\"\\n[images-selected]\")\n                for i, p in enumerate(topk_imgs, 1):\n                    print(f\"  {i}. {p}\")\n\n            img_contents = [{\"type\": \"image_url\", \"image_url\": {\"url\": p}} for p in topk_imgs]\n\n            messages = [\n                {\n                    \"role\": \"system\",\n                    \"content\": (\n                        \"You are a careful assistant. Use ONLY the provided context to answer.\\n\\n\"\n                        f\"<context>\\n{context_text}\\n</context>\"\n                    ),\n                },\n                {\n                    \"role\": \"user\",\n                    \"content\": [{\"type\": \"text\", \"text\": q}] + img_contents\n                },\n            ]\n\n            print(\"\\n[assistant]\", end=\"\", flush=True)\n            try:\n                # stream_nexa_chat_messages yields incremental text pieces\n                for piece in stream_nexa_chat_messages(args.model, messages, args.endpoint):\n                    print(piece, end=\"\", flush=True)\n                print()  # newline after stream ends\n            except requests.HTTPError as e:\n                # Fallback to non-stream single-shot completion (build a single prompt string)\n                print(f\"\\n[warn] streaming failed, fallback to non-stream. Reason: {e}\")\n                prompt_text = (\n                    \"You are a careful assistant. Use ONLY the provided context to answer.\\n\\n\"\n                    f\"<context>\\n{context_text}\\n</context>\\n\\n\"\n                    f\"Question: {q}\"\n                )\n                try:\n                    nonstream_answer = call_nexa(prompt_text, args.model, args.endpoint)\n                    print(\"\\n[assistant]\")\n                    print(nonstream_answer)\n                except Exception as e2:\n                    print(f\"[error] Non-stream request also failed: {e2}\")\n\n        except KeyboardInterrupt:\n            print(\"\\n[info] Bye.\")\n            break\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/PC/RAG-VLM/requirements.txt",
    "content": "faiss-cpu>=1.8\nrequests>=2.32.4\npydantic>=2.4.0\npython-docx>=1.1\npsutil\nsentence_transformers\nlangchain>=0.3.1"
  },
  {
    "path": "cookbook/PC/Web-Agent-Qwen3VL/README.md",
    "content": "# Web Agent with Qwen3-VL\n\n## Overview\n\nThis demo integrates Nexa SDK with Web-UI to enable local multimodal LLM-driven browser automation. The agent can interact with websites, perform searches, and execute complex web tasks autonomously using the `NexaAI/Qwen3-VL-4B-Instruct-GGUF` model (recommended).\n\nBuilt upon [@browser-use/web-ui](https://github.com/browser-use/web-ui), this integration demonstrates the power of local vision-language models for web automation tasks.\n\n## Prerequisites\n\n- Python 3.11+\n- Nexa SDK installed\n- Hugging Face account with access token\n- Sufficient storage space (4GB+ for model)\n\n## Quick Start\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/mtilyxuegao/Nexa-Web-UI.git\ncd Nexa-Web-UI\n```\n\n### 2. Install Nexa SDK\n\nDownload and install the Nexa SDK package from the official GitHub repository:\n\nVisit [https://github.com/NexaAI/nexa-sdk/releases/tag/v0.2.49](https://github.com/NexaAI/nexa-sdk/releases/tag/v0.2.49) to download the appropriate installer for your platform and install it.\n\n### 3. Set Up Python Environment\n\nChoose one of the following methods to set up your Python environment:\n\n#### Option A: Using uv (Recommended)\n\n```bash\n# Navigate to web-ui directory\ncd web-ui\n\n# Create virtual environment with uv\nuv venv --python 3.11\n\n# Activate virtual environment  \nsource .venv/bin/activate  # macOS/Linux\n# or .\\.venv\\Scripts\\Activate.ps1  # Windows PowerShell\n\n# Install Python dependencies\nuv pip install -r requirements.txt\n\n# (Optional) Install memory features for enhanced agent learning capabilities\n# This adds ~110MB of ML dependencies (torch, transformers, etc.)\nuv pip install \"browser-use[memory]\"\n\n# Install Playwright browsers (recommend Chromium only)\nplaywright install chromium --with-deps\n```\n\n#### Option B: Using conda\n\n```bash\n# Navigate to web-ui directory\ncd web-ui\n\n# Create conda environment\nconda create -n nexa-webui python=3.11 -y\nconda activate nexa-webui\n\n# Install Python dependencies\npip install -r requirements.txt\n\n# (Optional) Install memory features for enhanced agent learning capabilities\n# This adds ~110MB of ML dependencies (torch, transformers, etc.)\npip install \"browser-use[memory]\"\n\n# Install Playwright browsers (recommend Chromium only)\nplaywright install chromium --with-deps\n```\n\n### 4. Configure Environment Variables\n\nThe project includes a preconfigured `web-ui/.env` file with the following main settings:\n\n```bash\n# LLM Provider Settings\nDEFAULT_LLM=nexa\nNEXA_ENDPOINT=http://127.0.0.1:8080/v1\n\n# Other API Keys (if using other LLMs)\n# OPENAI_API_KEY=your_openai_key\n# ANTHROPIC_API_KEY=your_anthropic_key\n```\n\n### 5. Download the Model\n\nDownload the multimodal VLM model:\n\n```bash\n# Download the model\nnexa pull NexaAI/Qwen3-VL-4B-Instruct-GGUF\n```\n\n> **Optional**: If you want to set up Hugging Face token for accessing other private models:\n> ```bash\n> export HUGGINGFACE_HUB_TOKEN=\"your_huggingface_token\"\n> export NEXA_HFTOKEN=\"your_huggingface_token\"\n> ```\n\n**Important Notes**:\n- Model size is approximately 4GB\n- Ensure sufficient storage and bandwidth\n\n## Running the Demo\n\n### Step 1: Clean Up Ports (Optional)\n\nBefore starting, ensure ports are clean:\n\n```bash\n# Kill all related processes\nlsof -ti:8080,7788 | xargs kill -9 2>/dev/null\npkill -f \"nexa serve\"\npkill -f \"webui.py\"\n```\n\n### Step 2: Start Nexa Server\n\n```bash\n# Navigate to project root directory\ncd Nexa-Web-UI\nnexa serve --host 127.0.0.1:8080 --keepalive 600\n```\n\nWait until you see the message: `Localhosting on http://127.0.0.1:8080/docs/ui`\n\n### Step 3: Start Web-UI\n\nIn a **new terminal window**:\n\n```bash\n# Navigate to project root directory\ncd Nexa-Web-UI\n\n# Activate your Python environment\nsource web-ui/.venv/bin/activate  # or conda activate nexa-webui\n\n# Start the web interface\npython web-ui/webui.py --ip 127.0.0.1 --port 7788\n```\n\nWait until you see the message: `Running on local URL: http://127.0.0.1:7788`\n\n### Step 4: Access the Web Interface\n\nOpen your browser and visit: [http://127.0.0.1:7788](http://127.0.0.1:7788)\n\n## Usage Example\n\nFollow these steps to run the agent:\n\n### Step 1: Verify Agent Settings\n1. In the web interface, navigate to the **Agent Settings** tab\n2. Verify that:\n   - **LLM Provider** is set to `nexa`\n   - **LLM Model Name** is set to `NexaAI/Qwen3-VL-4B-Instruct-GGUF`\n\n### Step 2: Run the Agent\n1. Click on the **Run Agent** tab (the third tab)\n2. Enter your task in the input field\n\n### Step 3: Try an Example Task\n\n**Task**: `Go to google.com, search for 'nexa ai', and click the first element`\n\n**Expected Behavior**:\n1. Agent navigates to google.com\n2. Enters 'nexa ai' in the search box and performs search\n3. Clicks the first element in the search results\n4. Reports completion status\n\nThe agent will automatically execute these steps using vision-language understanding to interact with the webpage.\n\n## Features\n\n- 🤖 **Autonomous Web Navigation**: AI agent can understand and interact with web pages\n- 👁️ **Vision-Language Understanding**: Uses multimodal model to \"see\" and understand web content\n- 🏠 **Local Execution**: Runs entirely on your machine with Nexa SDK\n- 🎯 **Task-Based Interaction**: Simply describe what you want to accomplish\n- 🔄 **Multi-Step Workflows**: Can execute complex sequences of actions\n\n## Troubleshooting\n\n### Port Already in Use\nIf you encounter port conflicts, use the cleanup command:\n```bash\nlsof -ti:8080,7788 | xargs kill -9 2>/dev/null\n```\n\n### Model Download Issues\n- Ensure your Hugging Face token is valid and has access to the model\n- Check your internet connection and available disk space\n- Verify both `HUGGINGFACE_HUB_TOKEN` and `NEXA_HFTOKEN` are set\n\n### Browser Issues\nIf Playwright browsers fail to install:\n```bash\nplaywright install chromium --with-deps --force\n```\n\n## Acknowledgments\n\nWe would like to officially thank the [browser-use/web-ui](https://github.com/browser-use/web-ui) project and its contributors for providing the foundation that makes this integration possible.\n\n## Additional Resources\n\n- [Nexa SDK Repository](https://github.com/NexaAI/nexa-sdk)\n- [Browser Use Web-UI](https://github.com/browser-use/web-ui)\n- [Nexa SDK Documentation](https://docs.nexaai.com)\n\n"
  },
  {
    "path": "cookbook/PC/function-calling/.gitignore",
    "content": "__pycache__/\n*.json\napp/uploads/"
  },
  {
    "path": "cookbook/PC/function-calling/README.md",
    "content": "# NexaAI VLM Function Call Demo with Google Calendar MCP\n\nDemonstrates function calling capabilities of NexaAI/OmniNeural-4B model, integrated with Google Calendar via MCP protocol.\n\n## Features\n\n- Function calling with NexaAI VLM model\n- Google Calendar integration via MCP\n- Automatic function call parsing and execution\n- Multi-modal input support (text, image, audio)\n- Web UI and command-line interfaces\n\n## Prerequisites\n\n- **Python 3** (arm64 architecture recommended)\n  - See [bindings/python/notebook/windows(arm64).ipynb](../../bindings/python/notebook/windows(arm64).ipynb) for setup\n- **Node.js and npm** (for MCP server)\n  ```powershell\n  winget install OpenJS.NodeJS.LTS\n  ```\n  Restart terminal/IDE after installation.\n\n## Installation\n\n```bash\npip install -r requirements.txt\n```\n\n## Google Calendar Setup\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com)\n2. Create/select a project and enable [Google Calendar API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com)\n3. Go to [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent) follow the instructions to configure your consent screen.\n3. Create OAuth 2.0 credentials:\n   - Go to [Credentials](https://console.cloud.google.com/apis/credentials)\n   - Create \"Create Credentials\" > \"OAuth client ID\" > Select \"Desktop app\" > click \"Create\"\n   - Click \"Download JSON\" and save as `gcp-oauth.keys.json` on the same directory as this README.md\n4. Add your email as a test user in [Audience](https://console.cloud.google.com/auth/audience)\n   - Click \"Add User\" > enter your email address > click \"Save\"\n   - Note: Test mode tokens expire after 1 week\n\n5. Authenication (only need to do once)\n```powershell\n$env:GOOGLE_OAUTH_CREDENTIALS=\"gcp-oauth.keys.json\"\nnpx @cocal/google-calendar-mcp auth\n```\nfollow the instructions to authorize the application to access your Google Calendar.\n\n**Tip**: Ensure the OAuth client ID is enabled for Calendar API at [Credentials](https://console.cloud.google.com/apis/api/calendar-json.googleapis.com/credentials)\nFor detailed setup, see: https://github.com/nspady/google-calendar-mcp?tab=readme-ov-file#google-cloud-setup\n\n## Usage\n\n### Command Line\n\n```bash\n# Text only\npython main.py --text \"what is the time now?\"\n\n# Image with text\npython main.py --image image.png --text \"help me add this event to my calendar\"\n\n# Audio with text\npython main.py --audio audio.mp3 --text \"transcribe and add to calendar\"\n```\n### Web UI\n\n```powershell\npython .\\app\\flask_ui.py\n```\n"
  },
  {
    "path": "cookbook/PC/function-calling/app/flask_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom flask import Flask, render_template, request, jsonify, send_from_directory\nfrom pathlib import Path\nfrom datetime import datetime\nfrom image_utils import image_to_base64\nimport uuid\n\nimport sys\nsys.path.insert(0, str(Path(__file__).resolve().parents[1]))\nfrom main import call_agent_wrapper, FunctionCallAgentResult\n\napp = Flask(__name__)\napp.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024  # 16MB max file size\napp.config['UPLOAD_FOLDER'] = Path(__file__).resolve().parent / 'uploads'\napp.config['UPLOAD_FOLDER'].mkdir(parents=True, exist_ok=True)\n\nchat_history = []\nprocessing_tasks = {}\n\ndef allowed_file(filename):\n    \"\"\"check allowed file types\"\"\"\n    allowed_extensions = {'png', 'jpg', 'jpeg', 'gif', 'webp', 'bmp'}\n    return '.' in filename and filename.rsplit('.', 1)[1].lower() in allowed_extensions\n\ndef process_message(text_content=None, image_path=None):\n    \"\"\"handle user message\"\"\"\n    message = {\n        'type': 'user',\n        'timestamp': datetime.now().isoformat(),\n        'text': text_content if text_content else None,\n        'image': None\n    }\n    \n    if image_path:\n        try:\n            message['image'] = image_to_base64(image_path)\n        except Exception as e:\n            return None, f\"Image handle error: {str(e)}\"\n    \n    chat_history.append(message)\n    return message, None\n\ndef add_bot_response(response_type='text', content=None):\n    bot_message = {\n        'type': 'bot',\n        'timestamp': datetime.now().isoformat(),\n        'response_type': response_type,  # 'text', 'event'\n        'content': content\n    }\n    chat_history.append(bot_message)\n    return bot_message\n\n@app.route('/')\ndef index():\n    \"\"\"chat page\"\"\"\n    return render_template('chat.html')\n\n@app.route('/api/send-message', methods=['POST'])\ndef send_message():\n    \"\"\"\n    handle user message\n    inputs: text and/or image\n    return: task_id\n    \"\"\"\n    try:\n        text_content = request.form.get('message', '').strip()\n        image_file = request.files.get('image')\n        \n        if not text_content and not image_file:\n            return jsonify({'error': 'Please provide text or image'}), 400\n        \n        image_path = None\n        if image_file and image_file.filename:\n            if not allowed_file(image_file.filename):\n                return jsonify({'error': 'not allowed file'}), 400\n            \n            # save uploaded image\n            timestamp = datetime.now().strftime('%Y%m%d_%H%M%S_')\n            filename = timestamp + image_file.filename\n            image_path = app.config['UPLOAD_FOLDER'] / filename\n            image_file.save(image_path)\n        \n        # handle user message\n        user_message, error = process_message(text_content, image_path)\n        if error:\n            return jsonify({'error': error}), 400\n        \n        # create task id\n        task_id = str(uuid.uuid4())\n        # register task so client can poll /api/get-response/<task_id>\n        processing_tasks[task_id] = {\n            'status': 'pending',\n            'user_text': text_content,\n            'image_path': str(image_path) if image_path else None\n        }\n        \n        return jsonify({\n            'user_message': user_message,\n            'task_id': task_id,\n            'success': True\n        })\n    \n    except Exception as e:\n        return jsonify({'error': f'Serve error: {str(e)}'}), 500\n\n@app.route('/api/get-response/<task_id>', methods=['GET'])\nasync def get_response(task_id):\n    if task_id in processing_tasks:\n        task = processing_tasks[task_id]\n        if task['status'] == 'done':\n            # clear task\n            del processing_tasks[task_id]\n            return jsonify(task['result'])\n        elif task['status'] == 'processing':\n            return jsonify({'status': 'processing'})\n        elif task['status'] == 'pending':\n            # process now (synchronous handling for simplicity)\n            processing_tasks[task_id]['status'] = 'processing'\n            try:\n                response = await call_agent_wrapper(\n                    text=task['user_text'],\n                    image=task['image_path']\n                )\n                \n                if not response:\n                    bot_response = add_bot_response(\n                        response_type='text',\n                        content=\"Sorry, I couldn't process your request.\"\n                    )\n                    result = {'status': 'done', 'bot_response': bot_response}\n                    processing_tasks[task_id]['status'] = 'done'\n                    processing_tasks[task_id]['result'] = result\n                    return jsonify(result)\n                \n                if response.func_name == \"create-event\" and response.func_result is not None:\n                    import json\n                    data = json.loads(response.func_result)\n                    is_error = bool(data.get(\"isError\"))\n                    content = data.get(\"content\") or []\n                    bot_response = None\n                    if is_error:\n                        bot_response = add_bot_response(\n                            response_type='text',\n                            content=content[0][\"text\"]\n                        )\n                    else:\n                        text = json.loads(content[0][\"text\"])\n                        event = text[\"event\"]\n                        print(f\"[info] Event detected: {event}\")\n                        summary=event.get(\"summary\", \"No Title\")\n                        date = \"N/A\"\n                        if event.get(\"start\"):\n                            start_time = event[\"start\"].get(\"dateTime\", None)\n                            from datetime import datetime\n                            if start_time is not None:\n                                dt = datetime.fromisoformat(start_time)\n                                date = dt.date().isoformat()\n                                start_time = dt.strftime(\"%I:%M %p\")\n                            else:\n                                date = \"N/A\"\n                                start_time = \"N/A\"\n                        else:\n                            start_time = \"N/A\"\n                        if event.get(\"end\"):\n                            end_time = event[\"end\"].get(\"dateTime\", None)\n                            if end_time is not None:\n                                dt = datetime.fromisoformat(end_time)\n                                end_time = dt.strftime(\"%I:%M %p\")  \n                            else:\n                                end_time = \"N/A\"\n                        else:\n                            end_time = \"N/A\"\n                        venue = event.get(\"location\", \"N/A\")\n                        description = event.get(\"description\", summary)\n                        address = event.get(\"address\", venue)\n                        htmlLink = event.get(\"htmlLink\", \"\")\n                        bot_response = add_bot_response(\n                            response_type='event',\n                            content={\n                                'event_name': summary,\n                                'date': date,\n                                'start_time': start_time,\n                                'end_time': end_time,\n                                'venue': venue,\n                                'address': address,\n                                'description': description,\n                                'htmlLink': htmlLink\n                            }\n                        )\n                    result = {'status': 'done', 'bot_response': bot_response}\n                    processing_tasks[task_id]['status'] = 'done'\n                    processing_tasks[task_id]['result'] = result\n                    # return and let client clear on next poll\n                    return jsonify(result)\n                elif response.func_name == \"get-current-time\" and response.func_result is not None:\n                    import json\n                    data = json.loads(response.func_result)\n                    is_error = bool(data.get(\"isError\"))\n                    content = data.get(\"content\") or []\n                    bot_response = None\n                    if is_error:\n                        bot_response = add_bot_response(\n                            response_type='text',\n                            content=content[0][\"text\"]\n                        )\n                    else:\n                        text = json.loads(content[0][\"text\"])\n                        current_time = text.get(\"currentTime\", None)\n                        timezone = text.get(\"timezone\", None)\n                        if current_time and timezone:\n                            bot_response = add_bot_response(\n                                response_type='text',\n                                content=f\"The current time is {current_time} in {timezone}.\"\n                            )\n                        elif current_time:\n                            bot_response = add_bot_response(\n                                response_type='text',\n                                content=f\"The current time is {current_time}.\"\n                            )\n                        else:\n                            bot_response = add_bot_response(\n                                response_type='text',\n                                content=\"Sorry, I couldn't retrieve the current time.\"\n                            )\n                    result = {'status': 'done', 'bot_response': bot_response}\n                    processing_tasks[task_id]['status'] = 'done'\n                    processing_tasks[task_id]['result'] = result\n                    return jsonify(result)\n                elif response.response_text is not None:\n                    bot_response = add_bot_response(\n                        response_type='text',\n                        content=response.response_text\n                    )\n                    result = {'status': 'done', 'bot_response': bot_response}\n                    processing_tasks[task_id]['status'] = 'done'\n                    processing_tasks[task_id]['result'] = result\n                    return jsonify(result)\n                else:\n                    bot_response = add_bot_response(\n                        response_type='text',\n                        content=\"Sorry, I couldn't process your request.\"\n                    )\n                    result = {'status': 'done', 'bot_response': bot_response}\n                    processing_tasks[task_id]['status'] = 'done'\n                    processing_tasks[task_id]['result'] = result\n                    return jsonify(result)\n            except Exception as e:\n                bot_response = add_bot_response(\n                    response_type='text',\n                    content=str(e)\n                )\n                result = {'status': 'done', 'bot_response': bot_response}\n                processing_tasks[task_id]['status'] = 'done'\n                processing_tasks[task_id]['result'] = result\n                return jsonify(result)\n    \n    return jsonify({\n        'status': 'done'\n    })\n\n@app.route('/api/chat-history', methods=['GET'])\ndef get_chat_history():\n    return jsonify(chat_history)\n\n@app.route('/api/clear-history', methods=['POST'])\ndef clear_history():\n    global chat_history\n    chat_history = []\n    return jsonify({'success': True})\n\n@app.route('/uploads/<path:filename>')\ndef serve_upload(filename):\n    return send_from_directory(app.config['UPLOAD_FOLDER'], filename)\n\nif __name__ == '__main__':\n    app.run(debug=True, host='0.0.0.0', port=3000)\n"
  },
  {
    "path": "cookbook/PC/function-calling/app/image_utils.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\nimport base64\nimport os\nfrom pathlib import Path\nfrom typing import Union\n\n\ndef image_to_base64(image_path: Union[str, Path]) -> str:\n    image_path = Path(image_path)\n    if not image_path.exists():\n        raise FileNotFoundError(f\"Image not exists: {image_path}\")\n    suffix = image_path.suffix.lower()\n    mime_types = {\n        '.jpg': 'image/jpeg',\n        '.jpeg': 'image/jpeg',\n        '.png': 'image/png',\n        '.gif': 'image/gif',\n        '.webp': 'image/webp',\n        '.bmp': 'image/bmp',\n    }\n    \n    if suffix not in mime_types:\n        raise ValueError(f\"Not support: {suffix}\")\n    \n    mime_type = mime_types[suffix]\n    with open(image_path, 'rb') as f:\n        image_data = f.read()\n    base64_data = base64.b64encode(image_data).decode('utf-8')\n    return f\"data:{mime_type};base64,{base64_data}\"\n"
  },
  {
    "path": "cookbook/PC/function-calling/app/templates/chat.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>NexaAI</title>\n    <style>\n        * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n        }\n\n        body {\n            background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);\n            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;\n            color: #F7F0E9;\n            height: 100vh;\n            overflow: hidden;\n        }\n\n        .container {\n            display: flex;\n            flex-direction: column;\n            height: 100vh;\n            max-width: 70%;\n            margin: 0 auto;\n            background: #1a1a1a;\n            box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);\n        }\n\n        /* Header */\n        .header {\n            padding-bottom: 10px;\n            padding-top: 10px;\n            border-bottom: 1px solid #323232;\n            background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);\n            display: flex;\n            align-items: center;\n            justify-content: center;\n        }\n\n        .header img {\n            display: block;\n            margin: 0 auto;\n        }\n        \n        /* Top menu: left label + right-aligned new-chat button */\n        .menu {\n            display: flex;\n            align-items: center;\n            justify-content: space-between;\n            padding: 8px;\n            border-bottom: 1px solid #272727;\n            color: #F7F0E9;\n            background: #1C1C1C;\n        }\n\n        .menu > div {\n            font-size: 16px;\n            font-weight: 400;\n            color: #F7F0E9;\n        }\n\n        .btn-new-chat {\n            background: #EDEBD8;\n            color: #3F3831;\n            padding: 6px 8px;\n            margin-right: 4px;\n            font-size: 11px;\n            font-style: normal;\n            font-weight: 400;\n            border-radius: 6px;\n            border: none;\n            cursor: pointer;\n            display: inline-flex;\n            align-items: center;\n            justify-content: center;\n        }\n\n        .btn-new-chat:hover {\n            background: #f3efca;\n        }\n        \n        /* Chat Messages Area */\n        .chat-messages {\n            flex: 1;\n            overflow-y: auto;\n            padding: 20px;\n            display: flex;\n            flex-direction: column;\n            gap: 16px;\n        }\n\n        .chat-messages::-webkit-scrollbar {\n            width: 8px;\n        }\n\n        .chat-messages::-webkit-scrollbar-track {\n            background: transparent;\n        }\n\n        .chat-messages::-webkit-scrollbar-thumb {\n            background: #323232;\n            border-radius: 4px;\n        }\n\n        .chat-messages::-webkit-scrollbar-thumb:hover {\n            background: #404040;\n        }\n\n        /* User Message */\n        .message {\n            display: flex;\n            margin-bottom: 8px;\n            animation: fadeIn 0.3s ease-in;\n        }\n\n        @keyframes fadeIn {\n            from {\n                opacity: 0;\n                transform: translateY(10px);\n            }\n            to {\n                opacity: 1;\n                transform: translateY(0);\n            }\n        }\n\n        .message.user {\n            justify-content: flex-end;\n        }\n\n        .message.bot {\n            justify-content: flex-start;\n        }\n\n        .message-content {\n            max-width: 70%;\n            padding: 8px;\n            border-radius: 10px;\n            word-wrap: break-word;\n            word-break: break-word;\n            font-size: 16px;\n            font-weight: 400;\n            font-size: normal;\n        }\n\n        .user .message-content {\n            background: #323232;\n            color: #F7F0E9;\n        }\n\n        .bot .message-content {\n            background: transparent;\n            color: #F7F0E9;\n        }\n\n        /* User Image */\n        .message-image {\n            margin-bottom: 8px;\n        }\n\n        .user .message-image img {\n            max-width: 140px;\n            max-height: 140px;\n            border-radius: 12px;\n            display: block;\n        }\n\n        /* Event Card */\n        .event-card {\n            background: #232323;\n            border: 1px solid #323232;\n            border-radius: 12px;\n            padding: 12px;\n            max-width: 80%;\n        }\n\n        .event-header {\n            display: flex;\n            align-items: center;\n            margin-bottom: 12px;\n            padding-bottom: 12px;\n            border-bottom: 1px solid #323232;\n        }\n\n        .event-header-icon {\n            width: 16px;\n            height: 16px;\n            background: transparent;\n            border-radius: 50%;\n            margin-right: 8px;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n        }\n\n        .event-header-text {\n            color: #ADA8A4;\n            font-size: 12px;\n        }\n\n        .event-action {\n            margin-left: auto;\n        }\n\n        .btn-calendar {\n            background: #EDEBD8;\n            color: #3F3831;\n            border: none;\n            margin-left: 8px;\n            padding: 6px 12px;\n            border-radius: 6px;\n            cursor: pointer;\n            font-size: 11px;\n            transition: all 0.2s ease;\n        }\n\n        .btn-calendar:hover {\n            background: #f3efca;\n        }\n\n        .event-detail {\n            margin-bottom: 12px;\n        }\n\n        .event-detail-label {\n            color: #C6C0BA;\n            font-size: 14px;\n            font-style: normal;\n            font-weight: 500;\n            margin-bottom: 12px;\n            display: flex;\n            align-items: center;\n        }\n\n        .event-detail-label::before {\n            content: '●';\n            color: #ADA8A4;\n            margin-right: 8px;\n            font-size: 8px;\n        }\n\n        .event-detail-value {\n            color: #DB805F;\n            font-size: 12px;\n            margin-left: 2px;\n            padding: 2px 4px;\n            background: #323232;\n            border: 1px solid #404040;\n            border-radius: 6px;\n            display: inline-block;\n        }\n\n        .event-detail-description {\n            color: #ADA8A4;\n            font-size: 14px;\n            font-style: normal;\n            font-weight: 400;\n            line-height: 1.5;\n            margin-top: 8px;\n            margin-left: 16px;\n            display: inline-block;\n        }\n\n         .event-detail-name {\n            color: #ADA8A4;\n            font-size: 14px;\n            font-style: normal;\n            font-weight: 400;\n            line-height: 1.5;\n            margin-left: 16px;\n            display: inline-block;\n\n        }\n\n        /* Input Area */\n        .input-area {\n            margin: 16px;\n            padding: 8px;\n            border-radius: 8px;\n            border: 1px solid #7A7165;\n            background: #272727;\n        }\n\n        .input-form {\n            display: flex;\n            flex-direction: column;\n            gap: 12px;\n        }\n\n        .input-wrapper {\n            display: flex;\n            gap: 8px;\n            align-items: flex-end;\n            flex: 1;\n        }\n\n        .image-input-wrapper {\n            position: relative;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            width: 30px;\n            height: 30px;\n            cursor: pointer;\n            transition: all 0.2s ease;\n            background: #272727;\n        }\n\n        .image-input-wrapper:hover {\n            border-color: #404040;\n            background: #272727;\n        }\n\n        .image-input-wrapper input {\n            display: none;\n        }\n\n        .image-input-label {\n            width: 30px;\n            height: 30px;\n            background-color: #272727;\n        }\n\n        .image-preview {\n            position: relative;\n            width: 50px;\n            height: 50px;\n            background: transparent;\n            border-radius: 8px;\n            display: none;\n            overflow: hidden;\n            z-index: 5;\n        }\n\n        .image-preview img {\n            width: 100%;\n            height: 100%;\n            object-fit: cover;\n        }\n\n        .image-preview.show {\n            display: block;\n        }\n\n        /* Close button inside image preview */\n        .image-preview .close-btn {\n            position: absolute;\n            top: 4px;\n            right: 4px;\n            width: 18px;\n            height: 18px;\n            background: #2D2D2D;\n            color: #fff;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            cursor: pointer;\n            border-radius: 4px;\n        }\n\n        textarea {\n            flex: 1;\n            background: #272727;\n            border-radius: 8px;\n            border-color: #272727;\n            color: #F7F0E9;\n            padding: 8px 0px;\n            font-family: inherit;\n            font-size: 14px;\n            resize: none;\n            max-height: 100px;\n            transition: all 0.2s ease;\n        }\n\n        textarea::-webkit-scrollbar {\n            width: 0px;\n            height: 0px;\n        }\n\n        textarea:focus {\n            outline: none;\n        }\n\n        textarea::placeholder {\n            color: #505050;\n        }\n\n        .btn-send {\n            background: transparent;\n            border: none;\n            background-color: transparent;\n            color: #F7F0E9;\n            width: 30px;\n            height: 30px;\n            cursor: pointer;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            transition: all 0.2s ease;\n            margin-left: auto;\n        }\n\n        .btn-send:disabled {\n            opacity: 0.5;\n            cursor: not-allowed;\n        }\n\n        /* Loading */\n        .loading {\n            display: flex;\n            align-items: center;\n            gap: 8px;\n            color: #ADA8A4;\n            font-size: 12px;\n        }\n\n        .loading-dots {\n            display: inline-flex;\n            gap: 4px;\n        }\n\n        .loading-dots span {\n            width: 4px;\n            height: 4px;\n            background: #ADA8A4;\n            border-radius: 50%;\n            animation: bounce 1.4s infinite;\n        }\n\n        .loading-dots span:nth-child(2) {\n            animation-delay: 0.2s;\n        }\n\n        .loading-dots span:nth-child(3) {\n            animation-delay: 0.4s;\n        }\n\n        @keyframes bounce {\n            0%, 80%, 100% {\n                opacity: 0.3;\n                transform: translateY(0);\n            }\n            40% {\n                opacity: 1;\n                transform: translateY(-8px);\n            }\n        }\n\n        /* Error Message */\n        .error-message {\n            background: #3d2626;\n            border: 1px solid #8b4545;\n            color: #ffcccc;\n            padding: 12px 16px;\n            border-radius: 8px;\n            margin-bottom: 12px;\n            display: none;\n        }\n\n        .error-message.show {\n            display: block;\n            animation: slideDown 0.3s ease-out;\n        }\n\n        @keyframes slideDown {\n            from {\n                opacity: 0;\n                transform: translateY(-10px);\n            }\n            to {\n                opacity: 1;\n                transform: translateY(0);\n            }\n        }\n\n        .placeholder-empty-messages {\n            margin-top: 30%;\n        }\n\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <!-- Header -->\n        <div class=\"header\">\n            <img src=\"./static/nexaai.png\" alt=\"Logo\" style=\"width:65px; height:12px; vertical-align: middle;\">\n        </div>\n\n        <!-- Menu -->\n        <div class=\"menu\">\n            <!-- Future menu items can be added here -->\n            <div>NexaAI/OmniNeural-4B</div>\n            <button type=\"submit\" class=\"btn-new-chat\" id=\"newChat\" onclick=\"newChat()\">\n                <img src=\"./static/plus.png\" alt=\"New Chat\" style=\"width:12px; height:12px; margin-right:4px; vertical-align: middle;\">\n                New Chat\n            </button>\n        </div>\n\n        <!-- Chat Messages -->\n        <div class=\"chat-messages\" id=\"chatMessages\"></div>\n\n        <div class=\"placeholder-empty-messages\" id=\"emptyMessages\">\n            <div style=\"margin-left: 24px; font-size: 20px; color: #F7F0E9;\">Hi!</div>\n            <div style=\"margin-left: 24px; font-size: 20px; color: #ADA8A4;\">How can I help?</div>\n        </div>\n\n        <!-- Error Message -->\n        <div class=\"error-message\" id=\"errorMessage\"></div>\n\n        <!-- Input Area -->\n        <div class=\"input-area\">\n            <form class=\"input-form\" id=\"messageForm\" enctype=\"multipart/form-data\">\n                <div class=\"image-preview\" id=\"imagePreview\"></div>\n                <textarea \n                        id=\"messageInput\" \n                        placeholder=\"Ask Anything...\"\n                        rows=\"1\"\n                        ></textarea>\n                <div class=\"input-wrapper\">\n                    <div class=\"image-input-wrapper\">\n                        <input \n                            type=\"file\" \n                            id=\"imageInput\" \n                            accept=\"image/*\"\n                            />\n                        <label for=\"imageInput\" class=\"image-input-label\">\n                            <img src=\"/static/image.png\" alt=\"Add image\" style=\"width: 30px; height: 30px;\">\n                        </label>\n                    </div>\n                    <button type=\"submit\" class=\"btn-send\" id=\"sendBtn\" title=\"Send Message\">\n                        <img src=\"./static/send.png\" alt=\"Send\" style=\"width:25px; height:25px;\">\n                    </button>\n                </div>\n            </form>\n        </div>\n    </div>\n\n    <script>\n        const chatMessages = document.getElementById('chatMessages');\n        const messageInput = document.getElementById('messageInput');\n        const imageInput = document.getElementById('imageInput');\n        const imagePreview = document.getElementById('imagePreview');\n        const messageForm = document.getElementById('messageForm');\n        const sendBtn = document.getElementById('sendBtn');\n        const errorMessage = document.getElementById('errorMessage');\n        const emptyMessages = document.getElementById('emptyMessages');\n\n        window.onload = function() {\n            updateMessagesVisibility();\n        };\n        messageInput.addEventListener('input', function() {\n            this.style.height = 'auto';\n            this.style.height = Math.min(this.scrollHeight, 100) + 'px';\n        });\n\n        // image preview\n        imageInput.addEventListener('change', function(e) {\n            const file = e.target.files[0];\n            if (file) {\n                const reader = new FileReader();\n                reader.onload = function(event) {\n                    // include a close button inside preview\n                    imagePreview.innerHTML = `\n                        <div class=\"preview-wrapper\">\n                            <img src=\"${event.target.result}\" alt=\"preview\">\n                            <div class=\"close-btn\" title=\"Remove image\">\n                                <img src=\"/static/close.png\" alt=\"Close\" style=\"width:12px; height:12px;\">\n                            </div>\n                        </div>\n                    `;\n                    imagePreview.classList.add('show');\n\n                    // attach close handler\n                    const closeBtn = imagePreview.querySelector('.close-btn');\n                    if (closeBtn) {\n                        closeBtn.addEventListener('click', function() {\n                            clearImagePreview();\n                        });\n                    }\n                };\n                reader.readAsDataURL(file);\n            }\n        });\n\n        // sende message\n        messageForm.addEventListener('submit', async function(e) {\n            e.preventDefault();\n            \n            const messageText = messageInput.value.trim();\n            const hasImage = imageInput.files.length > 0;\n            \n            if (!messageText && !hasImage) {\n                showError('Please enter a message or select an image.');\n                return;\n            }\n\n            // disable inputs\n            sendBtn.disabled = true;\n            messageInput.disabled = true;\n            imageInput.disabled = true;\n\n            // Create FormData\n            const formData = new FormData();\n            if (messageText) {\n                formData.append('message', messageText);\n            }\n            if (hasImage) {\n                formData.append('image', imageInput.files[0]);\n            }\n\n            // clear inputs\n            messageInput.value = '';\n            messageInput.style.height = 'auto';\n            clearImagePreview();\n\n            try {\n                // send message to server\n                const response = await fetch('/api/send-message', {\n                    method: 'POST',\n                    body: formData\n                });\n\n                if (!response.ok) {\n                    const data = await response.json();\n                    throw new Error(data.error || 'Send Failed');\n                }\n\n                const data = await response.json();\n\n                // show user message\n                if (data.user_message) {\n                    if (data.user_message.text) {\n                        displayUserMessage(data.user_message.text);\n                    }\n                    if (data.user_message.image) {\n                        displayUserImageFromBase64(data.user_message.image);\n                    }\n                }\n\n                // show bot loading message\n                const loadingMessageEl = displayBotLoadingMessage();\n\n                // poll for response\n                const taskId = data.task_id;\n                let isProcessing = true;\n                \n                while (isProcessing) {\n                    await new Promise(resolve => setTimeout(resolve, 500)); \n                    \n                    const pollResponse = await fetch(`/api/get-response/${taskId}`);\n                    if (!pollResponse.ok) {\n                        throw new Error('Response Polling Failed');\n                    }\n                    \n                    const pollData = await pollResponse.json();\n                    \n                    if (pollData.status === 'done' && pollData.bot_response) {\n                        isProcessing = false;\n                        // remove loading message\n                        if (loadingMessageEl && loadingMessageEl.parentNode) {\n                            loadingMessageEl.remove();\n                        }\n                        // show bot response\n                        displayBotResponse(pollData.bot_response);\n                    }\n                }\n\n                scrollToBottom();\n\n            } catch (error) {\n                removeLoadingMessage();\n                showError(error.message);\n                console.error('Error:', error);\n            } finally {\n                sendBtn.disabled = false;\n                messageInput.disabled = false;\n                imageInput.disabled = false;\n                messageInput.focus();\n            }\n        });\n\n        // send message on Enter key\n        messageInput.addEventListener('keydown', function(e) {\n            if (e.key === 'Enter' && !e.shiftKey) {\n                e.preventDefault();\n                messageForm.dispatchEvent(new Event('submit'));\n            }\n        });\n\n        function displayUserMessage(text) {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message user';\n            messageEl.innerHTML = `\n                <div class=\"message-content\">\n                    ${escapeHtml(text)}\n                </div>\n            `;\n            chatMessages.appendChild(messageEl);\n            updateMessagesVisibility();\n        }\n\n        function displayUserImage(file) {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message user';\n            const reader = new FileReader();\n            reader.onload = function(e) {\n                const imgEl = document.createElement('div');\n                imgEl.className = 'message-image';\n                imgEl.innerHTML = `<img src=\"${e.target.result}\" alt=\"user image\">`;\n                messageEl.appendChild(imgEl);\n                chatMessages.appendChild(messageEl);\n                updateMessagesVisibility();\n                scrollToBottom();\n            };\n            reader.readAsDataURL(file);\n        }\n\n        function displayUserImageFromBase64(base64Data) {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message user';\n            const imgEl = document.createElement('div');\n            imgEl.className = 'message-image';\n            imgEl.innerHTML = `<img src=\"${base64Data}\" alt=\"user image\">`;\n            messageEl.appendChild(imgEl);\n            chatMessages.appendChild(messageEl);\n            updateMessagesVisibility();\n            scrollToBottom();\n        }\n\n        function clearImagePreview() {\n            try {\n                imagePreview.classList.remove('show');\n                imagePreview.innerHTML = '';\n                // clear the file input\n                imageInput.value = '';\n            } catch (e) {\n                console.error('clearImagePreview error', e);\n            }\n        }\n\n        function displayBotResponse(response) {\n            if (response.response_type === 'event') {\n                displayBotMessage(\"The event has been successfully added to your calendar\");\n                displayEventCard(response.content);\n            } else {\n                displayBotMessage(response.content);\n            }\n            updateMessagesVisibility();\n        }\n\n        function displayBotMessage(text) {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message bot';\n            messageEl.innerHTML = `\n                <div class=\"message-content\">\n                    ${escapeHtml(text)}\n                </div>\n            `;\n            chatMessages.appendChild(messageEl);\n            updateMessagesVisibility();\n            scrollToBottom();\n        }\n\n        function displayEventCard(event) {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message bot';\n            messageEl.innerHTML = `\n                <div class=\"event-card\">\n                    <div class=\"event-header\">\n                        <div class=\"event-header-icon\">\n                            <img src=\"/static/check.png\" alt=\"Calendar\" style=\"width:14px; height:14px;\">\n                        </div>\n                        <div class=\"event-header-text\">\n                            <span>Event added to </span>\n                            <span style=\"color: #DB805F\">@Your calendar</span>\n                        </div>\n                        <div class=\"event-action\">\n                            <button class=\"btn-calendar\" onclick='openCalendar(${JSON.stringify(event.htmlLink)})'>\n                                <img src=\"/static/calendar.png\" alt=\"Calendar\" style=\"width:12px; height:12px; vertical-align: middle; margin-right:4px;\">\n                                Open the Calendar\n                            </button>\n                        </div>\n                    </div>\n                    \n                    <div class=\"event-detail\">\n                        <div class=\"event-detail-label\">Event Name</div>\n                        <div class=\"event-detail-name\">${escapeHtml(event.event_name)}</div>\n                    </div>\n                    \n                    <div class=\"event-detail\">\n                        <div class=\"event-detail-label\">Event Time</div>\n                        <div style=\"margin-left: 16px;\">\n                            <span style=\"color: #ADA8A4; font-size: 14px;\">Date:</span>\n                            <span class=\"event-detail-value\">${escapeHtml(event.date)}</span>\n                            <span>&nbsp;&nbsp;</span>\n\n                            <span style=\"color: #ADA8A4; font-size: 14px;\">Start Time:</span>\n                            <span class=\"event-detail-value\">${escapeHtml(event.start_time)}</span>\n                            <span>&nbsp;&nbsp;</span>\n\n                            <span style=\"color: #ADA8A4; font-size: 14px;\">End Time:</span>\n                            <span class=\"event-detail-value\">${escapeHtml(event.end_time)}</span>\n                        </div>\n                    </div>\n                    \n                    <div class=\"event-detail\">\n                        <div class=\"event-detail-label\">Event Location</div>\n                        <div style=\"margin-left: 16px;\">\n                            <span style=\"color: #ADA8A4; font-size: 14px;\">Address:</span>\n                            <span class=\"event-detail-value\">${escapeHtml(event.address)}</span>\n                        </div>\n                    </div>\n                    \n                    <div class=\"event-detail\">\n                        <div class=\"event-detail-label\">Event Description</div>\n                        <div class=\"event-detail-description\">${escapeHtml(event.description)}</div>\n                    </div>\n                </div>\n            `;\n            chatMessages.appendChild(messageEl);\n            updateMessagesVisibility();\n            // attach click handler as a safe fallback in case inline handler is problematic\n            try {\n                const btn = messageEl.querySelector('.btn-calendar');\n                if (btn) {\n                    btn.addEventListener('click', function(ev) {\n                        // prefer data attribute or argument if present\n                        const url = ev.currentTarget.getAttribute('data-url') || ev.currentTarget.getAttribute('onclick')?.match(/openCalendar\\((.*)\\)/)?.[1];\n                        // strip surrounding quotes if any\n                        const clean = url ? url.replace(/^['\\\"]|['\\\"]$/g, '') : null;\n                        openCalendar(clean);\n                    });\n                }\n            } catch (e) {\n                console.error('attach btn-calendar listener failed', e);\n            }\n            scrollToBottom();\n        }\n        // Show/hide chatMessages and emptyMessages depending on message count\n        function updateMessagesVisibility() {\n            // Only count .message elements inside chatMessages\n            const hasMessages = chatMessages.querySelectorAll('.message').length > 0;\n            if (hasMessages) {\n                chatMessages.style.display = '';\n                emptyMessages.style.display = 'none';\n            } else {\n                chatMessages.style.display = 'none';\n                emptyMessages.style.display = '';\n            }\n        }\n\n        function displayLoadingMessage() {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message bot';\n            messageEl.id = 'loadingMessage';\n            messageEl.innerHTML = `\n                <div class=\"loading\">\n                    <span>Loading... </span>\n                    <div class=\"loading-dots\">\n                        <span></span>\n                        <span></span>\n                        <span></span>\n                    </div>\n                </div>\n            `;\n            chatMessages.appendChild(messageEl);\n            scrollToBottom();\n        }\n\n        function displayBotLoadingMessage() {\n            const messageEl = document.createElement('div');\n            messageEl.className = 'message bot';\n            messageEl.id = 'botLoadingMessage';\n            messageEl.innerHTML = `\n                <div class=\"message-content\">\n                    <div class=\"loading\" style=\"background: transparent;\">\n                        <div class=\"loading-dots\">\n                            <span></span>\n                            <span></span>\n                            <span></span>\n                        </div>\n                    </div>\n                </div>\n            `;\n            chatMessages.appendChild(messageEl);\n            scrollToBottom();\n            return messageEl;\n        }\n\n        function removeLoadingMessage() {\n            const loadingEl = document.getElementById('loadingMessage');\n            if (loadingEl) {\n                loadingEl.remove();\n            }\n        }\n\n        function scrollToBottom() {\n            chatMessages.scrollTop = chatMessages.scrollHeight;\n        }\n\n        function showError(message) {\n            errorMessage.textContent = '❌ ' + message;\n            errorMessage.classList.add('show');\n            setTimeout(() => {\n                errorMessage.classList.remove('show');\n            }, 5000);\n        }\n\n        function escapeHtml(text) {\n            const map = {\n                '&': '&amp;',\n                '<': '&lt;',\n                '>': '&gt;',\n                '\"': '&quot;',\n                \"'\": '&#039;'\n            };\n            return text.replace(/[&<>\"']/g, m => map[m]);\n        }\n\n        function openCalendar(url) {\n            window.open(url, '_blank', 'noopener,noreferrer');\n        }\n\n        function newChat() {\n            window.location.reload();\n            try {\n                // send message to server\n                const response = fetch('/api/clear-history', {\n                    method: 'POST'\n                });\n            } catch (error) {\n                console.error('Error:', error);\n            }\n        }\n\n        messageInput.focus();\n        // Initial visibility on page load\n        updateMessagesVisibility();\n    </script>\n</body>\n</html>\n"
  },
  {
    "path": "cookbook/PC/function-calling/main.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\"\"\"NexaAI VLM Function Call Demo with Google Calendar MCP\"\"\"\n\nimport asyncio\nimport json\nimport os\nimport sys\nimport argparse\nimport re\nfrom dataclasses import dataclass\nfrom typing import List, Dict, Any, Optional\n\nfrom nexaai import GenerationConfig, ModelConfig, VlmChatMessage, VlmContent, setup_logging\nfrom nexaai.vlm import VLM\nfrom mcp import ClientSession, StdioServerParameters\nfrom mcp.client.stdio import stdio_client\n\n\ndef _convert_schema_property(prop_schema: Dict[str, Any]) -> Dict[str, Any]:\n    \"\"\"Recursively convert a schema property, handling nested objects.\"\"\"\n    result = {\n        \"type\": prop_schema.get(\"type\", \"string\"),\n    }\n    \n    if \"description\" in prop_schema:\n        result[\"description\"] = prop_schema[\"description\"]\n    \n    # Handle nested objects\n    if prop_schema.get(\"type\") == \"object\" and \"properties\" in prop_schema:\n        nested_props = {}\n        nested_required = []\n        \n        for nested_name, nested_schema in prop_schema[\"properties\"].items():\n            nested_props[nested_name] = _convert_schema_property(nested_schema)\n            if nested_name in prop_schema.get(\"required\", []):\n                nested_required.append(nested_name)\n        \n        result[\"properties\"] = nested_props\n        if nested_required:\n            result[\"required\"] = nested_required\n    \n    # Handle arrays of objects\n    if prop_schema.get(\"type\") == \"array\" and \"items\" in prop_schema:\n        result[\"items\"] = _convert_schema_property(prop_schema[\"items\"])\n    \n    return result\n\n\ndef mcp_tool_to_openai_format(tool) -> Dict[str, Any]:\n    \"\"\"Convert MCP tool to OpenAI function calling format.\"\"\"\n    properties = {}\n    required = []\n    \n    if tool.inputSchema and \"properties\" in tool.inputSchema:\n        for prop_name, prop_schema in tool.inputSchema[\"properties\"].items():\n            properties[prop_name] = _convert_schema_property(prop_schema)\n            if tool.inputSchema.get(\"required\") and prop_name in tool.inputSchema[\"required\"]:\n                required.append(prop_name)\n    \n    return {\n        \"type\": \"function\",\n        \"function\": {\n            \"name\": tool.name,\n            \"description\": tool.description or \"\",\n            \"parameters\": {\n                \"type\": \"object\",\n                \"properties\": properties,\n                \"required\": required,\n            }\n        }\n    }\n\n\nasync def get_mcp_tools(session: ClientSession) -> List[Dict[str, Any]]:\n    \"\"\"Get tools from MCP server and convert to OpenAI format.\"\"\"\n    result = await session.list_tools()\n    return [mcp_tool_to_openai_format(tool) for tool in result.tools]\n\n\ndef normalize_tool_name(tool_name: str, available_tools: List[Dict[str, Any]]) -> str:\n    \"\"\"Normalize tool name to match available tools.\"\"\"\n    name_mappings = {\n        \"create_calendar_event\": \"create-event\",\n        \"create-event\": \"create-event\",\n        \"list_calendar_events\": \"list-events\",\n        \"list-events\": \"list-events\",\n        \"update_calendar_event\": \"update-event\",\n        \"update-event\": \"update-event\",\n        \"delete_calendar_event\": \"delete-event\",\n        \"delete-event\": \"delete-event\",\n        \"get_current_time\": \"get-current-time\",\n        \"get-current-time\": \"get-current-time\",\n    }\n    \n    tool_names = [t.get(\"function\", {}).get(\"name\", \"\") for t in available_tools]\n    \n    if tool_name in name_mappings:\n        normalized = name_mappings[tool_name]\n        if normalized in tool_names:\n            return normalized\n    \n    if tool_name in tool_names:\n        return tool_name\n    \n    normalized = tool_name.replace(\"_\", \"-\")\n    return normalized if normalized in tool_names else tool_name\n\n\nasync def execute_mcp_tool(session: ClientSession, tool_name: str, arguments: Dict[str, Any], \n                           available_tools: Optional[List[Dict[str, Any]]] = None) -> str:\n    \"\"\"Execute a tool call via MCP server.\"\"\"\n    try:\n        if available_tools:\n            tool_name = normalize_tool_name(tool_name, available_tools)\n        result = await session.call_tool(tool_name, arguments=arguments)\n        return result.model_dump_json(indent=2)\n    except Exception as e:\n        return f\"Error: {str(e)}\"\n\n\ndef create_calendar_server(credentials: str) -> StdioServerParameters:\n    \"\"\"Create Google Calendar MCP server parameters.\"\"\"\n    if not os.path.exists(credentials):\n        raise FileNotFoundError(\n            f\"Credentials file not found: {credentials}\\n\"\n            f\"Please create the OAuth credentials file at: {os.path.abspath(credentials)}\"\n        )\n    return StdioServerParameters(\n        command=\"npx\",\n        args=[\"-y\", \"@cocal/google-calendar-mcp\"],\n        env={\"GOOGLE_OAUTH_CREDENTIALS\": os.path.abspath(credentials)},\n    )\n\n\ndef extract_function_call(text: str):\n    \"\"\"Extract function call JSON from LLM response.\"\"\"\n    if not text:\n        return None\n    \n    text = re.sub(r\"<\\|[^|]+\\|>\", \"\", text.strip())\n    \n    try:\n        parsed = json.loads(text)\n        if isinstance(parsed, dict) and \"name\" in parsed:\n            return parsed.get(\"name\"), parsed.get(\"arguments\", {})\n    except json.JSONDecodeError:\n        json_start = text.find('{')\n        if json_start == -1:\n            return None\n        \n        brace_count = 0\n        for i in range(json_start, len(text)):\n            if text[i] == '{':\n                brace_count += 1\n            elif text[i] == '}':\n                brace_count -= 1\n                if brace_count == 0:\n                    json_str = text[json_start:i + 1]\n                    try:\n                        parsed = json.loads(json_str)\n                        if isinstance(parsed, dict) and \"name\" in parsed:\n                            return parsed.get(\"name\"), parsed.get(\"arguments\", {})\n                    except json.JSONDecodeError:\n                        pass\n                    break\n    \n    return None\n\n\ndef _format_nested_properties(props: Dict[str, Any], required: List[str], prefix: str = \"\", indent: int = 2) -> List[str]:\n    \"\"\"Recursively format nested object properties with required field indicators.\"\"\"\n    param_list = []\n    indent_str = \" \" * indent\n    \n    for param_name, param_info in props.items():\n        param_type = param_info.get('type', 'string')\n        param_desc = param_info.get('description', '')\n        is_required = param_name in required\n        full_param_name = f\"{prefix}.{param_name}\" if prefix else param_name\n        \n        # Handle nested objects\n        if param_type == 'object' and 'properties' in param_info:\n            nested_props = param_info.get('properties', {})\n            nested_required = param_info.get('required', [])\n            req_mark = \" (REQUIRED)\" if is_required else \"\"\n            \n            if param_desc:\n                param_list.append(f\"{indent_str}{param_name} (object){req_mark}: {param_desc}\")\n            else:\n                param_list.append(f\"{indent_str}{param_name} (object){req_mark}\")\n            \n            # Recursively format nested properties\n            nested_params = _format_nested_properties(\n                nested_props, nested_required, full_param_name, indent + 2\n            )\n            param_list.extend(nested_params)\n        else:\n            req_mark = \" (REQUIRED)\" if is_required else \"\"\n            if param_desc:\n                param_list.append(f\"{indent_str}{param_name} ({param_type}){req_mark}: {param_desc}\")\n            else:\n                param_list.append(f\"{indent_str}{param_name} ({param_type}){req_mark}\")\n    \n    return param_list\n\n\ndef build_system_prompt(tools: list) -> str:\n    \"\"\"Build system prompt from tool schemas.\"\"\"\n    tools_descriptions = []\n    for t in tools:\n        func = t.get('function', {})\n        name = func.get('name', '')\n        desc = func.get('description', '')\n        params = func.get('parameters', {})\n        props = params.get('properties', {})\n        required = params.get('required', [])\n        \n        # Format parameters with nested object support\n        param_list = _format_nested_properties(props, required)\n        \n        params_str = \"\\n\".join(param_list) if param_list else \"  (no parameters)\"\n        \n        # Highlight required parameters at the top\n        required_params = [p for p in required]\n        required_str = f\"\\n  REQUIRED parameters: {', '.join(required_params)}\" if required_params else \"\"\n        \n        tools_descriptions.append(f\"{name}: {desc}{required_str}\\n{params_str}\")\n    \n    tools_list = \"\\n\\n\".join([f\"{i+1}. {td}\" for i, td in enumerate(tools_descriptions)])\n    \n    # Add example for create-event\n    example_json = \"\"\"{\n  \"name\": \"create-event\",\n  \"arguments\": {\n    \"calendarId\": \"primary\",\n    \"summary\": \"Meeting\",\n    \"start\": \"2025-01-01T10:00:00\",\n    \"end\": \"2025-01-01T11:00:00\"\n  }\n}\"\"\"\n    \n    return f\"\"\"You are a calendar assistant. When the user requests calendar actions, respond with ONLY a JSON object in this format:\n\n{{\"name\": \"function_name\", \"arguments\": {{\"param\": \"value\"}}}}\n\nCRITICAL RULES:\n- You MUST include ALL required parameters (marked as REQUIRED)\n- For nested objects, ALL required fields within the object must be included\n- If a parameter is marked as REQUIRED, it cannot be omitted\n- Output ONLY valid JSON, no other text before or after\n- Use exact function and parameter names (case-sensitive)\n\nExample for create-event:\n{example_json}\n\nAvailable functions:\n{tools_list}\n\nIMPORTANT: Before creating events, you may need to call get-current-time first to get accurate date/time context. Always include calendarId=\"primary\" for create-event unless specified otherwise.\n\"\"\"\n\n\ndef _handle_function_call_error(error_text: str, func_args: Dict[str, Any]) -> bool:\n    \"\"\"Handle function call errors and auto-fix parameters. Returns True if should retry.\"\"\"\n    # Auto-fix account errors\n    if \"Account\" in error_text and \"not found\" in error_text and \"Available accounts:\" in error_text:\n        match = re.search(r'Available accounts:\\s*(\\w+)', error_text)\n        if match:\n            func_args['account'] = match.group(1)\n            return True\n        elif 'account' in func_args:\n            del func_args['account']\n            return True\n    \n    # Auto-fix eventId errors\n    if \"Invalid event ID\" in error_text or (\"event ID\" in error_text.lower() and \"invalid\" in error_text.lower()):\n        if 'eventId' in func_args:\n            del func_args['eventId']\n            return True\n    \n    # Auto-remove optional parameters that cause errors\n    if \"validation error\" in error_text.lower() or \"invalid\" in error_text.lower():\n        optional_params = ['account', 'eventId', 'timeZone', 'fields']\n        for param in optional_params:\n            if param in func_args:\n                del func_args[param]\n                return True\n    \n    return False\n\n\nasync def _execute_with_retry(session: ClientSession, func_name: str, func_args: Dict[str, Any], \n                               tools: List[Dict[str, Any]], max_retries: int = 3) -> str:\n    \"\"\"Execute function call with automatic error handling and retry.\"\"\"\n    retry_count = 0\n    func_result = \"\"\n    \n    while retry_count <= max_retries:\n        func_result = await execute_mcp_tool(session, func_name, func_args, tools)\n        \n        try:\n            result_data = json.loads(func_result) if isinstance(func_result, str) else func_result\n            if result_data.get('isError', False):\n                error_text = \"\"\n                if isinstance(result_data.get('content'), list):\n                    for item in result_data['content']:\n                        if item.get('type') == 'text':\n                            error_text = item.get('text', '')\n                            break\n                \n                if retry_count < max_retries and _handle_function_call_error(error_text, func_args):\n                    retry_count += 1\n                    continue\n            break\n        except Exception:\n            break\n    \n    return func_result or \"\"\n\n\ndef init_vlm(tools: List[Dict[str, Any]]) -> VLM:\n    \"\"\"Initialize VLM with tools.\"\"\"\n    system_prompt = build_system_prompt(tools)\n    print('[debug] system_prompt:', system_prompt)\n    return VLM.from_(\"NexaAI/OmniNeural-4B\", config=ModelConfig(\n        system_prompt=system_prompt,\n        n_ctx=4096, n_threads=0, n_threads_batch=0, n_batch=0, \n        n_ubatch=0, n_seq_max=0, n_gpu_layers=999\n    ))\n\n\n\n@dataclass\nclass FunctionCallAgentResult:\n    \"\"\"Result of function call agent execution.\"\"\"\n    func_name: Optional[str]\n    func_result: Optional[str]\n    response_text: str\n\nasync def call_agent(\n    vlm: VLM,\n    session: ClientSession,\n    tools: List[Dict[str, Any]],\n    text: Optional[str] = None,\n    image: Optional[str] = None,\n    audio: Optional[str] = None\n) -> FunctionCallAgentResult:\n    if not text and not image and not audio:\n        raise ValueError(\"At least one of text, image, or audio must be provided\")\n    \n    contents = []\n    image_paths = []\n    audio_paths = []\n    \n    if image:\n        image_path = os.path.abspath(image)\n        if not os.path.exists(image_path):\n            raise FileNotFoundError(f\"Image file not found: {image_path}\")\n        image_paths.append(image_path)\n        contents.append(VlmContent(type=\"image\", text=image_path))\n    \n    if audio:\n        audio_path = os.path.abspath(audio)\n        if not os.path.exists(audio_path):\n            raise FileNotFoundError(f\"Audio file not found: {audio_path}\")\n        audio_paths.append(audio_path)\n        contents.append(VlmContent(type=\"audio\", text=audio_path))\n    \n    if text:\n        contents.append(VlmContent(type=\"text\", text=text))\n\n    conversation = [VlmChatMessage(role=\"user\", contents=contents)]\n    \n    # Generate initial response\n    prompt = vlm.apply_chat_template(conversation)\n    print('[debug] prompt:', prompt)\n    print('[debug] generate_stream...')\n    response_text = \"\"\n    for token in vlm.generate_stream(prompt, config=GenerationConfig(\n        max_tokens=2048, image_paths=image_paths or None, \n        audio_paths=audio_paths or None, image_max_length=512\n    )):\n        print(token, end=\"\", flush=True)\n        response_text += token\n    print()\n    print('[debug] response_text:', response_text)\n    func_call = extract_function_call(response_text)\n    if not func_call:\n        print(f\"[error] Failed to extract function call from response\")\n        return FunctionCallAgentResult(\n            func_name=None,\n            func_result=None,\n            response_text=response_text\n        )\n    \n    func_name, func_args = func_call\n    if func_name and isinstance(func_name, str):\n        print('[debug] calling function:', func_name)\n        func_result = await _execute_with_retry(session, func_name, func_args, tools)\n        print('[debug] func_result:', func_result)\n        \n        # Parse function result to extract success/error message\n        result_message = \"\"\n        try:\n            result_data = json.loads(func_result) if isinstance(func_result, str) else func_result\n            if result_data.get('isError', False):\n                # Extract error message\n                if isinstance(result_data.get('content'), list):\n                    for item in result_data['content']:\n                        if item.get('type') == 'text':\n                            result_message = item.get('text', '')\n                            break\n            else:\n                # Extract success message or summary\n                if isinstance(result_data.get('content'), list):\n                    for item in result_data['content']:\n                        if item.get('type') == 'text':\n                            result_message = item.get('text', '')\n                            break\n        except Exception:\n            result_message = str(func_result)\n        \n        followup = conversation + [\n            VlmChatMessage(role=\"assistant\", contents=[VlmContent(type=\"text\", text=response_text)]),\n            VlmChatMessage(role=\"user\", contents=[VlmContent(type=\"text\", \n                text=f\"Function execution completed. Result: {result_message}\\n\\n\"\n                     f\"Now respond to the user in natural language. You are in RESPONSE MODE, not function calling mode.\\n\"\n                     f\"- DO NOT output any JSON format\\n\"\n                     f\"- DO NOT use {{}} brackets\\n\"\n                     f\"- DO NOT call any function\\n\"\n                     f\"- Just speak naturally like a helpful assistant\\n\"\n                     f\"- Tell the user what happened with the calendar event in a friendly way\")])\n        ]\n        followup_response = \"\"\n        for token in vlm.generate_stream(\n            vlm.apply_chat_template(followup, enable_thinking=False),\n            config=GenerationConfig(max_tokens=2048)\n        ):\n            followup_response += token\n        return FunctionCallAgentResult(\n            func_name=func_name,\n            func_result=func_result,\n            response_text=followup_response\n        )\n    \n    return FunctionCallAgentResult(\n        func_name=None,\n        func_result=None,\n        response_text=response_text\n    )\n\n\nasync def call_agent_wrapper(\n    text: Optional[str] = None,\n    image: Optional[str] = None,\n    audio: Optional[str] = None,\n    credentials: str = \"gcp-oauth.keys.json\"\n) -> FunctionCallAgentResult:\n    setup_logging()\n\n    if not text and not image and not audio:\n        raise ValueError(\"At least one of text, image, or audio must be provided\") \n    \n    server = create_calendar_server(credentials)\n    async with stdio_client(server) as (read, write):\n        async with ClientSession(read, write) as session:\n            await session.initialize()\n            tools = await get_mcp_tools(session)\n            tools = [t for t in tools if t.get('function', {}).get('name', '') in \n                    ['create-event', 'get-current-time']]\n            \n            vlm = init_vlm(tools)\n            result = await call_agent(vlm, session, tools, text, image, audio)\n            return result\n    \n    \nasync def main():\n    \"\"\"Command-line interface for the agent.\"\"\"\n    setup_logging()\n    \n    parser = argparse.ArgumentParser()\n    parser.add_argument(\"--credentials\", default=\"gcp-oauth.keys.json\")\n    parser.add_argument(\"--text\", help=\"Text input\")\n    parser.add_argument(\"--image\", help=\"Image file path\")\n    parser.add_argument(\"--audio\", help=\"Audio file path\")\n    args = parser.parse_args()\n    \n    if not args.text and not args.image and not args.audio:\n        parser.print_help()\n        return\n    \n    server = create_calendar_server(args.credentials)\n    async with stdio_client(server) as (read, write):\n        async with ClientSession(read, write) as session:\n            await session.initialize()\n            tools = await get_mcp_tools(session)\n            tools = [t for t in tools if t.get('function', {}).get('name', '') in \n                    ['create-event', 'get-current-time']]\n            \n            vlm = init_vlm(tools)\n            result = await call_agent(vlm, session, tools, args.text, args.image, args.audio)\n\n    if result.response_text:\n        print(result.response_text)\n    \n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n"
  },
  {
    "path": "cookbook/PC/function-calling/requirements.txt",
    "content": "mcp\nFlask[async]"
  },
  {
    "path": "cookbook/PC/live-translate/README.md",
    "content": "# NexaAI Live Translator\n\nReal-time speech recognition and language translation demo using NexaAI's ASR and LLM models. Supports multi-language translation with low-latency sentence-level translation.\n\n## Features\n\n- 🎙️ **Real-time Speech Recognition**: Uses NexaAI's Parakeet ASR model for multi-language transcription\n- 🌐 **Instant Translation**: LLM provides fast, accurate translations\n- 📊 **Segment-based**: Automatic sentence/paragraph boundary detection for natural translations\n- 🖥️ **Modern Web UI**: Clean, responsive interface with live text display\n\n## Requirements\n- Windows/Linux with Qualcomm NPU device.\n- Python 3.9+\n\n## Installation\n\n### 1. Clone and Setup Environment\n\n```bash\ncd cookbook/PC/live-translate\npython -m venv .venv\n\n# Windows\n.venv\\Scripts\\activate\n# Linux\nsource .venv/bin/activate\n```\n\n### 2. Install Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n### 3. Download Models\n\nDownload the required models using NexaAI CLI:\n\n```bash\nnexa pull NexaAI/parakeet-tdt-0.6b-v3-npu\nnexa pull NexaAI/HY-MT1.5-1.8B-npu\n```\n\n## Usage\n\n### Quick Start\n\n```bash\npython app.py\n```\n\nThen open your browser to: **http://localhost:5000**\n\n\n### How to Use\n\n1. **Select Target Language**: Choose your desired translation language from the dropdown (e.g., Chinese, English, French, etc.)\n2. **Start Recording**: Click the \"Start Recording\" button\n3. **Speak**: Speak naturally into your microphone\n4. **Watch Real-time Translation**: \n    - Left panel shows real-time transcription\n    - Right panel shows real-time translation (auto-updated per sentence)\n5. **Stop Recording**: Click \"Stop Recording\" to end\n"
  },
  {
    "path": "cookbook/PC/live-translate/app.py",
    "content": "import logging\nimport atexit\nimport threading\nimport numpy as np\nfrom queue import Queue, Empty\nfrom typing import Optional\nfrom flask import Flask, jsonify, render_template, request\nfrom flask_cors import CORS\nfrom flask_socketio import SocketIO, emit\nfrom nexaai import LLM, GenerationConfig, SamplerConfig, ASR, setup_logging, LlmChatMessage\nfrom nexaai.asr import ASRStreamConfig\n\nlogging.basicConfig(level=logging.INFO, format='[%(asctime)s] %(levelname)s: %(message)s', force=True)\nsetup_logging(level=logging.DEBUG)\nlogger = logging.getLogger(__name__)\n\napp = Flask(__name__, template_folder='.', static_folder='.')\nCORS(app)\n\nsocketio = SocketIO(app, cors_allowed_origins='*', async_mode='threading', logger=False, engineio_logger=False)\n\nasr_model: Optional[ASR] = None\nllm_model: Optional[LLM] = None\nstream_managers = {}\n\n\nclass TranslationStreamManager:\n    def __init__(self, asr_model: ASR, llm_model: LLM, sid: str, target_language: str = 'zh'):\n        self.asr = asr_model\n        self.llm = llm_model\n        self.sid = sid\n        self.stream = None\n        self.stream_context = None\n        self.stream_active = False\n        self.target_language = target_language\n        self.audio_queue: Queue[bytes] = Queue(maxsize=50)\n        self.audio_thread: Optional[threading.Thread] = None\n        self.stop_event = threading.Event()\n        self.translation_queue: Queue[Optional[str]] = Queue(maxsize=20)\n        self.translation_thread: Optional[threading.Thread] = None\n        self.translation_degraded = False\n        self.last_committed_source = ''\n        self.pending_text = ''\n        self.stable_count = 0\n\n    def start_stream(self, target_language: str = 'zh'):\n        self.target_language = target_language\n        self.stream_active = True\n        logger.info('Starting ASR stream')\n        config = ASRStreamConfig(\n            sample_rate=16000,\n            chunk_duration=4.0,\n            overlap_duration=3.5,\n            max_queue_size=10,\n            buffer_size=1024,\n            timestamps='segment',\n            beam_size=4,\n        )\n\n        def on_transcription(text: str):\n            try:\n                if text and text.strip():\n                    self.on_new_segment(text)\n            except Exception as e:\n                logger.error(f'Error in transcription callback: {e}', exc_info=True)\n                socketio.emit('error', {'message': f'Transcription error: {e}'}, to=self.sid)\n\n        try:\n            self.stream_context = self.asr.stream(language='en', config=config)\n            self.stream = self.stream_context.__enter__()\n            self.stream.start(on_transcription=on_transcription)\n            logger.info('ASR stream started successfully')\n            self.stop_event.clear()\n            self.audio_thread = threading.Thread(\n                target=self._audio_worker, name=f'audio-worker-{self.sid}', daemon=True\n            )\n            self.audio_thread.start()\n            self.translation_thread = threading.Thread(\n                target=self._translation_worker, name=f'translation-worker-{self.sid}', daemon=True\n            )\n            self.translation_thread.start()\n        except Exception as e:\n            logger.error(f'Error starting stream: {e}', exc_info=True)\n            if self.stream_context is not None:\n                try:\n                    self.stream_context.__exit__(None, None, None)\n                except Exception:\n                    pass\n            self.stream = None\n            self.stream_active = False\n            socketio.emit('error', {'message': f'Failed to start stream: {e}'}, to=self.sid)\n\n    def push_audio(self, audio_bytes: bytes):\n        if not self.stream_active:\n            return\n        if len(audio_bytes) % 2 == 1:\n            audio_bytes = audio_bytes[:-1]\n        if not audio_bytes:\n            return\n        try:\n            self.audio_queue.put_nowait(audio_bytes)\n        except Exception as e:\n            logger.error(f'Error enqueuing audio: {e}')\n            socketio.emit('error', {'message': f'Audio queue error: {e}'}, to=self.sid)\n\n    def _audio_worker(self):\n        try:\n            while not self.stop_event.is_set():\n                try:\n                    audio_bytes = self.audio_queue.get(timeout=0.5)\n                except Empty:\n                    continue\n\n                try:\n                    audio_array = np.frombuffer(audio_bytes, dtype=np.int16).astype(np.float32) / 32768.0\n                    if self.stream and self.stream_active:\n                        self.stream.push_audio(audio_array.tolist())\n                except Exception as e:\n                    logger.error(f'Error pushing audio in worker: {e}')\n                    socketio.emit('error', {'message': f'Audio processing error: {e}'}, to=self.sid)\n                finally:\n                    self.audio_queue.task_done()\n        except Exception as e:\n            logger.error(f'Audio worker crashed: {e}', exc_info=True)\n            socketio.emit('error', {'message': f'Audio worker error: {e}'}, to=self.sid)\n\n    def on_new_segment(self, segment_text: str):\n        if not segment_text.strip():\n            return\n        try:\n            logger.info(f'New segment: {segment_text}')\n            if segment_text == self.pending_text:\n                self.stable_count += 1\n            else:\n                self.pending_text = segment_text\n                self.stable_count = 1\n            socketio.emit('transcription', {'original': segment_text}, to=self.sid)\n            is_sentence_end = segment_text.rstrip().endswith(('.', '?', '!'))\n            if self.stable_count < 3 and not is_sentence_end:\n                logger.debug(f'Waiting for stabilization (count={self.stable_count}, sentence_end={is_sentence_end})')\n                return\n            if segment_text == self.last_committed_source:\n                logger.debug('Skipping translation duplicate (unchanged source)')\n                return\n            self.last_committed_source = segment_text\n            logger.info('Committing stabilized segment for translation')\n            self._enqueue_translation(segment_text)\n        except Exception as e:\n            logger.error(f'Error processing segment: {e}', exc_info=True)\n            socketio.emit('error', {'message': f'Segment processing error: {e}'}, to=self.sid)\n\n    def _translate_text(self, text: str, target_lang: str) -> Optional[str]:\n        try:\n            prompt = f\"\"\"\nTranslate the following segment into {target_lang}, without additional explanation.\\n\\n{text}\n\"\"\"\n            prompt = self.llm.apply_chat_template([LlmChatMessage(role='user', content=prompt)], enable_thinking=False)\n            logger.info(f'Translation prompt: {prompt}')\n            result = self.llm.generate(\n                prompt,\n                GenerationConfig(max_tokens=256, sampler_config=SamplerConfig(temperature=0.3)),\n            )\n            self.llm.reset()\n            logger.info(f'Translation result: {result.full_text}')\n            return result.full_text\n        except Exception as e:\n            logger.error(f'Translation error: {e}', exc_info=True)\n            return None\n\n    def _enqueue_translation(self, text: str):\n        if self.translation_degraded:\n            logger.error(f'Translation degraded; dropping text: {text}')\n            return\n        try:\n            self.translation_queue.put_nowait(text)\n        except Exception as e:\n            logger.error(f'Failed to enqueue translation: {e}')\n\n    def _translation_worker(self):\n        while not self.stop_event.is_set():\n            try:\n                text = self.translation_queue.get(timeout=0.5)\n            except Empty:\n                continue\n            if text is None:\n                self.translation_queue.task_done()\n                break\n            try:\n                translated = self._translate_text(text, self.target_language)\n                if translated:\n                    logger.info(f'Translated to: {translated}')\n                    socketio.emit(\n                        'translation',\n                        {'translated': translated, 'original': text, 'language': self.target_language},\n                        to=self.sid,\n                    )\n                else:\n                    socketio.emit('error', {'message': 'Translation failed'}, to=self.sid)\n            except Exception as e:\n                logger.error(f'Translation worker error: {e}', exc_info=True)\n            finally:\n                self.translation_queue.task_done()\n\n    def stop_stream(self):\n        self.stream_active = False\n\n        self.stop_event.set()\n        try:\n            self.audio_queue.put_nowait(b'')\n        except Exception:\n            pass\n        if self.audio_thread and self.audio_thread.is_alive():\n            self.audio_thread.join(timeout=2.0)\n        self.audio_thread = None\n\n        try:\n            self.translation_queue.put_nowait(None)\n        except Exception:\n            pass\n        if self.translation_thread and self.translation_thread.is_alive():\n            self.translation_thread.join(timeout=2.0)\n        self.translation_thread = None\n\n        if self.stream:\n            try:\n                self.stream.stop(graceful=True)\n                self.stream = None\n            except Exception as e:\n                logger.error(f'Error stopping stream: {e}')\n\n        if self.stream_context is not None:\n            try:\n                self.stream_context.__exit__(None, None, None)\n            except Exception as e:\n                logger.error(f'Error closing stream context: {e}')\n\n        logger.info('ASR stream stopped')\n\n\ndef initialize_models():\n    global asr_model, llm_model\n    asr_model = ASR.from_(model='NexaAI/parakeet-tdt-0.6b-v3-npu')\n    llm_model = LLM.from_(model='NexaAI/HY-MT1.5-1.8B-npu')\n    logger.info('✓ LLM model loaded successfully')\n\n\n# ============================================================================\n# HTTP Routes\n# ============================================================================\n\n\n@app.route('/')\ndef index():\n    return render_template('index.html')\n\n\n@app.route('/api/health', methods=['GET'])\ndef health():\n    return jsonify(\n        {\n            'status': 'ok',\n            'asr_loaded': asr_model is not None,\n            'llm_loaded': llm_model is not None,\n        }\n    )\n\n\n@app.route('/api/translate-segment', methods=['POST'])\ndef translate_segment():\n    try:\n        data = request.get_json()\n        text = data.get('text', '').strip()\n        target_lang = data.get('target_lang', 'zh')\n        if not text:\n            return jsonify({'error': 'Empty text'}), 400\n        logger.info(f\"REST API: Translating '{text}' to {target_lang}\")\n        if asr_model is None or llm_model is None:\n            return jsonify({'error': 'Models not loaded'}), 500\n        manager = TranslationStreamManager(asr_model, llm_model, 'rest-api', target_lang)\n        translated = manager._translate_text(text, target_lang)\n        if translated is None:\n            return jsonify({'error': 'Translation failed'}), 500\n        return jsonify(\n            {\n                'original': text,\n                'translated': translated,\n                'target_lang': target_lang,\n            }\n        )\n\n    except Exception as e:\n        logger.error(f'Error in translate_segment: {e}', exc_info=True)\n        return jsonify({'error': str(e)}), 500\n\n\n# ============================================================================\n# WebSocket Events\n# ============================================================================\n\n\n@socketio.on('connect')\ndef handle_connect():\n    emit('connect', {'data': 'Connected to translation server'})\n\n\n@socketio.on('disconnect')\ndef handle_disconnect():\n    sid = request.sid\n    logger.info(f'Client disconnected: {sid}')\n\n    if sid in stream_managers:\n        stream_managers[sid].stop_stream()\n        del stream_managers[sid]\n\n\n@socketio.on('start_stream')\ndef handle_start_stream(data):\n    sid = request.sid\n    if isinstance(data, dict):\n        target_language = data.get('target_lang', 'zh')\n    else:\n        target_language = 'zh'\n    try:\n        logger.info(f'[{sid}] start_stream event received, target_language: {target_language}')\n        logger.debug(f'[{sid}] asr_model loaded: {asr_model is not None}, llm_model loaded: {llm_model is not None}')\n        if asr_model and llm_model:\n            logger.info(f'[{sid}] Creating TranslationStreamManager...')\n            manager = TranslationStreamManager(asr_model, llm_model, sid, target_language)\n            logger.info(f'[{sid}] Starting ASR stream...')\n            manager.start_stream(target_language)\n            stream_managers[sid] = manager\n            logger.info(f'[{sid}] Stream registered in stream_managers, total streams: {len(stream_managers)}')\n            emit(\n                'stream_started',\n                {\n                    'status': 'ok',\n                    'target_language': target_language,\n                },\n            )\n            logger.info(f'[{sid}] stream_started event emitted')\n        else:\n            logger.error(\n                f'[{sid}] Models not loaded! asr_model={asr_model is not None}, llm_model={llm_model is not None}'\n            )\n            emit('error', {'message': 'Models not loaded'})\n    except Exception as e:\n        logger.error(f'[{sid}] Error starting stream: {e}', exc_info=True)\n        emit('error', {'message': f'Failed to start stream: {e}'})\n\n\n@socketio.on('audio_chunk')\ndef handle_audio_chunk(data):\n    sid = request.sid\n\n    if sid not in stream_managers:\n        logger.warning(\n            f'[{sid}] Received audio_chunk but stream not started. Active streams: {list(stream_managers.keys())}'\n        )\n        emit('error', {'message': 'Stream not started. Click \"Start Recording\" first.'})\n        return\n\n    try:\n        if isinstance(data, (bytes, bytearray)):\n            audio_bytes = bytes(data)\n        else:\n            raise ValueError(f'Unsupported audio payload type: {type(data)}')\n\n        if not audio_bytes:\n            raise ValueError('Empty audio payload')\n\n        if len(audio_bytes) % 2 == 1:\n            audio_bytes = audio_bytes[:-1]\n\n        logger.debug(f'[{sid}] Received audio chunk: {len(audio_bytes)} bytes')\n        stream_managers[sid].push_audio(audio_bytes)\n\n    except Exception as e:\n        logger.error(f'[{sid}] Error processing audio chunk: {e}', exc_info=True)\n        emit('error', {'message': f'Audio processing error: {e}'})\n\n\n@socketio.on('stop_stream')\ndef handle_stop_stream():\n    sid = request.sid\n\n    if sid and sid in stream_managers:\n        stream_managers[sid].stop_stream()\n        del stream_managers[sid]\n        emit('stream_stopped', {'status': 'ok'})\n        logger.info(f'[{sid}] Stream stopped')\n\n\ndef cleanup_models():\n    global asr_model, llm_model\n    logger.info('Cleaning up models...')\n\n    if asr_model:\n        try:\n            del asr_model\n            asr_model = None\n        except Exception as e:\n            logger.error(f'Error cleaning up ASR model: {e}')\n\n    if llm_model:\n        try:\n            del llm_model\n            llm_model = None\n        except Exception as e:\n            logger.error(f'Error cleaning up LLM model: {e}')\n\n    logger.info('Models cleaned up')\n\n\nif __name__ == '__main__':\n    logger.info('=' * 80)\n    logger.info('Starting NexaAI Live Translator...')\n    logger.info('=' * 80)\n    atexit.register(cleanup_models)\n    initialize_models()\n\n    logger.info('✓ Starting Flask+SocketIO server on http://127.0.0.1:5000')\n    logger.info('=' * 80)\n    socketio.run(\n        app,\n        host='127.0.0.1',\n        port=5000,\n    )\n"
  },
  {
    "path": "cookbook/PC/live-translate/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>NexaAI Live Translator</title>\n    <script src=\"https://cdn.socket.io/4.5.4/socket.io.min.js\"></script>\n    <style>\n        * {\n            margin: 0;\n            padding: 0;\n            box-sizing: border-box;\n        }\n\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;\n            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n            min-height: 100vh;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n            padding: 20px;\n        }\n\n        .container {\n            max-width: 1200px;\n            width: 100%;\n        }\n\n        .header {\n            text-align: center;\n            color: white;\n            margin-bottom: 40px;\n        }\n\n        .header h1 {\n            font-size: 2.5rem;\n            margin-bottom: 10px;\n            font-weight: 700;\n        }\n\n        .header p {\n            font-size: 1.1rem;\n            opacity: 0.9;\n        }\n\n        .translator-box {\n            display: grid;\n            grid-template-columns: 1fr 1fr;\n            gap: 20px;\n            margin-bottom: 20px;\n        }\n\n        .panel {\n            background: white;\n            border-radius: 12px;\n            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);\n            padding: 25px;\n            display: flex;\n            flex-direction: column;\n        }\n\n        .panel-header {\n            display: flex;\n            justify-content: space-between;\n            align-items: center;\n            margin-bottom: 15px;\n            border-bottom: 2px solid #f0f0f0;\n            padding-bottom: 12px;\n        }\n\n        .panel-title {\n            font-size: 1.1rem;\n            font-weight: 600;\n            color: #333;\n        }\n\n        .language-select {\n            padding: 6px 12px;\n            border: 1px solid #ddd;\n            border-radius: 6px;\n            font-size: 0.9rem;\n            cursor: pointer;\n            background: white;\n            transition: border-color 0.3s;\n        }\n\n        .language-select:hover {\n            border-color: #667eea;\n        }\n\n        .language-select:focus {\n            outline: none;\n            border-color: #667eea;\n            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);\n        }\n\n        .text-display {\n            flex: 1;\n            padding: 15px;\n            background: #f9f9f9;\n            border-radius: 8px;\n            border: 1px solid #e0e0e0;\n            min-height: 300px;\n            overflow-y: auto;\n            font-size: 1rem;\n            line-height: 1.6;\n            color: #333;\n            resize: none;\n            word-wrap: break-word;\n            white-space: pre-wrap;\n        }\n\n        .text-display::-webkit-scrollbar {\n            width: 8px;\n        }\n\n        .text-display::-webkit-scrollbar-track {\n            background: #f1f1f1;\n            border-radius: 10px;\n        }\n\n        .text-display::-webkit-scrollbar-thumb {\n            background: #888;\n            border-radius: 10px;\n        }\n\n        .text-display::-webkit-scrollbar-thumb:hover {\n            background: #555;\n        }\n\n        .status {\n            margin-top: 12px;\n            font-size: 0.85rem;\n            color: #999;\n            min-height: 20px;\n        }\n\n        .status.transcribing {\n            color: #667eea;\n            font-weight: 500;\n        }\n\n        .status.translating {\n            color: #ff9500;\n            font-weight: 500;\n        }\n\n        .status.error {\n            color: #ff3b30;\n            font-weight: 500;\n        }\n\n        .controls {\n            background: white;\n            border-radius: 12px;\n            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);\n            padding: 25px;\n            display: flex;\n            gap: 15px;\n            flex-wrap: wrap;\n            align-items: center;\n            justify-content: center;\n        }\n\n        .button {\n            padding: 12px 28px;\n            font-size: 1rem;\n            font-weight: 600;\n            border: none;\n            border-radius: 8px;\n            cursor: pointer;\n            transition: all 0.3s;\n            display: flex;\n            align-items: center;\n            gap: 8px;\n        }\n\n        .button-primary {\n            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);\n            color: white;\n        }\n\n        .button-primary:hover:not(:disabled) {\n            transform: translateY(-2px);\n            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);\n        }\n\n        .button-primary:active:not(:disabled) {\n            transform: translateY(0);\n        }\n\n        .button-secondary {\n            background: #f0f0f0;\n            color: #333;\n            border: 2px solid #ddd;\n        }\n\n        .button-secondary:hover:not(:disabled) {\n            background: #e8e8e8;\n            border-color: #bbb;\n        }\n\n        .button:disabled {\n            opacity: 0.5;\n            cursor: not-allowed;\n        }\n\n        .icon {\n            display: inline-block;\n            width: 20px;\n            height: 20px;\n        }\n\n        .recording-indicator {\n            width: 12px;\n            height: 12px;\n            border-radius: 50%;\n            background: #ff3b30;\n            display: inline-block;\n            animation: pulse 1s infinite;\n        }\n\n        @keyframes pulse {\n\n            0%,\n            100% {\n                opacity: 1;\n            }\n\n            50% {\n                opacity: 0.5;\n            }\n        }\n\n        .mic-icon {\n            font-size: 1.2rem;\n        }\n\n        @media (max-width: 768px) {\n            .translator-box {\n                grid-template-columns: 1fr;\n            }\n\n            .header h1 {\n                font-size: 1.8rem;\n            }\n\n            .controls {\n                flex-direction: column;\n            }\n\n            .button {\n                width: 100%;\n                justify-content: center;\n            }\n        }\n\n        .spinner {\n            display: inline-block;\n            width: 14px;\n            height: 14px;\n            border: 2px solid rgba(0, 0, 0, 0.1);\n            border-radius: 50%;\n            border-top-color: #667eea;\n            animation: spin 0.8s linear infinite;\n        }\n\n        @keyframes spin {\n            to {\n                transform: rotate(360deg);\n            }\n        }\n\n        .loading {\n            display: flex;\n            align-items: center;\n            gap: 8px;\n            font-size: 0.9rem;\n            color: #667eea;\n        }\n\n        .session-info {\n            text-align: center;\n            color: white;\n            margin-top: 20px;\n            font-size: 0.9rem;\n            opacity: 0.8;\n        }\n    </style>\n</head>\n\n<body>\n    <div class=\"container\">\n        <div class=\"header\">\n            <h1>🎙️ NexaAI Live Translator</h1>\n            <p>Real-time speech recognition and translation</p>\n        </div>\n\n        <div class=\"translator-box\">\n            <!-- Source Language Panel -->\n            <div class=\"panel\">\n                <div class=\"panel-header\">\n                    <span class=\"panel-title\">Original</span>\n                </div>\n                <div id=\"originalText\" class=\"text-display\"></div>\n                <div id=\"originalStatus\" class=\"status\"></div>\n            </div>\n\n            <!-- Target Language Panel -->\n            <div class=\"panel\">\n                <div class=\"panel-header\">\n                    <span class=\"panel-title\">Translation</span>\n                    <select id=\"targetLanguage\" class=\"language-select\"></select>\n                </div>\n                <div id=\"translatedText\" class=\"text-display\"></div>\n                <div id=\"translatedStatus\" class=\"status\"></div>\n            </div>\n        </div>\n\n        <!-- Control Panel -->\n        <div class=\"controls\">\n            <button id=\"startBtn\" class=\"button button-primary\" onclick=\"startRecording()\">\n                <span class=\"mic-icon\">🎤</span>\n                <span>Start Recording</span>\n            </button>\n            <button id=\"stopBtn\" class=\"button button-primary\" style=\"display: none; background: #ff3b30;\"\n                onclick=\"stopRecording()\">\n                <span class=\"recording-indicator\"></span>\n                <span>Stop Recording</span>\n            </button>\n            <button id=\"clearBtn\" class=\"button button-secondary\" onclick=\"clearText()\">\n                <span>🗑️</span>\n                <span>Clear</span>\n            </button>\n        </div>\n\n        <div class=\"session-info\" id=\"sessionInfo\"></div>\n    </div>\n\n    <script>\n\n        const supportedLanguages = [\n            { value: 'Chinese', label: '🇨🇳 Chinese' },\n            { value: 'English', label: '🇬🇧 English' },\n            { value: 'French', label: '🇫🇷 French' },\n            { value: 'German', label: '🇩🇪 German' },\n            { value: 'Spanish', label: '🇪🇸 Spanish' },\n            { value: 'Italian', label: '🇮🇹 Italian' },\n            { value: 'Portuguese', label: '🇵🇹 Portuguese' },\n            { value: 'Russian', label: '🇷🇺 Russian' },\n            { value: 'Dutch', label: '🇳🇱 Dutch' },\n            { value: 'Swedish', label: '🇸🇪 Swedish' },\n            { value: 'Finnish', label: '🇫🇮 Finnish' },\n            { value: 'Danish', label: '🇩🇰 Danish' },\n            { value: 'Norwegian', label: '🇳🇴 Norwegian' },\n            { value: 'Polish', label: '🇵🇱 Polish' },\n            { value: 'Czech', label: '🇨🇿 Czech' },\n            { value: 'Turkish', label: '🇹🇷 Turkish' },\n            { value: 'Greek', label: '🇬🇷 Greek' },\n            { value: 'Hungarian', label: '🇭🇺 Hungarian' },\n            { value: 'Romanian', label: '🇷🇴 Romanian' },\n            { value: 'Bulgarian', label: '🇧🇬 Bulgarian' },\n            { value: 'Slovak', label: '🇸🇰 Slovak' },\n            { value: 'Slovenian', label: '🇸🇮 Slovenian' },\n            { value: 'Croatian', label: '🇭🇷 Croatian' },\n            { value: 'Lithuanian', label: '🇱🇹 Lithuanian' },\n            { value: 'Latvian', label: '🇱🇻 Latvian' },\n            { value: 'Estonian', label: '🇪🇪 Estonian' },\n        ];\n\n\n        const state = {\n            isRecording: false,\n            mediaStream: null,\n            audioContext: null,\n            scriptProcessor: null,\n            sourceNode: null,\n            targetLanguage: 'Chinese',\n            currentSegment: [],\n            transcriptionBuffer: [],\n            socket: null,\n            workletNode: null,\n        };\n\n\n        const elements = {\n            originalText: document.getElementById('originalText'),\n            translatedText: document.getElementById('translatedText'),\n            originalStatus: document.getElementById('originalStatus'),\n            translatedStatus: document.getElementById('translatedStatus'),\n            targetLanguage: document.getElementById('targetLanguage'),\n            startBtn: document.getElementById('startBtn'),\n            stopBtn: document.getElementById('stopBtn'),\n            clearBtn: document.getElementById('clearBtn'),\n            sessionInfo: document.getElementById('sessionInfo'),\n        };\n\n\n        function initializeSocket() {\n            logger.info('Initializing Socket.IO connection...');\n\n            try {\n                state.socket = io();\n                setupSocketListeners();\n                logger.info('Socket.IO instance created');\n            } catch (error) {\n                logger.error('Failed to create Socket.IO instance:', error);\n                elements.sessionInfo.textContent = '⚠ Socket.IO initialization failed';\n            }\n        }\n\n        function setupSocketListeners() {\n            if (!state.socket) {\n                logger.error('Socket not available');\n                return;\n            }\n\n            state.socket.on('connect', () => {\n                logger.info('✓ WebSocket connected');\n                elements.sessionInfo.textContent = '✓ Connected (WebSocket mode)';\n            });\n\n            state.socket.on('disconnect', () => {\n                logger.warn('⚠ WebSocket disconnected');\n                elements.sessionInfo.textContent = '⚠ Disconnected';\n            });\n\n            state.socket.on('stream_started', (data) => {\n                logger.info('Stream started:', data);\n                updateStatus('originalStatus', 'Listening for speech...');\n            });\n\n            state.socket.on('transcription', (data) => {\n                logger.info('Transcription received:', data);\n                const text = data.original;\n                elements.originalText.textContent = text;\n                updateStatus('originalStatus', 'Transcribed ✓');\n            });\n\n            state.socket.on('translation', (data) => {\n                logger.info('Translation received:', data);\n                const text = data.translated;\n                elements.translatedText.textContent = text;\n                updateStatus('translatedStatus', 'Translated ✓');\n            });\n\n            state.socket.on('error', (data) => {\n                logger.error('Server error:', data);\n                updateStatus('translatedStatus', `Error: ${data.message}`);\n            });\n\n            state.socket.on('stream_stopped', () => {\n                logger.info('Stream stopped on server');\n                updateStatus('originalStatus', 'Recording stopped');\n            });\n        }\n\n\n\n        function populateTargetLanguageSelect() {\n            elements.targetLanguage.innerHTML = '';\n            supportedLanguages.forEach(lang => {\n                const option = document.createElement('option');\n                option.value = lang.value;\n                option.textContent = lang.label;\n                elements.targetLanguage.appendChild(option);\n            });\n            elements.targetLanguage.value = state.targetLanguage;\n        }\n\n        elements.targetLanguage.addEventListener('change', (e) => {\n            state.targetLanguage = e.target.value;\n            elements.translatedText.textContent = '';\n            updateStatus('originalStatus', '');\n            updateStatus('translatedStatus', '');\n        });\n\n        function updateStatus(elementId, message) {\n            const element = document.getElementById(elementId);\n            if (message) {\n                element.innerHTML = message;\n                element.className = 'status';\n                if (message.includes('Transcribing')) {\n                    element.classList.add('transcribing');\n                } else if (message.includes('Translating')) {\n                    element.classList.add('translating');\n                } else if (message.includes('Error')) {\n                    element.classList.add('error');\n                }\n            } else {\n                element.innerHTML = '';\n                element.className = 'status';\n            }\n        }\n\n        async function startRecording() {\n            try {\n                logger.info('=== START RECORDING ===');\n                logger.info(`Target language: ${state.targetLanguage}`);\n                logger.info(`Socket connected: ${state.socket && state.socket.connected}`);\n\n                updateStatus('originalStatus', 'Requesting microphone access...');\n\n\n                logger.info('Requesting microphone access...');\n                state.mediaStream = await navigator.mediaDevices.getUserMedia({\n                    audio: {\n                        echoCancellation: true,\n                        noiseSuppression: true,\n                        autoGainControl: true,\n                        sampleRate: 16000,\n                    },\n                });\n                logger.info('✓ Microphone access granted');\n\n\n                if (!state.socket || !state.socket.connected) {\n                    logger.error('Socket not connected!');\n                    updateStatus('originalStatus', 'Socket not connected. Reload page.');\n                    return;\n                }\n\n\n                logger.info(`Emitting start_stream with target_lang: ${state.targetLanguage}`);\n                state.socket.emit('start_stream', { target_lang: state.targetLanguage });\n\n\n                await new Promise(resolve => setTimeout(resolve, 300));\n\n\n                state.audioContext = new (window.AudioContext || window.webkitAudioContext)({ sampleRate: 16000 });\n                state.sourceNode = state.audioContext.createMediaStreamSource(state.mediaStream);\n\n\n                const resampleTo16k = (input, inputSampleRate) => {\n                    if (inputSampleRate === 16000) return input;\n                    const ratio = inputSampleRate / 16000;\n                    const newLength = Math.floor(input.length / ratio);\n                    const output = new Float32Array(newLength);\n                    for (let i = 0; i < newLength; i++) {\n                        const srcPos = i * ratio;\n                        const srcIdx = Math.floor(srcPos);\n                        const srcFrac = srcPos - srcIdx;\n                        const s0 = input[srcIdx] || 0;\n                        const s1 = input[srcIdx + 1] || 0;\n                        output[i] = s0 + (s1 - s0) * srcFrac;\n                    }\n                    return output;\n                };\n\n                const sendPcm16 = (float32Samples) => {\n                    if (!state.socket || !state.socket.connected) return;\n                    const pcm16k = resampleTo16k(float32Samples, state.audioContext.sampleRate);\n                    const int16 = new Int16Array(pcm16k.length);\n                    for (let i = 0; i < pcm16k.length; i++) {\n                        const s = Math.max(-1, Math.min(1, pcm16k[i]));\n                        int16[i] = s < 0 ? s * 0x8000 : s * 0x7FFF;\n                    }\n                    const buf = int16.buffer;\n                    logger.debug(`Emitting audio_chunk PCM: ${buf.byteLength} bytes (samples: ${int16.length})`);\n                    state.socket.emit('audio_chunk', buf);\n                };\n\n\n                if (state.audioContext.audioWorklet) {\n                    const workletCode = `\n                    class PCMProcessor extends AudioWorkletProcessor {\n                        constructor() {\n                            super();\n                            this.buffer = [];\n                            this.bufferSize = 1024;\n                        }\n                        \n                        process(inputs) {\n                            const input = inputs[0];\n                            if (!input || input.length === 0) return true;\n                            const channel = input[0];\n                            if (!channel || channel.length === 0) return true;\n                            \n                           \n                            this.buffer.push(...channel);\n                            \n                           \n                            if (this.buffer.length >= this.bufferSize) {\n                                const chunk = new Float32Array(this.buffer.slice(0, this.bufferSize));\n                                this.port.postMessage(chunk);\n                                this.buffer = this.buffer.slice(this.bufferSize);\n                            }\n                            \n                            return true;\n                        }\n                    }\n                    registerProcessor('pcm-processor', PCMProcessor);\n                    `;\n\n                    const blob = new Blob([workletCode], { type: 'application/javascript' });\n                    const url = URL.createObjectURL(blob);\n                    await state.audioContext.audioWorklet.addModule(url);\n\n                    state.workletNode = new AudioWorkletNode(state.audioContext, 'pcm-processor');\n                    state.workletNode.port.onmessage = (event) => {\n                        const samples = event.data;\n                        if (samples && samples.length) {\n                            sendPcm16(samples);\n                        }\n                    };\n\n                    state.sourceNode.connect(state.workletNode);\n                    state.workletNode.connect(state.audioContext.destination);\n                    logger.info('AudioContext + AudioWorklet started (PCM 16k, 1024-sample chunks)');\n                } else {\n                    const bufferSize = 4096;\n                    state.scriptProcessor = state.audioContext.createScriptProcessor(bufferSize, 1, 1);\n                    state.scriptProcessor.onaudioprocess = (event) => {\n                        const input = event.inputBuffer.getChannelData(0);\n                        sendPcm16(input);\n                    };\n                    state.sourceNode.connect(state.scriptProcessor);\n                    state.scriptProcessor.connect(state.audioContext.destination);\n                    logger.info('AudioContext + ScriptProcessor started (M 16k)');\n                }\n\n\n                state.isRecording = true;\n                elements.startBtn.style.display = 'none';\n                elements.stopBtn.style.display = 'flex';\n                elements.originalText.textContent = '';\n                elements.translatedText.textContent = '';\n                updateStatus('originalStatus', 'Recording... Listening for speech');\n                updateStatus('translatedStatus', '');\n                logger.info('✓ Recording started');\n\n            } catch (error) {\n                logger.error('Microphone access error:', error);\n                updateStatus('originalStatus', `Error: ${error.message}`);\n            }\n        }\n\n        function stopRecording() {\n            logger.info('=== STOP RECORDING ===');\n\n\n            try {\n                if (state.scriptProcessor) {\n                    state.scriptProcessor.disconnect();\n                    state.scriptProcessor.onaudioprocess = null;\n                }\n                if (state.workletNode) {\n                    state.workletNode.disconnect();\n                    state.workletNode.port.onmessage = null;\n                    state.workletNode = null;\n                }\n                if (state.sourceNode) {\n                    state.sourceNode.disconnect();\n                }\n                if (state.audioContext) {\n                    state.audioContext.close();\n                }\n            } catch (err) {\n                logger.error('Error stopping audio graph', err);\n            }\n\n            if (state.mediaStream) {\n                logger.info('Stopping media stream...');\n                state.mediaStream.getTracks().forEach(track => track.stop());\n            }\n\n\n            if (state.socket && state.socket.connected) {\n                logger.info('Emitting stop_stream event...');\n                state.socket.emit('stop_stream');\n            }\n\n            state.isRecording = false;\n            elements.startBtn.style.display = 'flex';\n            elements.stopBtn.style.display = 'none';\n            updateStatus('originalStatus', 'Recording stopped');\n            updateStatus('translatedStatus', '');\n            logger.info('✓ Recording stopped');\n        }\n\n        async function processAudioChunk(audioData) {\n            if (!state.isRecording) return;\n\n            const int16Data = new Int16Array(audioData.length);\n            for (let i = 0; i < audioData.length; i++) {\n                int16Data[i] = audioData[i] < 0\n                    ? audioData[i] * 0x8000\n                    : audioData[i] * 0x7FFF;\n            }\n\n            if (state.socket && state.socket.connected) {\n                state.socket.emit('audio_chunk', int16Data.buffer);\n            }\n        }\n\n        function clearText() {\n            elements.originalText.textContent = '';\n            elements.translatedText.textContent = '';\n            updateStatus('originalStatus', '');\n            updateStatus('translatedStatus', '');\n        }\n\n\n        document.addEventListener('DOMContentLoaded', () => {\n            populateTargetLanguageSelect();\n            initializeSocket();\n        });\n\n\n        const logger = {\n            info: (msg) => {\n                const ts = new Date().toLocaleTimeString();\n                console.log(`[${ts}] [INFO] ${msg}`);\n            },\n            error: (msg, err) => {\n                const ts = new Date().toLocaleTimeString();\n                if (err) {\n                    console.error(`[${ts}] [ERROR] ${msg}`, err);\n                } else {\n                    console.error(`[${ts}] [ERROR] ${msg}`);\n                }\n            },\n            warn: (msg) => {\n                const ts = new Date().toLocaleTimeString();\n                console.warn(`[${ts}] [WARN] ${msg}`);\n            },\n            debug: (msg) => {\n                const ts = new Date().toLocaleTimeString();\n                console.log(`[${ts}] [DEBUG] ${msg}`);\n            },\n        };\n    </script>\n</body>\n\n</html>"
  },
  {
    "path": "cookbook/PC/live-translate/requirements.txt",
    "content": "nexaai>=v1.0.44-rc1\nFlask>=2.3.0\nflask-cors>=4.0.0\nflask-socketio>=5.3.0\npython-socketio>=5.9.0\nnumpy>=1.24.0\njsonify>=0.5\n"
  },
  {
    "path": "cookbook/README.md",
    "content": "# Nexa SDK Cookbook\n\nThis repository contains comprehensive demos and examples for Nexa SDK across different platforms: **PC (Python)**, **Android**, and **Linux**.\n\n---\n\n## 🖥️ PC Demos (Python Bindings)\n\nAll PC demos are located in the [`PC/`](./PC) directory and run on **Windows (x64/ARM64 Snapdragon)**, **macOS**, and **Linux**.\n\n### 🤖 Agent-Granite\n\nLightweight on-device AI assistant with function calling (web search) using Granite-4-Micro model. Includes Gradio interface for local agentic workflows.\n\n- [Python-Binding-Example](./PC/Agent-Granite/Python-Binding-Example)\n- [Serve-Example](./PC/Agent-Granite/Serve-Example)\n\n### 🔧 Function-Calling\n\nFunction calling capabilities with NexaAI VLM model, integrated with Google Calendar via MCP protocol. Supports multi-modal input (text, image, audio) with Web UI and CLI interfaces.\n\n- [Demo](./PC/function-calling)\n\n### 📚 RAG-LLM\n\nEnd-to-end Retrieval-Augmented Generation pipeline with embeddings, reranking, and generation models. Query your own documents (PDFs, Word, text) locally on device.\n\n- [Python-Binding-Example](./PC/RAG-LLM/Python-Binding-Example)\n- [Serve-Example](./PC/RAG-LLM/Serve-Example)\n\n### 🖼️ Multimodal-Qwen3VL\n\nVision-Language Model (VLM) with structured JSON outputs, multi-image input, and custom system prompt control.\n\n- [Python-Binding-Example](./PC/Multimodal-Qwen3VL/Python-Binding-Example)\n\n### 🔍 RAG-VLM\n\nLightweight RAG system with Qwen3VL multimodal model powered by Nexa Serve. Supports PDFs, Word docs, text files, and images. Includes CLI and Gradio UI.\n\n- [Demo](./PC/RAG-VLM)\n\n### 🌐 Web-Agent-Qwen3VL\n\nLocal multimodal LLM-driven browser automation using Qwen3-VL. Enables autonomous web navigation, searches, and complex web tasks.\n\n- [Demo](./PC/Web-Agent-Qwen3VL)\n\n---\n\n## 📱 Android Demos\n\nFor Android SDK demos and examples, please refer to [`android/`](./android).\n\n---\n\n## 🐧 Linux Demos\n\nLinux-specific demos coming soon in the [`linux/`](./linux) directory."
  },
  {
    "path": "cookbook/README_zh.md",
    "content": "# Nexa SDK 使用指南\n\n本仓库包含 Nexa SDK 在不同平台的完整演示和示例：**PC (Python)**、**Android** 和 **Linux**。\n\n---\n\n## 📁 目录结构\n\n- **`PC/`** - 适用于 Windows、macOS 和 Linux 的 Python 绑定演示\n- **`android/`** - Android 平台专属演示（即将推出，Android SDK 请参考 [bindings/android](../bindings/android)）\n- **`linux/`** - Linux 专属演示（即将推出）\n\n---\n\n## 🖥️ PC 演示（Python 绑定）\n\n所有 PC 演示位于 [`PC/`](./PC) 目录，支持 **Windows (x64/ARM64 Snapdragon)**、**macOS** 和 **Linux**。\n\n### 🤖 Agent-Granite\n\n轻量级本地 AI 助手，支持函数调用（网页搜索），基于 Granite-4-Micro 模型。包含 Gradio 界面，可实现本地 Agent 流程。\n\n- [Python绑定示例](./PC/Agent-Granite/Python-Binding-Example)\n- [服务示例](./PC/Agent-Granite/Serve-Example)\n\n### 🔧 函数调用\n\n使用 NexaAI VLM 模型实现函数调用能力，并通过 MCP 协议集成 Google 日历。支持多模态输入（文本、图片、音频），包含 Web UI 和 CLI 界面。\n\n- [演示](./PC/function-calling)\n\n### 📚 RAG-LLM\n\n端到端的检索增强生成（RAG）流程，集成嵌入、重排序与生成模型。可在本地查询 PDF、Word、文本等文档。\n\n- [Python绑定示例](./PC/RAG-LLM/Python-Binding-Example)\n- [服务示例](./PC/RAG-LLM/Serve-Example)\n\n### 🖼️ 多模态-Qwen3VL\n\n视觉语言模型（VLM），支持结构化 JSON 输出、多图片输入及自定义系统提示。\n\n- [Python绑定示例](./PC/Multimodal-Qwen3VL/Python-Binding-Example)\n\n### 🔍 RAG-VLM\n\n采用 Qwen3VL 多模态模型的轻量级 RAG 系统，由 Nexa Serve 驱动。支持 PDF、Word、文本、图片。带有 CLI 和 Gradio UI。\n\n- [演示](./PC/RAG-VLM)\n\n### 🌐 Web-Agent-Qwen3VL\n\n本地多模态 LLM 驱动的网页自动化，基于 Qwen3-VL。支持自主网页导航、搜索及复杂网络任务。\n\n- [演示](./PC/Web-Agent-Qwen3VL)\n\n---\n\n## 📱 Android 演示\n\nAndroid SDK 演示和示例请参考 [`bindings/android`](../bindings/android)。\n\n---\n\n## 🐧 Linux 演示\n\nLinux 专属演示即将在 [`linux/`](./linux) 目录推出。\n\n---\n\n## 🔒 隐私优先\n\n**所有演示均在本地运行** — 数据不离开你的设备。\n\n"
  },
  {
    "path": "cookbook/ag2/README.md",
    "content": "# AG2 + Nexa SDK Examples\r\n\r\nPractical examples of integrating Nexa SDK with AG2 (formerly AutoGen).\r\n\r\n\r\n## Prerequisites\r\n- Python 3.10+\r\n- [Nexa SDK installed](../../README.md#installation)\r\n\r\n## Quick Start\r\n\r\nSimple agent creation and multi-agent conversation with Nexa SDK.\r\n1. Run nexa serve in separate terminal.\r\n```bash\r\nnexa pull NexaAI/Qwen3-4B-GGUF\r\nnexa serve\r\n```\r\n2. Install dependencies.\r\n```\r\npip install -r requirements.txt\r\n```\r\n3. Run the example script.\r\n\r\n```bash\r\npython example.py\r\n```\r\n"
  },
  {
    "path": "cookbook/ag2/example.py",
    "content": "#!/usr/bin/env python3\r\n\"\"\"\r\nBasic agent example with Nexa SDK and AG2.\r\n\r\nDemonstrates:\r\n- Configuring AG2 with Nexa SDK's OpenAI-compatible endpoint\r\n- Creating a single conversable agent\r\n- Running a two-agent conversation\r\n\"\"\"\r\n\r\nfrom autogen import ConversableAgent, LLMConfig\r\n\r\n\r\ndef create_llm_config():\r\n    \"\"\"Create LLM config pointing to Nexa's OpenAI-compatible endpoint.\"\"\"\r\n    return LLMConfig({\r\n        \"model\": \"NexaAI/Qwen3-4B-GGUF\",\r\n        \"base_url\": \"http://localhost:18181/v1\",\r\n        \"api_type\": \"openai\",\r\n        \"api_key\": \"not-needed\",\r\n    })\r\n\r\n\r\ndef single_agent_example():\r\n    \"\"\"Example of a single conversable agent.\"\"\"\r\n    print(\"=\" * 50)\r\n    print(\"Single Agent Example\")\r\n    print(\"=\" * 50)\r\n\r\n    llm_config = create_llm_config()\r\n\r\n    agent = ConversableAgent(\r\n        name=\"helpful_agent\",\r\n        system_message=\"You are a helpful AI assistant that gives concise answers.\",\r\n        llm_config=llm_config,\r\n    )\r\n\r\n    print(\"\\nRunning agent...\")\r\n    response = agent.run(\r\n        message=\"Write a Python function to calculate the factorial of a number.\",\r\n        max_turns=3,\r\n    )\r\n    response.process()\r\n\r\n    for msg in response.messages:\r\n        print(f\"\\n[{msg.get('role', 'unknown')}]: {msg.get('content', '')}\")\r\n\r\n\r\ndef two_agent_example():\r\n    \"\"\"Example of a two-agent conversation.\"\"\"\r\n    print(\"\\n\" + \"=\" * 50)\r\n    print(\"Two-Agent Conversation Example\")\r\n    print(\"=\" * 50)\r\n\r\n    llm_config = create_llm_config()\r\n\r\n    # Create a coding assistant\r\n    coder = ConversableAgent(\r\n        name=\"coder\",\r\n        system_message=(\r\n            \"You are a Python developer. Write clean, well-documented code. \"\r\n            \"Reply TERMINATE when the task is complete.\"\r\n        ),\r\n        llm_config=llm_config,\r\n    )\r\n\r\n    # Create a code reviewer\r\n    reviewer = ConversableAgent(\r\n        name=\"reviewer\",\r\n        system_message=(\r\n            \"You are a code reviewer. Review the code for correctness, style, \"\r\n            \"and best practices. Reply TERMINATE when the review is done.\"\r\n        ),\r\n        llm_config=llm_config,\r\n    )\r\n\r\n    print(\"\\nStarting two-agent conversation...\")\r\n    result = coder.initiate_chat(\r\n        recipient=reviewer,\r\n        message=\"Write a Python function to check if a string is a palindrome.\",\r\n        max_turns=3,\r\n    )\r\n\r\n    print(f\"\\nConversation summary:\\n{result.summary}\")\r\n\r\n\r\ndef main():\r\n    \"\"\"Run all agent examples.\"\"\"\r\n    print(\"\\n\" + \"=\" * 50)\r\n    print(\"AG2 + Nexa SDK Basic Agent Examples\")\r\n    print(\"=\" * 50 + \"\\n\")\r\n\r\n    single_agent_example()\r\n    two_agent_example()\r\n\r\n    print(\"\\n\" + \"=\" * 50)\r\n    print(\"All examples completed!\")\r\n    print(\"=\" * 50)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    main()\r\n"
  },
  {
    "path": "cookbook/ag2/requirements.txt",
    "content": "ag2[openai]>=0.8.0\r\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/.gitignore",
    "content": "# Gradle files\n.gradle/\nbuild/\narm64-v8a/\n.DS_Store\n# Local configuration file (sdk path, etc)\nlocal.properties\n\n# Log/OS Files\n*.log\n\n# Android Studio generated files and folders\ncaptures/\n.externalNativeBuild/\n.cxx/\n*.aab\n*.apk\noutput-metadata.json\n\n# IntelliJ\n*.iml\n.idea/\nmisc.xml\ndeploymentTargetDropDown.xml\nrender.experimental.xml\n\n# Keystore files\n*.jks\n*.keystore\n\n# Google Services (e.g. APIs or Firebase)\ngoogle-services.json\n\n# Android Profiling\n*.hprof\napp/libs/app-release.aar\napp/libs/app-debug.aar\napp/release/\nrepo/"
  },
  {
    "path": "cookbook/android/RAG-LLM/README.md",
    "content": "# Nexa Android SDK Demo App \n\n## Overview\n\nThe Nexa AI Android SDK enables on-device AI inference for Android applications with NPU acceleration. Run Large Language Models (LLMs), Vision-Language Models (VLMs), Embeddings, Speech Recognition (ASR), Reranking, and Computer Vision models on Android devices with support for NPU, GPU, and CPU inference. Follow [Android SDK Doc](https://docs.nexa.ai/en/nexa-sdk-android/overview) for more details. This folder contains the demo app for the Android SDK.\n\n## Device Compatibility\n\n### Supported Hardware\n\n- **NPU**: Qualcomm Snapdragon 8 Gen 4 (optimized)\n- **GPU**: Qualcomm Adreno GPU\n- **CPU**: ARM64-v8a\n- **RAM**: 4GB+ recommended\n- **Storage**: 100MB - 4GB (varies by model)\n\n### Minimum Requirements\n\n- Android API Level 27+ (Android 8.1 Oreo)\n- **Architecture**: ARM64-v8a\n- **Android SDK Version**: 27+\n\n## Build and Run\n\n1. Clone the repository\n\n```bash\ngit clone https://github.com/NexaAI/nexa-sdk/\n```\n\n2. Open this folder `bindings/android` in Android Studio\n\n3. Follow the instructions in [Android SDK Doc](https://docs.nexa.ai/en/nexa-sdk-android/overview), download model (For example, [`OmniNeural-4B`](https://huggingface.co/NexaAI/OmniNeural-4B)) and put it in App's assets folder (For example, `/data/data/com.nexa.demo/files/models/omni-neural-4b `).\n\n4. Build and run the app"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/.gitignore",
    "content": "/build\n/src/main/assets/model_list_backup.json\n/src/main/assets/model_list_local.json"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/build.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\nplugins {\n    alias(libs.plugins.android.application)\n    alias(libs.plugins.kotlin.android)\n    alias(libs.plugins.kotlin.compose)\n    id(\"org.jetbrains.kotlin.plugin.serialization\") version \"1.9.23\"\n}\n\nandroid {\n    namespace = \"com.nexa.demo\"\n    compileSdk = 36\n\n    signingConfigs {\n        create(\"release\") {\n            storeFile = file(\"test\")\n            storePassword = \"123456\"\n            keyAlias = \"test\"\n            keyPassword = \"123456\"\n        }\n    }\n\n    defaultConfig {\n        applicationId = \"com.nexa.demo\"\n        minSdk = 27\n        targetSdk = 36\n        versionCode = 1\n        versionName = \"1.0\"\n\n        testInstrumentationRunner = \"androidx.test.runner.AndroidJUnitRunner\"\n    }\n\n    buildTypes {\n        release {\n            isMinifyEnabled = false\n            applicationIdSuffix = \".rag\"\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n            signingConfig = signingConfigs.getByName(\"release\")\n        }\n\n        debug {\n            isMinifyEnabled = false\n            applicationIdSuffix = \".rag\"\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n            signingConfig = signingConfigs.getByName(\"release\")\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_11\n        targetCompatibility = JavaVersion.VERSION_11\n    }\n    kotlinOptions {\n        jvmTarget = \"11\"\n    }\n//    sourceSets {\n//        getByName(\"main\") {\n//            jniLibs.srcDirs(\"src/main/jniLibs\")\n//        }\n//    }\n    packagingOptions {\n        jniLibs.useLegacyPackaging = true\n    }\n\n    buildFeatures {\n        viewBinding = true\n        dataBinding = true\n        compose = true\n        buildConfig = true\n    }\n}\n\nval bridgePathExist = gradle.extra[\"bridgePathExist\"] as Boolean\nprint(\"bridgePathExist: $bridgePathExist\\n\")\n\ndependencies {\n\n    // ===== NEXA CLOUD SDK =====\n    implementation(\"ai.nexa:core:0.0.22\")\n    // ===== NEXA CLOUD SDK END =====\n    implementation(project(\":transform\"))\n    implementation(\":okdownload-core@aar\")\n    implementation(\":okdownload-sqlite@aar\")\n    implementation(\":okdownload-okhttp@aar\")\n    implementation(\":okdownload-ktx@aar\")\n    implementation(kotlin(\"reflect\"))\n    implementation(libs.glide)\n    implementation(libs.gson)\n    implementation(libs.markwon.core)\n    implementation(libs.markwon.strikethrough)\n    implementation(libs.markwon.tables)\n    implementation(libs.markwon.linkify)\n    implementation(libs.recyclerview)\n    implementation(libs.toaster)\n    implementation(libs.material)\n    implementation(libs.imm.bar)\n    implementation(libs.imm.bar.ktx)\n    implementation(libs.auto.size)\n    implementation(libs.okhttp)\n    implementation(libs.kotlinx.serialization.json)\n    implementation(libs.androidx.core.ktx)\n    implementation(libs.androidx.lifecycle.runtime.ktx)\n    implementation(libs.androidx.activity.compose)\n    implementation(platform(libs.androidx.compose.bom))\n    implementation(libs.androidx.ui)\n    implementation(libs.androidx.ui.graphics)\n    implementation(libs.androidx.ui.tooling.preview)\n    implementation(libs.androidx.material3)\n    implementation(libs.androidx.appcompat)\n    implementation(libs.androidx.activity)\n    implementation(libs.androidx.constraintlayout)\n    testImplementation(libs.junit)\n    androidTestImplementation(libs.androidx.junit)\n    androidTestImplementation(libs.androidx.espresso.core)\n    androidTestImplementation(platform(libs.androidx.compose.bom))\n    androidTestImplementation(libs.androidx.ui.test.junit4)\n    debugImplementation(libs.androidx.ui.tooling)\n    debugImplementation(libs.androidx.ui.test.manifest)\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/proguard-rules.pro",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/androidTest/java/com/nexa/demo/ExampleInstrumentedTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getInstrumentation().targetContext\n        assertEquals(\"com.nexa.demo\", appContext.packageName)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <uses-permission android:name=\"android.permission.INTERNET\" />\n    <uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.READ_EXTERNAL_STORAGE\" />\n    <uses-permission android:name=\"android.permission.RECORD_AUDIO\" />\n    <uses-permission android:name=\"android.permission.CAMERA\" />\n    <uses-permission android:name=\"android.permission.MANAGE_EXTERNAL_STORAGE\" />\n\n    <application\n        android:name=\".MyApplication\"\n        android:allowBackup=\"true\"\n        android:dataExtractionRules=\"@xml/data_extraction_rules\"\n        android:extractNativeLibs=\"true\"\n        android:fullBackupContent=\"@xml/backup_rules\"\n        android:icon=\"@mipmap/ic_launcher\"\n        android:label=\"@string/app_name\"\n        android:roundIcon=\"@mipmap/ic_launcher_round\"\n        android:supportsRtl=\"true\"\n        android:theme=\"@style/Theme.MaterialComponents.Light.NoActionBar\">\n        <activity\n            android:name=\".activity.FileContentActivity\"\n            android:exported=\"false\" />\n        <activity\n            android:name=\".activity.FolderActivity\"\n            android:exported=\"false\" />\n\n        <meta-data\n            android:name=\"design_width_in_dp\"\n            android:value=\"360\" />\n        <meta-data\n            android:name=\"design_height_in_dp\"\n            android:value=\"724\" />\n\n        <activity\n            android:name=\".MainActivity\"\n            android:exported=\"true\"\n            android:windowSoftInputMode=\"adjustResize\">\n            <intent-filter>\n                <action android:name=\"android.intent.action.MAIN\" />\n\n                <category android:name=\"android.intent.category.LAUNCHER\" />\n            </intent-filter>\n        </activity>\n\n        <provider\n            android:name=\"androidx.core.content.FileProvider\"\n            android:authorities=\"${applicationId}.fileprovider\"\n            android:exported=\"false\"\n            android:grantUriPermissions=\"true\">\n            <meta-data\n                android:name=\"android.support.FILE_PROVIDER_PATHS\"\n                android:resource=\"@xml/file_paths\" />\n        </provider>\n    </application>\n\n</manifest>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/assets/model_list.json",
    "content": "[\n  {\n    \"id\": \"Llama3.2-3B-NPU-Turbo-NPU-mobile\",\n    \"displayName\": \"Llama3.2-3B\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"pluginIds\": 273,\n    \"dependencies\": [\"Llama-3.2-3B-Instruct-Q4_0\"],\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Llama3.2-3B-NPU-Turbo-NPU-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"Llama-3.2-3B-Instruct-Q4_0\",\n    \"displayName\": \"Llama3.2-3B Q40 GGUF\",\n    \"modelName\": \"Llama-3.2-3B-Instruct-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"show\": false,\n    \"dependencies\": [\"embeddinggemma-300m-npu-mobile\"],\n    \"modelUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Llama-3.2-3B-Instruct-GGUF/Llama-3.2-3B-Instruct-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Qwen3-4B-Instruct-2507-npu\",\n    \"displayName\": \"Qwen3-4B\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"pluginIds\": 273,\n    \"dependencies\": [\"Qwen3-4B-Q4_0\"],\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Qwen3-4B-Instruct-2507-npu-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"Qwen3-4B-Q4_0\",\n    \"displayName\": \"Qwen3-4B Q40 GGUF\",\n    \"modelName\": \"Qwen3-4B-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"show\": false,\n    \"dependencies\": [\"embeddinggemma-300m-npu-mobile\"],\n    \"modelUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Qwen3-4B-GGUF/Qwen3-4B-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Granite-4-Micro-NPU-mobile\",\n    \"displayName\": \"Granite4-Micro(3B)\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"pluginIds\": 273,\n    \"dependencies\": [\"granite-4.0-micro-Q4_0\"],\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Granite-4-Micro-NPU-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"granite-4.0-micro-Q4_0\",\n    \"displayName\": \"Granite4-Micro(3B) Q40 GGUF\",\n    \"modelName\": \"granite-4.0-micro-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"show\": false,\n    \"dependencies\": [\"embeddinggemma-300m-npu-mobile\"],\n    \"modelUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/granite-4.0-micro-GGUF/granite-4.0-micro-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"Granite-4.0-h-350M-NPU-mobile\",\n    \"displayName\": \"Granite4-350M\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"pluginIds\": 273,\n    \"dependencies\": [\"granite-4.0-350m-Q4_0\"],\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/Granite-4.0-h-350M-NPU-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"granite-4.0-350m-Q4_0\",\n    \"displayName\": \"Granite4-350M Q40 GGUF\",\n    \"modelName\": \"granite-4.0-350m-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"show\": false,\n    \"dependencies\": [\"embeddinggemma-300m-npu-mobile\"],\n    \"modelUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/granite-4.0-350m-GGUF/granite-4.0-350m-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"LFM2-1.2B-npu-mobile\",\n    \"displayName\": \"LFM2-1.2B\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"pluginIds\": 273,\n    \"dependencies\": [\"LFM2-1.2B-Q4_0\"],\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/LFM2-1.2B-npu-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  },\n  {\n    \"id\": \"LFM2-1.2B-Q4_0\",\n    \"displayName\": \"LFM2-1.2B Q40 GGUF\",\n    \"modelName\": \"LFM2-1.2B-Q4_0.gguf\",\n    \"type\": \"chat\",\n    \"versionCode\": 1,\n    \"pluginIds\": 17,\n    \"show\": false,\n    \"dependencies\": [\"embeddinggemma-300m-npu-mobile\"],\n    \"modelUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/LFM2-1.2B-GGUF/LFM2-1.2B-Q4_0.gguf\"\n  },\n  {\n    \"id\": \"embeddinggemma-300m-npu-mobile\",\n    \"displayName\": \"embed-gemma\",\n    \"modelName\": \"files-1-2.nexa\",\n    \"versionCode\": 1,\n    \"show\": false,\n    \"baseUrl\": \"https://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexa_sdk/huggingface-models/embeddinggemma-300m-npu-mobile/\",\n    \"modelUrl\": \"files-1-2.nexa\"\n  }\n]"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/ChatAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.content.Intent\nimport android.net.Uri\nimport android.text.TextUtils\nimport android.text.method.LinkMovementMethod\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport android.widget.Button\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.TextView\nimport androidx.recyclerview.widget.RecyclerView\nimport com.nexa.demo.activity.FileContentActivity\nimport com.nexa.demo.bean.EmbedResultBean\nimport io.noties.markwon.Markwon\nimport io.noties.markwon.ext.strikethrough.StrikethroughPlugin\nimport io.noties.markwon.ext.tables.TablePlugin\nimport io.noties.markwon.linkify.LinkifyPlugin\nimport java.io.File\n\n\ndata class Message(\n    val content: String,\n    val type: MessageType,\n    val images: List<File> = emptyList(),\n    val audio: List<File> = emptyList(),\n    val embedResultBean: EmbedResultBean? = null,  // Deprecated, keeping for compatibility\n    val retrievedChunks: List<EmbedResultBean> = emptyList(),  // Store multiple retrieved chunks\n    val formattedPrompt: String? = null  // Store the full LLM prompt\n)\n\nenum class MessageType(val value: Int) {\n    USER(0),\n    ASSISTANT(1),\n    PROFILE(2),\n    IMAGES(3);\n\n    companion object {\n        fun from(value: Int): MessageType =\n            entries.firstOrNull { it.value == value } ?: PROFILE\n    }\n}\n\ninterface OnCitationsClick {\n    fun onClick(position: Int, retrievedChunks: List<EmbedResultBean>)\n}\n\nclass ChatAdapter(private val messages: List<Message>, private val onCitationsClick: OnCitationsClick) :\n    RecyclerView.Adapter<RecyclerView.ViewHolder>() {\n\n    override fun getItemViewType(position: Int): Int {\n        val message = messages[position]\n        return message.type.value\n    }\n\n    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {\n        val inflater = LayoutInflater.from(parent.context)\n        val type = MessageType.from(viewType)\n        return if (type == MessageType.USER) {\n            UserViewHolder(inflater.inflate(R.layout.item_user_message, parent, false))\n        } else if (type == MessageType.ASSISTANT) {\n            AiViewHolder(inflater.inflate(R.layout.item_ai_message, parent, false))\n        } else if (type == MessageType.IMAGES) {\n            ImagesViewHolder(inflater.inflate(R.layout.item_image_message, parent, false))\n        } else {\n            ProfileViewHolder(inflater.inflate(R.layout.item_profile_message, parent, false))\n        }\n    }\n\n    override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {\n        val message = messages[position]\n        if (holder is UserViewHolder) holder.bind(message)\n        if (holder is AiViewHolder) holder.bind(message)\n        if (holder is ImagesViewHolder) holder.bind(message)\n        if (holder is ProfileViewHolder) holder.bind(position, message, onCitationsClick)\n    }\n\n    override fun getItemCount() = messages.size\n\n    class UserViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)\n        fun bind(message: Message) {\n            tvMessage.text = message.content\n        }\n    }\n\n    class AiViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)\n        private val markwon: Markwon = Markwon.builder(itemView.context)\n            .usePlugin(StrikethroughPlugin.create())\n            .usePlugin(TablePlugin.create(itemView.context))\n            .usePlugin(LinkifyPlugin.create())\n            .build()\n\n        fun bind(message: Message) {\n            markwon.setMarkdown(tvMessage, message.content)\n            tvMessage.movementMethod = LinkMovementMethod.getInstance()\n        }\n    }\n\n    class ProfileViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val tvMessage: TextView = itemView.findViewById(R.id.tv_message)\n        private val btnCitations: Button = itemView.findViewById(R.id.btn_citations)\n        private val btnViewPrompt: Button = itemView.findViewById(R.id.btn_view_prompt)\n        \n        fun bind(position: Int, message: Message, onCitationsClick: OnCitationsClick) {\n            tvMessage.text = message.content\n            \n            // Handle multiple citations\n            if (message.retrievedChunks.isNotEmpty()) {\n                btnCitations.text = \"${message.retrievedChunks.size} Citations\"\n                btnCitations.visibility = View.VISIBLE\n                btnCitations.setOnClickListener {\n                    onCitationsClick.onClick(position, message.retrievedChunks)\n                }\n            } else {\n                btnCitations.visibility = View.GONE\n            }\n            \n            // Handle view prompt button\n            if (!TextUtils.isEmpty(message.formattedPrompt)) {\n                btnViewPrompt.setOnClickListener {\n                    it.context.startActivity(\n                        Intent(\n                            it.context,\n                            FileContentActivity::class.java\n                        ).apply {\n                            this.putExtra(\n                                FileContentActivity.KEY_PROMPT_CONTENT,\n                                message.formattedPrompt\n                            )\n                        })\n                }\n                btnViewPrompt.visibility = View.VISIBLE\n            } else {\n                btnViewPrompt.visibility = View.GONE\n            }\n        }\n        \n        private fun dpToPx(dp: Int, context: android.content.Context): Int {\n            return (dp * context.resources.displayMetrics.density).toInt()\n        }\n    }\n\n    class ImagesViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {\n        private val imageContainer: LinearLayout = itemView.findViewById(R.id.image_container)\n        fun bind(message: Message) {\n            val savedImageFiles = message.images\n            imageContainer.removeAllViews()\n            val context = itemView.context\n\n            for (file in savedImageFiles) {\n                val itemView = LayoutInflater.from(context)\n                    .inflate(R.layout.item_image_item_message, imageContainer, false)\n                val ivImage = itemView.findViewById<ImageView>(R.id.iv_image)\n                ivImage.setImageURI(Uri.fromFile(file))\n                imageContainer.addView(itemView)\n            }\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/FileConfig.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.content.Context\nimport java.io.File\n\nclass FileConfig {\n    companion object {\n        val modelsDir = fun(context: Context): File {\n            return File(context.filesDir, \"models\").apply { if (!exists()) mkdirs() }\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/GenerationConfigSample.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport com.nexa.sdk.bean.GenerationConfig\nimport com.nexa.sdk.bean.SamplerConfig\n\n// Configuration sample for generation with defaults compatible with bridge\n// maxTokens: 0 = no limit, generates until model's natural stopping point\ndata class GenerationConfigSample(\n    var maxTokens: Int = 2048,\n    var stopWords: List<String>? = null,\n    var stopCount: Int = 0,\n    var nPast: Int = 0,\n    var imagePaths: List<String>? = null,\n    var imageCount: Int = 0,\n    var audioPaths: List<String>? = null,\n    var audioCount: Int = 0,\n    var systemPrompt: String = \"\"\n) {\n    // Convert to GenerationConfig with minimal sampler setup for bridge compatibility\n    // Sampler config uses bridge defaults (no custom parameters applied)\n    fun toGenerationConfig(grammarString:String? = null): GenerationConfig {\n        return GenerationConfig(\n            maxTokens = this.maxTokens,\n            stopWords = this.stopWords?.toTypedArray(),\n            stopCount = this.stopCount,\n            nPast = this.nPast,\n            //samplerConfig = SamplerConfig(\n            //    grammarString = grammarString\n                // All other sampler parameters use bridge defaults\n                // No temperature, topK, topP, penalties applied\n            //),\n            imagePaths = this.imagePaths?.toTypedArray(),\n            imageCount = this.imageCount,\n            audioPaths = this.audioPaths?.toTypedArray(),\n            audioCount = this.audioCount\n        )\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/MainActivity.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.Manifest\nimport android.app.Activity\nimport android.content.Context\nimport android.content.DialogInterface\nimport android.content.Intent\nimport android.content.SharedPreferences\nimport android.content.pm.PackageManager\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.graphics.Color\nimport android.net.Uri\nimport android.os.Bundle\nimport android.os.Environment\nimport android.provider.MediaStore\nimport android.system.Os\nimport android.text.Editable\nimport android.text.TextUtils\nimport android.text.TextWatcher\nimport android.util.Log\nimport android.view.KeyEvent\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.inputmethod.InputMethodManager\nimport android.widget.AdapterView\nimport android.widget.Button\nimport android.widget.EditText\nimport android.widget.HorizontalScrollView\nimport android.widget.ImageButton\nimport android.widget.ImageView\nimport android.widget.LinearLayout\nimport android.widget.PopupWindow\nimport android.widget.ProgressBar\nimport android.widget.SeekBar\nimport android.widget.BaseAdapter\nimport android.widget.SimpleAdapter\nimport android.widget.Spinner\nimport android.widget.TextView\nimport android.widget.Toast\nimport android.window.OnBackInvokedDispatcher\nimport androidx.activity.ComponentActivity\nimport androidx.activity.OnBackPressedCallback\nimport androidx.activity.result.ActivityResultLauncher\nimport androidx.activity.result.contract.ActivityResultContracts\nimport androidx.appcompat.app.AlertDialog\nimport androidx.compose.ui.unit.TextUnit\nimport androidx.core.app.ActivityCompat\nimport androidx.core.content.ContextCompat\nimport androidx.core.content.FileProvider\nimport androidx.core.view.ViewCompat\nimport androidx.core.view.WindowInsetsCompat\nimport androidx.fragment.app.Fragment\nimport androidx.fragment.app.FragmentActivity\nimport androidx.recyclerview.widget.RecyclerView\nimport com.google.android.material.bottomsheet.BottomSheetDialog\nimport com.gyf.immersionbar.ktx.immersionBar\nimport com.hjq.toast.Toaster\nimport com.liulishuo.okdownload.DownloadContext\nimport com.liulishuo.okdownload.DownloadTask\nimport com.liulishuo.okdownload.OkDownload\nimport com.liulishuo.okdownload.core.cause.EndCause\nimport com.liulishuo.okdownload.core.connection.DownloadOkHttp3Connection\nimport com.liulishuo.okdownload.kotlin.listener.createDownloadContextListener\nimport com.liulishuo.okdownload.kotlin.listener.createListener1\nimport com.nexa.demo.activity.FolderActivity\nimport com.nexa.demo.adapter.ChunkAdapter\nimport com.nexa.demo.bean.DownloadState\nimport com.nexa.demo.bean.EmbedResultBean\nimport com.nexa.demo.bean.ModelData\nimport com.nexa.demo.bean.DownloadableFileWithFallback\nimport com.nexa.demo.bean.downloadableFiles\nimport com.nexa.demo.bean.downloadableFilesWithFallback\nimport com.nexa.demo.bean.downloadableFilesWithNpuList\nimport com.nexa.demo.bean.getNexaManifest\nimport com.nexa.demo.bean.getNonExistModelFile\nimport com.nexa.demo.bean.getSupportPluginIds\nimport com.nexa.demo.bean.allModelFilesExist\nimport com.nexa.demo.bean.isDownloaded\nimport com.nexa.demo.bean.isNpuModel\nimport com.nexa.demo.bean.withFallbackUrls\nimport com.nexa.demo.utils.ModelFileListingUtil\nimport com.nexa.demo.bean.mmprojTokenFile\nimport com.nexa.demo.bean.modelDir\nimport com.nexa.demo.bean.modelFile\nimport com.nexa.demo.bean.tokenFile\nimport com.nexa.demo.databinding.ActivityMainBinding\nimport com.nexa.demo.databinding.DialogConfigBinding\nimport com.nexa.demo.databinding.DialogSelectPluginIdBinding\nimport com.nexa.demo.databinding.DialogTopkConfigBinding\nimport com.nexa.demo.fragments.IndexFragment\nimport com.nexa.demo.listeners.CustomDialogInterface\nimport com.nexa.demo.utils.DensityUtil\nimport com.nexa.demo.utils.ExecShell\nimport com.nexa.demo.utils.GenerateEmbedStringsUtil\nimport com.nexa.demo.utils.ImgUtil\nimport com.nexa.demo.utils.PermissionUtil\nimport com.nexa.demo.utils.SharePreferenceKeys\nimport com.nexa.demo.utils.WavRecorder\nimport com.nexa.demo.utils.inflate\nimport com.nexa.sdk.AsrWrapper\nimport com.nexa.sdk.CvWrapper\nimport com.nexa.sdk.EmbedderWrapper\nimport com.nexa.sdk.LlmWrapper\nimport com.nexa.sdk.NexaSdk\nimport com.nexa.sdk.RerankerWrapper\nimport com.nexa.sdk.VlmWrapper\nimport com.nexa.sdk.bean.AsrCreateInput\nimport com.nexa.sdk.bean.AsrTranscribeInput\nimport com.nexa.sdk.bean.CVCapability\nimport com.nexa.sdk.bean.CVCreateInput\nimport com.nexa.sdk.bean.CVModelConfig\nimport com.nexa.sdk.bean.ChatMessage\nimport com.nexa.sdk.bean.DeviceIdValue\nimport com.nexa.sdk.bean.EmbedderCreateInput\nimport com.nexa.sdk.bean.EmbeddingConfig\nimport com.nexa.sdk.bean.LlmCreateInput\nimport com.nexa.sdk.bean.LlmStreamResult\nimport com.nexa.sdk.bean.ModelConfig\nimport com.nexa.sdk.bean.RerankConfig\nimport com.nexa.sdk.bean.RerankerCreateInput\nimport com.nexa.sdk.bean.VlmChatMessage\nimport com.nexa.sdk.bean.VlmContent\nimport com.nexa.sdk.bean.VlmCreateInput\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.async\nimport kotlinx.coroutines.awaitAll\nimport kotlinx.coroutines.launch\nimport kotlinx.serialization.json.Json\nimport okhttp3.OkHttpClient\nimport okhttp3.Request\nimport java.io.File\nimport java.io.FileNotFoundException\nimport java.io.FileOutputStream\nimport java.security.SecureRandom\nimport java.security.cert.CertificateException\nimport java.security.cert.X509Certificate\nimport javax.net.ssl.SSLContext\nimport javax.net.ssl.SSLSession\nimport javax.net.ssl.SSLSocketFactory\nimport javax.net.ssl.TrustManager\nimport javax.net.ssl.X509TrustManager\nimport androidx.core.content.edit\nimport com.nexa.demo.bean.DownloadableFile\nimport kotlinx.serialization.StringFormat\n\nclass MainActivity : FragmentActivity() {\n\n    private val binding: ActivityMainBinding by inflate()\n    private var downloadContext: DownloadContext? = null\n    private var downloadState = DownloadState.IDLE\n    private var downloadingModelData: ModelData? = null\n    private lateinit var spDownloaded: SharedPreferences\n    private lateinit var llDownloading: LinearLayout\n    private lateinit var tvDownloadProgress: TextView\n    private lateinit var pbDownloading: ProgressBar\n    // Inline download progress views\n    private lateinit var llControlButtonsRow: LinearLayout\n    private lateinit var llDownloadProgress: LinearLayout\n    private lateinit var pbDownloadProgress: ProgressBar\n    private lateinit var tvDownloadPercent: TextView\n    private lateinit var tvDownloadFailed: TextView\n    private lateinit var btnCancelDownloadInline: Button\n    private lateinit var btnRetryDownloadInline: Button\n    private var downloadFailed = false\n    private lateinit var spModelList: Spinner\n    private lateinit var btnDownload: Button\n    private lateinit var btnLoadModel: Button\n    private lateinit var btnUnloadModel: Button\n    private lateinit var btnStop: Button\n    private lateinit var etInput: EditText\n    private lateinit var btnSend: Button\n    private lateinit var btnClearHistory: Button\n    private lateinit var btnAddImage: Button\n    private lateinit var btnAudioRecord: Button\n\n    private lateinit var recyclerView: RecyclerView\n    private lateinit var adapter: ChatAdapter\n    private lateinit var bottomPanel: LinearLayout\n    private lateinit var btnAudioDone: Button\n    private lateinit var btnAudioCancel: Button\n\n    private lateinit var scrollImages: HorizontalScrollView\n    private lateinit var topScrollContainer: LinearLayout\n    private lateinit var llLoading: LinearLayout\n    private lateinit var vTip: View\n\n    private lateinit var llmWrapper: LlmWrapper\n    private lateinit var vlmWrapper: VlmWrapper\n    var embedderWrapper: EmbedderWrapper? = null\n    private lateinit var rerankerWrapper: RerankerWrapper\n    private lateinit var cvWrapper: CvWrapper\n    private lateinit var asrWrapper: AsrWrapper\n    private val modelScope = CoroutineScope(Dispatchers.IO)\n\n    private val chatList = arrayListOf<ChatMessage>()\n    private lateinit var llmSystemPrompt: ChatMessage\n    private val vlmChatList = arrayListOf<VlmChatMessage>()\n    private lateinit var vlmSystemPrompty: VlmChatMessage\n    private lateinit var modelList: List<ModelData>\n    private var selectModelId = \"\"\n    private var spinnerText = \"\"\n\n    // ADD: Track which model type is loaded\n    private var isLoadLlmModel = false\n    private var isLoadVlmModel = false\n    private var isLoadEmbedderModel = false\n    private var isLoadRerankerModel = false\n    private var isLoadCVModel = false\n    private var isLoadAsrModel = false\n\n    private var enableThinking = false\n\n    private var wavRecorder: WavRecorder? = null\n    private var audioFile: File? = null\n\n    private var lastFormattedPrompt: String? = null  // Store the last formatted prompt\n    private var retrievedChunksList = mutableListOf<EmbedResultBean>()  // Store retrieved chunks\n\n    private val savedImageFiles = mutableListOf<File>()\n    private val messages = arrayListOf<Message>()\n\n    private val embedMsgList = arrayListOf<ChatMessage>()\n    private val embedResultList = arrayListOf<EmbedResultBean>()\n    private lateinit var selectFolderResult: ActivityResultLauncher<Intent>\n\n    private lateinit var chunkAdapter: ChunkAdapter\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        immersionBar {\n            transparentStatusBar()\n            statusBarDarkFont(false)\n        }\n        requestPermissions(arrayOf(Manifest.permission.RECORD_AUDIO), 1002)\n        okdownload()\n        initData()\n        initView()\n        setListeners()\n    }\n\n    private val embedStringPrefix =\n        \"You are a careful assistant. Use ONLY the provided context to answer.\"\n\n    private fun createEmbedChatMessage(embedString: String): ChatMessage {\n        val embedString =\n            \"$embedStringPrefix\\n\\n<context>\\\\n$embedString\\\\n</context>\"\n        return ChatMessage(role = \"system\", embedString)\n    }\n\n    private fun addEmbedChatMessage(embedString: String, msgList: ArrayList<ChatMessage>) {\n        createEmbedChatMessage(embedString).let { msg ->\n            var hasAdded = false\n            embedMsgList.forEach {\n                if (it.content == msg.content) {\n                    hasAdded = true\n                    return@forEach\n                }\n            }\n            if (!hasAdded) {\n                embedMsgList.add(msg)\n            }\n        }\n        embedMsgList.forEach {\n            if (!msgList.contains(it)) {\n                msgList.add(it)\n            }\n        }\n    }\n\n    // Format file list with chunk counts for display\n    private fun formatFilesInSearch(): String {\n        if (embedResultList.isEmpty()) {\n            return \"Files: 0 | Chunks: 0\"\n        }\n\n        // Group by file path and count chunks\n        val fileChunkCounts = embedResultList.groupBy { it.path }\n            .mapValues { it.value.size }\n            .toList()\n            .sortedBy { File(it.first).name }\n\n        val fileCount = fileChunkCounts.size\n        val totalChunks = embedResultList.size\n\n        return \"Files: $fileCount | Chunks: $totalChunks\"\n    }\n\n    private fun resetLoadState() {\n        isLoadLlmModel = false\n        isLoadVlmModel = false\n        isLoadEmbedderModel = false\n        isLoadRerankerModel = false\n        isLoadCVModel = false\n        isLoadAsrModel = false\n    }\n\n    private fun initView() {\n        chunkAdapter = ChunkAdapter()\n        binding.rvCitation.adapter = chunkAdapter\n        adapter = ChatAdapter(messages, object : OnCitationsClick {\n            override fun onClick(position: Int, retrievedChunks: List<EmbedResultBean>) {\n                chunkAdapter.updateData(retrievedChunks)\n                binding.llCitations.visibility = View.VISIBLE\n            }\n        })\n        binding.rvChat.adapter = adapter\n\n        // Set status bar padding for immersive status bar\n        val headerView = findViewById<View>(R.id.header_view)\n        headerView?.let { view ->\n            ViewCompat.setOnApplyWindowInsetsListener(view) { v, insets ->\n                val statusBarHeight = insets.getInsets(WindowInsetsCompat.Type.statusBars()).top\n                v.setPadding(0, statusBarHeight, 0, 0)\n                insets\n            }\n        }\n\n        // When keyboard is visible: only IME padding so input sits flush with keyboard.\n        // When keyboard is hidden: only nav bar padding so buttons are not covered.\n        ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->\n            val navBottom = insets.getInsets(WindowInsetsCompat.Type.navigationBars()).bottom\n            val imeBottom = insets.getInsets(WindowInsetsCompat.Type.ime()).bottom\n            val bottomPadding = if (imeBottom > 0) imeBottom else navBottom\n            v.setPadding(v.paddingLeft, v.paddingTop, v.paddingRight, bottomPadding)\n            insets\n        }\n\n        llDownloading = findViewById(R.id.ll_downloading)\n        tvDownloadProgress = findViewById(R.id.tv_download_progress)\n        pbDownloading = findViewById(R.id.pb_downloading)\n        // Initialize inline download progress views\n        llControlButtonsRow = findViewById(R.id.ll_control_buttons_row)\n        llDownloadProgress = findViewById(R.id.ll_download_progress)\n        pbDownloadProgress = findViewById(R.id.pb_download_progress)\n        tvDownloadPercent = findViewById(R.id.tv_download_percent)\n        tvDownloadFailed = findViewById(R.id.tv_download_failed)\n        btnCancelDownloadInline = findViewById(R.id.btn_cancel_download_inline)\n        btnRetryDownloadInline = findViewById(R.id.btn_retry_download_inline)\n        spModelList = findViewById(R.id.sp_model_list)\n        spModelList.dropDownVerticalOffset = DensityUtil.dpToPx(this, 40f)\n        spModelList.post {\n            // Set dropdown width to match spinner width for symmetric padding\n            spModelList.dropDownWidth = spModelList.width\n        }\n        val spinnerData = modelList.filter { it.show }.map {\n            val map = mutableMapOf<String, String>()\n            map[\"modelId\"] = it.id\n            map[\"displayName\"] = it.displayName\n            map\n        }\n        // Set custom view for spinner selected item\n        spModelList.adapter = object : BaseAdapter() {\n            override fun getCount(): Int = spinnerData.size\n\n            override fun getItem(position: Int): Any = spinnerData[position]\n\n            override fun getItemId(position: Int): Long = position.toLong()\n\n            override fun getView(position: Int, convertView: View?, parent: android.view.ViewGroup?): View {\n                val view = convertView ?: LayoutInflater.from(this@MainActivity)\n                    .inflate(R.layout.spinner_custom, parent, false)\n                val textView = view.findViewById<TextView>(android.R.id.text1)\n                textView.text = spinnerData[position][\"displayName\"]\n                return view\n            }\n\n            override fun getDropDownView(position: Int, convertView: View?, parent: android.view.ViewGroup?): View {\n                val view = convertView ?: LayoutInflater.from(this@MainActivity)\n                    .inflate(R.layout.item_spinner_dropdown, parent, false)\n                val textView = view.findViewById<TextView>(android.R.id.text1)\n                val checkIcon = view.findViewById<ImageView>(R.id.iv_check)\n                textView.text = spinnerData[position][\"displayName\"]\n                // Show check icon for selected item\n                val isSelected = position == spModelList.selectedItemPosition\n                checkIcon.visibility = if (isSelected) View.VISIBLE else View.GONE\n                return view\n            }\n        }\n        spModelList.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {\n            override fun onItemSelected(\n                parent: AdapterView<*>?, view: View?, position: Int, id: Long\n            ) {\n                selectModelId = spinnerData[position].get(\"modelId\") ?: \"\"\n                spinnerText = spinnerData[position].get(\"displayName\") ?: \"\"\n                Log.d(TAG, \"spinnerText:$spinnerText\")\n                // Use actual file existence check (not just SharedPreferences)\n                val selectedModel = modelList.first { it.id == selectModelId }\n                val filesExist = isModelDownloaded(selectedModel) == null\n                // Check if this model is currently downloading\n                val isDownloading = downloadState == DownloadState.DOWNLOADING && \n                    downloadingModelData?.displayName == spinnerText\n                if (isDownloading && !filesExist) {\n                    // Show progress row for current downloading model\n                    llControlButtonsRow.visibility = View.GONE\n                    llDownloadProgress.visibility = View.VISIBLE\n                } else {\n                    changeOperationUI(\n                        if (filesExist) {\n                            OperationState.DOWNLOADED\n                        } else {\n                            OperationState.DEFAULT\n                        }\n                    )\n                }\n                messages.clear()\n                adapter.notifyDataSetChanged()\n                binding.rvChat.scrollTo(0, 0)\n            }\n\n            override fun onNothingSelected(parent: AdapterView<*>?) {\n                selectModelId = \"\"\n            }\n        }\n        btnDownload = findViewById(R.id.btn_download)\n        btnLoadModel = findViewById(R.id.btn_load_model)\n        btnUnloadModel = findViewById(R.id.btn_unload_model)\n        btnStop = findViewById(R.id.btn_stop)\n        etInput = findViewById(R.id.et_input)\n        btnAddImage = findViewById(R.id.btn_add_image)\n        btnAudioRecord = findViewById(R.id.btn_voice)\n\n        bottomPanel = findViewById(R.id.bottom_panel)\n        btnAudioCancel = findViewById(R.id.btn_audio_cancel)\n        btnAudioDone = findViewById(R.id.btn_audio_done)\n\n        btnSend = findViewById(R.id.btn_send)\n        btnClearHistory = findViewById(R.id.btn_clear_history)\n        scrollImages = findViewById(R.id.scroll_images)\n        topScrollContainer = findViewById(R.id.ll_images_container)\n        llLoading = findViewById(R.id.ll_loading)\n        vTip = findViewById<View>(R.id.v_tip)\n\n        btnAudioCancel.setOnClickListener {\n            stopRecord(true)\n        }\n\n        btnAudioDone.setOnClickListener {\n            stopRecord(false)\n        }\n\n        findViewById<Button>(R.id.btn_test).setOnClickListener {\n            Thread {\n                val exeFile = File(filesDir, \"nexa_test_llm\")\n                val chmodProcess = Runtime.getRuntime().exec(\"chmod 755 \" + exeFile.absolutePath);\n                chmodProcess.waitFor()\n                Log.d(\"nfl\", \"exeFile exe? ${exeFile.canExecute()}\")\n                Log.d(\"nfl\", \"Exe Thread:${Thread.currentThread().name}\")\n                ExecShell().executeCommand(\n                    arrayOf(\n                        //                        exeFile.absolutePath,\n//                        \"--test-suite=\\\"npu\\\"\", \"--success \"\n                        \"cat\",\n                        \"/sys/devices/soc0/sku\"\n//                        \"/data/local/tmp/test_cat.txt\"\n                    )\n                ).forEach {\n                    Log.d(\"nfl\", \"cmd:$it\")\n                }\n            }.start()\n        }\n\n        findViewById<View>(R.id.v_tip).setOnClickListener {\n            Toast.makeText(this, \"please unload model first\", Toast.LENGTH_SHORT).show()\n        }\n    }\n\n    private fun replaceFragment(fragment: Fragment) {\n        runOnUiThread {\n            Log.d(TAG, \"replaceFragment:$fragment\")\n            binding.flIndex.visibility = View.VISIBLE\n            supportFragmentManager.beginTransaction()\n                .replace(R.id.fl_index, fragment)\n                .commit()\n        }\n    }\n\n    private fun parseModelList() {\n        try {\n            val baseJson = assets.open(\"model_list.json\").bufferedReader().use { it.readText() }\n            modelList = Json.decodeFromString<List<ModelData>>(baseJson)\n        } catch (e: Exception) {\n            Log.e(\"nfl\", \"parseModelList: $e\")\n        }\n    }\n\n    // Show Clear button only when files > 0\n    private fun updateEmbedClearButtonVisibility() {\n        binding.btnEmbedClear.visibility =\n            if (embedResultList.isNotEmpty()) View.VISIBLE else View.GONE\n    }\n\n    private fun embedFiles(files: ArrayList<String>, clearOld: Boolean = false) {\n        binding.tvDatabaseInfo.text = \"Embedding...\"\n        binding.btnEmbedClear.isEnabled = false\n        val modelData =\n            modelList.first { it.id == \"embeddinggemma-300m-npu-mobile\" }\n        CoroutineScope(Dispatchers.IO).launch {\n            GenerateEmbedStringsUtil.load(this@MainActivity, modelData)\n            if (clearOld) {\n                embedResultList.clear()\n            }\n            Log.d(TAG, \"embedFiles size:${files.size}\")\n            val embedStartTime = System.currentTimeMillis()\n            GenerateEmbedStringsUtil.embed(files.toTypedArray()).let {\n                embedResultList.addAll(it)\n                var prefillSpeed = 0.0\n                it.forEach { item ->\n                    prefillSpeed += item.embedResult.profileData.prefillSpeed\n                }\n                prefillSpeed /= it.size\n                val totalTime = System.currentTimeMillis() - embedStartTime\n                runOnUiThread {\n                    binding.tvDatabaseInfo.text = formatFilesInSearch()\n                    binding.llEmbedProfilling.visibility = View.VISIBLE\n                    updateEmbedClearButtonVisibility()\n                    binding.btnEmbedClear.isEnabled = true\n                    binding.tvEmbedProfilling.text = \"Total Time: ${\n                        String.format(\n                            null,\n                            \"%.2f\",\n                            totalTime / 1000f\n                        )\n                    }s; Prefilling Speed: ${\n                        String.format(\n                            null,\n                            \"%.2f\",\n                            prefillSpeed\n                        )\n                    } tokens/sec\"\n                }\n            }\n        }\n    }\n\n    private var embedFiles = arrayListOf<String>()\n\n    /**\n     * Step 0. Preparing to download the model file.\n     */\n    private fun initData() {\n        onBackPressedDispatcher.addCallback(object : OnBackPressedCallback(true) {\n            override fun handleOnBackPressed() {\n                if (binding.llCitations.visibility == View.VISIBLE) {\n                    binding.llCitations.visibility = View.GONE\n                } else {\n                    isEnabled = false\n                    onBackPressedDispatcher.onBackPressed()\n                }\n            }\n\n        })\n        selectFolderResult = registerForActivityResult(\n            ActivityResultContracts.StartActivityForResult()\n        ) { result -> //\n            if (Activity.RESULT_OK == result.resultCode) {\n                result.data?.getStringArrayListExtra(FolderActivity.KEY_SELECT_IMAGES)\n                    ?.let { files ->\n                        embedFiles.addAll(files)\n                        embedFiles(files)\n                    }\n            }\n        }\n        spDownloaded = getSharedPreferences(\n            SharePreferenceKeys.FileName.ModelDownloaded.fileName,\n            MODE_PRIVATE\n        )\n//        spDownloaded.edit().putBoolean(\"Qwen3-0.6B-Q8_0\", false).commit()\n//        spDownloaded.edit().putBoolean(\"Qwen3-0.6B-IQ4_NL\", false).commit()\n//        spDownloaded.edit().putBoolean(\"LFM2-1.2B-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"embeddinggemma-300m-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"jina-v2-rerank-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"paddleocr-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"parakeet-tdt-0.6b-v3-npu\", false).commit()\n//        spDownloaded.edit().putBoolean(\"OmniNeural-4B\", false).commit()\n//        spDownloaded.edit().putBoolean(\"Granite-4.0-h-350M-NPU\", false).commit()\n//        spDownloaded.edit().putBoolean(\"Granite-4-Micro-NPU\", false).commit()\n        parseModelList()\n        //\n        initNexaSdk()\n        //\n        val sysPrompt = \"\"\"\\\nYou are Nays Campaign Manager, an AI assistant responsible for managing customer campaigns and investigating campaign-related issues.\n\nWhen a customer inquiry comes in, you need to:\n1. Analyze the customer's request to understand their campaign needs\n2. Check if it's related to campaign limits or issues\n3. Use the campaign_investigation function when needed to check campaign status\n4. Provide appropriate responses based on the investigation results\n\nYour responsibilities include:\n- Investigating campaign performance and limits\n- Determining if customers have reached their campaign limits\n- Providing helpful messages when limits are reached\n- Directing customers to support when limits haven't been reached\n- Ensuring smooth campaign operations for all customers\n\nWhen you receive a query about campaigns, you should:\n1. First understand what the customer is asking about\n2. If it's campaign-related, use the campaign_investigation tool to check the status\n3. Based on the tool's response, provide appropriate guidance\n\nAlways be professional, helpful, and focused on resolving campaign-related issues efficiently.\n\nNote: You must use the campaign_investigation function whenever a customer asks about campaign limits, issues, or status.\n\"\"\"\n        // It works better with Chinese prompt words.\n        val sysPrompt2 = \"Must reply in markdown format\"\n//        addSystemPrompt(sysPrompt2)\n    }\n\n    /**\n     * Step 1. initNexaSdk environment\n     */\n    private fun initNexaSdk() {\n        // Initialize NexaSdk with context\n        NexaSdk.getInstance().init(this, object : NexaSdk.InitCallback {\n            override fun onSuccess() {\n            }\n\n            override fun onFailure(reason: String) {\n                Log.e(TAG, \"NexaSdk init failed: $reason\")\n            }\n        })\n\n        val testLocalPath = false\n        if (testLocalPath) {\n            // FIXME: Set directory according to terminal format\n            val pluginNativeLibPath = filesDir.absolutePath\n            val pluginAdspLibPath = File(filesDir, \"npu/htp-files\").absolutePath\n            val pluginLdLibraryPath =\n                \"$pluginNativeLibPath:$pluginNativeLibPath/npu:$pluginAdspLibPath:\\$LD_LIBRARY_PATH\"\n            // FIXME: Set directory with flattened .so files\n            val NEXA_PLUGIN_PATH = pluginNativeLibPath\n            val LD_LIBRARY_PATH = pluginLdLibraryPath\n            val ADSP_LIBRARY_PATH = pluginAdspLibPath\n            Log.d(\"nfl\", \"NEXA_PLUGIN_PATH:$NEXA_PLUGIN_PATH\")\n            Log.d(\"nfl\", \"LD_LIBRARY_PATH:$LD_LIBRARY_PATH\")\n            Log.d(\"nfl\", \"ADSP_LIBRARY_PATH:$ADSP_LIBRARY_PATH\")\n\n            Os.setenv(\"NEXA_PLUGIN_PATH\", NEXA_PLUGIN_PATH, true)\n            Os.setenv(\"LD_LIBRARY_PATH\", LD_LIBRARY_PATH, true)\n            Os.setenv(\"ADSP_LIBRARY_PATH\", ADSP_LIBRARY_PATH, true)\n        }\n    }\n\n    /**\n     * Step 2. add system prompt, such as : output markdown style, contains emoji etc.(Options)\n     */\n    private fun addSystemPrompt(sysPrompt: String) {\n        llmSystemPrompt = ChatMessage(\"system\", sysPrompt)\n        chatList.add(llmSystemPrompt)\n        vlmSystemPrompty =\n            VlmChatMessage(\n                \"system\",\n                listOf(VlmContent(\"text\", sysPrompt))\n            )\n        vlmChatList.add(vlmSystemPrompty)\n    }\n\n    private fun getHfToken(model: ModelData, url: String): String? {\n        // Replace with your own HuggingFace token if needed for private models\n        return null\n    }\n\n    private fun onLoadModelSuccess(tip: String) {\n        runOnUiThread {\n            Toast.makeText(\n                this@MainActivity, tip, Toast.LENGTH_SHORT\n            ).show()\n            when (pluginType) {\n                \"cpu\" -> {\n                    binding.ivDeviceTag.setImageResource(R.drawable.icon_tag_cpu)\n                }\n\n                \"gpu\" -> {\n                    binding.ivDeviceTag.setImageResource(R.drawable.icon_tag_gpu)\n                }\n\n                \"npu\" -> {\n                    binding.ivDeviceTag.setImageResource(R.drawable.icon_tag_npu)\n                }\n\n                \"npu_llama\" -> {\n                    binding.ivDeviceTag.setImageResource(R.drawable.icon_tag_npu)\n                }\n            }\n            changeOperationUI(OperationState.LOADED)\n            // change UI\n            btnAddImage.visibility = View.INVISIBLE\n            btnAudioRecord.visibility = View.INVISIBLE\n            if (isLoadVlmModel) {\n                btnAddImage.visibility = View.VISIBLE\n                btnAudioRecord.visibility = View.VISIBLE\n            }\n            if (isLoadCVModel) {\n                btnAddImage.visibility = View.VISIBLE\n            }\n            if (isLoadAsrModel) {\n                btnAudioRecord.visibility = View.VISIBLE\n            }\n            //\n            btnUnloadModel.visibility = View.VISIBLE\n            llLoading.visibility = View.INVISIBLE\n            //\n            if (isLoadEmbedderModel || isLoadRerankerModel || isLoadAsrModel || isLoadCVModel) {\n                btnStop.visibility = View.GONE\n            } else {\n                btnStop.visibility = View.VISIBLE\n            }\n        }\n    }\n\n    private fun onLoadModelFailed(tip: String) {\n        runOnUiThread {\n            vTip.visibility = View.GONE\n\n            // Check if files exist locally first\n            val selectModelData = modelList.firstOrNull { it.id == selectModelId }\n            val fileName = isModelDownloaded(selectModelData!!)\n            val filesExist = fileName == null\n\n            if (!filesExist) {\n                Toaster.showLong(\"The \\\"$fileName\\\" file is missing. Please download it first.\")\n            } else {\n                Toast.makeText(this@MainActivity, tip, Toast.LENGTH_SHORT)\n                    .show()\n            }\n\n            // change UI\n            btnAddImage.visibility = View.INVISIBLE\n            btnAudioRecord.visibility = View.INVISIBLE\n            btnUnloadModel.visibility = View.GONE\n            llLoading.visibility = View.INVISIBLE\n        }\n    }\n\n    private fun hasLoadedModel(): Boolean {\n        return isLoadLlmModel || isLoadVlmModel || isLoadEmbedderModel ||\n                isLoadRerankerModel || isLoadCVModel || isLoadAsrModel\n    }\n\n    /**\n     * Helper function to check if model files exist locally\n     * @return null if all files exist locally. or file's name which is missing.\n     */\n    private fun isModelDownloaded(modelData: ModelData): String? {\n        val modelDir = modelData.modelDir(this@MainActivity)\n        val fileName = modelData.getNonExistModelFile(this, modelDir, modelList)\n        val filesExist = fileName == null\n        // Sync SharedPreferences with actual file existence (both directions)\n        if (filesExist && !spDownloaded.getBoolean(modelData.id, false)) {\n            Log.d(TAG, \"Model files found locally for ${modelData.id}, updating SharedPreferences to true\")\n            spDownloaded.edit().putBoolean(modelData.id, true).commit()\n        } else if (!filesExist && spDownloaded.getBoolean(modelData.id, false)) {\n            Log.d(TAG, \"Model files missing for ${modelData.id}, updating SharedPreferences to false\")\n            spDownloaded.edit().putBoolean(modelData.id, false).commit()\n        }\n\n        return fileName\n    }\n\n    private var pluginType = \"npu\"\n    private fun loadModel(selectModelData: ModelData, modelDataPluginId: String, nGpuLayers: Int) {\n        modelScope.launch {\n            resetLoadState()\n            Log.d(TAG, \"load model selectModelData.id:${selectModelData.id}\")\n            val nexaManifestBean = selectModelData.getNexaManifest(this@MainActivity)\n            var pluginId = nexaManifestBean?.PluginId ?: modelDataPluginId\n            pluginType = pluginId\n            Log.d(TAG, \"pluginType:$pluginType\")\n            var deviceId: String? = null\n            var nGpuLayers = nGpuLayers\n            when (pluginId) {\n                \"cpu\" -> {\n                    pluginId = \"cpu_gpu\"\n                    nGpuLayers = 0\n                }\n\n                \"gpu\" -> {\n                    pluginId = \"cpu_gpu\"\n                    deviceId = DeviceIdValue.GPU.value\n                    nGpuLayers = 999\n                }\n\n                \"npu_llama\" -> {\n                    pluginId = \"cpu_gpu\"\n                    deviceId = DeviceIdValue.NPU.value\n                    nGpuLayers = 999\n                }\n            }\n\n            when (nexaManifestBean?.ModelType ?: selectModelData.type) {\n                \"chat\", \"llm\" -> {\n\n                    val conf = ModelConfig(\n                        nCtx = 4096,\n                        nGpuLayers = nGpuLayers,\n                        enable_thinking = enableThinking,\n                        npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                        npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath\n                    )\n                    // Build and initialize LlmWrapper for chat model\n                    LlmWrapper.builder().llmCreateInput(\n                        LlmCreateInput(\n                            model_name = nexaManifestBean?.ModelName ?: \"\",\n                            model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                            tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,\n                            config = conf,\n                            plugin_id = pluginId,\n                            device_id = deviceId\n                        )\n                    ).build().onSuccess { wrapper ->\n                        isLoadLlmModel = true\n                        llmWrapper = wrapper\n                        onLoadModelSuccess(\"llm model loaded\")\n                    }.onFailure { error ->\n                        onLoadModelFailed(error.message.toString())\n                    }\n\n                }\n\n                \"embedder\" -> {\n                    // Handle embedder model loading with NPU paths using EmbedderCreateInput\n                    // embed-gemma\n                    val embedderCreateInput = EmbedderCreateInput(\n                        model_name = nexaManifestBean?.ModelName\n                            ?: \"\",  // Model name for NPU plugin\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,\n                        config = ModelConfig(\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            nGpuLayers = nGpuLayers\n                        ),\n                        plugin_id = pluginId,\n                        device_id = deviceId\n                    )\n\n                    EmbedderWrapper.builder()\n                        .embedderCreateInput(embedderCreateInput)\n                        .build().onSuccess { wrapper ->\n                            isLoadEmbedderModel = true\n                            embedderWrapper = wrapper\n                            onLoadModelSuccess(\"embedder model loaded\")\n                            if (selectModelData.id == \"embedneural-npu\") {\n                                runOnUiThread {\n                                    binding.ivTopk.visibility = View.VISIBLE\n                                }\n                                replaceFragment(IndexFragment.newInstance(\"\", \"\"))\n                            }\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n\n                }\n\n                \"reranker\" -> {\n                    // Handle reranker model loading with NPU paths using RerankerCreateInput\n                    // jina-v2-rerank-npu\n                    val rerankerCreateInput = RerankerCreateInput(\n                        model_name = nexaManifestBean?.ModelName\n                            ?: \"\",  // Model name for NPU plugin\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        tokenizer_path = selectModelData.tokenFile(this@MainActivity)?.absolutePath,\n                        config = ModelConfig(\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            nGpuLayers = nGpuLayers\n                        ),\n                        plugin_id = pluginId,\n                        device_id = deviceId\n                    )\n\n                    RerankerWrapper.builder()\n                        .rerankerCreateInput(rerankerCreateInput)\n                        .build().onSuccess { wrapper ->\n                            isLoadRerankerModel = true\n                            rerankerWrapper = wrapper\n                            onLoadModelSuccess(\"reranker model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n\n                }\n\n                \"paddleocr\" -> {\n                    // paddleocr-npu\n                    val cvCreateInput = CVCreateInput(\n                        model_name = nexaManifestBean?.ModelName ?: \"\",\n                        config = CVModelConfig(\n                            capabilities = CVCapability.OCR,\n                            det_model_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            rec_model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                            char_dict_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir\n                        ),\n                        plugin_id = pluginId,\n                        device_id = deviceId\n                    )\n                    CvWrapper.builder()\n                        .createInput(cvCreateInput)\n                        .build().onSuccess {\n                            isLoadCVModel = true\n                            cvWrapper = it\n                            onLoadModelSuccess(\"paddleocr model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n                }\n\n                \"asr\" -> {\n                    // ADD: Handle ASR model loading\n                    // parakeet-tdt-0.6b-v3-npu\n                    val asrCreateInput = AsrCreateInput(\n                        model_name = nexaManifestBean?.ModelName ?: \"\",\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        config = ModelConfig(\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath,\n                            nGpuLayers = nGpuLayers\n                        ),\n                        plugin_id = pluginId,\n                        device_id = deviceId\n                    )\n\n                    AsrWrapper.builder()\n                        .asrCreateInput(asrCreateInput)\n                        .build().onSuccess { wrapper ->\n                            isLoadAsrModel = true\n                            asrWrapper = wrapper\n                            onLoadModelSuccess(\"ASR model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n                }\n\n                \"multimodal\", \"vlm\" -> {\n                    // VLM model\n                    val isNpuVlm = nexaManifestBean?.PluginId == \"npu\"\n                    val config = if (isNpuVlm) {\n                        ModelConfig(\n                            nCtx = 2048,\n                            nThreads = 8,\n                            enable_thinking = enableThinking,\n                            npu_lib_folder_path = applicationInfo.nativeLibraryDir,\n                            npu_model_folder_path = selectModelData.modelDir(this@MainActivity).absolutePath\n                        )\n                    } else {\n                        ModelConfig(\n                            nCtx = 1024,\n                            nThreads = 4,\n                            nBatch = 1,\n                            nUBatch = 1,\n                            nGpuLayers = nGpuLayers,\n                            enable_thinking = enableThinking\n                        )\n                    }\n\n                    val vlmCreateInput = VlmCreateInput(\n                        model_name = nexaManifestBean?.ModelName ?: \"\",\n                        model_path = selectModelData.modelFile(this@MainActivity)!!.absolutePath,\n                        mmproj_path = selectModelData.mmprojTokenFile(this@MainActivity)?.absolutePath,\n                        config = config,\n                        plugin_id = pluginId,\n                        device_id = deviceId\n                    )\n\n                    VlmWrapper.builder()\n                        .vlmCreateInput(vlmCreateInput)\n                        .build().onSuccess {\n                            isLoadVlmModel = true\n                            vlmWrapper = it\n                            onLoadModelSuccess(\"vlm model loaded\")\n                        }.onFailure { error ->\n                            onLoadModelFailed(error.message.toString())\n                        }\n                }\n\n                else -> {\n                    onLoadModelFailed(\"model type error\")\n                }\n            }\n        }\n    }\n\n    private fun addDownloadedTag(modelData: ModelData) {\n        spDownloaded.edit(commit = true) {\n            putBoolean(modelData.id, true)\n        }\n        modelList.firstOrNull { it.id == modelData.dependencies?.first()}?.let {\n            addDownloadedTag(it)\n        }\n    }\n\n    // Helper function to show download failed state\n    private fun showDownloadFailed(message: String? = null) {\n        downloadState = DownloadState.IDLE\n        downloadFailed = true\n        llDownloading.visibility = View.GONE\n        llControlButtonsRow.visibility = View.GONE\n        llDownloadProgress.visibility = View.VISIBLE\n        btnDownload.visibility = View.GONE\n        tvDownloadPercent.visibility = View.GONE\n        tvDownloadFailed.visibility = View.VISIBLE\n        btnCancelDownloadInline.visibility = View.GONE\n        btnRetryDownloadInline.visibility = View.VISIBLE\n        if (message != null) {\n            Toaster.show(message)\n        }\n    }\n\n    // Helper function to reset download UI to initial state\n    private fun resetDownloadUI() {\n        downloadState = DownloadState.IDLE\n        downloadFailed = false\n        llDownloadProgress.visibility = View.GONE\n        llControlButtonsRow.visibility = View.VISIBLE\n        btnDownload.visibility = View.VISIBLE\n        llDownloading.visibility = View.GONE\n    }\n\n    private fun downloadModel(selectModelData: ModelData) {\n        // Check local files first before SharedPreferences\n        val fileName = isModelDownloaded(selectModelData)\n        if (fileName == null || hasLoadedModel()) {\n            addDownloadedTag(selectModelData)\n            resetDownloadUI()\n            changeOperationUI(OperationState.DOWNLOADED)\n            Toast.makeText(this@MainActivity, \"model already downloaded\", Toast.LENGTH_SHORT)\n                .show()\n        } else {\n            downloadState = DownloadState.DOWNLOADING\n            downloadingModelData = selectModelData\n            downloadFailed = false\n            // Show progress row (full width), hide buttons row\n            llControlButtonsRow.visibility = View.GONE\n            llDownloadProgress.visibility = View.VISIBLE\n            btnDownload.visibility = View.GONE\n            pbDownloadProgress.progress = 0\n            tvDownloadPercent.text = \"0%\"\n            tvDownloadPercent.visibility = View.VISIBLE\n            tvDownloadFailed.visibility = View.GONE\n            btnCancelDownloadInline.visibility = View.VISIBLE\n            btnRetryDownloadInline.visibility = View.GONE\n            // Keep modal hidden\n            llDownloading.visibility = View.GONE\n            modelScope.launch {\n                val unsafeClient = getUnsafeOkHttpClient().build()\n                \n                // Track URL mapping for fallback: primary URL -> fallback URL\n                val fallbackUrlMap = mutableMapOf<String, String>()\n                // Track failed downloads for fallback retry\n                val failedDownloads = mutableListOf<DownloadableFileWithFallback>()\n                \n                // For NPU models without explicit files list, fetch file list with fallback support\n                val filesToDownloadWithFallback: List<DownloadableFileWithFallback> = if (selectModelData.isNpuModel() && \n                    selectModelData.files.isNullOrEmpty() && \n                    !selectModelData.baseUrl.isNullOrEmpty()) {\n                    \n                    Log.d(TAG, \"NPU model detected, fetching file list: ${selectModelData.baseUrl}\")\n                    \n                    // Recursively collect all NPU models that need file listing (main model + all NPU dependencies in the tree)\n                    val modelsToFetch = mutableListOf(selectModelData)\n                    val visited = mutableSetOf(selectModelData.id)\n                    \n                    fun collectNpuDependencies(model: ModelData) {\n                        model.dependencies?.forEach { depId ->\n                            if (depId in visited) return@forEach\n                            visited.add(depId)\n                            \n                            modelList.firstOrNull { it.id == depId }?.let { depModel ->\n                                // Check actual file existence, not just SharedPreferences\n                                val depModelDir = depModel.modelDir(this@MainActivity)\n                                val depFilesExist = depModel.allModelFilesExist(this@MainActivity, depModelDir, modelList)\n                                \n                                // If it's an NPU model that needs S3 file listing, add it\n                                if (depModel.isNpuModel() && \n                                    depModel.files.isNullOrEmpty() && \n                                    !depModel.baseUrl.isNullOrEmpty() &&\n                                    !depFilesExist) {\n                                    modelsToFetch.add(depModel)\n                                    Log.d(TAG, \"Added NPU dependency to fetch list: ${depModel.id}\")\n                                }\n                                \n                                // Recursively check this dependency's dependencies\n                                collectNpuDependencies(depModel)\n                            }\n                        }\n                    }\n                    \n                    collectNpuDependencies(selectModelData)\n                    \n                    // Fetch file lists with fallback support for all NPU models in parallel\n                    val fileListResults = modelsToFetch.map { model ->\n                        async {\n                            model to ModelFileListingUtil.listFilesWithFallback(model.baseUrl!!, unsafeClient)\n                        }\n                    }.awaitAll().toMap()\n                    \n                    // Build the download list using the fetched file names\n                    val allFiles = mutableListOf<DownloadableFileWithFallback>()\n                    modelsToFetch.forEach { model ->\n                        val result = fileListResults[model]\n                        if (result == null || result.files.isEmpty()) {\n                            Log.e(TAG, \"Failed to fetch file list for ${model.id}\")\n                        } else {\n                            val useHfUrls = result.source == ModelFileListingUtil.FileListResult.Source.HUGGINGFACE\n                            Log.d(TAG, \"Found ${result.files.size} files for ${model.id} from ${result.source}: ${result.files}\")\n                            \n                            allFiles.addAll(\n                                model.downloadableFilesWithFallback(\n                                    this@MainActivity,\n                                    model.modelDir(this@MainActivity),\n                                    modelList,\n                                    result.files,\n                                    useHfUrls\n                                ).filter { df -> \n                                    // Filter out dependencies that were already added\n                                    allFiles.none { existing -> existing.primaryUrl == df.primaryUrl }\n                                }\n                            )\n                        }\n                    }\n                    allFiles\n                } else {\n                    // For non-NPU models or models with explicit files, use the original method with fallback\n                    selectModelData.downloadableFiles(\n                        this@MainActivity,\n                        selectModelData.modelDir(this@MainActivity),\n                        modelList\n                    ).withFallbackUrls()\n                }\n                \n                // Build fallback URL map\n                filesToDownloadWithFallback.forEach { \n                    fallbackUrlMap[it.primaryUrl] = it.fallbackUrl\n                }\n                \n                // Convert to simple DownloadableFile for initial download attempt\n                val filesToDownload = filesToDownloadWithFallback.map { \n                    DownloadableFile(it.file, it.primaryUrl)\n                }\n                \n                Log.d(TAG, \"filesToDownload: $filesToDownload\")\n                if (filesToDownload.isEmpty()) throw IllegalArgumentException(\"No download URL\")\n\n                fun getUrlFileSize(client: OkHttpClient, url: String): Long {\n                    val hostname = try {\n                        url.substringAfter(\"://\").substringBefore(\"/\")\n                    } catch (e: Exception) {\n                        \"unknown\"\n                    }\n\n                    Log.d(TAG, \"Requesting file size: $hostname\")\n\n                    val builder = Request.Builder().url(url).head()\n                    getHfToken(selectModelData, url)?.let {\n                        builder.addHeader(\"Authorization\", \"Bearer $it\")\n                    }\n                    val request = builder.build()\n                    var size = 0L\n                    try {\n                        client.newCall(request).execute().use { resp ->\n                            size = resp.header(\"Content-Length\")?.toLongOrNull() ?: 0L\n                        }\n                    } catch (e: java.net.UnknownHostException) {\n                        Log.e(TAG, \"DNS resolution failed for $hostname - Check DNS/network\")\n                    } catch (e: java.net.SocketTimeoutException) {\n                        Log.e(TAG, \"Connection timeout to $hostname - Possible firewall/proxy issue\")\n                    } catch (e: java.net.ConnectException) {\n                        Log.e(TAG, \"Connection refused by $hostname - Server unreachable\")\n                    } catch (e: javax.net.ssl.SSLException) {\n                        Log.e(TAG, \"SSL/TLS error to $hostname - ${e.message}\")\n                    } catch (e: Exception) {\n                        Log.e(TAG, \"Network error: ${e.javaClass.simpleName} - ${e.message}\")\n                    }\n                    return size\n                }\n                \n                // Try to get file sizes, with fallback to HF if S3 fails\n                val fileSizeMap = mutableMapOf<String, Long>()\n                val filesToSkip = mutableListOf<String>()\n                \n                filesToDownloadWithFallback.forEach { fileWithFallback ->\n                    var size = getUrlFileSize(unsafeClient, fileWithFallback.primaryUrl)\n                    if (size == 0L && fileWithFallback.fallbackUrl != fileWithFallback.primaryUrl) {\n                        Log.w(TAG, \"Primary URL failed, trying fallback for size: ${fileWithFallback.file.name}\")\n                        size = getUrlFileSize(unsafeClient, fileWithFallback.fallbackUrl)\n                        if (size > 0L) {\n                            // Update to use fallback URL as primary for this file\n                            fallbackUrlMap[fileWithFallback.primaryUrl] = fileWithFallback.primaryUrl // swap\n                        }\n                    }\n                    \n                    if (size == 0L) {\n                        // Skip empty files (or unknown size) - don't fail the whole download\n                        Log.w(TAG, \"Skipping empty/unknown-size file: ${fileWithFallback.file.name}\")\n                        filesToSkip.add(fileWithFallback.primaryUrl)\n                    }\n                    fileSizeMap[fileWithFallback.primaryUrl] = size\n                }\n                \n                // Remove skipped files from download list (including empty files)\n                val filteredFilesToDownload = filesToDownload.filter { it.url !in filesToSkip }\n                \n                val totalSizes = filteredFilesToDownload.map { fileSizeMap[it.url] ?: 0L }\n                if (totalSizes.any { it == 0L }) {\n                    // Should not happen now that we skip all empty files; keep as safety check\n                    val failedFiles = filteredFilesToDownload.filter { (fileSizeMap[it.url] ?: 0L) == 0L }\n                    Log.e(TAG, \"Files with size 0 still in list: ${failedFiles.map { it.file.name }}\")\n                    runOnUiThread {\n                        showDownloadFailed(\"Download failed - could not get critical file sizes.\")\n                    }\n                    return@launch\n                }\n                \n                val alreadyDownloaded = mutableMapOf<String, Long>()\n                val totalBytes = totalSizes.sum()\n                Log.d(TAG, \"all model size: $totalBytes\")\n\n                val startTime = System.currentTimeMillis()\n                var lastProgressTime = 0L\n                val progressInterval = 500L\n                \n                fun onProgress(\n                    modelId: String,\n                    percent: Int,\n                    downloaded: Long,\n                    totalBytes: Long,\n                    etaSec: Long,\n                    speedStr: String\n                ) {\n                    runOnUiThread {\n                        if (10000 == percent) {\n                            // Download completed\n                            resetDownloadUI()\n                            changeOperationUI(OperationState.DOWNLOADED)\n                            addDownloadedTag(downloadingModelData!!)\n                            Toaster.show(\"${downloadingModelData?.displayName} downloaded\")\n                        } else {\n                            // Update inline progress\n                            pbDownloadProgress.progress = percent\n                            tvDownloadPercent.text = \"${String.format(\"%.0f\", percent.toFloat() / 100)}%\"\n                        }\n                    }\n                }\n\n                fun reportProgress(force: Boolean = false) {\n                    val now = System.currentTimeMillis()\n                    if (force || now - lastProgressTime > progressInterval) {\n                        val elapsedMs = now - startTime\n                        val downloaded = alreadyDownloaded.values.sum()\n                        val percent =\n                            if (totalBytes > 0) ((downloaded * 100 * 100) / totalBytes).toInt() else 0\n                        val speedAvg =\n                            if (elapsedMs > 0) downloaded / (elapsedMs / 1000.0) else 0.0\n                        val etaSec =\n                            if (speedAvg > 0) ((totalBytes - downloaded) / speedAvg).toLong() else -1L\n                        val speedStr = if (speedAvg > 1024 * 1024) {\n                            String.format(\"%.2f MB/s\", speedAvg / (1024 * 1024))\n                        } else {\n                            String.format(\"%.1f KB/s\", speedAvg / 1024)\n                        }\n                        Log.d(TAG, \"download percent:$percent\")\n                        onProgress(selectModelId, percent, downloaded, totalBytes, etaSec, speedStr)\n                        lastProgressTime = now\n                    }\n                }\n                \n                // Function to start download for a list of files\n                fun startDownload(\n                    downloadFiles: List<DownloadableFile>,\n                    isFallbackAttempt: Boolean = false\n                ) {\n                    if (downloadFiles.isEmpty()) {\n                        if (failedDownloads.isEmpty()) {\n                            // All downloads complete\n                            downloadState = DownloadState.IDLE\n                            onProgress(selectModelId, 100 * 100, totalBytes, totalBytes, 0, \"0 KB/s\")\n                        } else {\n                            runOnUiThread {\n                                showDownloadFailed(\"Download failed for some files.\")\n                            }\n                        }\n                        return\n                    }\n                    \n                    val queueSet = DownloadContext.QueueSet()\n                        .setParentPathFile(downloadFiles[0].file.parentFile)\n                        .setMinIntervalMillisCallbackProcess(300)\n                    val builder = queueSet.commit()\n                    \n                    downloadFiles.forEach { item ->\n                        val taskBuilder = DownloadTask.Builder(item.url, item.file)\n                        getHfToken(selectModelData, item.url)?.let {\n                            taskBuilder.addHeader(\"Authorization\", \"Bearer $it\")\n                        }\n                        val task = taskBuilder.build()\n                        task.info?.let {\n                            alreadyDownloaded[it.url] = it.totalOffset\n                        }\n                        builder.bindSetTask(task)\n                    }\n                    \n                    val totalCount = filesToDownload.size\n                    var currentCount = filesToDownload.size - downloadFiles.size // Already completed\n                    val pendingFallbacks = mutableListOf<DownloadableFile>()\n\n                    downloadContext = builder.setListener(createDownloadContextListener {}).build()\n                    downloadContext?.start(\n                        createListener1(taskStart = { task, _ ->\n                            Log.d(TAG, \"download task ${task.id} Start${if (isFallbackAttempt) \" (fallback)\" else \"\"}\")\n                        }, retry = { task, _ ->\n                            Log.d(TAG, \"download task ${task.id} retry\")\n                        }, connected = { task, _, _, _ ->\n                            Log.d(TAG, \"download task ${task.id} connected\")\n                        }, progress = { task, currentOffset, totalLength ->\n                            Log.d(TAG, \"download task ${task.id} progress $currentOffset $totalLength\")\n                            alreadyDownloaded[task.url] = currentOffset\n                            reportProgress(true)\n                        }) { task, cause, exception, _ ->\n                            when(cause) {\n                                EndCause.CANCELED -> {\n                                    // do nothing\n                                }\n\n                                EndCause.COMPLETED -> {\n                                    Log.d(TAG, \"download task ${task.id} end\")\n                                    currentCount += 1\n                                    Log.d(TAG, \"download task process currentCount:$currentCount, totalCount:$totalCount\")\n                                    \n                                    // Check if all current batch is done\n                                    val batchCompleted = downloadFiles.all { df ->\n                                        df.url == task.url || df.file.exists()\n                                    }\n                                    \n                                    if (currentCount >= totalCount) {\n                                        downloadState = DownloadState.IDLE\n                                        onProgress(selectModelId, 100 * 100, totalBytes, totalBytes, 0, \"0 KB/s\")\n                                    }\n                                }\n\n                                else -> {\n                                    Log.e(TAG, \"download task ${task.id} error: $cause, ${exception?.message}\")\n                                    \n                                    // Try fallback URL if available and not already a fallback attempt\n                                    if (!isFallbackAttempt) {\n                                        val fallbackUrl = fallbackUrlMap[task.url]\n                                        if (fallbackUrl != null && fallbackUrl != task.url && task.file != null) {\n                                            Log.w(TAG, \"Primary download failed, queuing fallback: ${task.file?.name}\")\n                                            pendingFallbacks.add(DownloadableFile(task.file!!, fallbackUrl))\n                                        } else {\n                                            // No fallback available, mark as failed\n                                            val failedFile = filesToDownloadWithFallback.find { it.primaryUrl == task.url }\n                                            if (failedFile != null) {\n                                                failedDownloads.add(failedFile)\n                                            }\n                                        }\n                                    } else {\n                                        // Fallback also failed\n                                        val failedFile = filesToDownloadWithFallback.find { \n                                            it.primaryUrl == task.url || it.fallbackUrl == task.url \n                                        }\n                                        if (failedFile != null) {\n                                            failedDownloads.add(failedFile)\n                                        }\n                                    }\n                                    \n                                    // Check if batch is done (including failures)\n                                    currentCount += 1\n                                    if (currentCount >= totalCount && pendingFallbacks.isEmpty()) {\n                                        if (failedDownloads.isEmpty()) {\n                                            downloadState = DownloadState.IDLE\n                                            onProgress(selectModelId, 100 * 100, totalBytes, totalBytes, 0, \"0 KB/s\")\n                                        } else {\n                                            runOnUiThread {\n                                                showDownloadFailed(\"Download failed for ${failedDownloads.size} file(s).\")\n                                            }\n                                        }\n                                    } else if (pendingFallbacks.isNotEmpty()) {\n                                        // Start fallback downloads\n                                        Log.d(TAG, \"Starting ${pendingFallbacks.size} fallback downloads\")\n                                        modelScope.launch {\n                                            startDownload(pendingFallbacks.toList(), isFallbackAttempt = true)\n                                        }\n                                        pendingFallbacks.clear()\n                                    }\n                                }\n                            }\n                        }, true\n                    )\n                }\n                \n                // Start initial download with primary URLs (using filtered list that excludes failed non-critical files)\n                startDownload(filteredFilesToDownload)\n            }\n        }\n    }\n\n    private fun unloadModel(showUnloadTip: Boolean = true) {\n        val handleUnloadResult = fun(result: Int) {\n            resetLoadState()\n            runOnUiThread {\n                binding.btnClearHistory.callOnClick()\n                changeOperationUI(OperationState.DOWNLOADED)\n                vTip.visibility = View.GONE\n                btnAddImage.visibility = View.INVISIBLE\n                btnAudioRecord.visibility = View.INVISIBLE\n                if (showUnloadTip) {\n                    Toast.makeText(\n                        this@MainActivity, if (result == 0) {\n                            \"unload success\"\n                        } else {\n                            \"unload failed and error code: $result\"\n                        }, Toast.LENGTH_SHORT\n                    ).show()\n                }\n            }\n        }\n        modelScope.launch {\n            if (isLoadVlmModel) {\n                vlmWrapper.stopStream()\n                vlmWrapper.destroy()\n                vlmChatList.clear()\n                // TODO:\n                handleUnloadResult(0)\n            } else if (isLoadEmbedderModel) {\n                // ADD: Unload embedder\n                embedderWrapper!!.destroy()\n                runOnUiThread {\n                    binding.ivTopk.visibility = View.GONE\n                    supportFragmentManager.beginTransaction().apply {\n                        supportFragmentManager.fragments.forEach {\n                            if (it is IndexFragment) {\n                                this.remove(it)\n                            }\n                        }\n                    }.commit()\n                }\n                // TODO:\n                handleUnloadResult(0)\n            } else if (isLoadRerankerModel) {\n                // ADD: Unload reranker\n                handleUnloadResult(rerankerWrapper.destroy())\n            } else if (isLoadCVModel) {\n                // ADD: Unload CV model\n                cvWrapper.destroy()\n                // TODO:\n                handleUnloadResult(0)\n            } else if (isLoadAsrModel) {\n                // ADD: Unload ASR model\n                asrWrapper.destroy()\n                // TODO:\n                handleUnloadResult(0)\n            } else if (isLoadLlmModel) {\n                llmWrapper.stopStream()\n                llmWrapper.destroy()\n                chatList.clear()\n                // TODO:\n                handleUnloadResult(0)\n            } else {\n                handleUnloadResult(0)\n            }\n        }\n    }\n\n    private var isEmbedProfillingResultExpand = true\n    private fun setListeners() {\n        binding.btnTestEmbed.setOnClickListener {\n            if (PermissionUtil.checkManageStoragePermission(this)) {\n                selectFolderResult.launch(Intent(this, FolderActivity::class.java).apply {\n                    this.putExtra(FolderActivity.KEY_SELECT_TYPE, 1)\n                })\n            } else {\n                PermissionUtil.showRequestManageStoragePermissionDialog(this as ComponentActivity)\n            }\n        }\n        binding.btnEmbedClear.setOnClickListener {\n            embedResultList.clear()\n            embedFiles.clear()\n            binding.llEmbedProfilling.visibility = View.GONE\n            binding.tvDatabaseInfo.text = formatFilesInSearch()\n            updateEmbedClearButtonVisibility()\n        }\n        updateEmbedClearButtonVisibility()\n        binding.llEmbedResultTitle.setOnClickListener {\n            isEmbedProfillingResultExpand = !isEmbedProfillingResultExpand\n            binding.ivEmbedExpand.setImageResource(if (isEmbedProfillingResultExpand) R.drawable.icon_arrow_down else R.drawable.icon_arrow_right)\n            binding.tvEmbedProfilling.visibility =\n                if (isEmbedProfillingResultExpand) View.VISIBLE else View.GONE\n        }\n\n        binding.ivClose.setOnClickListener {\n            binding.llCitations.visibility = View.GONE\n        }\n\n        binding.ivConfig.setOnClickListener {\n            val chunkSize = RAGConfig.CHUNK_SIZE\n            val nChunk = RAGConfig.N_CHUNKS\n            var newChunkSize = chunkSize\n            var newNChunk = nChunk\n\n            val configBinding = DialogConfigBinding.inflate(layoutInflater)\n            fun checkChangedConfig() {\n                if (chunkSize != newChunkSize || nChunk != newNChunk) {\n                    configBinding.btnReIndex.isEnabled = true\n                    configBinding.tvConfigChangedTip.visibility = View.VISIBLE\n                } else {\n                    configBinding.btnReIndex.isEnabled = false\n                    configBinding.tvConfigChangedTip.visibility = View.GONE\n                }\n            }\n            configBinding.acsChunkSize.max = RAGConfig.DEFAULT_MAX_CHUNK_SIZE\n            configBinding.acsChunkSize.min = RAGConfig.DEFAULT_MIN_CHUNK_SIZE\n            configBinding.acsChunkSize.progress = RAGConfig.CHUNK_SIZE\n            configBinding.etChunkSize.setText(\"${RAGConfig.CHUNK_SIZE}\")\n            configBinding.etNChunk.setText(\"${RAGConfig.N_CHUNKS}\")\n            configBinding.acsChunkSize.setOnSeekBarChangeListener(object :\n                SeekBar.OnSeekBarChangeListener {\n                override fun onProgressChanged(\n                    seekBar: SeekBar?,\n                    progress: Int,\n                    fromUser: Boolean\n                ) {\n                    if (fromUser) {\n                        configBinding.etChunkSize.setText(\"$progress\")\n                    }\n                    newChunkSize = progress\n                    checkChangedConfig()\n                }\n\n                override fun onStartTrackingTouch(seekBar: SeekBar?) {\n                }\n\n                override fun onStopTrackingTouch(seekBar: SeekBar?) {\n                }\n\n            })\n            configBinding.etChunkSize.addTextChangedListener(object : TextWatcher {\n                override fun afterTextChanged(s: Editable?) {\n                    s?.let {\n                        val temp = s.toString()\n                        if (TextUtils.isEmpty(temp)) {\n                            newChunkSize = RAGConfig.DEFAULT_MIN_CHUNK_SIZE\n                        } else {\n                            val inputValue = temp.toIntOrNull() ?: RAGConfig.DEFAULT_MIN_CHUNK_SIZE\n                            newChunkSize = inputValue.coerceIn(RAGConfig.DEFAULT_MIN_CHUNK_SIZE, RAGConfig.DEFAULT_MAX_CHUNK_SIZE)\n                            if (configBinding.acsChunkSize.progress != newChunkSize) {\n                                configBinding.acsChunkSize.progress = newChunkSize\n                            }\n                        }\n                        checkChangedConfig()\n                    }\n                }\n\n                override fun beforeTextChanged(\n                    s: CharSequence?,\n                    start: Int,\n                    count: Int,\n                    after: Int\n                ) {\n                }\n\n                override fun onTextChanged(\n                    s: CharSequence?,\n                    start: Int,\n                    before: Int,\n                    count: Int\n                ) {\n                }\n\n            })\n            configBinding.etChunkSize.setOnFocusChangeListener { _, hasFocus ->\n                if (!hasFocus) {\n                    // When losing focus, correct the displayed value to the valid range\n                    val currentText = configBinding.etChunkSize.text.toString()\n                    val inputValue = currentText.toIntOrNull() ?: RAGConfig.DEFAULT_MIN_CHUNK_SIZE\n                    val correctedValue = inputValue.coerceIn(RAGConfig.DEFAULT_MIN_CHUNK_SIZE, RAGConfig.DEFAULT_MAX_CHUNK_SIZE)\n                    if (inputValue != correctedValue || currentText.isEmpty()) {\n                        configBinding.etChunkSize.setText(\"$correctedValue\")\n                    }\n                }\n            }\n            configBinding.etNChunk.addTextChangedListener(object : TextWatcher {\n                override fun afterTextChanged(s: Editable?) {\n                    s?.let {\n                        val temp = s.toString()\n                        newNChunk = if (TextUtils.isEmpty(temp)) {\n                            0\n                        } else {\n                            temp.toInt()\n                        }\n                        checkChangedConfig()\n                    }\n                }\n\n                override fun beforeTextChanged(\n                    s: CharSequence?,\n                    start: Int,\n                    count: Int,\n                    after: Int\n                ) {\n                }\n\n                override fun onTextChanged(\n                    s: CharSequence?,\n                    start: Int,\n                    before: Int,\n                    count: Int\n                ) {\n                }\n\n            })\n\n            BottomSheetDialog(this, R.style.TransparentBottomSheetDialog).apply {\n                this.setContentView(configBinding.root)\n                this.findViewById<View>(com.google.android.material.R.id.design_bottom_sheet)\n                    ?.setBackgroundColor(Color.TRANSPARENT)\n                configBinding.ivClose.setOnClickListener {\n                    this.dismiss()\n                }\n                configBinding.btnReset.setOnClickListener {\n                    configBinding.acsChunkSize.progress = chunkSize\n                    configBinding.etChunkSize.setText(\"$chunkSize\")\n                    configBinding.etNChunk.setText(\"$nChunk\")\n                }\n                configBinding.btnReIndex.setOnClickListener {\n                    this.dismiss()\n                    RAGConfig.CHUNK_SIZE = newChunkSize\n                    RAGConfig.N_CHUNKS = newNChunk\n                    if (embedFiles.isNotEmpty()) {\n                        embedFiles(embedFiles, true)\n                    }\n                }\n            }.show()\n\n        }\n\n        btnAddImage.setOnClickListener {\n            openGallery()\n        }\n\n        btnAudioRecord.setOnClickListener {\n            startRecord()\n        }\n\n        btnClearHistory.setOnClickListener {\n            clearHistory()\n        }\n        /**\n         * Step 3. download model\n         */\n        // Inline download cancel button\n        btnCancelDownloadInline.setOnClickListener {\n            downloadContext?.stop()\n            downloadState = DownloadState.IDLE\n            downloadingModelData?.downloadableFiles(\n                this@MainActivity,\n                downloadingModelData!!.modelDir(this),\n                modelList\n            )\n                ?.forEach {\n                    it.file.delete()\n                }\n            resetDownloadUI()\n        }\n        // Inline download retry button\n        btnRetryDownloadInline.setOnClickListener {\n            downloadContext?.stop()\n            downloadState = DownloadState.IDLE\n            downloadFailed = false\n            if (downloadingModelData != null) {\n                downloadModel(downloadingModelData!!)\n            }\n        }\n        // Modal download buttons (kept for backward compatibility)\n        binding.btnCancelDownload.setOnClickListener {\n            downloadContext?.stop()\n            downloadState = DownloadState.IDLE\n            tvDownloadProgress.text = \"0%\"\n            downloadingModelData?.downloadableFiles(\n                this@MainActivity,\n                downloadingModelData!!.modelDir(this),\n                modelList\n            )\n                ?.forEach {\n                    it.file.delete()\n                }\n            binding.btnDismissDownload.performClick()\n        }\n        binding.btnRetryDownload.setOnClickListener {\n            downloadContext?.stop()\n            downloadState = DownloadState.IDLE\n            downloadModel(downloadingModelData!!)\n        }\n        binding.btnDismissDownload.setOnClickListener {\n            binding.llDownloading.visibility = View.GONE\n        }\n        btnDownload.setOnClickListener {\n            Log.d(TAG, \"downloadState:$downloadState\")\n            if (downloadState == DownloadState.DOWNLOADING) {\n                if (downloadingModelData?.displayName == spinnerText) {\n                    // Already showing inline progress, do nothing\n                } else {\n                    Toaster.show(\"${downloadingModelData?.displayName} is currently downloading.\")\n                }\n                return@setOnClickListener\n            }\n            val selectModelData = modelList.first { it.displayName == spinnerText }\n            Log.d(TAG, \"selectModelData:${selectModelData.id}\")\n            downloadModel(selectModelData)\n        }\n        /**\n         * Step 4. load model\n         */\n        btnLoadModel.setOnClickListener {\n            unloadModel(false)\n            var selectModelData = modelList.first { it.displayName == spinnerText }\n            if (selectModelData == null) {\n                Toast.makeText(this@MainActivity, \"model not selected\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n            Log.d(TAG, \"current select model data:$selectModelData\")\n//            if (hasLoadedModel()) {\n//                Toast.makeText(this@MainActivity, \"please unload first\", Toast.LENGTH_SHORT).show()\n//                return@setOnClickListener\n//            }\n\n            // Check if model files exist locally before attempting to load\n            val fileName = isModelDownloaded(selectModelData)\n            if (fileName != null) {\n                Toaster.showLong(\"The \\\"$fileName\\\" file is missing. Please download it first.\")\n                return@setOnClickListener\n            }\n\n            vTip.visibility = View.VISIBLE\n            llLoading.visibility = View.VISIBLE\n\n            val supportPluginIds = selectModelData.getSupportPluginIds()\n            Log.d(TAG, \"support plugin_id:$supportPluginIds\")\n            var modelDataPluginId = \"npu\"\n            var nGpuLayers = 0\n            if (supportPluginIds.size > 1) {\n                val dialogBinding = DialogSelectPluginIdBinding.inflate(layoutInflater)\n                supportPluginIds.forEach {\n//                    when (it) {\n//                        \"cpu\" -> {\n//                            dialogBinding.rbCpu.visibility = View.VISIBLE\n//                            dialogBinding.rbCpu.isChecked = true\n//                        }\n//\n//                        \"gpu\" -> {\n//                            dialogBinding.rbGpu.visibility = View.VISIBLE\n//                        }\n//\n//                        \"npu\" -> {\n//                            dialogBinding.rbNpu.visibility = View.VISIBLE\n//                            dialogBinding.rbNpu.isChecked = true\n//                        }\n//                    }\n                }\n                dialogBinding.rgSelectPluginId.setOnCheckedChangeListener { group, checkedId ->\n//                    dialogBinding.llGpuLayers.visibility =\n//                        if (checkedId == R.id.rb_gpu) View.VISIBLE else View.GONE\n                    when (checkedId) {\n                        R.id.rb_npu -> {\n                            modelDataPluginId = \"npu\"\n                        }\n\n                        R.id.rb_gpu -> {\n                            modelDataPluginId = \"gpu\"\n                        }\n\n                        R.id.rb_cpu -> {\n                            modelDataPluginId = \"cpu\"\n                        }\n\n                        R.id.rb_npu_llama -> {\n                            modelDataPluginId = \"npu_llama\"\n                        }\n                    }\n                }\n\n                val dialogOnClickListener = object : CustomDialogInterface.OnClickListener() {\n                    override fun onClick(\n                        dialog: DialogInterface?,\n                        which: Int\n                    ) {\n                        nGpuLayers = 0\n                        if (dialogBinding.llGpuLayers.visibility == View.VISIBLE) {\n                            nGpuLayers = dialogBinding.etGpuLayers.text.toString().toInt()\n                            if (nGpuLayers == 0) {\n                                Toast.makeText(\n                                    this@MainActivity,\n                                    \"nGpuLayers min value is 1\",\n                                    Toast.LENGTH_SHORT\n                                ).show()\n                                return\n                            }\n                        }\n                        when (which) {\n                            DialogInterface.BUTTON_POSITIVE -> {\n                                dialog?.dismiss()\n                                loadModel(selectModelData, modelDataPluginId, nGpuLayers)\n                            }\n\n                            DialogInterface.BUTTON_NEGATIVE -> {\n                                llLoading.visibility = View.INVISIBLE\n                                vTip.visibility = View.GONE\n                            }\n                        }\n                    }\n\n                }\n                val alertDialog = AlertDialog.Builder(this).setView(dialogBinding.root)\n//                    .setNegativeButton(\"cancel\", dialogOnClickListener)\n//                    .setPositiveButton(\"sure\", dialogOnClickListener)\n                    .setCancelable(false)\n                    .create()\n                dialogBinding.ivClose.setOnClickListener {\n                    llLoading.visibility = View.INVISIBLE\n                    vTip.visibility = View.GONE\n                    alertDialog.dismiss()\n                }\n                dialogBinding.btnLoad.setOnClickListener {\n                    alertDialog.dismiss()\n                    if (modelDataPluginId != \"npu\") {\n                        selectModelId = selectModelData.dependencies!!.first()\n                        selectModelData = modelList.first { it.id == selectModelId }\n                    }\n                    loadModel(selectModelData, modelDataPluginId, 0)\n                }\n                alertDialog.show()\n                dialogOnClickListener.resetPositiveButton(alertDialog)\n            } else {\n                if (\"npu\" == supportPluginIds[0]) {\n                    modelDataPluginId = \"npu\"\n                }\n                loadModel(selectModelData, modelDataPluginId, nGpuLayers)\n            }\n        }\n\n        /**\n         * Step 5. send message\n         */\n        btnSend.setOnClickListener {\n            if (!hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"please load model first\", Toast.LENGTH_SHORT)\n                    .show()\n                return@setOnClickListener\n            }\n\n            if (savedImageFiles.isNotEmpty()) {\n                messages.add(Message(\"\", MessageType.IMAGES, savedImageFiles.map { it }))\n                reloadRecycleView()\n            }\n\n            val inputString = etInput.text.trim().toString()\n            etInput.setText(\"\")\n            etInput.clearFocus()\n            val imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager\n            imm.hideSoftInputFromWindow(etInput.windowToken, 0)\n\n            if (inputString.isNotEmpty()) {\n                messages.add(Message(inputString, MessageType.USER))\n                reloadRecycleView()\n            }\n\n            val supportFunctionCall = false\n            var tools: String? = null\n            var grammarString: String? = null\n            if (supportFunctionCall) {\n                // if this model support 'function call'\n                tools =\n                    \"[{\\\"type\\\":\\\"function\\\",\\\"function\\\":{\\\"name\\\": \\\"campaign_investigation\\\",\\\"description\\\": \\\"Check campaign limits and determine appropriate action. If customer has reached limit, return a message (hardcoded or generated by model). If limit not reached, contact support.\\\",\\\"parameters\\\": {\\\"type\\\": \\\"object\\\", \\\"properties\\\":{\\\"campaign_name\\\":{\\\"type\\\": \\\"string\\\",\\\"description\\\": \\\"The name of the campaign to investigate\\\"}}, \\\"required\\\":[\\\"campaign_name\\\"]}}}]\"\n                grammarString = \"\"\"\nroot ::= \"<tool_call>\" space object \"</tool_call>\" space\nobject ::= \"{\" space campaign-name-kv \"}\" space\ncampaign-name-kv ::= \"\\\"campaign_name\\\"\" space \":\" space string\nstring ::= \"\\\"\" char* \"\\\"\" space\nchar ::= [^\"\\\\\\x7F\\x00-\\x1F] | [\\\\] ([\"\\\\bfnrt] | \"u\" hex hex hex hex)\nhex ::= [0-9a-fA-F]\nspace ::= | \" \" | \"\\n\" | \"\\r\" | \"\\t\"\n\"\"\"\n            }\n\n            if (!hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"model not loaded\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n\n            retrievedChunksList.clear()\n            binding.btnStop.isEnabled = true\n            modelScope.launch {\n                val selectModelData = modelList.first { it.id == selectModelId }\n                val isNpu = selectModelData.getNexaManifest(this@MainActivity)?.PluginId == \"npu\"\n                Log.d(TAG, \"isNpu: $isNpu\")\n\n                val sb = StringBuilder()\n                if (isLoadCVModel) {\n                    // FIXME: Temporarily select the last image\n                    if (savedImageFiles.isEmpty()) {\n                        runOnUiThread {\n                            Toast.makeText(\n                                this@MainActivity,\n                                \"Please select one picture.\",\n                                Toast.LENGTH_SHORT\n                            ).show()\n                        }\n                        return@launch\n                    }\n                    val imagePath = savedImageFiles.last().absolutePath\n                    messages.add(Message(\"\", MessageType.IMAGES, savedImageFiles))\n                    reloadRecycleView()\n                    clearImages()\n                    cvWrapper.infer(imagePath).onSuccess {\n                        Log.d(\"nfl\", \"infer result:$it\")\n                        runOnUiThread {\n                            val content = it.map { result ->\n                                \"[${result.confidence}] ${result.text}\"\n                            }.toList().joinToString(separator = \"\\n\")\n                            messages.add(Message(content, MessageType.ASSISTANT))\n                            reloadRecycleView()\n                        }\n                    }.onFailure { error ->\n                        runOnUiThread {\n                            messages.add(Message(error.toString(), MessageType.PROFILE))\n                            reloadRecycleView()\n                        }\n                        Log.d(\"nfl\", \"infer result error:$error\")\n                    }\n                } else if (isLoadAsrModel) {\n                    if (audioFile == null) {\n                        runOnUiThread {\n                            Toast.makeText(this@MainActivity, \"no audio file\", Toast.LENGTH_SHORT)\n                                .show()\n                        }\n                    } else {\n//                        val audioFilePath = audioFile!!.absolutePath\n                        val audioFilePath = \"/sdcard/Download/assets/OSR_us_000_0010_16k.wav\"\n                        asrWrapper.transcribe(\n                            AsrTranscribeInput(\n                                audioFilePath,  // Use hardcoded path instead of inputString\n                                \"en\",  // Language code\n                                null   // Optional timestamps\n                            )\n                        ).onSuccess { transcription ->\n                            runOnUiThread {\n                                messages.add(\n                                    Message(\n                                        transcription.result.transcript ?: \"\",\n                                        MessageType.ASSISTANT\n                                    )\n                                )\n                                reloadRecycleView()\n                            }\n                        }.onFailure { error ->\n                            runOnUiThread {\n                                messages.add(\n                                    Message(\n                                        \"Error: ${error.message}\",\n                                        MessageType.PROFILE\n                                    )\n                                )\n                                reloadRecycleView()\n                            }\n                        }\n                    }\n                } else if (isLoadEmbedderModel) {\n                    // ADD: Handle embedder inference\n                    // Input format: single text or multiple texts separated by \"|\"\n                    val texts = inputString.split(\"|\").map { it.trim() }.toTypedArray()\n                    embedderWrapper!!.embed(texts, EmbeddingConfig()).onSuccess { embeddings ->\n                        runOnUiThread {\n                            val result = StringBuilder()\n                            val embeddingDim = embeddings.embeddings.size / texts.size\n\n                            texts.forEachIndexed { idx, text ->\n                                val start = idx * embeddingDim\n                                val end = start + embeddingDim\n                                val embedding = embeddings.embeddings.slice(start until end)\n\n                                // Calculate mean and variance\n                                val mean = embedding.average()\n                                val variance = embedding.map { (it - mean) * (it - mean) }.average()\n\n                                result.append(\"Text ${idx + 1}: \\\"$text\\\"\\n\")\n                                result.append(\"Embedding dimension: $embeddingDim\\n\")\n                                result.append(\"Mean: ${\"%.4f\".format(mean)}\\n\")\n                                result.append(\"Variance: ${\"%.4f\".format(variance)}\\n\")\n                                result.append(\"First 5 values: [\")\n                                result.append(\n                                    embedding.take(5).joinToString(\", \") { \"%.4f\".format(it) })\n                                result.append(\"...]\\n\\n\")\n                            }\n\n                            messages.add(Message(result.toString(), MessageType.ASSISTANT))\n                            reloadRecycleView()\n                        }\n                    }.onFailure { error ->\n                        runOnUiThread {\n                            messages.add(Message(\"Error: ${error.message}\", MessageType.PROFILE))\n                            reloadRecycleView()\n                        }\n                    }\n                } else if (isLoadRerankerModel) {\n                    // Reranker input format: \"query\\ndoc1\\ndoc2\\ndoc3...\"\n                    // First line is query, remaining lines are documents\n                    val query = inputString.split(\"\\n\")[0]  // Get first line as query\n                    val documents =\n                        inputString.split(\"\\n\").drop(1).toTypedArray()  // Get rest as docs\n                    rerankerWrapper.rerank(query, documents, RerankConfig())\n                        .onSuccess { rerankerResult ->\n                            runOnUiThread {\n                                val result = StringBuilder()\n                                result.append(\"Rerank Results:\\n\")\n                                // Sort by score descending to show best matches first\n                                rerankerResult.scores?.withIndex()?.sortedByDescending { it.value }\n                                    ?.forEach { (idx, score) ->\n                                        result.append(\"${idx + 1}. Score: ${\"%.4f\".format(score)}\\n\")\n                                        result.append(\"   ${documents[idx]}\\n\\n\")\n                                    }\n                                messages.add(Message(result.toString(), MessageType.ASSISTANT))\n                                reloadRecycleView()\n                            }\n                        }.onFailure { error ->\n                            runOnUiThread {\n                                \"Error: ${error.message}\".also {\n                                    messages.add(Message(it, MessageType.PROFILE))\n                                    reloadRecycleView()\n                                }\n                            }\n                        }\n                } else if (isLoadVlmModel) {\n                    val contents = savedImageFiles.map {\n                        VlmContent(\"image\", it.absolutePath)\n                    }.toMutableList()\n                    audioFile?.let {\n                        contents.add(VlmContent(\"audio\", it.absolutePath))\n                    }\n                    contents.add(VlmContent(\"text\", inputString))\n                    audioFile = null\n                    clearImages()\n                    val sendMsg = VlmChatMessage(role = \"user\", contents = contents)\n                    // VlmContentTransfer(\n                    //     this@MainActivity, VlmContent(\n                    //         \"image\", inputString\n                    //     )\n                    // ).forUrl()\n\n                    // vlmChatList.clear()\n                    vlmChatList.add(sendMsg)\n\n                    Log.d(TAG, \"before apply chat template:$vlmChatList\")\n                    vlmWrapper.applyChatTemplate(vlmChatList.toTypedArray(), tools, enableThinking)\n                        .onSuccess { result ->\n                            Log.d(TAG, \"vlm chat template:${result.formattedText}\")\n                            val baseConfig =\n                                GenerationConfigSample().toGenerationConfig(grammarString)\n                            val configWithMedia = vlmWrapper.injectMediaPathsToConfig(\n                                vlmChatList.toTypedArray(),\n                                baseConfig\n                            )\n\n                            Log.d(TAG, \"Config has ${configWithMedia.imageCount} images\")\n\n                            vlmWrapper.generateStreamFlow(\n                                if (isNpu || true) inputString else result.formattedText,\n                                configWithMedia  // Use the updated config with media paths\n                            ).collect { handleResult(sb, it) }\n                        }.onFailure {\n                            runOnUiThread {\n                                Toast.makeText(\n                                    this@MainActivity, it.message, Toast.LENGTH_SHORT\n                                ).show()\n                            }\n                        }\n                } else {\n                    var embedString = \"\"\n\n                    if (embedResultList.isNotEmpty()) {\n                        val queryEmbedding = GenerateEmbedStringsUtil.embedText(inputString)\n\n                        if (queryEmbedding != null) {\n                            // Calculate similarity scores for all chunks\n                            embedResultList.forEach { embedResultBean ->\n                                embedResultBean.score =\n                                    GenerateEmbedStringsUtil.computeCosineSimilarity(\n                                        queryEmbedding,\n                                        embedResultBean.result\n                                    )\n                                Log.d(\n                                    TAG,\n                                    \"embed score:${embedResultBean.score} path:${embedResultBean.path} chunk:${embedResultBean.chunkIndex}\"\n                                )\n                            }\n                        }\n\n                        // Sort by score and get top N_CHUNKS\n                        embedResultList.sortWith(Comparator { bean, bean1 -> if (bean.score > bean1.score) -1 else 1 })\n                        val topChunks = embedResultList.take(RAGConfig.N_CHUNKS)\n\n                        // Combine chunk texts (display chunk index starting from 1 for UI)\n                        embedString = topChunks.joinToString(\"\\n\\n\") { chunk ->\n                            \"Chunk ${chunk.chunkIndex + 1} from ${File(chunk.path).name}:\\n${chunk.txt ?: \"\"}\"\n                        }\n\n                        // Store all top chunks for multiple citations\n                        retrievedChunksList.addAll(topChunks)\n                    }\n\n                    // Add system prompt for RAG\n                    if (embedResultList.isNotEmpty() && chatList.isEmpty()) {\n                        val systemPrompt =\n                            \"\"\"You are NexaStudio, a local AI agent built by Nexa AI.  Your job is to answer user questions in a neutral, professional, concise tone.\"\"\"\n                        chatList.add(ChatMessage(role = \"system\", systemPrompt))\n                    }\n\n                    // Format user message with RAG template\n                    val userMessage =\n                        if (embedResultList.isNotEmpty() && embedString.isNotEmpty()) {\n                            \"\"\"User query: $inputString\n---\n\nContext from files: \n$embedString\n---\n\nProvide an answer to the user query based on the context information.\"\"\"\n                        } else {\n                            inputString\n                        }\n\n                    chatList.add(ChatMessage(role = \"user\", userMessage))\n                    // Apply chat template and generate\n                    llmWrapper.applyChatTemplate(\n                        chatList.toTypedArray(),\n                        tools,\n                        enableThinking\n                    ).onSuccess { templateOutput ->\n                        Log.d(TAG, \"chat template:${templateOutput.formattedText}\")\n                        // Store the formatted prompt for display\n                        lastFormattedPrompt = templateOutput.formattedText\n                        // Fixed: Always use templateOutput.formattedText which contains RAG context\n                        llmWrapper.generateStreamFlow(\n                            templateOutput.formattedText,\n                            GenerationConfigSample().toGenerationConfig(grammarString)\n                        ).collect { streamResult ->\n                            handleResult(sb, streamResult)\n                        }\n                    }.onFailure { error ->\n                        runOnUiThread {\n                            Toast.makeText(\n                                this@MainActivity, error.message, Toast.LENGTH_SHORT\n                            ).show()\n                        }\n                    }\n                }\n\n                clearImages()\n\n                runOnUiThread {\n                    binding.btnStop.isEnabled = false\n                }\n            }\n\n        }\n\n        /**\n         * Step 6. others\n         */\n        btnUnloadModel.setOnClickListener {\n            binding.flIndex.visibility = View.GONE\n            if (!hasLoadedModel()) {\n                Toast.makeText(this@MainActivity, \"model not loaded\", Toast.LENGTH_SHORT).show()\n                return@setOnClickListener\n            }\n            // Unload model and cleanup\n            unloadModel()\n        }\n        btnStop.setOnClickListener {\n            if (!hasLoadedModel()) {\n                Toast.makeText(\n                    this@MainActivity,\n                    \"model not loaded\",\n                    Toast.LENGTH_SHORT\n                ).show()\n                return@setOnClickListener\n            }\n            // MODIFY: Stop button only works for LLM/VLM (not embedder/reranker)\n            if (isLoadEmbedderModel || isLoadRerankerModel || isLoadAsrModel || isLoadCVModel) {\n                Toast.makeText(\n                    this@MainActivity,\n                    \"Stop not applicable for embedder/reranker/asr/cv\",\n                    Toast.LENGTH_SHORT\n                ).show()\n                return@setOnClickListener\n            }\n            // Stop streaming\n            modelScope.launch {\n                if (isLoadVlmModel) {\n                    vlmWrapper.stopStream()\n                } else if (isLoadLlmModel) {\n                    llmWrapper.stopStream()\n                }\n            }\n        }\n        binding.ivTopk.setOnClickListener {\n            val topKBinding = DialogTopkConfigBinding.inflate(layoutInflater)\n            topKBinding.acsTopk.progress = IndexFragment.embedTopK\n            topKBinding.etTopk.setText(\"${IndexFragment.embedTopK}\")\n            topKBinding.acsTopk.setOnSeekBarChangeListener(object :\n                SeekBar.OnSeekBarChangeListener {\n                override fun onProgressChanged(\n                    seekBar: SeekBar?,\n                    progress: Int,\n                    fromUser: Boolean\n                ) {\n                    IndexFragment.embedTopK = progress\n                    topKBinding.etTopk.setText(\"${IndexFragment.embedTopK}\")\n                }\n\n                override fun onStartTrackingTouch(seekBar: SeekBar?) {\n                }\n\n                override fun onStopTrackingTouch(seekBar: SeekBar?) {\n                }\n\n            })\n            BottomSheetDialog(this, R.style.TransparentBottomSheetDialog).apply {\n                this.setContentView(topKBinding.root)\n                this.findViewById<View>(com.google.android.material.R.id.design_bottom_sheet)\n                    ?.setBackgroundColor(Color.TRANSPARENT)\n                topKBinding.ivClose.setOnClickListener {\n                    this.dismiss()\n                }\n            }.show()\n        }\n    }\n\n    fun handleResult(sb: StringBuilder, streamResult: LlmStreamResult) {\n        when (streamResult) {\n            is LlmStreamResult.Token -> {\n                runOnUiThread {\n                    sb.append(streamResult.text)\n                    Message(sb.toString(), MessageType.ASSISTANT).let { lastMsg ->\n                        val size = messages.size\n                        messages[size - 1].let { msg ->\n                            if (msg.type != MessageType.ASSISTANT) {\n                                messages.add(lastMsg)\n                            } else {\n                                messages[size - 1] = lastMsg\n                            }\n                        }\n                    }\n                    adapter.notifyDataSetChanged()\n                }\n                Log.d(TAG, \"Token: ${streamResult.text}\")\n            }\n\n            is LlmStreamResult.Completed -> {\n                if (isLoadVlmModel) {\n                    vlmChatList.add(\n                        VlmChatMessage(\n                            \"assistant\",\n                            listOf(VlmContent(\"text\", sb.toString()))\n                        )\n                    )\n                } else {\n                    chatList.add(ChatMessage(\"assistant\", sb.toString()))\n                }\n\n                runOnUiThread {\n                    var content = sb.toString()\n                    val size = messages.size\n                    messages[size - 1] = Message(content, MessageType.ASSISTANT)\n\n                    val ttft = String.format(null, \"%.2f\", streamResult.profile.ttftMs)\n                    val promptTokens = streamResult.profile.promptTokens\n                    val prefillSpeed =\n                        String.format(null, \"%.2f\", streamResult.profile.prefillSpeed)\n\n                    val generatedTokens = streamResult.profile.generatedTokens\n                    val decodingSpeed =\n                        String.format(null, \"%.2f\", streamResult.profile.decodingSpeed)\n\n                    val profileData =\n                        \"TTFT: $ttft ms; Prompt Tokens: $promptTokens; \\nPrefilling Speed: $prefillSpeed tok/s\\nGenerated Tokens: $generatedTokens; Decoding Speed: $decodingSpeed tok/s\"\n                    messages.add(\n                        Message(\n                            profileData,\n                            MessageType.PROFILE,\n                            retrievedChunks = retrievedChunksList.toList(),  // Pass all retrieved chunks for multiple citations\n                            formattedPrompt = lastFormattedPrompt  // Pass the formatted prompt\n                        )\n                    )\n                    reloadRecycleView()\n                }\n                Log.d(TAG, \"Completed: ${streamResult.profile}\")\n            }\n\n            is LlmStreamResult.Error -> {\n                runOnUiThread {\n                    val content =\n                        \"your conversation is out of model’s context length, please start a new conversation or click clear button\"\n                    messages.add(Message(content, MessageType.PROFILE))\n                    reloadRecycleView()\n                }\n                Log.d(TAG, \"Error: $streamResult\")\n            }\n        }\n    }\n\n    private fun okdownload() {\n        val okDownloadBuilder = OkDownload.Builder(this)\n        val factory = DownloadOkHttp3Connection.Factory()\n        factory.setBuilder(getUnsafeOkHttpClient())\n        okDownloadBuilder.connectionFactory(factory)\n        try {\n            OkDownload.setSingletonInstance(okDownloadBuilder.build())\n        } catch (e: java.lang.Exception) {\n            Log.e(\"download\", \"download init failed\")\n        }\n    }\n\n    private fun getUnsafeOkHttpClient(): OkHttpClient.Builder {\n        try {\n            val x509m: X509TrustManager = object : X509TrustManager {\n                override fun getAcceptedIssuers(): Array<X509Certificate?>? {\n                    //Note: Cannot return null here, otherwise it will throw an error\n                    val x509Certificates = arrayOfNulls<X509Certificate>(0)\n                    return x509Certificates\n                }\n\n                @Throws(CertificateException::class)\n                override fun checkServerTrusted(\n                    chain: Array<X509Certificate?>?, authType: String?\n                ) {\n// Do not throw exception to trust all server certificates\n                }\n\n                @Throws(CertificateException::class)\n                override fun checkClientTrusted(\n                    chain: Array<X509Certificate?>?, authType: String?\n                ) {\n// Default trust mechanism\n                }\n            }\n            // Create a TrustManager that trusts all certificates\n            val trustAllCerts = arrayOf<TrustManager>(x509m)\n\n            // Initialize SSLContext\n            val sslContext = SSLContext.getInstance(\"SSL\")\n            sslContext.init(null, trustAllCerts, SecureRandom())\n\n            // Create SSLSocketFactory\n            val sslSocketFactory: SSLSocketFactory = sslContext.getSocketFactory()\n\n            // Build OkHttpClient\n            return OkHttpClient.Builder().sslSocketFactory(\n                sslSocketFactory, (trustAllCerts[0] as X509TrustManager?)!!\n            ).hostnameVerifier { hostname: String?, session: SSLSession? -> true }\n        } catch (e: Exception) {\n            throw RuntimeException(e)\n        }\n    }\n\n    private fun openGallery() {\n        val intent = Intent(Intent.ACTION_PICK, null)\n        intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, \"image/*\")\n        startActivityForResult(intent, 1)\n    }\n\n    override fun onRequestPermissionsResult(\n        requestCode: Int,\n        permissions: Array<out String>,\n        grantResults: IntArray\n    ) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n\n        if (requestCode == 0) {\n            if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n                openGallery()\n            } else {\n                Toast.makeText(this, \"Not allow\", Toast.LENGTH_SHORT).show()\n            }\n        } else if (requestCode == 2001) {\n            if (grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n                openCamera()\n            } else {\n                Toast.makeText(this, \"Camera not allow\", Toast.LENGTH_SHORT).show()\n            }\n        }\n    }\n\n    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {\n        super.onActivityResult(requestCode, resultCode, data)\n\n        var bitmap: Bitmap? = null\n        if (requestCode == 1) {\n            if (resultCode == Activity.RESULT_OK && data != null) {\n                val inputStream = contentResolver.openInputStream(data.data!!)\n                bitmap = BitmapFactory.decodeStream(inputStream)\n            }\n        } else if (requestCode == 1001 && resultCode == Activity.RESULT_OK) {\n            photoFile?.let {\n                bitmap = BitmapFactory.decodeFile(it.absolutePath)\n            }\n        }\n\n        bitmap?.let {\n            try {\n                val file = File(filesDir, \"chat_${System.currentTimeMillis()}.jpg\")\n                val success = saveBitmapToFile(it, file)\n                if (success) {\n                    Log.d(TAG, \"Save success：${file.absolutePath}\")\n                    savedImageFiles.add(file)\n                    refreshTopScrollContainer()\n                } else {\n                    Toast.makeText(this, \"Save Image failed\", Toast.LENGTH_SHORT).show()\n                }\n            } catch (e: FileNotFoundException) {\n                e.printStackTrace()\n            }\n        }\n    }\n\n    private fun saveBitmapToFile(bitmap: Bitmap, file: File): Boolean {\n        return try {\n            val tempDir = File(this.filesDir, \"tmp\").apply { if (!exists()) mkdirs() }\n\n            val tempFile = File(\n                tempDir,\n                \"tmp_${System.currentTimeMillis()}.jpg\"\n            )\n            FileOutputStream(tempFile).use { out ->\n                bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out)\n            }\n\n            val outFile = File(\n                tempDir,\n                \"out_${System.currentTimeMillis()}.jpg\"\n            )\n            ImgUtil.squareCrop(\n                ImgUtil.downscaleAndSave(\n                    imageFile = tempFile,\n                    outFile = outFile,\n                    maxSize = 448,\n                    format = Bitmap.CompressFormat.JPEG,\n                    quality = 90\n                ), file, 448\n            )\n            true\n        } catch (e: Exception) {\n            e.printStackTrace()\n            false\n        }\n    }\n\n    private fun stopRecord(cancel: Boolean) {\n        wavRecorder?.stopRecording()\n        wavRecorder = null\n        bottomPanel.visibility = View.GONE\n        if (cancel) {\n            audioFile = null\n        }\n        refreshTopScrollContainer()\n    }\n\n    private fun startRecord() {\n        bottomPanel.visibility = View.VISIBLE\n\n        val file = File(filesDir, \"audio\")\n        if (!file.exists()) {\n            file.mkdirs()\n        }\n        audioFile =\n            File(file, \"audio_${System.currentTimeMillis()}.wav\")\n        Log.d(TAG, \"audioFile: ${audioFile!!.absolutePath}\")\n        wavRecorder = WavRecorder()\n\n        wavRecorder?.startRecording(audioFile!!)\n    }\n\n    private fun clearHistory() {\n        if (isLoadLlmModel) {\n            chatList.clear()\n            modelScope.launch {\n                llmWrapper.reset()\n            }\n        }\n        if (isLoadVlmModel) {\n            vlmChatList.clear()\n            modelScope.launch {\n                vlmWrapper.reset()\n            }\n        }\n        messages.clear()\n        audioFile = null\n        clearImages()\n        reloadRecycleView()\n    }\n\n    private var popupWindow: PopupWindow? = null\n    private fun showPopupMenu(anchorView: View) {\n        if (popupWindow?.isShowing == true) {\n            popupWindow?.dismiss()\n            return\n        }\n\n        val popupView = LayoutInflater.from(this).inflate(R.layout.menu_layout, null)\n\n        popupWindow = PopupWindow(\n            popupView,\n            anchorView.width * 2,\n            android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\n            true\n        )\n\n        popupWindow?.isOutsideTouchable = true\n        popupWindow?.elevation = 10f\n\n        val btnCamera = popupView.findViewById<Button>(R.id.btn_camera)\n        val btnPhoto = popupView.findViewById<Button>(R.id.btn_photo)\n\n        btnCamera.setOnClickListener {\n            popupWindow?.dismiss()\n            checkAndOpenCamera()\n        }\n        btnPhoto.setOnClickListener {\n            popupWindow?.dismiss()\n            openGallery()\n        }\n\n        popupView.measure(\n            View.MeasureSpec.UNSPECIFIED,\n            View.MeasureSpec.UNSPECIFIED\n        )\n        val popupHeight = popupView.measuredHeight\n        popupWindow?.showAsDropDown(anchorView, 0, -anchorView.height - popupHeight)\n    }\n\n    private var photoUri: Uri? = null\n    private var photoFile: File? = null\n\n    private fun checkAndOpenCamera() {\n        if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA)\n            != PackageManager.PERMISSION_GRANTED\n        ) {\n            ActivityCompat.requestPermissions(\n                this,\n                arrayOf(Manifest.permission.CAMERA),\n                2001\n            )\n        } else {\n            openCamera()\n        }\n    }\n\n    private fun openCamera() {\n        val intent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)\n        photoFile = File(\n            getExternalFilesDir(Environment.DIRECTORY_PICTURES),\n            \"photo_${System.currentTimeMillis()}.jpg\"\n        )\n        photoUri = FileProvider.getUriForFile(\n            this,\n            \"${applicationContext.packageName}.fileprovider\",\n            photoFile!!\n        )\n\n        intent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri)\n        intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION)\n        startActivityForResult(intent, 1001)\n    }\n\n    private fun clearImages() {\n        savedImageFiles.clear()\n        refreshTopScrollContainer()\n    }\n\n    private fun refreshTopScrollContainer() {\n        runOnUiThread {\n            topScrollContainer.removeAllViews()\n            if (savedImageFiles.isEmpty() && audioFile == null) {\n                scrollImages.visibility = View.GONE\n                return@runOnUiThread\n            }\n\n            scrollImages.visibility = View.VISIBLE\n\n            for (file in savedImageFiles) {\n                val itemView = LayoutInflater.from(this)\n                    .inflate(R.layout.item_image_scroll, topScrollContainer, false)\n                val ivImage = itemView.findViewById<ImageView>(R.id.iv_image)\n                val btnRemove = itemView.findViewById<ImageButton>(R.id.btn_remove)\n\n                ivImage.setImageURI(Uri.fromFile(file))\n\n                btnRemove.setOnClickListener {\n                    savedImageFiles.remove(file)\n                    refreshTopScrollContainer()\n                }\n                topScrollContainer.addView(itemView)\n            }\n\n            if (audioFile != null) {\n                val audioView = LayoutInflater.from(this)\n                    .inflate(R.layout.item_audio_scroll, topScrollContainer, false)\n                val audioName = audioView.findViewById<TextView>(R.id.tv_audio_name)\n                val audioType = audioView.findViewById<TextView>(R.id.tv_audio_type)\n                val btnRemove = audioView.findViewById<ImageButton>(R.id.btn_audio_remove)\n                audioName.text = audioFile!!.name\n                // TODO: hard code\n                audioType.text = \"wav\"\n\n                btnRemove.setOnClickListener {\n                    audioFile = null\n                    refreshTopScrollContainer()\n                }\n                topScrollContainer.addView(audioView)\n            }\n        }\n    }\n\n    private fun reloadRecycleView() {\n        adapter.notifyDataSetChanged()\n        binding.rvChat.scrollToPosition(messages.size - 1)\n    }\n\n    companion object {\n        private const val TAG = \"MainActivity\"\n    }\n\n    private enum class OperationState {\n        DEFAULT, DOWNLOADED, LOADED\n    }\n\n    private fun changeOperationUI(state: OperationState) {\n        when (state) {\n            OperationState.DOWNLOADED -> {\n                binding.spModelList.isEnabled = true\n                binding.ivDeviceTag.visibility = View.INVISIBLE\n\n                binding.btnDownload.visibility = View.GONE\n                binding.btnLoadModel.visibility = View.VISIBLE\n                binding.btnLoadModel.text = \"Load\"\n                binding.btnUnloadModel.visibility = View.VISIBLE\n                binding.btnUnloadModel.isEnabled = false\n                binding.btnStop.visibility = View.VISIBLE\n                binding.btnStop.isEnabled = false\n\n                binding.btnTestEmbed.isEnabled = false\n            }\n\n            OperationState.LOADED -> {\n                binding.spModelList.isEnabled = false\n                binding.ivDeviceTag.visibility = View.VISIBLE\n\n                binding.btnDownload.visibility = View.GONE\n                binding.btnLoadModel.visibility = View.VISIBLE\n                binding.btnLoadModel.text = pluginType.uppercase()\n                binding.btnUnloadModel.visibility = View.VISIBLE\n                binding.btnUnloadModel.isEnabled = true\n                binding.btnStop.visibility = View.VISIBLE\n                binding.btnStop.isEnabled = false\n\n                binding.btnTestEmbed.isEnabled = true\n            }\n\n            else -> {\n                binding.spModelList.isEnabled = true\n                binding.ivDeviceTag.visibility = View.INVISIBLE\n\n                // Check if current model is downloading\n                val isCurrentModelDownloading = downloadState == DownloadState.DOWNLOADING &&\n                    downloadingModelData?.displayName == spinnerText\n                if (isCurrentModelDownloading) {\n                    llControlButtonsRow.visibility = View.GONE\n                    llDownloadProgress.visibility = View.VISIBLE\n                } else {\n                    llControlButtonsRow.visibility = View.VISIBLE\n                    llDownloadProgress.visibility = View.GONE\n                    binding.btnDownload.visibility = View.VISIBLE\n                }\n                binding.btnLoadModel.visibility = View.GONE\n                binding.btnLoadModel.text = \"Load\"\n                binding.btnUnloadModel.visibility = View.GONE\n                binding.btnStop.visibility = View.GONE\n\n                binding.btnTestEmbed.isEnabled = false\n            }\n        }\n    }\n\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/MyApplication.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport android.app.Application\nimport com.hjq.toast.Toaster\n\nclass MyApplication: Application() {\n\n    override fun onCreate() {\n        super.onCreate()\n        Toaster.init(this)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/RAGConfig.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\n/**\n * Configuration for RAG (Retrieval-Augmented Generation) system\n */\nobject RAGConfig {\n    const val DEFAULT_MAX_CHUNK_SIZE = 512\n    const val DEFAULT_MIN_CHUNK_SIZE = 16\n    // Chunk size in words\n    var CHUNK_SIZE = 128\n    \n    // Number of chunks to retrieve for each query\n    var N_CHUNKS = 6\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/activity/FileContentActivity.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.activity\n\nimport android.app.Activity\nimport android.graphics.Color\nimport android.os.Bundle\nimport com.gyf.immersionbar.ktx.immersionBar\nimport com.nexa.demo.databinding.ActivityFileContentBinding\nimport com.nexa.demo.utils.inflate\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.launch\nimport java.io.File\n\nclass FileContentActivity : Activity() {\n\n    private val binding by inflate<ActivityFileContentBinding>()\n    private var filePath: String? = null\n    private var promptContent: String? = null\n    private var title: String? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        immersionBar {\n            statusBarColorInt(Color.WHITE)\n            statusBarDarkFont(true)\n            fitsSystemWindows(true)\n        }\n        filePath = intent.getStringExtra(KEY_FILE_PATH)\n        promptContent = intent.getStringExtra(KEY_PROMPT_CONTENT)\n        title = intent.getStringExtra(KEY_TITLE)\n\n        binding.tvTitle.text = title\n\n        binding.btnBack.setOnClickListener {\n            finish()\n        }\n\n        // Handle either file path or prompt content\n        if (promptContent != null) {\n            // Display prompt content directly\n            binding.tvContent.text = promptContent\n        } else if (filePath != null) {\n            // Read file content\n            CoroutineScope(Dispatchers.IO).launch {\n                val text = File(filePath).readText()\n                runOnUiThread {\n                    binding.tvContent.text = text\n                }\n            }\n        }\n    }\n\n    companion object {\n        const val KEY_FILE_PATH = \"key_file_path\"\n        const val KEY_PROMPT_CONTENT = \"key_prompt_content\"\n        const val KEY_TITLE = \"key_title\"\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/activity/FolderActivity.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.activity\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.graphics.Color\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.View\nimport com.gyf.immersionbar.ktx.immersionBar\nimport com.nexa.demo.adapter.ShowFileDirAdapter\nimport com.nexa.demo.bean.IndexSelectedDirBean\nimport com.nexa.demo.databinding.ActivityFolderBinding\nimport com.nexa.demo.utils.inflate\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.launch\nimport java.io.File\n\nclass FolderActivity : Activity() {\n\n    private val binding by inflate<ActivityFolderBinding>()\n    private val rootDir = File(\"/sdcard\")\n    private lateinit var adapter: ShowFileDirAdapter\n    private lateinit var job: Job\n    private var selectType = 0\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        immersionBar {\n            statusBarColorInt(Color.WHITE)\n            statusBarDarkFont(true)\n            fitsSystemWindows(true)\n        }\n        selectType = intent.getIntExtra(KEY_SELECT_TYPE, 0)\n        binding.btnBack.setOnClickListener {\n            finish()\n        }\n        binding.btnImport.setOnClickListener {\n            adapter.getSelectedImages().let { images ->\n                setResult(RESULT_OK, Intent().apply {\n                    Log.d(\"nfl\", \"return all images:$images\")\n                    this.putStringArrayListExtra(KEY_SELECT_IMAGES, images)\n                })\n            }\n            finish()\n        }\n        job = CoroutineScope(Dispatchers.IO).launch {\n            val showDirs =\n                rootDir.listFiles()!!\n                    .filter { file ->\n                        file.isDirectory && !file.name.startsWith(\".\") &&\n                                file.name != \"Android\" && file.name != \"Alarms\"\n                    }\n                    .sorted()\n                    .map {\n                        IndexSelectedDirBean(it)\n                    }\n            showDirs.forEach {\n                initShowDirsData(it.dir, it)\n            }\n            runOnUiThread {\n                binding.flLoading.visibility = View.GONE\n                adapter = ShowFileDirAdapter(showDirs)\n                binding.rvFiles.adapter = adapter\n            }\n        }\n    }\n\n    override fun onDestroy() {\n        super.onDestroy()\n        job.cancel()\n    }\n\n    private fun initShowDirsData(dir: File, bean: IndexSelectedDirBean) {\n        if (bean.subImageFiles == null) {\n            bean.subImageFiles = arrayListOf()\n        }\n        if (bean.subVideoFiles == null) {\n            bean.subVideoFiles = arrayListOf()\n        }\n        dir.listFiles()?.forEach { subFile ->\n            if (subFile.isFile) {\n                when (selectType) {\n                    1 -> {\n                        if (subFile.name.endsWith(\"txt\", true)){\n                            bean.subImageFiles!!.add(subFile.absolutePath)\n                        }\n                    }\n\n                    else -> {\n                        if (subFile.name.endsWith(\"jpg\", true) ||\n                            subFile.name.endsWith(\"jpeg\", true) ||\n                            subFile.name.endsWith(\"png\", true)\n                        ) {\n                            bean.subImageFiles!!.add(subFile.absolutePath)\n                        } else if (subFile.name.endsWith(\"mp4\", true)) {\n                            bean.subVideoFiles!!.add(subFile.absolutePath)\n                        }\n                    }\n                }\n            } else {\n                initShowDirsData(subFile, bean)\n            }\n        }\n    }\n\n    companion object {\n        /**\n         * 0,default: images\n         * 1:txt\n         */\n        const val KEY_SELECT_TYPE = \"select_type\"\n        const val KEY_SELECT_DIRS = \"select_dirs\"\n        const val KEY_SELECT_IMAGES = \"select_dirs\"\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/ChunkAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.adapter\n\nimport android.content.Intent\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport androidx.recyclerview.widget.RecyclerView\nimport com.nexa.demo.activity.FileContentActivity\nimport com.nexa.demo.bean.EmbedResultBean\nimport com.nexa.demo.databinding.ItemCitationBinding\nimport java.io.File\n\nclass ChunkAdapter : RecyclerView.Adapter<ChunkAdapter.MyViewHolder>() {\n\n    private val data = mutableListOf<EmbedResultBean>()\n\n    fun updateData(retrievedChunks: List<EmbedResultBean>) {\n        data.clear()\n        data.addAll(retrievedChunks)\n        notifyDataSetChanged()\n    }\n\n    override fun onCreateViewHolder(\n        parent: ViewGroup,\n        viewType: Int\n    ): MyViewHolder {\n        return MyViewHolder(\n            ItemCitationBinding.inflate(\n                LayoutInflater.from(parent.context),\n                parent,\n                false\n            )\n        )\n    }\n\n    override fun onBindViewHolder(\n        holder: MyViewHolder,\n        position: Int\n    ) {\n        holder.binding.tvPosition.text = \"${position + 1}\"\n        val fileName = File(data[position].path).name\n        holder.binding.tvFileName.text = fileName\n        holder.binding.btnChunk.text = \"Chunk ${data[position].chunkIndex + 1}\"\n        val chunkTxt = data[position].txt ?: \"\"\n        holder.binding.btnChunk.setOnClickListener {\n            holder.binding.btnChunk.context.startActivity(\n                Intent(\n                    it.context,\n                    FileContentActivity::class.java\n                ).apply {\n                    putExtra(\n                        FileContentActivity.KEY_PROMPT_CONTENT,\n                        chunkTxt\n                    )\n                    putExtra(\n                        FileContentActivity.KEY_TITLE,\n                        fileName\n                    )\n                })\n        }\n    }\n\n    override fun getItemCount(): Int {\n        return data.size\n    }\n\n    class MyViewHolder(val binding: ItemCitationBinding) :\n        RecyclerView.ViewHolder(binding.root)\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/IndexViewPagerAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.adapter\n\nimport androidx.fragment.app.Fragment\nimport androidx.fragment.app.FragmentManager\nimport androidx.fragment.app.FragmentPagerAdapter\nimport com.nexa.demo.fragments.UpdatePercentFragment\n\nclass IndexViewPagerAdapter(\n    fm: FragmentManager,\n    private val fragments: MutableList<UpdatePercentFragment>,\n    private val titles: MutableList<String>\n) : FragmentPagerAdapter(fm) {\n\n    override fun getItem(position: Int): Fragment {\n        return fragments.get(position)\n    }\n\n    override fun getCount(): Int {\n        return fragments.size\n    }\n\n    override fun getPageTitle(position: Int): CharSequence? {\n        return titles[position]\n    }\n\n    fun updatePercent(position: Int, allPercent: ArrayList<Int>) {\n        fragments[position].updatePercent(allPercent)\n    }\n    fun updateImages(position: Int, allImages: ArrayList<String>) {\n        fragments[position].updateImages(allImages)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/SelectImagesAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.adapter\n\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport android.view.ViewGroup\nimport androidx.recyclerview.widget.RecyclerView\nimport com.bumptech.glide.Glide\nimport com.nexa.demo.bean.EmbedFileBean\nimport com.nexa.demo.databinding.ItemSelectImageBinding\nimport com.nexa.demo.fragments.IndexFragment\nimport java.io.File\nimport kotlin.math.min\n\nclass SelectImagesAdapter(allImages: ArrayList<String>) :\n    RecyclerView.Adapter<SelectImagesAdapter.MyViewHolder>() {\n\n    private val data = arrayListOf<EmbedFileBean>()\n    private val topKData = arrayListOf<EmbedFileBean>()\n    private val allPercent = arrayListOf<Int>()\n    private val topK = arrayListOf<Int>()\n    private var showPercent = false\n\n    init {\n        data.addAll(allImages.map {\n            EmbedFileBean(it)\n        })\n        topKData.addAll(data)\n    }\n\n    override fun onCreateViewHolder(\n        parent: ViewGroup,\n        viewType: Int\n    ): MyViewHolder {\n        return MyViewHolder(\n            ItemSelectImageBinding.inflate(\n                LayoutInflater.from(parent.context), parent,\n                false\n            )\n        )\n    }\n\n    override fun onBindViewHolder(\n        holder: MyViewHolder,\n        position: Int\n    ) {\n        holder.binding.cvPercent.visibility = if (showPercent) {\n            View.GONE\n        } else {\n            View.GONE\n        }\n        holder.binding.tvPercent.text = \"${topKData[position].percent}%\"\n        Glide.with(holder.binding.root).load(File(topKData[position].filePath))\n            .into(holder.binding.ivImage)\n    }\n\n    override fun getItemCount(): Int {\n        Log.d(TAG, \"show images ${topKData.size}\")\n        return topKData.size\n    }\n\n    fun updateImages(allImages: ArrayList<String>) {\n        showPercent = false\n        data.clear()\n        topKData.clear()\n        data.addAll(allImages.map { EmbedFileBean(it) })\n        topKData.addAll(data)\n        notifyDataSetChanged()\n    }\n\n    fun updatePercent(allPercent: ArrayList<Int>) {\n        showPercent = true\n        this.allPercent.clear()\n        this.allPercent.addAll(allPercent)\n        data.forEachIndexed { index, bean ->\n            bean.percent = allPercent[index]\n        }\n        topKData.clear()\n        topKData.addAll(data)\n        topKData.sortWith(Comparator { bean, bean1 -> if (bean.percent!! > bean1.percent!!) -1 else 1 })\n\n        ArrayList(topKData.subList(0, min(IndexFragment.embedTopK, topKData.size))).let {\n            topKData.clear()\n            topKData.addAll(it)\n        }\n        notifyDataSetChanged()\n    }\n\n    class MyViewHolder(val binding: ItemSelectImageBinding) :\n        RecyclerView.ViewHolder(binding.root) {\n    }\n\n    companion object {\n        private const val TAG = \"SelectImagesAdapter\"\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/SelectVideosAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.adapter\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport androidx.recyclerview.widget.RecyclerView\nimport com.nexa.demo.databinding.ItemSelectImageBinding\n\nclass SelectVideosAdapter : RecyclerView.Adapter<SelectVideosAdapter.MyViewHolder>() {\n    override fun onCreateViewHolder(\n        parent: ViewGroup,\n        viewType: Int\n    ): MyViewHolder {\n        return MyViewHolder(\n            ItemSelectImageBinding.inflate(\n                LayoutInflater.from(parent.context), parent,\n                false\n            )\n        )\n    }\n\n    override fun onBindViewHolder(\n        holder: MyViewHolder,\n        position: Int\n    ) {\n\n    }\n\n    override fun getItemCount(): Int {\n        return 20\n    }\n\n    class MyViewHolder(binding: ItemSelectImageBinding) : RecyclerView.ViewHolder(binding.root) {\n\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/adapter/ShowFileDirAdapter.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.adapter\n\nimport android.view.LayoutInflater\nimport android.view.ViewGroup\nimport androidx.recyclerview.widget.RecyclerView\nimport com.nexa.demo.bean.IndexSelectedDirBean\nimport com.nexa.demo.databinding.ItemSelectFileBinding\nimport java.io.File\n\nclass ShowFileDirAdapter(val showDirs: List<IndexSelectedDirBean>) : RecyclerView.Adapter<ShowFileDirAdapter.MyViewHolder>() {\n\n    override fun onCreateViewHolder(\n        parent: ViewGroup,\n        viewType: Int\n    ): MyViewHolder {\n        return MyViewHolder(\n            ItemSelectFileBinding.inflate(\n                LayoutInflater.from(parent.context), parent,\n                false\n            )\n        )\n    }\n\n    override fun onBindViewHolder(\n        holder: MyViewHolder,\n        position: Int\n    ) {\n        holder.binding.cbSelected.isChecked = showDirs[position].isSelected\n        holder.binding.tvDirName.text = showDirs[position].dir.name.toString()\n        holder.binding.tvFileCount.text = \"${showDirs[position].subImageFiles?.size ?: \"0\"} items\"\n        holder.binding.cbSelected.setOnClickListener {\n            showDirs[position].isSelected = holder.binding.cbSelected.isChecked\n        }\n    }\n\n    override fun getItemCount(): Int {\n        return showDirs.size\n    }\n\n    fun getSelectedImages(): ArrayList<String> {\n        val allSelectedImages = arrayListOf<String>()\n        showDirs.filter { it.isSelected }.forEach {\n            allSelectedImages.addAll(it.subImageFiles!!.toTypedArray())\n        }\n        return allSelectedImages\n    }\n\n    class MyViewHolder(val binding: ItemSelectFileBinding) :\n        RecyclerView.ViewHolder(binding.root) {}\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/DownloadFileConfig.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.annotation.SuppressLint\nimport kotlinx.serialization.Serializable\n\n@SuppressLint(\"UnsafeOptInUsageError\")\n@Serializable\ndata class DownloadFileConfig (\n    val name:String,\n    /**\n     * Path relative to model dir\n     */\n    val path:String? = \"\",\n    val url:String? = \"\"\n)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/DownloadState.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nenum class DownloadState {\n    IDLE, DOWNLOADING\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/DownloadableFile.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\n\nimport java.io.File\n\ndata class DownloadableFile(\n    val file: File,\n    val url: String\n)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/EmbedFileBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\ndata class EmbedFileBean (\n    val filePath:String,\n    var percent: Int? = 0\n)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/EmbedResultBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport com.nexa.sdk.bean.EmbedResult\n\ndata class EmbedResultBean(\n    val path: String,  // Original file path\n    val txt: String? = null,  // The chunk text content\n    val chunkIndex: Int = 0,  // Index of the chunk in the original file\n    val result: FloatArray,  // Embedding vector\n    var score: Float = 0f,\n    val embedResult: EmbedResult\n) {\n    override fun equals(other: Any?): Boolean {\n        if (this === other) return true\n        if (javaClass != other?.javaClass) return false\n\n        other as EmbedResultBean\n\n        if (chunkIndex != other.chunkIndex) return false\n        if (score != other.score) return false\n        if (path != other.path) return false\n        if (txt != other.txt) return false\n        if (!result.contentEquals(other.result)) return false\n        if (embedResult != other.embedResult) return false\n\n        return true\n    }\n\n    override fun hashCode(): Int {\n        var result1 = chunkIndex\n        result1 = 31 * result1 + score.hashCode()\n        result1 = 31 * result1 + path.hashCode()\n        result1 = 31 * result1 + (txt?.hashCode() ?: 0)\n        result1 = 31 * result1 + result.contentHashCode()\n        result1 = 31 * result1 + embedResult.hashCode()\n        return result1\n    }\n\n\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/IndexSelectedDirBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport java.io.File\n\ndata class IndexSelectedDirBean(\n    val dir: File,\n    var isSelected: Boolean = false,\n    var subImageFiles: ArrayList<String>? = null,\n    var subVideoFiles: ArrayList<String>? = null\n)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/ModelData.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.annotation.SuppressLint\nimport android.content.Context\nimport android.content.Context.MODE_PRIVATE\nimport android.text.TextUtils\nimport android.util.Log\nimport com.nexa.demo.FileConfig\nimport com.nexa.demo.utils.ModelFileListingUtil\nimport com.nexa.demo.utils.SharePreferenceKeys\nimport kotlinx.serialization.Serializable\nimport kotlinx.serialization.json.Json\nimport java.io.File\n\n/**\n * Extended downloadable file with fallback URL support.\n * Primary URL is S3, fallback URL is Hugging Face.\n */\ndata class DownloadableFileWithFallback(\n    val file: File,\n    val primaryUrl: String,      // S3 URL\n    val fallbackUrl: String      // HuggingFace URL\n)\n\n@SuppressLint(\"UnsafeOptInUsageError\")\n@Serializable\ndata class ModelData(\n    val id: String,\n    val displayName: String,\n    val modelName: String,\n    /**\n     * support plugin_id\n     * 0: default, will use cpu;\n     * 0x1: cpu, 0x10:gpu, 0x100:npu\n     * cpu: 1,\n     * gpu: 16,\n     * npu: 256,\n     * cpu_gpu: 17,\n     * cpu_npu: 257,\n     * gpu_npu: 272,\n     * cpu_gpu_npu: 273\n     */\n    val pluginIds: Int? = 0,\n    val baseUrl: String? = null,\n    val mmprojOrTokenName: String? = null,\n    val tokenName: String = \"\",\n    val embeddingName: String = \"\",\n    val extConfigName: String = \"\",\n    val modelUrl: String? = null,\n    val mmprojOrTokenUrl: String? = null,\n    val embeddingUrl: String? = null,\n    val extConfigUrl: String? = null,\n    val sizeGb: Double? = 0.0,\n    val params: String? = null,\n    val features: List<String>? = null,\n    val type: String? = null,\n    /**\n     * Used to indicate the version number of ModelData, mainly for handling the storage location of downloaded files.\n     * 0: Default value — files are stored directly under the files/models directory.\n     * 1: Files are stored under the files/models/modelId/ directory.\n     */\n    val versionCode: Int? = 0,\n    // NPU-Vision-name\n    val patchEmbedName: String = \"\",\n    val vitModelName: String = \"\",\n    val vitConfigFileName: String = \"\",\n    val audioEncoderHelper0Name: String = \"\",\n    val audioEncoderHelper1Name: String = \"\",\n    val audioEncoderModelName: String = \"\",\n    val audioEncoderConfigFileName: String = \"\",\n    // NPU-Vision-url\n    val tokenUrl: String? = null,\n    val patchEmbedPathUrl: String? = null,\n    val vitModelPathUrl: String? = null,\n    val vitConfigFilePathUrl: String? = null,\n    val audioEncoderHelper0PathUrl: String? = null,\n    val audioEncoderHelper1PathUrl: String? = null,\n    val audioEncoderModelPathUrl: String? = null,\n    val audioEncoderConfigFilePathUrl: String? = null,\n    val files: ArrayList<DownloadFileConfig>? = null,\n    val show: Boolean = true,\n    val dependencies: List<String>? = null,\n) {\n    var isSupport = true\n}\n\nfun ModelData.modelDir(context: Context): File =\n    if (versionCode == 1) {\n        File(FileConfig.modelsDir(context), id).apply { if (!exists()) mkdirs() }\n    } else {\n        FileConfig.modelsDir(context)\n    }\n\n\nfun ModelData.modelFile(context: Context): File? =\n    modelUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), modelName)\n    }\n\nfun ModelData.mmprojTokenFile(context: Context): File? =\n    mmprojOrTokenUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), mmprojOrTokenName)\n    }\n\nfun ModelData.tokenFile(context: Context): File? =\n    tokenUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), tokenName)\n    }\n\nfun ModelData.embederFile(context: Context): File? =\n    embeddingUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), embeddingName)\n    }\n\nfun ModelData.extConfigFile(context: Context): File? =\n    extConfigUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), extConfigName)\n    }\n\nfun ModelData.patchEmbedFile(context: Context): File? =\n    patchEmbedPathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), patchEmbedName)\n    }\n\nfun ModelData.vitModelFile(context: Context): File? =\n    vitModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), vitModelName)\n    }\n\nfun ModelData.vitConfigFile(context: Context): File? =\n    vitConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), vitConfigFileName)\n    }\n\nfun ModelData.audioEncoderHelper0File(context: Context): File? =\n    audioEncoderHelper0PathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderHelper0Name)\n    }\n\nfun ModelData.audioEncoderHelper1File(context: Context): File? =\n    audioEncoderHelper1PathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderHelper1Name)\n    }\n\nfun ModelData.audioEncoderModelFile(context: Context): File? =\n    audioEncoderModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderModelName)\n    }\n\nfun ModelData.audioEncoderConfigFile(context: Context): File? =\n    audioEncoderConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        File(modelDir(context), audioEncoderConfigFileName)\n    }\n\nprivate fun ModelData.getRealUrl(url: String) = if (TextUtils.isEmpty(baseUrl)) {\n    url\n} else {\n    if (url.startsWith(\"http://\", true) || url.startsWith(\"https://\", true)) {\n        url\n    } else {\n        if (baseUrl!!.endsWith(\"/\")) {\n            \"$baseUrl$url\"\n        } else {\n            \"$baseUrl/$url\"\n        }\n    }\n}\n\nfun ModelData.downloadableFiles(\n    context: Context,\n    modelDir: File,\n    modelList: List<ModelData>\n): List<DownloadableFile> = listOfNotNull(\n    modelUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, modelName), getRealUrl(it))\n    },\n    mmprojOrTokenUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, mmprojOrTokenName), getRealUrl(it))\n    },\n    tokenUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, tokenName), getRealUrl(it))\n    },\n    embeddingUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, embeddingName), getRealUrl(it))\n    },\n    extConfigUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, extConfigName), getRealUrl(it))\n    },\n    patchEmbedPathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, patchEmbedName), getRealUrl(it))\n    },\n    vitModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, vitModelName), getRealUrl(it))\n    },\n    vitConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, vitConfigFileName), getRealUrl(it))\n    },\n    audioEncoderHelper0PathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderHelper0Name), getRealUrl(it))\n    },\n    audioEncoderHelper1PathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderHelper1Name), getRealUrl(it))\n    },\n    audioEncoderModelPathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderModelName), getRealUrl(it))\n    },\n    audioEncoderConfigFilePathUrl?.takeIf { it.isNotBlank() }?.let {\n        DownloadableFile(File(modelDir, audioEncoderConfigFileName), getRealUrl(it))\n    }\n).let {\n    val temp = arrayListOf<DownloadableFile>()\n    files?.takeIf { files -> files.isNotEmpty() }?.let { allFiles ->\n        allFiles.forEach { fileConfig ->\n            temp.add(\n                DownloadableFile(\n                    File(\n                        modelDir,\n                        fileConfig.path + File.separator + fileConfig.name\n                    ), if (TextUtils.isEmpty(fileConfig.url)) {\n                        getRealUrl(fileConfig.name)\n                    } else {\n                        getRealUrl(fileConfig.url!!)\n                    }\n                )\n            )\n        }\n    }\n    val dependenciesFiles = arrayListOf<DownloadableFile>()\n    dependencies?.takeIf { dependencies -> dependencies.isNotEmpty() }?.forEach { dependencyId ->\n        modelList.firstOrNull { modelData ->\n            modelData.id == dependencyId\n        }?.let { modelData ->\n            // Check actual file existence, not just SharedPreferences\n            val depModelDir = modelData.modelDir(context)\n            if (!modelData.allModelFilesExist(context, depModelDir, modelList)) {\n                dependenciesFiles.addAll(\n                    modelData.downloadableFiles(\n                        context,\n                        depModelDir,\n                        modelList\n                    )\n                )\n            }\n        }\n    }\n    dependenciesFiles + it + temp\n}\n\n\nfun ModelData.allModelFilesExist(\n    context: Context,\n    modelDir: File,\n    modelList: List<ModelData>\n): Boolean {\n    val files = this.downloadableFiles(context, modelDir, modelList).map { it.file }\n    return files.all { it.exists() && it.length() > 0 }\n}\n\nfun ModelData.getNonExistModelFile(\n    context: Context,\n    modelDir: File,\n    modelList: List<ModelData>\n): String? {\n    this.downloadableFiles(context, modelDir, modelList).forEach {\n        if (!(it.file.exists() && it.file.length() > 0)) {\n            return it.file.absolutePath.replace(\"/data/user/0\", \"/data/data\")\n        }\n    }\n    return null\n}\n\nfun ModelData.getNexaManifest(context: Context): NexaManifestBean? {\n    try {\n        val str = File(modelDir(context), \"nexa.manifest\").bufferedReader().use { it.readText() }\n        return Json {\n            ignoreUnknownKeys = true\n        }.decodeFromString<NexaManifestBean>(str)\n    } catch (e: Exception) {\n        e.printStackTrace()\n        return null\n    }\n}\n\nfun ModelData.getSupportPluginIds(): ArrayList<String> {\n    val pluginIds = arrayListOf<String>()\n    if (this.pluginIds == 0) {\n        pluginIds.add(\"cpu\")\n    } else {\n        if (this.pluginIds!! and 0x100 == 0x100) {\n            pluginIds.add(\"npu\")\n        }\n        if (this.pluginIds and 0x10 == 0x10) {\n            pluginIds.add(\"gpu\")\n        }\n        if (this.pluginIds and 0x1 == 0x1) {\n            pluginIds.add(\"cpu\")\n        }\n    }\n    return pluginIds\n}\n\nfun ModelData.isDownloaded(context: Context): Boolean {\n    context.getSharedPreferences(\n        SharePreferenceKeys.FileName.ModelDownloaded.fileName,\n        MODE_PRIVATE\n    ).let {\n        return it.getBoolean(id, false)\n    }\n}\n\n/**\n * Checks if this model is an NPU model.\n * NPU models are identified by:\n * - \"NPU\" (case-insensitive) in the model id, OR\n * - \".nexa\" suffix in modelName\n */\nfun ModelData.isNpuModel(): Boolean {\n    return id.contains(\"NPU\", ignoreCase = true) || \n           id.contains(\"npu\", ignoreCase = true) ||\n           modelName.endsWith(\".nexa\", ignoreCase = true)\n}\n\n/**\n * Downloads files for NPU models using a dynamically fetched file list.\n * This overload is used when files are fetched from S3/HF listing instead of\n * being specified in model_list.json.\n *\n * @param context Android context\n * @param modelDir Directory where model files will be stored\n * @param modelList Full list of models (for dependency resolution)\n * @param npuFileNames List of file names fetched from listing\n * @return List of DownloadableFile objects representing files to download\n */\nfun ModelData.downloadableFilesWithNpuList(\n    context: Context,\n    modelDir: File,\n    modelList: List<ModelData>,\n    npuFileNames: List<String>\n): List<DownloadableFile> {\n    // For NPU models with dynamically fetched files, use the provided file list\n    val npuFiles = arrayListOf<DownloadableFile>()\n    npuFileNames.forEach { fileName ->\n        val url = if (baseUrl.isNullOrEmpty()) {\n            fileName\n        } else {\n            if (baseUrl.endsWith(\"/\")) \"$baseUrl$fileName\" else \"$baseUrl/$fileName\"\n        }\n        npuFiles.add(DownloadableFile(File(modelDir, fileName), url))\n    }\n\n    // Handle dependencies (they might also be NPU models or regular models)\n    val dependenciesFiles = arrayListOf<DownloadableFile>()\n    dependencies?.takeIf { it.isNotEmpty() }?.forEach { dependencyId ->\n        modelList.firstOrNull { it.id == dependencyId }?.let { modelData ->\n            // Check actual file existence, not just SharedPreferences\n            val depModelDir = modelData.modelDir(context)\n            if (!modelData.allModelFilesExist(context, depModelDir, modelList)) {\n                // For dependencies, use the regular downloadableFiles\n                // The caller should handle fetching S3 files for NPU dependencies separately\n                dependenciesFiles.addAll(\n                    modelData.downloadableFiles(\n                        context,\n                        depModelDir,\n                        modelList\n                    )\n                )\n            }\n        }\n    }\n\n    return dependenciesFiles + npuFiles\n}\n\n/**\n * Downloads files for NPU models with fallback URL support.\n * Primary URL is S3, fallback URL is Hugging Face.\n *\n * @param context Android context\n * @param modelDir Directory where model files will be stored\n * @param modelList Full list of models (for dependency resolution)\n * @param npuFileNames List of file names fetched from listing\n * @param useHfUrls If true, use HF URLs as primary (when S3 listing failed)\n * @return List of DownloadableFileWithFallback objects\n */\nfun ModelData.downloadableFilesWithFallback(\n    context: Context,\n    modelDir: File,\n    modelList: List<ModelData>,\n    npuFileNames: List<String>,\n    useHfUrls: Boolean = false\n): List<DownloadableFileWithFallback> {\n    val npuFiles = arrayListOf<DownloadableFileWithFallback>()\n    val repoId = if (!baseUrl.isNullOrEmpty()) {\n        ModelFileListingUtil.getHfRepoId(baseUrl)\n    } else {\n        \"NexaAI/$id\"\n    }\n\n    npuFileNames.forEach { fileName ->\n        val s3Url = if (baseUrl.isNullOrEmpty()) {\n            fileName\n        } else {\n            if (baseUrl.endsWith(\"/\")) \"$baseUrl$fileName\" else \"$baseUrl/$fileName\"\n        }\n        val hfUrl = ModelFileListingUtil.getHfDownloadUrl(repoId, fileName)\n        \n        // If useHfUrls is true, swap primary and fallback\n        if (useHfUrls) {\n            npuFiles.add(DownloadableFileWithFallback(File(modelDir, fileName), hfUrl, s3Url))\n        } else {\n            npuFiles.add(DownloadableFileWithFallback(File(modelDir, fileName), s3Url, hfUrl))\n        }\n    }\n\n    // Handle dependencies\n    val dependenciesFiles = arrayListOf<DownloadableFileWithFallback>()\n    dependencies?.takeIf { it.isNotEmpty() }?.forEach { dependencyId ->\n        modelList.firstOrNull { it.id == dependencyId }?.let { modelData ->\n            // Check actual file existence, not just SharedPreferences\n            val depModelDir = modelData.modelDir(context)\n            if (!modelData.allModelFilesExist(context, depModelDir, modelList)) {\n                // Convert regular DownloadableFile to DownloadableFileWithFallback\n                modelData.downloadableFiles(\n                    context,\n                    depModelDir,\n                    modelList\n                ).forEach { df ->\n                    val fallbackUrl = ModelFileListingUtil.getHfUrlForGgufFile(df.url)\n                    dependenciesFiles.add(\n                        DownloadableFileWithFallback(df.file, df.url, fallbackUrl)\n                    )\n                }\n            }\n        }\n    }\n\n    return dependenciesFiles + npuFiles\n}\n\n/**\n * Converts a list of DownloadableFile to DownloadableFileWithFallback.\n * Adds HuggingFace fallback URLs for each file.\n */\nfun List<DownloadableFile>.withFallbackUrls(): List<DownloadableFileWithFallback> {\n    return map { df ->\n        val fallbackUrl = ModelFileListingUtil.getHfUrlForGgufFile(df.url)\n        DownloadableFileWithFallback(df.file, df.url, fallbackUrl)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/NexaManifestBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.annotation.SuppressLint\nimport kotlinx.serialization.Serializable\n\n@SuppressLint(\"UnsafeOptInUsageError\")\n@Serializable\ndata class NexaManifestBean(\n    val ModelName: String? = null,\n    val ModelType: String? = null,\n    val PluginId: String? = null\n)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/bean/S3FileBean.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.bean\n\nimport android.util.Log\nimport java.text.SimpleDateFormat\nimport java.util.Calendar\nimport java.util.TimeZone\n\ndata class S3FileBean(val url: String, val startDate: String) {\n\n\n\n    companion object {\n        private const val TAG = \"S3FileBean\"\n        /**\n         * Default valid for 5 hours before expiration\n         */\n        fun isValid(startDate: String): Boolean {\n            val allHours = 24\n            val delayHours = 5\n            try {\n                val tz: TimeZone = TimeZone.getTimeZone(\"UTC\")\n                val sdf = SimpleDateFormat(\"yyyyMMdd'T'HHmmss'Z'\")\n                sdf.timeZone = tz\n                return Calendar.getInstance(tz).timeInMillis - sdf.parse(startDate).time < (allHours - delayHours) * 60 * 60 * 1000\n            } catch (e: Exception) {\n            }\n            return false\n        }\n        fun getStartDateFromUrl(url: String): String {\n            try {\n                val tag = \"X-Amz-Date=\"\n                val start = url.indexOf(tag) + tag.length\n                return url.substring(start, start + 16)\n            } catch (e: Exception) {\n                Log.e(TAG, \"getStartDateFromUrl failed:${e.message}\")\n            }\n            return \"\"\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/IndexFragment.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.fragments\n\nimport android.app.Activity\nimport android.content.Intent\nimport android.os.Bundle\nimport android.util.Log\nimport android.view.View\nimport androidx.activity.ComponentActivity\nimport androidx.activity.result.ActivityResultLauncher\nimport androidx.activity.result.contract.ActivityResultContracts\nimport androidx.fragment.app.Fragment\nimport com.google.android.material.shape.CornerFamily\nimport com.nexa.demo.MainActivity\nimport com.nexa.demo.R\nimport com.nexa.demo.activity.FolderActivity\nimport com.nexa.demo.activity.FolderActivity.Companion.KEY_SELECT_IMAGES\nimport com.nexa.demo.adapter.IndexViewPagerAdapter\nimport com.nexa.demo.databinding.FragmentIndexBinding\nimport com.nexa.demo.utils.KeyboardUtil\nimport com.nexa.demo.utils.PermissionUtil\nimport com.nexa.demo.utils.bindView\nimport com.nexa.sdk.bean.EmbeddingConfig\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.Job\nimport kotlinx.coroutines.delay\nimport kotlinx.coroutines.launch\nimport kotlinx.coroutines.withContext\n\nprivate const val ARG_PARAM1 = \"param1\"\nprivate const val ARG_PARAM2 = \"param2\"\n\n/**\n * A simple [Fragment] subclass.\n * Use the [IndexFragment.newInstance] factory method to\n * create an instance of this fragment.\n */\nclass IndexFragment : Fragment(R.layout.fragment_index) {\n    private var param1: String? = null\n    private var param2: String? = null\n    private val binding by bindView<FragmentIndexBinding>()\n    private lateinit var adapter: IndexViewPagerAdapter\n    private val titles: MutableList<String> = arrayListOf()\n    private lateinit var selectFolderResult: ActivityResultLauncher<Intent>\n    private var uiState = UIState.NO_INDEX\n    private var allFileCount = 0\n\n    private val allImages = arrayListOf<String>()\n    private val allImagePercentList = arrayListOf<Int>()\n    private val allImageResultList = arrayListOf<FloatArray>()\n\n    private val allVideos = arrayListOf<String>()\n    private val allVideoPercentList = arrayListOf<Int>()\n    private val allVideoResultList = arrayListOf<FloatArray>()\n    private val fragments = mutableListOf<UpdatePercentFragment>(\n        IndexedImagesFragment.newInstance(allImages),\n    )\n    private var embedJob: Job? = null\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        arguments?.let {\n            param1 = it.getString(ARG_PARAM1)\n            param2 = it.getString(ARG_PARAM2)\n        }\n        selectFolderResult = registerForActivityResult(\n            ActivityResultContracts.StartActivityForResult()\n        ) { result -> //\n            if (Activity.RESULT_OK == result.resultCode) {\n                allFileCount = 0\n                Log.d(TAG, \"select dirs:${result.data?.getStringArrayListExtra(KEY_SELECT_IMAGES)}\")\n\n                allImages.clear()\n                result.data?.getStringArrayListExtra(KEY_SELECT_IMAGES)?.let {\n                    allImages.addAll(it)\n                }\n\n                allFileCount = allImages.size\n                binding.tvIndexDatabase.text = \"Database: $allFileCount files\"\n                if (allFileCount == 0) {\n                    binding.lpiIndexing.max = 1\n                    binding.lpiIndexing.progress = 1\n                    uiState = UIState.INDEXED\n                } else {\n                    binding.lpiIndexing.max = allFileCount\n                    uiState = UIState.INDEXING\n                }\n                changeUIState()\n                adapter.updateImages(0, allImages)\n\n                allImageResultList.clear()\n                allVideoResultList.clear()\n\n                embedJob = CoroutineScope(Dispatchers.IO).launch {\n                    allImages.forEachIndexed { index, imagePath ->\n                        (activity as MainActivity).embedderWrapper.let { embedderWrapper ->\n                            embedderWrapper?.embed(\n                                arrayOf(imagePath),\n                                EmbeddingConfig(batchSize = 1)\n                            ).let {\n                                it?.onSuccess {\n                                    allImageResultList.add(index, it.embeddings)\n                                    Log.d(\"nfl\", \"embed result size:${it.embeddings.size}\")\n                                    Log.d(\"nfl\", \"embed result:${it.embeddings.contentToString()}\")\n                                }\n                                    ?.onFailure {\n                                        allImageResultList.add(index, floatArrayOf())\n                                        Log.d(\"nfl\", \"embed result failed:$it\")\n                                    }\n                                withContext(Dispatchers.Main) {\n                                    binding.lpiIndexing.progress = index + 1\n                                    if (index + 1 >= allFileCount) {\n                                        uiState = UIState.INDEXED\n                                        changeUIState()\n                                    }\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n    }\n\n    private fun changeUIState() {\n        when (uiState) {\n            UIState.NO_INDEX -> {\n                binding.llIndexing.visibility = View.GONE\n                binding.tvIndexTip.visibility = View.VISIBLE\n                binding.llIndexed.visibility = View.GONE\n                binding.vHideBottom.visibility = View.GONE\n            }\n\n            UIState.INDEXING -> {\n                binding.llIndexing.visibility = View.VISIBLE\n                binding.tvIndexTip.visibility = View.GONE\n\n                binding.llIndexed.visibility = View.GONE\n                titles.clear()\n                titles.add(\"Images(${allImages.size})\")\n                titles.add(\"Videos\")\n                adapter.notifyDataSetChanged()\n\n                binding.vHideBottom.visibility = View.VISIBLE\n            }\n\n            UIState.INDEXED -> {\n                binding.llIndexing.visibility = View.GONE\n                binding.tvIndexTip.visibility = View.GONE\n\n                binding.llIndexed.visibility = View.VISIBLE\n                titles.clear()\n                titles.add(\"Images(${allImages.size})\")\n                titles.add(\"Videos\")\n                adapter.notifyDataSetChanged()\n\n                binding.vHideBottom.visibility = View.GONE\n            }\n        }\n    }\n\n    private lateinit var searchJob: Job\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n\n        binding.mcvIndex.let { cardView ->\n            cardView.setShapeAppearanceModel(\n                cardView.shapeAppearanceModel\n                    .toBuilder()\n                    .setTopLeftCorner(CornerFamily.ROUNDED, 80f)\n                    .setTopRightCorner(CornerFamily.ROUNDED, 80f)\n                    .build()\n            );\n        }\n\n        titles.add(\"Images(${allImages.size})\")\n        titles.add(\"Videos\")\n        adapter = IndexViewPagerAdapter(\n            requireActivity().supportFragmentManager,\n            fragments,\n            titles\n        )\n        Log.d(\"nfl\", \"vpIndexed: ${binding.vpIndexed}\")\n        binding.vpIndexed.adapter = adapter\n        binding.tlIndexed.setupWithViewPager(binding.vpIndexed)\n\n        binding.btnImport.setOnClickListener {\n            if (PermissionUtil.checkManageStoragePermission(requireActivity())) {\n                selectFolderResult.launch(Intent(context, FolderActivity::class.java))\n            } else {\n                PermissionUtil.showRequestManageStoragePermissionDialog(activity as ComponentActivity)\n            }\n        }\n\n        binding.btnCancelIndex.setOnClickListener {\n            embedJob?.cancel()\n            uiState = UIState.NO_INDEX\n            changeUIState()\n        }\n\n        binding.btnSearch.setOnClickListener {\n            if (\"Search\" == binding.btnSearch.text) {\n                binding.btnSearch.text = \"Stop\"\n                KeyboardUtil.hide(binding.etSearch)\n                searchJob = CoroutineScope(Dispatchers.IO).launch {\n                    (activity as MainActivity).embedderWrapper?.embed(\n                        arrayOf(binding.etSearch.text.toString()),\n                        EmbeddingConfig(batchSize = 1)\n                    )?.onSuccess { searchResult ->\n                        allImagePercentList.clear()\n                        allImageResultList.forEach { imageResult ->\n                            allImagePercentList.add(\n                                (computeCosineSimilarity(\n                                    searchResult.embeddings,\n                                    imageResult\n                                ).apply {\n                                    Log.d(\"nfl\", \"computeCosineSimilarity: $this\")\n                                } * 100).toInt()\n                            )\n                        }\n                        withContext(Dispatchers.Main) {\n                            binding.btnSearch.text = \"Search\"\n                            (binding.vpIndexed.adapter as IndexViewPagerAdapter).let {\n                                it.updatePercent(0, allImagePercentList)\n                            }\n                        }\n                    }?.onFailure {\n                        activity?.runOnUiThread {\n                            binding.btnSearch.text = \"Search\"\n                        }\n                    }\n                }\n            } else {\n                binding.btnSearch.text = \"Search\"\n                searchJob.cancel()\n            }\n        }\n    }\n\n    enum class UIState {\n        NO_INDEX, INDEXING, INDEXED\n    }\n\n    fun computeCosineSimilarity(\n        embedding1: FloatArray?,\n        embedding2: FloatArray?\n    ): Float {\n        if (embedding1 == null || embedding2 == null) return 0.0f\n        if (embedding1.isEmpty() || embedding2.isEmpty()) return 0.0f\n        if (embedding1.size != embedding2.size) return 0.0f\n\n        var dotProduct = 0.0f\n        var norm1 = 0.0f\n        var norm2 = 0.0f\n\n        for (i in embedding1.indices) {\n            dotProduct += embedding1[i] * embedding2[i]\n            norm1 += embedding1[i] * embedding1[i]\n            norm2 += embedding2[i] * embedding2[i]\n        }\n\n        val epsilon = 1e-8f\n        norm1 = kotlin.math.sqrt(norm1 + epsilon)\n        norm2 = kotlin.math.sqrt(norm2 + epsilon)\n        Log.d(\"nfl\", \"dotProduct > 0 ? ${dotProduct > 0}\")\n        return dotProduct / (norm1 * norm2)\n    }\n\n    override fun onDestroyView() {\n        Log.d(\"nfl\", \"all fragments:${activity?.supportFragmentManager?.fragments}\")\n        fragments.clear()\n        adapter.notifyDataSetChanged()\n        activity?.supportFragmentManager?.beginTransaction()?.apply {\n            activity!!.supportFragmentManager.fragments.forEach {\n                if(it is IndexedImagesFragment || it is IndexedVideosFragment) {\n                    this.remove(it)\n                }\n            }\n        }?.commit()\n        super.onDestroyView()\n    }\n\n    companion object {\n        const val TAG = \"IndexFragment\"\n        var embedTopK = 2\n\n        @JvmStatic\n        fun newInstance(param1: String, param2: String) =\n            IndexFragment().apply {\n                arguments = Bundle().apply {\n                    putString(ARG_PARAM1, param1)\n                    putString(ARG_PARAM2, param2)\n                }\n            }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/IndexedImagesFragment.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.fragments\n\nimport android.os.Bundle\nimport android.util.Log\nimport androidx.fragment.app.Fragment\nimport android.view.View\nimport com.nexa.demo.R\nimport com.nexa.demo.adapter.SelectImagesAdapter\nimport com.nexa.demo.databinding.FragmentIndexedImagesBinding\nimport com.nexa.demo.utils.bindView\n\nprivate const val ARG_PARAM1 = \"param1\"\n\n/**\n * A simple [Fragment] subclass.\n * Use the [IndexedImagesFragment.newInstance] factory method to\n * create an instance of this fragment.\n */\nclass IndexedImagesFragment : UpdatePercentFragment(R.layout.fragment_indexed_images) {\n\n    private var allImages: ArrayList<String>? = arrayListOf()\n    private var param2: String? = null\n    private val adapter: SelectImagesAdapter = SelectImagesAdapter(allImages!!)\n\n    private val binding by bindView<FragmentIndexedImagesBinding>()\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        arguments?.let {\n            allImages = it.getStringArrayList(ARG_PARAM1)\n        }\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        Log.d(\"nfl\", \"IndexedImagesFragment onViewCreated\")\n        binding.rvImages.adapter = adapter\n    }\n\n    override fun updatePercent(allPercent: ArrayList<Int>) {\n        adapter.updatePercent(allPercent)\n    }\n\n    override fun updateImages(allImages: ArrayList<String>) {\n        adapter.updateImages(allImages)\n    }\n\n    override fun onDestroyView() {\n        super.onDestroyView()\n        Log.d(\"nfl\", \"IndexedImagesFragment onDestroyView\")\n    }\n\n    companion object {\n\n        @JvmStatic\n        fun newInstance(allImages: ArrayList<String>) =\n            IndexedImagesFragment().apply {\n                arguments = Bundle().apply {\n                    putStringArrayList(ARG_PARAM1, allImages)\n                }\n            }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/IndexedVideosFragment.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.fragments\n\nimport android.os.Bundle\nimport android.view.View\nimport androidx.fragment.app.Fragment\nimport com.nexa.demo.R\nimport com.nexa.demo.adapter.SelectVideosAdapter\nimport com.nexa.demo.databinding.FragmentIndexedVideosBinding\nimport com.nexa.demo.utils.bindView\n\nprivate const val ARG_PARAM1 = \"param1\"\nprivate const val ARG_PARAM2 = \"param2\"\n\n/**\n * A simple [Fragment] subclass.\n * Use the [IndexedVideosFragment.newInstance] factory method to\n * create an instance of this fragment.\n */\nclass IndexedVideosFragment : UpdatePercentFragment(R.layout.fragment_indexed_videos) {\n\n    private var param1: String? = null\n    private var param2: String? = null\n    private val adapter = SelectVideosAdapter()\n\n    private val binding by bindView<FragmentIndexedVideosBinding>()\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        arguments?.let {\n            param1 = it.getString(ARG_PARAM1)\n            param2 = it.getString(ARG_PARAM2)\n        }\n    }\n\n    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {\n        super.onViewCreated(view, savedInstanceState)\n        binding.rvVideos.adapter = adapter\n    }\n\n    override fun updatePercent(allPercent: ArrayList<Int>) {\n\n    }\n\n    override fun updateImages(allImages: ArrayList<String>) {\n\n    }\n\n    companion object {\n\n        @JvmStatic\n        fun newInstance(param1: String, param2: String) =\n            IndexedVideosFragment().apply {\n                arguments = Bundle().apply {\n                    putString(ARG_PARAM1, param1)\n                    putString(ARG_PARAM2, param2)\n                }\n            }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/fragments/UpdatePercentFragment.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.fragments\n\nimport androidx.annotation.LayoutRes\nimport androidx.fragment.app.Fragment\n\nabstract class UpdatePercentFragment(@LayoutRes contentLayoutId: Int) : Fragment(contentLayoutId) {\n    abstract fun updatePercent(allPercent: ArrayList<Int>)\n    abstract fun updateImages(allImages: ArrayList<String>)\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/listeners/CustomDialogInterface.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.listeners\n\nimport android.app.AlertDialog\nimport android.content.DialogInterface\nimport android.view.View\n\nabstract class CustomDialogInterface : DialogInterface {\n\n    abstract class OnClickListener : View.OnClickListener, DialogInterface.OnClickListener {\n        private var dialog: DialogInterface? = null\n        protected val SUBMIT: Int = DialogInterface.BUTTON_POSITIVE\n        protected val CANCLE: Int = DialogInterface.BUTTON_NEGATIVE\n\n        constructor()\n\n        override fun onClick(v: View?) {\n            dialog?.let {\n                var positiveBtn: View? = null\n                var negativeBtn: View? = null\n                var neutralBtn: View? = null\n                if (it is AlertDialog) {\n                    (dialog as AlertDialog).let {\n                        positiveBtn = it.getButton(DialogInterface.BUTTON_POSITIVE)\n                        negativeBtn = it.getButton(DialogInterface.BUTTON_NEGATIVE)\n                        neutralBtn = it.getButton(DialogInterface.BUTTON_NEUTRAL)\n                    }\n                } else if (it is androidx.appcompat.app.AlertDialog) {\n                    (dialog as androidx.appcompat.app.AlertDialog).let {\n                        positiveBtn = it.getButton(DialogInterface.BUTTON_POSITIVE)\n                        negativeBtn = it.getButton(DialogInterface.BUTTON_NEGATIVE)\n                        neutralBtn = it.getButton(DialogInterface.BUTTON_NEUTRAL)\n                    }\n                }\n\n                if (v === positiveBtn) {\n                    onClick(dialog, DialogInterface.BUTTON_POSITIVE)\n                } else if (v === negativeBtn) {\n                    onClick(dialog, DialogInterface.BUTTON_NEGATIVE)\n                } else if (v === neutralBtn) {\n                    onClick(dialog, DialogInterface.BUTTON_NEUTRAL)\n                }\n            }\n        }\n\n        fun resetPositiveButton(dialog: DialogInterface) {\n            resetButton(dialog, DialogInterface.BUTTON_POSITIVE)\n        }\n\n        private fun resetButton(dialog: DialogInterface, which: Int) {\n            this.dialog = dialog\n            if (dialog is AlertDialog) {\n                dialog.getButton(which)\n            } else if (dialog is androidx.appcompat.app.AlertDialog) {\n                dialog.getButton(which)\n            } else {\n                null\n            }?.setOnClickListener(this)\n        }\n    }\n\n    override fun cancel() {\n    }\n\n    override fun dismiss() {\n    }\n}\n\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/ui/theme/Color.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.ui.theme\n\nimport androidx.compose.ui.graphics.Color\n\nval Purple80 = Color(0xFFD0BCFF)\nval PurpleGrey80 = Color(0xFFCCC2DC)\nval Pink80 = Color(0xFFEFB8C8)\n\nval Purple40 = Color(0xFF6650a4)\nval PurpleGrey40 = Color(0xFF625b71)\nval Pink40 = Color(0xFF7D5260)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/ui/theme/Theme.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.ui.theme\n\nimport android.app.Activity\nimport android.os.Build\nimport androidx.compose.foundation.isSystemInDarkTheme\nimport androidx.compose.material3.MaterialTheme\nimport androidx.compose.material3.darkColorScheme\nimport androidx.compose.material3.dynamicDarkColorScheme\nimport androidx.compose.material3.dynamicLightColorScheme\nimport androidx.compose.material3.lightColorScheme\nimport androidx.compose.runtime.Composable\nimport androidx.compose.ui.platform.LocalContext\n\nprivate val DarkColorScheme = darkColorScheme(\n    primary = Purple80,\n    secondary = PurpleGrey80,\n    tertiary = Pink80\n)\n\nprivate val LightColorScheme = lightColorScheme(\n    primary = Purple40,\n    secondary = PurpleGrey40,\n    tertiary = Pink40\n\n    /* Other default colors to override\n    background = Color(0xFFFFFBFE),\n    surface = Color(0xFFFFFBFE),\n    onPrimary = Color.White,\n    onSecondary = Color.White,\n    onTertiary = Color.White,\n    onBackground = Color(0xFF1C1B1F),\n    onSurface = Color(0xFF1C1B1F),\n    */\n)\n\n@Composable\nfun NexaDemoTheme(\n    darkTheme: Boolean = isSystemInDarkTheme(),\n    // Dynamic color is available on Android 12+\n    dynamicColor: Boolean = true,\n    content: @Composable () -> Unit\n) {\n    val colorScheme = when {\n        dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {\n            val context = LocalContext.current\n            if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)\n        }\n\n        darkTheme -> DarkColorScheme\n        else -> LightColorScheme\n    }\n\n    MaterialTheme(\n        colorScheme = colorScheme,\n        typography = Typography,\n        content = content\n    )\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/ui/theme/Type.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.ui.theme\n\nimport androidx.compose.material3.Typography\nimport androidx.compose.ui.text.TextStyle\nimport androidx.compose.ui.text.font.FontFamily\nimport androidx.compose.ui.text.font.FontWeight\nimport androidx.compose.ui.unit.sp\n\n// Set of Material typography styles to start with\nval Typography = Typography(\n    bodyLarge = TextStyle(\n        fontFamily = FontFamily.Default,\n        fontWeight = FontWeight.Normal,\n        fontSize = 16.sp,\n        lineHeight = 24.sp,\n        letterSpacing = 0.5.sp\n    )\n    /* Other default text styles to override\n    titleLarge = TextStyle(\n        fontFamily = FontFamily.Default,\n        fontWeight = FontWeight.Normal,\n        fontSize = 22.sp,\n        lineHeight = 28.sp,\n        letterSpacing = 0.sp\n    ),\n    labelSmall = TextStyle(\n        fontFamily = FontFamily.Default,\n        fontWeight = FontWeight.Medium,\n        fontSize = 11.sp,\n        lineHeight = 16.sp,\n        letterSpacing = 0.5.sp\n    )\n    */\n)"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/BugFixTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\n//package com.nexa.demo.utils\n//\n//import com.nexa.sdk.LlmWrapper\n//import com.nexa.sdk.bean.ChatMessage\n//import com.nexa.sdk.bean.LlmApplyChatTemplateOutput\n//import com.nexa.sdk.jni.LLmExt\n//import kotlinx.coroutines.Dispatchers\n//import kotlinx.coroutines.withContext\n//import kotlin.reflect.full.memberProperties\n//import kotlin.reflect.jvm.isAccessible\n//\n//class BugFixTest {\n//\n//    companion object {\n//        suspend fun applyChatTemplate(\n//            lLmExt: LLmExt,\n//            llmWrapper: LlmWrapper,\n//            messages: Array<ChatMessage>,\n//            tools: String?,\n//            enableThinking: Boolean\n//        ): Result<LlmApplyChatTemplateOutput> =\n//            withContext(Dispatchers.IO) {\n//                var handle = 0L\n//                llmWrapper::class.memberProperties.forEach {\n//                    if (it.name == \"handle\") {\n//                        it.isAccessible = true\n//                        handle = it.call(llmWrapper) as Long\n//                        return@forEach\n//                    }\n//                }\n//                if (handle == 0L) {\n//                    return@withContext Result.failure(IllegalStateException(\"LLM not initialized\"))\n//                }\n//                runCatching {\n//                    lLmExt.applyChatTemplateExt(handle, messages, tools, enableThinking)\n//                }\n//            }\n//    }\n//}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/DensityUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.content.Context\n\nobject DensityUtil {\n    fun dpToPx(context: Context, dpValue: Float): Int {\n        val scale = context.resources.displayMetrics.density\n        return (dpValue * scale + 0.5f).toInt()\n    }\n\n    fun pxToDp(context: Context, pxValue: Float): Int {\n        val scale = context.resources.displayMetrics.density\n        return (pxValue / scale + 0.5f).toInt()\n    }\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/ExecShell.java",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils;\n/**\n * Created by fuli.niu on 2016/8/19.\n */\n\nimport android.util.Log;\n\nimport java.io.BufferedReader;\nimport java.io.BufferedWriter;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.util.ArrayList;\n\n/**\n * Created by fuli.niu 2016/8/19\n */\npublic class ExecShell {\n    private static String LOG_TAG = ExecShell.class.getName();\n\n    public enum SHELL_CMD {\n        check_su_binary(new String[]{\"/system/xbin/which\", \"su\"});\n        String[] command;\n\n        SHELL_CMD(String[] command) {\n            this.command = command;\n        }\n    }\n\n    public ArrayList<String> executeCommand(String[] commands) {\n        String line = null;\n        ArrayList<String> fullResponse = new ArrayList<String>();\n        Process localProcess = null;\n        try {\n            localProcess = Runtime.getRuntime().exec(commands);\n        } catch (Exception e) {\n            Log.e(\"nfl\",\"Command line execution failed\");\n            e.printStackTrace();\n            return null;\n        }\n        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(localProcess.getOutputStream()));\n        BufferedReader in = new BufferedReader(new InputStreamReader(localProcess.getInputStream()));\n        try {\n            while ((line = in.readLine()) != null) {\n                fullResponse.add(line);\n            }\n        } catch (Exception e) {\n            Log.e(\"nfl\", \"Command line result processing failed\");\n            e.printStackTrace();\n        }\n        return fullResponse;\n    }\n\n    public ArrayList<String> executeCommand(SHELL_CMD shellCmd) {\n        return executeCommand(shellCmd.command);\n    }\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/GenerateEmbedStringsUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.content.Context\nimport android.util.Log\nimport com.nexa.demo.RAGConfig\nimport com.nexa.demo.bean.EmbedResultBean\nimport com.nexa.demo.bean.ModelData\nimport com.nexa.demo.bean.getNexaManifest\nimport com.nexa.demo.bean.modelDir\nimport com.nexa.demo.bean.modelFile\nimport com.nexa.demo.bean.tokenFile\nimport com.nexa.sdk.EmbedderWrapper\nimport com.nexa.sdk.bean.EmbedderCreateInput\nimport com.nexa.sdk.bean.EmbeddingConfig\nimport com.nexa.sdk.bean.ModelConfig\nimport java.io.File\n\nobject GenerateEmbedStringsUtil {\n\n    private const val TAG = \"GenerateEmbedStringsUtil\"\n\n    private lateinit var embedderWrapper: EmbedderWrapper\n\n    suspend fun load(context: Context, selectModelData: ModelData) {\n        if (::embedderWrapper.isInitialized) {\n            return\n        }\n        val nexaManifestBean = selectModelData.getNexaManifest(context)\n        val pluginId = nexaManifestBean?.PluginId ?: \"cpu_gpu\"\n        val embedderCreateInput = EmbedderCreateInput(\n            model_name = nexaManifestBean?.ModelName\n                ?: \"\",  // Model name for NPU plugin\n            model_path = selectModelData.modelFile(context)!!.absolutePath,\n            tokenizer_path = selectModelData.tokenFile(context)?.absolutePath,\n            config = ModelConfig(\n                npu_lib_folder_path = context.applicationInfo.nativeLibraryDir,\n                npu_model_folder_path = selectModelData.modelDir(context).absolutePath,\n                nGpuLayers = 999\n            ),\n            plugin_id = pluginId,\n            device_id = null\n        )\n\n        EmbedderWrapper.builder()\n            .embedderCreateInput(embedderCreateInput)\n            .build().onSuccess { wrapper ->\n                embedderWrapper = wrapper\n            }.onFailure { error ->\n\n            }\n    }\n\n    /**\n     * Split text into chunks by word count\n     */\n    private fun chunkText(text: String, chunkSize: Int = RAGConfig.CHUNK_SIZE): List<String> {\n        val words = text.split(Regex(\"\\\\s+\"))\n        val chunks = mutableListOf<String>()\n        \n        var i = 0\n        while (i < words.size) {\n            val endIndex = minOf(i + chunkSize, words.size)\n            val chunk = words.subList(i, endIndex).joinToString(\" \")\n            chunks.add(chunk)\n            i += chunkSize\n        }\n        \n        return chunks\n    }\n\n    /**\n     * Embed file paths with chunking support\n     */\n    suspend fun embed(txtFilePaths: Array<String>): ArrayList<EmbedResultBean> {\n        val result = arrayListOf<EmbedResultBean>()\n        \n        // Process each file\n        txtFilePaths.forEach { filePath ->\n            try {\n                // Read file content\n                val fileContent = File(filePath).readText()\n                \n                // Split into chunks\n                val chunks = chunkText(fileContent)\n                \n                // Embed each chunk\n                chunks.forEachIndexed { chunkIndex, chunkText ->\n                    embedderWrapper.embed(arrayOf(chunkText), EmbeddingConfig()).onSuccess { embeddings ->\n                        result.add(\n                            EmbedResultBean(\n                                path = filePath,\n                                txt = chunkText,\n                                chunkIndex = chunkIndex,\n                                result = embeddings.embeddings,\n                                embedResult = embeddings\n                            )\n                        )\n                        Log.d(TAG, \"Embedded chunk $chunkIndex from $filePath\")\n                    }.onFailure { error ->\n                        Log.e(TAG, \"Failed to embed chunk $chunkIndex from $filePath: $error\")\n                    }\n                }\n            } catch (e: Exception) {\n                Log.e(TAG, \"Failed to read file $filePath: $e\")\n            }\n        }\n        \n        return result\n    }\n    \n    /**\n     * Embed text directly (for queries)\n     */\n    suspend fun embedText(text: String): FloatArray? {\n        var result: FloatArray? = null\n        embedderWrapper.embed(arrayOf(text), EmbeddingConfig()).onSuccess { embeddings ->\n            result = embeddings.embeddings\n        }.onFailure { error ->\n            Log.e(TAG, \"Failed to embed text: $error\")\n        }\n        return result\n    }\n\n    fun computeCosineSimilarity(\n        embedding1: FloatArray?,\n        embedding2: FloatArray?\n    ): Float {\n        if (embedding1 == null || embedding2 == null) return 0.0f\n        if (embedding1.isEmpty() || embedding2.isEmpty()) return 0.0f\n        if (embedding1.size != embedding2.size) return 0.0f\n\n        var dotProduct = 0.0f\n        var norm1 = 0.0f\n        var norm2 = 0.0f\n\n        for (i in embedding1.indices) {\n            dotProduct += embedding1[i] * embedding2[i]\n            norm1 += embedding1[i] * embedding1[i]\n            norm2 += embedding2[i] * embedding2[i]\n        }\n\n        val epsilon = 1e-8f\n        norm1 = kotlin.math.sqrt(norm1 + epsilon)\n        norm2 = kotlin.math.sqrt(norm2 + epsilon)\n        Log.d(\"nfl\", \"dotProduct > 0 ? ${dotProduct > 0}\")\n        return dotProduct / (norm1 * norm2)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/ImgUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils;\n\nimport android.content.ContentValues\nimport android.content.Context\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.graphics.Canvas\nimport android.graphics.Matrix\nimport android.media.ExifInterface\nimport android.os.Build\nimport android.provider.MediaStore\nimport androidx.core.graphics.createBitmap\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.io.IOException\n\nclass ImgUtil {\n    companion object {\n        /** Downscale imageFile to maxSize on longest edge, rotate upright, save to outFile (JPEG/WebP), return result file */\n        fun downscaleAndSave(\n            imageFile: File,\n            outFile: File,\n            maxSize: Int = 448,\n            format: Bitmap.CompressFormat = Bitmap.CompressFormat.JPEG,\n            quality: Int = 90\n        ): File {\n            val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }\n            BitmapFactory.decodeFile(imageFile.absolutePath, bounds)\n\n            val inSample = run {\n                val (h, w) = bounds.outHeight to bounds.outWidth\n                var s = 1\n                var halfH = h / 2\n                var halfW = w / 2\n                while (halfH / s >= maxSize && halfW / s >= maxSize) s *= 2\n                s\n            }\n\n            val opts = BitmapFactory.Options().apply {\n                inJustDecodeBounds = false\n                inSampleSize = inSample\n                inPreferredConfig = Bitmap.Config.ARGB_8888\n            }\n            var bmp = BitmapFactory.decodeFile(imageFile.absolutePath, opts) ?: error(\"decode fail\")\n\n            val exif = ExifInterface(imageFile.absolutePath)\n            val orientation = exif.getAttributeInt(\n                ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL\n            )\n            val matrix = Matrix().apply {\n                when (orientation) {\n                    ExifInterface.ORIENTATION_ROTATE_90 -> postRotate(90f)\n                    ExifInterface.ORIENTATION_ROTATE_180 -> postRotate(180f)\n                    ExifInterface.ORIENTATION_ROTATE_270 -> postRotate(270f)\n                    ExifInterface.ORIENTATION_FLIP_HORIZONTAL -> postScale(-1f, 1f)\n                    ExifInterface.ORIENTATION_FLIP_VERTICAL -> postScale(1f, -1f)\n                    ExifInterface.ORIENTATION_TRANSPOSE -> {\n                        postRotate(90f); postScale(-1f, 1f)\n                    }\n\n                    ExifInterface.ORIENTATION_TRANSVERSE -> {\n                        postRotate(270f); postScale(-1f, 1f)\n                    }\n                }\n            }\n            if (!matrix.isIdentity) {\n                val rotated = Bitmap.createBitmap(bmp, 0, 0, bmp.width, bmp.height, matrix, true)\n                if (rotated !== bmp) {\n                    bmp.recycle(); bmp = rotated\n                }\n            }\n\n            val scale = maxOf(bmp.width, bmp.height).toFloat() / maxSize\n            val targetW = (bmp.width / scale).toInt().coerceAtLeast(1)\n            val targetH = (bmp.height / scale).toInt().coerceAtLeast(1)\n            val resized = if (bmp.width != targetW || bmp.height != targetH)\n                Bitmap.createScaledBitmap(bmp, targetW, targetH, true) else bmp\n            if (resized !== bmp) bmp.recycle()\n\n            // 6) Re-compress and save to outFile (this step actually reduces file size)\n            FileOutputStream(outFile).use { fos ->\n                resized.compress(format, quality, fos)\n            }\n            if (!resized.isRecycled) resized.recycle()\n            return outFile\n        }\n\n        fun squareCrop(imageFile: File, outFile: File, size: Int = 448): File {\n            val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }\n            BitmapFactory.decodeFile(imageFile.absolutePath, bounds)\n\n            val options = BitmapFactory.Options().apply {\n                inSampleSize = 1\n                inJustDecodeBounds = false\n            }\n            val bitmap = BitmapFactory.decodeFile(imageFile.absolutePath, options)\n            val cropped = createBitmap(size, size)\n            val canvas = Canvas(cropped)\n            canvas.drawBitmap(\n                bitmap,\n                (size - bitmap.width).toFloat() / 2,\n                (size - bitmap.height).toFloat() / 2,\n                null\n            )\n            if (!bitmap.isRecycled) bitmap.recycle()\n            FileOutputStream(outFile).use { fos ->\n                cropped.compress(Bitmap.CompressFormat.JPEG, 100, fos)\n            }\n            if (!cropped.isRecycled) cropped.recycle()\n            return outFile\n        }\n\n        fun saveImageToGallery(context: Context, imgPath: String) {\n            saveImageToGallery(context, BitmapFactory.decodeFile(imgPath))\n        }\n\n        fun saveImageToGallery(context: Context, file: File) {\n            saveImageToGallery(context, BitmapFactory.decodeFile(file.absolutePath))\n        }\n\n        fun saveImageToGallery(context: Context, bitmap: Bitmap) {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n                val resolver = context.contentResolver\n                val contentValues = ContentValues().apply {\n                    put(MediaStore.MediaColumns.DISPLAY_NAME, \"Image_${System.currentTimeMillis()}.jpg\")\n                    put(MediaStore.MediaColumns.MIME_TYPE, \"image/jpeg\")\n                    put(MediaStore.MediaColumns.RELATIVE_PATH, \"Pictures/Saved Images\")\n                }\n\n                val uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues)\n                uri?.let {\n                    resolver.openOutputStream(it).use { outputStream ->\n                        if (!bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream!!)) {\n                            // throw IOException(\"Unable to save image\")\n                        }\n                        outputStream.close()\n                    }\n                }\n            } else {\n                // Old Android save method\n                // Please implement according to your needs\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/KeyboardUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.content.Context\nimport android.view.inputmethod.InputMethodManager\nimport android.widget.EditText\n\nclass KeyboardUtil {\n    companion object {\n        fun hide(editText: EditText) {\n            val context = editText.context\n            val imm = context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager\n            imm.hideSoftInputFromWindow(editText.windowToken, 0)\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/KotlinUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.app.Activity\nimport android.app.Dialog\nimport android.util.Log\nimport android.view.LayoutInflater\nimport android.view.View\nimport androidx.fragment.app.Fragment\nimport androidx.lifecycle.Lifecycle\nimport androidx.lifecycle.LifecycleObserver\nimport androidx.lifecycle.OnLifecycleEvent\nimport androidx.viewbinding.ViewBinding\nimport kotlin.properties.ReadOnlyProperty\nimport kotlin.reflect.KProperty\n\nclass KotlinUtil {\n    companion object {\n        const val TAG = \"KotlinUtil\"\n    }\n}\n\ninline fun <reified VB : ViewBinding> Activity.inflate() =\n    lazy(LazyThreadSafetyMode.NONE) {\n        inflateBinding<VB>(layoutInflater).apply { setContentView(root) }\n    }\n\ninline fun <T : ViewBinding> Activity.viewBinding(crossinline bindingInflater: (LayoutInflater) -> T) =\n    lazy(LazyThreadSafetyMode.NONE) {\n        val invoke = bindingInflater.invoke(layoutInflater)\n        setContentView(invoke.root) //可选\n        invoke\n    }\n\ninline fun <reified VB : ViewBinding> Dialog.inflate() = lazy {\n    inflateBinding<VB>(layoutInflater).apply { setContentView(root) }\n}\n\n@Suppress(\"UNCHECKED_CAST\")\ninline fun <reified VB : ViewBinding> inflateBinding(layoutInflater: LayoutInflater) =\n    VB::class.java.getMethod(\"inflate\", LayoutInflater::class.java)\n        .invoke(null, layoutInflater) as VB\n\ninline fun <reified VB : ViewBinding> Fragment.bindView() =\n    FragmentBindingDelegate(VB::class.java)\n\nclass FragmentBindingDelegate<VB : ViewBinding>(private val clazz: Class<VB>) :\n    ReadOnlyProperty<Fragment, VB> {\n\n    private var isInitialized = false\n    private var _binding: VB? = null\n    private val binding: VB get() = _binding!!\n\n    override fun getValue(thisRef: Fragment, property: KProperty<*>): VB {\n        if (!isInitialized) {\n            thisRef.viewLifecycleOwner.lifecycle.addObserver(object : LifecycleObserver {\n                @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)\n                fun onDestroyView() {\n                    Log.d(KotlinUtil.TAG, \"KotlinUtil.FragmentBindingDelegate.ON_DESTROY $thisRef\")\n                    _binding = null\n                }\n            })\n            _binding = clazz.getMethod(\"bind\", View::class.java)\n                .invoke(null, thisRef.view) as VB\n            isInitialized = true\n        } else {\n            if (_binding == null) {\n                _binding = clazz.getMethod(\"bind\", View::class.java)\n                    .invoke(null, thisRef.view) as VB\n            }\n        }\n        return binding\n    }\n}\n\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/MD5Utils.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport java.io.File\nimport java.io.FileInputStream\nimport java.io.IOException\nimport java.io.RandomAccessFile\nimport java.lang.Long\nimport java.security.MessageDigest\nimport java.util.Locale\nimport java.util.zip.CRC32\nimport kotlin.ByteArray\nimport kotlin.CharArray\nimport kotlin.Exception\nimport kotlin.Int\nimport kotlin.String\nimport kotlin.Throws\nimport kotlin.also\nimport kotlin.math.max\nimport kotlin.math.min\nimport kotlin.text.uppercase\n\n\nclass MD5Utils {\n    companion object {\n        private val HEX_ARRAY: CharArray = \"0123456789ABCDEF\".toCharArray()\n\n        fun bytesToHex(bytes: ByteArray?): String? {\n            if (bytes == null) return null\n\n            val hexChars = CharArray(bytes.size * 2)\n            for (i in bytes.indices) {\n                val v = bytes[i].toInt() and 0xFF\n                hexChars[i * 2] = HEX_ARRAY[v ushr 4]\n                hexChars[i * 2 + 1] = HEX_ARRAY[v and 0x0F]\n            }\n            return String(hexChars)\n        }\n\n        fun getFileMD5(file: File): String? {\n            try {\n                val md5 = MessageDigest.getInstance(\"MD5\")\n                val fis = FileInputStream(file)\n                val buffer = ByteArray(1024)\n                var length: Int\n                while ((fis.read(buffer).also { length = it }) != -1) {\n                    md5.update(buffer, 0, length)\n                }\n                fis.close()\n                val digest = md5.digest()\n                val sb = StringBuilder()\n                for (b in digest) {\n                    sb.append(Integer.toHexString((b.toInt() and 0xFF) or 0x100).substring(1, 3))\n                }\n                return sb.toString().uppercase(Locale.getDefault())\n            } catch (e: Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n\n        fun getFileSHA256(file: File): String? {\n            try {\n                val digest = MessageDigest.getInstance(\"SHA-256\")\n                val fis = FileInputStream(file)\n                val buffer = ByteArray(1024)\n                var length: Int\n                while ((fis.read(buffer).also { length = it }) != -1) {\n                    digest.update(buffer, 0, length)\n                }\n                fis.close()\n                val hash = digest.digest()\n\n                val hexString = java.lang.StringBuilder()\n                for (b in hash) {\n                    val hex = Integer.toHexString(0xff and b.toInt())\n                    if (hex.length == 1) hexString.append('0')\n                    hexString.append(hex)\n                }\n                return hexString.toString()\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n\n        fun getFileCRC32(file: File): String? {\n            try {\n                val crc32 = CRC32()\n                val fis = FileInputStream(file)\n                val buffer = ByteArray(1024)\n                var length: Int\n                while ((fis.read(buffer).also { length = it }) != -1) {\n                    crc32.update(buffer, 0, length)\n                }\n                fis.close()\n                val value = crc32.value\n                return Long.toHexString(value).uppercase(Locale.getDefault())\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n\n        fun getQuickCRC32(file: File): kotlin.Long {\n            try {\n                val crc32 = CRC32()\n                val raf = RandomAccessFile(file, \"r\")\n                val fileSize = raf.length()\n                val buffer = ByteArray(1024 * 1024)\n\n                // start\n                raf.seek(0)\n                var read = raf.read(buffer)\n                if (read > 0) crc32.update(buffer, 0, read)\n\n                // middle\n                if (fileSize > 2 * buffer.size) {\n                    raf.seek(fileSize / 2)\n                    read = raf.read(buffer)\n                    if (read > 0) crc32.update(buffer, 0, read)\n                }\n\n                // end\n                if (fileSize > buffer.size) {\n                    raf.seek(fileSize - buffer.size)\n                    read = raf.read(buffer)\n                    if (read > 0) crc32.update(buffer, 0, read)\n                }\n\n                raf.close()\n                return crc32.getValue()\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return -1\n            }\n        }\n\n        @Throws(IOException::class)\n        fun getFilePartialHash(file: File, partSize: kotlin.Long): String? {\n            val fileLength = file.length()\n            if (fileLength < partSize * 3) {\n                return getFileSHA256(file)\n            }\n            val digest = MessageDigest.getInstance(\"SHA-256\")\n            val fis = FileInputStream(file)\n            val buffer = ByteArray(8192)\n\n            // read start\n            var bytesRead: kotlin.Long = 0\n            while (bytesRead < partSize) {\n                val length =\n                    fis.read(buffer, 0, min(buffer.size.toLong(), partSize - bytesRead).toInt())\n                if (length == -1) break\n                digest.update(buffer, 0, length)\n                bytesRead += length.toLong()\n            }\n\n            // read middle\n            val middleStart = (fileLength - partSize) / 2\n            fis.getChannel().position(middleStart)\n            bytesRead = 0\n            while (bytesRead < partSize) {\n                val length =\n                    fis.read(buffer, 0, min(buffer.size.toLong(), partSize - bytesRead).toInt())\n                if (length == -1) break\n                digest.update(buffer, 0, length)\n                bytesRead += length.toLong()\n            }\n\n            // read end\n            fis.getChannel().position(fileLength - partSize)\n            bytesRead = 0\n            while (bytesRead < partSize) {\n                val length =\n                    fis.read(buffer, 0, min(buffer.size.toLong(), partSize - bytesRead).toInt())\n                if (length == -1) break\n                digest.update(buffer, 0, length)\n                bytesRead += length.toLong()\n            }\n\n            fis.close()\n            return bytesToHex(digest.digest())\n        }\n\n        fun getPartialFileHash(file: File, sampleCount: Int): String? {\n            try {\n                val digest = MessageDigest.getInstance(\"SHA-256\")\n                val raf = RandomAccessFile(file, \"r\")\n                val fileSize = raf.length()\n\n                for (i in 0..<sampleCount) {\n                    val position = (fileSize * i) / sampleCount\n                    raf.seek(position)\n\n                    val buffer = ByteArray(4096)\n                    val bytesRead = raf.read(buffer)\n                    if (bytesRead > 0) {\n                        digest.update(buffer, 0, bytesRead)\n                    }\n                }\n\n                raf.seek(0)\n                val header = ByteArray(1024)\n                val headerRead = raf.read(header)\n                if (headerRead > 0) digest.update(header, 0, headerRead)\n\n                raf.seek(max(0, fileSize - 1024))\n                val footer = ByteArray(1024)\n                val footerRead = raf.read(footer)\n                if (footerRead > 0) digest.update(footer, 0, footerRead)\n\n                raf.close()\n                return bytesToHex(digest.digest())\n            } catch (e: java.lang.Exception) {\n                e.printStackTrace()\n                return null\n            }\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/ModelFileListingUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.util.Log\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.withContext\nimport okhttp3.OkHttpClient\nimport okhttp3.Request\nimport org.json.JSONArray\nimport org.xmlpull.v1.XmlPullParser\nimport org.xmlpull.v1.XmlPullParserFactory\nimport java.io.StringReader\n\n/**\n * Utility class to list and download model files from S3 or Hugging Face Hub.\n * Provides fallback mechanism: tries S3 first, then falls back to HF if S3 fails.\n */\nobject ModelFileListingUtil {\n    private const val TAG = \"ModelFileListingUtil\"\n    private const val HF_OWNER = \"NexaAI\"\n\n    /**\n     * Result of file listing operation\n     */\n    data class FileListResult(\n        val files: List<String>,\n        val source: Source,\n        val repoId: String? = null  // Only set for HF source\n    ) {\n        enum class Source { S3, HUGGINGFACE, FAILED }\n    }\n\n    /**\n     * Represents a downloadable file with both S3 and HF URLs\n     */\n    data class DownloadableFileWithFallback(\n        val fileName: String,\n        val s3Url: String,\n        val hfUrl: String\n    )\n\n    /**\n     * Extracts repo name from S3 URL.\n     * \n     * Examples:\n     * - https://...../embeddinggemma-300m-npu-mobile/ -> embeddinggemma-300m-npu-mobile\n     * - https://...../LFM2-1.2B-GGUF/LFM2-1.2B-Q4_0.gguf -> LFM2-1.2B-GGUF\n     */\n    fun extractRepoNameFromS3Url(s3Url: String): String {\n        val path = s3Url.removePrefix(\"https://\").removePrefix(\"http://\")\n            .substringAfter(\"/\")  // Remove host\n            .trimEnd('/')\n        \n        val segments = path.split(\"/\").filter { it.isNotEmpty() }\n        \n        // Check if last segment is a file (has extension)\n        return if (segments.isNotEmpty()) {\n            val lastSegment = segments.last()\n            if (lastSegment.contains(\".\") && !lastSegment.endsWith(\"/\")) {\n                // It's a file, get the parent directory name\n                if (segments.size >= 2) segments[segments.size - 2] else lastSegment\n            } else {\n                // It's a directory\n                lastSegment\n            }\n        } else {\n            \"\"\n        }\n    }\n\n    /**\n     * Constructs HF repo ID from S3 URL.\n     * @return repo ID in format \"NexaAI/{repo_name}\"\n     */\n    fun getHfRepoId(s3Url: String): String {\n        val repoName = extractRepoNameFromS3Url(s3Url)\n        return \"$HF_OWNER/$repoName\"\n    }\n\n    /**\n     * Constructs HF download URL for a file.\n     * @param repoId HF repo ID (e.g., \"NexaAI/embeddinggemma-300m-npu-mobile\")\n     * @param fileName File name to download\n     * @return Full HF download URL\n     */\n    fun getHfDownloadUrl(repoId: String, fileName: String): String {\n        return \"https://huggingface.co/$repoId/resolve/main/$fileName?download=true\"\n    }\n\n    /**\n     * Lists all files under a given S3 base URL, with fallback to Hugging Face.\n     *\n     * @param baseUrl The S3 base URL\n     * @param client OkHttpClient instance\n     * @return FileListResult containing files and source information\n     */\n    suspend fun listFilesWithFallback(\n        baseUrl: String,\n        client: OkHttpClient\n    ): FileListResult = withContext(Dispatchers.IO) {\n        // Try S3 first\n        val s3Files = listFilesFromS3(baseUrl, client)\n        if (s3Files.isNotEmpty()) {\n            Log.d(TAG, \"Successfully listed ${s3Files.size} files from S3\")\n            return@withContext FileListResult(s3Files, FileListResult.Source.S3)\n        }\n\n        // Fallback to Hugging Face\n        Log.w(TAG, \"S3 listing failed, falling back to Hugging Face\")\n        val repoId = getHfRepoId(baseUrl)\n        val hfFiles = listFilesFromHuggingFace(repoId, client)\n        if (hfFiles.isNotEmpty()) {\n            Log.d(TAG, \"Successfully listed ${hfFiles.size} files from HuggingFace: $repoId\")\n            return@withContext FileListResult(hfFiles, FileListResult.Source.HUGGINGFACE, repoId)\n        }\n\n        Log.e(TAG, \"Failed to list files from both S3 and HuggingFace\")\n        FileListResult(emptyList(), FileListResult.Source.FAILED)\n    }\n\n    /**\n     * Lists all files under a given S3 base URL.\n     */\n    suspend fun listFilesFromS3(baseUrl: String, client: OkHttpClient): List<String> = withContext(Dispatchers.IO) {\n        try {\n            val urlWithoutProtocol = baseUrl.removePrefix(\"https://\").removePrefix(\"http://\")\n            val hostEndIndex = urlWithoutProtocol.indexOf('/')\n            if (hostEndIndex == -1) {\n                Log.e(TAG, \"Invalid S3 URL format: $baseUrl\")\n                return@withContext emptyList()\n            }\n\n            val host = urlWithoutProtocol.substring(0, hostEndIndex)\n            val prefix = urlWithoutProtocol.substring(hostEndIndex + 1).trimEnd('/')\n\n            val listUrl = \"https://$host/?list-type=2&prefix=$prefix/\"\n            Log.d(TAG, \"Listing S3 bucket: $listUrl\")\n\n            val request = Request.Builder()\n                .url(listUrl)\n                .get()\n                .build()\n\n            val response = client.newCall(request).execute()\n            if (!response.isSuccessful) {\n                Log.e(TAG, \"Failed to list S3 bucket: ${response.code}\")\n                return@withContext emptyList()\n            }\n\n            val xmlContent = response.body?.string() ?: return@withContext emptyList()\n            Log.d(TAG, \"S3 response received, parsing XML...\")\n\n            val files = parseS3ListResponse(xmlContent, prefix)\n            Log.d(TAG, \"Found ${files.size} files from S3: $files\")\n            files\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error listing S3 files: ${e.message}\", e)\n            emptyList()\n        }\n    }\n\n    /**\n     * Lists all files from a Hugging Face repository.\n     * \n     * @param repoId HF repo ID (e.g., \"NexaAI/embeddinggemma-300m-npu-mobile\")\n     * @param client OkHttpClient instance\n     * @return List of file names in the repository\n     */\n    suspend fun listFilesFromHuggingFace(repoId: String, client: OkHttpClient): List<String> = withContext(Dispatchers.IO) {\n        try {\n            // HF API endpoint to list files in a repo\n            val apiUrl = \"https://huggingface.co/api/models/$repoId/tree/main\"\n            Log.d(TAG, \"Listing HuggingFace repo: $apiUrl\")\n\n            val request = Request.Builder()\n                .url(apiUrl)\n                .get()\n                .build()\n\n            val response = client.newCall(request).execute()\n            if (!response.isSuccessful) {\n                Log.e(TAG, \"Failed to list HuggingFace repo: ${response.code}\")\n                return@withContext emptyList()\n            }\n\n            val jsonContent = response.body?.string() ?: return@withContext emptyList()\n            Log.d(TAG, \"HuggingFace response received, parsing JSON...\")\n\n            val files = parseHuggingFaceResponse(jsonContent)\n            Log.d(TAG, \"Found ${files.size} files from HuggingFace: $files\")\n            files\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error listing HuggingFace files: ${e.message}\", e)\n            emptyList()\n        }\n    }\n\n    /**\n     * Parses the S3 ListObjectsV2 XML response and extracts file names.\n     */\n    private fun parseS3ListResponse(xmlContent: String, prefix: String): List<String> {\n        val files = mutableListOf<String>()\n        try {\n            val factory = XmlPullParserFactory.newInstance()\n            factory.isNamespaceAware = false\n            val parser = factory.newPullParser()\n            parser.setInput(StringReader(xmlContent))\n\n            var eventType = parser.eventType\n            var currentTag = \"\"\n            val prefixWithSlash = if (prefix.endsWith(\"/\")) prefix else \"$prefix/\"\n\n            while (eventType != XmlPullParser.END_DOCUMENT) {\n                when (eventType) {\n                    XmlPullParser.START_TAG -> {\n                        currentTag = parser.name\n                    }\n                    XmlPullParser.TEXT -> {\n                        if (currentTag == \"Key\") {\n                            val key = parser.text\n                            if (key.startsWith(prefixWithSlash) && key.length > prefixWithSlash.length) {\n                                val relativePath = key.removePrefix(prefixWithSlash)\n                                if (!relativePath.endsWith(\"/\") && relativePath.isNotEmpty()) {\n                                    files.add(relativePath)\n                                }\n                            }\n                        }\n                    }\n                    XmlPullParser.END_TAG -> {\n                        currentTag = \"\"\n                    }\n                }\n                eventType = parser.next()\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error parsing S3 XML response: ${e.message}\", e)\n        }\n        return files\n    }\n\n    /**\n     * Parses the Hugging Face API JSON response and extracts file names.\n     * The response is an array of objects with \"path\" and \"type\" fields.\n     */\n    private fun parseHuggingFaceResponse(jsonContent: String): List<String> {\n        val files = mutableListOf<String>()\n        try {\n            val jsonArray = JSONArray(jsonContent)\n            for (i in 0 until jsonArray.length()) {\n                val item = jsonArray.getJSONObject(i)\n                val type = item.optString(\"type\", \"\")\n                val path = item.optString(\"path\", \"\")\n                \n                // Only include files, not directories\n                if (type == \"file\" && path.isNotEmpty()) {\n                    files.add(path)\n                }\n            }\n        } catch (e: Exception) {\n            Log.e(TAG, \"Error parsing HuggingFace JSON response: ${e.message}\", e)\n        }\n        return files\n    }\n\n    /**\n     * Builds downloadable file entries with both S3 and HF fallback URLs.\n     * \n     * @param baseUrl S3 base URL\n     * @param fileNames List of file names to download\n     * @return List of DownloadableFileWithFallback entries\n     */\n    fun buildDownloadableFilesWithFallback(\n        baseUrl: String,\n        fileNames: List<String>\n    ): List<DownloadableFileWithFallback> {\n        val repoId = getHfRepoId(baseUrl)\n        return fileNames.map { fileName ->\n            val s3Url = if (baseUrl.endsWith(\"/\")) \"$baseUrl$fileName\" else \"$baseUrl/$fileName\"\n            val hfUrl = getHfDownloadUrl(repoId, fileName)\n            DownloadableFileWithFallback(fileName, s3Url, hfUrl)\n        }\n    }\n\n    /**\n     * Gets the HF download URL for a specific .gguf file from its S3 URL.\n     * Used for non-NPU models that have direct file URLs.\n     * \n     * @param s3FileUrl Full S3 URL to the .gguf file\n     * @return HF download URL for the same file\n     */\n    fun getHfUrlForGgufFile(s3FileUrl: String): String {\n        val repoId = getHfRepoId(s3FileUrl)\n        val fileName = s3FileUrl.substringAfterLast(\"/\")\n        return getHfDownloadUrl(repoId, fileName)\n    }\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/PermissionUtil.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nimport android.Manifest\nimport android.content.Context\nimport android.content.DialogInterface\nimport android.content.DialogInterface.BUTTON_POSITIVE\nimport android.content.Intent\nimport android.content.pm.PackageManager\nimport android.net.Uri\nimport android.os.Build\nimport android.os.Environment\nimport android.provider.Settings\nimport androidx.activity.ComponentActivity\nimport androidx.activity.result.contract.ActivityResultContracts\nimport androidx.appcompat.app.AlertDialog\nimport androidx.core.content.ContextCompat\n\nclass PermissionUtil {\n    companion object {\n\n        fun requestManageStoragePermission(activity: ComponentActivity) {\n            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n                try {\n                    val intent =\n                        Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION)\n                    intent.data = Uri.parse(\"package:${activity.packageName}\")\n                    activity.startActivity(intent)\n                } catch (e: Exception) {\n                    val intent =\n                        Intent(Settings.ACTION_MANAGE_ALL_FILES_ACCESS_PERMISSION)\n                    activity.startActivity(intent)\n                }\n            } else {\n                activity.registerForActivityResult(\n                    ActivityResultContracts.RequestPermission()\n                ) {}\n            }\n        }\n\n        fun showRequestManageStoragePermissionDialog(activity: ComponentActivity) {\n            val onClickListener = DialogInterface.OnClickListener { dialog, which ->\n                when (which) {\n                    BUTTON_POSITIVE -> {\n                        requestManageStoragePermission(activity = activity)\n                    }\n\n                    else -> {}\n                }\n                dialog?.dismiss()\n            }\n            AlertDialog.Builder(activity)\n                .setMessage(\"Index files need MANAGE_EXTERNAL_STORAGE permission, please agree it.\")\n                .setNegativeButton(\"cancel\", onClickListener)\n                .setPositiveButton(\"sure\", onClickListener)\n                .show()\n        }\n\n        fun checkManageStoragePermission(context: Context): Boolean {\n            return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {\n                Environment.isExternalStorageManager()\n            } else {\n                ContextCompat.checkSelfPermission(\n                    context,\n                    Manifest.permission.WRITE_EXTERNAL_STORAGE\n                ) == PackageManager.PERMISSION_GRANTED\n            }\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/SharePreferenceKeys.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils\n\nclass SharePreferenceKeys {\n    companion object {\n        const val KEY_LAST_LOAD_MODEL_ID = \"last_load_model_id\"\n        /**\n         * When navigation pops, since it will load the initial modelId, cannot directly load model,\n         * should let MainChatScreen load it\n         */\n        const val KEY_PREPARE_LOAD_MODEL_ID = \"prepare_load_model_id\"\n        const val KEY_SHOW_OPERATION_POPUP = \"show_operation_popup\"\n    }\n    enum class FileName(val fileName: String) {\n        ModelDownloadState(\"mode_download_state\"),\n        CommonConfig(\"common_config\"),\n        ModelDownloaded(\"sp_downloaded\")\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/utils/WavRecorder.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.utils;\n\nimport android.Manifest\nimport android.media.AudioFormat\nimport android.media.AudioRecord\nimport android.media.MediaRecorder\nimport android.media.audiofx.Visualizer\nimport android.media.audiofx.Visualizer.OnDataCaptureListener\nimport android.util.Log\nimport androidx.annotation.RequiresPermission\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.io.RandomAccessFile\nimport kotlin.math.log10\n\n\nclass WavRecorder(\n    private val sampleRate: Int = 16000,\n    private val channelConfig: Int = AudioFormat.CHANNEL_IN_MONO,\n    private val audioFormat: Int = AudioFormat.ENCODING_PCM_16BIT,\n    private val maxDurationMs: Long = MAX_DURATION_MINUTE * 1000L,\n    private val onVolumeDbChangeListener: OnVolumeDbChangeListener = object :\n        OnVolumeDbChangeListener {\n        override fun onVolumeDbChange(volumeDb: Double) {\n        }\n    },\n    private val onMaxDurationReached: (() -> Unit)? = null\n) {\n    private var recorder: AudioRecord? = null\n    @Volatile\n    private var isRecording = false\n    private var recordingThread: Thread? = null\n    private var visualizer: Visualizer? = null\n\n    companion object {\n        const val MAX_DURATION_MINUTE = 20\n    }\n\n    @RequiresPermission(Manifest.permission.RECORD_AUDIO)\n    fun startRecording(outputFile: File) {\n        val minBuffer = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)\n        recorder = AudioRecord(\n            MediaRecorder.AudioSource.MIC,\n            sampleRate,\n            channelConfig,\n            audioFormat,\n            minBuffer\n        )\n\n        recorder?.startRecording()\n        isRecording = true\n\n        recordingThread = Thread {\n            writePcmToWav(outputFile, minBuffer)\n        }.apply { start() }\n    }\n\n    fun stopRecording() {\n        isRecording = false\n        try {\n            recorder?.stop()\n            recorder?.release()\n            visualizer?.enabled = false\n            visualizer?.release()\n        } catch (_: Exception) {\n        }\n        recorder = null\n        recordingThread = null\n        visualizer = null\n    }\n\n    private fun writePcmToWav(outputFile: File, bufferSize: Int) {\n        val data = ByteArray(bufferSize)\n        var totalAudioLen: Long = 0\n        val startTime = System.currentTimeMillis()\n        FileOutputStream(outputFile).use { fos ->\n            writeWavHeader(fos, sampleRate, 1, 16, 0)\n            var nowTime = System.currentTimeMillis()\n            while (isRecording) {\n                val currentTime = System.currentTimeMillis()\n                val elapsedTime = currentTime - startTime\n                \n                // Check if maximum duration is reached\n                if (elapsedTime >= maxDurationMs) {\n                    onMaxDurationReached?.invoke()\n                    break\n                }\n                \n                val read = recorder?.read(data, 0, data.size) ?: 0\n                if (read > 0) {\n                    fos.write(data, 0, read)\n                    totalAudioLen += read\n                    // Process audio decibels\n                    // Calculate sum of squares\n                    val lastTime = System.currentTimeMillis()\n                    if (lastTime - nowTime > 60) {\n                        var sum: Long = 0\n                        for (i in 0..<read) {\n                            sum += data[i] * data[i]\n                        }\n                        // Calculate average and convert to decibels\n                        val mean = sum / read.toDouble()\n                        val volumeDb = 10 * log10(mean)\n                        onVolumeDbChangeListener.onVolumeDbChange(volumeDb)\n                        nowTime = lastTime\n                    }\n                }\n            }\n            // Fill back header\n            updateWavHeader(outputFile, totalAudioLen, sampleRate, 1, 16)\n        }\n    }\n\n    private fun writeWavHeader(\n        out: FileOutputStream, sampleRate: Int, channels: Int,\n        bitsPerSample: Int, dataSize: Long\n    ) {\n        val byteRate = sampleRate * channels * bitsPerSample / 8\n        val totalDataLen = 36 + dataSize\n        val header = ByteArray(44)\n\n        fun putLE(value: Long, offset: Int) {\n            header[offset] = (value and 0xff).toByte()\n            header[offset + 1] = ((value shr 8) and 0xff).toByte()\n            header[offset + 2] = ((value shr 16) and 0xff).toByte()\n            header[offset + 3] = ((value shr 24) and 0xff).toByte()\n        }\n\n        // ChunkID \"RIFF\"\n        header[0] = 'R'.code.toByte(); header[1] = 'I'.code.toByte()\n        header[2] = 'F'.code.toByte(); header[3] = 'F'.code.toByte()\n        putLE(totalDataLen, 4)\n\n        // Format \"WAVE\"\n        header[8] = 'W'.code.toByte(); header[9] = 'A'.code.toByte()\n        header[10] = 'V'.code.toByte(); header[11] = 'E'.code.toByte()\n\n        // Subchunk1 \"fmt \"\n        header[12] = 'f'.code.toByte(); header[13] = 'm'.code.toByte()\n        header[14] = 't'.code.toByte(); header[15] = ' '.code.toByte()\n        putLE(16, 16) // Subchunk1 size\n        header[20] = 1; header[21] = 0 // PCM\n        header[22] = channels.toByte(); header[23] = 0\n        putLE(sampleRate.toLong(), 24)\n        putLE(byteRate.toLong(), 28)\n        header[32] = (channels * bitsPerSample / 8).toByte(); header[33] = 0\n        header[34] = bitsPerSample.toByte(); header[35] = 0\n\n        // Subchunk2 \"data\"\n        header[36] = 'd'.code.toByte(); header[37] = 'a'.code.toByte()\n        header[38] = 't'.code.toByte(); header[39] = 'a'.code.toByte()\n        putLE(dataSize, 40)\n\n        out.write(header, 0, 44)\n    }\n\n    private fun updateWavHeader(\n        wavFile: File, dataSize: Long,\n        sampleRate: Int, channels: Int, bitsPerSample: Int\n    ) {\n        val totalDataLen = 36 + dataSize\n        val byteRate = sampleRate * channels * bitsPerSample / 8\n\n        RandomAccessFile(wavFile, \"rw\").use { raf ->\n            fun putLE(offset: Long, value: Long) {\n                raf.seek(offset)\n                raf.write(\n                    byteArrayOf(\n                        (value and 0xff).toByte(),\n                        ((value shr 8) and 0xff).toByte(),\n                        ((value shr 16) and 0xff).toByte(),\n                        ((value shr 24) and 0xff).toByte()\n                    )\n                )\n            }\n            putLE(4, totalDataLen)\n            putLE(40, dataSize)\n        }\n    }\n\n    @Deprecated(\"Has issues, temporarily using decibel solution\")\n    private fun initVisualizer(audioSessionId: Int) {\n        val captureSize = Visualizer.getCaptureSizeRange()[1]\n        visualizer = Visualizer(audioSessionId)\n        visualizer!!.captureSize = captureSize\n        visualizer!!.setDataCaptureListener(\n            object : OnDataCaptureListener {\n                override fun onWaveFormDataCapture(\n                    visualizer: Visualizer?,\n                    waveform: ByteArray?,\n                    samplingRate: Int\n                ) {\n                    // Process waveform data\n                    waveform?.let {\n                        val size = it.size.coerceAtMost(100)\n                        for (i in 0 until size) {\n                            Log.d(\"nfl\", \"$i : ${it[i]}\")\n                        }\n                    }\n                }\n\n                override fun onFftDataCapture(\n                    visualizer: Visualizer?,\n                    fft: ByteArray?,\n                    samplingRate: Int\n                ) {\n                    // Process FFT data\n                }\n            },\n            Visualizer.getMaxCaptureRate() / 2,\n            true,\n            true\n        )\n        visualizer!!.enabled = true\n    }\n\n    interface OnVolumeDbChangeListener {\n        /**\n         * Current decibel value, typically 30~90\n         */\n        fun onVolumeDbChange(volumeDb: Double)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/java/com/nexa/demo/widget/WrapRadioGroup.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo.widget\n\nimport android.content.Context\nimport android.util.AttributeSet\nimport android.view.View\nimport android.widget.RadioGroup\nimport androidx.core.view.size\nimport com.nexa.demo.R\nimport kotlin.math.max\n\nclass WrapRadioGroup : RadioGroup {\n    private var mMaxWidth = 0\n    private var childMaxHeight = 80\n    private var firstLinePadding = 0\n\n    constructor(context: Context?) : super(context)\n\n    constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)\n\n    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {\n        val widthMode = MeasureSpec.getMode(widthMeasureSpec)\n        val widthSize = MeasureSpec.getSize(widthMeasureSpec)\n        val heightMode = MeasureSpec.getMode(heightMeasureSpec)\n        val heightSize = MeasureSpec.getSize(heightMeasureSpec)\n\n        mMaxWidth = widthSize - getPaddingLeft() - getPaddingRight()\n\n        val childCount = size\n        var linePosition = 0\n        var curLineWidth = 0\n        var firstLineChildWidth = 0\n        var firstLineChildCount = 0\n        for (i in 0..<childCount) {\n            val child = getChildAt(i)\n            if (child.visibility != View.VISIBLE) {\n                continue\n            }\n            val lp = child.layoutParams as LayoutParams\n            val childWidth = child.measuredWidth + lp.leftMargin + lp.rightMargin\n            childMaxHeight =\n                max(childMaxHeight, child.measuredHeight + lp.topMargin + lp.bottomMargin)\n            if (childWidth > mMaxWidth) {\n                if (curLineWidth > 0) {\n                    linePosition++\n                }\n                curLineWidth = 0\n            } else {\n                if (curLineWidth + childWidth > mMaxWidth) {\n                    linePosition++\n                    curLineWidth = childWidth\n                } else {\n                    curLineWidth += childWidth\n                }\n            }\n            if (linePosition == 0) {\n                firstLineChildWidth += childWidth\n                firstLineChildCount++\n            }\n            child.setTag(R.id.wrap_radio_button_line, linePosition)\n        }\n\n        if (linePosition == 0) {\n            if (firstLineChildCount > 1) {\n                firstLinePadding = (mMaxWidth - firstLineChildWidth) / (firstLineChildCount - 1)\n            }\n        } else {\n            firstLinePadding = 0\n        }\n\n        val measuredWidth = widthMeasureSpec\n        val measuredHeight = MeasureSpec.makeMeasureSpec(\n            (linePosition + 1) * childMaxHeight + paddingTop + paddingBottom,\n            heightMode\n        )\n\n        super.onMeasure(widthMeasureSpec, measuredHeight)\n    }\n\n    override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {\n        val childCount = getChildCount()\n\n        val x = getPaddingLeft()\n        val y = paddingTop\n        var left = x\n        var currentLine = 0\n        for (i in 0..<childCount) {\n            val child = getChildAt(i)\n            if (child.visibility != View.VISIBLE) {\n                continue\n            }\n            val lp = child.layoutParams as LayoutParams\n            val childWidth = child.measuredWidth + lp.leftMargin + lp.rightMargin\n\n            val linePosition = child.getTag(R.id.wrap_radio_button_line) as Int\n            if (currentLine != linePosition) {\n                currentLine = linePosition\n                left = x\n            }\n            val top = y + linePosition * childMaxHeight\n            child.layout(left, top, left + childWidth, top + childMaxHeight)\n            left += childWidth + firstLinePadding\n        }\n    }\n\n    companion object {\n        private const val TAG = \"WrapRadioGroup\"\n    }\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/color/btn_enable_color.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:color=\"#1F1F1F\" android:state_enabled=\"true\" />\n    <item android:color=\"#ADADAD\" android:state_enabled=\"false\" />\n</selector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_ai_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#DBEAEB\"/>\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_audio_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector\n    xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"120dp\"\n    android:height=\"54dp\"\n    android:viewportWidth=\"120\"\n    android:viewportHeight=\"54\"\n    >\n    <group>\n        <clip-path\n            android:pathData=\"M16 0H104C112.837 0 120 7.16344 120 16V38C120 46.8366 112.837 54 104 54H16C7.16344 54 0 46.8366 0 38V16C0 7.16344 7.16344 0 16 0Z\"\n            />\n        <path\n            android:pathData=\"M16 0H104C112.837 0 120 7.16344 120 16V38C120 46.8366 112.837 54 104 54H16C7.16344 54 0 46.8366 0 38V16C0 7.16344 7.16344 0 16 0Z\"\n            android:strokeWidth=\"2\"\n            android:strokeColor=\"#E7E7E7\"\n            />\n    </group>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_circle_gray.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <size\n        android:width=\"24dp\"\n        android:height=\"24dp\" />\n    <solid android:color=\"#E7E7E7\" />\n    <corners android:radius=\"12dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_citations_bottom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners\n        android:topLeftRadius=\"16dp\"\n        android:topRightRadius=\"16dp\" />\n    <solid android:color=\"#fff\" />\n    <padding\n        android:bottom=\"15dp\"\n        android:left=\"15dp\"\n        android:right=\"15dp\"\n        android:top=\"15dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_index_bottom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners\n        android:topLeftRadius=\"45dp\"\n        android:topRightRadius=\"45dp\" />\n    <solid android:color=\"#fff\" />\n    <padding\n        android:bottom=\"15dp\"\n        android:left=\"15dp\"\n        android:right=\"15dp\"\n        android:top=\"15dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_input_box_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#ffffff\" />\n    <corners\n        android:topLeftRadius=\"24dp\"\n        android:topRightRadius=\"24dp\"\n        android:bottomLeftRadius=\"0dp\"\n        android:bottomRightRadius=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_round_gray.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"8dp\" />\n    <solid android:color=\"#E7E7E7\" />\n    <padding\n        android:bottom=\"8dp\"\n        android:left=\"8dp\"\n        android:right=\"8dp\"\n        android:top=\"8dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_spinner_dropdown.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#FFFFFF\" />\n    <corners android:radius=\"8dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_topk_bottom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#fcfcfc\" />\n    <corners\n        android:topLeftRadius=\"24dp\"\n        android:topRightRadius=\"24dp\"\n        android:bottomLeftRadius=\"0dp\"\n        android:bottomRightRadius=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/bg_user_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <solid android:color=\"#DBEAEB\"/>\n    <corners android:radius=\"16dp\"/>\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_bg_enable.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@drawable/btn_rounded_border_gray\" android:state_enabled=\"false\" />\n    <item android:drawable=\"@drawable/btn_rounded_border\" android:state_enabled=\"true\" />\n</selector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_black_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"24dp\" />\n    <solid android:color=\"#1F1F1F\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_black_bg_18.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"18dp\" />\n    <solid android:color=\"#454545\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_border.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"24dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#454545\" />\n    <solid android:color=\"#FFFFFFFF\" />\n    <padding\n        android:left=\"0dp\"\n        android:top=\"0dp\"\n        android:right=\"0dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_border_18.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"18dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#454545\" />\n    <solid android:color=\"#FFFFFFFF\" />\n    <padding\n        android:left=\"2dp\"\n        android:top=\"0dp\"\n        android:right=\"2dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_border_gray.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"24dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#E7E7E7\" />\n    <solid android:color=\"#FCFCFC\" />\n    <padding\n        android:left=\"0dp\"\n        android:top=\"0dp\"\n        android:right=\"0dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_border_gray_8dp.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"8dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#E7E7E7\" />\n    <solid android:color=\"#FCFCFC\" />\n    <padding\n        android:left=\"0dp\"\n        android:top=\"0dp\"\n        android:right=\"0dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/btn_rounded_border_transparent.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"rectangle\">\n    <corners android:radius=\"24dp\" />\n    <stroke\n        android:width=\"1dp\"\n        android:color=\"#FFFFFF\" />\n    <solid android:color=\"@android:color/transparent\" />\n    <padding\n        android:left=\"0dp\"\n        android:top=\"0dp\"\n        android:right=\"0dp\"\n        android:bottom=\"0dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/ic_launcher_background.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path\n        android:fillColor=\"#3DDC84\"\n        android:pathData=\"M0,0h108v108h-108z\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M9,0L9,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,0L19,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,0L29,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,0L39,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,0L49,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,0L59,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,0L69,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,0L79,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M89,0L89,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M99,0L99,108\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,9L108,9\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,19L108,19\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,29L108,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,39L108,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,49L108,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,59L108,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,69L108,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,79L108,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,89L108,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M0,99L108,99\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,29L89,29\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,39L89,39\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,49L89,49\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,59L89,59\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,69L89,69\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M19,79L89,79\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M29,19L29,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M39,19L39,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M49,19L49,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M59,19L59,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M69,19L69,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n    <path\n        android:fillColor=\"#00000000\"\n        android:pathData=\"M79,19L79,89\"\n        android:strokeWidth=\"0.8\"\n        android:strokeColor=\"#33FFFFFF\" />\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/ic_launcher_foreground.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:aapt=\"http://schemas.android.com/aapt\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n    android:viewportWidth=\"108\"\n    android:viewportHeight=\"108\">\n    <path android:pathData=\"M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z\">\n        <aapt:attr name=\"android:fillColor\">\n            <gradient\n                android:endX=\"85.84757\"\n                android:endY=\"92.4963\"\n                android:startX=\"42.9492\"\n                android:startY=\"49.59793\"\n                android:type=\"linear\">\n                <item\n                    android:color=\"#44000000\"\n                    android:offset=\"0.0\" />\n                <item\n                    android:color=\"#00000000\"\n                    android:offset=\"1.0\" />\n            </gradient>\n        </aapt:attr>\n    </path>\n    <path\n        android:fillColor=\"#FFFFFF\"\n        android:fillType=\"nonZero\"\n        android:pathData=\"M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z\"\n        android:strokeWidth=\"1\"\n        android:strokeColor=\"#00000000\" />\n</vector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_add.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:width=\"20dp\"\n  android:height=\"20dp\"\n  android:viewportWidth=\"20\"\n  android:viewportHeight=\"20\">\n  <path\n    android:pathData=\"M4.16699,9.99984H15.8337M10.0003,4.1665V15.8332\"\n    android:strokeWidth=\"1.25\"\n    android:strokeColor=\"#888888\"\n    android:strokeLineCap=\"round\"\n    android:strokeLineJoin=\"round\"\n    android:fillColor=\"#00000000\" />\n</vector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_alert_yellow.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"15dp\"\n    android:height=\"15dp\"\n    android:viewportWidth=\"15\"\n    android:viewportHeight=\"15\">\n  <path\n      android:pathData=\"M7.333,4.667V7.333M7.333,10H7.34M14,7.333C14,11.015 11.015,14 7.333,14C3.651,14 0.667,11.015 0.667,7.333C0.667,3.651 3.651,0.667 7.333,0.667C11.015,0.667 14,3.651 14,7.333Z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#EB9024\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_arrow_down.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M4,6L8,10L12,6\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_arrow_down_white.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:width=\"16dp\"\n  android:height=\"16dp\"\n  android:viewportWidth=\"16\"\n  android:viewportHeight=\"16\">\n  <path\n    android:pathData=\"M4,6L8,10L12,6\"\n    android:strokeLineJoin=\"round\"\n    android:strokeWidth=\"1.33333\"\n    android:fillColor=\"#00000000\"\n    android:strokeColor=\"#FFFFFF\"\n    android:strokeLineCap=\"round\" />\n</vector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_arrow_right.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M6,12L10,8L6,4\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_back.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M8,15L1,8M1,8L8,1M1,8H15\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"2\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_check.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:width=\"20dp\"\n  android:height=\"20dp\"\n  android:viewportWidth=\"24\"\n  android:viewportHeight=\"24\">\n  <path\n    android:pathData=\"M9,16.17L4.83,12l-1.42,1.41L9,19 21,7l-1.41,-1.41z\"\n    android:fillColor=\"#000000\" />\n</vector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_clear.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:width=\"20dp\"\n  android:height=\"20dp\"\n  android:viewportWidth=\"20\"\n  android:viewportHeight=\"20\">\n  <path\n    android:pathData=\"M2.5,5.00008H17.5M15.8333,5.00008V16.6667C15.8333,17.5001 15,18.3334 14.1667,18.3334H5.83333C5,18.3334 4.16667,17.5001 4.16667,16.6667V5.00008M6.66667,5.00008V3.33341C6.66667,2.50008 7.5,1.66675 8.33333,1.66675H11.6667C12.5,1.66675 13.3333,2.50008 13.3333,3.33341V5.00008\"\n    android:strokeWidth=\"1.25\"\n    android:strokeColor=\"#E7E7E7\"\n    android:strokeLineCap=\"round\"\n    android:strokeLineJoin=\"round\"\n    android:fillColor=\"#00000000\" />\n</vector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_close.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"14dp\"\n    android:height=\"14dp\"\n    android:viewportWidth=\"14\"\n    android:viewportHeight=\"14\">\n  <path\n      android:pathData=\"M13,1L1,13M1,1L13,13\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"2\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_config.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"34dp\"\n    android:height=\"34dp\"\n    android:viewportWidth=\"34\"\n    android:viewportHeight=\"34\">\n  <path\n      android:pathData=\"M17,0.5L17,0.5A16.5,16.5 0,0 1,33.5 17L33.5,17A16.5,16.5 0,0 1,17 33.5L17,33.5A16.5,16.5 0,0 1,0.5 17L0.5,17A16.5,16.5 0,0 1,17 0.5z\"\n      android:fillColor=\"#FCFCFC\"/>\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M17,0.5L17,0.5A16.5,16.5 0,0 1,33.5 17L33.5,17A16.5,16.5 0,0 1,17 33.5L17,33.5A16.5,16.5 0,0 1,0.5 17L0.5,17A16.5,16.5 0,0 1,17 0.5z\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#E7E7E7\"/>\n  <path\n      android:pathData=\"M22.333,13.667H16.333M18.333,20.333H12.333M18.333,20.333C18.333,21.438 19.229,22.333 20.333,22.333C21.438,22.333 22.333,21.438 22.333,20.333C22.333,19.229 21.438,18.333 20.333,18.333C19.229,18.333 18.333,19.229 18.333,20.333ZM15.667,13.667C15.667,14.771 14.771,15.667 13.667,15.667C12.562,15.667 11.667,14.771 11.667,13.667C11.667,12.562 12.562,11.667 13.667,11.667C14.771,11.667 15.667,12.562 15.667,13.667Z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.5\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_database.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n  android:width=\"20dp\"\n  android:height=\"20dp\"\n  android:viewportWidth=\"20\"\n  android:viewportHeight=\"20\">\n  <path\n    android:pathData=\"M1.66699,6.66683V15.8335C1.66699,16.2755 1.84259,16.6994 2.15515,17.012C2.46771,17.3246 2.89163,17.5002 3.33366,17.5002H15.0003M16.667,14.1668C17.109,14.1668 17.5329,13.9912 17.8455,13.6787C18.1581,13.3661 18.3337,12.9422 18.3337,12.5002V7.50016C18.3337,7.05814 18.1581,6.63421 17.8455,6.32165C17.5329,6.00909 17.109,5.8335 16.667,5.8335H13.417C13.1383,5.83623 12.8633,5.76901 12.6172,5.63798C12.3712,5.50695 12.162,5.31631 12.0087,5.0835L11.3337,4.0835C11.1819,3.85305 10.9753,3.6639 10.7324,3.53299C10.4895,3.40209 10.2179,3.33354 9.94199,3.3335H6.66699C6.22496,3.3335 5.80104,3.50909 5.48848,3.82165C5.17592,4.13421 5.00033,4.55814 5.00033,5.00016V12.5002C5.00033,12.9422 5.17592,13.3661 5.48848,13.6787C5.80104,13.9912 6.22496,14.1668 6.66699,14.1668H16.667Z\"\n    android:strokeWidth=\"1.25\"\n    android:strokeColor=\"#E7E7E7\"\n    android:strokeLineCap=\"round\"\n    android:strokeLineJoin=\"round\"\n    android:fillColor=\"#00000000\" />\n</vector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_file.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M9.333,1.333V4C9.333,4.354 9.474,4.693 9.724,4.943C9.974,5.193 10.313,5.333 10.667,5.333H13.333M10,1.333H4C3.646,1.333 3.307,1.474 3.057,1.724C2.807,1.974 2.667,2.313 2.667,2.667V13.333C2.667,13.687 2.807,14.026 3.057,14.276C3.307,14.526 3.646,14.667 4,14.667H12C12.354,14.667 12.693,14.526 12.943,14.276C13.193,14.026 13.333,13.687 13.333,13.333V4.667L10,1.333Z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n  <path\n      android:pathData=\"M5.333,10.667C5.687,10.667 6.026,10.526 6.276,10.276C6.526,10.026 6.667,9.687 6.667,9.333V8H5.333M9.333,10.667C9.687,10.667 10.026,10.526 10.276,10.276C10.526,10.026 10.667,9.687 10.667,9.333V8H9.333\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33333\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_tag_cpu.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"52dp\"\n    android:height=\"20dp\"\n    android:viewportWidth=\"52\"\n    android:viewportHeight=\"20\">\n  <path\n      android:pathData=\"M0,10C0,4.477 4.477,0 10,0H42C47.523,0 52,4.477 52,10C52,15.523 47.523,20 42,20H10C4.477,20 0,15.523 0,10Z\"\n      android:fillColor=\"#C7E2F6\"/>\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M6.667,11.333C6.541,11.334 6.417,11.298 6.31,11.231C6.203,11.164 6.118,11.068 6.063,10.954C6.009,10.841 5.988,10.714 6.003,10.588C6.017,10.463 6.068,10.345 6.147,10.247L12.747,3.447C12.797,3.389 12.864,3.351 12.938,3.337C13.013,3.323 13.09,3.335 13.156,3.371C13.223,3.407 13.275,3.464 13.305,3.533C13.335,3.603 13.34,3.68 13.32,3.753L12.04,7.767C12.003,7.868 11.99,7.976 12.003,8.083C12.017,8.19 12.056,8.292 12.118,8.381C12.179,8.469 12.262,8.542 12.357,8.591C12.453,8.641 12.559,8.667 12.667,8.667H17.334C17.46,8.666 17.583,8.702 17.69,8.769C17.797,8.836 17.883,8.932 17.937,9.046C17.992,9.159 18.013,9.286 17.998,9.412C17.983,9.537 17.933,9.655 17.854,9.753L11.254,16.553C11.204,16.61 11.137,16.649 11.062,16.663C10.988,16.677 10.911,16.665 10.844,16.629C10.778,16.593 10.725,16.536 10.695,16.466C10.666,16.397 10.66,16.319 10.68,16.247L11.96,12.233C11.998,12.132 12.011,12.024 11.997,11.917C11.984,11.81 11.944,11.708 11.883,11.619C11.821,11.531 11.739,11.458 11.644,11.408C11.548,11.359 11.441,11.333 11.334,11.333H6.667Z\"\n      android:strokeLineJoin=\"round\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#4A94DE\"\n      android:strokeLineCap=\"round\"/>\n  <path\n      android:pathData=\"M20.558,9.68C20.558,6.872 22.232,5.216 24.632,5.216C27.002,5.216 28.07,6.704 28.19,8.036V8.216H27.152C27.056,7.196 26.378,6.104 24.638,6.104C22.88,6.104 21.662,7.436 21.662,9.68C21.662,11.918 22.88,13.256 24.638,13.256C26.372,13.256 27.062,12.038 27.176,11.054H28.22V11.234C28.076,12.542 27.008,14.144 24.632,14.144C22.232,14.144 20.558,12.482 20.558,9.68ZM29.93,14V5.36H33.662C35.198,5.36 36.422,6.236 36.422,7.832C36.422,9.422 35.198,10.304 33.662,10.304H31.028V14H29.93ZM33.47,6.236H31.028V9.434H33.47C34.58,9.434 35.324,8.864 35.324,7.832C35.324,6.8 34.58,6.236 33.47,6.236ZM37.995,10.814V5.36H39.099V10.856C39.099,12.488 39.939,13.256 41.409,13.256C42.879,13.256 43.719,12.488 43.719,10.856V5.36H44.817V10.814C44.817,12.92 43.647,14.144 41.409,14.144C39.183,14.144 37.995,12.92 37.995,10.814Z\"\n      android:fillColor=\"#30569D\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_tag_gpu.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"53dp\"\n    android:height=\"20dp\"\n    android:viewportWidth=\"53\"\n    android:viewportHeight=\"20\">\n  <path\n      android:pathData=\"M0,10C0,4.477 4.477,0 10,0H43C48.523,0 53,4.477 53,10C53,15.523 48.523,20 43,20H10C4.477,20 0,15.523 0,10Z\"\n      android:fillColor=\"#BBF7D6\"/>\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M6.667,11.333C6.54,11.334 6.417,11.298 6.31,11.231C6.203,11.164 6.117,11.068 6.063,10.954C6.008,10.841 5.987,10.714 6.002,10.588C6.017,10.463 6.067,10.345 6.147,10.247L12.747,3.447C12.796,3.389 12.863,3.351 12.938,3.337C13.012,3.323 13.089,3.335 13.156,3.371C13.222,3.407 13.275,3.464 13.305,3.533C13.335,3.603 13.34,3.68 13.32,3.753L12.04,7.767C12.002,7.868 11.989,7.976 12.003,8.083C12.016,8.19 12.056,8.292 12.117,8.381C12.179,8.469 12.261,8.542 12.357,8.591C12.452,8.641 12.559,8.667 12.667,8.667H17.333C17.459,8.666 17.583,8.702 17.69,8.769C17.797,8.836 17.882,8.932 17.937,9.046C17.991,9.159 18.012,9.286 17.997,9.412C17.983,9.537 17.933,9.655 17.853,9.753L11.253,16.553C11.204,16.61 11.136,16.649 11.062,16.663C10.988,16.677 10.911,16.665 10.844,16.629C10.777,16.593 10.725,16.536 10.695,16.466C10.665,16.397 10.66,16.319 10.68,16.247L11.96,12.233C11.998,12.132 12.01,12.024 11.997,11.917C11.983,11.81 11.944,11.708 11.882,11.619C11.821,11.531 11.739,11.458 11.643,11.408C11.547,11.359 11.441,11.333 11.333,11.333H6.667Z\"\n      android:strokeLineJoin=\"round\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#17C267\"\n      android:strokeLineCap=\"round\"/>\n  <path\n      android:pathData=\"M20.558,9.698C20.558,6.872 22.226,5.216 24.65,5.216C26.948,5.216 28.022,6.656 28.172,7.94V8.12H27.128C27.032,7.22 26.372,6.104 24.668,6.104C22.826,6.104 21.662,7.478 21.662,9.704C21.662,11.924 22.826,13.256 24.602,13.256C26.432,13.256 27.23,11.99 27.26,10.472H24.644V9.62H28.25V14H27.254V12.806H27.134C26.84,13.286 26.174,14.132 24.464,14.132C22.214,14.132 20.558,12.482 20.558,9.698ZM30.293,14V5.36H34.025C35.561,5.36 36.785,6.236 36.785,7.832C36.785,9.422 35.561,10.304 34.025,10.304H31.391V14H30.293ZM33.833,6.236H31.391V9.434H33.833C34.943,9.434 35.687,8.864 35.687,7.832C35.687,6.8 34.943,6.236 33.833,6.236ZM38.358,10.814V5.36H39.462V10.856C39.462,12.488 40.302,13.256 41.772,13.256C43.242,13.256 44.082,12.488 44.082,10.856V5.36H45.18V10.814C45.18,12.92 44.01,14.144 41.772,14.144C39.546,14.144 38.358,12.92 38.358,10.814Z\"\n      android:fillColor=\"#105733\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_tag_npu.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"52dp\"\n    android:height=\"20dp\"\n    android:viewportWidth=\"52\"\n    android:viewportHeight=\"20\">\n  <path\n      android:pathData=\"M0,10C0,4.477 4.477,0 10,0H42C47.523,0 52,4.477 52,10C52,15.523 47.523,20 42,20H10C4.477,20 0,15.523 0,10Z\"\n      android:fillColor=\"#F9E1AF\"/>\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M6.667,11.333C6.54,11.334 6.417,11.298 6.31,11.231C6.203,11.164 6.117,11.068 6.063,10.954C6.008,10.841 5.987,10.714 6.002,10.588C6.017,10.463 6.067,10.345 6.147,10.247L12.747,3.447C12.796,3.389 12.863,3.351 12.938,3.337C13.012,3.323 13.089,3.335 13.156,3.371C13.222,3.407 13.275,3.464 13.305,3.533C13.335,3.603 13.34,3.68 13.32,3.753L12.04,7.767C12.002,7.868 11.989,7.976 12.003,8.083C12.016,8.19 12.056,8.292 12.117,8.381C12.179,8.469 12.261,8.542 12.357,8.591C12.452,8.641 12.559,8.667 12.667,8.667H17.333C17.459,8.666 17.583,8.702 17.69,8.769C17.797,8.836 17.882,8.932 17.937,9.046C17.991,9.159 18.012,9.286 17.997,9.412C17.983,9.537 17.933,9.655 17.853,9.753L11.253,16.553C11.204,16.61 11.136,16.649 11.062,16.663C10.988,16.677 10.911,16.665 10.844,16.629C10.777,16.593 10.725,16.536 10.695,16.466C10.665,16.397 10.66,16.319 10.68,16.247L11.96,12.233C11.998,12.132 12.01,12.024 11.997,11.917C11.983,11.81 11.944,11.708 11.882,11.619C11.821,11.531 11.739,11.458 11.643,11.408C11.547,11.359 11.441,11.333 11.333,11.333H6.667Z\"\n      android:strokeLineJoin=\"round\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#EB9024\"\n      android:strokeLineCap=\"round\"/>\n  <path\n      android:pathData=\"M20.996,14V5.36H22.238L26.606,12.302H26.726V5.36H27.8V14H26.558L22.184,7.058H22.064V14H20.996ZM30.047,14V5.36H33.779C35.315,5.36 36.539,6.236 36.539,7.832C36.539,9.422 35.315,10.304 33.779,10.304H31.145V14H30.047ZM33.587,6.236H31.145V9.434H33.587C34.697,9.434 35.441,8.864 35.441,7.832C35.441,6.8 34.697,6.236 33.587,6.236ZM38.112,10.814V5.36H39.216V10.856C39.216,12.488 40.056,13.256 41.526,13.256C42.996,13.256 43.836,12.488 43.836,10.856V5.36H44.934V10.814C44.934,12.92 43.764,14.144 41.526,14.144C39.3,14.144 38.112,12.92 38.112,10.814Z\"\n      android:fillColor=\"#91471B\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_text.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"16dp\"\n    android:height=\"16dp\"\n    android:viewportWidth=\"16\"\n    android:viewportHeight=\"16\">\n  <path\n      android:pathData=\"M6,5.333H10.667M5.333,8H9.333M7.333,10.667H10.667M3.333,2H12.667C13.403,2 14,2.597 14,3.333V12.667C14,13.403 13.403,14 12.667,14H3.333C2.597,14 2,13.403 2,12.667V3.333C2,2.597 2.597,2 3.333,2Z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"1.33\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/icon_topk_config.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"18dp\"\n    android:height=\"18dp\"\n    android:viewportWidth=\"18\"\n    android:viewportHeight=\"18\">\n  <path\n      android:pathData=\"M17,4H8M11,14H2M11,14C11,15.657 12.343,17 14,17C15.657,17 17,15.657 17,14C17,12.343 15.657,11 14,11C12.343,11 11,12.343 11,14ZM7,4C7,5.657 5.657,7 4,7C2.343,7 1,5.657 1,4C1,2.343 2.343,1 4,1C5.657,1 7,2.343 7,4Z\"\n      android:strokeLineJoin=\"round\"\n      android:strokeWidth=\"2\"\n      android:fillColor=\"#00000000\"\n      android:strokeColor=\"#454545\"\n      android:strokeLineCap=\"round\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/img_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <item android:drawable=\"@drawable/img_config_true\" android:state_enabled=\"true\" />\n    <item android:drawable=\"@drawable/img_config_false\" android:state_enabled=\"false\" />\n</selector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/img_config_false.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"167dp\"\n    android:height=\"36dp\"\n    android:viewportWidth=\"167\"\n    android:viewportHeight=\"36\">\n  <path\n      android:pathData=\"M18,0L149,0A18,18 0,0 1,167 18L167,18A18,18 0,0 1,149 36L18,36A18,18 0,0 1,0 18L0,18A18,18 0,0 1,18 0z\"\n      android:fillColor=\"#ADADAD\"/>\n  <path\n      android:pathData=\"M17.86,23H16.42V22.76L20.74,11.48H22.39L26.7,22.76V23H25.26L24.05,19.74H19.07L17.86,23ZM21.48,13.2L19.47,18.58H23.65L21.64,13.2H21.48ZM28.55,26.2V14.85H29.92V16.01H30.08C30.45,15.35 31.26,14.66 32.81,14.66C34.93,14.66 36.54,16.1 36.54,18.93C36.54,21.74 34.93,23.18 32.81,23.18C31.26,23.18 30.48,22.5 30.12,21.9H29.96V26.2H28.55ZM29.9,18.93C29.9,20.95 30.96,22.07 32.52,22.07C34.07,22.07 35.13,20.95 35.13,18.93C35.13,16.9 34.07,15.78 32.52,15.78C30.96,15.78 29.9,16.9 29.9,18.93ZM38.66,26.2V14.85H40.03V16.01H40.19C40.56,15.35 41.37,14.66 42.92,14.66C45.04,14.66 46.65,16.1 46.65,18.93C46.65,21.74 45.04,23.18 42.92,23.18C41.37,23.18 40.59,22.5 40.23,21.9H40.07V26.2H38.66ZM40.01,18.93C40.01,20.95 41.07,22.07 42.63,22.07C44.18,22.07 45.24,20.95 45.24,18.93C45.24,16.9 44.18,15.78 42.63,15.78C41.07,15.78 40.01,16.9 40.01,18.93ZM48.77,23V11.48H50.18V23H48.77ZM51.92,15.09V14.85H53.3L55.85,21.61H56.01L58.56,14.85H59.94V15.09L56.15,24.58C55.63,25.89 54.98,26.2 53.61,26.2H52.84V25.1H53.47C54.28,25.1 54.52,24.97 54.81,24.28L55.2,23.34L51.92,15.09ZM70.05,11.4C70.63,11.4 71.12,11.5 71.52,11.7C71.94,11.9 72.26,12.17 72.48,12.54C72.71,12.9 72.82,13.34 72.82,13.86C72.82,14.54 72.6,15.11 72.16,15.58C71.74,16.05 71.19,16.47 70.53,16.86L73.62,19.83C73.9,19.5 74.12,19.12 74.29,18.7C74.47,18.26 74.62,17.79 74.74,17.29H76.16C75.99,17.97 75.78,18.61 75.52,19.19C75.27,19.78 74.94,20.29 74.53,20.73L76.87,23H74.96L73.57,21.66C73.32,21.88 73.05,22.09 72.77,22.28C72.5,22.46 72.21,22.62 71.89,22.74C71.57,22.87 71.22,22.97 70.85,23.05C70.49,23.12 70.08,23.16 69.64,23.16C68.9,23.16 68.26,23.04 67.72,22.81C67.18,22.56 66.77,22.21 66.47,21.74C66.18,21.27 66.04,20.7 66.04,20.02C66.04,19.48 66.13,19.01 66.32,18.62C66.53,18.22 66.81,17.87 67.19,17.56C67.56,17.25 68,16.95 68.5,16.66C68.28,16.41 68.06,16.14 67.84,15.86C67.63,15.59 67.45,15.29 67.32,14.97C67.18,14.64 67.11,14.28 67.11,13.9C67.11,13.37 67.22,12.93 67.46,12.55C67.69,12.18 68.03,11.9 68.47,11.7C68.92,11.5 69.44,11.4 70.05,11.4ZM69.35,17.54C68.96,17.77 68.63,18 68.36,18.23C68.09,18.46 67.88,18.71 67.73,18.98C67.58,19.26 67.51,19.59 67.51,19.98C67.51,20.56 67.7,21.03 68.1,21.38C68.49,21.74 69.02,21.91 69.68,21.91C70.37,21.91 70.95,21.8 71.44,21.58C71.93,21.35 72.34,21.09 72.68,20.78L69.35,17.54ZM70,12.55C69.56,12.55 69.19,12.67 68.9,12.9C68.62,13.14 68.48,13.46 68.48,13.88C68.48,14.26 68.58,14.62 68.79,14.95C68.99,15.27 69.28,15.63 69.67,16.02C70.3,15.66 70.74,15.32 71.01,15C71.29,14.67 71.43,14.29 71.43,13.86C71.43,13.48 71.3,13.17 71.04,12.92C70.79,12.67 70.44,12.55 70,12.55ZM91.6,19.98L91.73,21.2C91.82,21.92 91.94,22.34 92.2,22.76V23H90.71C90.48,22.54 90.36,22.1 90.28,21.31L90.19,20.18C90.06,18.7 89.44,18.12 87.54,18.12H84.62V23H83.16V11.48H88.34C90.45,11.48 92.06,12.53 92.06,14.61C92.06,16.23 91.16,17.13 89.89,17.46V17.62C91.11,17.91 91.46,18.65 91.6,19.98ZM88.19,12.65H84.62V16.95H88.19C89.64,16.95 90.62,16.26 90.62,14.8C90.62,13.34 89.64,12.65 88.19,12.65ZM93.63,18.92C93.63,16.15 95.14,14.66 97.53,14.66C99.94,14.66 101.24,16.17 101.24,18.57V19.22H94.99C95.03,21.02 95.96,22.13 97.53,22.13C99.02,22.13 99.68,21.23 99.81,20.45H101.07V20.69C100.89,21.69 99.98,23.19 97.54,23.19C95.15,23.19 93.63,21.7 93.63,18.92ZM95.02,18.2H99.89C99.87,16.71 99.09,15.72 97.52,15.72C95.99,15.72 95.13,16.73 95.02,18.2ZM103.16,19.42V18.29H107.67V19.42H103.16ZM110.04,13.37V11.69H111.49V13.37H110.04ZM110.07,23V14.85H111.47V23H110.07ZM114.07,23V14.85H115.43V16H115.6C115.87,15.48 116.56,14.66 118.24,14.66C120.03,14.66 121.21,15.65 121.21,17.52V23H119.8V17.62C119.8,16.34 119.04,15.77 117.9,15.77C116.6,15.77 115.47,16.6 115.47,18.3V23H114.07ZM131.25,11.48V23H129.88V21.84H129.72C129.35,22.5 128.54,23.18 127,23.18C124.88,23.18 123.25,21.74 123.25,18.93C123.25,16.1 124.88,14.66 127,14.66C128.54,14.66 129.32,15.35 129.68,15.95H129.84V11.48H131.25ZM129.89,18.93C129.89,16.9 128.84,15.78 127.28,15.78C125.73,15.78 124.67,16.9 124.67,18.93C124.67,20.95 125.73,22.07 127.28,22.07C128.84,22.07 129.89,20.95 129.89,18.93ZM133.36,18.92C133.36,16.15 134.87,14.66 137.26,14.66C139.67,14.66 140.98,16.17 140.98,18.57V19.22H134.73C134.76,21.02 135.7,22.13 137.26,22.13C138.75,22.13 139.42,21.23 139.54,20.45H140.8V20.69C140.62,21.69 139.71,23.19 137.27,23.19C134.88,23.19 133.36,21.7 133.36,18.92ZM134.75,18.2H139.62C139.61,16.71 138.82,15.72 137.26,15.72C135.72,15.72 134.86,16.73 134.75,18.2ZM142.04,15.09V14.85H143.48L145.72,17.88H145.88L148.14,14.85H149.56V15.09L146.69,18.85L149.71,22.76V23H148.27L145.88,19.82H145.72L143.33,23H141.9V22.76L144.91,18.85L142.04,15.09Z\"\n      android:fillColor=\"#FCFCFC\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/img_config_true.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"167dp\"\n    android:height=\"36dp\"\n    android:viewportWidth=\"167\"\n    android:viewportHeight=\"36\">\n  <path\n      android:pathData=\"M18,0L149,0A18,18 0,0 1,167 18L167,18A18,18 0,0 1,149 36L18,36A18,18 0,0 1,0 18L0,18A18,18 0,0 1,18 0z\"\n      android:fillColor=\"#454545\"/>\n  <path\n      android:pathData=\"M17.86,23H16.42V22.76L20.74,11.48H22.39L26.7,22.76V23H25.26L24.05,19.74H19.07L17.86,23ZM21.48,13.2L19.47,18.58H23.65L21.64,13.2H21.48ZM28.55,26.2V14.85H29.92V16.01H30.08C30.45,15.35 31.26,14.66 32.81,14.66C34.93,14.66 36.54,16.1 36.54,18.93C36.54,21.74 34.93,23.18 32.81,23.18C31.26,23.18 30.48,22.5 30.12,21.9H29.96V26.2H28.55ZM29.9,18.93C29.9,20.95 30.96,22.07 32.52,22.07C34.07,22.07 35.13,20.95 35.13,18.93C35.13,16.9 34.07,15.78 32.52,15.78C30.96,15.78 29.9,16.9 29.9,18.93ZM38.66,26.2V14.85H40.03V16.01H40.19C40.56,15.35 41.37,14.66 42.92,14.66C45.04,14.66 46.65,16.1 46.65,18.93C46.65,21.74 45.04,23.18 42.92,23.18C41.37,23.18 40.59,22.5 40.23,21.9H40.07V26.2H38.66ZM40.01,18.93C40.01,20.95 41.07,22.07 42.63,22.07C44.18,22.07 45.24,20.95 45.24,18.93C45.24,16.9 44.18,15.78 42.63,15.78C41.07,15.78 40.01,16.9 40.01,18.93ZM48.77,23V11.48H50.18V23H48.77ZM51.92,15.09V14.85H53.3L55.85,21.61H56.01L58.56,14.85H59.94V15.09L56.15,24.58C55.63,25.89 54.98,26.2 53.61,26.2H52.84V25.1H53.47C54.28,25.1 54.52,24.97 54.81,24.28L55.2,23.34L51.92,15.09ZM70.05,11.4C70.63,11.4 71.12,11.5 71.52,11.7C71.94,11.9 72.26,12.17 72.48,12.54C72.71,12.9 72.82,13.34 72.82,13.86C72.82,14.54 72.6,15.11 72.16,15.58C71.74,16.05 71.19,16.47 70.53,16.86L73.62,19.83C73.9,19.5 74.12,19.12 74.29,18.7C74.47,18.26 74.62,17.79 74.74,17.29H76.16C75.99,17.97 75.78,18.61 75.52,19.19C75.27,19.78 74.94,20.29 74.53,20.73L76.87,23H74.96L73.57,21.66C73.32,21.88 73.05,22.09 72.77,22.28C72.5,22.46 72.21,22.62 71.89,22.74C71.57,22.87 71.22,22.97 70.85,23.05C70.49,23.12 70.08,23.16 69.64,23.16C68.9,23.16 68.26,23.04 67.72,22.81C67.18,22.56 66.77,22.21 66.47,21.74C66.18,21.27 66.04,20.7 66.04,20.02C66.04,19.48 66.13,19.01 66.32,18.62C66.53,18.22 66.81,17.87 67.19,17.56C67.56,17.25 68,16.95 68.5,16.66C68.28,16.41 68.06,16.14 67.84,15.86C67.63,15.59 67.45,15.29 67.32,14.97C67.18,14.64 67.11,14.28 67.11,13.9C67.11,13.37 67.22,12.93 67.46,12.55C67.69,12.18 68.03,11.9 68.47,11.7C68.92,11.5 69.44,11.4 70.05,11.4ZM69.35,17.54C68.96,17.77 68.63,18 68.36,18.23C68.09,18.46 67.88,18.71 67.73,18.98C67.58,19.26 67.51,19.59 67.51,19.98C67.51,20.56 67.7,21.03 68.1,21.38C68.49,21.74 69.02,21.91 69.68,21.91C70.37,21.91 70.95,21.8 71.44,21.58C71.93,21.35 72.34,21.09 72.68,20.78L69.35,17.54ZM70,12.55C69.56,12.55 69.19,12.67 68.9,12.9C68.62,13.14 68.48,13.46 68.48,13.88C68.48,14.26 68.58,14.62 68.79,14.95C68.99,15.27 69.28,15.63 69.67,16.02C70.3,15.66 70.74,15.32 71.01,15C71.29,14.67 71.43,14.29 71.43,13.86C71.43,13.48 71.3,13.17 71.04,12.92C70.79,12.67 70.44,12.55 70,12.55ZM91.6,19.98L91.73,21.2C91.82,21.92 91.94,22.34 92.2,22.76V23H90.71C90.48,22.54 90.36,22.1 90.28,21.31L90.19,20.18C90.06,18.7 89.44,18.12 87.54,18.12H84.62V23H83.16V11.48H88.34C90.45,11.48 92.06,12.53 92.06,14.61C92.06,16.23 91.16,17.13 89.89,17.46V17.62C91.11,17.91 91.46,18.65 91.6,19.98ZM88.19,12.65H84.62V16.95H88.19C89.64,16.95 90.62,16.26 90.62,14.8C90.62,13.34 89.64,12.65 88.19,12.65ZM93.63,18.92C93.63,16.15 95.14,14.66 97.53,14.66C99.94,14.66 101.24,16.17 101.24,18.57V19.22H94.99C95.03,21.02 95.96,22.13 97.53,22.13C99.02,22.13 99.68,21.23 99.81,20.45H101.07V20.69C100.89,21.69 99.98,23.19 97.54,23.19C95.15,23.19 93.63,21.7 93.63,18.92ZM95.02,18.2H99.89C99.87,16.71 99.09,15.72 97.52,15.72C95.99,15.72 95.13,16.73 95.02,18.2ZM103.16,19.42V18.29H107.67V19.42H103.16ZM110.04,13.37V11.69H111.49V13.37H110.04ZM110.07,23V14.85H111.47V23H110.07ZM114.07,23V14.85H115.43V16H115.6C115.87,15.48 116.56,14.66 118.24,14.66C120.03,14.66 121.21,15.65 121.21,17.52V23H119.8V17.62C119.8,16.34 119.04,15.77 117.9,15.77C116.6,15.77 115.47,16.6 115.47,18.3V23H114.07ZM131.25,11.48V23H129.88V21.84H129.72C129.35,22.5 128.54,23.18 127,23.18C124.88,23.18 123.25,21.74 123.25,18.93C123.25,16.1 124.88,14.66 127,14.66C128.54,14.66 129.32,15.35 129.68,15.95H129.84V11.48H131.25ZM129.89,18.93C129.89,16.9 128.84,15.78 127.28,15.78C125.73,15.78 124.67,16.9 124.67,18.93C124.67,20.95 125.73,22.07 127.28,22.07C128.84,22.07 129.89,20.95 129.89,18.93ZM133.36,18.92C133.36,16.15 134.87,14.66 137.26,14.66C139.67,14.66 140.98,16.17 140.98,18.57V19.22H134.73C134.76,21.02 135.7,22.13 137.26,22.13C138.75,22.13 139.42,21.23 139.54,20.45H140.8V20.69C140.62,21.69 139.71,23.19 137.27,23.19C134.88,23.19 133.36,21.7 133.36,18.92ZM134.75,18.2H139.62C139.61,16.71 138.82,15.72 137.26,15.72C135.72,15.72 134.86,16.73 134.75,18.2ZM142.04,15.09V14.85H143.48L145.72,17.88H145.88L148.14,14.85H149.56V15.09L146.69,18.85L149.71,22.76V23H148.27L145.88,19.82H145.72L143.33,23H141.9V22.76L144.91,18.85L142.04,15.09Z\"\n      android:fillColor=\"#FCFCFC\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/rb_bg.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n\n    <item android:drawable=\"@drawable/rb_bg_true\" android:state_checked=\"true\" />\n    <item android:drawable=\"@drawable/rb_bg_false\" android:state_checked=\"false\" />\n\n</selector>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/rb_bg_false.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"20dp\"\n    android:height=\"20dp\"\n    android:viewportWidth=\"20\"\n    android:viewportHeight=\"20\">\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M6,0.5L14,0.5A5.5,5.5 0,0 1,19.5 6L19.5,14A5.5,5.5 0,0 1,14 19.5L6,19.5A5.5,5.5 0,0 1,0.5 14L0.5,6A5.5,5.5 0,0 1,6 0.5z\"\n      android:fillColor=\"#FCFCFC\"\n      android:strokeColor=\"#E7E7E7\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/rb_bg_true.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"20dp\"\n    android:height=\"20dp\"\n    android:viewportWidth=\"20\"\n    android:viewportHeight=\"20\">\n  <path\n      android:strokeWidth=\"1\"\n      android:pathData=\"M6,0.5L14,0.5A5.5,5.5 0,0 1,19.5 6L19.5,14A5.5,5.5 0,0 1,14 19.5L6,19.5A5.5,5.5 0,0 1,0.5 14L0.5,6A5.5,5.5 0,0 1,6 0.5z\"\n      android:fillColor=\"#FCFCFC\"\n      android:strokeColor=\"#E7E7E7\"/>\n  <path\n      android:pathData=\"M7,5L13,5A2,2 0,0 1,15 7L15,13A2,2 0,0 1,13 15L7,15A2,2 0,0 1,5 13L5,7A2,2 0,0 1,7 5z\"\n      android:fillColor=\"#454545\"/>\n</vector>\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/drawable/thumb_topk.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:shape=\"oval\">\n    <solid android:color=\"@color/white\" />\n    <size\n        android:width=\"30dp\"\n        android:height=\"30dp\" />\n</shape>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/activity_file_content.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/main\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/bg_normal\"\n    android:orientation=\"vertical\"\n    tools:context=\".activity.FileContentActivity\">\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"40dp\"\n        android:background=\"@color/white\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/btn_back\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical\"\n            android:paddingVertical=\"10dp\"\n            android:paddingLeft=\"20dp\"\n            android:paddingRight=\"20dp\"\n            android:src=\"@drawable/icon_back\" />\n\n        <TextView\n            android:id=\"@+id/tv_title\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:text=\"\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"#1f1f1f\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n    </FrameLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"#E7E7E7\" />\n\n    <ScrollView\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <TextView\n            android:id=\"@+id/tv_content\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"16dp\"\n            android:letterSpacing=\"0.02\"\n            android:textColor=\"#1F1F1F\"\n            android:textSize=\"16sp\" />\n    </ScrollView>\n\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/activity_folder.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/main\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/bg_normal\"\n    android:orientation=\"vertical\"\n    tools:context=\".activity.FolderActivity\">\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"40dp\"\n        android:background=\"@color/white\"\n        android:orientation=\"horizontal\">\n\n        <ImageView\n            android:id=\"@+id/btn_back\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center_vertical\"\n            android:paddingVertical=\"10dp\"\n            android:paddingLeft=\"20dp\"\n            android:paddingRight=\"20dp\"\n            android:src=\"@drawable/icon_back\" />\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:text=\"Select Folder\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"#1f1f1f\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n    </FrameLayout>\n\n    <View\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"1dp\"\n        android:background=\"#E7E7E7\" />\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:orientation=\"vertical\">\n\n            <androidx.recyclerview.widget.RecyclerView\n                android:id=\"@+id/rv_files\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"0dp\"\n                android:layout_weight=\"1\"\n                app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" />\n\n            <Button\n                android:id=\"@+id/btn_import\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginHorizontal=\"20dp\"\n                android:layout_marginBottom=\"70dp\"\n                android:background=\"@drawable/btn_rounded_border_18\"\n                android:elevation=\"0dp\"\n                android:minWidth=\"0dp\"\n                android:minHeight=\"0dp\"\n                android:paddingHorizontal=\"18dp\"\n                android:paddingVertical=\"5dp\"\n                android:stateListAnimator=\"@null\"\n                android:text=\"Import\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1f1f1f\" />\n        </LinearLayout>\n\n        <FrameLayout\n            android:id=\"@+id/fl_loading\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:background=\"@color/bg_normal\"\n            android:clickable=\"true\">\n\n            <ProgressBar\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"center\" />\n        </FrameLayout>\n\n    </FrameLayout>\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/activity_main.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:layout_marginStart=\"0dp\"\n    android:layout_marginEnd=\"0dp\"\n    android:background=\"@color/bg_normal\"\n    android:fitsSystemWindows=\"false\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\">\n\n        <!-- Spinner for model selection -->\n        <FrameLayout\n            android:id=\"@+id/header_view\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:minHeight=\"50dp\"\n            android:background=\"@color/header_bg\">\n\n            <Spinner\n                android:id=\"@+id/sp_model_list\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"50dp\"\n                android:layout_gravity=\"bottom\"\n                android:popupBackground=\"@drawable/bg_spinner_dropdown\" />\n\n            <ImageView\n                android:id=\"@+id/iv_device_tag\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:layout_gravity=\"right|center_vertical|bottom\"\n                android:layout_marginRight=\"40dp\"\n                android:layout_marginBottom=\"0dp\"\n                android:src=\"@drawable/icon_tag_npu\"\n                android:visibility=\"invisible\" />\n\n            <View\n                android:id=\"@+id/v_tip\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"50dp\"\n                android:layout_gravity=\"bottom\"\n                android:visibility=\"gone\" />\n        </FrameLayout>\n\n        <!-- Control buttons section -->\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:orientation=\"vertical\"\n            android:background=\"@color/header_bg\">\n\n            <!-- Normal buttons row (default state) -->\n            <LinearLayout\n                android:id=\"@+id/ll_control_buttons_row\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"48dp\"\n                android:orientation=\"horizontal\"\n                android:gravity=\"center_vertical\"\n                android:paddingLeft=\"16dp\"\n                android:paddingTop=\"8dp\"\n                android:paddingBottom=\"8dp\">\n\n                <Button\n                    android:id=\"@+id/btn_download\"\n                    style=\"@style/btn_enable_14\"\n                    android:text=\"Download\" />\n\n                <Button\n                    android:id=\"@+id/btn_load_model\"\n                    style=\"@style/btn_enable_14\"\n                    android:text=\"Load\" />\n\n                <Button\n                    android:id=\"@+id/btn_unload_model\"\n                    style=\"@style/btn_enable_14\"\n                    android:text=\"Unload\"\n                    android:visibility=\"gone\"\n                    tools:visibility=\"gone\" />\n\n                <Button\n                    android:id=\"@+id/btn_stop\"\n                    style=\"@style/btn_enable_14\"\n                    android:text=\"Stop\"\n                    android:visibility=\"gone\"\n                    tools:visibility=\"gone\" />\n\n                <View\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"1px\"\n                    android:layout_weight=\"1\" />\n\n                <ImageView\n                    android:id=\"@+id/iv_topk\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginRight=\"5dp\"\n                    android:padding=\"8dp\"\n                    android:src=\"@drawable/icon_topk_config\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n\n            <!-- Download progress row (full width, shown only when downloading) -->\n            <LinearLayout\n                android:id=\"@+id/ll_download_progress\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"48dp\"\n                android:orientation=\"horizontal\"\n                android:gravity=\"center_vertical\"\n                android:paddingLeft=\"16dp\"\n                android:paddingRight=\"16dp\"\n                android:paddingTop=\"8dp\"\n                android:paddingBottom=\"8dp\"\n                android:visibility=\"gone\">\n\n                <ProgressBar\n                    android:id=\"@+id/pb_download_progress\"\n                    style=\"?android:attr/progressBarStyleHorizontal\"\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"8dp\"\n                    android:layout_weight=\"1\"\n                    android:layout_marginEnd=\"8dp\"\n                    android:max=\"10000\"\n                    android:progress=\"0\"\n                    android:progressTint=\"@color/font_white\"\n                    android:progressBackgroundTint=\"#333333\" />\n\n                <TextView\n                    android:id=\"@+id/tv_download_percent\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginEnd=\"8dp\"\n                    android:text=\"0%\"\n                    android:textColor=\"@color/font_white\"\n                    android:textSize=\"14sp\"\n                    android:minWidth=\"40dp\" />\n\n                <TextView\n                    android:id=\"@+id/tv_download_failed\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginEnd=\"8dp\"\n                    android:text=\"Failed\"\n                    android:textColor=\"#FF4444\"\n                    android:textSize=\"14sp\"\n                    android:visibility=\"gone\" />\n\n                <Button\n                    android:id=\"@+id/btn_cancel_download_inline\"\n                    style=\"@style/btn_enable_14\"\n                    android:background=\"@drawable/btn_rounded_border_transparent\"\n                    android:text=\"Cancel\"\n                    android:textColor=\"@color/font_white\"\n                    android:visibility=\"gone\" />\n\n                <Button\n                    android:id=\"@+id/btn_retry_download_inline\"\n                    style=\"@style/btn_enable_14\"\n                    android:background=\"@drawable/btn_rounded_border_transparent\"\n                    android:text=\"Retry\"\n                    android:textColor=\"@color/font_white\"\n                    android:visibility=\"gone\" />\n            </LinearLayout>\n        </LinearLayout>\n\n        <View\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"1dp\"\n            android:background=\"#333333\" />\n\n        <Button\n            android:id=\"@+id/btn_test\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"test\"\n            android:visibility=\"gone\" />\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:paddingStart=\"16dp\"\n            android:paddingEnd=\"16dp\"\n            android:paddingTop=\"12dp\"\n            android:paddingBottom=\"12dp\"\n            android:gravity=\"center_vertical\"\n            android:orientation=\"horizontal\"\n            android:background=\"@color/header_bg\">\n\n            <ImageView\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:src=\"@drawable/icon_database\" />\n\n            <TextView\n                android:id=\"@+id/tv_database_info\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginStart=\"5dp\"\n                android:layout_weight=\"1\"\n                android:text=\"Files: 0 | Chunks: 0\"\n                android:textColor=\"@color/font_white\" />\n\n            <!-- Clear button: visible only when files > 0, pure icon no border -->\n            <ImageButton\n                android:id=\"@+id/btn_embed_clear\"\n                android:layout_width=\"36dp\"\n                android:layout_height=\"36dp\"\n                android:layout_marginEnd=\"8dp\"\n                android:background=\"@null\"\n                android:contentDescription=\"Clear\"\n                android:padding=\"8dp\"\n                android:scaleType=\"centerInside\"\n                android:src=\"@drawable/icon_clear\"\n                android:visibility=\"gone\"\n                android:stateListAnimator=\"@null\" />\n\n            <!-- Add button: pure icon no border -->\n            <ImageButton\n                android:id=\"@+id/btn_test_embed\"\n                android:layout_width=\"36dp\"\n                android:layout_height=\"36dp\"\n                android:background=\"@null\"\n                android:contentDescription=\"Add\"\n                android:padding=\"8dp\"\n                android:scaleType=\"centerInside\"\n                android:src=\"@drawable/icon_add\"\n                android:stateListAnimator=\"@null\" />\n        </LinearLayout>\n\n        <LinearLayout\n            android:id=\"@+id/ll_embed_profilling\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginStart=\"16dp\"\n            android:layout_marginEnd=\"16dp\"\n            android:background=\"@drawable/bg_round_gray\"\n            android:gravity=\"center_vertical\"\n            android:orientation=\"vertical\"\n            android:visibility=\"gone\"\n            tools:visibility=\"visible\">\n\n            <LinearLayout\n                android:id=\"@+id/ll_embed_result_title\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:gravity=\"center_vertical\"\n                android:orientation=\"horizontal\">\n\n                <TextView\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Embedding Performance\"\n                    android:textColor=\"@color/font_black\"\n                    android:textSize=\"12sp\" />\n\n                <ImageView\n                    android:id=\"@+id/iv_embed_expand\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:src=\"@drawable/icon_arrow_down\" />\n            </LinearLayout>\n\n            <TextView\n                android:id=\"@+id/tv_embed_profilling\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginTop=\"10dp\"\n                android:text=\"Total Time: 0.0s\"\n                android:textColor=\"@color/font_black\"\n                android:textSize=\"12sp\" />\n\n            <!--            Total Time: 0.0s; Prefilling Speed: 0 tokens/sec-->\n\n        </LinearLayout>\n\n        <FrameLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:orientation=\"vertical\">\n\n                <!-- chat display area -->\n                <androidx.recyclerview.widget.RecyclerView\n                    android:id=\"@+id/rv_chat\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"0dp\"\n                    android:layout_weight=\"1\"\n                    android:clipToPadding=\"false\"\n                    android:padding=\"8dp\"\n                    android:scrollbars=\"vertical\"\n                    app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" />\n\n                <!-- Input section at bottom -->\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:background=\"@drawable/bg_input_box_background\"\n                    android:orientation=\"vertical\"\n                    android:paddingLeft=\"8dp\"\n                    android:paddingTop=\"6dp\"\n                    android:paddingRight=\"8dp\">\n\n                    <HorizontalScrollView\n                        android:id=\"@+id/scroll_images\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"100dp\"\n                        android:layout_margin=\"6dp\"\n                        android:overScrollMode=\"never\"\n                        android:visibility=\"gone\">\n\n                        <LinearLayout\n                            android:id=\"@+id/ll_images_container\"\n                            android:layout_width=\"wrap_content\"\n                            android:layout_height=\"match_parent\"\n                            android:layout_marginLeft=\"6dp\"\n                            android:layout_marginEnd=\"6dp\"\n                            android:orientation=\"horizontal\" />\n                    </HorizontalScrollView>\n\n                    <EditText\n                        android:id=\"@+id/et_input\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginTop=\"6dp\"\n                        android:layout_marginBottom=\"6dp\"\n                        android:background=\"@null\"\n                        android:hint=\"Type prompt...\"\n                        android:padding=\"6dp\"\n                        android:text=\"hi\"\n                        android:textColorHint=\"#ADADAD\" />\n\n                    <LinearLayout\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:orientation=\"horizontal\"\n                        android:paddingTop=\"8dp\"\n                        android:paddingBottom=\"8dp\">\n\n                        <LinearLayout\n                            android:layout_width=\"0dp\"\n                            android:layout_height=\"wrap_content\"\n                            android:layout_marginRight=\"4dp\"\n                            android:layout_weight=\"1\"\n                            android:gravity=\"start\"\n                            android:orientation=\"horizontal\">\n\n                            <ImageView\n                                android:id=\"@+id/iv_config\"\n                                android:layout_width=\"wrap_content\"\n                                android:layout_height=\"wrap_content\"\n                                android:layout_marginRight=\"5dp\"\n                                android:src=\"@drawable/icon_config\" />\n\n                            <Button\n                                android:id=\"@+id/btn_add_image\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_marginLeft=\"4dp\"\n                                android:layout_marginRight=\"4dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Add Image\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\"\n                                android:visibility=\"invisible\" />\n\n                            <Button\n                                android:id=\"@+id/btn_voice\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Record\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\"\n                                android:visibility=\"invisible\" />\n                        </LinearLayout>\n\n                        <LinearLayout\n                            android:layout_width=\"wrap_content\"\n                            android:layout_height=\"wrap_content\"\n                            android:gravity=\"end\"\n                            android:orientation=\"horizontal\">\n\n                            <Button\n                                android:id=\"@+id/btn_clear_history\"\n                                android:layout_width=\"0dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_marginRight=\"4dp\"\n                                android:layout_weight=\"1\"\n                                android:background=\"@drawable/btn_rounded_border\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Clear\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#1F1F1F\" />\n\n                            <Button\n                                android:id=\"@+id/btn_send\"\n                                android:layout_width=\"62dp\"\n                                android:layout_height=\"32dp\"\n                                android:layout_marginEnd=\"4dp\"\n                                android:background=\"@drawable/btn_rounded_black_bg\"\n                                android:ellipsize=\"end\"\n                                android:singleLine=\"true\"\n                                android:text=\"Send\"\n                                android:textAllCaps=\"false\"\n                                android:textColor=\"#FFFFFF\" />\n                        </LinearLayout>\n                    </LinearLayout>\n                </LinearLayout>\n            </LinearLayout>\n\n            <FrameLayout\n                android:id=\"@+id/fl_index\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"\n                android:background=\"@color/white\"\n                android:clickable=\"true\"\n                android:visibility=\"gone\" />\n        </FrameLayout>\n\n    </LinearLayout>\n\n    <!-- audio panel -->\n    <LinearLayout\n        android:id=\"@+id/bottom_panel\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"110dp\"\n        android:layout_alignParentBottom=\"true\"\n        android:background=\"#FFFFFF\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\">\n\n        <TextView\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_margin=\"10dp\"\n            android:gravity=\"center_horizontal\"\n            android:text=\"Recording...\" />\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"44dp\"\n            android:paddingTop=\"8dp\">\n\n            <Button\n                android:id=\"@+id/btn_audio_cancel\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"32dp\"\n                android:layout_marginLeft=\"16dp\"\n                android:layout_weight=\"1\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Cancel\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\" />\n\n            <View\n                android:id=\"@+id/view\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"2\" />\n\n            <Button\n                android:id=\"@+id/btn_audio_done\"\n                android:layout_width=\"0dp\"\n                android:layout_height=\"32dp\"\n                android:layout_marginRight=\"16dp\"\n                android:layout_weight=\"1\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"Done\"\n                android:textAllCaps=\"false\"\n                android:textColor=\"#1F1F1F\" />\n        </LinearLayout>\n\n    </LinearLayout>\n    <!-- Download progress overlay -->\n    <LinearLayout\n        android:id=\"@+id/ll_downloading\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\"\n        android:visibility=\"invisible\"\n        tools:visibility=\"visible\">\n\n        <ProgressBar\n            android:id=\"@+id/pb_downloading\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\" />\n\n        <TextView\n            android:id=\"@+id/tv_download_progress\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"0%\" />\n\n        <LinearLayout\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"20dp\"\n            android:orientation=\"horizontal\">\n\n            <Button\n                android:id=\"@+id/btn_cancel_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"30dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"cancel\"\n                android:textAllCaps=\"false\" />\n\n            <Button\n                android:id=\"@+id/btn_retry_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"30dp\"\n                android:layout_marginLeft=\"20dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"retry\"\n                android:textAllCaps=\"false\" />\n\n            <Button\n                android:id=\"@+id/btn_dismiss_download\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"30dp\"\n                android:layout_marginLeft=\"20dp\"\n                android:background=\"@drawable/btn_rounded_border\"\n                android:text=\"dismiss\"\n                android:textAllCaps=\"false\" />\n        </LinearLayout>\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/ll_loading\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:clickable=\"true\"\n        android:gravity=\"center\"\n        android:orientation=\"vertical\"\n        android:visibility=\"invisible\"\n        tools:visibility=\"gone\">\n\n        <ProgressBar\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\" />\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Loading\" />\n    </LinearLayout>\n\n    <!-- Citations list -->\n    <LinearLayout\n        android:id=\"@+id/ll_citations\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:layout_marginTop=\"50dp\"\n        android:background=\"@drawable/bg_citations_bottom\"\n        android:clickable=\"true\"\n        android:orientation=\"vertical\"\n        android:padding=\"16dp\"\n        android:visibility=\"gone\"\n        tools:visibility=\"gone\">\n\n        <LinearLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"center_vertical\"\n            android:orientation=\"horizontal\">\n\n            <TextView\n                android:layout_width=\"0dp\"\n                android:layout_height=\"wrap_content\"\n                android:layout_weight=\"1\"\n                android:text=\"Citations\"\n                android:textColor=\"@color/font_black\"\n                android:textSize=\"16sp\"\n                android:textStyle=\"bold\" />\n\n            <ImageView\n                android:id=\"@+id/iv_close\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:src=\"@drawable/icon_close\" />\n        </LinearLayout>\n\n        <androidx.recyclerview.widget.RecyclerView\n            android:id=\"@+id/rv_citation\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"30dp\"\n            app:layoutManager=\"androidx.recyclerview.widget.LinearLayoutManager\" />\n\n    </LinearLayout>\n\n</RelativeLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/dialog_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"@drawable/bg_topk_bottom\"\n    android:orientation=\"vertical\"\n    android:paddingHorizontal=\"15dp\"\n    android:paddingVertical=\"20dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"Generation Settings\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"@color/font_black\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n\n        <ImageView\n            android:id=\"@+id/iv_close\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"5dp\"\n            android:src=\"@drawable/icon_close\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:textColor=\"@color/font_black\"\n        android:text=\"Chunk Size\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <androidx.appcompat.widget.AppCompatSeekBar\n            android:id=\"@+id/acs_chunk_size\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:max=\"512\"\n            android:min=\"16\" />\n\n        <EditText\n            android:id=\"@+id/et_chunk_size\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"20dp\"\n            android:background=\"@drawable/btn_rounded_border_gray_8dp\"\n            android:gravity=\"center\"\n            android:inputType=\"number\"\n            android:paddingVertical=\"3dp\"\n            android:singleLine=\"true\"\n            android:text=\"1\"\n            android:textColor=\"@color/font_black\"\n            android:textSize=\"14sp\"\n            tools:text=\"5\" />\n\n    </LinearLayout>\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"30dp\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"nChunk\"\n            android:textColor=\"@color/font_black\" />\n\n        <EditText\n            android:id=\"@+id/et_n_chunk\"\n            android:layout_width=\"80dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"20dp\"\n            android:background=\"@drawable/btn_rounded_border_gray_8dp\"\n            android:gravity=\"center\"\n            android:inputType=\"number\"\n            android:paddingVertical=\"3dp\"\n            android:singleLine=\"true\"\n            android:text=\"1\"\n            android:textColor=\"@color/font_black\"\n            android:textSize=\"14sp\"\n            tools:text=\"5\" />\n    </LinearLayout>\n\n    <TextView\n        android:id=\"@+id/tv_config_changed_tip\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"30dp\"\n        android:drawableLeft=\"@drawable/icon_alert_yellow\"\n        android:drawablePadding=\"5dp\"\n        android:gravity=\"top\"\n        android:text=\"Changing Settings requires re-processing all uploaded files.\"\n        android:textColor=\"#91471B\"\n        android:textSize=\"14sp\"\n        android:visibility=\"gone\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:gravity=\"right|center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <Button\n            android:id=\"@+id/btn_reset\"\n            style=\"@style/btn_enable_14\"\n            android:background=\"@drawable/btn_rounded_border_18\"\n            android:paddingHorizontal=\"20dp\"\n            android:paddingVertical=\"8dp\"\n            android:text=\"Reset\" />\n\n        <Button\n            android:id=\"@+id/btn_re_index\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"10dp\"\n            android:background=\"@drawable/img_config\"\n            android:enabled=\"false\"\n            android:minWidth=\"1dp\"\n            android:minHeight=\"1dp\"\n            android:paddingHorizontal=\"20dp\"\n            android:paddingVertical=\"5dp\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"@color/font_white\" />\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/dialog_select_plugin_id.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:orientation=\"vertical\"\n    android:padding=\"15dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"Select Inference Engine\"\n            android:textColor=\"@color/font_black\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n\n        <ImageView\n            android:id=\"@+id/iv_close\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:src=\"@drawable/icon_close\" />\n\n    </LinearLayout>\n\n    <com.nexa.demo.widget.WrapRadioGroup\n        android:id=\"@+id/rg_select_plugin_id\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"25dp\"\n        android:gravity=\"center_vertical\"\n        app:wrapOrientation=\"horizontal\">\n\n        <RadioButton\n            android:id=\"@+id/rb_npu\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:layout_marginLeft=\"10dp\"\n            android:button=\"@drawable/rb_bg\"\n            android:checked=\"true\"\n            android:paddingLeft=\"5dp\"\n            android:text=\"NPU\" />\n\n        <RadioButton\n            android:id=\"@+id/rb_npu_llama\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:layout_marginLeft=\"10dp\"\n            android:button=\"@drawable/rb_bg\"\n            android:paddingLeft=\"5dp\"\n            android:text=\"NPU(llama.cpp)\"\n            android:visibility=\"gone\" />\n\n        <RadioButton\n            android:id=\"@+id/rb_gpu\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:layout_marginLeft=\"10dp\"\n            android:button=\"@drawable/rb_bg\"\n            android:checked=\"false\"\n            android:paddingLeft=\"5dp\"\n            android:text=\"GPU\"\n            android:visibility=\"visible\" />\n\n        <RadioButton\n            android:id=\"@+id/rb_cpu\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"40dp\"\n            android:button=\"@drawable/rb_bg\"\n            android:checked=\"false\"\n            android:paddingLeft=\"5dp\"\n            android:text=\"CPU\"\n            android:visibility=\"visible\" />\n\n    </com.nexa.demo.widget.WrapRadioGroup>\n\n    <LinearLayout\n        android:id=\"@+id/ll_gpu_layers\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\"\n        android:visibility=\"gone\">\n\n        <TextView\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"nGpuLayers 1~999 : \" />\n\n        <EditText\n            android:id=\"@+id/et_gpu_layers\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"wrap_content\"\n            android:gravity=\"right\"\n            android:inputType=\"number\"\n            android:maxLength=\"3\"\n            android:text=\"999\" />\n    </LinearLayout>\n\n    <Button\n        android:id=\"@+id/btn_load\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"35dp\"\n        android:layout_marginTop=\"30dp\"\n        android:background=\"@drawable/btn_rounded_black_bg_18\"\n        android:minWidth=\"1dp\"\n        android:minHeight=\"1dp\"\n        android:text=\"Load\"\n        android:textAllCaps=\"false\"\n        android:textColor=\"@color/font_white\"\n        android:textSize=\"16sp\" />\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/dialog_topk_config.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:background=\"@drawable/bg_topk_bottom\"\n    android:orientation=\"vertical\"\n    android:paddingHorizontal=\"15dp\"\n    android:paddingVertical=\"20dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <TextView\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:text=\"Setttings\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"@color/font_black\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n\n        <ImageView\n            android:id=\"@+id/iv_close\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"5dp\"\n            android:src=\"@drawable/icon_close\" />\n    </LinearLayout>\n\n    <TextView\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:text=\"TopK\"\n        android:textColor=\"#676767\" />\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"20dp\"\n        android:gravity=\"center_vertical\"\n        android:orientation=\"horizontal\">\n\n        <androidx.appcompat.widget.AppCompatSeekBar\n            android:id=\"@+id/acs_topk\"\n            android:layout_width=\"0dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_weight=\"1\"\n            android:max=\"10\"\n            android:min=\"1\" />\n\n        <TextView\n            android:id=\"@+id/et_topk\"\n            android:layout_width=\"50dp\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginLeft=\"20dp\"\n            android:background=\"@drawable/btn_rounded_border_18\"\n            android:gravity=\"center\"\n            android:textColor=\"@color/font_black\"\n            tools:text=\"5\" />\n\n    </LinearLayout>\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/fragment_index.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    android:background=\"@color/bg_normal\"\n    android:orientation=\"vertical\"\n    tools:context=\".fragments.IndexFragment\">\n\n    <FrameLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:layout_weight=\"1\">\n\n        <LinearLayout\n            android:id=\"@+id/ll_indexing\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"10dp\"\n            android:orientation=\"vertical\"\n            tools:visibility=\"gone\"\n            android:visibility=\"gone\">\n\n            <LinearLayout\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\"\n                android:paddingHorizontal=\"15dp\">\n\n                <TextView\n                    android:layout_width=\"0dp\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_weight=\"1\"\n                    android:text=\"Indexing...\"\n                    android:textColor=\"#1f1f1f\"\n                    android:textSize=\"16sp\" />\n\n                <Button\n                    android:id=\"@+id/btn_cancel_index\"\n                    android:layout_width=\"wrap_content\"\n                    android:layout_height=\"wrap_content\"\n                    android:background=\"@drawable/btn_rounded_border_18\"\n                    android:elevation=\"0dp\"\n                    android:minWidth=\"0dp\"\n                    android:minHeight=\"0dp\"\n                    android:paddingHorizontal=\"18dp\"\n                    android:paddingVertical=\"4dp\"\n                    android:stateListAnimator=\"@null\"\n                    android:text=\"Cancel\"\n                    android:textAllCaps=\"false\"\n                    android:textColor=\"#1f1f1f\" />\n\n            </LinearLayout>\n\n            <com.google.android.material.progressindicator.LinearProgressIndicator\n                android:id=\"@+id/lpi_indexing\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"3dp\"\n                android:layout_marginHorizontal=\"15dp\"\n                android:layout_marginTop=\"15dp\"\n                android:max=\"100\"\n                android:progress=\"0\" />\n        </LinearLayout>\n\n        <TextView\n            android:id=\"@+id/tv_index_tip\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:layout_gravity=\"center\"\n            android:gravity=\"center\"\n            android:text=\"@string/blank_index_tip\"\n            android:textColor=\"#1f1f1f\"\n            android:textSize=\"16sp\" />\n\n        <LinearLayout\n            android:id=\"@+id/ll_indexed\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"match_parent\"\n            android:orientation=\"vertical\"\n            android:visibility=\"gone\"\n            tools:visibility=\"visible\">\n\n            <TextView\n                android:id=\"@+id/tv_index_database\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:layout_marginLeft=\"15dp\"\n                android:layout_marginTop=\"10dp\"\n                android:layout_marginBottom=\"10dp\"\n                android:drawableLeft=\"@drawable/icon_database\"\n                android:drawablePadding=\"20dp\"\n                android:gravity=\"center_vertical\"\n                android:text=\"Database: 1690 files\"\n                android:textColor=\"#1f1f1f\"\n                android:textSize=\"16sp\" />\n\n            <com.google.android.material.tabs.TabLayout\n                android:id=\"@+id/tl_indexed\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:visibility=\"gone\"/>\n\n            <androidx.viewpager.widget.ViewPager\n                android:id=\"@+id/vp_indexed\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"match_parent\"/>\n\n        </LinearLayout>\n\n\n    </FrameLayout>\n\n    <com.google.android.material.card.MaterialCardView\n        android:id=\"@+id/mcv_index\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"2dp\"\n        app:cardBackgroundColor=\"@color/white\">\n\n        <androidx.constraintlayout.widget.ConstraintLayout\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:padding=\"15dp\">\n\n            <LinearLayout\n                android:id=\"@+id/ll_bottom\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"vertical\"\n                app:layout_constraintTop_toTopOf=\"parent\">\n\n                <EditText\n                    android:id=\"@+id/et_search\"\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:hint=\"Enter search term...\"\n                    android:maxLines=\"3\"\n                    android:padding=\"15dp\"\n                    android:paddingTop=\"22dp\"\n                    android:paddingBottom=\"22dp\"\n                    android:textColorHint=\"#adadad\"\n                    android:textSize=\"16sp\" />\n\n                <LinearLayout\n                    android:layout_width=\"match_parent\"\n                    android:layout_height=\"wrap_content\"\n                    android:layout_marginTop=\"10dp\"\n                    android:orientation=\"horizontal\">\n\n                    <Button\n                        android:id=\"@+id/btn_import\"\n                        android:layout_width=\"wrap_content\"\n                        android:layout_height=\"wrap_content\"\n                        android:background=\"@drawable/btn_rounded_border_18\"\n                        android:elevation=\"0dp\"\n                        android:minWidth=\"0dp\"\n                        android:minHeight=\"0dp\"\n                        android:paddingHorizontal=\"18dp\"\n                        android:paddingVertical=\"4dp\"\n                        android:stateListAnimator=\"@null\"\n                        android:text=\"+ Import\"\n                        android:textAllCaps=\"false\"\n                        android:textColor=\"#1f1f1f\" />\n\n                    <Button\n                        android:id=\"@+id/btn_search\"\n                        android:layout_width=\"match_parent\"\n                        android:layout_height=\"wrap_content\"\n                        android:layout_marginLeft=\"15dp\"\n                        android:background=\"@drawable/btn_rounded_black_bg_18\"\n                        android:elevation=\"0dp\"\n                        android:minWidth=\"0dp\"\n                        android:minHeight=\"0dp\"\n                        android:paddingHorizontal=\"18dp\"\n                        android:paddingVertical=\"4dp\"\n                        android:stateListAnimator=\"@null\"\n                        android:text=\"Search\"\n                        android:textAllCaps=\"false\"\n                        android:textColor=\"@color/white\" />\n                </LinearLayout>\n            </LinearLayout>\n\n            <View\n                android:id=\"@+id/v_hide_bottom\"\n                android:layout_width=\"match_parent\"\n                android:layout_height=\"0dp\"\n                android:background=\"#7dfcfcfc\"\n                android:clickable=\"true\"\n                android:visibility=\"gone\"\n                app:layout_constraintBottom_toBottomOf=\"@id/ll_bottom\"\n                app:layout_constraintTop_toTopOf=\"parent\" />\n        </androidx.constraintlayout.widget.ConstraintLayout>\n\n    </com.google.android.material.card.MaterialCardView>\n\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/fragment_indexed_images.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".fragments.IndexedImagesFragment\">\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/rv_images\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:layoutManager=\"androidx.recyclerview.widget.GridLayoutManager\"\n        app:spanCount=\"2\" />\n\n</FrameLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/fragment_indexed_videos.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\"\n    tools:context=\".fragments.IndexedVideosFragment\">\n\n    <androidx.recyclerview.widget.RecyclerView\n        android:id=\"@+id/rv_videos\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        app:layoutManager=\"androidx.recyclerview.widget.GridLayoutManager\"\n        app:spanCount=\"2\" />\n\n</FrameLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_ai_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"start\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <TextView\n        android:id=\"@+id/tv_message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:letterSpacing=\"0.02\"\n        android:maxWidth=\"320dp\"\n        android:text=\"Hello, I am Assistant\"\n        android:textColor=\"#1F1F1F\"\n        android:textSize=\"16sp\"\n        android:textIsSelectable=\"true\"\n        android:linksClickable=\"true\" />\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_audio_scroll.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"120dp\"\n    android:layout_height=\"wrap_content\"\n    android:layout_marginEnd=\"8dp\"\n    android:layout_gravity=\"center\"\n    android:padding=\"12dp\"\n    android:background=\"@drawable/bg_audio_background\"\n    >\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:orientation=\"vertical\"\n        android:gravity=\"center\"\n        android:layout_marginTop=\"8dp\"\n        android:layout_marginLeft=\"8dp\"\n        android:layout_marginBottom=\"8dp\"\n        android:layout_marginEnd=\"24dp\"\n        >\n\n        <TextView\n            android:id=\"@+id/tv_audio_name\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:ellipsize=\"end\"\n            android:maxLines=\"1\"\n            android:singleLine=\"true\"\n            android:text=\"TextView\"\n            android:textAppearance=\"@android:style/TextAppearance.Material.Small\"\n            android:textColor=\"#1F1F1F\"\n            android:textSize=\"12sp\"\n            android:textStyle=\"bold\" />\n\n        <TextView\n            android:id=\"@+id/tv_audio_type\"\n            android:layout_width=\"match_parent\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"WAV\"\n            android:textColor=\"#888888\"\n            android:textSize=\"12sp\" />\n    </LinearLayout>\n\n    <ImageButton\n        android:id=\"@+id/btn_audio_remove\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_gravity=\"top|end\"\n        android:background=\"@android:color/transparent\"\n        android:src=\"@android:drawable/ic_menu_close_clear_cancel\"/>\n</FrameLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_citation.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center\"\n    android:orientation=\"horizontal\"\n    android:paddingVertical=\"16dp\">\n\n    <TextView\n        android:id=\"@+id/tv_position\"\n        android:layout_width=\"24dp\"\n        android:layout_height=\"24dp\"\n        android:background=\"@drawable/bg_circle_gray\"\n        android:gravity=\"center\"\n        android:textColor=\"@color/font_black\"\n        android:textSize=\"13sp\"\n        tools:text=\"99\" />\n\n    <TextView\n        android:id=\"@+id/tv_file_name\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"20dp\"\n        android:layout_weight=\"1\"\n        android:textColor=\"@color/font_black\"\n        android:textSize=\"14sp\"\n        android:textStyle=\"bold\"\n        tools:text=\"test.txt\" />\n\n    <Button\n        android:id=\"@+id/btn_chunk\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:background=\"@drawable/btn_rounded_border_gray\"\n        android:minWidth=\"1dp\"\n        android:minHeight=\"1dp\"\n        android:paddingHorizontal=\"12dp\"\n        android:paddingVertical=\"2dp\"\n        android:stateListAnimator=\"@null\"\n        android:textAllCaps=\"false\"\n        android:textColor=\"#676767\"\n        android:textSize=\"14sp\"\n        tools:text=\"Chunk 1\" />\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_image_item_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"100dp\"\n    android:layout_height=\"100dp\"\n    android:layout_marginEnd=\"8dp\">\n    <ImageView\n        android:id=\"@+id/iv_image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scaleType=\"centerCrop\"/>\n</FrameLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_image_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"end\"\n    android:padding=\"8dp\">\n\n        <HorizontalScrollView\n            android:id=\"@+id/scroller_container\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:scrollbars=\"none\"\n            android:overScrollMode=\"never\">\n\n            <LinearLayout\n                android:id=\"@+id/image_container\"\n                android:layout_width=\"wrap_content\"\n                android:layout_height=\"wrap_content\"\n                android:orientation=\"horizontal\" />\n        </HorizontalScrollView>\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_image_scroll.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"100dp\"\n    android:layout_height=\"100dp\"\n    android:layout_marginEnd=\"8dp\">\n\n    <ImageView\n        android:id=\"@+id/iv_image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"match_parent\"\n        android:scaleType=\"centerCrop\"/>\n\n    <ImageButton\n        android:id=\"@+id/btn_remove\"\n        android:layout_marginRight=\"4dp\"\n        android:layout_marginTop=\"4dp\"\n        android:layout_width=\"20dp\"\n        android:layout_height=\"20dp\"\n        android:layout_gravity=\"top|end\"\n        android:background=\"@android:color/transparent\"\n        android:src=\"@android:drawable/ic_menu_close_clear_cancel\"/>\n</FrameLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_model.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center_vertical\"\n    android:orientation=\"vertical\">\n\n    <TextView\n        android:id=\"@+id/tv_model_id\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:padding=\"15dp\"\n        android:textSize=\"14sp\"\n        android:letterSpacing=\"0.01\"\n        android:textColor=\"@color/font_white\"\n        tools:text=\"test\" />\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_profile_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"start\"\n    android:orientation=\"vertical\"\n    android:padding=\"8dp\">\n\n    <LinearLayout\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:orientation=\"horizontal\">\n\n        <Button\n            android:id=\"@+id/btn_citations\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"10dp\"\n            android:background=\"@drawable/btn_rounded_border_gray\"\n            android:drawableLeft=\"@drawable/icon_file\"\n            android:drawablePadding=\"10dp\"\n            android:minWidth=\"0dp\"\n            android:minHeight=\"0dp\"\n            android:paddingHorizontal=\"10dp\"\n            android:paddingVertical=\"3dp\"\n            android:stateListAnimator=\"@null\"\n            android:text=\"0 Citations\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"@color/btn_enable_color\"\n            android:textSize=\"14sp\"\n            android:visibility=\"gone\"\n            tools:visibility=\"visible\" />\n\n        <View\n            android:layout_width=\"0dp\"\n            android:layout_height=\"1px\"\n            android:layout_weight=\"1\" />\n\n        <Button\n            android:id=\"@+id/btn_view_prompt\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginBottom=\"10dp\"\n            android:background=\"@drawable/btn_rounded_border_gray\"\n            android:drawableLeft=\"@drawable/icon_text\"\n            android:drawablePadding=\"10dp\"\n            android:minWidth=\"0dp\"\n            android:minHeight=\"0dp\"\n            android:paddingHorizontal=\"10dp\"\n            android:paddingVertical=\"3dp\"\n            android:stateListAnimator=\"@null\"\n            android:text=\"View Prompt\"\n            android:textAllCaps=\"false\"\n            android:textColor=\"@color/btn_enable_color\"\n            android:textSize=\"14sp\"\n            android:visibility=\"gone\"\n            tools:visibility=\"visible\" />\n    </LinearLayout>\n\n    <LinearLayout\n        android:id=\"@+id/citations_container\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginBottom=\"10dp\"\n        android:orientation=\"vertical\"\n        android:visibility=\"gone\" />\n\n    <TextView\n        android:id=\"@+id/tv_message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:letterSpacing=\"0.02\"\n        android:maxWidth=\"320dp\"\n        android:text=\"Profile data\"\n        android:textColor=\"#888888\"\n        android:textSize=\"12sp\" />\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_select_file.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center_vertical\"\n    android:orientation=\"horizontal\"\n    android:padding=\"15dp\">\n\n    <ImageView\n        android:layout_width=\"60dp\"\n        android:layout_height=\"60dp\"\n        android:src=\"@mipmap/img_select_placeholder\" />\n\n    <LinearLayout\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"10dp\"\n        android:orientation=\"vertical\">\n\n        <TextView\n            android:id=\"@+id/tv_dir_name\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:text=\"Camera\"\n            android:textColor=\"#1f1f1f\"\n            android:textSize=\"16sp\"\n            android:textStyle=\"bold\" />\n\n        <TextView\n            android:id=\"@+id/tv_file_count\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:layout_marginTop=\"5dp\"\n            android:text=\"16 items\"\n            android:textColor=\"#888888\"\n            android:textSize=\"12sp\" />\n    </LinearLayout>\n\n    <View\n        android:layout_width=\"0dp\"\n        android:layout_height=\"1px\"\n        android:layout_weight=\"1\" />\n\n    <CheckBox\n        android:id=\"@+id/cb_selected\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\" />\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_select_image.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<androidx.constraintlayout.widget.ConstraintLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"5dp\">\n\n    <ImageView\n        android:id=\"@+id/iv_image\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"0dp\"\n        android:adjustViewBounds=\"true\"\n        android:scaleType=\"centerCrop\"\n        app:layout_constraintDimensionRatio=\"1:1\"\n        android:src=\"@mipmap/img_select_placeholder\" />\n\n    <androidx.cardview.widget.CardView\n        android:id=\"@+id/cv_percent\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginTop=\"5dp\"\n        android:layout_marginRight=\"8dp\"\n        android:visibility=\"gone\"\n        app:cardBackgroundColor=\"#7d141414\"\n        app:cardCornerRadius=\"10dp\"\n        app:layout_constraintRight_toRightOf=\"parent\"\n        app:layout_constraintTop_toTopOf=\"parent\">\n\n        <TextView\n            android:id=\"@+id/tv_percent\"\n            android:layout_width=\"wrap_content\"\n            android:layout_height=\"wrap_content\"\n            android:paddingHorizontal=\"5dp\"\n            android:paddingVertical=\"1dp\"\n            android:text=\"60%\"\n            android:textColor=\"@color/white\"\n            android:textSize=\"12sp\" />\n    </androidx.cardview.widget.CardView>\n\n\n</androidx.constraintlayout.widget.ConstraintLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_spinner_dropdown.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:gravity=\"center_vertical\"\n    android:orientation=\"horizontal\"\n    android:paddingLeft=\"15dp\"\n    android:paddingRight=\"15dp\"\n    android:paddingTop=\"12dp\"\n    android:paddingBottom=\"12dp\">\n\n    <TextView\n        android:id=\"@android:id/text1\"\n        android:layout_width=\"0dp\"\n        android:layout_height=\"wrap_content\"\n        android:layout_weight=\"1\"\n        android:textSize=\"14sp\"\n        android:textColor=\"#000000\"\n        android:singleLine=\"true\"\n        android:ellipsize=\"end\" />\n\n    <ImageView\n        android:id=\"@+id/iv_check\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_marginLeft=\"8dp\"\n        android:src=\"@drawable/icon_check\"\n        android:visibility=\"gone\" />\n\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/item_user_message.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:padding=\"8dp\"\n    android:gravity=\"end\">\n\n    <TextView\n        android:id=\"@+id/tv_message\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:textColor=\"#1F1F1F\"\n        android:background=\"@drawable/bg_user_message\"\n        android:padding=\"12dp\"\n        android:textSize=\"16sp\"\n        android:maxWidth=\"320dp\"\n        android:text=\"Hello\"/>\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/menu_layout.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:orientation=\"vertical\"\n    android:background=\"#ffffff\"\n    android:padding=\"8dp\"\n    android:layout_width=\"wrap_content\"\n    android:layout_height=\"wrap_content\">\n\n    <Button\n        android:id=\"@+id/btn_camera\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Camera\"\n        android:visibility=\"gone\"\n        android:background=\"#ffffff\"\n        android:textColor=\"#1F1F1F\"\n        android:textAllCaps=\"false\" />\n\n    <Button\n        android:id=\"@+id/btn_photo\"\n        android:layout_width=\"match_parent\"\n        android:layout_height=\"wrap_content\"\n        android:text=\"Photos\"\n        android:textAllCaps=\"false\"\n        android:background=\"#ffffff\"\n        android:textColor=\"#1F1F1F\"\n        android:layout_marginTop=\"4dp\"/>\n</LinearLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/layout/spinner_custom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:layout_width=\"match_parent\"\n    android:layout_height=\"wrap_content\"\n    android:paddingLeft=\"10dp\"\n    android:paddingRight=\"10dp\">\n\n    <TextView\n        android:id=\"@android:id/text1\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_alignParentLeft=\"true\"\n        android:layout_centerVertical=\"true\"\n        android:layout_marginLeft=\"12dp\"\n        android:textSize=\"16sp\"\n        android:fontWeight=\"600\"\n        android:textColor=\"@color/font_white\"\n        android:singleLine=\"true\"\n        android:ellipsize=\"end\"\n        android:maxEms=\"25\" />\n\n    <ImageView\n        android:id=\"@+id/iv_arrow\"\n        android:layout_width=\"wrap_content\"\n        android:layout_height=\"wrap_content\"\n        android:layout_toRightOf=\"@android:id/text1\"\n        android:layout_centerVertical=\"true\"\n        android:layout_marginLeft=\"8dp\"\n        android:src=\"@drawable/icon_arrow_down_white\" />\n\n</RelativeLayout>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <background android:drawable=\"@drawable/ic_launcher_background\" />\n    <foreground android:drawable=\"@drawable/ic_launcher_foreground\" />\n    <monochrome android:drawable=\"@drawable/ic_launcher_foreground\" />\n</adaptive-icon>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/values/attrs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n\n    <declare-styleable name=\"WrapRadioGroup\">\n        <attr name=\"wrapOrientation\" format=\"enum\">\n            <enum name=\"horizontal\" value=\"0\" />\n            <enum name=\"vertical\" value=\"1\" />\n        </attr>\n    </declare-styleable>\n</resources>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/values/colors.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <color name=\"purple_200\">#FFBB86FC</color>\n    <color name=\"purple_500\">#FF6200EE</color>\n    <color name=\"purple_700\">#FF3700B3</color>\n    <color name=\"teal_200\">#FF03DAC5</color>\n    <color name=\"teal_700\">#FF018786</color>\n    <color name=\"black\">#FF000000</color>\n    <color name=\"white\">#FFFFFFFF</color>\n    <color name=\"bg_normal\">#F6F7F9</color>\n    <color name=\"font_black\">#1F1F1F</color>\n    <color name=\"font_white\">#FCFCFC</color>\n    <color name=\"header_bg\">#141414</color>\n</resources>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/values/ids.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <item name=\"wrap_radio_button_line\" type=\"id\"/>\n</resources>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/values/strings.xml",
    "content": "<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <string name=\"app_name\">NexaRAGDemo</string>\n    <string name=\"blank_index_tip\">Please import files before starting your search.</string>\n    <string name=\"hello_blank_fragment\">Hello blank fragment</string>\n</resources>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/values/styles.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n\n    <style name=\"btn_enable_14\">\n        <item name=\"android:layout_width\">wrap_content</item>\n        <item name=\"android:layout_height\">wrap_content</item>\n        <item name=\"android:layout_marginEnd\">8dp</item>\n        <item name=\"android:background\">@drawable/btn_bg_enable</item>\n        <item name=\"android:textColor\">@color/btn_enable_color</item>\n        <item name=\"android:textSize\">14sp</item>\n        <item name=\"android:textAllCaps\">false</item>\n        <item name=\"android:minHeight\">1dp</item>\n        <item name=\"android:minWidth\">1dp</item>\n        <item name=\"android:paddingHorizontal\">12dp</item>\n        <item name=\"android:paddingVertical\">6dp</item>\n    </style>\n</resources>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/values/themes.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<resources>\n    <style name=\"Theme.NexaDemo\" parent=\"android:Theme.Material.Light.NoActionBar\" />\n\n    <style name=\"TransparentBottomSheetDialog\" parent=\"Theme.Design.Light.BottomSheetDialog\">\n        <item name=\"android:windowBackground\">@android:color/transparent</item>\n    </style>\n</resources>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/xml/backup_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<!--\n   Sample backup rules file; uncomment and customize as necessary.\n   See https://developer.android.com/guide/topics/data/autobackup\n   for details.\n   Note: This file is ignored for devices older than API 31\n   See https://developer.android.com/about/versions/12/backup-restore\n-->\n<full-backup-content>\n    <!--\n   <include domain=\"sharedpref\" path=\".\"/>\n   <exclude domain=\"sharedpref\" path=\"device.xml\"/>\n-->\n</full-backup-content>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/xml/data_extraction_rules.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<!--\n   Sample data extraction rules file; uncomment and customize as necessary.\n   See https://developer.android.com/about/versions/12/backup-restore#xml-changes\n   for details.\n-->\n<data-extraction-rules>\n    <cloud-backup>\n        <!-- TODO: Use <include> and <exclude> to control what is backed up.\n        <include .../>\n        <exclude .../>\n        -->\n    </cloud-backup>\n    <!--\n    <device-transfer>\n        <include .../>\n        <exclude .../>\n    </device-transfer>\n    -->\n</data-extraction-rules>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/main/res/xml/file_paths.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<paths xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <external-files-path\n        name=\"pictures\"\n        path=\"Pictures/\" />\n\n    <files-path\n        name=\"internal_files\"\n        path=\".\" />\n</paths>"
  },
  {
    "path": "cookbook/android/RAG-LLM/app/src/test/java/com/nexa/demo/ExampleUnitTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage com.nexa.demo\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/build.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\n// Top-level build file where you can add configuration options common to all sub-projects/modules.\nplugins {\n    alias(libs.plugins.android.application) apply false\n    alias(libs.plugins.kotlin.android) apply false\n    alias(libs.plugins.kotlin.compose) apply false\n    alias(libs.plugins.android.library) apply false\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/gradle/libs.versions.toml",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n[versions]\naiNexaCore = \"0.0.22\"\nagp = \"8.12.1\"\nkotlin = \"2.2.0\"\ncoreKtx = \"1.10.1\"\njunit = \"4.13.2\"\njunitVersion = \"1.1.5\"\nespressoCore = \"3.5.1\"\nlifecycleRuntimeKtx = \"2.6.1\"\nactivityCompose = \"1.8.0\"\ncomposeBom = \"2024.09.00\"\nkotlinx-serialization =\"1.6.3\"\nokhttp = \"5.1.0\"\nappcompat = \"1.6.1\"\nmaterial = \"1.10.0\"\nkotlinxCoroutinesAndroid = \"1.7.3\"\nconstraintlayout = \"2.1.4\"\naws-android-s3 = '2.81.0'\nautoSize = \"v1.2.1\"\nimmBar = \"3.2.2\"\nactivity = \"1.11.0\"\ntoaster = \"13.8\"\nrecyclerview = \"1.3.1\"\ngson = \"2.10.1\"\nglide = \"5.0.5\"\nactivityVersion = \"1.12.2\"\nmarkwon = \"4.6.2\"\n\n[libraries]\nglide = {group = \"com.github.bumptech.glide\", name = \"glide\", version.ref = \"glide\"}\ngson = {group = \"com.google.code.gson\", name = \"gson\", version.ref = \"gson\"}\nrecyclerview = {group = \"androidx.recyclerview\", name = \"recyclerview\", version.ref = \"recyclerview\"}\ntoaster = {group = \"com.github.getActivity\", name = \"Toaster\", version.ref = \"toaster\"}\nimm-bar-ktx = {group = \"com.geyifeng.immersionbar\", name = \"immersionbar-ktx\", version.ref = \"immBar\"}\nimm-bar = {group = \"com.geyifeng.immersionbar\", name = \"immersionbar\", version.ref = \"immBar\"}\nauto-size = {group = \"com.github.JessYanCoding\", name = \"AndroidAutoSize\", version.ref = \"autoSize\"}\naws-android-sdk-s3 = {group = \"com.amazonaws\", name = \"aws-android-sdk-s3\", version.ref = \"aws-android-s3\"}\nandroidx-core-ktx = { group = \"androidx.core\", name = \"core-ktx\", version.ref = \"coreKtx\" }\njunit = { group = \"junit\", name = \"junit\", version.ref = \"junit\" }\nandroidx-junit = { group = \"androidx.test.ext\", name = \"junit\", version.ref = \"junitVersion\" }\nandroidx-espresso-core = { group = \"androidx.test.espresso\", name = \"espresso-core\", version.ref = \"espressoCore\" }\nandroidx-lifecycle-runtime-ktx = { group = \"androidx.lifecycle\", name = \"lifecycle-runtime-ktx\", version.ref = \"lifecycleRuntimeKtx\" }\nandroidx-activity-compose = { group = \"androidx.activity\", name = \"activity-compose\", version.ref = \"activityCompose\" }\nandroidx-compose-bom = { group = \"androidx.compose\", name = \"compose-bom\", version.ref = \"composeBom\" }\nandroidx-ui = { group = \"androidx.compose.ui\", name = \"ui\" }\nandroidx-ui-graphics = { group = \"androidx.compose.ui\", name = \"ui-graphics\" }\nandroidx-ui-tooling = { group = \"androidx.compose.ui\", name = \"ui-tooling\" }\nandroidx-ui-tooling-preview = { group = \"androidx.compose.ui\", name = \"ui-tooling-preview\" }\nandroidx-ui-test-manifest = { group = \"androidx.compose.ui\", name = \"ui-test-manifest\" }\nandroidx-ui-test-junit4 = { group = \"androidx.compose.ui\", name = \"ui-test-junit4\" }\nandroidx-material3 = { group = \"androidx.compose.material3\", name = \"material3\" }\nkotlinx-serialization-json = { module = \"org.jetbrains.kotlinx:kotlinx-serialization-json\", version.ref = \"kotlinx-serialization\" }\nokhttp = { group = \"com.squareup.okhttp3\", name=\"okhttp\", version.ref = \"okhttp\" }\nandroidx-appcompat = { group = \"androidx.appcompat\", name = \"appcompat\", version.ref = \"appcompat\" }\nmaterial = { group = \"com.google.android.material\", name = \"material\", version.ref = \"material\" }\nkotlinx-coroutines-android = { module = \"org.jetbrains.kotlinx:kotlinx-coroutines-android\", version.ref = \"kotlinxCoroutinesAndroid\" }\nandroidx-constraintlayout = { group = \"androidx.constraintlayout\", name = \"constraintlayout\", version.ref = \"constraintlayout\" }\nai-nexa-core = {group = \"ai.nexa\", name = \"core\", version.ref = \"aiNexaCore\"}\nandroidx-activity = { group = \"androidx.activity\", name = \"activity\", version.ref = \"activityVersion\" }\nmarkwon-core = { group = \"io.noties.markwon\", name = \"core\", version.ref = \"markwon\" }\nmarkwon-strikethrough = { group = \"io.noties.markwon\", name = \"ext-strikethrough\", version.ref = \"markwon\" }\nmarkwon-tables = { group = \"io.noties.markwon\", name = \"ext-tables\", version.ref = \"markwon\" }\nmarkwon-linkify = { group = \"io.noties.markwon\", name = \"linkify\", version.ref = \"markwon\" }\n\n[plugins]\nandroid-application = { id = \"com.android.application\", version.ref = \"agp\" }\nkotlin-android = { id = \"org.jetbrains.kotlin.android\", version.ref = \"kotlin\" }\nkotlin-compose = { id = \"org.jetbrains.kotlin.plugin.compose\", version.ref = \"kotlin\" }\nandroid-library = { id = \"com.android.library\", version.ref = \"agp\" }\n\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/gradle/wrapper/gradle-wrapper.properties",
    "content": "#Fri Aug 22 13:22:30 CST 2025\ndistributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributions/gradle-8.13-bin.zip\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dists\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/gradle.properties",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will override*\n# any settings specified in this file.\n# For more details on how to configure your build environment visit\n# http://www.gradle.org/docs/current/userguide/build_environment.html\n# Specifies the JVM arguments used for the daemon process.\n# The setting is particularly useful for tweaking memory settings.\norg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8\n# When configured, Gradle will run in incubating parallel mode.\n# This option should only be used with decoupled projects. For more details, visit\n# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects\n# org.gradle.parallel=true\n# AndroidX package structure to make it clearer which packages are bundled with the\n# Android operating system, and which are packaged with your app's APK\n# https://developer.android.com/topic/libraries/support-library/androidx-rn\nandroid.useAndroidX=true\n# Kotlin code style for this project: \"official\" or \"obsolete\":\nkotlin.code.style=official\n# Enables namespacing of each library's R class so that its R class includes only the\n# resources declared in the library itself and none from the library's dependencies,\n# thereby reducing the size of the R class for that library\nandroid.nonTransitiveRClass=true\nandroid.injected.testOnly=false"
  },
  {
    "path": "cookbook/android/RAG-LLM/gradlew",
    "content": "#!/usr/bin/env sh\n\n#\n# Copyright 2015 the original author or authors.\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#      https://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#\n\n##############################################################################\n##\n##  Gradle start up script for UN*X\n##\n##############################################################################\n\n# Attempt to set APP_HOME\n# Resolve links: $0 may be a link\nPRG=\"$0\"\n# Need this for relative symlinks.\nwhile [ -h \"$PRG\" ] ; do\n    ls=`ls -ld \"$PRG\"`\n    link=`expr \"$ls\" : '.*-> \\(.*\\)$'`\n    if expr \"$link\" : '/.*' > /dev/null; then\n        PRG=\"$link\"\n    else\n        PRG=`dirname \"$PRG\"`\"/$link\"\n    fi\ndone\nSAVED=\"`pwd`\"\ncd \"`dirname \\\"$PRG\\\"`/\" >/dev/null\nAPP_HOME=\"`pwd -P`\"\ncd \"$SAVED\" >/dev/null\n\nAPP_NAME=\"Gradle\"\nAPP_BASE_NAME=`basename \"$0\"`\n\n# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nDEFAULT_JVM_OPTS='\"-Xmx64m\" \"-Xms64m\"'\n\n# Use the maximum available, or set MAX_FD != -1 to use that value.\nMAX_FD=\"maximum\"\n\nwarn () {\n    echo \"$*\"\n}\n\ndie () {\n    echo\n    echo \"$*\"\n    echo\n    exit 1\n}\n\n# OS specific support (must be 'true' or 'false').\ncygwin=false\nmsys=false\ndarwin=false\nnonstop=false\ncase \"`uname`\" in\n  CYGWIN* )\n    cygwin=true\n    ;;\n  Darwin* )\n    darwin=true\n    ;;\n  MINGW* )\n    msys=true\n    ;;\n  NONSTOP* )\n    nonstop=true\n    ;;\nesac\n\nCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar\n\n\n# Determine the Java command to use to start the JVM.\nif [ -n \"$JAVA_HOME\" ] ; then\n    if [ -x \"$JAVA_HOME/jre/sh/java\" ] ; then\n        # IBM's JDK on AIX uses strange locations for the executables\n        JAVACMD=\"$JAVA_HOME/jre/sh/java\"\n    else\n        JAVACMD=\"$JAVA_HOME/bin/java\"\n    fi\n    if [ ! -x \"$JAVACMD\" ] ; then\n        die \"ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\n    fi\nelse\n    JAVACMD=\"java\"\n    which java >/dev/null 2>&1 || die \"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\n\nPlease set the JAVA_HOME variable in your environment to match the\nlocation of your Java installation.\"\nfi\n\n# Increase the maximum file descriptors if we can.\nif [ \"$cygwin\" = \"false\" -a \"$darwin\" = \"false\" -a \"$nonstop\" = \"false\" ] ; then\n    MAX_FD_LIMIT=`ulimit -H -n`\n    if [ $? -eq 0 ] ; then\n        if [ \"$MAX_FD\" = \"maximum\" -o \"$MAX_FD\" = \"max\" ] ; then\n            MAX_FD=\"$MAX_FD_LIMIT\"\n        fi\n        ulimit -n $MAX_FD\n        if [ $? -ne 0 ] ; then\n            warn \"Could not set maximum file descriptor limit: $MAX_FD\"\n        fi\n    else\n        warn \"Could not query maximum file descriptor limit: $MAX_FD_LIMIT\"\n    fi\nfi\n\n# For Darwin, add options to specify how the application appears in the dock\nif $darwin; then\n    GRADLE_OPTS=\"$GRADLE_OPTS \\\"-Xdock:name=$APP_NAME\\\" \\\"-Xdock:icon=$APP_HOME/media/gradle.icns\\\"\"\nfi\n\n# For Cygwin or MSYS, switch paths to Windows format before running java\nif [ \"$cygwin\" = \"true\" -o \"$msys\" = \"true\" ] ; then\n    APP_HOME=`cygpath --path --mixed \"$APP_HOME\"`\n    CLASSPATH=`cygpath --path --mixed \"$CLASSPATH\"`\n\n    JAVACMD=`cygpath --unix \"$JAVACMD\"`\n\n    # We build the pattern for arguments to be converted via cygpath\n    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`\n    SEP=\"\"\n    for dir in $ROOTDIRSRAW ; do\n        ROOTDIRS=\"$ROOTDIRS$SEP$dir\"\n        SEP=\"|\"\n    done\n    OURCYGPATTERN=\"(^($ROOTDIRS))\"\n    # Add a user-defined pattern to the cygpath arguments\n    if [ \"$GRADLE_CYGPATTERN\" != \"\" ] ; then\n        OURCYGPATTERN=\"$OURCYGPATTERN|($GRADLE_CYGPATTERN)\"\n    fi\n    # Now convert the arguments - kludge to limit ourselves to /bin/sh\n    i=0\n    for arg in \"$@\" ; do\n        CHECK=`echo \"$arg\"|egrep -c \"$OURCYGPATTERN\" -`\n        CHECK2=`echo \"$arg\"|egrep -c \"^-\"`                                 ### Determine if an option\n\n        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition\n            eval `echo args$i`=`cygpath --path --ignore --mixed \"$arg\"`\n        else\n            eval `echo args$i`=\"\\\"$arg\\\"\"\n        fi\n        i=`expr $i + 1`\n    done\n    case $i in\n        0) set -- ;;\n        1) set -- \"$args0\" ;;\n        2) set -- \"$args0\" \"$args1\" ;;\n        3) set -- \"$args0\" \"$args1\" \"$args2\" ;;\n        4) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" ;;\n        5) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" ;;\n        6) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" ;;\n        7) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" ;;\n        8) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" ;;\n        9) set -- \"$args0\" \"$args1\" \"$args2\" \"$args3\" \"$args4\" \"$args5\" \"$args6\" \"$args7\" \"$args8\" ;;\n    esac\nfi\n\n# Escape application args\nsave () {\n    for i do printf %s\\\\n \"$i\" | sed \"s/'/'\\\\\\\\''/g;1s/^/'/;\\$s/\\$/' \\\\\\\\/\" ; done\n    echo \" \"\n}\nAPP_ARGS=`save \"$@\"`\n\n# Collect all arguments for the java command, following the shell quoting and substitution rules\neval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS \"\\\"-Dorg.gradle.appname=$APP_BASE_NAME\\\"\" -classpath \"\\\"$CLASSPATH\\\"\" org.gradle.wrapper.GradleWrapperMain \"$APP_ARGS\"\n\nexec \"$JAVACMD\" \"$@\"\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/gradlew.bat",
    "content": "@rem\n@rem Copyright 2015 the original author or authors.\n@rem\n@rem Licensed under the Apache License, Version 2.0 (the \"License\");\n@rem you may not use this file except in compliance with the License.\n@rem You may obtain a copy of the License at\n@rem\n@rem      https://www.apache.org/licenses/LICENSE-2.0\n@rem\n@rem Unless required by applicable law or agreed to in writing, software\n@rem distributed under the License is distributed on an \"AS IS\" BASIS,\n@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n@rem See the License for the specific language governing permissions and\n@rem limitations under the License.\n@rem\n\n@if \"%DEBUG%\" == \"\" @echo off\n@rem ##########################################################################\n@rem\n@rem  Gradle startup script for Windows\n@rem\n@rem ##########################################################################\n\n@rem Set local scope for the variables with windows NT shell\nif \"%OS%\"==\"Windows_NT\" setlocal\n\nset DIRNAME=%~dp0\nif \"%DIRNAME%\" == \"\" set DIRNAME=.\nset APP_BASE_NAME=%~n0\nset APP_HOME=%DIRNAME%\n\n@rem Resolve any \".\" and \"..\" in APP_HOME to make it shorter.\nfor %%i in (\"%APP_HOME%\") do set APP_HOME=%%~fi\n\n@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.\nset DEFAULT_JVM_OPTS=\"-Xmx64m\" \"-Xms64m\"\n\n@rem Find java.exe\nif defined JAVA_HOME goto findJavaFromJavaHome\n\nset JAVA_EXE=java.exe\n%JAVA_EXE% -version >NUL 2>&1\nif \"%ERRORLEVEL%\" == \"0\" goto execute\n\necho.\necho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:findJavaFromJavaHome\nset JAVA_HOME=%JAVA_HOME:\"=%\nset JAVA_EXE=%JAVA_HOME%/bin/java.exe\n\nif exist \"%JAVA_EXE%\" goto execute\n\necho.\necho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%\necho.\necho Please set the JAVA_HOME variable in your environment to match the\necho location of your Java installation.\n\ngoto fail\n\n:execute\n@rem Setup the command line\n\nset CLASSPATH=%APP_HOME%\\gradle\\wrapper\\gradle-wrapper.jar\n\n\n@rem Execute Gradle\n\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% \"-Dorg.gradle.appname=%APP_BASE_NAME%\" -classpath \"%CLASSPATH%\" org.gradle.wrapper.GradleWrapperMain %*\n\n:end\n@rem End local scope for the variables with windows NT shell\nif \"%ERRORLEVEL%\"==\"0\" goto mainEnd\n\n:fail\nrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of\nrem the _cmd.exe /c_ return code!\nif  not \"\" == \"%GRADLE_EXIT_CONSOLE%\" exit 1\nexit /b 1\n\n:mainEnd\nif \"%OS%\"==\"Windows_NT\" endlocal\n\n:omega\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/settings.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\nenableFeaturePreview(\"TYPESAFE_PROJECT_ACCESSORS\")\n\npluginManagement {\n    repositories {\n        google {\n            content {\n                includeGroupByRegex(\"com\\\\.android.*\")\n                includeGroupByRegex(\"com\\\\.google.*\")\n                includeGroupByRegex(\"androidx.*\")\n            }\n        }\n        mavenCentral()\n        gradlePluginPortal()\n    }\n}\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        google()\n        mavenCentral()\n        maven { url = uri(\"https://jitpack.io\") } // Added JitPack for AndroidAutoSize\n//        maven {\n//            url = uri(\"https://raw.githubusercontent.com/NexaAI/core/main\")\n//        }\n        flatDir {\n            dirs(\"app/libs\")\n        }\n    }\n}\n\nrootProject.name = \"NexaRAGDemo\"\n\n// Using cloud SDK - no bridge library needed\ngradle.extra[\"bridgePathExist\"] = false\n\ninclude(\":transform\")\ninclude(\":app\")\n\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/.gitignore",
    "content": "/build"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/build.gradle.kts",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\nplugins {\n    alias(libs.plugins.android.library)\n    alias(libs.plugins.kotlin.android)\n}\n\nandroid {\n    namespace = \"ai.nexa.transform\"\n    compileSdk = 36\n\n    defaultConfig {\n        minSdk = 24\n\n        testInstrumentationRunner = \"androidx.test.runner.AndroidJUnitRunner\"\n        consumerProguardFiles(\"consumer-rules.pro\")\n    }\n\n    buildTypes {\n        release {\n            isMinifyEnabled = false\n            proguardFiles(\n                getDefaultProguardFile(\"proguard-android-optimize.txt\"),\n                \"proguard-rules.pro\"\n            )\n        }\n    }\n    compileOptions {\n        sourceCompatibility = JavaVersion.VERSION_11\n        targetCompatibility = JavaVersion.VERSION_11\n    }\n    kotlinOptions {\n        jvmTarget = \"11\"\n    }\n}\n\ndependencies {\n    compileOnly(libs.ai.nexa.core)\n    compileOnly(libs.androidx.core.ktx)\n//    implementation(libs.androidx.appcompat)\n//    implementation(libs.material)\n    testImplementation(libs.junit)\n    androidTestImplementation(libs.androidx.junit)\n    androidTestImplementation(libs.androidx.espresso.core)\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/consumer-rules.pro",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/proguard-rules.pro",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# Add project specific ProGuard rules here.\n# You can control the set of applied configuration files using the\n# proguardFiles setting in build.gradle.\n#\n# For more details, see\n#   http://developer.android.com/guide/developing/tools/proguard.html\n\n# If your project uses WebView with JS, uncomment the following\n# and specify the fully qualified class name to the JavaScript interface\n# class:\n#-keepclassmembers class fqcn.of.javascript.interface.for.webview {\n#   public *;\n#}\n\n# Uncomment this to preserve the line number information for\n# debugging stack traces.\n#-keepattributes SourceFile,LineNumberTable\n\n# If you keep the line number information, uncomment this to\n# hide the original source file name.\n#-renamesourcefileattribute SourceFile"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/src/androidTest/java/ai/nexa/transform/ExampleInstrumentedTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport androidx.test.platform.app.InstrumentationRegistry\nimport androidx.test.ext.junit.runners.AndroidJUnit4\n\nimport org.junit.Test\nimport org.junit.runner.RunWith\n\nimport org.junit.Assert.*\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\n@RunWith(AndroidJUnit4::class)\nclass ExampleInstrumentedTest {\n    @Test\n    fun useAppContext() {\n        // Context of the app under test.\n        val appContext = InstrumentationRegistry.getInstrumentation().targetContext\n        assertEquals(\"ai.nexa.transform.test\", appContext.packageName)\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/src/main/AndroidManifest.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n  Copyright 2024-2026 Nexa AI, Inc.\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-->\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\">\n<uses-permission android:name=\"android.permission.INTERNET\" />\n</manifest>"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/src/main/java/ai/nexa/transform/DownloadUtils.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport android.text.TextUtils\nimport java.io.File\nimport java.io.FileOutputStream\nimport java.net.HttpURLConnection\nimport java.net.URL\n\nclass DownloadUtils {\n    companion object {\n        // Download image to specified path\n        fun downloadImage(imageUrl: String?, saveFile: File): Boolean {\n            if (TextUtils.isEmpty(imageUrl) || imageUrl?.startsWith(\"http\", true) == false) {\n                return false\n            }\n            return try {\n                val url = URL(imageUrl)\n                val connection = url.openConnection() as HttpURLConnection\n                connection.connectTimeout = 15000\n                connection.readTimeout = 15000\n                connection.doInput = true\n                connection.connect()\n                if (connection.responseCode == HttpURLConnection.HTTP_OK) {\n                    val inputStream = connection.inputStream\n                    // Ensure directory exists\n                    saveFile.parentFile?.mkdirs()\n                    FileOutputStream(saveFile).use { outputStream ->\n                        inputStream.copyTo(outputStream)\n                    }\n                    inputStream.close()\n                    true\n                } else {\n                    false\n                }\n            } catch (e: Exception) {\n                e.printStackTrace()\n                false\n            }\n        }\n    }\n}"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/src/main/java/ai/nexa/transform/ImageUtils.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport android.util.Base64\nimport java.io.File\nimport java.io.FileOutputStream\n\nclass ImageUtils {\n    companion object {\n        fun saveBase64ToFile(base64String: String?, filePath: String): Boolean {\n            return saveBase64ToFile(base64String, File(filePath))\n        }\n\n        fun saveBase64ToFile(base64String: String?, file: File): Boolean {\n            return try {\n                val pureBase64 = base64String?.substringAfter(\",\")\n                val decodedBytes = Base64.decode(pureBase64, Base64.DEFAULT)\n                FileOutputStream(file).use { fos ->\n                    fos.write(decodedBytes)\n                }\n                true\n            } catch (e: Exception) {\n                e.printStackTrace()\n                false\n            }\n        }\n    }\n}\n\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/src/main/java/ai/nexa/transform/VlmContentTransfer.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport android.content.Context\nimport com.nexa.sdk.bean.VlmContent\nimport java.io.File\n\nclass VlmContentTransfer(context: Context, val content: VlmContent) {\n\n    private var filesDir: File = File(context.filesDir, \"nexa_vlm_files\")\n\n    init {\n        if (!filesDir.exists()) {\n            filesDir.mkdirs()\n        }\n    }\n    suspend fun forBase64(): VlmContent? {\n        val imageFile = File(filesDir, \"${System.currentTimeMillis()}.jpg\")\n        val result = ImageUtils.saveBase64ToFile(content.text, imageFile)\n        if (result) {\n            return VlmContent(content.type, imageFile.absolutePath)\n        }\n        return null\n    }\n\n    suspend fun forUrl(): VlmContent? {\n        val imageFile = File(filesDir, \"${System.currentTimeMillis()}.jpg\")\n        val result = DownloadUtils.downloadImage(content.text, imageFile)\n        if (result) {\n            return VlmContent(content.type, imageFile.absolutePath)\n        }\n        return null\n    }\n}\n"
  },
  {
    "path": "cookbook/android/RAG-LLM/transform/src/test/java/ai/nexa/transform/ExampleUnitTest.kt",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage ai.nexa.transform\n\nimport org.junit.Test\n\nimport org.junit.Assert.*\n\n/**\n * Example local unit test, which will execute on the development machine (host).\n *\n * See [testing documentation](http://d.android.com/tools/testing).\n */\nclass ExampleUnitTest {\n    @Test\n    fun addition_isCorrect() {\n        assertEquals(4, 2 + 2)\n    }\n}"
  },
  {
    "path": "cookbook/clawd/README.md",
    "content": "# Clawdbot + Nexa SDK Examples\n\nPractical examples of integrating Nexa SDK with Clawdbot.\n\n## Prerequisites\n- Node.js ≥ 22\n- [Nexa SDK installed](../../README.md#installation)\n- Clawdbot installed: `npm install -g clawdbot@latest`\n\n## Quick Start\n\nConfigure Clawdbot to use Nexa SDK's OpenAI-compatible API.\n\n1. Run nexa serve in separate terminal.\n```bash\nnexa pull NexaAI/Qwen3-4B-GGUF\nnexa serve\n```\n\n2. Configure Clawdbot by copying the example configuration:\n```bash\ncp clawdbot.example.json ~/.clawdbot/clawdbot.json\n```\n\n3. Start Clawdbot gateway:\n```bash\nclawdbot gateway\n```\n\n4. Test the integration:\n   - Open browser control UI: http://127.0.0.1:18789/\n   - Or send a test message via CLI (requires channel setup):\n   ```bash\n   clawdbot message send --target <your-phone-number> --message \"Hello from Nexa SDK\"\n   ```\n\n## Testing\n\nOnce the gateway is running, you can test the integration:\n\n1. **Browser Control UI** (Recommended for testing):\n   - Open http://127.0.0.1:18789/ in your browser\n   - This web interface allows you to chat directly without configuring channels\n   - Simply type a message and the bot will respond using Nexa SDK\n\n2. **Check Model Status**:\n   ```bash\n   clawdbot models status\n   ```\n\n3. **Configure Channels** (Optional, for WhatsApp/Telegram/etc.):\n   ```bash\n   # Configure a channel (e.g., WhatsApp)\n   clawdbot channels login\n   \n   # Then you can send messages via CLI\n   clawdbot message send --target <phone-number> --message \"Hello\"\n   ```\n\n**Note**: \n- The Browser Control UI is the easiest way to test without channel setup\n- Make sure Nexa server is running (`nexa serve`) before testing, as Clawdbot will call the Nexa API when processing messages\n- For production use, configure channels (WhatsApp, Telegram, etc.) using `clawdbot channels login`\n\n## Configuration\n\nThe example configuration (`clawdbot.example.json`) shows how to configure a custom provider using `models.providers` to connect to Nexa SDK's OpenAI-compatible API endpoint at `http://localhost:18181/v1`.\n\n**Important Notes:**\n- The model `id` must match the exact model name returned by Nexa server (including quantization info, e.g., `NexaAI/Qwen3-4B-GGUF:Q4_0`)\n- The model reference format is `provider/model-id` (e.g., `nexa/NexaAI/Qwen3-4B-GGUF:Q4_0`)\n- Check available models with `nexa list` or `curl http://localhost:18181/v1/models`\n- If you use a different model or quantization, update both the `id` in `models.providers.nexa.models[].id` and the `primary` in `agents.defaults.model.primary`\n"
  },
  {
    "path": "cookbook/clawd/clawdbot.example.json",
    "content": "{\n  \"gateway\": {\n    \"mode\": \"local\"\n  },\n  \"agents\": {\n    \"defaults\": {\n      \"model\": {\n        \"primary\": \"nexa/NexaAI/Qwen3-4B-GGUF:Q4_0\"\n      }\n    }\n  },\n  \"models\": {\n    \"mode\": \"merge\",\n    \"providers\": {\n      \"nexa\": {\n        \"baseUrl\": \"http://localhost:18181/v1\",\n        \"apiKey\": \"not-needed\",\n        \"api\": \"openai-completions\",\n        \"models\": [\n          {\n            \"id\": \"NexaAI/Qwen3-4B-GGUF:Q4_0\",\n            \"name\": \"Qwen3-4B-GGUF\",\n            \"reasoning\": false,\n            \"input\": [\"text\"],\n            \"cost\": {\n              \"input\": 0,\n              \"output\": 0,\n              \"cacheRead\": 0,\n              \"cacheWrite\": 0\n            },\n            \"contextWindow\": 200000,\n            \"maxTokens\": 8192\n          }\n        ]\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "cookbook/crewai/README.md",
    "content": "# CrewAI + Nexa SDK Examples\n\nPractical examples of integrating Nexa SDK with CrewAI.\n\n\n## Prerequisites\n- Python 3.8+\n- [Nexa SDK installed](../../README.md#installation)\n\n## Quick Start\n\nSimple agent creation and task execution with Nexa SDK.\n1. Run nexa serve in separate terminal.\n```bash\nnexa pull NexaAI/Qwen3-4B-GGUF\nnexa serve\n```\n2. Install dependencies.\n```\npip install -r requirements.txt\n```\n3. Run the example script.\n\n```bash\npython example.py\n```\n"
  },
  {
    "path": "cookbook/crewai/example.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nBasic agent example with Nexa SDK and CrewAI.\n\nDemonstrates:\n- Creating a simple agent\n- Defining tasks\n- Executing a crew\n\"\"\"\n\nfrom crewai import Agent, Task, Crew, LLM\n\n\ndef create_llm():\n    \"\"\"Create LLM instance from config.\"\"\"\n    return LLM(\n        model=\"huggingface/NexaAI/Qwen3-4B-GGUF\",\n        base_url=\"http://localhost:18181/v1\",\n    )\n\n\ndef basic_agent_example():\n    \"\"\"Example of a basic agent with simple task.\"\"\"\n    print(\"=\" * 50)\n    print(\"Basic Agent Example\")\n    print(\"=\" * 50)\n\n    # Initialize LLM with Nexa SDK\n    llm = create_llm()\n\n    # Create agent\n    agent = Agent(\n        role=\"Python Developer\",\n        goal=\"Write clean and efficient Python code\",\n        backstory=\"Expert Python developer with 10 years of experience\",\n        llm=llm,\n    )\n\n    # Create task\n    task = Task(\n        description=\"Write a Python function to calculate the sum of a list\",\n        expected_output=\"Working Python function with docstring and examples\",\n        agent=agent,\n    )\n\n    # Create and execute crew\n    crew = Crew(agents=[agent], tasks=[task])\n\n    print(\"\\nExecuting crew...\")\n    result = crew.kickoff()\n    print(f\"\\nResult:\\n{result}\")\n\n\ndef writer_example():\n    \"\"\"Example of a writer agent.\"\"\"\n    print(\"\\n\" + \"=\" * 50)\n    print(\"Writer Agent Example\")\n    print(\"=\" * 50)\n\n    llm = create_llm()\n\n    writer = Agent(\n        role=\"Technical Writer\",\n        goal=\"Write clear and concise technical documentation\",\n        backstory=\"Professional technical writer with expertise in API documentation\",\n        llm=llm,\n    )\n\n    task = Task(\n        description=\"Write documentation for a REST API endpoint\",\n        expected_output=\"Complete API documentation with examples\",\n        agent=writer,\n    )\n\n    crew = Crew(\n        agents=[writer],\n        tasks=[task],\n    )\n\n    print(\"\\nExecuting crew...\")\n    result = crew.kickoff()\n    print(f\"\\nResult:\\n{result}\")\n\n\ndef main():\n    \"\"\"Run all agent examples.\"\"\"\n    print(\"\\n\" + \"=\" * 50)\n    print(\"CrewAI + Nexa SDK Basic Agent Examples\")\n    print(\"=\" * 50 + \"\\n\")\n\n    basic_agent_example()\n\n    print(\"\\n\" + \"=\" * 50)\n    print(\"All examples completed!\")\n    print(\"=\" * 50)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/crewai/requirements.txt",
    "content": "crewai>=0.1.0\n"
  },
  {
    "path": "cookbook/docker/RAG-VLM/Dockerfile",
    "content": "# Dockerfile for AutoNeural Video Inference Demo\n# Based on nexa4ai/nexasdk:latest\n\nFROM nexa4ai/nexasdk:latest\n\nLABEL org.opencontainers.image.title=\"AutoNeural Video Inference Demo\"\nLABEL org.opencontainers.image.description=\"Gradio UI for AutoNeural video analysis using Nexa SDK\"\n\n# Install Python 3 and pip if not already present\nRUN DEBIAN_FRONTEND=noninteractive \\\n    apt-get update \\\n    && apt-get install -y python3 python3-pip python3-venv \\\n    && rm -rf /var/lib/apt/lists/*\n\n# Set working directory\nWORKDIR /app\n\n# Copy application files\nCOPY requirements.txt .\nCOPY gradio_ui.py .\nCOPY start.sh .\n\n# Install Python dependencies\nRUN pip3 install --no-cache-dir -r requirements.txt\n\n# Make start script executable\nRUN chmod +x start.sh\n\n# Expose ports\nEXPOSE 18181 7860\n\n# Use start script as entrypoint\nENTRYPOINT [\"/app/start.sh\"]\n\n"
  },
  {
    "path": "cookbook/docker/RAG-VLM/README.md",
    "content": "# AutoNeural Video Inference Demo\n\nThis demo showcases video analysis using AutoNeural model through Nexa SDK. It extracts frames from uploaded videos at 8-second intervals and performs real-time AI inference using the AutoNeural vision-language model.\n\n## Features\n\n- **Video Upload**: Upload video files for analysis\n- **Frame Extraction**: Automatically extracts frames at 8-second intervals\n- **Real-time Inference**: Processes frames sequentially and displays results in real-time\n- **Interactive UI**: Left panel shows current frame, right panel shows accumulated inference results\n- **Docker Support**: Complete Docker setup with nexa serve and Gradio UI\n\n## Architecture\n\n```\n┌─────────────────┐\n│  Gradio UI      │  (Port 7860)\n│  - Video upload │\n│  - Frame extract│\n│  - Real-time    │\n│    display      │\n└────────┬────────┘\n         │ HTTP API\n         ▼\n┌─────────────────┐\n│  Nexa Serve     │  (Port 18181)\n│  AutoNeural     │\n│  /v1/chat/      │\n│  completions    │\n└─────────────────┘\n```\n\n## Prerequisites\n\n- Docker installed\n- AutoNeural model downloaded\n\n## Quick Start\n\n### Build Docker Image\n\n```bash\ncd cookbook/docker/RAG-VLM\ndocker build -t autoneural-video-demo .\n```\n\n### Run Docker Container\n\n1. Set your Nexa license token\n\nMac or Linux\n```\nexport NEXA_TOKEN={your_token_here}\n```\n\nWindows (Powershell)\n```\n$env:NEXA_TOKEN={your_token_here}\n```\n\n2. Run the docker container\n```bash\n\n\ndocker run -d \\\n  --name autoneural-demo \\\n  --privileged \\\n  -p 18182:18181 \\\n  -p 7860:7860 \\\n  -e NEXA_TOKEN \\\n  -v ~/.cache/nexa.ai:/root/.cache/nexa.ai \\\n  autoneural-video-demo\n```\n\n**Note**:\n\n- Replace `~/.cache/nexa.ai` with your local model cache directory, or omit the `-v` flag to use container's internal cache.\n- Ensure you have the AutoNeural model downloaded: `nexa pull NexaAI/AutoNeural`\n\n### Access the UI\n\nOpen your browser and navigate to:\n\n```\nhttp://localhost:7860\n```\n\n## Usage\n\n1. **Upload Video**: Click on the video upload area and select a video file\n2. **Configure Settings** (optional):\n   - Model name: Default is `NexaAI/AutoNeural`\n   - Endpoint: Default is `http://127.0.0.1:18181`\n   - Prompt: Customize the analysis prompt (default: \"Describe what you see in this image in detail.\")\n3. **Start Processing**: Click \"Start Processing\" button\n4. **View Results**:\n   - Left panel shows the current frame being processed\n   - Right panel shows accumulated inference results for all processed frames\n5. **Stop Processing**: Click \"Stop\" button to interrupt processing\n\n## Local Development (Without Docker)\n\n### Prerequisites\n\n- Python 3.10+\n- Nexa SDK installed and `nexa` command available\n- Python dependencies installed\n- AutoNeural model downloaded: `nexa pull NexaAI/AutoNeural`\n\n### Setup\n\n1. Install dependencies:\n\n```bash\npip install -r requirements.txt\n```\n\n2. Start nexa serve in a separate terminal:\n\n```bash\nnexa serve --host 127.0.0.1:18181\n```\n\n3. Run Gradio UI:\n\n```bash\npython gradio_ui.py\n```\n\n4. Access the UI at `http://localhost:7860`\n\n## Configuration\n\n### Frame Extraction\n\n- **Frame Interval**: 8 seconds (configurable in `gradio_ui.py` via `FRAME_INTERVAL_SECONDS`)\n- **Clip Length**: 8 seconds (configurable via `CLIP_LENGTH_SECONDS`)\n\n### Model Settings\n\n- **Default Model**: `NexaAI/AutoNeural`\n- **Default Endpoint**: `http://127.0.0.1:18181`\n\nThese can be changed in the UI's \"Model Settings\" accordion.\n\n## Troubleshooting\n\n### nexa serve not starting\n\n- Check if port 18181 is already in use\n- Verify Docker container has proper permissions\n- Check container logs: `docker logs autoneural-demo`\n\n### Model not found\n\n- Ensure AutoNeural model is downloaded: `nexa pull NexaAI/AutoNeural`\n- Check model cache volume mount in Docker run command\n- Verify model cache directory permissions\n\n### Video processing errors\n\n- Ensure video file format is supported (MP4, AVI, MOV, etc.)\n- Check video file is not corrupted\n- Verify sufficient disk space for temporary frame files\n\n### API connection errors\n\n- Verify nexa serve is running and accessible\n- Check endpoint URL in UI settings\n- Ensure firewall allows connections on port 18181\n\n## License\n\nCopyright 2024-2025 Nexa AI, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n"
  },
  {
    "path": "cookbook/docker/RAG-VLM/gradio_ui.py",
    "content": "# Copyright 2024-2025 Nexa AI, Inc.\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\nimport os\nimport base64\nimport io\nimport json\nimport logging\nimport sys\nimport threading\nimport time\nfrom typing import Optional, Generator, Tuple, Dict\n\nimport gradio as gr\nimport requests\nimport numpy as np\nfrom PIL import Image\nimport imageio\n\n# Configuration\nDEFAULT_MODEL = \"NexaAI/AutoNeural\"\nDEFAULT_ENDPOINT = \"http://127.0.0.1:18181\"\nDEFAULT_FRAME_INTERVAL = 8  # Extract frame every 8 seconds\n\n\n# Configure logging\ndef setup_logging(log_level: str = \"INFO\", log_file: Optional[str] = None):\n    \"\"\"\n    Setup logging configuration.\n\n    Args:\n        log_level: Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)\n        log_file: Optional log file path. If None, logs only to console.\n    \"\"\"\n    level = getattr(logging, log_level.upper(), logging.INFO)\n\n    # Create formatter\n    formatter = logging.Formatter(\n        fmt=\"%(asctime)s - %(name)s - %(levelname)s - %(message)s\",\n        datefmt=\"%Y-%m-%d %H:%M:%S\",\n    )\n\n    # Configure root logger\n    logger = logging.getLogger()\n    logger.setLevel(level)\n\n    # Remove existing handlers\n    logger.handlers.clear()\n\n    # Console handler\n    console_handler = logging.StreamHandler(sys.stdout)\n    console_handler.setLevel(level)\n    console_handler.setFormatter(formatter)\n    logger.addHandler(console_handler)\n\n    # File handler (if specified)\n    if log_file:\n        file_handler = logging.FileHandler(log_file, encoding=\"utf-8\")\n        file_handler.setLevel(level)\n        file_handler.setFormatter(formatter)\n        logger.addHandler(file_handler)\n\n    return logger\n\n\n# Initialize logger\nlogger = logging.getLogger(__name__)\n\n# Setup logging on module import\nsetup_logging(log_level=\"DEBUG\")\n\n\ndef image_array_to_base64(image_array: np.ndarray) -> str:\n    \"\"\"Convert numpy image array to base64 data URI (in-memory, no disk I/O).\"\"\"\n    # Convert to PIL Image\n    if image_array.dtype != np.uint8:\n        image_array = (\n            (image_array * 255).astype(np.uint8)\n            if image_array.max() <= 1.0\n            else image_array.astype(np.uint8)\n        )\n\n    pil_image = Image.fromarray(image_array)\n\n    # Save to bytes buffer\n    buffer = io.BytesIO()\n    pil_image.save(buffer, format=\"JPEG\", quality=95)\n    image_bytes = buffer.getvalue()\n\n    # Encode to base64\n    base64_data = base64.b64encode(image_bytes).decode(\"utf-8\")\n    return f\"data:image/jpeg;base64,{base64_data}\"\n\n\ndef call_nexa_chat_stream(\n    session: requests.Session, model: str, messages: list, endpoint: str, ngl: int\n) -> Generator[\n    Tuple[Optional[str], Optional[float], Optional[Dict[str, float | int]]], None, None\n]:\n    \"\"\"\n    Call Nexa /v1/chat/completions endpoint (streaming).\n\n    Args:\n        session: Requests session for connection reuse\n        model: Model name\n        messages: List of chat messages\n        endpoint: Base URL for API endpoint\n\n    Yields:\n        Tuple of (text_chunk, ttft, stats) where:\n        - text_chunk: Text chunk as it arrives (None for final stats-only event)\n        - ttft: Time to first token in seconds (only on first chunk with content, None otherwise)\n        - stats: Optional dict containing completion_tokens, decode_time, decode_speed\n    \"\"\"\n    url = f\"{endpoint.rstrip('/')}/v1/chat/completions\"\n    payload = {\n        \"model\": model,\n        \"messages\": messages,\n        \"stream\": True,\n        \"max_tokens\": 512,\n        \"enable_think\": False,\n        \"stream_options\": {\"include_usage\": True},\n        \"ngl\": int(ngl),\n    }\n\n    try:\n        logger.debug(f\"Calling streaming API: {url} with model: {model}\")\n        request_start_time = time.time()\n        first_token_time = None\n        last_token_time = None\n        completion_tokens = None\n        decode_time = None\n        decode_speed = None\n\n        with session.post(url, json=payload, stream=True, timeout=300) as resp:\n            resp.raise_for_status()\n\n            for line in resp.iter_lines(decode_unicode=True):\n                if not line:\n                    continue\n\n                if line.startswith(\"data:\"):\n                    chunk = line[len(\"data:\") :].strip()\n                    if chunk == \"[DONE]\":\n                        break\n\n                    try:\n                        obj = json.loads(chunk)\n                        if usage := obj.get(\"usage\"):\n                            completion_tokens = usage.get(\"completion_tokens\")\n\n                        choices = obj.get(\"choices\", [])\n                        if choices:\n                            delta = choices[0].get(\"delta\") or {}\n                            piece = delta.get(\"content\", \"\")\n                            if piece:\n                                # Calculate TTFT on first token\n                                if first_token_time is None:\n                                    first_token_time = time.time()\n                                    ttft = first_token_time - request_start_time\n                                    last_token_time = first_token_time\n                                    yield piece, ttft, None\n                                else:\n                                    last_token_time = time.time()\n                                    yield piece, None, None\n                    except json.JSONDecodeError:\n                        continue\n                    except Exception as e:\n                        logger.warning(f\"Error parsing stream chunk: {e}\")\n                        continue\n\n            if first_token_time is not None and last_token_time is not None:\n                decode_time = max(last_token_time - first_token_time, 0.0)\n                if completion_tokens is not None and decode_time > 0:\n                    decode_speed = completion_tokens / decode_time\n\n            # Emit a final stats event so callers can render usage metrics\n            if (\n                completion_tokens is not None\n                or decode_time is not None\n                or decode_speed is not None\n            ):\n                yield (\n                    None,\n                    None,\n                    {\n                        \"completion_tokens\": completion_tokens,\n                        \"decode_time\": decode_time,\n                        \"decode_speed\": decode_speed,\n                    },\n                )\n            logger.debug(\"Streaming API call completed\")\n    except requests.exceptions.RequestException as e:\n        logger.error(f\"Streaming API request failed: {e}\")\n        yield f\"Error: {str(e)}\", None, None\n    except Exception as e:\n        logger.exception(f\"Unexpected error in streaming API call: {e}\")\n        yield f\"Error: {str(e)}\", None, None\n\n\ndef extract_first_frame(video_path: str) -> Optional[np.ndarray]:\n    \"\"\"Extract the first frame from video.\"\"\"\n    logger.info(f\"Extracting first frame from: {video_path}\")\n    try:\n        with imageio.get_reader(video_path) as reader:\n            frame = reader.get_data(0)  # type: ignore\n            result = frame if isinstance(frame, np.ndarray) else np.array(frame)\n            logger.debug(f\"Successfully extracted first frame, shape: {result.shape}\")\n            return result\n    except Exception as e:\n        logger.error(\n            f\"Error extracting first frame from {video_path}: {e}\", exc_info=True\n        )\n        return None\n\n\ndef extract_frames_from_video(\n    video_path: str, interval_seconds: float = DEFAULT_FRAME_INTERVAL\n) -> list:\n    \"\"\"Extract frames from video at fixed intervals (optimized: direct frame access).\"\"\"\n    logger.info(\n        f\"Extracting frames from video: {video_path}, interval: {interval_seconds}s\"\n    )\n    try:\n        reader = imageio.get_reader(video_path)\n        metadata = reader.get_meta_data()  # type: ignore\n        fps = metadata.get(\"fps\", 30.0)\n        logger.debug(f\"Video metadata - FPS: {fps}\")\n\n        if fps <= 0:\n            logger.warning(f\"Invalid FPS: {fps}, cannot extract frames\")\n            reader.close()\n            return []\n\n        # Calculate target frame indices directly (skip unnecessary frames)\n        frame_interval = int(fps * interval_seconds)\n        if frame_interval <= 0:\n            frame_interval = 1\n\n        # Get total frame count - required for direct frame access\n        total_frames = reader.count_frames()  # type: ignore\n        logger.debug(f\"Total frames: {total_frames}, frame interval: {frame_interval}\")\n\n        if total_frames <= 0:\n            logger.warning(f\"Invalid total frames: {total_frames}\")\n            reader.close()\n            return []\n\n        # Directly access target frames - skips all intermediate frames\n        frames = []\n        frame_indices = list(range(0, total_frames, frame_interval))\n        logger.info(f\"Extracting {len(frame_indices)} frames at intervals\")\n\n        for frame_idx in frame_indices:\n            try:\n                frame = reader.get_data(frame_idx)  # type: ignore\n                timestamp = frame_idx / fps\n                frame_array = (\n                    frame if isinstance(frame, np.ndarray) else np.array(frame)\n                )\n                frames.append((frame_array, timestamp))\n            except (IndexError, Exception) as e:\n                logger.warning(f\"Reached end of video at frame {frame_idx}: {e}\")\n                break\n\n        reader.close()\n        logger.info(f\"Successfully extracted {len(frames)} frames\")\n        return frames\n    except Exception as e:\n        logger.error(f\"Error reading video {video_path}: {e}\", exc_info=True)\n        return []\n\n\ndef process_video_stream(\n    video_file: Optional[str],\n    model: str,\n    endpoint: str,\n    prompt: str,\n    stop_event: threading.Event,\n    interval_seconds: float = DEFAULT_FRAME_INTERVAL,\n    ngl: int = 999,\n) -> Generator[Tuple[Optional[np.ndarray], str], None, None]:\n    \"\"\"Process video frames sequentially and call API for inference.\"\"\"\n    logger.info(\n        f\"Starting video processing: {video_file}, model: {model}, endpoint: {endpoint}\"\n    )\n\n    if not video_file or not os.path.exists(video_file):\n        error_msg = (\n            f\"Video file not found: {video_file}\"\n            if video_file\n            else \"Please upload a video file.\"\n        )\n        logger.error(error_msg)\n        yield None, error_msg\n        return\n\n    frames = extract_frames_from_video(video_file, interval_seconds)\n    if not frames:\n        error_msg = \"Failed to extract frames from video. Please check the video file.\"\n        logger.error(error_msg)\n        yield None, error_msg\n        return\n\n    logger.info(f\"Processing {len(frames)} frames\")\n\n    # Create session for connection reuse\n    session = requests.Session()\n    accumulated_results = []\n\n    try:\n        for idx, (frame_image, timestamp) in enumerate(frames, 1):\n            if stop_event.is_set():\n                logger.info(\"Processing stopped by user\")\n                yield frame_image, \"\\n\\n\".join(accumulated_results)\n                return\n\n            logger.debug(f\"Processing frame {idx}/{len(frames)} at {timestamp:.1f}s\")\n\n            # Convert frame to base64 in memory (no disk I/O)\n            image_data_uri = image_array_to_base64(frame_image)\n\n            # Build messages\n            messages = [\n                {\n                    \"role\": \"user\",\n                    \"content\": [\n                        {\"type\": \"text\", \"text\": prompt},\n                        {\"type\": \"image_url\", \"image_url\": {\"url\": image_data_uri}},\n                    ],\n                }\n            ]\n\n            # Call streaming API and accumulate text in real-time\n            result_text = \"\"\n            result_entry_prefix = f\"**Frame at {timestamp:.1f}s:**\\n\"\n            ttft_value = None\n\n            # Create a temporary entry that will be updated as stream progresses\n            current_entry = result_entry_prefix\n            accumulated_results.append(current_entry)\n\n            completion_tokens = None\n            decode_time_value = None\n            decode_speed_value = None\n\n            # Stream response and update UI in real-time\n            for chunk, ttft, stats in call_nexa_chat_stream(\n                session, model, messages, endpoint, ngl\n            ):\n                if stop_event.is_set():\n                    break\n\n                if stats:\n                    completion_tokens = stats.get(\n                        \"completion_tokens\", completion_tokens\n                    )\n                    decode_time_value = stats.get(\"decode_time\", decode_time_value)\n                    decode_speed_value = stats.get(\"decode_speed\", decode_speed_value)\n                    continue\n\n                # Capture TTFT value from first chunk\n                if ttft is not None:\n                    ttft_value = ttft\n\n                if chunk:\n                    result_text += chunk\n                # Update the last entry with accumulated text\n                accumulated_results[-1] = result_entry_prefix + result_text + \"\\n\"\n\n                # Yield updated results for real-time display\n                yield frame_image, \"\\n\\n\".join(accumulated_results)\n\n            # Final update with complete result and metrics\n            metrics_info = []\n            if ttft_value is not None:\n                metrics_info.append(f\"TTFT: {ttft_value:.3f}s\")\n            if decode_speed_value is not None:\n                metrics_info.append(f\"Decoding speed: {decode_speed_value:.2f} tok/s\")\n\n            metrics_suffix = f\"\\n\\n*{' | '.join(metrics_info)}*\" if metrics_info else \"\"\n\n            accumulated_results[-1] = (\n                result_entry_prefix + result_text + metrics_suffix + \"\\n\"\n            )\n            logger.debug(\n                f\"Frame {idx}/{len(frames)} processed successfully, length: {len(result_text)}, metrics: TTFT={ttft_value}, completion_tokens={completion_tokens}, decode_time={decode_time_value}, decode_speed={decode_speed_value}\"\n            )\n            yield frame_image, \"\\n\\n\".join(accumulated_results)\n\n        logger.info(f\"Video processing completed: {len(frames)} frames processed\")\n\n    finally:\n        session.close()\n        logger.debug(\"HTTP session closed\")\n\n\n# Global state for stop event\nstop_processing = threading.Event()\n\n\n# UI\nCUSTOM_CSS = \"\"\"\n/* Make cards cleaner and add subtle shadows */\n.gradio-container { max-width: 1600px !important; }\n.rounded-card { border-radius: 16px; box-shadow: 0 1px 8px rgba(0,0,0,.06); background: white; }\n.pad { padding: 14px; }\n.section-title { font-weight: 700; font-size: 14px; opacity: .8; margin-bottom: 8px; }\n#info-panel .gallery { background: #101114; } /* darker bg for images */\n\"\"\"\n\nwith gr.Blocks(title=\"AutoNeural Video Inference\") as demo:\n    gr.Markdown(\"## AutoNeural Video Inference\")\n\n    with gr.Row():\n        # Left column: settings / video upload\n        with gr.Column(scale=1, elem_classes=[\"rounded-card\", \"pad\"]):\n            gr.Markdown(\"**Video & Settings**\")\n\n            video_input = gr.Video(label=\"Upload Video\")\n\n            with gr.Accordion(\"Model Settings\", open=False):\n                model_name = gr.Textbox(\n                    label=\"Model Name\",\n                    value=DEFAULT_MODEL,\n                    info=\"AutoNeural model name\",\n                )\n                endpoint_url = gr.Textbox(\n                    label=\"Endpoint URL\",\n                    value=f\"{DEFAULT_ENDPOINT}/v1/chat/completions\",\n                    info=\"Nexa serve endpoint URL (full path)\",\n                )\n                frame_interval = gr.Slider(\n                    1,\n                    30,\n                    value=DEFAULT_FRAME_INTERVAL,\n                    step=1,\n                    label=\"Frame Interval (seconds)\",\n                    info=\"Extract frame every N seconds\",\n                )\n                ngl_input = gr.Slider(\n                    0,\n                    999,\n                    value=999,\n                    step=1,\n                    label=\"NGL (GPU Layers)\",\n                    info=\"Number of GPU layers to offload\",\n                )\n                prompt_input = gr.Textbox(\n                    label=\"Prompt\",\n                    value=\"Describe what you see in this image in few sentences.\",\n                    placeholder=\"Enter your prompt for image analysis...\",\n                    lines=3,\n                )\n\n            with gr.Row():\n                btn_start = gr.Button(\"Start Processing\", variant=\"primary\")\n                btn_stop = gr.Button(\"Stop Processing\", variant=\"stop\")\n\n            status = gr.Textbox(label=\"Status\", value=\"\", interactive=False)\n\n        # Middle column: video display\n        with gr.Column(scale=2, elem_classes=[\"rounded-card\", \"pad\"]):\n            gr.Markdown(\"**Current Frame**\")\n            current_frame = gr.Image(\n                label=\"Current Frame\", type=\"numpy\", height=600, show_label=False\n            )\n\n        # Right column: information panel (results)\n        with gr.Column(scale=2):\n            with gr.Accordion(\"Inference Results\", open=True):\n                results_text = gr.Markdown(\n                    value=\"Results will appear here as frames are processed...\",\n                    label=\"Results\",\n                )\n\n    # Event handlers\n    def on_video_upload(video):\n        \"\"\"Handle video upload - extract and display first frame.\"\"\"\n        logger.info(f\"Video upload event: {video}\")\n        if not video or not os.path.exists(video):\n            error_msg = (\n                f\"Video file not found: {video}\"\n                if video\n                else \"Please upload a video file.\"\n            )\n            logger.warning(error_msg)\n            return None, error_msg\n\n        first_frame = extract_first_frame(video)\n        if first_frame is not None:\n            logger.info(\"Video uploaded successfully\")\n            return first_frame, \"Video uploaded successfully. Ready to process.\"\n        logger.error(\"Failed to extract first frame from video\")\n        return None, \"Failed to extract first frame from video.\"\n\n    def normalize_endpoint(endpoint_url: str) -> str:\n        \"\"\"Normalize endpoint URL to base URL.\"\"\"\n        if not endpoint_url:\n            return DEFAULT_ENDPOINT\n        endpoint = endpoint_url.rstrip(\"/\")\n        if endpoint.endswith(\"/v1/chat/completions\"):\n            endpoint = endpoint[:-20]\n        return endpoint.rstrip(\"/\")\n\n    def process_wrapper(video, model, endpoint, prompt, interval, ngl):\n        \"\"\"Wrapper to handle processing with UI updates.\"\"\"\n        logger.info(\n            f\"Processing started - video: {video}, model: {model}, interval: {interval}s, ngl: {ngl}\"\n        )\n        if not video:\n            logger.warning(\"No video file provided\")\n            yield (\n                None,\n                \"Please upload a video file first.\",\n                \"Please upload a video file first.\",\n            )\n            return\n\n        stop_processing.clear()\n        base_endpoint = normalize_endpoint(endpoint)\n        logger.debug(f\"Normalized endpoint: {base_endpoint}\")\n        results_accumulated = \"\"\n        frame_img = None\n\n        try:\n            for frame_img, results in process_video_stream(\n                video, model, base_endpoint, prompt, stop_processing, interval, int(ngl)\n            ):\n                if stop_processing.is_set():\n                    logger.info(\"Processing stopped by user in wrapper\")\n                    yield frame_img, results, \"Processing stopped by user.\"\n                    return\n                results_accumulated = results\n                frame_count = results_accumulated.count(\"**Frame at\")\n                yield (\n                    frame_img,\n                    results_accumulated,\n                    f\"Processing... {frame_count} frame(s) processed.\",\n                )\n\n            frame_count = results_accumulated.count(\"**Frame at\")\n            logger.info(f\"Processing completed successfully: {frame_count} frames\")\n            yield (\n                frame_img,\n                results_accumulated,\n                f\"Processing completed! Total: {frame_count} frame(s).\",\n            )\n        except Exception as e:\n            logger.exception(f\"Error in process_wrapper: {e}\")\n            yield frame_img, results_accumulated, f\"Error: {str(e)}\"\n\n    def stop_wrapper():\n        \"\"\"Stop processing and update UI.\"\"\"\n        logger.info(\"Stop processing requested\")\n        stop_processing.set()\n        return None, \"Processing stopped by user.\", \"Processing stopped.\"\n\n    btn_start.click(\n        fn=process_wrapper,\n        inputs=[\n            video_input,\n            model_name,\n            endpoint_url,\n            prompt_input,\n            frame_interval,\n            ngl_input,\n        ],\n        outputs=[current_frame, results_text, status],\n    )\n\n    btn_stop.click(\n        fn=stop_wrapper, inputs=[], outputs=[current_frame, results_text, status]\n    )\n\n    # Handle video upload - automatically display first frame\n    video_input.change(\n        fn=on_video_upload, inputs=[video_input], outputs=[current_frame, status]\n    )\n\nif __name__ == \"__main__\":\n    logger.info(\"Starting Gradio application\")\n    logger.info(\"Server: 0.0.0.0:7860\")\n    logger.info(f\"Default model: {DEFAULT_MODEL}\")\n    logger.info(f\"Default endpoint: {DEFAULT_ENDPOINT}\")\n    demo.launch(server_name=\"0.0.0.0\", server_port=7860)\n"
  },
  {
    "path": "cookbook/docker/RAG-VLM/requirements.txt",
    "content": "gradio>=4.0.0\nimageio>=2.31.0\nimageio-ffmpeg>=0.4.9\nrequests>=2.31.0\nnumpy>=1.24.0\nPillow>=10.0.0\n\n"
  },
  {
    "path": "cookbook/docker/RAG-VLM/start.sh",
    "content": "#!/bin/bash\n\n# Start script for AutoNeural Video Inference Demo\n# Starts nexa serve in background and Gradio UI in foreground\n\nset -e\n\necho \"Starting AutoNeural Video Inference Demo...\"\n\n# Start nexa serve in background\necho \"Starting nexa serve...\"\nnexa serve --host 0.0.0.0:18181 &\nNEXA_PID=$!\n\n# Wait for nexa serve to be ready\necho \"Waiting for nexa serve to be ready...\"\nMAX_WAIT=60\nWAIT_COUNT=0\nwhile [ $WAIT_COUNT -lt $MAX_WAIT ]; do\n    if curl -s http://127.0.0.1:18181/ > /dev/null 2>&1; then\n        echo \"nexa serve is ready!\"\n        break\n    fi\n    sleep 1\n    WAIT_COUNT=$((WAIT_COUNT + 1))\ndone\n\nif [ $WAIT_COUNT -ge $MAX_WAIT ]; then\n    echo \"Warning: nexa serve may not be ready, but continuing...\"\nfi\n\n# Function to cleanup on exit\ncleanup() {\n    echo \"Shutting down...\"\n    kill $NEXA_PID 2>/dev/null || true\n    wait $NEXA_PID 2>/dev/null || true\n    exit 0\n}\n\ntrap cleanup SIGTERM SIGINT\n\n# Start Gradio UI in foreground\necho \"Starting Gradio UI...\"\ncd /app\npython3 gradio_ui.py\n\n# Cleanup on exit\ncleanup\n\n"
  },
  {
    "path": "cookbook/edsl/README.md",
    "content": "# EDSL + Nexa SDK Examples\n\nPractical examples of running EDSL surveys with Nexa SDK (OpenAI-compatible API).\n\n\n## Prerequisites\n- Python 3.8+\n- [Nexa SDK installed](../../README.md#installation)\n\n## Quick Start\n\n1. Run nexa serve in a separate terminal.\n```bash\nnexa pull unsloth/Qwen3-4B-Instruct-2507-GGUF\nnexa serve\n```\n2. Install dependencies.\n```\npip install -r requirements.txt\n```\n3. Run the example.\n```bash\npython example.py\n```\n"
  },
  {
    "path": "cookbook/edsl/example.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\"\"\"\nBasic survey example with Nexa SDK and EDSL.\n\nDemonstrates:\n- Configuring EDSL Model for Nexa (OpenAI-compatible API)\n- Running a simple survey question\n\"\"\"\n\nimport os\nfrom edsl import QuestionMultipleChoice, Model\n\n\ndef create_model():\n    \"\"\"Create EDSL Model pointing at Nexa SDK API.\"\"\"\n    base_url = \"http://localhost:18181/v1\"\n    model_name = \"unsloth/Qwen3-4B-Instruct-2507-GGUF\"\n    os.environ[\"OPENAI_BASE_URL\"] = base_url\n    os.environ.setdefault(\"OPENAI_API_KEY\", \"not-needed\")\n    model = Model(\n        model=f\"openai/{model_name}\",\n        parameters={\"base_url\": base_url, \"api_key\": \"not-needed\"},\n    )\n    model.model = model_name\n    return model\n\n\ndef simple_survey_example():\n    \"\"\"Run a single multiple-choice question with Nexa.\"\"\"\n    print(\"=\" * 50)\n    print(\"Simple Survey Example\")\n    print(\"=\" * 50)\n\n    model = create_model()\n    q = QuestionMultipleChoice(\n        question_name=\"ai_feeling\",\n        question_text=\"How do you feel about artificial intelligence?\",\n        question_options=[\"Excited\", \"Concerned\", \"Neutral\", \"Curious\"],\n    )\n\n    print(\"\\nRunning survey...\")\n    results = q.by(model).run()\n    answer = results.select(\"ai_feeling\").first()\n    print(f\"Answer: {answer}\")\n\n\ndef main():\n    \"\"\"Run EDSL + Nexa SDK example.\"\"\"\n    print(\"\\n\" + \"=\" * 50)\n    print(\"EDSL + Nexa SDK Example\")\n    print(\"=\" * 50 + \"\\n\")\n\n    simple_survey_example()\n\n    print(\"\\n\" + \"=\" * 50)\n    print(\"Done.\")\n    print(\"=\" * 50)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/edsl/requirements.txt",
    "content": "edsl\n"
  },
  {
    "path": "cookbook/langchain/README.md",
    "content": "# LangChain Integration with Nexa SDK\n\nThis guide demonstrates how to integrate [LangChain](https://www.langchain.com/) with Nexa SDK's OpenAI-compatible API for VLM (Vision-Language Model) chat capabilities.\n\n## Overview\n\nNexa SDK provides an OpenAI-compatible REST API that allows you to use LangChain's `ChatOpenAI` class with your local VLM models. This integration enables you to leverage LangChain's powerful features (chains, agents, memory, etc.) while running models locally with Nexa SDK.\n\n## Prerequisites\n\n1. **Nexa CLI installed** - Download from [Nexa SDK Documentation](https://docs.nexa.ai)\n2. **Model downloaded** - The example uses `NexaAI/Qwen3-VL-4B-Instruct-GGUF`\n3. **Python 3.8+** with pip\n\n## Setup\n\n### 1. Install Nexa CLI\n\nFollow the installation instructions in the [main README](../../README.md) to install Nexa CLI for your platform.\n\n### 2. Download the Model\n\n```bash\nnexa pull NexaAI/Qwen3-VL-4B-Instruct-GGUF\n```\n\n### 3. Start Nexa Server\n\nStart the Nexa server with the OpenAI-compatible API:\n\n```bash\nnexa serve\n```\n\nThe server will be available at `http://localhost:18181/v1` (note the `/v1` suffix).\n\n### 4. Install Python Dependencies\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n### Basic Configuration\n\nLangChain's `ChatOpenAI` class can be configured to use Nexa SDK's API by setting the `base_url` parameter:\n\n```python\nfrom langchain_openai import ChatOpenAI\n\nllm = ChatOpenAI(\n    model=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\",\n    base_url=\"http://localhost:18181/v1\",\n    api_key=\"not-needed\",  # Nexa SDK doesn't require authentication\n    temperature=0.7,\n    max_tokens=512,\n)\n```\n\n### Key Configuration Parameters\n\n- **`base_url`**: `\"http://localhost:18181/v1\"` - Nexa SDK's OpenAI-compatible API endpoint\n- **`api_key`**: `\"not-needed\"` - Nexa SDK doesn't require authentication\n- **`model`**: `\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\"` - The model identifier (must match the model name used with `nexa pull`)\n\n### Example: Simple Chat\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.messages import HumanMessage\n\nllm = ChatOpenAI(\n    model=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\",\n    base_url=\"http://localhost:18181/v1\",\n    api_key=\"not-needed\",\n)\n\nmessages = [HumanMessage(content=\"What is artificial intelligence?\")]\nresponse = llm.invoke(messages)\nprint(response.content)\n```\n\n### Example: With System Prompt\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.messages import HumanMessage, SystemMessage\n\nllm = ChatOpenAI(\n    model=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\",\n    base_url=\"http://localhost:18181/v1\",\n    api_key=\"not-needed\",\n)\n\nmessages = [\n    SystemMessage(content=\"You are a helpful AI assistant.\"),\n    HumanMessage(content=\"Explain quantum computing in simple terms.\")\n]\nresponse = llm.invoke(messages)\nprint(response.content)\n```\n\n### Example: Multi-turn Conversation\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.messages import HumanMessage\n\nllm = ChatOpenAI(\n    model=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\",\n    base_url=\"http://localhost:18181/v1\",\n    api_key=\"not-needed\",\n)\n\nconversation = [\n    HumanMessage(content=\"My name is Alice.\")\n]\nresponse = llm.invoke(conversation)\nprint(response.content)\n\n# Continue conversation\nconversation.append(response)\nconversation.append(HumanMessage(content=\"What's my name?\"))\nresponse = llm.invoke(conversation)\nprint(response.content)\n```\n\n## Running the Demo\n\nRun the included example script:\n\n```bash\npython example.py\n```\n\nThe demo showcases:\n1. Simple text chat\n2. Chat with system prompt\n3. Multi-turn conversation\n\n## Integration with LangChain Features\n\nOnce configured, you can use the `ChatOpenAI` instance with all LangChain features:\n\n- **Chains**: Build complex workflows\n- **Agents**: Create AI agents with tools\n- **Memory**: Add conversation memory\n- **Streaming**: Enable streaming responses\n- **Callbacks**: Add custom callbacks\n\n### Example: Using with LangChain Chains\n\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.prompts import ChatPromptTemplate\nfrom langchain.chains import LLMChain\n\nllm = ChatOpenAI(\n    model=\"NexaAI/Qwen3-VL-4B-Instruct-GGUF\",\n    base_url=\"http://localhost:18181/v1\",\n    api_key=\"not-needed\",\n)\n\nprompt = ChatPromptTemplate.from_messages([\n    (\"system\", \"You are a helpful assistant.\"),\n    (\"human\", \"{question}\")\n])\n\nchain = LLMChain(llm=llm, prompt=prompt)\nresult = chain.run(question=\"What is Python?\")\nprint(result)\n```\n\n## Troubleshooting\n\n### Server Connection Error\n\nIf you see connection errors, ensure:\n1. Nexa server is running: `nexa serve --host 127.0.0.1:18181`\n2. The server is accessible at `http://localhost:18181`\n3. Check the server logs for any errors\n\n### Model Not Found\n\nIf you get a \"model not found\" error:\n1. Ensure the model is downloaded: `nexa pull NexaAI/Qwen3-VL-4B-Instruct-GGUF`\n2. Verify the model name matches exactly (case-sensitive)\n3. Check available models: `nexa list`\n\n### API Compatibility Issues\n\nNexa SDK's API is compatible with OpenAI's API, but some advanced features may differ. If you encounter issues:\n1. Check the [Nexa SDK documentation](https://docs.nexa.ai)\n2. Review the API compatibility in the main README\n3. Test with the OpenAI Python client first to verify the endpoint\n\n## Additional Resources\n\n- [Nexa SDK Documentation](https://docs.nexa.ai)\n- [LangChain Documentation](https://python.langchain.com/)\n- [Nexa SDK GitHub Repository](https://github.com/NexaAI/nexa-sdk)\n\n## License\n\nThis integration example follows the same license as Nexa SDK. See the [LICENSE](../../LICENSE) file for details.\n\n"
  },
  {
    "path": "cookbook/langchain/example.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\"\"\"\nLangChain Integration Demo with Nexa SDK VLM Chat\n\nThis demo shows how to use LangChain's ChatOpenAI with Nexa SDK's OpenAI-compatible API\nfor VLM (Vision-Language Model) chat using the Qwen3-VL-4B-Instruct-GGUF model.\n\nPrerequisites:\n1. Install Nexa CLI and start the server:\n   nexa serve\n\n2. Download the model (if not already cached):\n   nexa pull NexaAI/Qwen3-VL-4B-Instruct-GGUF\n\n3. Install dependencies:\n   pip install -r requirements.txt\n\nUsage:\n    python example.py\n\"\"\"\n\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.messages import HumanMessage, SystemMessage\nimport sys\n\n\ndef main():\n    \"\"\"Main demo function demonstrating LangChain integration with Nexa SDK.\"\"\"\n\n    # Configuration for Nexa SDK OpenAI-compatible API\n    base_url = \"http://localhost:18181/v1\"\n    api_key = \"not-needed\"  # Nexa SDK doesn't require authentication\n    model_name = \"NexaAI/Qwen3-VL-4B-Instruct-GGUF\"\n\n    print(\"=\" * 60)\n    print(\"LangChain + Nexa SDK VLM Chat Demo\")\n    print(\"=\" * 60)\n    print(f\"Model: {model_name}\")\n    print(f\"API Endpoint: {base_url}\")\n    print()\n\n    # Initialize ChatOpenAI with Nexa SDK configuration\n    try:\n        llm = ChatOpenAI(\n            model=model_name,\n            base_url=base_url,\n            api_key=api_key,\n            temperature=0.7,\n            max_tokens=512,\n        )\n        print(\"✓ Successfully initialized ChatOpenAI with Nexa SDK\")\n        print()\n    except Exception as e:\n        print(f\"✗ Failed to initialize ChatOpenAI: {e}\")\n        print(\"\\nPlease ensure:\")\n        print(\"1. Nexa server is running: nexa serve\")\n        print(\"2. Model is downloaded: nexa pull NexaAI/Qwen3-VL-4B-Instruct-GGUF\")\n        sys.exit(1)\n\n    # Example 1: Simple text chat\n    print(\"-\" * 60)\n    print(\"Example 1: Simple Text Chat\")\n    print(\"-\" * 60)\n\n    try:\n        messages = [\n            HumanMessage(\n                content=\"What is artificial intelligence? Please explain in 2-3 sentences.\"\n            )\n        ]\n\n        print(\"User: What is artificial intelligence? Please explain in 2-3 sentences.\")\n        print(\"\\nAssistant: \", end=\"\", flush=True)\n\n        response = llm.invoke(messages)\n        print(response.content)\n        print()\n\n    except Exception as e:\n        print(f\"✗ Error during chat: {e}\")\n        print(\"\\nPlease check:\")\n        print(\"1. Nexa server is running and accessible\")\n        print(\"2. Model is loaded correctly\")\n        sys.exit(1)\n\n    # Example 2: Chat with system prompt\n    print(\"-\" * 60)\n    print(\"Example 2: Chat with System Prompt\")\n    print(\"-\" * 60)\n\n    try:\n        messages = [\n            SystemMessage(\n                content=\"You are a helpful AI assistant that explains complex topics in simple terms.\"\n            ),\n            HumanMessage(content=\"Explain quantum computing in simple terms.\"),\n        ]\n\n        print(\n            \"System: You are a helpful AI assistant that explains complex topics in simple terms.\"\n        )\n        print(\"User: Explain quantum computing in simple terms.\")\n        print(\"\\nAssistant: \", end=\"\", flush=True)\n\n        response = llm.invoke(messages)\n        print(response.content)\n        print()\n\n    except Exception as e:\n        print(f\"✗ Error during chat: {e}\")\n        sys.exit(1)\n\n    # Example 3: Multi-turn conversation\n    print(\"-\" * 60)\n    print(\"Example 3: Multi-turn Conversation\")\n    print(\"-\" * 60)\n\n    try:\n        conversation = [\n            HumanMessage(content=\"My name is Alice. I'm learning Python programming.\")\n        ]\n\n        print(\"User: My name is Alice. I'm learning Python programming.\")\n        print(\"\\nAssistant: \", end=\"\", flush=True)\n\n        response = llm.invoke(conversation)\n        print(response.content)\n        print()\n\n        # Continue the conversation\n        conversation.append(response)\n        conversation.append(\n            HumanMessage(content=\"Can you recommend a good beginner project?\")\n        )\n\n        print(\"User: Can you recommend a good beginner project?\")\n        print(\"\\nAssistant: \", end=\"\", flush=True)\n\n        response = llm.invoke(conversation)\n        print(response.content)\n        print()\n\n    except Exception as e:\n        print(f\"✗ Error during conversation: {e}\")\n        sys.exit(1)\n\n    print(\"=\" * 60)\n    print(\"Demo completed successfully!\")\n    print(\"=\" * 60)\n\n\nif __name__ == \"__main__\":\n    main()\n\n"
  },
  {
    "path": "cookbook/langchain/requirements.txt",
    "content": "langchain>=0.3.1\nlangchain-openai\nopenai\n\n"
  },
  {
    "path": "cookbook/llama-index/README.md",
    "content": "# LlamaIndex + Nexa SDK Examples\n\nThis folder contains practical examples of integrating Nexa SDK with LlamaIndex.\n\n\n## Setup\n\n1. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n2. Make sure Nexa SDK server is running:\n```bash\n# In another terminal\nnexa serve\n```\n\n## Examples\n\n### Streaming Example (`example.py`)\nDemonstrate streaming responses from the model.\n\n```bash\npython example.py\n```\n\n## Next Steps\n\n- Check the main documentation: [../../docs/integrate-llamaindex.md](../../docs/integrate-llamaindex.md)\n- Explore LlamaIndex documentation: https://docs.llamaindex.ai/\n- Learn about Nexa SDK: [../../docs/README.md](../../docs/README.md)\n"
  },
  {
    "path": "cookbook/llama-index/config.py",
    "content": "\"\"\"Configuration for Nexa SDK + LlamaIndex examples.\"\"\"\n\nimport os\n\nNEXA_API_BASE = os.getenv(\"NEXA_API_BASE\", \"http://localhost:18181/v1\")\nNEXA_MODEL = os.getenv(\"NEXA_MODEL\", \"NexaAI/Qwen3-0.6B-GGUF\")\nNEXA_API_KEY = os.getenv(\"NEXA_API_KEY\", \"\")\n\n# LLM Configuration\nLLM_CONFIG = {\n    \"model\": NEXA_MODEL,\n    \"api_base\": NEXA_API_BASE,\n    \"api_key\": NEXA_API_KEY,\n    \"context_window\": 8000,\n    \"is_chat_model\": True,\n    \"temperature\": 0.1,\n    \"timeout\": 60.0,\n}\n"
  },
  {
    "path": "cookbook/llama-index/example.py",
    "content": "#!/usr/bin/env python3\n\"\"\"\nStreaming example with Nexa SDK and LlamaIndex.\n\nDemonstrates:\n- Streaming text completions\n- Streaming chat responses\n- Handling streaming output in real-time\n\"\"\"\n\nfrom llama_index.llms.openai_like import OpenAILike\nfrom llama_index.core.base.llms.types import ChatMessage\nfrom config import LLM_CONFIG\n\n\ndef streaming_completion_example():\n    \"\"\"Example of streaming text completion.\"\"\"\n    print(\"=\" * 50)\n    print(\"Streaming Text Completion Example\")\n    print(\"=\" * 50)\n\n    llm = OpenAILike(**LLM_CONFIG)\n\n    prompt = \"Write a creative story about a robot learning to paint\"\n    print(f\"\\nPrompt: {prompt}\")\n    print(\"\\nStreaming response:\")\n    print(\"-\" * 50)\n\n    response_stream = llm.stream_complete(prompt)\n    full_response = \"\"\n\n    for chunk in response_stream:\n        print(chunk.delta, end=\"\", flush=True)\n        full_response += chunk.delta\n\n    print(\"\\n\" + \"-\" * 50)\n    print(f\"\\nTotal length: {len(full_response)} characters\")\n\n\ndef streaming_chat_example():\n    \"\"\"Example of streaming chat responses.\"\"\"\n    print(\"\\n\" + \"=\" * 50)\n    print(\"Streaming Chat Example\")\n    print(\"=\" * 50)\n\n    llm = OpenAILike(**LLM_CONFIG)\n\n    messages = [\n        ChatMessage(role=\"system\", content=\"You are a creative writing assistant.\"),\n        ChatMessage(role=\"user\", content=\"Tell me a short story about time travel\"),\n    ]\n\n    print(\"\\nChat messages:\")\n    for msg in messages:\n        print(f\"  {msg.role}: {msg.content}\")\n\n    print(\"\\nStreaming response:\")\n    print(\"-\" * 50)\n\n    response_stream = llm.stream_chat(messages)\n    full_response = \"\"\n\n    for chunk in response_stream:\n        print(chunk.delta, end=\"\", flush=True)\n        full_response += chunk.delta\n\n    print(\"\\n\" + \"-\" * 50)\n    print(f\"\\nTotal length: {len(full_response)} characters\")\n\n\ndef streaming_multi_turn_with_context():\n    \"\"\"Example of streaming in a multi-turn conversation.\"\"\"\n    print(\"\\n\" + \"=\" * 50)\n    print(\"Streaming Multi-turn Conversation Example\")\n    print(\"=\" * 50)\n\n    llm = OpenAILike(**LLM_CONFIG)\n\n    messages = [\n        ChatMessage(\n            role=\"system\",\n            content=\"You are a helpful assistant answering questions about space exploration.\",\n        ),\n    ]\n\n    # First turn\n    print(\"\\nUser: Tell me about the Apollo 11 mission\")\n    messages.append(\n        ChatMessage(role=\"user\", content=\"Tell me about the Apollo 11 mission\")\n    )\n\n    print(\"Assistant: \", end=\"\")\n    response_stream = llm.stream_chat(messages)\n    response_text = \"\"\n\n    for chunk in response_stream:\n        print(chunk.delta, end=\"\", flush=True)\n        response_text += chunk.delta\n\n    print(\"\\n\")\n    messages.append(ChatMessage(role=\"assistant\", content=response_text))\n\n    # Second turn\n    print(\"\\nUser: How long did the mission last?\")\n    messages.append(ChatMessage(role=\"user\", content=\"How long did the mission last?\"))\n\n    print(\"Assistant: \", end=\"\")\n    response_stream = llm.stream_chat(messages)\n    response_text = \"\"\n\n    for chunk in response_stream:\n        print(chunk.delta, end=\"\", flush=True)\n        response_text += chunk.delta\n\n    print(\"\\n\")\n\n\ndef main():\n    \"\"\"Run all streaming examples.\"\"\"\n    print(\"\\n\" + \"=\" * 50)\n    print(\"Nexa SDK + LlamaIndex Streaming Examples\")\n    print(\"=\" * 50)\n\n    streaming_completion_example()\n    streaming_chat_example()\n    streaming_multi_turn_with_context()\n\n    print(\"\\n\" + \"=\" * 50)\n    print(\"All streaming examples completed!\")\n    print(\"=\" * 50)\n\n\nif __name__ == \"__main__\":\n    main()\n"
  },
  {
    "path": "cookbook/llama-index/requirements.txt",
    "content": "llama-index-core>=0.10.0\nllama-index-llms-openai-like>=0.1.0\nllama-index-embeddings-huggingface>=0.1.0\npython-dotenv>=1.0.0\n"
  },
  {
    "path": "docs/README.md",
    "content": "# Nexa-SDK Guides\n\n## Integration Guides\nQuick links to integrate Nexa Serve with popular tools:\n\n- [OpenWebUI](./integrate-openwebui.md): Web chat interface backed by Nexa Serve\n- [LangChain](./integrate-langchain.md): Use Nexa models via the OpenAI-compatible endpoint\n- [LlamaIndex](./integrate-llamaindex.md): Connect Nexa Serve with LlamaIndex for data indexing and retrieval\n- [CrewAI](./integrate-crewai.md): Multi-agent framework using Nexa Serve as LLM backend\n"
  },
  {
    "path": "docs/integrate-ag2.md",
    "content": "# AG2 + Nexa SDK — Minimal Integration\r\n\r\nUse Nexa SDK's OpenAI-compatible server with AG2 (formerly AutoGen).\r\n\r\n## Quick Start\r\n\r\n1) Start Nexa server\r\n```bash\r\nnexa pull NexaAI/Qwen3-4B-GGUF\r\nnexa serve\r\n```\r\n\r\n2) Install dependencies\r\n```bash\r\npip install \"ag2[openai]\"\r\n```\r\n\r\n3) Run the example\r\n```bash\r\npython cookbook/ag2/example.py\r\n```\r\n\r\n## Minimal AG2 Setup\r\n\r\n```python\r\nfrom autogen import ConversableAgent, LLMConfig\r\n\r\n# Point AG2 to Nexa's OpenAI-compatible endpoint\r\nllm_config = LLMConfig({\r\n    \"model\": \"NexaAI/Qwen3-4B-GGUF\",\r\n    \"base_url\": \"http://localhost:18181/v1\",\r\n    \"api_type\": \"openai\",\r\n    \"api_key\": \"not-needed\",\r\n})\r\n\r\nagent = ConversableAgent(\r\n    name=\"helpful_agent\",\r\n    system_message=\"You are a helpful AI assistant.\",\r\n    llm_config=llm_config,\r\n)\r\n\r\nresponse = agent.run(\r\n    message=\"Write a Python function to calculate the sum of a list.\",\r\n    max_turns=3,\r\n)\r\nresponse.process()\r\nprint(response.messages)\r\n```\r\n\r\n## Two-Agent Conversation\r\n\r\n```python\r\nfrom autogen import ConversableAgent, LLMConfig\r\n\r\nllm_config = LLMConfig({\r\n    \"model\": \"NexaAI/Qwen3-4B-GGUF\",\r\n    \"base_url\": \"http://localhost:18181/v1\",\r\n    \"api_type\": \"openai\",\r\n    \"api_key\": \"not-needed\",\r\n})\r\n\r\ncoder = ConversableAgent(\r\n    name=\"coder\",\r\n    system_message=\"You are a Python developer. Reply TERMINATE when done.\",\r\n    llm_config=llm_config,\r\n)\r\n\r\nreviewer = ConversableAgent(\r\n    name=\"reviewer\",\r\n    system_message=\"You are a code reviewer. Reply TERMINATE when done.\",\r\n    llm_config=llm_config,\r\n)\r\n\r\nresult = coder.initiate_chat(\r\n    recipient=reviewer,\r\n    message=\"Write a function to check if a string is a palindrome.\",\r\n    max_turns=3,\r\n)\r\nprint(result.summary)\r\n```\r\n\r\nNotes:\r\n- Ensure the Nexa server is running at http://localhost:18181/v1.\r\n- The model string should match what you pulled with `nexa pull`.\r\n- AG2 requires Python 3.10+.\r\n\r\n## More Examples\r\n- Full runnable sample: [cookbook/ag2/example.py](../cookbook/ag2/example.py)\r\n- AG2 docs: https://docs.ag2.ai\r\n"
  },
  {
    "path": "docs/integrate-crewai.md",
    "content": "# CrewAI + Nexa SDK — Minimal Integration\n\nUse Nexa SDK’s OpenAI-compatible server with CrewAI.\n\n## Quick Start\n\n1) Start Nexa server\n```bash\nnexa pull NexaAI/Qwen3-4B-GGUF\nnexa serve\n```\n\n2) Install dependencies\n```bash\npip install crewai\n```\n\n3) Run the example\n```bash\npython cookbook/crewai/example.py\n```\n\n## Minimal CrewAI Setup\n\n```python\nfrom crewai import Agent, Task, Crew, LLM\n\n# Point CrewAI to Nexa's OpenAI-compatible endpoint\nllm = LLM(\n    model=\"huggingface/NexaAI/Qwen3-4B-GGUF\",\n    base_url=\"http://localhost:18181/v1\",\n)\n\nagent = Agent(\n    role=\"Python Developer\",\n    goal=\"Write clean and efficient Python code\",\n    backstory=\"Expert Python developer\",\n    llm=llm,\n)\n\ntask = Task(\n    description=\"Write a Python function to calculate the sum of a list\",\n    expected_output=\"A working function with docstring\",\n    agent=agent,\n)\n\ncrew = Crew(agents=[agent], tasks=[task])\nresult = crew.kickoff()\nprint(result)\n```\n\nNotes:\n- Ensure the Nexa server is running at http://localhost:18181/v1.\n- The model string should match what you pulled with `nexa pull`.\n"
  },
  {
    "path": "docs/integrate-langchain.md",
    "content": "# LangChain Integration Guide\n\nQuickly connect LangChain to Nexa Serve (OpenAI-compatible endpoint).\n\n## Prerequisites\n- Python 3.10+\n- Nexa SDK installed: see [Installation Guide](../README.md)\n- Model downloaded, e.g. `nexa pull Qwen/Qwen3-7B-Instruct-GGUF`\n- Nexa Serve running: `nexa serve` (default `http://127.0.0.1:18181/v1`)\n\n## Install\n```bash\npip install langchain langchain-openai openai\n```\n\n## Quick Start\n```python\nfrom langchain_openai import ChatOpenAI\n\nllm = ChatOpenAI(\n    base_url=\"http://127.0.0.1:18181/v1\",\n    api_key=\"not-needed\",\n    model=\"Qwen/Qwen3-7B-Instruct-GGUF\"\n)\n\nprint(llm.invoke(\"Hello from Nexa!\").content)\n```\n\n## Common Recipes\n\n### Simple chat (with system prompt)\n```python\nfrom langchain_openai import ChatOpenAI\nfrom langchain_core.messages import SystemMessage, HumanMessage\n\nllm = ChatOpenAI(base_url=\"http://127.0.0.1:18181/v1\", api_key=\"not-needed\", model=\"Qwen/Qwen3-7B-Instruct-GGUF\")\n\nmessages = [\n    SystemMessage(content=\"You are a helpful assistant.\"),\n    HumanMessage(content=\"Explain decorators in Python\")\n]\n\nprint(llm.invoke(messages).content)\n```\n## More Examples\n- Full runnable sample: [cookbook/langchain/example.py](../../cookbook/langchain/example.py)\n- LangChain docs: https://python.langchain.com\n"
  },
  {
    "path": "docs/integrate-llamaindex.md",
    "content": "# LlamaIndex Integration Guide\n\nQuickly use Nexa SDK with LlamaIndex using OpenAI-compatible endpoint.\n\n## Installation\n\n```bash\npip install llama-index-core llama-index-llms-openai-like\n```\n\n## Basic Setup\n\n```python\nfrom llama_index.llms.openai_like import OpenAILike\n\nllm = OpenAILike(\n    model=\"your-model\",\n    api_base=\"http://localhost:18181/v1\",  # Nexa SDK endpoint\n    api_key=\"fake\",\n    context_window=8000,\n    is_chat_model=True,\n)\n\n# Text completion\nresponse = llm.complete(\"What is AI?\")\nprint(response)\n\n# Chat\nfrom llama_index.core.base.llms.types import ChatMessage\n\nmessages = [\n    ChatMessage(role=\"system\", content=\"You are helpful.\"),\n    ChatMessage(role=\"user\", content=\"What is AI?\"),\n]\nchat_response = llm.chat(messages)\nprint(chat_response)\n```\n\n## Streaming\n\n```python\n# Stream completion\nresponse_stream = llm.stream_complete(\"Tell me a story\")\nfor chunk in response_stream:\n    print(chunk.delta, end=\"\")\n```\n\n## Key Methods\n\n| Method | Description |\n|--------|-------------|\n| `complete(prompt)` | Text completion |\n| `stream_complete(prompt)` | Streaming completion |\n| `acomplete(prompt)` | Async completion |\n| `chat(messages)` | Chat with messages |\n| `achat(messages)` | Async chat |\n\n## Next Steps\n\n- See cookbook examples: [../../cookbook/llama-index/](../../cookbook/llama-index/)\n- [LlamaIndex documentation](https://docs.llamaindex.ai/)\n- [Nexa SDK README](README.md)"
  },
  {
    "path": "docs/integrate-openwebui.md",
    "content": "# OpenWebUI Integration Guide\n\nThis guide shows how to integrate Nexa-SDK with [OpenWebUI](https://openwebui.com/) for a web-based chat interface with locally running models.\n\n## Overview\n\nOpenWebUI is a modern, feature-rich web interface for interacting with language models. By integrating it with Nexa-SDK, you get:\n\n- **Web-based chat interface** - Access models through any browser\n- **Model management** - Switch between different models seamlessly\n- **Local execution** - All models run locally on your machine\n- **OpenAI API compatibility** - Works with any OpenAI-compatible API\n\n## Prerequisites\n\nBefore starting, ensure you have:\n\n- **Nexa-SDK installed** - Follow [Nexa-SDK installation guide](../README.md)\n- **OpenWebUI installed** - See [OpenWebUI Installation Guide](https://docs.openwebui.com/getting-started/quick-start)\n\n## Step 1: Start Nexa Serve\n\nFirst, download the model you want to use:\n\n```bash\nnexa pull Qwen/Qwen3-VL-8B-Instruct-GGUF\n```\n\nThen start the Nexa Serve API server:\n\n```bash\nnexa serve\n```\n\nThe server will start and listen on `http://127.0.0.1:18181`. You should see output like:\n\n```\n[INFO] Nexa Serve running on http://127.0.0.1:18181\n[INFO] OpenAI-compatible API at http://127.0.0.1:18181/v1\n```\n\n## Step 2: Install OpenWebUI\nFollow the [OpenWebUI Installation Guide](https://docs.openwebui.com/getting-started/quick-start) to set up OpenWebUI on your machine.\n\n## Step 3: Configure OpenWebUI\n\n1. Start OpenWebUI, open your browser and navigate to your OpenWebUI instance, typically at:\n   ```\n   http://localhost:8080\n   ```\n\n2. **Sign up and login**:\n   - Click the sign-up button\n   - Create an account with your email and password\n   - Login with your credentials\n\n3. **Navigate to Settings**:\n   - Click the **Profile icon** in the top right corner\n   - Select **Admin Panel** from the dropdown menu\n   - Click **Settings** in the top navigation bar\n\n4. **Configure Nexa-SDK Connection**:\n   - In the left sidebar, click **Connections**\n   - Scroll to the **OpenAI API** section\n   - Click **+ Create** or **Add New Connection**\n\n5. **Fill in Connection Details**:\n   - **API URL**: `http://127.0.0.1:18181/v1`\n   - **API Base**: `http://localhost:8080`\n   - **API Key**: `any-key` (Nexa Serve doesn't require authentication)\n\n6. **Add Model ID**:\n   - In the **Model ID** field, enter the model you downloaded, for example:\n     ```\n     Qwen/Qwen3-VL-8B-Instruct-GGUF\n     ```\n   - Click **Save** to add the connection\n\n## Step 4: Start Chatting\n\n1. **Go back to the Chat interface** (click the OpenWebUI logo or close settings)\n2. **Select the Nexa model** from the model dropdown at the top\n3. **Start typing** your prompts and press Enter\n4. **Enjoy local AI** without any data leaving your machine!\n\n## Troubleshooting\n\n### Connection Error: \"Failed to connect to API\"\n\n**Problem**: OpenWebUI cannot reach Nexa Serve\n\n**Solutions**:\n- Ensure Nexa Serve is running: `nexa serve`\n- Check the API URL is correct: `http://127.0.0.1:18181/v1`\n- Check firewall settings - port 18181 should be accessible\n\n### Model Not Found\n\n**Problem**: The model ID is not recognized\n\n**Solutions**:\n- Download the model first: `nexa pull Qwen/Qwen3-VL-8B-Instruct-GGUF`\n- Verify the model is downloaded: `nexa list`\n- Use the exact model ID from the `nexa list` output\n"
  },
  {
    "path": "pyproject.toml",
    "content": "[tool.basedpyright]\nreportImplicitRelativeImport = false\nreportUnusedCallResult = false\nreportAny = false\nreportExplicitAny = false\n\n[tool.ruff]\nline-length = 120\n\n[tool.ruff.format]\nquote-style = \"single\"\n"
  },
  {
    "path": "runner/.gitignore",
    "content": "*.png\n*.jpg\n\nbuild\n\n# for tests, please keep ordered\n!tests/**\n__pycache__/\nbench-*/\n"
  },
  {
    "path": "runner/Makefile",
    "content": "BRIDGE_VERSION ?= v1.0.45-rc1\n\nifeq ($(OS), Windows_NT)\n\tOS      := windows\n\tARCH    ?= $(shell powershell -NoProfile -NonInteractive \"switch ((Get-CimInstance Win32_Processor).Architecture) { 0 {'x86'} 5 {'arm'} 9 {'x86_64'} 12 {'arm64'} Default {'unknown'} }\")\n\tEXE     := .exe\n\tRM      := powershell -NoProfile -NonInteractive \"Remove-Item -Recurse -Force -ErrorAction SilentlyContinue -Path\"\n\tMKDIR   := powershell -NoProfile -NonInteractive \"New-Item -ItemType Directory -Force -Path\"\n\tMKLINK  := powershell -NoProfile -NonInteractive \"New-Item -ItemType Junction -Path 'build' -Target '..\\..\\nexasdk-bridge\\build\\out'\"\n\tUNZIP   := powershell -NoProfile -NonInteractive -Command \"Expand-Archive -Path build/nexasdk-bridge.zip -DestinationPath build -Force\"\nelse\n\tOS      := $(shell echo $(shell uname -s) | tr '[:upper:]' '[:lower:]')\n\tifeq ($(OS), darwin)\n\t\tOS := macos\n\tendif\n\tARCH    := $(shell uname -m)\n\tifeq ($(ARCH), aarch64)\n\t\tARCH := arm64\n\tendif\n\tEXE     :=\n\tRM      := rm -rf\n\tMKDIR   := mkdir -p\n\tMKLINK  := ln -s ../../nexasdk-bridge/build/out build\n\tUNZIP   := unzip -o build/nexasdk-bridge.zip -d build\nendif\n\nDOCKER_TAG ?= latest\nBASE_IMAGE ?= ubuntu:22.04\nDOCKER_ARCH := $(ARCH)\nifeq ($(DOCKER_ARCH), x86_64)\n\tDOCKER_ARCH := amd64\nendif\n\n.PHONY: build link download clean docker docker-cuda\n\nbuild:\n\tgo build -ldflags \"-s -w\" -o build/nexa$(EXE) ./cmd/nexa-launcher\n\tgo build -tags=\"sonic avx\" -ldflags \"-X 'main.Version=$(VERSION)' -s -w\" -o build/nexa-cli$(EXE) ./cmd/nexa-cli\n\nlink: clean\n\t$(MKLINK)\n\ndownload: clean\n\t@echo \"====> Download runtime\"\n\t@echo \"OS: $(OS)\"\n\t@echo \"ARCH: $(ARCH)\"\n\t@echo \"BRIDGE_VERSION: $(BRIDGE_VERSION)\"\n\t$(MKDIR) build\n\tcurl -L -o build/nexasdk-bridge.zip \\\n\t\thttps://nexa-model-hub-bucket.s3.us-west-1.amazonaws.com/public/nexasdk/$(BRIDGE_VERSION)/$(OS)_$(ARCH)/nexasdk-bridge.zip\n\t$(UNZIP)\n\t$(RM) build/nexasdk-bridge.zip\n\t$(RM) build/nexa_bridge.lib\n\ndocker: build\n\t$(MKDIR) release/linux/nexa_sdk.$(DOCKER_ARCH)\n\tcp -r build/* release/linux/nexa_sdk.$(DOCKER_ARCH)/\n\tchmod +x release/linux/nexa_sdk.$(DOCKER_ARCH)/nexa\n\tchmod +x release/linux/nexa_sdk.$(DOCKER_ARCH)/nexa-cli\n\tdocker build \\\n\t\t--build-arg BASE_IMAGE=$(BASE_IMAGE) \\\n\t\t--build-arg TARGETARCH=$(DOCKER_ARCH) \\\n\t\t-t nexa4ai/nexasdk:$(DOCKER_TAG) \\\n\t\t-f release/linux/Dockerfile \\\n\t\trelease/linux\n\ndocker-cuda:\n\t$(MAKE) docker BASE_IMAGE=nvidia/cuda:12.9.1-runtime-ubuntu22.04 DOCKER_TAG=$(DOCKER_TAG)-cuda\n\nclean:\n\t-$(RM) build\n\t-$(RM) release/linux/nexa_sdk.*\n"
  },
  {
    "path": "runner/README.md",
    "content": "## Build\n\n### Setup Environment\n\n#### Windows (x64)\n\nSetup MSYS2\n\n- `winget install --id=MSYS2.MSYS2 -e`\n- add `C:\\msys64\\usr\\bin` and `C:\\msys64\\mingw64\\bin` to your PATH\n- `pacman -Syu`\n- `pacman -S make mingw-w64-x86_64-gcc`\n- restart terminal\n\nSetup GO Env\n\n```powershell\ngo env -w CGO_ENABLED=1\n```\n\n#### Windows (arm64)\n\nSetup MSYS2\n\n```powershell\nwinget install --id=MSYS2.MSYS2 -e\n```\n\nAdd MSYS2 bins to PATH (run in PowerShell):\n\n```powershell\n[Environment]::SetEnvironmentVariable(\n    \"PATH\",\n    $env:PATH + \";C:\\msys64\\usr\\bin;C:\\msys64\\clangarm64\\bin\",\n    \"User\"\n)\n# Close and reopen PowerShell for the change to take effect\n```\n\nOpen an MSYS2 shell and run:\n\n```bash\npacman -Syu\npacman -S make mingw-w64-clang-aarch64-clang\n```\n\nSetup GO Env\n\n```powershell\ngo env -w CGO_ENABLED=1\ngo env -w CC=clang.exe\ngo env -w CXX=clang++.exe\n```\n\n#### MacOS / Linux\n\ninstall `make`, `gcc` or `clang` via your package manager.\n\nSetup GO Env\n\n```bash\ngo env -w CGO_ENABLED=1\n```\n\n### Install `nexasdk-bridge`\n\nThere are two ways to install the bridge library:\n\n1. From S3 bucket\n\n```bash\nmake download\n```\n\n2. From local files\n\n```bash\nmake link\n```\n\n---\n\n### Build Project\n\nOnce the prerequisites and bridge library are installed, build the project:\n\n```bash\nmake build\n```\n\n---\n\n### Run Project\n\nEnable debug log\n\n```\n$env:NEXA_LOG=\"debug\" # powershell\n\nexport NEXA_LOG=\"debug\" # bash\n```\n\nPull model without interactive\n\n```bash\nnexa pull <model>[:<quant>] --model-type <model-type>\n```\n\nPull model from model hub\n\n```bash\nnexa pull <model>\nnexa pull <model> --model-hub s3 # pull from specify model hub, [volces|modelscope|s3|hf]\n```\n\nImport model from local filesystem\n\n```bash\n# hf download <model> --local-dir /path/to/modeldir\nnexa pull <model> --model-hub localfs --local-path /path/to/modeldir\n```\n\n---\n\n### Test Project\n\n```\npip install psutil\n\npython tests/run.py\n```\n"
  },
  {
    "path": "runner/README_zh.md",
    "content": "## 构建\n\n### 环境设置\n\n#### Windows (x64)\n\n安装 MSYS2\n\n- `winget install --id=MSYS2.MSYS2 -e`\n- 将 `C:\\msys64\\usr\\bin` 和 `C:\\msys64\\mingw64\\bin` 添加到你的 PATH 中\n- `pacman -Syu`\n- `pacman -S make mingw-w64-x86_64-gcc`\n- 重启终端\n\n配置 GO 环境\n\n```powershell\ngo env -w CGO_ENABLED=1\n```\n\n#### Windows (arm64)\n\n安装 MSYS2\n\n```powershell\nwinget install --id=MSYS2.MSYS2 -e\n```\n\n在 PowerShell 中添加 MSYS2 的 bin 目录到 PATH：\n\n```powershell\n[Environment]::SetEnvironmentVariable(\n    \"PATH\",\n    $env:PATH + \";C:\\msys64\\usr\\bin;C:\\msys64\\clangarm64\\bin\",\n    \"User\"\n)\n# 关闭并重新打开 PowerShell 以使更改生效\n```\n\n打开 MSYS2 shell 并运行：\n\n```bash\npacman -Syu\npacman -S make mingw-w64-clang-aarch64-clang\n```\n\n配置 GO 环境\n\n```powershell\ngo env -w CGO_ENABLED=1\ngo env -w CC=clang.exe\ngo env -w CXX=clang++.exe\n```\n\n#### MacOS / Linux\n\n通过你的包管理器安装 `make`、`gcc` 或 `clang`。\n\n配置 GO 环境\n\n```bash\ngo env -w CGO_ENABLED=1\n```\n\n### 安装 `nexasdk-bridge`\n\n有两种方式安装 bridge 库：\n\n1. 从 S3 bucket 下载\n\n```bash\nmake download\n```\n\n2. 从本地文件安装\n\n```bash\nmake link\n```\n\n---\n\n### 构建项目\n\n完成依赖安装和 bridge 库安装后，构建项目：\n\n```bash\nmake build\n```\n\n---\n\n### 运行项目\n\n开启 debug 日志\n\n```\n$env:NEXA_LOG=\"debug\" # powershell\n\nexport NEXA_LOG=\"debug\" # bash\n```\n\n拉取模型（非交互模式）\n\n```bash\nnexa pull <model>[:<quant>] --model-type <model-type>\n```\n\n从 model hub 拉取模型\n\n```bash\nnexa pull <model>\nnexa pull <model> --model-hub s3 # 指定 model hub，[volces|modelscope|s3|hf]\n```\n\n从本地文件系统导入模型\n\n```bash\n# hf download <model> --local-dir /path/to/modeldir\nnexa pull <model> --model-hub localfs --local-path /path/to/modeldir\n```\n\n---\n\n### 项目测试\n\n```\npip install psutil\n\npython tests/run.py\n```\n"
  },
  {
    "path": "runner/cmd/nexa-cli/common/log.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage common\n\nimport (\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\n\t\"github.com/lmittmann/tint\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nconst (\n\tLogLevelNone  string = \"none\"\n\tLogLevelTrace string = \"trace\"\n\tLogLevelDebug string = \"debug\"\n\tLogLevelInfo  string = \"info\"\n\tLogLevelWarn  string = \"warn\"\n\tLogLevelError string = \"error\"\n)\n\nfunc ApplyLogLevel() {\n\toptions := tint.Options{AddSource: true}\n\n\tif os.Getenv(\"NO_COLOR\") == \"1\" {\n\t\toptions.NoColor = true\n\t}\n\n\tswitch config.GetLog() {\n\tcase LogLevelNone:\n\t\tslog.SetDefault(slog.New(slog.NewTextHandler(io.Discard, nil)))\n\t\treturn\n\tcase LogLevelTrace:\n\t\tnexa_sdk.EnableBridgeLog(true)\n\t\toptions.Level = slog.LevelDebug\n\tcase LogLevelDebug:\n\t\toptions.Level = slog.LevelDebug\n\tcase LogLevelInfo:\n\t\toptions.Level = slog.LevelInfo\n\tcase LogLevelWarn:\n\t\toptions.Level = slog.LevelWarn\n\tcase LogLevelError:\n\t\toptions.Level = slog.LevelError\n\t}\n\n\tslog.SetDefault(slog.New(tint.NewHandler(os.Stderr, &options)))\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/common/process.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage common\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"os/signal\"\n\t\"path\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/bytedance/sonic\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nvar (\n\tErrNoAudio = errors.New(\"no audio file provided\")\n\tErrNoImage = errors.New(\"no image file provided\")\n)\n\ntype Processor struct {\n\tParseFile bool\n\tHideThink bool\n\n\tVerbose  bool\n\tTestMode bool\n\n\tGetPrompt func() (string, error)\n\tRun       func(prompt string, images, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error)\n\n\tfsm      map[[2]any][2]any\n\tfsmState int\n}\n\nfunc (p *Processor) Process() error {\n\tvar stopGen bool\n\tgo func() {\n\t\tcSignal := make(chan os.Signal, 1)\n\t\tsignal.Notify(cSignal, os.Interrupt)\n\t\tfor range cSignal {\n\t\t\tslog.Warn(\"interrupt signal received\")\n\t\t\tstopGen = true\n\t\t}\n\t}()\n\n\tfor {\n\t\tline, err := p.GetPrompt()\n\t\tslog.Debug(\"GetPrompt\", \"line\", line, \"err\", err)\n\n\t\tif err != nil {\n\t\t\tif errors.Is(err, io.EOF) {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\\n\", err))\n\t\t\treturn err\n\t\t}\n\n\t\tvar prompt string\n\t\tvar images, audios []string\n\t\tif p.ParseFile {\n\t\t\tprompt, images, audios = p.parseFiles(line)\n\t\t} else {\n\t\t\tprompt = line\n\t\t}\n\n\t\t// run async\n\t\tfirstToken := true\n\t\tspin := render.NewSpinner(\"encoding...\") // merge into fsm\n\t\tspin.Start()\n\n\t\tp.fsmInit()\n\t\tstopGen = false\n\t\toutput, profileData, err := p.Run(prompt, images, audios, func(token string) bool {\n\t\t\tif firstToken {\n\t\t\t\tspin.Stop()\n\t\t\t\tfirstToken = false\n\t\t\t}\n\n\t\t\tp.fsmEvent(token)\n\t\t\treturn !stopGen\n\t\t})\n\n\t\tslog.Debug(\"profileData\", \"profileData\", profileData)\n\t\tif p.TestMode {\n\t\t\tpd, _ := sonic.MarshalString(map[string]any{\n\t\t\t\t\"Input\":   line,\n\t\t\t\t\"Output\":  output,\n\t\t\t\t\"Profile\": profileData,\n\t\t\t\t\"Error\":   err,\n\t\t\t})\n\t\t\tfmt.Fprintln(os.Stderr, pd)\n\t\t}\n\n\t\t// reset spin when no token received\n\t\tif firstToken {\n\t\t\tspin.Stop()\n\t\t}\n\n\t\t// reset color\n\t\trender.GetTheme().Reset()\n\t\tfmt.Println()\n\t\tfmt.Println()\n\t\tp.printProfile(profileData)\n\n\t\tswitch {\n\t\tcase err == nil:\n\t\tcase errors.Is(err, ErrNoAudio):\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"No audio file provided, please provide an audio file or use /mic command\"))\n\t\t\tfmt.Println()\n\t\tcase errors.Is(err, ErrNoImage):\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"No image file provided, please provide an image file\"))\n\t\t\tfmt.Println()\n\t\tdefault:\n\t\t\treturn err\n\t\t}\n\t}\n}\n\n// file name parse\n\nvar fileRegex = regexp.MustCompile(`(?:[a-zA-Z]:)?(?:\\./|/|\\\\)[\\S\\\\ ]+?\\.(?i:jpg|jpeg|png|webp|mp3|wav)\\b`)\n\nfunc (p *Processor) parseFiles(prompt string) (string, []string, []string) {\n\tfiles := fileRegex.FindAllString(prompt, -1)\n\timages := make([]string, 0, len(files))\n\taudios := make([]string, 0, len(files))\n\n\tfor _, file := range files {\n\t\trealFile := strings.NewReplacer(\n\t\t\t\"\\\\ \", \" \",\n\t\t\t\"\\\\(\", \"(\",\n\t\t\t\"\\\\)\", \")\",\n\t\t\t\"\\\\[\", \"[\",\n\t\t\t\"\\\\]\", \"]\",\n\t\t\t\"\\\\{\", \"{\",\n\t\t\t\"\\\\}\", \"}\",\n\t\t\t\"\\\\$\", \"$\",\n\t\t\t\"\\\\&\", \"&\",\n\t\t\t\"\\\\;\", \";\",\n\t\t\t\"\\\\'\", \"'\",\n\t\t\t\"\\\\\\\\\", \"\\\\\",\n\t\t\t\"\\\\*\", \"*\",\n\t\t\t\"\\\\?\", \"?\",\n\t\t\t\"\\\\~\", \"~\",\n\t\t).Replace(file)\n\n\t\t_, err := os.Stat(realFile)\n\t\tif err != nil {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"parse file error: [%s] %s\", realFile, err))\n\t\t\tcontinue\n\t\t}\n\n\t\tswitch path.Ext(realFile) {\n\t\tcase \".mp3\", \".wav\":\n\t\t\taudios = append(audios, realFile)\n\t\t\tslog.Debug(\"add audio\", \"file\", realFile)\n\t\tdefault:\n\t\t\timages = append(images, realFile)\n\t\t\tslog.Debug(\"add image\", \"file\", realFile)\n\t\t}\n\n\t\tprompt = strings.ReplaceAll(prompt, \"'\"+realFile+\"'\", \"\")\n\t\tprompt = strings.ReplaceAll(prompt, \"'\"+file+\"'\", \"\")\n\t\tprompt = strings.ReplaceAll(prompt, file, \"\")\n\t}\n\treturn strings.TrimSpace(prompt), images, audios\n}\n\n// output parse\n\nconst (\n\tSTATE_ASSISTANT = iota // init state\n\tSTATE_THINK\n\tSTATE_NORMAL\n\n\tSTATE_START\n\tSTATE_CHANNEL\n\tSTATE_ANALYSIS\n\tSTATE_FINAL\n\tSTATE_END\n)\n\nvar thinkSpin = render.NewSpinner(\"thinking...\")\n\nfunc (p *Processor) fsmInit() {\n\tthinkStart := func(extraLine bool) func() {\n\t\treturn func() {\n\t\t\tif p.HideThink {\n\t\t\t\tthinkSpin.Start()\n\t\t\t} else {\n\t\t\t\trender.GetTheme().Set(render.GetTheme().ThinkOutput)\n\t\t\t\tif extraLine {\n\t\t\t\t\tfmt.Print(\"<think>\\n\")\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Print(\"<think>\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tthinkEnd := func(extraLine bool) func() {\n\t\treturn func() {\n\t\t\tif p.HideThink {\n\t\t\t\tthinkSpin.Stop()\n\t\t\t} else {\n\t\t\t\tif extraLine {\n\t\t\t\t\tfmt.Print(\"\\n</think>\\n\\n\")\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Print(\"</think>\")\n\t\t\t\t}\n\t\t\t\trender.GetTheme().Set(render.GetTheme().ModelOutput)\n\t\t\t}\n\t\t}\n\t}\n\tp.fsm = map[[2]any][2]any{\n\t\t// normal\n\t\t{STATE_ASSISTANT, \"<think>\"}: {STATE_THINK, thinkStart(false)},\n\t\t{STATE_THINK, \"</think>\"}:    {STATE_NORMAL, thinkEnd(false)},\n\n\t\t// gpt-oss\n\t\t{STATE_ASSISTANT, \"<|channel|>\"}: {STATE_CHANNEL, nil},\n\t\t{STATE_CHANNEL, \"analysis\"}:      {STATE_ANALYSIS, nil},\n\t\t{STATE_CHANNEL, \"final\"}:         {STATE_FINAL, nil},\n\t\t{STATE_ANALYSIS, \"<|message|>\"}:  {STATE_THINK, thinkStart(true)},\n\t\t{STATE_FINAL, \"<|message|>\"}:     {STATE_NORMAL, nil},\n\t\t{STATE_THINK, \"<|end|>\"}:         {STATE_END, thinkEnd(true)},\n\t\t{STATE_NORMAL, \"<|end|>\"}:        {STATE_END, nil},\n\t\t{STATE_END, \"<|start|>\"}:         {STATE_START, nil},\n\t\t{STATE_START, \"assistant\"}:       {STATE_ASSISTANT, nil},\n\t}\n\tp.fsmState = STATE_ASSISTANT\n}\n\nfunc (p *Processor) fsmEvent(token string) {\n\tnext, ok := p.fsm[[2]any{p.fsmState, token}]\n\tif ok {\n\t\tp.fsmState = next[0].(int)\n\t\tif next[1] != nil {\n\t\t\tnext[1].(func())()\n\t\t}\n\t\treturn\n\t}\n\n\tif !(p.HideThink && p.fsmState == STATE_THINK) {\n\t\tfmt.Print(token)\n\t}\n}\n\n// print profile data\n\nfunc (p *Processor) printProfile(pd nexa_sdk.ProfileData) {\n\tvar text string\n\n\tif p.Verbose {\n\t\ttext = fmt.Sprintf(\n\t\t\tstrings.TrimSpace(`\ntotal time:     %fs\nttft:           %fs\nprompt time:    %fs\nprompt tokens:  %d token(s)\nprompt speed:   %f tok/s\ndecode time:    %fs\ndecode tokens:  %d token(s)\ndecode speed:   %f tok/s\nstop reason:    %s\n\t\t\t`),\n\t\t\tfloat64(pd.TotalTimeUs())/1e6,\n\t\t\tfloat64(pd.TTFT)/1e6,\n\t\t\tfloat64(pd.PromptTime)/1e6,\n\t\t\tpd.PromptTokens,\n\t\t\tpd.PrefillSpeed,\n\t\t\tfloat64(pd.DecodeTime)/1e6,\n\t\t\tpd.GeneratedTokens,\n\t\t\tpd.DecodingSpeed,\n\t\t\tpd.StopReason,\n\t\t)\n\n\t} else {\n\t\tif pd.AudioDuration > 0 { // ASR TTS\n\t\t\ttext = fmt.Sprintf(\"processing_time %.2fs  |  audio_duration %.2fs  |  RTF %.2f (%.1fx realtime)\",\n\t\t\t\tfloat64(pd.TotalTimeUs())/1e6,\n\t\t\t\tfloat64(pd.AudioDuration)/1e6,\n\t\t\t\tpd.RealTimeFactor,\n\t\t\t\t1.0/pd.RealTimeFactor)\n\n\t\t} else if pd.DecodingSpeed != 0 {\n\t\t\ttext = fmt.Sprintf(\"— %.1f tok/s • %d tok • %.1f s first token —\",\n\t\t\t\tpd.DecodingSpeed,\n\t\t\t\tpd.GeneratedTokens,\n\t\t\t\tfloat64(pd.TTFT)/1e6)\n\n\t\t} else {\n\t\t\tif pd.TotalTimeUs() != 0 {\n\t\t\t\ttext = fmt.Sprintf(\"- %.1f s -\",\n\t\t\t\t\tfloat64(pd.TotalTimeUs())/1e6,\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\t}\n\tif text == \"\" {\n\t\treturn\n\t}\n\n\tfmt.Println(render.GetTheme().Profile.Sprint(text))\n\tfmt.Println()\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/common/repl.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage common\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/readline\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nvar help = [][2]string{\n\t{\"/?, /h, /help\", \"Show this help message\"},\n\t{\"/exit\", \"Exit the REPL\"},\n\t{\"/clear\", \"Clear the screen and conversation history\"},\n\t{\"/load <filename>\", \"Load conversation history from a file\"},\n\t{\"/save <filename>\", \"Save conversation history to a file\"},\n\t{\"/mic\", \"Record audio for transcription\"},\n}\n\ntype Repl struct {\n\tReset       func() error\n\tSaveKVCache func(path string) error\n\tLoadKVCache func(path string) error\n\n\tRecord          func() (*string, error)\n\tRecordImmediate bool\n\n\tinit bool\n\trl   *readline.Readline\n}\n\n// ========= repl tool ========\n\nfunc (r *Repl) GetPrompt() (string, error) {\n\tif !r.init {\n\t\t// fill default functions\n\t\tnotSupport := fmt.Errorf(\"NotSupport\")\n\t\tif r.Reset == nil {\n\t\t\tr.Reset = func() error { return nil }\n\t\t}\n\t\tif r.SaveKVCache == nil {\n\t\t\tr.SaveKVCache = func(path string) error { return notSupport }\n\t\t}\n\t\tif r.LoadKVCache == nil {\n\t\t\tr.LoadKVCache = func(path string) error { return notSupport }\n\t\t}\n\t\tif r.Record == nil {\n\t\t\tr.Record = func() (*string, error) { return nil, nexa_sdk.ErrCommonNotSupport }\n\t\t}\n\n\t\t// init readline\n\t\tconfig := &readline.Config{\n\t\t\tPrompt:      render.GetTheme().Prompt.Sprint(\"> \"),\n\t\t\tAltPrompt:   render.GetTheme().Prompt.Sprint(\". \"),\n\t\t\tHistoryFile: filepath.Join(store.Get().DataPath(), \"history\"),\n\t\t}\n\t\trl, err := readline.New(config)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tr.rl = rl\n\n\t\tr.init = true\n\t}\n\n\tvar recordAudios []string\n\n\tfor {\n\t\t// print stashed content\n\t\tif len(recordAudios) > 0 {\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Current stash audios: %s\", strings.Join(recordAudios, \", \")))\n\t\t}\n\n\t\tline, err := r.rl.Read()\n\n\t\t// check err or exit\n\t\tswitch {\n\t\tcase errors.Is(err, io.EOF):\n\t\t\tfmt.Println()\n\t\t\treturn \"\", io.EOF\n\t\tcase errors.Is(err, readline.ErrInterrupt):\n\t\t\tif line == \"\" {\n\t\t\t\tfmt.Println(\"\\nUse Ctrl + d or /exit to exit.\")\n\t\t\t\tfmt.Println()\n\t\t\t}\n\t\t\tcontinue\n\t\tcase err != nil:\n\t\t\treturn \"\", err\n\t\t}\n\n\t\t// check if it's a command\n\t\tvar fields []string\n\t\tif !strings.HasPrefix(line, \"/\") {\n\t\t\tif len(recordAudios) > 0 {\n\t\t\t\tline += \" \" + strings.Join(recordAudios, \" \")\n\t\t\t}\n\t\t\trecordAudios = nil // clear stashed audios after use\n\t\t\treturn line, nil\n\t\t}\n\t\tfields = strings.Fields(strings.TrimSpace(line))\n\t\tif strings.Contains(fields[0][1:], \"/\") || strings.Contains(fields[0], \".\") {\n\t\t\tif len(recordAudios) > 0 {\n\t\t\t\tline += \" \" + strings.Join(recordAudios, \" \")\n\t\t\t}\n\t\t\trecordAudios = nil // clear stashed audios after use\n\t\t\treturn line, nil\n\t\t}\n\n\t\tswitch fields[0] {\n\t\tcase \"/?\", \"/h\", \"/help\":\n\t\t\tfmt.Println(\"Commands:\")\n\t\t\tfor _, h := range help {\n\t\t\t\tfmt.Printf(\"  %-25s %s\\n\", h[0], h[1])\n\t\t\t}\n\t\t\tfmt.Println()\n\t\t\tcontinue\n\n\t\tcase \"/exit\":\n\t\t\treturn \"\", io.EOF\n\n\t\tcase \"/clear\":\n\t\t\tr.Reset()\n\t\t\trecordAudios = nil\n\t\t\tfmt.Print(\"\\033[H\\033[2J\")\n\t\t\tcontinue\n\n\t\tcase \"/load\":\n\t\t\tif len(fields) != 2 {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Usage: /load <filename>\"))\n\t\t\t\tfmt.Println()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tr.Reset()\n\t\t\terr := r.LoadKVCache(fields[1])\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, nexa_sdk.ErrCommonNotSupport) {\n\t\t\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Load conversation history is not supported for this model yet\"))\n\t\t\t\t\tfmt.Println()\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\t\t\tfmt.Println()\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue\n\n\t\tcase \"/save\":\n\t\t\tif len(fields) != 2 {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Usage: /save <filename>\"))\n\t\t\t\tfmt.Println()\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\terr := r.SaveKVCache(fields[1])\n\t\t\tif err != nil {\n\t\t\t\tif errors.Is(err, nexa_sdk.ErrCommonNotSupport) {\n\t\t\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Save conversation history is not supported for this model yet\"))\n\t\t\t\t\tfmt.Println()\n\t\t\t\t} else {\n\t\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\t\t\tfmt.Println()\n\t\t\t\t}\n\t\t\t}\n\t\t\tcontinue\n\n\t\tcase \"/mic\":\n\t\t\toutputFile, err := r.Record()\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\t\tfmt.Println()\n\t\t\t}\n\t\t\tif outputFile != nil {\n\t\t\t\tif r.RecordImmediate {\n\t\t\t\t\treturn *outputFile, nil\n\t\t\t\t}\n\t\t\t\trecordAudios = append(recordAudios, *outputFile)\n\t\t\t}\n\t\t\tcontinue\n\n\t\tdefault:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Unknown command: %s\", fields[0]))\n\t\t\tfmt.Println()\n\t\t\tcontinue\n\t\t}\n\t}\n}\n\nfunc (r *Repl) Close() {\n\tif r.init && r.rl != nil {\n\t\tr.rl.Close()\n\t}\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/common/util_darwin.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage common\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc GetTerminalWidth() int {\n\tfd := int(unix.Stdout)\n\tws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)\n\tif err != nil {\n\t\treturn 80\n\t}\n\treturn int(ws.Col)\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/common/util_linux.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage common\n\nimport (\n\t\"golang.org/x/sys/unix\"\n)\n\nfunc GetTerminalWidth() int {\n\tfd := int(unix.Stdout)\n\tws, err := unix.IoctlGetWinsize(fd, unix.TIOCGWINSZ)\n\tif err != nil {\n\t\treturn 80\n\t}\n\treturn int(ws.Col)\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/common/util_windows.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage common\n\nimport (\n\t\"os\"\n\n\t\"golang.org/x/sys/windows\"\n)\n\nfunc GetTerminalWidth() int {\n\thandle := windows.Handle(os.Stdout.Fd())\n\tvar info windows.ConsoleScreenBufferInfo\n\terr := windows.GetConsoleScreenBufferInfo(handle, &info)\n\tif err != nil {\n\t\treturn 80\n\t}\n\twidth := int(info.Window.Right - info.Window.Left + 1)\n\treturn width\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/config.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n)\n\nfunc _config() *cobra.Command {\n\tcmd := &cobra.Command{\n\t\tGroupID: \"management\",\n\t\tUse:     \"config\",\n\t\tShort:   \"Manage Nexa CLI configuration\",\n\t\tLong:    \"Commands to manage Nexa CLI configuration, including setting and getting configuration values.\",\n\t}\n\n\tcmd.AddCommand(\n\t\tconfigGetCmd(),\n\t\tconfigSetCmd(),\n\t\tconfigListCmd(),\n\t)\n\n\treturn cmd\n}\n\nfunc configGetCmd() *cobra.Command {\n\tlicense := &cobra.Command{\n\t\tUse: \"license\",\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\tvalue, err := store.Get().ConfigGet(\"license\")\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Failed to get configuration: %s\", err))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"%s\", value))\n\t\t},\n\t}\n\n\tgetCmd := &cobra.Command{\n\t\tUse:   \"get <key>\",\n\t\tShort: \"Get a configuration value\",\n\t\tLong:  \"Retrieve the value of a specific configuration key.\",\n\t}\n\tgetCmd.AddCommand(license)\n\treturn getCmd\n}\n\nfunc configSetCmd() *cobra.Command {\n\tlicense := &cobra.Command{\n\t\tUse:  \"license\",\n\t\tArgs: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\ts := store.Get()\n\t\t\tkey := \"license\"\n\t\t\tvalue := args[0]\n\n\t\t\tif err := s.ConfigSet(key, value); err != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Failed to set configuration: %s\", err))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t},\n\t}\n\n\tsetCmd := &cobra.Command{\n\t\tUse:   \"set <key> <value>\",\n\t\tShort: \"Set a configuration value\",\n\t\tLong:  \"Set a specific configuration key to a new value.\",\n\t}\n\tsetCmd.AddCommand(license)\n\treturn setCmd\n}\n\nfunc configListCmd() *cobra.Command {\n\treturn &cobra.Command{\n\t\tUse:   \"list\",\n\t\tShort: \"List all configuration values\",\n\t\tLong:  \"Display all configuration keys and their corresponding values.\",\n\t\tRun: func(cmd *cobra.Command, args []string) {\n\t\t\ts := store.Get()\n\n\t\t\tfor _, key := range []string{\"license\"} {\n\t\t\t\tvalue, _ := s.ConfigGet(key)\n\t\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"%s: %s\", key, value))\n\t\t\t}\n\t\t},\n\t}\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/function_call.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nvar tool []string\n\nfunc functionCall() *cobra.Command {\n\tfcCmd := &cobra.Command{\n\t\tGroupID: \"inference\",\n\t\tUse:     \"functioncall <model-name>\",\n\t\tAliases: []string{\"fc\"},\n\t\tShort:   \"Function call with a model\",\n\t\tLong:    \"Run function call with a specified model. The model must be downloaded and cached locally.\",\n\t}\n\n\tfcCmd.Args = cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs)\n\n\tfcCmd.Flags().SortFlags = false\n\tfcCmd.Flags().StringArrayVarP(&tool, \"tool\", \"t\", nil, \"[llm|vlm] add function name for function call\")\n\tfcCmd.Flags().StringArrayVarP(&prompt, \"prompt\", \"p\", nil, \"[llm|vlm] pass prompt\")\n\n\tfcCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\ts := store.Get()\n\n\t\tname, quant := normalizeModelName(args[0])\n\n\t\tmanifest, err := ensureModelAvailable(s, name, quant)\n\t\tif err != nil {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tif quant != \"\" {\n\t\t\tif fileinfo, exist := manifest.ModelFile[quant]; !exist {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: quant %s not found\", quant))\n\t\t\t\tos.Exit(1)\n\t\t\t} else if !fileinfo.Downloaded {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: quant %s not downloaded\", quant))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t} else {\n\t\t\tsq, err := selectQuant(manifest)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t\tquant = sq\n\t\t}\n\n\t\tnexa_sdk.Init()\n\t\tdefer nexa_sdk.DeInit()\n\n\t\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\n\t\tswitch manifest.ModelType {\n\t\tcase types.ModelTypeLLM:\n\t\t\terr = fcLLM(manifest.PluginId, modelfile)\n\t\tcase types.ModelTypeVLM:\n\t\t\tvar mmprojfile string\n\t\t\tif manifest.MMProjFile.Name != \"\" {\n\t\t\t\tmmprojfile = s.ModelfilePath(manifest.Name, manifest.MMProjFile.Name)\n\t\t\t}\n\t\t\tvar tokenizerfile string\n\t\t\tif manifest.TokenizerFile.Name != \"\" {\n\t\t\t\ttokenizerfile = s.ModelfilePath(manifest.Name, manifest.TokenizerFile.Name)\n\t\t\t}\n\t\t\terr = fcVLM(manifest.PluginId, modelfile, mmprojfile, tokenizerfile)\n\t\tdefault:\n\t\t\tpanic(\"not support model type\")\n\t\t}\n\n\t\tif err != nil {\n\t\t\tos.Exit(1)\n\t\t}\n\t}\n\treturn fcCmd\n}\n\nfunc checkParseTools(tools []string) (string, error) {\n\tif len(tools) == 0 {\n\t\treturn \"\", fmt.Errorf(\"no tools provided\")\n\t}\n\treturn \"[\" + strings.Join(tools, \",\") + \"]\", nil\n}\n\nfunc fcLLM(plugin, modelfile string) error {\n\ttools, err := checkParseTools(tool)\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprint(err))\n\t\treturn err\n\t}\n\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\tp, err := nexa_sdk.NewLLM(nexa_sdk.LlmCreateInput{\n\t\tModelPath: modelfile,\n\t\tPluginID:  plugin,\n\t\tConfig: nexa_sdk.ModelConfig{\n\t\t\tNCtx:       nctx,\n\t\t\tNGpuLayers: ngl,\n\t\t},\n\t})\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tmessages := make([]nexa_sdk.LlmChatMessage, len(prompt))\n\tfor i, p := range prompt {\n\t\tmessages[i] = nexa_sdk.LlmChatMessage{Role: nexa_sdk.LLMRoleUser, Content: p}\n\t}\n\ttemplateOutput, err := p.ApplyChatTemplate(nexa_sdk.LlmApplyChatTemplateInput{\n\t\tMessages:            messages,\n\t\tEnableThink:         false, // disable thinking mode for function call mode\n\t\tTools:               tools,\n\t\tAddGenerationPrompt: true,\n\t})\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"apply chat template error: %s\", err))\n\t\treturn err\n\t}\n\tres, err := p.Generate(nexa_sdk.LlmGenerateInput{\n\t\tPromptUTF8: templateOutput.FormattedText,\n\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\tMaxTokens: 2048,\n\t\t},\n\t},\n\t)\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"generate error: %s\", err))\n\t\treturn err\n\t}\n\n\tfmt.Println()\n\tfmt.Println(render.GetTheme().Success.Sprintf(\"%s\", res.FullText))\n\tfmt.Println()\n\n\treturn nil\n}\n\nfunc fcVLM(plugin, modelfile, mmprojfile, tokenizerfile string) error {\n\ttools, err := checkParseTools(tool)\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprint(err))\n\t\treturn err\n\t}\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\tp, err := nexa_sdk.NewVLM(nexa_sdk.VlmCreateInput{\n\t\tModelPath:     modelfile,\n\t\tMmprojPath:    mmprojfile,\n\t\tTokenizerPath: tokenizerfile,\n\t\tPluginID:      plugin,\n\t\tConfig: nexa_sdk.ModelConfig{\n\t\t\tNCtx:       nctx,\n\t\t\tNGpuLayers: ngl,\n\t\t},\n\t})\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tmessages := make([]nexa_sdk.VlmChatMessage, len(prompt))\n\tfor i, p := range prompt {\n\t\tmessages[i] = nexa_sdk.VlmChatMessage{Role: nexa_sdk.VlmRoleUser, Contents: []nexa_sdk.VlmContent{{Type: nexa_sdk.VlmContentTypeText, Text: p}}}\n\t}\n\ttemplateOutput, err := p.ApplyChatTemplate(nexa_sdk.VlmApplyChatTemplateInput{\n\t\tMessages:    messages,\n\t\tEnableThink: false, // disable thinking mode for function call mode\n\t\tTools:       tools,\n\t})\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"apply chat template error: %s\", err))\n\t\treturn err\n\t}\n\tres, err := p.Generate(nexa_sdk.VlmGenerateInput{\n\t\tPromptUTF8: templateOutput.FormattedText,\n\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\tMaxTokens: 2048,\n\t\t},\n\t})\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"generate error: %s\", err))\n\t\treturn err\n\t}\n\n\tfmt.Println()\n\tfmt.Println(render.GetTheme().Success.Sprintf(\"%s\", res.FullText))\n\tfmt.Println()\n\n\treturn nil\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/infer.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode\"\n\n\t\"github.com/charmbracelet/huh\"\n\t\"github.com/dustin/go-humanize\"\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/cmd/nexa-cli/common\"\n\t\"github.com/NexaAI/nexa-sdk/runner/cmd/nexa-cli/logic\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/record\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nvar (\n\t// disableStream *bool // reuse in run.go\n\tngl            int32\n\tnctx           int32\n\tmaxTokens      int32\n\tstop           []string\n\tstopFile       string\n\timageMaxLength int32\n\tenableThink    bool\n\thideThink      bool\n\tprompt         []string\n\ttokenFile      string\n\ttaskType       string\n\tquery          string\n\tdocument       []string\n\tinput          string\n\toutput         string\n\tvoice          string\n\tlistVoice      bool\n\tspeechSpeed    float64\n\tsystemPrompt   string\n\tlanguage       string\n\tlistLanguage   bool\n\n\t// sampler config\n\ttemperature       float32\n\ttopP              float32\n\ttopK              int32\n\tminP              float32\n\trepetitionPenalty float32\n\tpresencePenalty   float32\n\tfrequencyPenalty  float32\n\tseed              int32\n\tgrammarPath       string\n\tgrammarString     string\n\tenableJson        bool\n)\n\n// NOTE: flagset use same flag name will be ignored, but usage is different, so we keep them in different flagset\nvar (\n\tsamplerFlags = func() *pflag.FlagSet {\n\t\tsamplerFlags := pflag.NewFlagSet(\"LLM/VLM Sampler\", pflag.ExitOnError)\n\t\tsamplerFlags.SortFlags = false\n\t\tsamplerFlags.Float32VarP(&temperature, \"temperature\", \"\", 0.0, \"sampling temperature\")\n\t\tsamplerFlags.Float32VarP(&topP, \"top-p\", \"\", 0.0, \"top-p sampling\")\n\t\tsamplerFlags.Int32VarP(&topK, \"top-k\", \"\", 0, \"top-k sampling\")\n\t\tsamplerFlags.Float32VarP(&minP, \"min-p\", \"\", 0.0, \"min-p sampling\")\n\t\tsamplerFlags.Float32VarP(&repetitionPenalty, \"repetition-penalty\", \"\", 1.0, \"repetition penalty\")\n\t\tsamplerFlags.Float32VarP(&presencePenalty, \"presence-penalty\", \"\", 0.0, \"presence penalty\")\n\t\tsamplerFlags.Float32VarP(&frequencyPenalty, \"frequency-penalty\", \"\", 0.0, \"frequency penalty\")\n\t\tsamplerFlags.Int32VarP(&seed, \"seed\", \"\", 0, \"random seed\")\n\t\tsamplerFlags.StringVarP(&grammarPath, \"grammar-path\", \"\", \"\", \"path to grammar file\")\n\t\tsamplerFlags.StringVarP(&grammarString, \"grammar-string\", \"\", \"\", \"grammar in string format\")\n\t\tsamplerFlags.BoolVarP(&enableJson, \"enable-json\", \"\", false, \"enable json output\")\n\t\treturn samplerFlags\n\t}()\n\tllmFlags = func() *pflag.FlagSet {\n\t\tllmFlags := pflag.NewFlagSet(\"LLM/VLM Model\", pflag.ExitOnError)\n\t\tllmFlags.SortFlags = false\n\t\tllmFlags.Int32VarP(&ngl, \"ngl\", \"n\", 999, \"num of layers pass to gpu\")\n\t\tllmFlags.Int32VarP(&nctx, \"nctx\", \"\", 4096, \"context window size\")\n\t\tllmFlags.Int32VarP(&maxTokens, \"max-tokens\", \"\", 2048, \"max tokens\")\n\t\tllmFlags.StringArrayVarP(&stop, \"stop\", \"\", nil, \"stop sequences\")\n\t\tllmFlags.StringVarP(&stopFile, \"stop-file\", \"\", \"\", \"file containing stop sequences\")\n\t\tllmFlags.BoolVarP(&enableThink, \"enable-think\", \"\", true, \"enable thinking mode\")\n\t\tllmFlags.BoolVarP(&hideThink, \"hide-think\", \"\", false, \"hide thinking output\")\n\t\tllmFlags.StringVarP(&systemPrompt, \"system-prompt\", \"s\", \"\", \"system prompt to set model behavior\")\n\t\tllmFlags.StringVarP(&input, \"input\", \"i\", \"\", \"prompt txt file\")\n\t\tllmFlags.StringArrayVarP(&prompt, \"prompt\", \"p\", nil, \"pass prompt\")\n\t\tllmFlags.StringVarP(&tokenFile, \"token-file\", \"t\", \"\", \"path to token file (space-separated token IDs)\")\n\t\treturn llmFlags\n\t}()\n\tvlmFlags = func() *pflag.FlagSet {\n\t\tvlmFlags := pflag.NewFlagSet(\"VLM Specific\", pflag.ExitOnError)\n\t\tvlmFlags.SortFlags = false\n\t\tvlmFlags.StringArrayVarP(&prompt, \"prompt\", \"p\", nil, \"pass prompt\")\n\t\tvlmFlags.Int32VarP(&imageMaxLength, \"image-max-length\", \"\", 512, \"max image length\")\n\t\treturn vlmFlags\n\t}()\n\tembedderFlags = func() *pflag.FlagSet {\n\t\tembedderFlags := pflag.NewFlagSet(\"Embedder\", pflag.ExitOnError)\n\t\tembedderFlags.SortFlags = false\n\t\tembedderFlags.StringVarP(&input, \"input\", \"i\", \"\", \"input text file or image file\")\n\t\tembedderFlags.StringArrayVarP(&prompt, \"prompt\", \"p\", nil, \"pass prompt or image path (e.g., -p 'text' or -p '/path/to/image.jpg')\")\n\t\tembedderFlags.StringVarP(&taskType, \"task-type\", \"\", \"default\", \"default|search_query|search_document\")\n\t\treturn embedderFlags\n\t}()\n\trerankerFlags = func() *pflag.FlagSet {\n\t\trerankerFlags := pflag.NewFlagSet(\"Reranker\", pflag.ExitOnError)\n\t\trerankerFlags.SortFlags = false\n\t\trerankerFlags.StringVarP(&query, \"query\", \"q\", \"\", \"query\")\n\t\trerankerFlags.StringArrayVarP(&document, \"document\", \"d\", nil, \"documents\")\n\t\treturn rerankerFlags\n\t}()\n\tttsFlags = func() *pflag.FlagSet {\n\t\tttsFlags := pflag.NewFlagSet(\"TTS\", pflag.ExitOnError)\n\t\tttsFlags.SortFlags = false\n\t\tttsFlags.StringVarP(&input, \"input\", \"i\", \"\", \"prompt txt file\")\n\t\tttsFlags.StringArrayVarP(&prompt, \"prompt\", \"p\", nil, \"pass prompt\")\n\t\tttsFlags.StringVarP(&voice, \"voice\", \"\", \"\", \"voice identifier\")\n\t\tttsFlags.BoolVarP(&listVoice, \"list-voice\", \"\", false, \"list available voices\")\n\t\tttsFlags.Float64VarP(&speechSpeed, \"speech-speed\", \"\", 1.0, \"speech speed (1.0 = normal)\")\n\t\tttsFlags.StringVarP(&output, \"output\", \"o\", \"\", \"output audio file\")\n\t\treturn ttsFlags\n\t}()\n\tasrFlags = func() *pflag.FlagSet {\n\t\tasrFlags := pflag.NewFlagSet(\"ASR\", pflag.ExitOnError)\n\t\tasrFlags.SortFlags = false\n\t\tasrFlags.StringVarP(&input, \"input\", \"i\", \"\", \"input audio file\")\n\t\t// asrFlags.StringVarP(&language, \"language\", \"\", \"\", \"language code (e.g., en, zh, ja)\")   // TODO: Language support not implemented yet\n\t\t// asrFlags.BoolVarP(&listLanguage, \"list-language\", \"\", false, \"list available languages\") // TODO: Language support not implemented yet\n\t\treturn asrFlags\n\t}()\n\tdiarizeFlags = func() *pflag.FlagSet {\n\t\tdiarizeFlags := pflag.NewFlagSet(\"Diarize\", pflag.ExitOnError)\n\t\tdiarizeFlags.SortFlags = false\n\t\tdiarizeFlags.StringVarP(&input, \"input\", \"i\", \"\", \"input audio file\")\n\t\treturn diarizeFlags\n\t}()\n\tcvFlags = func() *pflag.FlagSet {\n\t\tcvFlags := pflag.NewFlagSet(\"CV\", pflag.ExitOnError)\n\t\tcvFlags.SortFlags = false\n\t\tcvFlags.StringVarP(&input, \"input\", \"i\", \"\", \"input image file\")\n\t\treturn cvFlags\n\t}()\n\timageGenFlags = func() *pflag.FlagSet {\n\t\timageGenFlags := pflag.NewFlagSet(\"ImageGen\", pflag.ExitOnError)\n\t\timageGenFlags.SortFlags = false\n\t\timageGenFlags.StringVarP(&input, \"input\", \"i\", \"\", \"prompt txt file\")\n\t\timageGenFlags.StringArrayVarP(&prompt, \"prompt\", \"p\", nil, \"pass prompt\")\n\t\timageGenFlags.StringVarP(&output, \"output\", \"o\", \"\", \"output image file\")\n\t\treturn imageGenFlags\n\t}()\n\tflagGroups = []*pflag.FlagSet{\n\t\tsamplerFlags, llmFlags, vlmFlags, embedderFlags, rerankerFlags, ttsFlags, asrFlags, diarizeFlags, cvFlags, imageGenFlags,\n\t}\n)\n\nfunc infer() *cobra.Command {\n\tinferCmd := &cobra.Command{\n\t\tGroupID: \"inference\",\n\t\tUse:     \"infer <model-name>\",\n\t\tShort:   \"Infer with a model\",\n\t\tLong:    \"Run inference with a specified model. The model must be downloaded and cached locally.\",\n\t}\n\n\tinferCmd.Args = cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs)\n\tfor _, flags := range flagGroups {\n\t\tinferCmd.Flags().AddFlagSet(flags)\n\t}\n\n\tinferCmd.SetUsageFunc(func(c *cobra.Command) error {\n\t\tw := c.OutOrStdout()\n\t\tfmt.Fprint(w, \"Usage:\")\n\t\tif c.Runnable() {\n\t\t\tfmt.Fprintf(w, \"\\n  %s\", c.UseLine())\n\t\t}\n\t\tif len(c.Aliases) > 0 {\n\t\t\tfmt.Fprintf(w, \"\\n\\nAliases:\\n\")\n\t\t\tfmt.Fprintf(w, \"  %s\", c.NameAndAliases())\n\t\t}\n\n\t\tfor _, flags := range flagGroups {\n\t\t\tfmt.Fprintf(w, \"\\n\\n%s Flags:\\n\", flags.Name())\n\t\t\tfmt.Fprint(w, strings.TrimRightFunc(flags.FlagUsages(), unicode.IsSpace))\n\t\t}\n\n\t\tif c.HasAvailableInheritedFlags() {\n\t\t\tfmt.Fprintf(w, \"\\n\\nGlobal Flags:\\n\")\n\t\t\tfmt.Fprint(w, strings.TrimRightFunc(c.InheritedFlags().FlagUsages(), unicode.IsSpace))\n\t\t}\n\t\tfmt.Fprintln(w)\n\t\treturn nil\n\t})\n\n\tinferCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\ts := store.Get()\n\n\t\tname, quant := normalizeModelName(args[0])\n\t\tmanifest, err := ensureModelAvailable(s, name, quant)\n\t\tif err != nil {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\tif quant != \"\" {\n\t\t\tif fileinfo, exist := manifest.ModelFile[quant]; !exist {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: quant %s not found\", quant))\n\t\t\t\tos.Exit(1)\n\t\t\t} else if !fileinfo.Downloaded {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: quant %s not downloaded\", quant))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t} else {\n\t\t\tsq, err := selectQuant(manifest)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t\tquant = sq\n\t\t}\n\n\t\tnexa_sdk.Init()\n\t\tdefer nexa_sdk.DeInit()\n\n\t\tswitch manifest.ModelType {\n\t\tcase types.ModelTypeLLM:\n\t\t\terr = inferLLM(manifest, quant)\n\t\tcase types.ModelTypeVLM:\n\t\t\tcheckDependency()\n\t\t\terr = inferVLM(manifest, quant)\n\t\tcase types.ModelTypeEmbedder:\n\t\t\terr = inferEmbedder(manifest, quant)\n\t\tcase types.ModelTypeReranker:\n\t\t\terr = inferReranker(manifest, quant)\n\t\tcase types.ModelTypeTTS:\n\t\t\terr = inferTTS(manifest, quant)\n\t\tcase types.ModelTypeASR:\n\t\t\tcheckDependency()\n\t\t\terr = inferASR(manifest, quant)\n\t\tcase types.ModelTypeDiarize:\n\t\t\terr = inferDiarize(manifest, quant)\n\t\tcase types.ModelTypeCV:\n\t\t\terr = inferCV(manifest, quant)\n\t\tcase types.ModelTypeImageGen:\n\t\t\t// ImageGen model is a directory, not a file\n\t\t\terr = inferImageGen(manifest, quant)\n\t\tdefault:\n\t\t\tpanic(\"not support model type\")\n\t\t}\n\n\t\tswitch err {\n\t\tcase nil:\n\t\t\tos.Exit(0)\n\t\tcase nexa_sdk.ErrCommonNotSupport:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprint(`\n⚠️ Oops. This model type is not supported yet.\n\n👉 Try these:\n- Check back later for updates.\n- See help in our discord or slack.`))\n\t\tcase nexa_sdk.ErrCommonModelLoad:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprint(`\n⚠️ Oops. Model failed to load.\n\n👉 Try these:\n- Redownload the model.\n- Verify your system meets the model's requirements.\n- See help in our discord or slack.`))\n\t\tcase nexa_sdk.ErrCommonPluginLoad:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprint(`\n⚠️ Oops. Plugin failed to load.\n\n👉 Try these:\n- Ensure all plugin dependencies are correct.\n- See help in our discord or slack.`))\n\t\tcase nexa_sdk.ErrCommonPluginInvalid:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprint(`\n⚠️ Oops. Plugin is invalid.\n\n👉 Try these:\n- This model may not be compatible with your system. Try another model.\n- See help in our discord or slack.`))\n\t\tcase nexa_sdk.ErrLlmTokenizationContextLength:\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Context length exceeded, please start a new conversation\"))\n\t\tdefault:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t}\n\t\tos.Exit(1)\n\t}\n\treturn inferCmd\n}\n\nfunc ensureModelAvailable(s *store.Store, name string, quant string) (*types.ModelManifest, error) {\n\tmanifest, err := s.GetManifest(name)\n\tif errors.Is(err, os.ErrNotExist) {\n\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"model not found, start download\"))\n\t\terr = pullModel(name, quant)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"download model failed\")\n\t\t}\n\t\tmanifest, err = s.GetManifest(name)\n\t}\n\treturn manifest, err\n}\n\nfunc selectQuant(manifest *types.ModelManifest) (string, error) {\n\tvar options []huh.Option[string]\n\tfor k, v := range manifest.ModelFile {\n\t\tif v.Downloaded {\n\t\t\toptions = append(options, huh.NewOption(fmt.Sprintf(\"%-10s [%7s]\", k, humanize.IBytes(uint64(v.Size))), k))\n\t\t}\n\t}\n\tif len(options) == 0 {\n\t\treturn \"\", fmt.Errorf(\"no quant found\")\n\t}\n\tif len(options) == 1 {\n\t\treturn options[0].Value, nil\n\t}\n\tvar quant string\n\tif err := huh.NewSelect[string]().Title(\"Select a quant from local folder\").Options(options...).Value(&quant).Run(); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn quant, nil\n}\n\nfunc getPromptOrInput() (string, error) {\n\tif input != \"\" {\n\t\tcontent, err := os.ReadFile(input)\n\t\t// print prompt\n\t\tprompt := strings.TrimSpace(string(content))\n\t\tfirstLine := true\n\t\tfor line := range strings.SplitSeq(prompt, \"\\n\") {\n\t\t\tif firstLine {\n\t\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(line))\n\t\t\t\tfirstLine = false\n\t\t\t} else {\n\t\t\t\tfmt.Println(render.GetTheme().Normal.Sprintf(\". %s\", line))\n\t\t\t}\n\n\t\t}\n\t\tinput = \"\"\n\t\treturn prompt, err\n\t}\n\tif len(prompt) > 0 {\n\t\tp := prompt[0]\n\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\tfmt.Println(render.GetTheme().Normal.Sprint(p))\n\t\tprompt = prompt[1:]\n\t\treturn p, nil\n\t}\n\treturn \"\", io.EOF\n}\n\nfunc loadStopSequences() ([]string, error) {\n\tvar stopSequences []string\n\tif stopFile != \"\" {\n\t\tcontent, err := os.ReadFile(stopFile)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tfor line := range strings.SplitSeq(string(content), \"\\n\") {\n\t\t\tif line != \"\" {\n\t\t\t\tstopSequences = append(stopSequences, line)\n\t\t\t}\n\t\t}\n\t}\n\tstopSequences = append(stopSequences, stop...)\n\treturn stopSequences, nil\n}\n\nfunc inferLLM(manifest *types.ModelManifest, quant string) error {\n\tsamplerConfig := &nexa_sdk.SamplerConfig{\n\t\tTemperature:       temperature,\n\t\tTopP:              topP,\n\t\tTopK:              topK,\n\t\tMinP:              minP,\n\t\tRepetitionPenalty: repetitionPenalty,\n\t\tPresencePenalty:   presencePenalty,\n\t\tFrequencyPenalty:  frequencyPenalty,\n\t\tSeed:              seed,\n\t\tGrammarPath:       grammarPath,\n\t\tGrammarString:     grammarString,\n\t\tEnableJson:        enableJson,\n\t}\n\tstopSequences, err := loadStopSequences()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\n\tp, err := nexa_sdk.NewLLM(nexa_sdk.LlmCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modelfile,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t\tConfig: nexa_sdk.ModelConfig{\n\t\t\tNCtx:       nctx,\n\t\t\tNGpuLayers: ngl,\n\t\t},\n\t})\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tvar history []nexa_sdk.LlmChatMessage\n\tif systemPrompt != \"\" {\n\t\thistory = append(history, nexa_sdk.LlmChatMessage{Role: nexa_sdk.LLMRoleSystem, Content: systemPrompt})\n\t}\n\n\t// Check if using token ID input mode\n\tvar tokenIDs []int32\n\tif tokenFile != \"\" {\n\t\tcontent, err := os.ReadFile(tokenFile)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to read token file: %w\", err)\n\t\t}\n\t\tfor field := range strings.FieldsSeq(string(content)) {\n\t\t\ttokenID, err := strconv.ParseInt(field, 10, 32)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid token ID: %s\", field)\n\t\t\t}\n\t\t\ttokenIDs = append(tokenIDs, int32(tokenID))\n\t\t}\n\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Using token IDs from file: %s (%d tokens)\", tokenFile, len(tokenIDs)))\n\t}\n\n\tprocessor := &common.Processor{\n\t\tHideThink: hideThink,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tvar res nexa_sdk.LlmGenerateOutput\n\t\t\tvar err error\n\n\t\t\tif len(tokenIDs) > 0 {\n\t\t\t\t// When using token IDs, skip chat template and use IDs directly\n\t\t\t\tres, err = p.Generate(nexa_sdk.LlmGenerateInput{\n\t\t\t\t\tInputIDs: tokenIDs,\n\t\t\t\t\tOnToken:  onToken,\n\t\t\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\t\t\tMaxTokens:     maxTokens,\n\t\t\t\t\t\tSamplerConfig: samplerConfig,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t\t}\n\t\t\t\t// Clear tokenIDs after use so subsequent calls use normal mode\n\t\t\t\ttokenIDs = nil\n\t\t\t} else {\n\t\t\t\t// Normal text prompt mode with chat template\n\t\t\t\thistory = append(history, nexa_sdk.LlmChatMessage{Role: nexa_sdk.LLMRoleUser, Content: prompt})\n\n\t\t\t\ttemplateOutput, err := p.ApplyChatTemplate(nexa_sdk.LlmApplyChatTemplateInput{\n\t\t\t\t\tMessages:            history,\n\t\t\t\t\tEnableThink:         enableThink,\n\t\t\t\t\tAddGenerationPrompt: true,\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t\t}\n\n\t\t\t\tres, err = p.Generate(nexa_sdk.LlmGenerateInput{\n\t\t\t\t\tPromptUTF8: templateOutput.FormattedText,\n\t\t\t\t\tOnToken:    onToken,\n\t\t\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\t\t\tMaxTokens:     maxTokens,\n\t\t\t\t\t\tStop:          stopSequences,\n\t\t\t\t\t\tSamplerConfig: samplerConfig,\n\t\t\t\t\t},\n\t\t\t\t})\n\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t\t}\n\n\t\t\t\thistory = append(history, nexa_sdk.LlmChatMessage{Role: nexa_sdk.LLMRoleAssistant, Content: res.FullText})\n\t\t\t}\n\n\t\t\treturn res.FullText, res.ProfileData, nil\n\t\t},\n\t}\n\n\tif len(tokenIDs) > 0 {\n\t\t// Token ID mode: return empty prompt once, then EOF to exit after first round\n\t\tfirstCall := true\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif firstCall {\n\t\t\t\tfirstCall = false\n\t\t\t\treturn \"\", nil // Trigger first round with empty prompt (token IDs will be used)\n\t\t\t}\n\t\t\treturn \"\", io.EOF // Exit after first round\n\t\t}\n\t} else if len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tReset: func() error {\n\t\t\t\terr := p.Reset()\n\t\t\t\tif err == nil {\n\t\t\t\t\thistory = nil\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t},\n\n\t\t\tSaveKVCache: func(path string) error {\n\t\t\t\t_, err := p.SaveKVCache(nexa_sdk.LlmSaveKVCacheInput{Path: path})\n\t\t\t\treturn err\n\t\t\t},\n\n\t\t\tLoadKVCache: func(path string) error {\n\t\t\t\t_, err := p.LoadKVCache(nexa_sdk.LlmLoadKVCacheInput{Path: path})\n\t\t\t\tif err == nil {\n\t\t\t\t\thistory = nil\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferVLM(manifest *types.ModelManifest, quant string) error {\n\tsamplerConfig := &nexa_sdk.SamplerConfig{\n\t\tTemperature:       temperature,\n\t\tTopP:              topP,\n\t\tTopK:              topK,\n\t\tMinP:              minP,\n\t\tRepetitionPenalty: repetitionPenalty,\n\t\tPresencePenalty:   presencePenalty,\n\t\tFrequencyPenalty:  frequencyPenalty,\n\t\tSeed:              seed,\n\t\tGrammarPath:       grammarPath,\n\t\tGrammarString:     grammarString,\n\t\tEnableJson:        enableJson,\n\t}\n\tstopSequences, err := loadStopSequences()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tvar mmprojfile string\n\tif manifest.MMProjFile.Name != \"\" {\n\t\tmmprojfile = s.ModelfilePath(manifest.Name, manifest.MMProjFile.Name)\n\t}\n\tvar tokenizerfile string\n\tif manifest.TokenizerFile.Name != \"\" {\n\t\ttokenizerfile = s.ModelfilePath(manifest.Name, manifest.TokenizerFile.Name)\n\t}\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\tp, err := nexa_sdk.NewVLM(nexa_sdk.VlmCreateInput{\n\t\tModelName:     manifest.ModelName,\n\t\tModelPath:     modelfile,\n\t\tMmprojPath:    mmprojfile,\n\t\tTokenizerPath: tokenizerfile,\n\t\tPluginID:      manifest.PluginId,\n\t\tDeviceID:      manifest.DeviceId,\n\t\tConfig: nexa_sdk.ModelConfig{\n\t\t\tNCtx:       nctx,\n\t\t\tNGpuLayers: ngl,\n\t\t},\n\t})\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create VLM\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tvar history []nexa_sdk.VlmChatMessage\n\tif systemPrompt != \"\" {\n\t\thistory = append(history, nexa_sdk.VlmChatMessage{Role: nexa_sdk.VlmRoleSystem, Contents: []nexa_sdk.VlmContent{{Type: nexa_sdk.VlmContentTypeText, Text: systemPrompt}}})\n\t}\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tHideThink: hideThink,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, images, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tmsg := nexa_sdk.VlmChatMessage{Role: nexa_sdk.VlmRoleUser}\n\t\t\tmsg.Contents = append(msg.Contents, nexa_sdk.VlmContent{Type: nexa_sdk.VlmContentTypeText, Text: prompt})\n\t\t\tfor _, image := range images {\n\t\t\t\tmsg.Contents = append(msg.Contents, nexa_sdk.VlmContent{Type: nexa_sdk.VlmContentTypeImage, Text: image})\n\t\t\t}\n\t\t\tfor _, audio := range audios {\n\t\t\t\tmsg.Contents = append(msg.Contents, nexa_sdk.VlmContent{Type: nexa_sdk.VlmContentTypeAudio, Text: audio})\n\t\t\t}\n\n\t\t\thistory = append(history, msg)\n\n\t\t\ttmplOut, err := p.ApplyChatTemplate(nexa_sdk.VlmApplyChatTemplateInput{\n\t\t\t\tMessages:    history,\n\t\t\t\tEnableThink: enableThink,\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\n\t\t\tres, err := p.Generate(nexa_sdk.VlmGenerateInput{\n\t\t\t\tPromptUTF8: tmplOut.FormattedText,\n\t\t\t\tOnToken:    onToken,\n\t\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\t\tMaxTokens:      maxTokens,\n\t\t\t\t\tStop:           stopSequences,\n\t\t\t\t\tSamplerConfig:  samplerConfig,\n\t\t\t\t\tImagePaths:     images,\n\t\t\t\t\tImageMaxLength: imageMaxLength,\n\t\t\t\t\tAudioPaths:     audios,\n\t\t\t\t},\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\n\t\t\thistory = append(history, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole: nexa_sdk.VlmRoleAssistant,\n\t\t\t\tContents: []nexa_sdk.VlmContent{\n\t\t\t\t\t{Type: nexa_sdk.VlmContentTypeText, Text: res.FullText},\n\t\t\t\t},\n\t\t\t})\n\n\t\t\treturn res.FullText, res.ProfileData, nil\n\t\t},\n\t}\n\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tReset: func() error {\n\t\t\t\terr := p.Reset()\n\t\t\t\tif err == nil {\n\t\t\t\t\thistory = nil\n\t\t\t\t}\n\t\t\t\treturn err\n\t\t\t},\n\t\t\tRecord: func() (*string, error) {\n\t\t\t\tt := strconv.Itoa(int(time.Now().Unix()))\n\t\t\t\toutputFile := filepath.Join(os.TempDir(), \"nexa-cli\", t+\".wav\")\n\t\t\t\trec, err := record.NewRecorder(outputFile)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Recording is going on, press Ctrl-C to stop\"))\n\n\t\t\t\terr = rec.Run()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\toutfile := rec.GetOutputFile()\n\t\t\t\treturn &outfile, nil\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferEmbedder(manifest *types.ModelManifest, quant string) error {\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading embedding model...\")\n\tspin.Start()\n\n\tembedderInput := nexa_sdk.EmbedderCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modelfile,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t}\n\n\tp, err := nexa_sdk.NewEmbedder(embedderInput)\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create embedder\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, images, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tembedInput := nexa_sdk.EmbedderEmbedInput{\n\t\t\t\tTaskType: taskType,\n\t\t\t\tConfig:   &nexa_sdk.EmbeddingConfig{},\n\t\t\t}\n\n\t\t\t// Validate: image paths and text cannot be passed at the same time\n\t\t\ttrimmedPrompt := strings.TrimSpace(prompt)\n\t\t\tif len(images) > 0 && trimmedPrompt != \"\" {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"cannot pass both image paths and text at the same time\")\n\t\t\t}\n\n\t\t\t// Handle text or image inputs\n\t\t\tif len(images) > 0 {\n\t\t\t\tembedInput.ImagePaths = images\n\t\t\t} else if trimmedPrompt != \"\" {\n\t\t\t\tembedInput.Texts = []string{trimmedPrompt}\n\t\t\t} else {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"must provide either text or image path\")\n\t\t\t}\n\n\t\t\tresult, err := p.Embed(embedInput)\n\t\t\tif err != nil || len(result.Embeddings) == 0 {\n\t\t\t\treturn \"\", result.ProfileData, err\n\t\t\t}\n\n\t\t\temb := result.Embeddings[0]\n\t\t\tn := len(emb)\n\t\t\tinfo := render.GetTheme().Info.Sprintf(\"Embedding\")\n\t\t\tvar out string\n\t\t\tif n > 6 {\n\t\t\t\tout = render.GetTheme().Success.Sprintf(\n\t\t\t\t\t\"[%.6f, %.6f, %.6f, ..., %.6f, %.6f, %.6f] (length: %d)\",\n\t\t\t\t\temb[0], emb[1], emb[2],\n\t\t\t\t\temb[n-3], emb[n-2], emb[n-1], n,\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\tout = render.GetTheme().Success.Sprintf(\"%v (length: %d)\", emb, n)\n\t\t\t}\n\n\t\t\tdata := fmt.Sprintf(\"%s: %s\", info, out)\n\t\t\tonToken(data)\n\t\t\treturn data, result.ProfileData, nil\n\t\t},\n\t}\n\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferReranker(manifest *types.ModelManifest, quant string) error {\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading reranker model...\")\n\tspin.Start()\n\n\trerankerInput := nexa_sdk.RerankerCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modelfile,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t}\n\n\tp, err := nexa_sdk.NewReranker(rerankerInput)\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create reranker\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tconst SEP = \"\\\\n\"\n\tprocessor := &common.Processor{\n\t\tVerbose:  verbose,\n\t\tTestMode: testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tparsedPrompt := strings.Split(prompt, SEP)\n\t\t\tif len(parsedPrompt) < 2 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"parsed prompt failed, query and document are required for reranking\")\n\t\t\t}\n\t\t\tquery := parsedPrompt[0]\n\t\t\tdocument := parsedPrompt[1:]\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Query: %s\", query))\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Processing %d documents\", len(document)))\n\n\t\t\trerankInput := nexa_sdk.RerankerRerankInput{\n\t\t\t\tQuery:     query,\n\t\t\t\tDocuments: document,\n\t\t\t\tConfig: &nexa_sdk.RerankConfig{\n\t\t\t\t\tBatchSize:       int32(len(document)),\n\t\t\t\t\tNormalize:       true,\n\t\t\t\t\tNormalizeMethod: \"softmax\",\n\t\t\t\t},\n\t\t\t}\n\n\t\t\tresult, err := p.Rerank(rerankInput)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", result.ProfileData, err\n\t\t\t}\n\n\t\t\tfmt.Println(render.GetTheme().Success.Sprintf(\"✓ Reranking completed successfully. Generated %d scores\", len(result.Scores)))\n\n\t\t\t// Display results\n\t\t\tvar data strings.Builder\n\t\t\tfor i, doc := range document {\n\t\t\t\tif i < len(result.Scores) {\n\t\t\t\t\tline := fmt.Sprintf(\"\\n%s [%d]: %s\\n\", render.GetTheme().Info.Sprintf(\"Document\"), i+1, doc)\n\t\t\t\t\tonToken(line)\n\t\t\t\t\tdata.WriteString(line)\n\t\t\t\t\tline = fmt.Sprintf(\"%s: %.6f\\n\", render.GetTheme().Info.Sprintf(\"Score\"), result.Scores[i])\n\t\t\t\t\tonToken(line)\n\t\t\t\t\tdata.WriteString(line)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn data.String(), result.ProfileData, nil\n\t\t},\n\t}\n\n\tif query != \"\" || len(document) > 0 {\n\t\tif query == \"\" || len(document) == 0 {\n\t\t\treturn errors.New(\"query and document are required for reranking\")\n\t\t}\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif query == \"\" || len(document) == 0 {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\tprompt := strings.Join(append([]string{query}, document...), SEP)\n\t\t\tquery, document = \"\", nil\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(prompt))\n\t\t\treturn prompt, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferTTS(manifest *types.ModelManifest, quant string) error {\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading TTS model...\")\n\tspin.Start()\n\n\tttsInput := nexa_sdk.TtsCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modelfile,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t}\n\n\tp, err := nexa_sdk.NewTTS(ttsInput)\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create TTS\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tif listVoice {\n\t\tvoices, err := p.ListAvailableVoices()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Failed to list voices: %s\", err)\n\t\t}\n\t\tfmt.Println(render.GetTheme().Success.Sprintf(\"Available voices: %v\", voices.VoiceIDs))\n\t\treturn nil\n\t}\n\n\tprocessor := &common.Processor{\n\t\tVerbose:  verbose,\n\t\tTestMode: testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\ttextToSynthesize := strings.TrimSpace(prompt)\n\t\t\tif textToSynthesize == \"\" {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"prompt cannot be empty\")\n\t\t\t}\n\n\t\t\t// Generate output filename if not specified\n\t\t\toutputFile := output\n\t\t\tif outputFile == \"\" {\n\t\t\t\toutputFile = fmt.Sprintf(\"tts_output_%d.wav\", time.Now().Unix())\n\t\t\t}\n\n\t\t\t// Create TTS config\n\t\t\tttsConfig := &nexa_sdk.TTSConfig{\n\t\t\t\tVoice:      \"af_heart\",\n\t\t\t\tSpeed:      float32(speechSpeed),\n\t\t\t\tSampleRate: 24000,\n\t\t\t\tSeed:       42,\n\t\t\t}\n\n\t\t\tif voice != \"\" {\n\t\t\t\tttsConfig.Voice = voice\n\t\t\t}\n\n\t\t\t// Synthesize speech\n\t\t\tsynthesizeInput := nexa_sdk.TtsSynthesizeInput{\n\t\t\t\tTextUTF8:   textToSynthesize,\n\t\t\t\tConfig:     ttsConfig,\n\t\t\t\tOutputPath: outputFile,\n\t\t\t}\n\n\t\t\tresult, err := p.Synthesize(synthesizeInput)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\n\t\t\tdata := render.GetTheme().Success.Sprintf(\"✓ Audio saved: %s\", result.Result.AudioPath)\n\t\t\tonToken(data)\n\t\t\treturn data, result.ProfileData, nil\n\t\t},\n\t}\n\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferASR(manifest *types.ModelManifest, quant string) error {\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading ASR model...\")\n\tspin.Start()\n\n\tasrInput := nexa_sdk.AsrCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modelfile,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t\tLanguage:  language,\n\t}\n\tp, err := nexa_sdk.NewASR(asrInput)\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create ASR\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tif listLanguage {\n\t\tlans, err := p.ListSupportedLanguages()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"Failed to list available languages: %s\", err)\n\t\t}\n\t\tfmt.Println(render.GetTheme().Success.Sprintf(\"Available languages: %v\", lans.LanguageCodes))\n\t\treturn nil\n\t}\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(_ string, _, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tif len(audios) == 0 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, common.ErrNoAudio\n\t\t\t}\n\t\t\tif len(audios) > 1 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"only one audio file is supported\")\n\t\t\t}\n\n\t\t\tasrConfig := &nexa_sdk.ASRConfig{\n\t\t\t\tTimestamps: \"segment\",\n\t\t\t\tBeamSize:   5,\n\t\t\t\tStream:     false,\n\t\t\t}\n\n\t\t\ttranscribeInput := nexa_sdk.AsrTranscribeInput{\n\t\t\t\tAudioPath: audios[0],\n\t\t\t\tLanguage:  language,\n\t\t\t\tConfig:    asrConfig,\n\t\t\t}\n\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Transcribing audio file: %s\", audios[0]))\n\n\t\t\tresult, err := p.Transcribe(transcribeInput)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\t\t\tonToken(result.Result.Transcript)\n\t\t\treturn result.Result.Transcript, result.ProfileData, nil\n\t\t},\n\t}\n\n\tif input != \"\" {\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif input == \"\" {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\taudioPath := input\n\t\t\tinput = \"\"\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(audioPath))\n\t\t\treturn audioPath, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tRecordImmediate: true,\n\t\t\tRecord: func() (*string, error) {\n\t\t\t\tstreamConfig := nexa_sdk.ASRStreamConfig{\n\t\t\t\t\tChunkDuration:   4.0,\n\t\t\t\t\tOverlapDuration: 3.5,\n\t\t\t\t\tSampleRate:      16000,\n\t\t\t\t\tMaxQueueSize:    10,\n\t\t\t\t\tBufferSize:      1024,\n\t\t\t\t\tTimestamps:      \"segment\",\n\t\t\t\t\tBeamSize:        4,\n\t\t\t\t}\n\t\t\t\t_, err := p.StreamBegin(nexa_sdk.AsrStreamBeginInput{\n\t\t\t\t\tStreamConfig: &streamConfig,\n\t\t\t\t\tLanguage:     \"en\",\n\t\t\t\t\tOnTranscription: func(text string, _ any) {\n\t\t\t\t\t\ttWidth := common.GetTerminalWidth()\n\t\t\t\t\t\tif len(text) > tWidth {\n\t\t\t\t\t\t\ttext = \"...\" + text[len(text)-tWidth+3:]\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttext += strings.Repeat(\" \", tWidth-len(text))\n\n\t\t\t\t\t\tfmt.Print(\"\\r\")\n\t\t\t\t\t\tfmt.Print(render.GetTheme().ModelOutput.Sprint(text))\n\t\t\t\t\t},\n\t\t\t\t\tUserData: nil,\n\t\t\t\t})\n\t\t\t\tslog.Debug(\"ASR StreamBegin\", \"error\", err)\n\t\t\t\tif err != nil && !errors.Is(err, nexa_sdk.ErrCommonNotSupport) {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tdefer p.StreamStop(nexa_sdk.AsrStreamStopInput{})\n\n\t\t\t\t// streaming not supported, fallback to file input\n\t\t\t\tif err != nil {\n\t\t\t\t\tt := strconv.Itoa(int(time.Now().Unix()))\n\t\t\t\t\toutputFile := filepath.Join(os.TempDir(), \"nexa-cli\", t+\".wav\")\n\t\t\t\t\trec, err := record.NewRecorder(outputFile)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\n\t\t\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Recording is going on, press Ctrl-C to stop\"))\n\n\t\t\t\t\terr = rec.Run()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\treturn &outputFile, nil\n\n\t\t\t\t} else {\n\t\t\t\t\trec, err := record.NewStreamRecorder()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Streaming ASR recording started, press Ctrl-C to stop\"))\n\t\t\t\t\tfmt.Println()\n\n\t\t\t\t\tif err := rec.Start(); err != nil {\n\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t}\n\t\t\t\t\tdefer rec.Stop()\n\n\t\t\t\t\tbuffer := make([]float32, 512)\n\t\t\t\t\tfor {\n\t\t\t\t\t\tn, err := rec.ReadFloat32(buffer)\n\t\t\t\t\t\tif err == io.EOF {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif err := p.StreamPushAudio(nexa_sdk.AsrStreamPushAudioInput{\n\t\t\t\t\t\t\tAudioData: buffer[:n],\n\t\t\t\t\t\t}); err != nil {\n\t\t\t\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"error pushing audio data: %s\", err))\n\t\t\t\t\t\t\tfmt.Println()\n\t\t\t\t\t\t\treturn nil, err\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tfmt.Println()\n\t\t\t\t\trender.GetTheme().Reset()\n\t\t\t\t\tfmt.Println()\n\t\t\t\t}\n\n\t\t\t\treturn nil, nil\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferDiarize(manifest *types.ModelManifest, quant string) error {\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading diarization model...\")\n\tspin.Start()\n\n\tdiarizeInput := nexa_sdk.DiarizeCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modelfile,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t}\n\tp, err := nexa_sdk.NewDiarize(diarizeInput)\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create diarization model\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(_ string, _, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tif len(audios) == 0 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, common.ErrNoAudio\n\t\t\t}\n\t\t\tif len(audios) > 1 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"diarization only supports a single audio file, got %d files\", len(audios))\n\t\t\t}\n\n\t\t\tdiarizeConfig := &nexa_sdk.DiarizeConfig{\n\t\t\t\tMinSpeakers: 0, // auto-detect\n\t\t\t\tMaxSpeakers: 0, // no limit\n\t\t\t}\n\n\t\t\tinferInput := nexa_sdk.DiarizeInferInput{\n\t\t\t\tAudioPath: audios[0],\n\t\t\t\tConfig:    diarizeConfig,\n\t\t\t}\n\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Analyzing audio file: %s\", audios[0]))\n\n\t\t\tresult, err := p.Infer(inferInput)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\n\t\t\t// Format the diarization output\n\t\t\toutput := fmt.Sprint(render.GetTheme().Success.Sprintf(\"Detected %d speaker(s) in %.2f seconds of audio:\\n\\n\", result.NumSpeakers, result.Duration))\n\t\t\tfor i, segment := range result.Segments {\n\t\t\t\toutput += fmt.Sprintf(\"%s %s\\n\",\n\t\t\t\t\trender.GetTheme().Info.Sprintf(\"[%d]\", i+1),\n\t\t\t\t\trender.GetTheme().Success.Sprintf(\"%.2fs - %.2fs: %s\", segment.StartTime, segment.EndTime, segment.SpeakerLabel))\n\t\t\t}\n\t\t\tonToken(output)\n\t\t\treturn output, result.ProfileData, nil\n\t\t},\n\t}\n\n\tif input != \"\" {\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif input == \"\" {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\taudioPath := input\n\t\t\tinput = \"\"\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(audioPath))\n\t\t\treturn audioPath, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tRecordImmediate: true,\n\t\t\tRecord: func() (*string, error) {\n\t\t\t\t// Diarization doesn't support streaming, use file-based recording\n\t\t\t\tt := strconv.Itoa(int(time.Now().Unix()))\n\t\t\t\toutputFile := filepath.Join(os.TempDir(), \"nexa-cli\", t+\".wav\")\n\t\t\t\trec, err := record.NewRecorder(outputFile)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Recording is going on, press Ctrl-C to stop\"))\n\n\t\t\t\terr = rec.Run()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\treturn &outputFile, nil\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferCV(manifest *types.ModelManifest, quant string) error {\n\ts := store.Get()\n\tmodelfile := s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name)\n\tspin := render.NewSpinner(\"loading CV model...\")\n\tspin.Start()\n\n\tcvInput := nexa_sdk.CVCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tConfig: nexa_sdk.CVModelConfig{\n\t\t\tCapabilities: nexa_sdk.CVCapabilityOCR,\n\t\t\tDetModelPath: modelfile,\n\t\t\tRecModelPath: modelfile,\n\t\t},\n\t\tPluginID: manifest.PluginId,\n\t\tDeviceID: manifest.DeviceId,\n\t}\n\n\tp, err := nexa_sdk.NewCV(cvInput)\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create CV\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(_ string, images, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tif len(images) == 0 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, common.ErrNoImage\n\t\t\t}\n\t\t\tif len(images) > 1 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"only one image file is supported\")\n\t\t\t}\n\n\t\t\tinferInput := nexa_sdk.CVInferInput{\n\t\t\t\tInputImagePath: images[0],\n\t\t\t}\n\n\t\t\tresult, err := p.Infer(inferInput)\n\t\t\tslog.Debug(\"CV Infer result\", \"result\", result, \"error\", err)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\n\t\t\tonToken(render.GetTheme().Success.Sprintf(\"✓ CV inference completed successfully\"))\n\t\t\tonToken(\"\\n\")\n\t\t\tonToken(render.GetTheme().Info.Sprintf(\"  Found %d results, \", len(result.Results)))\n\n\t\t\tdata := \"\"\n\n\t\t\tif len(result.Results) == 0 {\n\t\t\t\tonToken(render.GetTheme().Info.Sprintf(\"no output, skip generate output image\\n\"))\n\t\t\t\treturn data, nexa_sdk.ProfileData{}, nil\n\t\t\t}\n\n\t\t\tif len(result.Results) == 1 && reflect.ValueOf(result.Results[0].BBox).IsZero() {\n\t\t\t\t// rmbg\n\t\t\t\tonToken(render.GetTheme().Info.Sprintf(\"Mask output detected\\n\"))\n\n\t\t\t} else {\n\t\t\t\t// bbox\n\t\t\t\tonToken(render.GetTheme().Info.Sprintf(\"BBox output detected\\n\"))\n\t\t\t\tfor _, cvResult := range result.Results {\n\t\t\t\t\tresult := fmt.Sprintf(\"[%s] %s\\n\",\n\t\t\t\t\t\trender.GetTheme().Info.Sprintf(\"%.3f\", cvResult.Confidence),\n\t\t\t\t\t\trender.GetTheme().Success.Sprintf(\"\\\"%s\\\"\", cvResult.Text))\n\t\t\t\t\tonToken(result)\n\t\t\t\t\tdata += result\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Only create output image if there are meaningful bboxes or masks to draw\n\t\t\tfor _, cvResult := range result.Results {\n\t\t\t\tif (cvResult.BBox.Width > 0 && cvResult.BBox.Height > 0) || len(cvResult.Mask) > 0 {\n\t\t\t\t\toutputPath, err := logic.CVPostProcess(images[0], result.Results)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn data, nexa_sdk.ProfileData{}, err\n\t\t\t\t\t}\n\n\t\t\t\t\tonToken(render.GetTheme().Success.Sprintf(\"  Result drawn and saved to: %s\\n\", outputPath))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data, nexa_sdk.ProfileData{}, nil\n\t\t},\n\t}\n\n\tif input != \"\" {\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif input == \"\" {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\timagePath := input\n\t\t\tinput = \"\"\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(imagePath))\n\t\t\treturn imagePath, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n\nfunc inferImageGen(manifest *types.ModelManifest, _ string) error {\n\ts := store.Get()\n\tmodeldir := s.ModelfilePath(manifest.Name, \"\")\n\n\tspin := render.NewSpinner(\"loading ImageGen model...\")\n\tspin.Start()\n\tp, err := nexa_sdk.NewImageGen(nexa_sdk.ImageGenCreateInput{\n\t\tModelName: manifest.ModelName,\n\t\tModelPath: modeldir,\n\t\tPluginID:  manifest.PluginId,\n\t\tDeviceID:  manifest.DeviceId,\n\t})\n\tspin.Stop()\n\n\tif err != nil {\n\t\tslog.Error(\"failed to create ImageGen\", \"error\", err)\n\t\treturn err\n\t}\n\tdefer p.Destroy()\n\n\tprocessor := &common.Processor{\n\t\tVerbose:  verbose,\n\t\tTestMode: testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\ttextPrompt := strings.TrimSpace(prompt)\n\t\t\tif textPrompt == \"\" {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"prompt cannot be empty\")\n\t\t\t}\n\n\t\t\t// Generate output filename if not specified\n\t\t\toutputFile := output\n\t\t\tif outputFile == \"\" {\n\t\t\t\toutputFile = fmt.Sprintf(\"imagegen_output_%d.png\", time.Now().Unix())\n\t\t\t}\n\n\t\t\tresult, err := p.Txt2Img(nexa_sdk.ImageGenTxt2ImgInput{\n\t\t\t\tPromptUTF8: textPrompt,\n\t\t\t\tConfig: &nexa_sdk.ImageGenerationConfig{\n\t\t\t\t\tPrompts:         []string{textPrompt},\n\t\t\t\t\tNegativePrompts: []string{\"blurry, low quality, distorted\"},\n\t\t\t\t\tHeight:          512,\n\t\t\t\t\tWidth:           512,\n\t\t\t\t\tSamplerConfig: nexa_sdk.ImageSamplerConfig{\n\t\t\t\t\t\tMethod:        \"ddim\",\n\t\t\t\t\t\tSteps:         20,\n\t\t\t\t\t\tGuidanceScale: 7.5,\n\t\t\t\t\t\tEta:           0.0,\n\t\t\t\t\t\tSeed:          42,\n\t\t\t\t\t},\n\t\t\t\t\tSchedulerConfig: nexa_sdk.SchedulerConfig{\n\t\t\t\t\t\tType:              \"ddim\",\n\t\t\t\t\t\tNumTrainTimesteps: 1000,\n\t\t\t\t\t\tStepsOffset:       1,\n\t\t\t\t\t\tBetaStart:         0.00085,\n\t\t\t\t\t\tBetaEnd:           0.012,\n\t\t\t\t\t\tBetaSchedule:      \"scaled_linear\",\n\t\t\t\t\t\tPredictionType:    \"epsilon\",\n\t\t\t\t\t\tTimestepType:      \"discrete\",\n\t\t\t\t\t\tTimestepSpacing:   \"leading\",\n\t\t\t\t\t\tInterpolationType: \"linear\",\n\t\t\t\t\t\tConfigPath:        \"\",\n\t\t\t\t\t},\n\t\t\t\t\tStrength: 1.0,\n\t\t\t\t},\n\t\t\t\tOutputPath: outputFile,\n\t\t\t})\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, err\n\t\t\t}\n\n\t\t\tdata := render.GetTheme().Success.Sprintf(\"✓ Image saved to: %s\", result.OutputImagePath)\n\t\t\tonToken(data)\n\t\t\treturn data, nexa_sdk.ProfileData{}, nil\n\t\t},\n\t}\n\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\n\treturn processor.Process()\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/logic/cv.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage logic\n\nimport (\n\t\"fmt\"\n\t\"image\"\n\t\"image/color\"\n\t\"image/draw\"\n\t_ \"image/jpeg\"\n\t\"image/png\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"runtime\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"golang.org/x/image/font\"\n\t\"golang.org/x/image/font/basicfont\"\n\t\"golang.org/x/image/math/fixed\"\n\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nfunc drawBBoxes(img *image.RGBA, results []nexa_sdk.CVResult) {\n\tslog.Debug(\"Drawing bounding boxes on image\", \"num_results\", len(results))\n\n\tbounds := img.Bounds()\n\tconst bboxLineWidth = 2\n\n\td := &font.Drawer{\n\t\tDst:  img,\n\t\tSrc:  image.NewUniform(color.White),\n\t\tFace: basicfont.Face7x13,\n\t}\n\tcolors := []color.RGBA{\n\t\t{R: 255, G: 0, B: 0, A: 255},   // Red\n\t\t{R: 0, G: 255, B: 255, A: 255}, // Cyan\n\t\t{R: 0, G: 255, B: 0, A: 255},   // Green\n\t\t{R: 0, G: 0, B: 255, A: 255},   // Blue\n\t\t{R: 255, G: 255, B: 0, A: 255}, // Yellow\n\t\t{R: 255, G: 0, B: 255, A: 255}, // Magenta\n\t\t{R: 255, G: 165, B: 0, A: 255}, // Orange\n\t\t{R: 128, G: 0, B: 128, A: 255}, // Purple\n\t}\n\tfor _, r := range results {\n\t\tif r.BBox.Width > 0 && r.BBox.Height > 0 {\n\t\t\tbboxColor := colors[r.ClassID%int32(len(colors))]\n\t\t\tx, y, w, h := int(r.BBox.X), int(r.BBox.Y), int(r.BBox.Width), int(r.BBox.Height)\n\t\t\tif x < 0 {\n\t\t\t\tx, w = 0, w+x\n\t\t\t}\n\t\t\tif y < 0 {\n\t\t\t\ty, h = 0, h+y\n\t\t\t}\n\t\t\tif x+w > bounds.Dx() {\n\t\t\t\tw = bounds.Dx() - x\n\t\t\t}\n\t\t\tif y+h > bounds.Dy() {\n\t\t\t\th = bounds.Dy() - y\n\t\t\t}\n\n\t\t\tfor i := range bboxLineWidth {\n\t\t\t\tfor j := x; j < x+w && j < bounds.Dx(); j++ {\n\t\t\t\t\tif y+i < bounds.Dy() {\n\t\t\t\t\t\timg.Set(j, y+i, bboxColor)\n\t\t\t\t\t}\n\t\t\t\t\tif y+h-1-i >= 0 {\n\t\t\t\t\t\timg.Set(j, y+h-1-i, bboxColor)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor j := y; j < y+h && j < bounds.Dy(); j++ {\n\t\t\t\t\tif x+i < bounds.Dx() {\n\t\t\t\t\t\timg.Set(x+i, j, bboxColor)\n\t\t\t\t\t}\n\t\t\t\t\tif x+w-1-i >= 0 {\n\t\t\t\t\t\timg.Set(x+w-1-i, j, bboxColor)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ttextLabel := r.Text\n\t\t\tlabel := fmt.Sprintf(\"%s %.2f\", textLabel, r.Confidence)\n\t\t\tlabelWidth := d.MeasureString(label).Ceil()\n\t\t\tlabelHeight := 12\n\t\t\tpadding := 4\n\n\t\t\tlabelY := y - labelHeight - padding*2\n\t\t\tif labelY < 0 {\n\t\t\t\tlabelY = y + h + padding\n\t\t\t}\n\n\t\t\tbgRect := image.Rect(x, labelY, x+labelWidth+padding*2, labelY+labelHeight+padding*2)\n\t\t\tif bgRect.Max.X > bounds.Dx() {\n\t\t\t\tbgRect.Max.X = bounds.Dx()\n\t\t\t}\n\t\t\tif bgRect.Max.Y > bounds.Dy() {\n\t\t\t\tbgRect.Max.Y = bounds.Dy()\n\t\t\t}\n\t\t\tif bgRect.Min.Y < 0 {\n\t\t\t\tbgRect.Min.Y = 0\n\t\t\t}\n\t\t\tdraw.Draw(img, bgRect, image.NewUniform(bboxColor), image.Point{}, draw.Over)\n\t\t\td.Dot = fixed.P(x+padding, labelY+labelHeight+padding)\n\t\t\td.DrawString(label)\n\t\t}\n\t\tif len(r.Mask) > 0 {\n\t\t\tcolor := colors[r.ClassID%int32(len(colors))]\n\t\t\tcolor.A = 100\n\t\t\tdrawMask(img, r.Mask, &color)\n\t\t}\n\t}\n}\n\nfunc drawMask(img *image.RGBA, mask []float32, maskColor *color.RGBA) {\n\tslog.Debug(\"Drawing mask on image\", \"mask_size\", len(mask))\n\n\tbounds := img.Bounds()\n\n\tif len(mask) != bounds.Dx()*bounds.Dy() {\n\t\tslog.Error(\"Mask size does not match image size\", \"mask_size\", len(mask), \"image_size\", bounds.Dx()*bounds.Dy())\n\t\treturn\n\t}\n\n\tvar wg sync.WaitGroup\n\tworkerSem := make(chan struct{}, runtime.NumCPU())\n\tfor y := 0; y < bounds.Dy(); y++ {\n\t\twg.Add(1)\n\t\tworkerSem <- struct{}{}\n\t\tgo func(y int) {\n\t\t\tdefer wg.Done()\n\t\t\tdefer func() { <-workerSem }()\n\t\t\tfor x := 0; x < bounds.Dx(); x++ {\n\t\t\t\tidx := y*bounds.Dx() + x\n\t\t\t\tpixel := color.RGBAModel.Convert(img.At(x, y)).(color.RGBA)\n\t\t\t\tif maskColor != nil {\n\t\t\t\t\talpha := mask[idx] * (float32(maskColor.A) / 255.0)\n\t\t\t\t\tinvAlpha := 1.0 - alpha\n\t\t\t\t\tpixel.R = uint8(float32(maskColor.R)*alpha + float32(pixel.R)*invAlpha)\n\t\t\t\t\tpixel.G = uint8(float32(maskColor.G)*alpha + float32(pixel.G)*invAlpha)\n\t\t\t\t\tpixel.B = uint8(float32(maskColor.B)*alpha + float32(pixel.B)*invAlpha)\n\t\t\t\t\tpixel.A = 255\n\t\t\t\t} else {\n\t\t\t\t\tpixel.A = uint8(mask[idx] * 255)\n\t\t\t\t}\n\t\t\t\timg.Set(x, y, pixel)\n\t\t\t}\n\t\t}(y)\n\t}\n\twg.Wait()\n}\n\nfunc CVPostProcess(input string, results []nexa_sdk.CVResult) (string, error) {\n\tfile, err := os.Open(input)\n\tif err != nil {\n\t\tslog.Error(\"Failed to open image\", \"error\", err)\n\t\treturn \"\", err\n\t}\n\tdefer file.Close()\n\n\timg, _, err := image.Decode(file)\n\tif err != nil {\n\t\tslog.Error(\"Failed to decode image\", \"error\", err)\n\t\treturn \"\", err\n\t}\n\n\tbounds := img.Bounds()\n\trgba := image.NewRGBA(bounds)\n\tdraw.Draw(rgba, bounds, img, bounds.Min, draw.Src)\n\n\tif len(results) == 1 && reflect.ValueOf(results[0].BBox).IsZero() {\n\t\tdrawMask(rgba, results[0].Mask, nil)\n\t} else {\n\t\tdrawBBoxes(rgba, results)\n\t}\n\n\t// save output image\n\tbaseName := strings.TrimSuffix(filepath.Base(input), filepath.Ext(input))\n\toutputPath := filepath.Join(\".\", baseName+\"_output.png\")\n\toutFile, err := os.Create(outputPath)\n\tif err != nil {\n\t\t// Check if it's a permission error and provide a helpful message\n\t\tif os.IsPermission(err) {\n\t\t\tcwd, _ := os.Getwd()\n\t\t\tslog.Error(\"Permission denied writing output image\", \"output_path\", outputPath, \"cwd\", cwd, \"error\", err)\n\t\t\treturn \"\", fmt.Errorf(\"failed to write %s to the current directory. Permission denied\", filepath.Base(outputPath))\n\t\t}\n\t\tslog.Error(\"Failed to create output image file\", \"error\", err)\n\t\treturn \"\", err\n\t}\n\tdefer outFile.Close()\n\n\terr = png.Encode(outFile, rgba)\n\tif err != nil {\n\t\tslog.Error(\"Failed to encode output image\", \"error\", err)\n\t\treturn \"\", err\n\t}\n\n\treturn outputPath, nil\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/main.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/cmd/nexa-cli/common\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/model_hub\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n)\n\nvar (\n\tdataDir    string\n\tverbose    bool\n\tskipUpdate bool\n\ttestMode   bool\n)\n\n// RootCmd creates the main Nexa CLI command with all subcommands.\n// It sets up the command tree structure for model management,\n// inference, and server operations.\nfunc RootCmd() *cobra.Command {\n\tcobra.EnableCommandSorting = false\n\n\trootCmd := &cobra.Command{\n\t\tUse: \"nexa\",\n\t\tPersistentPreRunE: func(cmd *cobra.Command, args []string) error {\n\t\t\t// log\n\t\t\tcommon.ApplyLogLevel()\n\n\t\t\tsubCmd := cmd.CalledAs()\n\n\t\t\t// skip update check\n\t\t\tif !skipUpdate {\n\t\t\t\tnotifyUpdate()\n\t\t\t\t// skip some quick commands\n\t\t\t\tif !slices.Contains([]string{\n\t\t\t\t\t\"remove\", \"rm\", \"clean\", \"list\", \"ls\",\n\t\t\t\t\t\"config\",\n\t\t\t\t\t\"version\", \"update\",\n\t\t\t\t}, subCmd) {\n\t\t\t\t\tgo checkUpdate()\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// license\n\t\t\tif os.Getenv(\"NEXA_TOKEN\") == \"\" {\n\t\t\t\tlicense, err := store.Get().ConfigGet(\"license\")\n\t\t\t\tif err != nil || license == \"\" {\n\t\t\t\t\tslog.Warn(\"license is not set\", \"err\", err)\n\t\t\t\t} else if err := os.Setenv(\"NEXA_TOKEN\", license); err != nil {\n\t\t\t\t\tpanic(err)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tslog.Warn(\"license is set by env, ignore config\")\n\t\t\t}\n\n\t\t\treturn nil\n\t\t},\n\t}\n\trootCmd.PersistentFlags().StringVarP(&dataDir, \"data-dir\", \"\", \"\", \"Custom data directory (env: NEXA_DATADIR)\")\n\tviper.BindPFlag(\"datadir\", rootCmd.PersistentFlags().Lookup(\"data-dir\"))\n\trootCmd.PersistentFlags().BoolVarP(&verbose, \"verbose\", \"v\", false, \"Enable verbose output\")\n\trootCmd.PersistentFlags().BoolVarP(&skipUpdate, \"skip-update\", \"\", false, \"Skip checking for updates\")\n\trootCmd.PersistentFlags().BoolVarP(&testMode, \"test-mode\", \"\", false, \"Enable test mode\")\n\n\trootCmd.AddGroup(\n\t\t&cobra.Group{ID: \"model\", Title: \"Model Commands\"},\n\t\t&cobra.Group{ID: \"inference\", Title: \"Inference Commands\"},\n\t\t&cobra.Group{ID: \"management\", Title: \"Management Commands\"},\n\t)\n\n\trootCmd.AddCommand(\n\t\tpull(), remove(), clean(), list(),\n\t\tinfer(), functionCall(),\n\t\tserve(), run(),\n\t\t_config(),\n\t\tversion(), update(),\n\t)\n\n\treturn rootCmd\n}\n\nfunc checkDependency() {\n\tif _, err := exec.LookPath(\"sox\"); err != nil {\n\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Sox is not installed, some features may not work. Try:\"))\n\t\tswitch runtime.GOOS {\n\t\tcase \"darwin\":\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  brew install sox\"))\n\t\tcase \"linux\":\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  sudo apt install sox       # Debian/Ubuntu\"))\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  sudo yum install sox       # RHEL/CentOS/Fedora\"))\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  sudo pacman -S sox         # Arch Linux\"))\n\t\tcase \"windows\":\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  winget install --id=ChrisBagwell.SoX -e\"))\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Then restart your terminal to make sure sox is in PATH\"))\n\t\tdefault:\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Please install it manually for your OS: %s\\n\", runtime.GOOS))\n\t\t}\n\t}\n\n\tif _, err := exec.LookPath(\"ffmpeg\"); err != nil {\n\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"FFmpeg is not installed, some features may not work. Try:\"))\n\t\tswitch runtime.GOOS {\n\t\tcase \"darwin\":\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  brew install ffmpeg\"))\n\t\tcase \"linux\":\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  sudo apt install ffmpeg    # Debian/Ubuntu\"))\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  sudo yum install ffmpeg    # RHEL/CentOS/Fedora\"))\n\t\tcase \"windows\":\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"  winget install --id=BtbN.FFmpeg.GPL -e\"))\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Then restart your terminal to make sure ffmpeg is in PATH\"))\n\t\tdefault:\n\t\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"Please install it manually for your OS: %s\\n\", runtime.GOOS))\n\t\t}\n\t}\n}\n\nfunc normalizeModelName(name string) (string, string) {\n\t// split quant\n\tparts := strings.SplitN(name, \":\", 2)\n\tname = parts[0]\n\tquant := \"\"\n\tif len(parts) == 2 {\n\t\tquant = strings.ToUpper(parts[1])\n\t}\n\n\t// support shortcuts\n\tif actualName, exists := config.GetModelMapping(name); exists {\n\t\treturn actualName, quant\n\t}\n\n\t// support qwen3 -> NexaAI/qwen3\n\tif !strings.Contains(name, \"/\") {\n\t\treturn \"NexaAI/\" + name, quant\n\t}\n\n\t// support https://huggingface.co/Qwen/Qwen3-0.6B-GGUF -> Qwen/Qwen3-0.6B-GGUF\n\tif strings.HasPrefix(name, model_hub.HF_ENDPOINT) {\n\t\treturn strings.TrimPrefix(name, model_hub.HF_ENDPOINT+\"/\"), quant\n\t}\n\n\treturn name, quant\n}\n\n// main is the entry point that executes the root command.\nfunc main() {\n\tif err := RootCmd().Execute(); err != nil {\n\t\tslog.Error(\"nexa-cli failed\", \"err\", err)\n\t\tos.Exit(1)\n\t}\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/model.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"regexp\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"github.com/charmbracelet/huh\"\n\t\"github.com/dustin/go-humanize\"\n\t\"github.com/jedib0t/go-pretty/v6/table\"\n\t\"github.com/spf13/cobra\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/model_hub\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n)\n\nvar (\n\tmodelHub  string\n\tlocalPath string\n\tmodelType string\n)\n\n// pull creates a command to download and cache a model by name.\n// Usage: nexa pull <model-name>\nfunc pull() *cobra.Command {\n\tpullCmd := &cobra.Command{\n\t\tGroupID: \"model\",\n\t\tUse:     \"pull <model-name>\",\n\n\t\tShort: \"Pull model from HuggingFace\",\n\t\tLong:  \"Download and cache a model by name.\",\n\t}\n\n\tpullCmd.Args = cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs)\n\n\tpullCmd.Flags().SortFlags = false\n\tpullCmd.Flags().StringVarP(&modelHub, \"model-hub\", \"\", \"\", \"specify model hub to use: volces|modelscope|s3|hf|localfs\")\n\tpullCmd.Flags().StringVarP(&localPath, \"local-path\", \"\", \"\", \"[localfs] path to local directory\")\n\tpullCmd.Flags().StringVarP(&modelType, \"model-type\", \"\", \"\", \"specify model type to use: [llm|vlm|embedder|reranker|tts|asr|diarize|cv|image_gen]\")\n\n\tpullCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\tname, quant := normalizeModelName(args[0])\n\t\terr := pullModel(name, quant)\n\t\tif err != nil {\n\t\t\tos.Exit(1)\n\t\t}\n\t}\n\n\treturn pullCmd\n}\n\n// remove creates a command to delete a cached model by name.\n// Usage: nexa remove <model-name>\nfunc remove() *cobra.Command {\n\tremoveCmd := &cobra.Command{\n\t\tGroupID: \"model\",\n\t\tUse:     \"remove <model-name> [<model-name> ...]\",\n\t\tAliases: []string{\"rm\"},\n\t\tShort:   \"Remove cached model\",\n\t\tLong:    \"Delete a cached model by name. This will remove the model files from the local cache.\",\n\t}\n\n\tremoveCmd.Args = cobra.MatchAll(cobra.MinimumNArgs(1), cobra.OnlyValidArgs)\n\n\tremoveCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\tfor _, arg := range args {\n\t\t\tname, quant := normalizeModelName(arg)\n\t\t\tif quant != \"\" {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Currently not support remove a single quant, please remove the whole model: %s\", name))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\n\t\t\ts := store.Get()\n\t\t\te := s.Remove(name)\n\t\t\tif e != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"✘  Failed to remove model: %s\", name))\n\t\t\t\tos.Exit(1)\n\t\t\t} else {\n\t\t\t\tfmt.Println(render.GetTheme().Success.Sprintf(\"✔  Removed %s!\", name))\n\t\t\t}\n\t\t}\n\t}\n\n\treturn removeCmd\n}\n\n// clean creates a command to remove all cached models and free up storage.\n// Usage: nexa clean\nfunc clean() *cobra.Command {\n\tcleanCmd := &cobra.Command{\n\t\tGroupID: \"model\",\n\t\tUse:     \"clean\",\n\t\tShort:   \"remove all cached models\",\n\t\tLong:    \"Remove all cached models and free up storage. This will delete all model files from the local cache.\",\n\t}\n\n\tcleanCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\ts := store.Get()\n\t\tc := s.Clean()\n\t\tfmt.Println(render.GetTheme().Success.Sprintf(\"✔  Removed %d models!\", c))\n\t}\n\n\treturn cleanCmd\n}\n\n// list creates a command to display all cached models in a formatted table.\n// Shows model names and their storage sizes.\n// Usage: nexa list\nfunc list() *cobra.Command {\n\tlistCmd := &cobra.Command{\n\t\tGroupID: \"model\",\n\t\tUse:     \"list\",\n\t\tAliases: []string{\"ls\"},\n\t\tShort:   \"List all cached models\",\n\t\tLong:    \"Display all cached models in a formatted table, showing model names, types, and sizes.\",\n\t}\n\n\tlistCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\ts := store.Get()\n\t\tmodels, e := s.List()\n\t\tif e != nil {\n\t\t\tfmt.Println(e)\n\t\t\tos.Exit(1)\n\t\t}\n\n\t\t// Create formatted table output\n\t\ttw := table.NewWriter()\n\t\ttw.SetOutputMirror(os.Stdout)\n\t\ttw.SetStyle(table.StyleLight)\n\t\tif verbose {\n\t\t\ttw.AppendHeader(table.Row{\"NAME\", \"SIZE\", \"PLUGIN\", \"TYPE\", \"QUANTS\"})\n\t\t\tfor _, model := range models {\n\t\t\t\ttw.AppendRow(table.Row{\n\t\t\t\t\tmodel.Name,\n\t\t\t\t\thumanize.IBytes(uint64(model.GetSize())),\n\t\t\t\t\tmodel.PluginId,\n\t\t\t\t\tmodel.ModelType,\n\t\t\t\t\tstrings.Join(func() []string {\n\t\t\t\t\t\tquants := make([]string, 0)\n\t\t\t\t\t\tfor q := range model.ModelFile {\n\t\t\t\t\t\t\tif model.ModelFile[q].Downloaded {\n\t\t\t\t\t\t\t\tquants = append(quants, q)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tslices.Sort(quants)\n\t\t\t\t\t\treturn quants\n\t\t\t\t\t}(), \",\"),\n\t\t\t\t})\n\t\t\t}\n\t\t} else {\n\t\t\ttw.AppendHeader(table.Row{\"NAME\", \"SIZE\", \"QUANTS\"})\n\t\t\tfor _, model := range models {\n\t\t\t\ttw.AppendRow(table.Row{model.Name, humanize.IBytes(uint64(model.GetSize())), strings.Join(func() []string {\n\t\t\t\t\tquants := make([]string, 0)\n\t\t\t\t\tif !slices.Contains([]string{\"cpu_gpu\", \"metal\", \"nexaml\"}, model.PluginId) {\n\t\t\t\t\t\treturn quants\n\t\t\t\t\t}\n\t\t\t\t\tfor q := range model.ModelFile {\n\t\t\t\t\t\tif model.ModelFile[q].Downloaded && q != \"N/A\" {\n\t\t\t\t\t\t\tquants = append(quants, q)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn quants\n\t\t\t\t}(), \",\")})\n\t\t\t}\n\t\t}\n\t\ttw.Render()\n\t}\n\n\treturn listCmd\n}\n\n// pull\n\nfunc pullModel(name string, quant string) error {\n\tslog.Debug(\"pullModel\", \"name\", name, \"quant\", quant)\n\n\ts := store.Get()\n\n\tmf, err := s.GetManifest(name)\n\tif err == nil {\n\t\tdownloaded := true\n\t\tfor _, f := range mf.ModelFile {\n\t\t\tif !f.Downloaded {\n\t\t\t\tdownloaded = false\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif downloaded {\n\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Already downloaded all quant\"))\n\t\t\treturn nil\n\t\t}\n\t}\n\n\t// specify model hub\n\tif localPath != \"\" && modelHub == \"\" {\n\t\tmodelHub = \"localfs\"\n\t}\n\tif modelHub != \"\" {\n\t\tswitch strings.ToLower(modelHub) {\n\t\tcase \"volces\":\n\t\t\tmodel_hub.SetHub(model_hub.NewVolces())\n\t\tcase \"ms\", \"modelscope\":\n\t\t\tmodel_hub.SetHub(model_hub.NewModelScope())\n\t\tcase \"s3\":\n\t\t\tmodel_hub.SetHub(model_hub.NewS3())\n\t\tcase \"hf\", \"huggingface\":\n\t\t\tmodel_hub.SetHub(model_hub.NewHuggingFace())\n\t\tcase \"local\", \"localfs\":\n\t\t\tif localPath == \"\" {\n\t\t\t\treturn fmt.Errorf(\"local path is required for localfs model hub\")\n\t\t\t}\n\t\t\tmodel_hub.SetHub(model_hub.NewLocalFS(localPath))\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unknown model hub: %s\", modelHub)\n\t\t}\n\t}\n\n\tspin := render.NewSpinner(\"download manifest from: \" + name)\n\tspin.Start()\n\tfiles, hmf, err := model_hub.ModelInfo(context.TODO(), name)\n\tspin.Stop()\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Get ModelInfo error: %s\", err))\n\t\treturn err\n\t}\n\n\tif hmf != nil && !isValidVersion(hmf.MinSDKVersion) {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Model requires NexaSDK version %s or higher. Please upgrade your NexaSDK CLI.\", hmf.MinSDKVersion))\n\t\treturn fmt.Errorf(\"model requires higher version\")\n\t}\n\n\tif mf != nil {\n\t\t// deepcopy manifest\n\t\tvar omf types.ModelManifest\n\t\tmfs, _ := sonic.Marshal(mf)\n\t\tsonic.Unmarshal(mfs, &omf)\n\n\t\terr := chooseQuantFiles(quant, mf)\n\t\tif err != nil {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\treturn err\n\t\t}\n\t\tpgCh, errCh := s.PullExtraQuant(context.TODO(), omf, *mf)\n\t\tbar := render.NewProgressBar(mf.GetSize()-omf.GetSize(), \"downloading\")\n\n\t\tfor pg := range pgCh {\n\t\t\tbar.Set(pg.TotalDownloaded)\n\t\t}\n\t\tbar.Exit()\n\n\t\tfor err := range errCh {\n\t\t\tbar.Clear()\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tvar manifest types.ModelManifest\n\n\t\tif hmf != nil {\n\t\t\tmanifest.ModelName = hmf.ModelName\n\t\t\tmanifest.PluginId = hmf.PluginId\n\t\t\tmanifest.DeviceId = hmf.DeviceId\n\t\t\tmanifest.ModelType = hmf.ModelType\n\t\t\tmanifest.MinSDKVersion = hmf.MinSDKVersion\n\t\t}\n\n\t\tif manifest.ModelName == \"\" {\n\t\t\tmanifest.ModelName = name\n\t\t}\n\t\tif manifest.PluginId == \"\" {\n\t\t\tmanifest.PluginId = choosePluginId(name)\n\t\t}\n\t\tif manifest.ModelType == \"\" {\n\t\t\tif ctype, err := chooseModelType(); err != nil {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\tmanifest.ModelType = ctype\n\t\t\t}\n\t\t}\n\n\t\terr := chooseFiles(name, quant, files, &manifest)\n\t\tif err != nil {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\treturn err\n\t\t}\n\n\t\tpgCh, errCh := s.Pull(context.TODO(), manifest)\n\n\t\tbar := render.NewProgressBar(manifest.GetSize(), \"downloading\")\n\n\t\tfor pg := range pgCh {\n\t\t\tbar.Set(pg.TotalDownloaded)\n\t\t}\n\t\tbar.Exit()\n\n\t\tfor err := range errCh {\n\t\t\tbar.Clear()\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\treturn err\n\t\t}\n\t}\n\n\tfmt.Println(render.GetTheme().Success.Sprintf(\"✔  Download success!\"))\n\n\treturn nil\n}\n\n// =============== quant name parse ===============\nvar quantRegix = regexp.MustCompile(`(` + strings.Join([]string{\n\t\"[fF][pP][0-9]+\",                 // FP32, FP16, FP64\n\t\"[fF][0-9]+\",                     // F64, F32, F16\n\t\"[iI][0-9]+\",                     // I64, I32, I16, I8\n\t\"[qQ][0-9]+(_[A-Za-z0-9]+)*\",     // Q8_0, Q8_1, Q8_K, Q6_K, Q5_0, Q5_1, Q5_K, Q4_0, Q4_1, Q4_K, Q3_K, Q2_K\n\t\"[iI][qQ][0-9]+(_[A-Za-z0-9]+)*\", // IQ4_NL, IQ4_XS, IQ3_S, IQ3_XXS, IQ2_XXS, IQ2_S, IQ2_XS, IQ1_S, IQ1_M\n\t\"[bB][fF][0-9]+\",                 // BF16\n\t\"[0-9]+[bB][iI][tT]\",             // 1bit, 2bit, 3bit, 4bit, 16bit, 1BIT, 16Bit, etc.\n}, \"|\") + `)`)\n\nfunc getQuant(name string) string {\n\tquant := strings.ToUpper(quantRegix.FindString(name))\n\tif quant == \"\" {\n\t\tquant = \"N/A\"\n\t}\n\treturn quant\n}\n\nfunc choosePluginId(name string) string {\n\tname = strings.ToLower(name)\n\tswitch {\n\tcase strings.Contains(name, \"mlx\"):\n\t\treturn \"metal\"\n\tdefault:\n\t\treturn \"cpu_gpu\"\n\t}\n\n}\n\nfunc chooseModelType() (types.ModelType, error) {\n\tif modelType != \"\" {\n\t\tmt := types.ModelType(modelType)\n\t\tif !slices.Contains(types.AllModelTypes, mt) {\n\t\t\treturn \"\", fmt.Errorf(\"unknown model type: %s\", modelType)\n\t\t}\n\t\treturn mt, nil\n\t}\n\n\tvar modelType types.ModelType\n\tif err := huh.NewSelect[types.ModelType]().\n\t\tTitle(\"Choose Model Type\").\n\t\tOptions(huh.NewOptions(types.AllModelTypes...)...).\n\t\tValue(&modelType).\n\t\tRun(); err != nil {\n\t\treturn \"\", err\n\t}\n\treturn modelType, nil\n}\n\nvar partRegex = regexp.MustCompile(`-\\d+-of-\\d+\\.gguf$`)\n\nfunc chooseFiles(name, specifiedQuant string, files []model_hub.ModelFileInfo, res *types.ModelManifest) (err error) {\n\tif len(files) == 0 {\n\t\terr = fmt.Errorf(\"repo is empty\")\n\t\treturn\n\t}\n\n\tres.Name = name\n\tres.ModelFile = make(map[string]types.ModelFileInfo)\n\n\t// check gguf\n\tvar mmprojs []model_hub.ModelFileInfo\n\tvar tokenizers []model_hub.ModelFileInfo\n\tvar onnxFiles []model_hub.ModelFileInfo\n\tvar nexaFiles []model_hub.ModelFileInfo\n\tvar npyFiles []model_hub.ModelFileInfo\n\tggufs := make(map[string][]model_hub.ModelFileInfo) // key is gguf name without part\n\t// qwen2.5-7b-instruct-q8_0-00003-of-00003.gguf original name is qwen2.5-7b-instruct-q8_0 *d-of-*d like this\n\n\tfor _, file := range files {\n\t\tname := strings.ToLower(file.Name)\n\t\tif strings.HasSuffix(name, \".gguf\") {\n\t\t\tif strings.HasPrefix(name, \"mmproj\") {\n\t\t\t\tmmprojs = append(mmprojs, file)\n\t\t\t} else {\n\t\t\t\tname := partRegex.ReplaceAllString(file.Name, \"\")\n\t\t\t\tggufs[name] = append(ggufs[name], file)\n\t\t\t}\n\t\t} else if strings.HasSuffix(name, \"tokenizer.json\") {\n\t\t\ttokenizers = append(tokenizers, file)\n\t\t} else if strings.HasSuffix(name, \".onnx\") {\n\t\t\tonnxFiles = append(onnxFiles, file)\n\t\t} else if strings.HasSuffix(name, \".nexa\") {\n\t\t\tnexaFiles = append(nexaFiles, file)\n\t\t} else if strings.HasSuffix(name, \".npy\") {\n\t\t\tnpyFiles = append(npyFiles, file)\n\t\t}\n\t}\n\n\t// choose model file\n\tif len(ggufs) > 0 {\n\t\t// detect gguf\n\t\tif len(ggufs) == 1 {\n\t\t\t// single quant\n\t\t\tfileInfo := types.ModelFileInfo{}\n\t\t\tfor name, gguf := range ggufs {\n\t\t\t\tfileInfo.Name = gguf[0].Name\n\t\t\t\tfileInfo.Size = gguf[0].Size\n\t\t\t\tfileInfo.Downloaded = true\n\t\t\t\tres.ModelFile[getQuant(name)] = fileInfo\n\t\t\t\t// other fragments\n\t\t\t\tfor _, file := range gguf[1:] {\n\t\t\t\t\tres.ExtraFiles = append(res.ExtraFiles, types.ModelFileInfo{\n\t\t\t\t\t\tName:       file.Name,\n\t\t\t\t\t\tDownloaded: true,\n\t\t\t\t\t\tSize:       file.Size,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t\tif specifiedQuant != \"\" && res.ModelFile[specifiedQuant].Name == \"\" {\n\t\t\t\treturn fmt.Errorf(\"Specified quant %s not found\", specifiedQuant)\n\t\t\t}\n\n\t\t} else {\n\t\t\t// choose quant\n\t\t\tvar file string\n\n\t\t\t// sort key by quant\n\t\t\tggufNames := make([]string, 0, len(ggufs))\n\t\t\tfor k := range ggufs {\n\t\t\t\tggufNames = append(ggufNames, k)\n\n\t\t\t\tif file == \"\" {\n\t\t\t\t\tfile = k\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\t// prefer Q4_0, Q4_K_M, Q8_0\n\t\t\t\tkq := getQuant(k)\n\t\t\t\tfq := getQuant(file)\n\t\t\t\tsortKey := []string{\"Q8_0\", \"Q4_K_M\", \"Q4_0\"}\n\t\t\t\tif slices.Index(sortKey, kq) > slices.Index(sortKey, fq) {\n\t\t\t\t\tfile = k\n\t\t\t\t}\n\t\t\t}\n\t\t\tsort.Slice(ggufNames, func(i, j int) bool {\n\t\t\t\treturn sumSize(ggufs[ggufNames[i]]) > sumSize(ggufs[ggufNames[j]])\n\t\t\t})\n\n\t\t\tif specifiedQuant != \"\" {\n\t\t\t\tfor _, ggufName := range ggufNames {\n\t\t\t\t\tif getQuant(ggufName) == specifiedQuant {\n\t\t\t\t\t\tfile = ggufName\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif getQuant(file) != specifiedQuant {\n\t\t\t\t\treturn fmt.Errorf(\"specified quant %s not found\", specifiedQuant)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar options []huh.Option[string]\n\t\t\t\tfor _, ggufName := range ggufNames {\n\t\t\t\t\tfmtStr := \"%-10s [%7s]\"\n\t\t\t\t\tif ggufName == file {\n\t\t\t\t\t\tfmtStr += \" (default)\"\n\t\t\t\t\t}\n\t\t\t\t\toptions = append(options, huh.NewOption(\n\t\t\t\t\t\tfmt.Sprintf(fmtStr, getQuant(ggufName), humanize.IBytes(uint64(sumSize(ggufs[ggufName])))),\n\t\t\t\t\t\tggufName,\n\t\t\t\t\t))\n\t\t\t\t}\n\n\t\t\t\tif err = huh.NewSelect[string]().\n\t\t\t\t\tTitle(\"Choose a quant version to download\").\n\t\t\t\t\tOptions(options...).\n\t\t\t\t\tValue(&file).\n\t\t\t\t\tRun(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor k, gguf := range ggufs {\n\t\t\t\tdownloaded := k == file\n\t\t\t\t// sort files by name\n\t\t\t\tsort.Slice(gguf, func(i, j int) bool {\n\t\t\t\t\treturn gguf[i].Name < gguf[j].Name\n\t\t\t\t})\n\t\t\t\tres.ModelFile[getQuant(k)] = types.ModelFileInfo{\n\t\t\t\t\tName:       gguf[0].Name,\n\t\t\t\t\tDownloaded: downloaded,\n\t\t\t\t\tSize:       sumSize(ggufs[k]),\n\t\t\t\t}\n\t\t\t\tfor _, file := range ggufs[k][1:] {\n\t\t\t\t\tres.ExtraFiles = append(res.ExtraFiles, types.ModelFileInfo{\n\t\t\t\t\t\tName:       file.Name,\n\t\t\t\t\t\tDownloaded: downloaded,\n\t\t\t\t\t\tSize:       file.Size,\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// detect mmproj\n\t\tswitch len(mmprojs) {\n\t\tcase 0:\n\t\t\t// fallback to onnx file as mmproj if no regular mmproj found and exactly one onnx file exists\n\t\t\tif len(onnxFiles) == 1 {\n\t\t\t\tres.MMProjFile.Name = onnxFiles[0].Name\n\t\t\t\tres.MMProjFile.Size = onnxFiles[0].Size\n\t\t\t\tres.MMProjFile.Downloaded = true\n\t\t\t} else if len(nexaFiles) == 1 {\n\t\t\t\t// fallback to nexa file as mmproj if no onnx file and exactly one nexa file exists\n\t\t\t\tres.MMProjFile.Name = nexaFiles[0].Name\n\t\t\t\tres.MMProjFile.Size = nexaFiles[0].Size\n\t\t\t\tres.MMProjFile.Downloaded = true\n\t\t\t}\n\t\tcase 1:\n\t\t\tres.MMProjFile.Name = mmprojs[0].Name\n\t\t\tres.MMProjFile.Size = mmprojs[0].Size\n\t\t\tres.MMProjFile.Downloaded = true\n\n\t\tdefault:\n\t\t\t// match biggest\n\t\t\tvar file model_hub.ModelFileInfo\n\t\t\tfor _, mmproj := range mmprojs {\n\t\t\t\tif mmproj.Size > file.Size {\n\t\t\t\t\tfile = mmproj\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tres.MMProjFile.Name = file.Name\n\t\t\tres.MMProjFile.Size = file.Size\n\t\t\tres.MMProjFile.Downloaded = true\n\t\t}\n\n\t\t// detect tokenizer for gguf models\n\t\tswitch len(tokenizers) {\n\t\tcase 0:\n\t\t\t// No tokenizer file found - skip\n\t\tcase 1:\n\t\t\tres.TokenizerFile.Name = tokenizers[0].Name\n\t\t\tres.TokenizerFile.Size = tokenizers[0].Size\n\t\t\tres.TokenizerFile.Downloaded = true\n\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"multiple tokenizer files found: %v. Expected exactly one tokenizer file\", tokenizers)\n\t\t}\n\n\t\t// Always include .nexa files as extra files when gguf is the main model, except if used as mmproj\n\t\tfor _, nexaFile := range nexaFiles {\n\t\t\t// Skip if this nexa file is being used as mmproj\n\t\t\tif res.MMProjFile.Name != nexaFile.Name {\n\t\t\t\tres.ExtraFiles = append(res.ExtraFiles, types.ModelFileInfo{\n\t\t\t\t\tName:       nexaFile.Name,\n\t\t\t\t\tDownloaded: true,\n\t\t\t\t\tSize:       nexaFile.Size,\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\t// Always include .npy files as extra files when gguf is the main model\n\t\tfor _, npyFile := range npyFiles {\n\t\t\tres.ExtraFiles = append(res.ExtraFiles, types.ModelFileInfo{\n\t\t\t\tName:       npyFile.Name,\n\t\t\t\tDownloaded: true,\n\t\t\t\tSize:       npyFile.Size,\n\t\t\t})\n\t\t}\n\n\t} else {\n\t\t// mlx\n\t\tif specifiedQuant != \"\" {\n\t\t\treturn fmt.Errorf(\"specified quant %s only support in gguf model\", specifiedQuant)\n\t\t}\n\n\t\t// quant\n\t\tquant := getQuant(name)\n\t\tif quant == \"N/A\" {\n\t\t\tif q, err := model_hub.GetFileContent(context.TODO(), name, \"config.json\"); err != nil {\n\t\t\t} else if b, err := sonic.Get(q, \"quantization_config\", \"bits\"); err != nil {\n\t\t\t} else if q, err := b.Float64(); err != nil {\n\t\t\t} else {\n\t\t\t\tquant = fmt.Sprintf(\"%dBIT\", uint32(q))\n\t\t\t}\n\t\t}\n\n\t\t// Detect macOS model bundles (.mlmodelc and .mlpackage)\n\t\t// These appear as folders on HuggingFace but are actually model bundles\n\t\tbundlePaths := detectMacOSBundles(files)\n\n\t\tif len(bundlePaths) > 0 {\n\t\t\t// Use the first bundle as the model path\n\t\t\tbundlePath := bundlePaths[0]\n\n\t\t\t// Calculate total size of the primary bundle\n\t\t\tvar primaryBundleSize int64\n\t\t\tfor _, file := range files {\n\t\t\t\tif strings.HasPrefix(file.Name, bundlePath+\"/\") {\n\t\t\t\t\tprimaryBundleSize += file.Size\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set the first bundle path as the model file (this is a directory reference, not a downloadable file)\n\t\t\tres.ModelFile[quant] = types.ModelFileInfo{\n\t\t\t\tName:       bundlePath,\n\t\t\t\tDownloaded: true, // Mark as available for inference\n\t\t\t\tSize:       primaryBundleSize,\n\t\t\t}\n\n\t\t\t// Add ALL files to ExtraFiles - this includes:\n\t\t\t// 1. All files from the primary bundle\n\t\t\t// 2. All files from other bundles\n\t\t\t// 3. All other files in the repo\n\t\t\t// The bundle paths themselves are not downloadable, only the files within them are\n\t\t\tfor _, file := range files {\n\t\t\t\tres.ExtraFiles = append(res.ExtraFiles, types.ModelFileInfo{\n\t\t\t\t\tName:       file.Name,\n\t\t\t\t\tDownloaded: true,\n\t\t\t\t\tSize:       file.Size,\n\t\t\t\t})\n\t\t\t}\n\t\t} else {\n\t\t\t// Original logic for non-bundle files\n\t\t\t// detect main model file\n\t\t\tisSupportedModelFile := func(filename string) bool {\n\t\t\t\tlower := strings.ToLower(filename)\n\t\t\t\treturn strings.HasSuffix(lower, \"safetensors\") ||\n\t\t\t\t\tstrings.HasSuffix(lower, \"npz\") ||\n\t\t\t\t\tstrings.HasSuffix(lower, \"nexa\") ||\n\t\t\t\t\tstrings.HasSuffix(lower, \"bin\")\n\t\t\t}\n\n\t\t\t// First pass: prefer non-nested supported files (not in subdirectories)\n\t\t\tfor _, file := range files {\n\t\t\t\tif isSupportedModelFile(file.Name) && !strings.Contains(file.Name, \"/\") {\n\t\t\t\t\tres.ModelFile[quant] = types.ModelFileInfo{Name: file.Name, Size: file.Size}\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Second pass: if no non-nested file found, fall back to any supported file\n\t\t\tif res.ModelFile[quant].Name == \"\" {\n\t\t\t\tfor _, file := range files {\n\t\t\t\t\tif isSupportedModelFile(file.Name) {\n\t\t\t\t\t\tres.ModelFile[quant] = types.ModelFileInfo{Name: file.Name, Size: file.Size}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// add other files to ExtraFiles\n\t\t\tfor _, file := range files {\n\t\t\t\tif file.Name != res.ModelFile[quant].Name {\n\t\t\t\t\tres.ExtraFiles = append(res.ExtraFiles, types.ModelFileInfo{Name: file.Name, Size: file.Size})\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// fallback to first file\n\t\t\tif res.ModelFile[quant].Name == \"\" {\n\t\t\t\tres.ModelFile[quant] = types.ModelFileInfo{Name: files[0].Name, Size: files[0].Size}\n\t\t\t\tres.ExtraFiles = res.ExtraFiles[1:]\n\t\t\t}\n\n\t\t\tres.ModelFile[quant] = types.ModelFileInfo{\n\t\t\t\tName:       res.ModelFile[quant].Name,\n\t\t\t\tDownloaded: true,\n\t\t\t\tSize:       res.ModelFile[quant].Size,\n\t\t\t}\n\t\t\tfor i, v := range res.ExtraFiles {\n\t\t\t\tres.ExtraFiles[i] = types.ModelFileInfo{\n\t\t\t\t\tName:       v.Name,\n\t\t\t\t\tDownloaded: true,\n\t\t\t\t\tSize:       v.Size,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn\n}\n\nfunc chooseQuantFiles(specifiedQuant string, res *types.ModelManifest) error {\n\t// sort key by quant\n\tggufQuants := make([]string, 0, len(res.ModelFile))\n\tfor k := range res.ModelFile {\n\t\tggufQuants = append(ggufQuants, k)\n\t}\n\tsort.Slice(ggufQuants, func(i, j int) bool {\n\t\treturn res.ModelFile[ggufQuants[i]].Size > res.ModelFile[ggufQuants[j]].Size\n\t})\n\n\t// choose quant\n\tvar quant string\n\tif specifiedQuant != \"\" {\n\t\tif fileinfo, ok := res.ModelFile[specifiedQuant]; !ok {\n\t\t\treturn fmt.Errorf(\"specified quant %s not found\", specifiedQuant)\n\t\t} else if fileinfo.Downloaded {\n\t\t\treturn fmt.Errorf(\"specified quant %s already downloaded\", specifiedQuant)\n\t\t}\n\t\tquant = specifiedQuant\n\t} else {\n\t\toptions := make([]huh.Option[string], 0, len(res.ModelFile))\n\t\tfor _, q := range ggufQuants {\n\t\t\tm := res.ModelFile[q]\n\t\t\tif m.Downloaded {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\toptions = append(options, huh.NewOption(\n\t\t\t\tfmt.Sprintf(\"%-10s [%7s]\", q, humanize.IBytes(uint64(m.Size))), q,\n\t\t\t))\n\t\t}\n\n\t\tif err := huh.NewSelect[string]().\n\t\t\tTitle(\"Choose a quant version to download\").\n\t\t\tOptions(options...).\n\t\t\tValue(&quant).\n\t\t\tRun(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tres.ModelFile[quant] = types.ModelFileInfo{\n\t\tName:       res.ModelFile[quant].Name,\n\t\tDownloaded: true,\n\t\tSize:       res.ModelFile[quant].Size,\n\t}\n\n\t// other fragments\n\tfile := res.ModelFile[quant].Name\n\tggufName := partRegex.ReplaceAllString(file, \"\")\n\tfor i, f := range res.ExtraFiles {\n\t\tif ggufName == partRegex.ReplaceAllString(f.Name, \"\") {\n\t\t\tres.ExtraFiles[i] = types.ModelFileInfo{\n\t\t\t\tName:       f.Name,\n\t\t\t\tDownloaded: true,\n\t\t\t}\n\t\t}\n\n\t}\n\n\treturn nil\n}\n\nfunc sumSize(files []model_hub.ModelFileInfo) int64 {\n\tvar size int64\n\tfor _, f := range files {\n\t\tsize += f.Size\n\t}\n\treturn size\n}\n\n// detectMacOSBundles detects .mlmodelc and .mlpackage bundles from file list\n// Returns a list of bundle paths (e.g., \"EmbedNeuralVision.mlmodelc\")\nfunc detectMacOSBundles(files []model_hub.ModelFileInfo) []string {\n\tbundleMap := make(map[string]bool)\n\n\tfor _, file := range files {\n\t\t// Case-insensitive check for .mlmodelc/ or .mlpackage/\n\t\tlowerName := strings.ToLower(file.Name)\n\t\tif idx := strings.Index(lowerName, \".mlmodelc/\"); idx != -1 {\n\t\t\tbundlePath := file.Name[:idx+len(\".mlmodelc\")]\n\t\t\tbundleMap[bundlePath] = true\n\t\t} else if idx := strings.Index(lowerName, \".mlpackage/\"); idx != -1 {\n\t\t\tbundlePath := file.Name[:idx+len(\".mlpackage\")]\n\t\t\tbundleMap[bundlePath] = true\n\t\t}\n\t}\n\n\t// Convert map to sorted slice for consistent ordering\n\tbundles := make([]string, 0, len(bundleMap))\n\tfor bundle := range bundleMap {\n\t\tbundles = append(bundles, bundle)\n\t}\n\tsort.Strings(bundles)\n\n\treturn bundles\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/model_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport \"testing\"\n\nfunc TestQuantRegix_MatchAllQuantLevels(t *testing.T) {\n\t// Test all quantization levels based on the provided list\n\tquantLevels := []string{\n\t\t// Uppercase\n\t\t\"FP32\", \"FP16\", \"FP64\",\n\t\t\"F64\", \"F32\", \"F16\",\n\t\t\"I64\", \"I32\", \"I16\", \"I8\",\n\t\t\"BF16\",\n\t\t\"Q8_0\", \"Q8_1\", \"Q8_K\", \"Q6_K\", \"Q5_0\", \"Q5_1\", \"Q5_K\", \"Q4_0\", \"Q4_1\", \"Q4_K\", \"Q3_K\", \"Q2_K\",\n\t\t\"IQ4_NL\", \"IQ4_XS\", \"IQ3_S\", \"IQ3_XXS\", \"IQ2_XXS\", \"IQ2_S\", \"IQ2_XS\", \"IQ1_S\", \"IQ1_M\",\n\t\t\"1bit\", \"2bit\", \"3bit\", \"4bit\", \"16bit\",\n\n\t\t// Lowercase versions\n\t\t\"fp32\", \"fp16\", \"fp64\",\n\t\t\"f64\", \"f32\", \"f16\",\n\t\t\"i64\", \"i32\", \"i16\", \"i8\",\n\t\t\"bf16\",\n\t\t\"q8_0\", \"q8_1\", \"q8_k\", \"q6_k\", \"q5_0\", \"q5_1\", \"q5_k\", \"q4_0\", \"q4_1\", \"q4_k\", \"q3_k\", \"q2_k\",\n\t\t\"iq4_nl\", \"iq4_xs\", \"iq3_s\", \"iq3_xxs\", \"iq2_xxs\", \"iq2_s\", \"iq2_xs\", \"iq1_s\", \"iq1_m\",\n\t\t\"1bit\", \"2bit\", \"3bit\", \"4bit\", \"16bit\",\n\n\t\t// Mixed case versions\n\t\t\"Fp32\", \"fP16\", \"Fp64\",\n\t\t\"F64\", \"f32\", \"F16\",\n\t\t\"I64\", \"i32\", \"I16\", \"I8\",\n\t\t\"Bf16\", \"bF16\",\n\t\t\"Q8_0\", \"q8_1\", \"Q8_k\", \"q6_K\", \"Q5_0\", \"q5_1\", \"Q5_k\", \"Q4_0\", \"q4_1\", \"Q4_k\", \"q3_K\", \"Q2_k\",\n\t\t\"Iq4_nl\", \"iQ4_xs\", \"Iq3_s\", \"iQ3_xxs\", \"Iq2_xxs\", \"iQ2_s\", \"Iq2_xs\", \"iQ1_s\", \"Iq1_m\",\n\t\t\"1BIT\", \"2BIT\", \"3BIT\", \"4BIT\", \"16BIT\",\n\t\t\"1Bit\", \"2Bit\", \"3Bit\", \"4Bit\", \"16Bit\",\n\t\t\"1bIt\", \"2bIt\", \"3bIt\", \"4bIt\", \"16bIt\",\n\t}\n\n\tfor _, level := range quantLevels {\n\t\tmatched := quantRegix.FindString(level)\n\t\tif matched != level {\n\t\t\tt.Errorf(\"quantRegix did not match: %s, %s\", level, matched)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/run.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\t\"unicode\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/option\"\n\t\"github.com/spf13/cobra\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/cmd/nexa-cli/common\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/record\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nvar client openai.Client\n\nfunc run() *cobra.Command {\n\trunCmd := &cobra.Command{\n\t\tGroupID: \"inference\",\n\t\tUse:     \"run <model-name>\",\n\t\tShort:   \"Infer a model with server\",\n\t\tLong:    \"Infer a model with server. The server must be running and the model should be downloaded and cached locally.\",\n\t}\n\n\trunCmd.Args = cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs)\n\tfor _, flags := range flagGroups {\n\t\trunCmd.Flags().AddFlagSet(flags)\n\t}\n\n\trunCmd.SetUsageFunc(func(c *cobra.Command) error {\n\t\tw := c.OutOrStdout()\n\t\tfmt.Fprint(w, \"Usage:\")\n\t\tif c.Runnable() {\n\t\t\tfmt.Fprintf(w, \"\\n  %s\", c.UseLine())\n\t\t}\n\t\tif len(c.Aliases) > 0 {\n\t\t\tfmt.Fprintf(w, \"\\n\\nAliases:\\n\")\n\t\t\tfmt.Fprintf(w, \"  %s\", c.NameAndAliases())\n\t\t}\n\n\t\tfor _, flags := range flagGroups {\n\t\t\tfmt.Fprintf(w, \"\\n\\n%s Flags:\\n\", flags.Name())\n\t\t\tfmt.Fprint(w, strings.TrimRightFunc(flags.FlagUsages(), unicode.IsSpace))\n\t\t}\n\n\t\tif c.HasAvailableInheritedFlags() {\n\t\t\tfmt.Fprintf(w, \"\\n\\nGlobal Flags:\\n\")\n\t\t\tfmt.Fprint(w, strings.TrimRightFunc(c.InheritedFlags().FlagUsages(), unicode.IsSpace))\n\t\t}\n\t\tfmt.Fprintln(w)\n\t\treturn nil\n\t})\n\n\trunCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\tname, quant := normalizeModelName(args[0])\n\t\tif quant != \"\" {\n\t\t\tname = name + \":\" + quant\n\t\t}\n\n\t\tclient = openai.NewClient(\n\t\t\toption.WithBaseURL(fmt.Sprintf(\"http://%s/v1\", config.Get().Host)),\n\t\t\t// option.WithRequestTimeout(time.Second*15),\n\t\t)\n\n\t\t// check\n\t\tmodelInfo, err := client.Models.Get(context.TODO(), name)\n\t\tif err != nil {\n\t\t\tif _, ok := err.(net.Error); ok {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Is server running? Please check your network. \\n\\t%s\", err))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t\tif e, ok := err.(*openai.Error); ok && e.StatusCode == http.StatusNotFound {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Model or quant not found: %s, Please download first\", name))\n\t\t\t\tos.Exit(1)\n\t\t\t} else {\n\t\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"get model error: %s\", err.Error()))\n\t\t\t\tos.Exit(1)\n\t\t\t}\n\t\t}\n\n\t\tvar manifest types.ModelManifest\n\t\tsonic.UnmarshalString(modelInfo.RawJSON(), &manifest)\n\n\t\tswitch manifest.ModelType {\n\t\tcase types.ModelTypeLLM, types.ModelTypeVLM:\n\t\t\terr = runCompletions(manifest, quant)\n\t\tcase types.ModelTypeEmbedder:\n\t\t\terr = runEmbeddings(manifest, quant)\n\t\tcase types.ModelTypeReranker:\n\t\t\terr = runReranking(manifest, quant)\n\t\tcase types.ModelTypeTTS:\n\t\t\terr = runAudioSpeech(manifest, quant)\n\t\tcase types.ModelTypeASR:\n\t\t\terr = runAudioTranscription(manifest, quant)\n\t\tcase types.ModelTypeDiarize:\n\t\t\terr = runAudioDiarize(manifest, quant)\n\t\tcase types.ModelTypeCV:\n\t\t\terr = runCV(manifest, quant)\n\t\tcase types.ModelTypeImageGen:\n\t\t\t// ImageGen model is a directory, not a file\n\t\t\terr = runImagesGenerations(manifest, quant)\n\t\tdefault:\n\t\t\tpanic(\"not support model type\")\n\t\t}\n\n\t\tswitch err {\n\t\tcase nil:\n\t\t\tos.Exit(0)\n\t\tdefault:\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Error: %s\", err))\n\t\t\tos.Exit(1)\n\t\t}\n\t}\n\treturn runCmd\n}\n\nfunc runCompletions(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := openai.ChatCompletionNewParams{\n\t\tMessages: nil,\n\t\tModel:    name,\n\t}\n\tif systemPrompt != \"\" {\n\t\twarmUpRequest.Messages = append(warmUpRequest.Messages, openai.SystemMessage(systemPrompt))\n\t}\n\t_, err := client.Chat.Completions.New(context.TODO(),\n\t\twarmUpRequest,\n\t\toption.WithJSONSet(\"ngl\", ngl),\n\t\toption.WithJSONSet(\"nctx\", nctx),\n\t)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// repl\n\tvar history []openai.ChatCompletionMessageParamUnion\n\tif systemPrompt != \"\" {\n\t\thistory = append(history, openai.SystemMessage(systemPrompt))\n\t}\n\n\tprocessor := &common.Processor{\n\t\tHideThink: hideThink,\n\t\tParseFile: manifest.ModelType == types.ModelTypeVLM,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, images, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tif len(images) > 0 || len(audios) > 0 {\n\t\t\t\tcontents := make([]openai.ChatCompletionContentPartUnionParam, 0)\n\t\t\t\tcontents = append(contents, openai.ChatCompletionContentPartUnionParam{\n\t\t\t\t\tOfText: &openai.ChatCompletionContentPartTextParam{\n\t\t\t\t\t\tText: prompt,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tfor _, image := range images {\n\t\t\t\t\tcontents = append(contents, openai.ChatCompletionContentPartUnionParam{\n\t\t\t\t\t\tOfImageURL: &openai.ChatCompletionContentPartImageParam{\n\t\t\t\t\t\t\tImageURL: openai.ChatCompletionContentPartImageImageURLParam{\n\t\t\t\t\t\t\t\tURL: image,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tfor _, audio := range audios {\n\t\t\t\t\tcontents = append(contents, openai.ChatCompletionContentPartUnionParam{\n\t\t\t\t\t\tOfInputAudio: &openai.ChatCompletionContentPartInputAudioParam{\n\t\t\t\t\t\t\tInputAudio: openai.ChatCompletionContentPartInputAudioInputAudioParam{\n\t\t\t\t\t\t\t\tData: audio,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\thistory = append(history, openai.UserMessage(contents))\n\t\t\t} else {\n\t\t\t\thistory = append(history, openai.UserMessage(prompt))\n\t\t\t}\n\n\t\t\tstart := time.Now()\n\t\t\tacc := openai.ChatCompletionAccumulator{}\n\t\t\tstream := client.Chat.Completions.NewStreaming(context.Background(), openai.ChatCompletionNewParams{\n\t\t\t\tMessages:            history,\n\t\t\t\tModel:               name,\n\t\t\t\tStreamOptions:       openai.ChatCompletionStreamOptionsParam{IncludeUsage: openai.Opt(true)},\n\t\t\t\tTemperature:         openai.Float(float64(temperature)),\n\t\t\t\tTopP:                openai.Float(float64(topP)),\n\t\t\t\tPresencePenalty:     openai.Float(float64(presencePenalty)),\n\t\t\t\tFrequencyPenalty:    openai.Float(float64(frequencyPenalty)),\n\t\t\t\tSeed:                openai.Int(int64(seed)),\n\t\t\t\tMaxCompletionTokens: openai.Int(int64(maxTokens)),\n\t\t\t},\n\n\t\t\t\toption.WithJSONSet(\"enable_think\", enableThink),\n\t\t\t\toption.WithJSONSet(\"top_k\", topK),\n\t\t\t\toption.WithJSONSet(\"min_p\", minP),\n\t\t\t\toption.WithJSONSet(\"repetition_penalty\", repetitionPenalty),\n\t\t\t\toption.WithJSONSet(\"grammar_path\", grammarPath),\n\t\t\t\toption.WithJSONSet(\"grammar_string\", grammarString),\n\t\t\t\toption.WithJSONSet(\"enable_json\", enableJson),\n\n\t\t\t\toption.WithJSONSet(\"ngl\", ngl),\n\t\t\t\toption.WithJSONSet(\"nctx\", nctx),\n\t\t\t\toption.WithJSONSet(\"enable_think\", enableThink),\n\n\t\t\t\toption.WithJSONSet(\"image_max_length\", imageMaxLength),\n\n\t\t\t\toption.WithHeaderAdd(\"Nexa-KeepCache\", \"true\"))\n\n\t\t\tvar firstToken time.Time\n\t\t\tvar profileData nexa_sdk.ProfileData\n\t\t\tfor stream.Next() {\n\t\t\t\tif firstToken.IsZero() {\n\t\t\t\t\tfirstToken = time.Now()\n\t\t\t\t}\n\n\t\t\t\tchunk := stream.Current()\n\t\t\t\tacc.AddChunk(chunk)\n\t\t\t\tif len(chunk.Choices) > 0 {\n\t\t\t\t\tif !onToken(chunk.Choices[0].Delta.Content) {\n\t\t\t\t\t\tstream.Close()\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif chunk.Usage.PromptTokens > 0 {\n\t\t\t\t\tprofileData.PromptTokens = chunk.Usage.PromptTokens\n\t\t\t\t\tprofileData.GeneratedTokens = chunk.Usage.CompletionTokens\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// zero token generated\n\t\t\tif firstToken.IsZero() {\n\t\t\t\tfirstToken = time.Now()\n\t\t\t}\n\n\t\t\tend := time.Now()\n\t\t\tprofileData.TTFT = firstToken.Sub(start).Microseconds()\n\t\t\tprofileData.PromptTime = profileData.TTFT\n\t\t\tprofileData.DecodeTime = end.Sub(firstToken).Microseconds()\n\t\t\tprofileData.DecodingSpeed = float64(profileData.GeneratedTokens) / float64(end.Sub(firstToken).Seconds())\n\n\t\t\tif stream.Err() != nil {\n\t\t\t\treturn \"\", profileData, stream.Err()\n\t\t\t}\n\n\t\t\tif len(acc.Choices) > 0 {\n\t\t\t\thistory = append(history, openai.AssistantMessage(acc.Choices[0].Message.Content))\n\t\t\t\treturn acc.Choices[0].Message.Content, profileData, nil\n\t\t\t}\n\n\t\t\treturn \"\", profileData, nil\n\t\t},\n\t}\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tReset: func() error {\n\t\t\t\thistory = nil\n\t\t\t\t_, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{\n\t\t\t\t\tMessages: nil,\n\t\t\t\t\tModel:    name,\n\t\t\t\t})\n\t\t\t\treturn err\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n\nfunc runEmbeddings(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := openai.EmbeddingNewParams{\n\t\tModel: name,\n\t\tInput: openai.EmbeddingNewParamsInputUnion{OfArrayOfStrings: []string{}},\n\t}\n\t_, err := client.Embeddings.New(context.TODO(), warmUpRequest)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tprocessor := &common.Processor{\n\t\tParseFile: manifest.ModelType == types.ModelTypeVLM,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tstart := time.Now()\n\n\t\t\tres, err := client.Embeddings.New(context.TODO(), openai.EmbeddingNewParams{\n\t\t\t\tModel: name,\n\t\t\t\tInput: openai.EmbeddingNewParamsInputUnion{\n\t\t\t\t\tOfString: openai.String(prompt),\n\t\t\t\t},\n\t\t\t},\n\t\t\t\toption.WithJSONSet(\"task_type\", taskType),\n\t\t\t)\n\n\t\t\tduration := time.Since(start).Microseconds()\n\t\t\tprofileData := nexa_sdk.ProfileData{\n\t\t\t\tTTFT:            duration,\n\t\t\t\tPromptTime:      0,\n\t\t\t\tDecodeTime:      duration,\n\t\t\t\tPromptTokens:    res.Usage.PromptTokens,\n\t\t\t\tGeneratedTokens: res.Usage.TotalTokens - res.Usage.PromptTokens,\n\t\t\t\tAudioDuration:   0,\n\t\t\t\tPrefillSpeed:    0,\n\t\t\t\tDecodingSpeed:   float64(res.Usage.TotalTokens-res.Usage.PromptTokens) / (float64(duration) / 1e6),\n\t\t\t}\n\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\temb := res.Data[0].Embedding\n\t\t\tn := len(emb)\n\t\t\tinfo := render.GetTheme().Info.Sprintf(\"Embedding\")\n\t\t\tvar out string\n\t\t\tif len(emb) > 6 {\n\t\t\t\temb := res.Data[0].Embedding\n\t\t\t\tout = render.GetTheme().Success.Sprintf(\n\t\t\t\t\t\"[%.6f, %.6f, %.6f, ..., %.6f, %.6f, %.6f] (length: %d)\",\n\t\t\t\t\temb[0], emb[1], emb[2],\n\t\t\t\t\temb[n-3], emb[n-2], emb[n-1], n,\n\t\t\t\t)\n\t\t\t} else {\n\t\t\t\tout = render.GetTheme().Success.Sprintf(\"%v (length: %d)\", emb, n)\n\t\t\t}\n\n\t\t\tdata := fmt.Sprintf(\"%s: %s\", info, out)\n\t\t\tonToken(data)\n\t\t\treturn data, profileData, err\n\n\t\t},\n\t}\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n\nfunc runReranking(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := map[string]any{\n\t\t\"model\": name,\n\t}\n\terr := client.Post(context.TODO(), \"reranking\", warmUpRequest, nil)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tconst SEP = \"\\\\n\"\n\tprocessor := &common.Processor{\n\t\tParseFile: manifest.ModelType == types.ModelTypeVLM,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tparsedPrompt := strings.Split(prompt, SEP)\n\t\t\tif len(parsedPrompt) < 2 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"parsed prompt failed, query and document are required for reranking\")\n\t\t\t}\n\n\t\t\tquery := parsedPrompt[0]\n\t\t\tdocument := parsedPrompt[1:]\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Query: %s\", query))\n\t\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Processing %d documents\", len(document)))\n\n\t\t\tstart := time.Now()\n\n\t\t\tres := struct {\n\t\t\t\tResult []float32 `json:\"result\"`\n\t\t\t}{}\n\t\t\terr := client.Post(context.TODO(), \"reranking\", map[string]any{\n\t\t\t\t\"model\":     name,\n\t\t\t\t\"query\":     query,\n\t\t\t\t\"documents\": document,\n\t\t\t}, &res)\n\n\t\t\tduration := time.Since(start).Microseconds()\n\t\t\tprofileData := nexa_sdk.ProfileData{\n\t\t\t\tTTFT:       duration,\n\t\t\t\tPromptTime: 0,\n\t\t\t\tDecodeTime: duration,\n\t\t\t\t// PromptTokens:    res.Usage.PromptTokens,\n\t\t\t\t// GeneratedTokens: res.Usage.TotalTokens - res.Usage.PromptTokens,\n\t\t\t\tAudioDuration: 0,\n\t\t\t\tPrefillSpeed:  0,\n\t\t\t\t// DecodingSpeed:   float64(res.Usage.TotalTokens-res.Usage.PromptTokens) / (float64(duration) / 1e6),\n\t\t\t}\n\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\tfmt.Println(render.GetTheme().Success.Sprintf(\"✓ Reranking completed successfully. Generated %d scores\", len(res.Result)))\n\n\t\t\t// Display results\n\t\t\tvar data strings.Builder\n\t\t\tfor i, doc := range document {\n\t\t\t\tif i < len(res.Result) {\n\t\t\t\t\tline := fmt.Sprintf(\"\\n%s [%d]: %s\\n\", render.GetTheme().Info.Sprintf(\"Document\"), i+1, doc)\n\t\t\t\t\tonToken(line)\n\t\t\t\t\tdata.WriteString(line)\n\t\t\t\t\tline = fmt.Sprintf(\"%s: %.6f\\n\", render.GetTheme().Info.Sprintf(\"Score\"), res.Result[i])\n\t\t\t\t\tonToken(line)\n\t\t\t\t\tdata.WriteString(line)\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn data.String(), profileData, err\n\t\t},\n\t}\n\n\tif query != \"\" || len(document) > 0 {\n\t\tif query == \"\" || len(document) == 0 {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"query and document are required for reranking\"))\n\t\t\treturn errors.New(\"query and document are required for reranking\")\n\t\t}\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif query == \"\" || len(document) == 0 {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\tprompt := strings.Join(append([]string{query}, document...), SEP)\n\t\t\tquery, document = \"\", nil\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(prompt))\n\t\t\treturn prompt, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n\nfunc runAudioSpeech(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := openai.AudioSpeechNewParams{\n\t\tModel: name,\n\t\tInput: \"\",\n\t}\n\t_, err := client.Audio.Speech.New(context.TODO(), warmUpRequest)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// TODO: support list voice over server\n\tif listVoice {\n\t\treturn fmt.Errorf(\"not implemented\")\n\t}\n\n\tprocessor := &common.Processor{\n\t\tVerbose:  verbose,\n\t\tTestMode: testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\n\t\t\tstart := time.Now()\n\n\t\t\ttextToSynthesize := strings.TrimSpace(prompt)\n\t\t\tif textToSynthesize == \"\" {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"prompt cannot be empty\")\n\t\t\t}\n\n\t\t\t// Generate output filename if not specified\n\t\t\toutputFile := output\n\t\t\tif outputFile == \"\" {\n\t\t\t\toutputFile = fmt.Sprintf(\"tts_output_%d.wav\", time.Now().Unix())\n\t\t\t}\n\n\t\t\tres, err := client.Audio.Speech.New(context.TODO(), openai.AudioSpeechNewParams{\n\t\t\t\tModel: name,\n\t\t\t\tVoice: openai.AudioSpeechNewParamsVoice(voice),\n\t\t\t\tSpeed: openai.Float(float64(speechSpeed)),\n\t\t\t})\n\n\t\t\tduration := time.Since(start).Microseconds()\n\t\t\tprofileData := nexa_sdk.ProfileData{\n\t\t\t\tTTFT:       duration,\n\t\t\t\tDecodeTime: duration,\n\t\t\t}\n\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\t// Save audio to filename\n\t\t\taudioData, err := io.ReadAll(res.Body)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\t\t\terr = os.WriteFile(outputFile, audioData, 0644)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\tdata := render.GetTheme().Success.Sprintf(\"✓ Audio saved: %s\", outputFile)\n\t\t\tonToken(data)\n\t\t\treturn data, profileData, err\n\n\t\t},\n\t}\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n\nfunc runAudioTranscription(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := openai.AudioTranscriptionNewParams{\n\t\tModel: name,\n\t}\n\t_, err := client.Audio.Transcriptions.New(context.TODO(), warmUpRequest)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(prompt string, _, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tif len(audios) == 0 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, common.ErrNoAudio\n\t\t\t}\n\t\t\tif len(audios) > 1 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"only one audio file is supported\")\n\t\t\t}\n\n\t\t\t// send request\n\t\t\tfile, err := os.Open(audios[0])\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"open audio file error: %s\", err.Error())\n\t\t\t}\n\t\t\tdefer file.Close()\n\n\t\t\tstart := time.Now()\n\t\t\tres, err := client.Audio.Transcriptions.New(context.TODO(), openai.AudioTranscriptionNewParams{\n\t\t\t\tModel: name,\n\t\t\t\tFile:  file,\n\t\t\t})\n\t\t\tduration := time.Since(start).Microseconds()\n\n\t\t\tprofileData := nexa_sdk.ProfileData{\n\t\t\t\tTTFT:       duration,\n\t\t\t\tPromptTime: 0,\n\t\t\t\tDecodeTime: duration,\n\t\t\t}\n\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\t\t\tonToken(res.Text)\n\t\t\treturn res.Text, profileData, err\n\t\t},\n\t}\n\tif input != \"\" {\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif input == \"\" {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\taudioPath := input\n\t\t\tinput = \"\"\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(audioPath))\n\t\t\treturn audioPath, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tRecordImmediate: true,\n\t\t\tRecord: func() (*string, error) {\n\t\t\t\tt := strconv.Itoa(int(time.Now().Unix()))\n\t\t\t\toutputFile := filepath.Join(os.TempDir(), \"nexa-cli\", t+\".wav\")\n\t\t\t\trec, err := record.NewRecorder(outputFile)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Recording is going on, press Ctrl-C to stop\"))\n\n\t\t\t\terr = rec.Run()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\treturn &outputFile, nil\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n\nfunc runAudioDiarize(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := map[string]any{\n\t\t\"model\": name,\n\t}\n\terr := client.Post(context.TODO(), \"audio/diarize\", warmUpRequest, nil)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(_ string, _, audios []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tif len(audios) == 0 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, common.ErrNoAudio\n\t\t\t}\n\t\t\tif len(audios) > 1 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"only one audio file is supported\")\n\t\t\t}\n\n\t\t\t// base64 encode audio\n\t\t\taudioData, err := os.ReadFile(audios[0])\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"read audio file error: %s\", err.Error())\n\t\t\t}\n\t\t\tmimeType := http.DetectContentType(audioData)\n\t\t\tb64Audio := base64.StdEncoding.EncodeToString(audioData)\n\t\t\taudioStr := fmt.Sprintf(\"data:%s;base64,%s\", mimeType, b64Audio)\n\n\t\t\t// send request\n\t\t\tres := nexa_sdk.DiarizeInferOutput{}\n\t\t\terr = client.Post(context.TODO(), \"audio/diarize\", map[string]any{\n\t\t\t\t\"model\": name,\n\t\t\t\t\"audio\": audioStr,\n\t\t\t}, &res)\n\n\t\t\tprofileData := res.ProfileData\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\t// Format the diarization output\n\t\t\toutput := fmt.Sprint(render.GetTheme().Success.Sprintf(\"Detected %d speaker(s) in %.2f seconds of audio:\\n\\n\", res.NumSpeakers, res.Duration))\n\t\t\tfor i, segment := range res.Segments {\n\t\t\t\toutput += fmt.Sprintf(\"%s %s\\n\",\n\t\t\t\t\trender.GetTheme().Info.Sprintf(\"[%d]\", i+1),\n\t\t\t\t\trender.GetTheme().Success.Sprintf(\"%.2fs - %.2fs: %s\", segment.StartTime, segment.EndTime, segment.SpeakerLabel))\n\t\t\t}\n\t\t\tonToken(output)\n\t\t\treturn output, profileData, err\n\t\t},\n\t}\n\tif input != \"\" {\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif input == \"\" {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\taudioPath := input\n\t\t\tinput = \"\"\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(audioPath))\n\t\t\treturn audioPath, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{\n\t\t\tRecordImmediate: true,\n\t\t\tRecord: func() (*string, error) {\n\t\t\t\tt := strconv.Itoa(int(time.Now().Unix()))\n\t\t\t\toutputFile := filepath.Join(os.TempDir(), \"nexa-cli\", t+\".wav\")\n\t\t\t\trec, err := record.NewRecorder(outputFile)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\n\t\t\t\tfmt.Println(render.GetTheme().Info.Sprint(\"Recording is going on, press Ctrl-C to stop\"))\n\n\t\t\t\terr = rec.Run()\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\treturn &outputFile, nil\n\t\t\t},\n\t\t}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n\n}\n\nfunc runCV(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := map[string]any{\n\t\t\"model\": name,\n\t}\n\terr := client.Post(context.TODO(), \"cv\", warmUpRequest, nil)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tprocessor := &common.Processor{\n\t\tParseFile: true,\n\t\tVerbose:   verbose,\n\t\tTestMode:  testMode,\n\t\tRun: func(_ string, images, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tstart := time.Now()\n\n\t\t\tif len(images) == 0 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, common.ErrNoImage\n\t\t\t}\n\t\t\tif len(images) > 1 {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"only one image is supported\")\n\t\t\t}\n\n\t\t\t// base64 encode image\n\t\t\timageData, err := os.ReadFile(images[0])\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"read image file error: %s\", err.Error())\n\t\t\t}\n\t\t\tmimeType := http.DetectContentType(imageData)\n\t\t\tb64Image := base64.StdEncoding.EncodeToString(imageData)\n\t\t\timageStr := fmt.Sprintf(\"data:%s;base64,%s\", mimeType, b64Image)\n\n\t\t\t// send request\n\t\t\tres := struct {\n\t\t\t\tResults []nexa_sdk.CVResult `json:\"results\"`\n\t\t\t}{}\n\t\t\terr = client.Post(context.TODO(), \"cv\", map[string]any{\n\t\t\t\t\"model\": name,\n\t\t\t\t\"image\": imageStr,\n\t\t\t}, &res)\n\n\t\t\tduration := time.Since(start).Microseconds()\n\t\t\tprofileData := nexa_sdk.ProfileData{\n\t\t\t\tTTFT:       duration,\n\t\t\t\tDecodeTime: duration,\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\tonToken(render.GetTheme().Success.Sprintf(\"✓ CV inference completed successfully\"))\n\t\t\tonToken(\"\\n\")\n\t\t\tonToken(render.GetTheme().Info.Sprintf(\"  Found %d results\\n\", len(res.Results)))\n\n\t\t\tvar data strings.Builder\n\t\t\tfor _, cvResult := range res.Results {\n\t\t\t\tresult := fmt.Sprintf(\"[%s] %s\\n\",\n\t\t\t\t\trender.GetTheme().Info.Sprintf(\"%.3f\", cvResult.Confidence),\n\t\t\t\t\trender.GetTheme().Success.Sprintf(\"\\\"%s\\\"\", cvResult.Text))\n\t\t\t\tonToken(result)\n\t\t\t\tdata.WriteString(result)\n\t\t\t}\n\t\t\treturn data.String(), profileData, err\n\t\t},\n\t}\n\tif input != \"\" {\n\t\tprocessor.GetPrompt = func() (string, error) {\n\t\t\tif input == \"\" {\n\t\t\t\treturn \"\", io.EOF\n\t\t\t}\n\t\t\timagePath := input\n\t\t\tinput = \"\"\n\t\t\tfmt.Print(render.GetTheme().Prompt.Sprintf(\"> \"))\n\t\t\tfmt.Println(render.GetTheme().Normal.Sprint(imagePath))\n\t\t\treturn imagePath, nil\n\t\t}\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n\nfunc runImagesGenerations(manifest types.ModelManifest, quant string) error {\n\tname := manifest.Name\n\tif quant != \"\" {\n\t\tname = name + \":\" + quant\n\t}\n\n\t// warm up\n\tspin := render.NewSpinner(\"loading model...\")\n\tspin.Start()\n\twarmUpRequest := openai.ImageGenerateParams{\n\t\tModel: name,\n\t}\n\t_, err := client.Images.Generate(context.TODO(), warmUpRequest)\n\tspin.Stop()\n\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tprocessor := &common.Processor{\n\t\tVerbose:  verbose,\n\t\tTestMode: testMode,\n\t\tRun: func(prompt string, _, _ []string, onToken func(string) bool) (string, nexa_sdk.ProfileData, error) {\n\t\t\tstart := time.Now()\n\n\t\t\ttextPrompt := strings.TrimSpace(prompt)\n\t\t\tif textPrompt == \"\" {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"prompt cannot be empty\")\n\t\t\t}\n\n\t\t\t// Generate output filename if not specified\n\t\t\toutputFile := output\n\t\t\tif outputFile == \"\" {\n\t\t\t\toutputFile = fmt.Sprintf(\"image_gen_output_%d.png\", time.Now().Unix())\n\t\t\t}\n\t\t\tif !strings.HasSuffix(strings.ToLower(outputFile), \".png\") {\n\t\t\t\treturn \"\", nexa_sdk.ProfileData{}, fmt.Errorf(\"output file must have .png extension\")\n\t\t\t}\n\n\t\t\tres, err := client.Images.Generate(context.TODO(), openai.ImageGenerateParams{\n\t\t\t\tModel:  name,\n\t\t\t\tPrompt: prompt,\n\t\t\t\tN:      openai.Int(1),\n\t\t\t},\n\t\t\t\toption.WithJSONSet(\"task_type\", taskType),\n\t\t\t)\n\n\t\t\tduration := time.Since(start).Microseconds()\n\t\t\tprofileData := nexa_sdk.ProfileData{\n\t\t\t\tDecodeTime: duration,\n\t\t\t}\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\tbstr := strings.SplitN(res.Data[0].B64JSON, \",\", 2)\n\t\t\tif len(bstr) != 2 {\n\t\t\t\treturn \"\", profileData, fmt.Errorf(\"invalid base64 image data\")\n\t\t\t}\n\t\t\tbdata, err := base64.StdEncoding.DecodeString(bstr[1])\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\t\t\terr = os.WriteFile(outputFile, bdata, 0644)\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", profileData, err\n\t\t\t}\n\n\t\t\tdata := render.GetTheme().Success.Sprintf(\"✓ Image saved to: %s\", outputFile)\n\t\t\tonToken(data)\n\t\t\treturn data, profileData, err\n\n\t\t},\n\t}\n\tif len(prompt) > 0 || input != \"\" {\n\t\tprocessor.GetPrompt = getPromptOrInput\n\t} else {\n\t\trepl := common.Repl{}\n\t\tdefer repl.Close()\n\t\tprocessor.GetPrompt = repl.GetPrompt\n\t}\n\treturn processor.Process()\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/serve.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/viper\"\n\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server\"\n)\n\n// serve creates a command to start the Nexa AI service server.\n// This command initializes the Nexa SDK, starts the HTTP server for AI services,\n// and properly cleans up resources when the server shuts down.\n// The server provides REST API endpoints for AI model inference and management.\n// Usage: nexa serve\nfunc serve() *cobra.Command {\n\tserveCmd := &cobra.Command{\n\t\tGroupID: \"inference\",\n\t\tUse:     \"serve\",\n\t\tShort:   \"Run the Nexa AI Service\",\n\t}\n\n\tserveCmd.Flags().SortFlags = false\n\tserveCmd.Flags().String(\"host\", \"127.0.0.1:18181\", \"Default server address (env: NEXA_HOST)\")\n\tserveCmd.Flags().String(\"origins\", \"*\", \"Default CORS origins (env: NEXA_ORIGINS)\")\n\tserveCmd.Flags().Int(\"keepalive\", 300, \"Keepalive seconds (env: NEXA_KEEPALIVE)\")\n\t// HTTPS / TLS flags\n\tserveCmd.Flags().Bool(\"https\", false, \"Enable HTTPS/TLS (env: NEXA_HTTPS)\")\n\tserveCmd.Flags().String(\"certfile\", \"cert.pem\", \"TLS certificate file path (env: NEXA_CERTFILE)\")\n\tserveCmd.Flags().String(\"keyfile\", \"key.pem\", \"TLS private key file path (env: NEXA_KEYFILE)\")\n\n\tviper.BindPFlag(\"host\", serveCmd.Flags().Lookup(\"host\"))\n\tviper.BindPFlag(\"origins\", serveCmd.Flags().Lookup(\"origins\"))\n\tviper.BindPFlag(\"keepalive\", serveCmd.Flags().Lookup(\"keepalive\"))\n\tviper.BindPFlag(\"enablehttps\", serveCmd.Flags().Lookup(\"https\"))\n\tviper.BindPFlag(\"certfile\", serveCmd.Flags().Lookup(\"certfile\"))\n\tviper.BindPFlag(\"keyfile\", serveCmd.Flags().Lookup(\"keyfile\"))\n\n\tserveCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\tcheckDependency()\n\t\tnexa_sdk.Init()\n\n\t\tserver.Serve()\n\n\t\tnexa_sdk.DeInit()\n\t}\n\n\treturn serveCmd\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/update.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"github.com/spf13/cobra\"\n\t\"golang.org/x/sync/errgroup\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/downloader\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n)\n\nconst (\n\tgithubAPIURL = \"https://api.github.com/repos/NexaAI/nexa-sdk/releases/latest\"\n\tuserAgent    = \"Nexa-Updater/1.0\"\n\n\tupdateCheckInterval  = 24 * time.Hour\n\tnotificationInterval = 8 * time.Hour\n\n\tdefaultChunkSize  = 4 * 1024 * 1024\n\tdefaultNumWorkers = 16\n\n\tlinuxGlobalInstallDir = \"/opt/nexa_sdk\"\n)\n\nfunc update() *cobra.Command {\n\tupdateCmd := &cobra.Command{\n\t\tGroupID: \"management\",\n\t\tUse:     \"update\",\n\t\tShort:   \"update nexa\",\n\t\tLong:    \"Update nexa to the latest version\",\n\t}\n\n\tupdateCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\terr := func() error {\n\t\t\tif runtime.GOOS == \"linux\" && !isLinuxGlobalInstall() {\n\t\t\t\treturn fmt.Errorf(\"update is only supported for global installation (%s). Reinstall with 'install.sh' for update support\", linuxGlobalInstallDir)\n\t\t\t}\n\t\t\t// check platform\n\t\t\tassetMap := map[string]map[string]string{\n\t\t\t\t\"darwin\": {\n\t\t\t\t\t\"amd64\": \"nexa-cli_macos_x86_64.pkg\",\n\t\t\t\t\t\"arm64\": \"nexa-cli_macos_arm64.pkg\",\n\t\t\t\t},\n\t\t\t\t\"windows\": {\n\t\t\t\t\t\"amd64\": \"nexa-cli_windows_x86_64.exe\",\n\t\t\t\t\t\"arm64\": \"nexa-cli_windows_arm64.exe\",\n\t\t\t\t},\n\t\t\t\t\"linux\": {\n\t\t\t\t\t\"amd64\": \"nexa-cli_linux_x86_64.sh\",\n\t\t\t\t\t\"arm64\": \"nexa-cli_linux_arm64.sh\",\n\t\t\t\t},\n\t\t\t}\n\t\t\tassetName, ok := assetMap[runtime.GOOS][runtime.GOARCH]\n\t\t\tif !ok {\n\t\t\t\treturn fmt.Errorf(\"current platform is not supported, please manually download\")\n\t\t\t}\n\n\t\t\trls, err := getLastRelease()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tupdateAvailable, err := hasUpdate(Version, rls.TagName)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif !updateAvailable {\n\t\t\t\tfmt.Println(\"Already up-to-date.\")\n\t\t\t\treturn nil\n\t\t\t}\n\n\t\t\t// find asset\n\t\t\tvar ast asset\n\t\t\tfor _, asset := range rls.Assets {\n\t\t\t\tif asset.Name == assetName {\n\t\t\t\t\tast = asset\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ast.Name == \"\" {\n\t\t\t\treturn fmt.Errorf(\"asset %s not found in release\", assetName)\n\t\t\t}\n\n\t\t\tfmt.Println(\n\t\t\t\trender.GetTheme().Warning.Sprint(\"New version found, file: \"),\n\t\t\t\trender.GetTheme().Success.Sprint(ast.Name),\n\t\t\t\trender.GetTheme().Warning.Sprint(\", version: \"),\n\t\t\t\trender.GetTheme().Success.Sprint(rls.TagName))\n\n\t\t\t// download\n\t\t\tdst := filepath.Join(os.TempDir(), ast.Name)\n\t\t\tprogress := make(chan int64)\n\t\t\tbar := render.NewProgressBar(int64(ast.Size), \"downloading\")\n\t\t\tgo func() {\n\t\t\t\tdefer bar.Exit()\n\t\t\t\tfor pg := range progress {\n\t\t\t\t\tbar.Add(pg)\n\t\t\t\t}\n\t\t\t}()\n\t\t\tif err = downloadPkg(ast.BrowserDownloadURL, dst, int64(ast.Size), progress); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\tif err = installPkg(dst); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tfmt.Println(\"update package is ready to install\")\n\n\t\t\treturn nil\n\t\t}()\n\t\tif err != nil {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"Update failed: %s\", err.Error()))\n\t\t\tos.Exit(1)\n\t\t}\n\t}\n\n\treturn updateCmd\n}\n\nfunc isLinuxGlobalInstall() bool {\n\texe, err := os.Executable()\n\tif err != nil {\n\t\treturn false\n\t}\n\tresolved, err := filepath.EvalSymlinks(exe)\n\tif err != nil {\n\t\treturn false\n\t}\n\trel, err := filepath.Rel(linuxGlobalInstallDir, filepath.Clean(resolved))\n\tif err != nil {\n\t\treturn false\n\t}\n\treturn !strings.HasPrefix(rel, \"..\")\n}\n\n// util functions\n\nfunc getLastRelease() (release, error) {\n\tvar rls release\n\n\tclient := &http.Client{Timeout: 10 * time.Second}\n\n\treq, err := http.NewRequest(\"GET\", githubAPIURL, nil)\n\tif err != nil {\n\t\treturn rls, err\n\t}\n\treq.Header.Set(\"User-Agent\", userAgent)\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn rls, err\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode != http.StatusOK {\n\t\treturn rls, fmt.Errorf(\"get latest release failed: %d\", resp.StatusCode)\n\t}\n\n\terr = sonic.ConfigDefault.NewDecoder(resp.Body).Decode(&rls)\n\treturn rls, err\n}\n\nfunc hasUpdate(cur, latest string) (bool, error) {\n\tresult, err := compareVersion(cur, latest)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"invalid version %s or %s: %w\", cur, latest, err)\n\t}\n\treturn result < 0, nil\n}\n\ntype release struct {\n\tTagName string  `json:\"tag_name\"`\n\tAssets  []asset `json:\"assets\"`\n}\n\ntype asset struct {\n\tName               string `json:\"name\"`\n\tBrowserDownloadURL string `json:\"browser_download_url\"`\n\tSize               int    `json:\"size\"`\n\tDigest             string `json:\"digest\"`\n}\n\n// downloadPkg a file from url to dst with progress\nfunc downloadPkg(url, dst string, size int64, progress chan int64) error {\n\tdefer close(progress)\n\n\tfile, err := os.OpenFile(dst, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\tchunkSize := int64(defaultChunkSize)\n\tnumWorkers := min(int((size+chunkSize-1)/chunkSize), defaultNumWorkers)\n\tslog.Debug(\"downloading package\", \"url\", url, \"size\", size, \"chunkSize\", chunkSize, \"numWorkers\", numWorkers)\n\n\tctx := context.Background()\n\tg, ctx := errgroup.WithContext(ctx)\n\tg.SetLimit(numWorkers)\n\n\tdownloader := downloader.NewDownloader(\"\")\n\n\tfor offset := int64(0); offset < size; offset += chunkSize {\n\t\toffset := offset\n\t\tg.Go(func() error {\n\t\t\tlimit := min(chunkSize, size-offset)\n\n\t\t\tbuf := bytes.NewBuffer(make([]byte, 0, int(limit)))\n\t\t\tif err := downloader.DownloadChunk(ctx, url, offset, limit, buf); err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to download chunk at offset %d: %w\", offset, err)\n\t\t\t}\n\n\t\t\tif _, err := file.WriteAt(buf.Bytes(), offset); err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to write chunk at offset %d: %w\", offset, err)\n\t\t\t}\n\n\t\t\tprogress <- int64(buf.Len())\n\t\t\treturn nil\n\t\t})\n\t}\n\n\treturn g.Wait()\n}\n\nfunc installPkg(pkgPath string) error {\n\tvar cmd *exec.Cmd\n\tswitch runtime.GOOS {\n\tcase \"darwin\":\n\t\tcmd = exec.Command(\"open\", pkgPath)\n\tcase \"windows\":\n\t\tcmd = exec.Command(pkgPath)\n\tcase \"linux\":\n\t\tif err := os.Chmod(pkgPath, 0755); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to make installer executable: %w\", err)\n\t\t}\n\t\tcmd = exec.Command(\"bash\", pkgPath)\n\t\tcmd.Stdin = os.Stdin\n\t\tcmd.Stdout = os.Stdout\n\t\tcmd.Stderr = os.Stderr\n\t\treturn cmd.Run()\n\tdefault:\n\t\treturn errors.New(\"update is not supported on this platform\")\n\t}\n\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\treturn cmd.Start()\n}\n\n// Update check store\n\ntype updateCheck struct {\n\tLastCheck     time.Time `json:\"last_check\"`\n\tLastNotify    time.Time `json:\"last_notify\"`\n\tLatestVersion string    `json:\"latest_version\"`\n}\n\nfunc getUpdateCheck() (updateCheck, error) {\n\tck := updateCheck{}\n\n\tdata, err := os.ReadFile(filepath.Join(store.Get().DataPath(), \"update_check\"))\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\terr = setUpdateCheck(ck)\n\t\t}\n\t\treturn ck, err\n\t}\n\n\terr = sonic.Unmarshal(data, &ck)\n\treturn ck, err\n}\n\nfunc setUpdateCheck(ck updateCheck) error {\n\tslog.Info(\"setting last update check\", \"update_check\", ck)\n\n\tdata, _ := sonic.Marshal(ck)\n\treturn os.WriteFile(filepath.Join(store.Get().DataPath(), \"update_check\"), data, 0644)\n}\n\n// check and notify\n\nfunc checkUpdate() {\n\tslog.Info(\"checking for updates\")\n\n\tck, err := getUpdateCheck()\n\tslog.Info(\"last update check\", \"update_check\", ck, \"error\", err)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif time.Since(ck.LastCheck) < updateCheckInterval {\n\t\tslog.Info(\"skip update check, interval not reached\", \"last_check_time\", ck.LastCheck)\n\t\treturn\n\t}\n\n\trls, err := getLastRelease()\n\tslog.Debug(\"latest release\", \"release\", rls, \"error\", err)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tck.LastCheck = time.Now()\n\tck.LatestVersion = rls.TagName\n\tsetUpdateCheck(ck)\n}\n\nfunc notifyUpdate() {\n\tck, _ := getUpdateCheck()\n\tslog.Info(\"notifying update\", \"update_check\", ck)\n\n\tupAvail, _ := hasUpdate(Version, ck.LatestVersion)\n\tif !upAvail || time.Since(ck.LastNotify) < notificationInterval {\n\t\tslog.Info(\"skip update notification\", \"update_available\", upAvail, \"time_since_last_notify\", time.Since(ck.LastNotify))\n\t\treturn\n\t}\n\n\tck.LastNotify = time.Now()\n\tsetUpdateCheck(ck)\n\n\tfmt.Fprintf(os.Stderr, \"\\n\\n%s %s → %s\\n\",\n\t\trender.GetTheme().Warning.Sprintf(\"A new version of nexa-cli is available:\"),\n\t\trender.GetTheme().Success.Sprint(Version),\n\t\trender.GetTheme().Success.Sprint(ck.LatestVersion))\n\n\tfmt.Fprintf(os.Stderr, \"%s\\n\\n\",\n\t\trender.GetTheme().Warning.Sprint(\"To update, run: `nexa update`\"),\n\t)\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/version.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nvar Version string\n\nfunc version() *cobra.Command {\n\tversionCmd := &cobra.Command{\n\t\tGroupID: \"management\",\n\t\tUse:     \"version\",\n\t\tShort:   \"show nexasdk version\",\n\t}\n\n\tversionCmd.Run = func(cmd *cobra.Command, args []string) {\n\t\tfmt.Println(\"NexaSDK Bridge Version: \" + nexa_sdk.Version())\n\t\tfmt.Println(\"NexaSDK CLI Version:    \" + Version)\n\t}\n\n\treturn versionCmd\n}\n\n// compareVersion compares two version strings in format v0.0.0\n// Returns: -1 if v1 < v2, 0 if v1 == v2, 1 if v1 > v2\nfunc compareVersion(v1, v2 string) (int, error) {\n\tparseVersion := func(v string) ([3]int, error) {\n\t\torigV := v\n\t\tv = strings.TrimPrefix(v, \"v\")\n\t\t// Strip pre-release suffixes like -rc2, -beta, -alpha, etc.\n\t\tif idx := strings.IndexAny(v, \"-+\"); idx != -1 {\n\t\t\tv = v[:idx]\n\t\t}\n\t\tparts := strings.Split(v, \".\")\n\t\tif len(parts) != 3 {\n\t\t\treturn [3]int{}, fmt.Errorf(\"invalid format: %s\", origV)\n\t\t}\n\t\tvar nums [3]int\n\t\tfor i, p := range parts {\n\t\t\tn, err := strconv.Atoi(p)\n\t\t\tif err != nil {\n\t\t\t\treturn [3]int{}, fmt.Errorf(\"invalid format: %s\", origV)\n\t\t\t}\n\t\t\tif n < 0 {\n\t\t\t\treturn [3]int{}, fmt.Errorf(\"invalid format: %s\", origV)\n\t\t\t}\n\t\t\tnums[i] = n\n\t\t}\n\t\treturn nums, nil\n\t}\n\n\tn1, err := parseVersion(v1)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tn2, err := parseVersion(v2)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tfor i := range 3 {\n\t\tif n1[i] < n2[i] {\n\t\t\treturn -1, nil\n\t\t}\n\t\tif n1[i] > n2[i] {\n\t\t\treturn 1, nil\n\t\t}\n\t}\n\treturn 0, nil\n}\n\nfunc isValidVersion(minVersion string) bool {\n\t// community repo or dev version\n\tif minVersion == \"\" || Version == \"\" {\n\t\treturn true\n\t}\n\n\tslog.Debug(\"check version\", \"minVersion\", minVersion, \"curVersion\", Version)\n\tresult, err := compareVersion(Version, minVersion)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn result >= 0\n}\n"
  },
  {
    "path": "runner/cmd/nexa-cli/version_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"testing\"\n)\n\nfunc TestCompareVersion(t *testing.T) {\n\ttests := []struct {\n\t\tname     string\n\t\tv1       string\n\t\tv2       string\n\t\texpected int\n\t\twantErr  bool\n\t}{\n\t\t// Equal versions\n\t\t{\n\t\t\tname:     \"equal versions with v prefix\",\n\t\t\tv1:       \"v1.0.0\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"equal versions without v prefix\",\n\t\t\tv1:       \"1.0.0\",\n\t\t\tv2:       \"1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"equal versions mixed prefix\",\n\t\t\tv1:       \"v2.5.10\",\n\t\t\tv2:       \"2.5.10\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"equal versions with large numbers\",\n\t\t\tv1:       \"v10.20.30\",\n\t\t\tv2:       \"v10.20.30\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\n\t\t// v1 < v2 cases\n\t\t{\n\t\t\tname:     \"major version less\",\n\t\t\tv1:       \"v1.0.0\",\n\t\t\tv2:       \"v2.0.0\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"minor version less\",\n\t\t\tv1:       \"v1.0.0\",\n\t\t\tv2:       \"v1.1.0\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"patch version less\",\n\t\t\tv1:       \"v1.0.0\",\n\t\t\tv2:       \"v1.0.1\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"large numbers less\",\n\t\t\tv1:       \"v10.20.30\",\n\t\t\tv2:       \"v10.20.31\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"major version large numbers less\",\n\t\t\tv1:       \"v99.99.99\",\n\t\t\tv2:       \"v100.0.0\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\n\t\t// v1 > v2 cases\n\t\t{\n\t\t\tname:     \"major version greater\",\n\t\t\tv1:       \"v2.0.0\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"minor version greater\",\n\t\t\tv1:       \"v1.1.0\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"patch version greater\",\n\t\t\tv1:       \"v1.0.1\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"large numbers greater\",\n\t\t\tv1:       \"v10.20.31\",\n\t\t\tv2:       \"v10.20.30\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"complex comparison\",\n\t\t\tv1:       \"v1.2.3\",\n\t\t\tv2:       \"v1.2.2\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"complex comparison reverse\",\n\t\t\tv1:       \"v1.2.2\",\n\t\t\tv2:       \"v1.2.3\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\n\t\t// Edge cases\n\t\t{\n\t\t\tname:     \"zero versions\",\n\t\t\tv1:       \"v0.0.0\",\n\t\t\tv2:       \"v0.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"zero to one\",\n\t\t\tv1:       \"v0.0.0\",\n\t\t\tv2:       \"v0.0.1\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"very large numbers\",\n\t\t\tv1:       \"v999.999.999\",\n\t\t\tv2:       \"v999.999.998\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\n\t\t// Pre-release versions (should compare base version only)\n\t\t{\n\t\t\tname:     \"rc version equals stable\",\n\t\t\tv1:       \"v0.2.68-rc2\",\n\t\t\tv2:       \"v0.2.68\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"rc version greater than older stable\",\n\t\t\tv1:       \"v0.2.68-rc2\",\n\t\t\tv2:       \"v0.2.67\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"rc version less than newer stable\",\n\t\t\tv1:       \"v0.2.68-rc2\",\n\t\t\tv2:       \"v0.2.69\",\n\t\t\texpected: -1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"beta version comparison\",\n\t\t\tv1:       \"v1.0.0-beta\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"alpha version comparison\",\n\t\t\tv1:       \"v2.5.0-alpha.1\",\n\t\t\tv2:       \"v2.4.9\",\n\t\t\texpected: 1,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"build metadata with plus\",\n\t\t\tv1:       \"v1.0.0+build123\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"complex prerelease version\",\n\t\t\tv1:       \"v3.2.1-rc1+build456\",\n\t\t\tv2:       \"v3.2.1\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\t\t{\n\t\t\tname:     \"two rc versions\",\n\t\t\tv1:       \"v0.2.68-rc1\",\n\t\t\tv2:       \"v0.2.68-rc2\",\n\t\t\texpected: 0,\n\t\t\twantErr:  false,\n\t\t},\n\n\t\t// Invalid format cases\n\t\t{\n\t\t\tname:     \"invalid format - missing parts\",\n\t\t\tv1:       \"v1.0\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  true,\n\t\t},\n\t\t{\n\t\t\tname:     \"invalid format - too many parts\",\n\t\t\tv1:       \"v1.0.0.0\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  true,\n\t\t},\n\t\t{\n\t\t\tname:     \"invalid format - non-numeric\",\n\t\t\tv1:       \"v1.0.a\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  true,\n\t\t},\n\t\t{\n\t\t\tname:     \"invalid format - empty string\",\n\t\t\tv1:       \"\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  true,\n\t\t},\n\t\t{\n\t\t\tname:     \"invalid format - both invalid\",\n\t\t\tv1:       \"invalid\",\n\t\t\tv2:       \"also-invalid\",\n\t\t\texpected: 0,\n\t\t\twantErr:  true,\n\t\t},\n\t\t{\n\t\t\tname:     \"invalid format - negative numbers\",\n\t\t\tv1:       \"v-1.0.0\",\n\t\t\tv2:       \"v1.0.0\",\n\t\t\texpected: 0,\n\t\t\twantErr:  true,\n\t\t},\n\t}\n\n\tfor _, tt := range tests {\n\t\tt.Run(tt.name, func(t *testing.T) {\n\t\t\tresult, err := compareVersion(tt.v1, tt.v2)\n\t\t\tif (err != nil) != tt.wantErr {\n\t\t\t\tt.Errorf(\"compareVersion() error = %v, wantErr %v\", err, tt.wantErr)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif !tt.wantErr && result != tt.expected {\n\t\t\t\tt.Errorf(\"compareVersion() = %v, want %v\", result, tt.expected)\n\t\t\t}\n\t\t})\n\t}\n}\n"
  },
  {
    "path": "runner/cmd/nexa-launcher/main.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage main\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"path/filepath\"\n)\n\nvar (\n\tbaseDir string\n\tbinPath string\n)\n\nfunc initPath() {\n\texe, err := os.Executable()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\trealExe, err := filepath.EvalSymlinks(exe)\n\tif err != nil {\n\t\trealExe = exe\n\t}\n\tbaseDir = filepath.Dir(realExe)\n\tbinPath = filepath.Join(baseDir, \"nexa-cli\")\n\tif filepath.Base(baseDir) == \"bin\" {\n\t\tbaseDir = filepath.Dir(baseDir)\n\t}\n}\n\nfunc main() {\n\tinitPath()\n\n\tcmd := exec.Command(binPath, os.Args[1:]...)\n\tcmd.Env = os.Environ()\n\tcmd.Stdin, cmd.Stdout, cmd.Stderr = os.Stdin, os.Stdout, os.Stderr\n\n\tcSignal := make(chan os.Signal, 1)\n\tsignal.Notify(cSignal, os.Interrupt)\n\tgo func() {\n\t\tfor range cSignal {\n\t\t}\n\t}()\n\n\tcmd.Run()\n\tos.Exit(cmd.ProcessState.ExitCode())\n}\n"
  },
  {
    "path": "runner/go.mod",
    "content": "module github.com/NexaAI/nexa-sdk/runner\n\ngo 1.24.1\n\ntoolchain go1.24.3\n\nrequire (\n\tgithub.com/aws/aws-sdk-go-v2 v1.39.6\n\tgithub.com/aws/aws-sdk-go-v2/config v1.31.20\n\tgithub.com/aws/aws-sdk-go-v2/service/s3 v1.90.2\n\tgithub.com/aws/smithy-go v1.23.2\n\tgithub.com/bytedance/sonic v1.14.2\n\tgithub.com/charmbracelet/huh v0.8.0\n\tgithub.com/charmbracelet/huh/spinner v0.0.0-20251110114415-25888d17260b\n\tgithub.com/dustin/go-humanize v1.0.1\n\tgithub.com/gin-gonic/gin v1.11.0\n\tgithub.com/gofrs/flock v0.13.0\n\tgithub.com/gookit/color v1.6.0\n\tgithub.com/jedib0t/go-pretty/v6 v6.7.2\n\tgithub.com/lmittmann/tint v1.1.2\n\tgithub.com/mattn/go-runewidth v0.0.16\n\tgithub.com/openai/openai-go/v3 v3.17.0\n\tgithub.com/schollz/progressbar/v3 v3.18.0\n\tgithub.com/shirou/gopsutil v3.21.11+incompatible\n\tgithub.com/spf13/cobra v1.10.1\n\tgithub.com/spf13/pflag v1.0.10\n\tgithub.com/spf13/viper v1.21.0\n\tgithub.com/valyala/fasthttp v1.68.0\n\tgolang.org/x/image v0.33.0\n\tgolang.org/x/sync v0.18.0\n\tgolang.org/x/sys v0.38.0\n\tgolang.org/x/term v0.36.0\n\tresty.dev/v3 v3.0.0-beta.3\n)\n\nrequire (\n\tgithub.com/andybalholm/brotli v1.2.0 // indirect\n\tgithub.com/atotto/clipboard v0.1.4 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/credentials v1.18.24 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/internal/v4a v1.4.13 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.4 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.13 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/sso v1.30.3 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.7 // indirect\n\tgithub.com/aws/aws-sdk-go-v2/service/sts v1.40.2 // indirect\n\tgithub.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect\n\tgithub.com/bytedance/gopkg v0.1.3 // indirect\n\tgithub.com/bytedance/sonic/loader v0.4.0 // indirect\n\tgithub.com/catppuccin/go v0.3.0 // indirect\n\tgithub.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 // indirect\n\tgithub.com/charmbracelet/bubbletea v1.3.10 // indirect\n\tgithub.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect\n\tgithub.com/charmbracelet/lipgloss v1.1.0 // indirect\n\tgithub.com/charmbracelet/x/ansi v0.10.1 // indirect\n\tgithub.com/charmbracelet/x/cellbuf v0.0.13 // indirect\n\tgithub.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect\n\tgithub.com/charmbracelet/x/term v0.2.1 // indirect\n\tgithub.com/cloudwego/base64x v0.1.6 // indirect\n\tgithub.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect\n\tgithub.com/fsnotify/fsnotify v1.9.0 // indirect\n\tgithub.com/gabriel-vasile/mimetype v1.4.8 // indirect\n\tgithub.com/gin-contrib/sse v1.1.0 // 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.27.0 // indirect\n\tgithub.com/go-viper/mapstructure/v2 v2.4.0 // indirect\n\tgithub.com/goccy/go-json v0.10.2 // indirect\n\tgithub.com/goccy/go-yaml v1.18.0 // indirect\n\tgithub.com/inconshreveable/mousetrap v1.1.0 // indirect\n\tgithub.com/json-iterator/go v1.1.12 // indirect\n\tgithub.com/klauspost/compress v1.18.1 // indirect\n\tgithub.com/klauspost/cpuid/v2 v2.3.0 // indirect\n\tgithub.com/leodido/go-urn v1.4.0 // indirect\n\tgithub.com/lucasb-eyer/go-colorful v1.2.0 // indirect\n\tgithub.com/mattn/go-isatty v0.0.20 // indirect\n\tgithub.com/mattn/go-localereader v0.0.1 // indirect\n\tgithub.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect\n\tgithub.com/mitchellh/hashstructure/v2 v2.0.2 // indirect\n\tgithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect\n\tgithub.com/modern-go/reflect2 v1.0.2 // indirect\n\tgithub.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect\n\tgithub.com/muesli/cancelreader v0.2.2 // indirect\n\tgithub.com/muesli/termenv v0.16.0 // indirect\n\tgithub.com/pelletier/go-toml/v2 v2.2.4 // indirect\n\tgithub.com/quic-go/qpack v0.6.0 // indirect\n\tgithub.com/quic-go/quic-go v0.57.0 // indirect\n\tgithub.com/rivo/uniseg v0.4.7 // indirect\n\tgithub.com/sagikazarmark/locafero v0.11.0 // indirect\n\tgithub.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect\n\tgithub.com/spf13/afero v1.15.0 // indirect\n\tgithub.com/spf13/cast v1.10.0 // indirect\n\tgithub.com/subosito/gotenv v1.6.0 // indirect\n\tgithub.com/tidwall/gjson v1.18.0 // indirect\n\tgithub.com/tidwall/match v1.1.1 // indirect\n\tgithub.com/tidwall/pretty v1.2.1 // indirect\n\tgithub.com/tidwall/sjson v1.2.5 // indirect\n\tgithub.com/twitchyliquid64/golang-asm v0.15.1 // indirect\n\tgithub.com/ugorji/go/codec v1.3.0 // indirect\n\tgithub.com/valyala/bytebufferpool v1.0.0 // indirect\n\tgithub.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect\n\tgithub.com/yusufpapurcu/wmi v1.2.4 // indirect\n\tgo.yaml.in/yaml/v3 v3.0.4 // indirect\n\tgolang.org/x/arch v0.20.0 // indirect\n\tgolang.org/x/crypto v0.43.0 // indirect\n\tgolang.org/x/net v0.46.0 // indirect\n\tgolang.org/x/text v0.31.0 // indirect\n\tgoogle.golang.org/protobuf v1.36.9 // indirect\n)\n"
  },
  {
    "path": "runner/go.sum",
    "content": "github.com/MakeNowJust/heredoc v1.0.0 h1:cXCdzVdstXyiTqTvfqk9SDHpKNjxuom+DOlyEeQ4pzQ=\ngithub.com/MakeNowJust/heredoc v1.0.0/go.mod h1:mG5amYoWBHf8vpLOuehzbGGw0EHxpZZ6lCpQ4fNJ8LE=\ngithub.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=\ngithub.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=\ngithub.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4=\ngithub.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI=\ngithub.com/aws/aws-sdk-go-v2 v1.39.6 h1:2JrPCVgWJm7bm83BDwY5z8ietmeJUbh3O2ACnn+Xsqk=\ngithub.com/aws/aws-sdk-go-v2 v1.39.6/go.mod h1:c9pm7VwuW0UPxAEYGyTmyurVcNrbF6Rt/wixFqDhcjE=\ngithub.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3 h1:DHctwEM8P8iTXFxC/QK0MRjwEpWQeM9yzidCRjldUz0=\ngithub.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.3/go.mod h1:xdCzcZEtnSTKVDOmUZs4l/j3pSV6rpo1WXl5ugNsL8Y=\ngithub.com/aws/aws-sdk-go-v2/config v1.31.20 h1:/jWF4Wu90EhKCgjTdy1DGxcbcbNrjfBHvksEL79tfQc=\ngithub.com/aws/aws-sdk-go-v2/config v1.31.20/go.mod h1:95Hh1Tc5VYKL9NJ7tAkDcqeKt+MCXQB1hQZaRdJIZE0=\ngithub.com/aws/aws-sdk-go-v2/credentials v1.18.24 h1:iJ2FmPT35EaIB0+kMa6TnQ+PwG5A1prEdAw+PsMzfHg=\ngithub.com/aws/aws-sdk-go-v2/credentials v1.18.24/go.mod h1:U91+DrfjAiXPDEGYhh/x29o4p0qHX5HDqG7y5VViv64=\ngithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13 h1:T1brd5dR3/fzNFAQch/iBKeX07/ffu/cLu+q+RuzEWk=\ngithub.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.13/go.mod h1:Peg/GBAQ6JDt+RoBf4meB1wylmAipb7Kg2ZFakZTlwk=\ngithub.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13 h1:a+8/MLcWlIxo1lF9xaGt3J/u3yOZx+CdSveSNwjhD40=\ngithub.com/aws/aws-sdk-go-v2/internal/configsources v1.4.13/go.mod h1:oGnKwIYZ4XttyU2JWxFrwvhF6YKiK/9/wmE3v3Iu9K8=\ngithub.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13 h1:HBSI2kDkMdWz4ZM7FjwE7e/pWDEZ+nR95x8Ztet1ooY=\ngithub.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.13/go.mod h1:YE94ZoDArI7awZqJzBAZ3PDD2zSfuP7w6P2knOzIn8M=\ngithub.com/aws/aws-sdk-go-v2/internal/ini v1.8.4 h1:WKuaxf++XKWlHWu9ECbMlha8WOEGm0OUEZqm4K/Gcfk=\ngithub.com/aws/aws-sdk-go-v2/internal/ini v1.8.4/go.mod h1:ZWy7j6v1vWGmPReu0iSGvRiise4YI5SkR3OHKTZ6Wuc=\ngithub.com/aws/aws-sdk-go-v2/internal/v4a v1.4.13 h1:eg/WYAa12vqTphzIdWMzqYRVKKnCboVPRlvaybNCqPA=\ngithub.com/aws/aws-sdk-go-v2/internal/v4a v1.4.13/go.mod h1:/FDdxWhz1486obGrKKC1HONd7krpk38LBt+dutLcN9k=\ngithub.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3 h1:x2Ibm/Af8Fi+BH+Hsn9TXGdT+hKbDd5XOTZxTMxDk7o=\ngithub.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.3/go.mod h1:IW1jwyrQgMdhisceG8fQLmQIydcT/jWY21rFhzgaKwo=\ngithub.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.4 h1:NvMjwvv8hpGUILarKw7Z4Q0w1H9anXKsesMxtw++MA4=\ngithub.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.4/go.mod h1:455WPHSwaGj2waRSpQp7TsnpOnBfw8iDfPfbwl7KPJE=\ngithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 h1:kDqdFvMY4AtKoACfzIGD8A0+hbT41KTKF//gq7jITfM=\ngithub.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13/go.mod h1:lmKuogqSU3HzQCwZ9ZtcqOc5XGMqtDK7OIc2+DxiUEg=\ngithub.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.13 h1:zhBJXdhWIFZ1acfDYIhu4+LCzdUS2Vbcum7D01dXlHQ=\ngithub.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.13/go.mod h1:JaaOeCE368qn2Hzi3sEzY6FgAZVCIYcC2nwbro2QCh8=\ngithub.com/aws/aws-sdk-go-v2/service/s3 v1.90.2 h1:DhdbtDl4FdNlj31+xiRXANxEE+eC7n8JQz+/ilwQ8Uc=\ngithub.com/aws/aws-sdk-go-v2/service/s3 v1.90.2/go.mod h1:+wArOOrcHUevqdto9k1tKOF5++YTe9JEcPSc9Tx2ZSw=\ngithub.com/aws/aws-sdk-go-v2/service/sso v1.30.3 h1:NjShtS1t8r5LUfFVtFeI8xLAHQNTa7UI0VawXlrBMFQ=\ngithub.com/aws/aws-sdk-go-v2/service/sso v1.30.3/go.mod h1:fKvyjJcz63iL/ftA6RaM8sRCtN4r4zl4tjL3qw5ec7k=\ngithub.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.7 h1:gTsnx0xXNQ6SBbymoDvcoRHL+q4l/dAFsQuKfDWSaGc=\ngithub.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.7/go.mod h1:klO+ejMvYsB4QATfEOIXk8WAEwN4N0aBfJpvC+5SZBo=\ngithub.com/aws/aws-sdk-go-v2/service/sts v1.40.2 h1:HK5ON3KmQV2HcAunnx4sKLB9aPf3gKGwVAf7xnx0QT0=\ngithub.com/aws/aws-sdk-go-v2/service/sts v1.40.2/go.mod h1:E19xDjpzPZC7LS2knI9E6BaRFDK43Eul7vd6rSq2HWk=\ngithub.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM=\ngithub.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=\ngithub.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=\ngithub.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=\ngithub.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY=\ngithub.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E=\ngithub.com/bytedance/gopkg v0.1.3 h1:TPBSwH8RsouGCBcMBktLt1AymVo2TVsBVCY4b6TnZ/M=\ngithub.com/bytedance/gopkg v0.1.3/go.mod h1:576VvJ+eJgyCzdjS+c4+77QF3p7ubbtiKARP3TxducM=\ngithub.com/bytedance/sonic v1.14.2 h1:k1twIoe97C1DtYUo+fZQy865IuHia4PR5RPiuGPPIIE=\ngithub.com/bytedance/sonic v1.14.2/go.mod h1:T80iDELeHiHKSc0C9tubFygiuXoGzrkjKzX2quAx980=\ngithub.com/bytedance/sonic/loader v0.4.0 h1:olZ7lEqcxtZygCK9EKYKADnpQoYkRQxaeY2NYzevs+o=\ngithub.com/bytedance/sonic/loader v0.4.0/go.mod h1:AR4NYCk5DdzZizZ5djGqQ92eEhCCcdf5x77udYiSJRo=\ngithub.com/catppuccin/go v0.3.0 h1:d+0/YicIq+hSTo5oPuRi5kOpqkVA5tAsU6dNhvRu+aY=\ngithub.com/catppuccin/go v0.3.0/go.mod h1:8IHJuMGaUUjQM82qBrGNBv7LFq6JI3NnQCF6MOlZjpc=\ngithub.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7 h1:JFgG/xnwFfbezlUnFMJy0nusZvytYysV4SCS2cYbvws=\ngithub.com/charmbracelet/bubbles v0.21.1-0.20250623103423-23b8fd6302d7/go.mod h1:ISC1gtLcVilLOf23wvTfoQuYbW2q0JevFxPfUzZ9Ybw=\ngithub.com/charmbracelet/bubbletea v1.3.10 h1:otUDHWMMzQSB0Pkc87rm691KZ3SWa4KUlvF9nRvCICw=\ngithub.com/charmbracelet/bubbletea v1.3.10/go.mod h1:ORQfo0fk8U+po9VaNvnV95UPWA1BitP1E0N6xJPlHr4=\ngithub.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=\ngithub.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=\ngithub.com/charmbracelet/huh v0.8.0 h1:Xz/Pm2h64cXQZn/Jvele4J3r7DDiqFCNIVteYukxDvY=\ngithub.com/charmbracelet/huh v0.8.0/go.mod h1:5YVc+SlZ1IhQALxRPpkGwwEKftN/+OlJlnJYlDRFqN4=\ngithub.com/charmbracelet/huh/spinner v0.0.0-20251110114415-25888d17260b h1:oefmPctgff7OB4cDz3Ndp+ewwrh7i+fwth70qvZCieI=\ngithub.com/charmbracelet/huh/spinner v0.0.0-20251110114415-25888d17260b/go.mod h1:OMqKat/mm9a/qOnpuNOPyYO9bPzRNnmzLnRZT5KYltg=\ngithub.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=\ngithub.com/charmbracelet/lipgloss v1.1.0/go.mod h1:/6Q8FR2o+kj8rz4Dq0zQc3vYf7X+B0binUUBwA0aL30=\ngithub.com/charmbracelet/x/ansi v0.10.1 h1:rL3Koar5XvX0pHGfovN03f5cxLbCF2YvLeyz7D2jVDQ=\ngithub.com/charmbracelet/x/ansi v0.10.1/go.mod h1:3RQDQ6lDnROptfpWuUVIUG64bD2g2BgntdxH0Ya5TeE=\ngithub.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k=\ngithub.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=\ngithub.com/charmbracelet/x/conpty v0.1.0 h1:4zc8KaIcbiL4mghEON8D72agYtSeIgq8FSThSPQIb+U=\ngithub.com/charmbracelet/x/conpty v0.1.0/go.mod h1:rMFsDJoDwVmiYM10aD4bH2XiRgwI7NYJtQgl5yskjEQ=\ngithub.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86 h1:JSt3B+U9iqk37QUU2Rvb6DSBYRLtWqFqfxf8l5hOZUA=\ngithub.com/charmbracelet/x/errors v0.0.0-20240508181413-e8d8b6e2de86/go.mod h1:2P0UgXMEa6TsToMSuFqKFQR+fZTO9CNGUNokkPatT/0=\ngithub.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payRxjMjKgx2PaCWLZ4p3ro9y97+TVLZNaRZgJwSVDQ=\ngithub.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=\ngithub.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 h1:qko3AQ4gK1MTS/de7F5hPGx6/k1u0w4TeYmBFwzYVP4=\ngithub.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0/go.mod h1:pBhA0ybfXv6hDjQUZ7hk1lVxBiUbupdw5R31yPUViVQ=\ngithub.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=\ngithub.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=\ngithub.com/charmbracelet/x/termios v0.1.1 h1:o3Q2bT8eqzGnGPOYheoYS8eEleT5ZVNYNy8JawjaNZY=\ngithub.com/charmbracelet/x/termios v0.1.1/go.mod h1:rB7fnv1TgOPOyyKRJ9o+AsTU/vK5WHJ2ivHeut/Pcwo=\ngithub.com/charmbracelet/x/xpty v0.1.2 h1:Pqmu4TEJ8KeA9uSkISKMU3f+C1F6OGBn8ABuGlqCbtI=\ngithub.com/charmbracelet/x/xpty v0.1.2/go.mod h1:XK2Z0id5rtLWcpeNiMYBccNNBrP2IJnzHI0Lq13Xzq4=\ngithub.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7mk9/PwM=\ngithub.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY=\ngithub.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=\ngithub.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU=\ngithub.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=\ngithub.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=\ngithub.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=\ngithub.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=\ngithub.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=\ngithub.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=\ngithub.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=\ngithub.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f h1:Y/CXytFA4m6baUTXGLOoWe4PQhGxaX0KpnayAqC48p4=\ngithub.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f/go.mod h1:vw97MGsxSvLiUE2X8qFplwetxpGLQrlU1Q9AUEIzCaM=\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.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=\ngithub.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=\ngithub.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM=\ngithub.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8=\ngithub.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=\ngithub.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=\ngithub.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=\ngithub.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls=\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.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4=\ngithub.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=\ngithub.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=\ngithub.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=\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/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=\ngithub.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=\ngithub.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=\ngithub.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=\ngithub.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=\ngithub.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=\ngithub.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=\ngithub.com/gookit/assert v0.1.1 h1:lh3GcawXe/p+cU7ESTZ5Ui3Sm/x8JWpIis4/1aF0mY0=\ngithub.com/gookit/assert v0.1.1/go.mod h1:jS5bmIVQZTIwk42uXl4lyj4iaaxx32tqH16CFj0VX2E=\ngithub.com/gookit/color v1.6.0 h1:JjJXBTk1ETNyqyilJhkTXJYYigHG24TM9Xa2M1xAhRA=\ngithub.com/gookit/color v1.6.0/go.mod h1:9ACFc7/1IpHGBW8RwuDm/0YEnhg3dwwXpoMsmtyHfjs=\ngithub.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=\ngithub.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=\ngithub.com/jedib0t/go-pretty/v6 v6.7.2 h1:EYWgQNIH/+JsyHki7ns9OHyBKuHPkzrBo02uYjran7w=\ngithub.com/jedib0t/go-pretty/v6 v6.7.2/go.mod h1:YwC5CE4fJ1HFUDeivSV1r//AmANFHyqczZk+U6BDALU=\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/klauspost/compress v1.18.1 h1:bcSGx7UbpBqMChDtsF28Lw6v/G94LPrrbMbdC3JH2co=\ngithub.com/klauspost/compress v1.18.1/go.mod h1:ZQFFVG+MdnR0P+l6wpXgIL4NTtwiKIdBnrBd8Nrxr+0=\ngithub.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=\ngithub.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=\ngithub.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=\ngithub.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=\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/lmittmann/tint v1.1.2 h1:2CQzrL6rslrsyjqLDwD11bZ5OpLBPU+g3G/r5LSfS8w=\ngithub.com/lmittmann/tint v1.1.2/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=\ngithub.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY=\ngithub.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=\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-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4=\ngithub.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=\ngithub.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=\ngithub.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=\ngithub.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=\ngithub.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=\ngithub.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=\ngithub.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=\ngithub.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=\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/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=\ngithub.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo=\ngithub.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA=\ngithub.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo=\ngithub.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc=\ngithub.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk=\ngithub.com/openai/openai-go v1.12.0 h1:NBQCnXzqOTv5wsgNC36PrFEiskGfO5wccfCWDo9S1U0=\ngithub.com/openai/openai-go v1.12.0/go.mod h1:g461MYGXEXBVdV5SaR/5tNzNbSfwTBBefwc+LlDCK0Y=\ngithub.com/openai/openai-go/v3 v3.17.0 h1:CfTkmQoItolSyW+bHOUF190KuX5+1Zv6MC0Gb4wAwy8=\ngithub.com/openai/openai-go/v3 v3.17.0/go.mod h1:cdufnVK14cWcT9qA1rRtrXx4FTRsgbDPW7Ia7SS5cZo=\ngithub.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=\ngithub.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=\ngithub.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=\ngithub.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=\ngithub.com/quic-go/qpack v0.6.0 h1:g7W+BMYynC1LbYLSqRt8PBg5Tgwxn214ZZR34VIOjz8=\ngithub.com/quic-go/qpack v0.6.0/go.mod h1:lUpLKChi8njB4ty2bFLX2x4gzDqXwUpaO1DP9qMDZII=\ngithub.com/quic-go/quic-go v0.57.0 h1:AsSSrrMs4qI/hLrKlTH/TGQeTMY0ib1pAOX7vA3AdqE=\ngithub.com/quic-go/quic-go v0.57.0/go.mod h1:ly4QBAjHA2VhdnxhojRsCUOeJwKYg+taDlos92xb1+s=\ngithub.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=\ngithub.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=\ngithub.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=\ngithub.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=\ngithub.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=\ngithub.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=\ngithub.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=\ngithub.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=\ngithub.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA=\ngithub.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=\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/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=\ngithub.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=\ngithub.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=\ngithub.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=\ngithub.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=\ngithub.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=\ngithub.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=\ngithub.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=\ngithub.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=\ngithub.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=\ngithub.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=\ngithub.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=\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.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.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=\ngithub.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=\ngithub.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=\ngithub.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8=\ngithub.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=\ngithub.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=\ngithub.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY=\ngithub.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=\ngithub.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=\ngithub.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=\ngithub.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=\ngithub.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4=\ngithub.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=\ngithub.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=\ngithub.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=\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.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA=\ngithub.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=\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.68.0 h1:v12Nx16iepr8r9ySOwqI+5RBJ/DqTxhOy1HrHoDFnok=\ngithub.com/valyala/fasthttp v1.68.0/go.mod h1:5EXiRfYQAoiO/khu4oU9VISC/eVY6JqmSpPJoHCKsz4=\ngithub.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no=\ngithub.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM=\ngithub.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=\ngithub.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=\ngithub.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=\ngithub.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=\ngo.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=\ngo.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=\ngo.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=\ngo.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=\ngolang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c=\ngolang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=\ngolang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=\ngolang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=\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.33.0 h1:LXRZRnv1+zGd5XBUVRFmYEphyyKJjQjCRiOuAP3sZfQ=\ngolang.org/x/image v0.33.0/go.mod h1:DD3OsTYT9chzuzTQt+zMcOlBHgfoKQb1gry8p76Y1sc=\ngolang.org/x/net v0.46.0 h1:giFlY12I07fugqwPuWJi68oOnpfqFnJIJzaIIm2JVV4=\ngolang.org/x/net v0.46.0/go.mod h1:Q9BGdFy1y4nkUwiLvT5qtyhAnEHgnQ/zd8PfU6nc210=\ngolang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=\ngolang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=\ngolang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=\ngolang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=\ngolang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=\ngolang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=\ngolang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=\ngolang.org/x/term v0.36.0/go.mod h1:Qu394IJq6V6dCBRgwqshf3mPF85AqzYEzofzRdZkWss=\ngolang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=\ngolang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=\ngolang.org/x/time v0.12.0 h1:ScB/8o8olJvc+CQPWrK3fPZNfh7qgwCrY0zJmoEQLSE=\ngolang.org/x/time v0.12.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=\ngoogle.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=\ngoogle.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=\ngopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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=\nresty.dev/v3 v3.0.0-beta.3 h1:3kEwzEgCnnS6Ob4Emlk94t+I/gClyoah7SnNi67lt+E=\nresty.dev/v3 v3.0.0-beta.3/go.mod h1:OgkqiPvTDtOuV4MGZuUDhwOpkY8enjOsjjMzeOHefy4=\n"
  },
  {
    "path": "runner/internal/config/config.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage config\n\nimport (\n\t\"sync\"\n\n\t\"github.com/spf13/viper\"\n)\n\ntype Config struct {\n\t// Global settings\n\tDataDir string\n\n\t// Server settings\n\tHost      string // Server host and port (default: \"127.0.0.1:18181\")\n\tOrigins   string // Allowed CORS origins (default: \"*\")\n\tKeepAlive int64  // Connection keep-alive timeout in seconds (default: 300)\n\t// HTTPS / TLS settings\n\tHTTPS    bool   // Whether to serve over HTTPS (default: false)\n\tCertFile string // TLS certificate file path\n\tKeyFile  string // TLS private key file path\n\n\t// Env only params\n\tHFToken string\n\tLog     string\n}\n\nvar config *Config\nvar once sync.Once\n\n// Get returns the singleton configuration instance.\n// Uses sync.Once to ensure configuration is loaded only once.\nfunc Get() *Config {\n\tonce.Do(get)\n\treturn config\n}\n\n// NOTE: Avoid calling Get before subcommand initialization to prevent premature config initialization\nfunc GetLog() string {\n\tget()\n\treturn config.Log\n}\n\n// init sets up default configuration values using Viper.\n// These defaults are used if no environment variables are provided.\nfunc init() {\n\t// ENV only param need to set default here\n\tviper.SetDefault(\"hftoken\", \"\") // Default empty token\n\tviper.SetDefault(\"log\", \"none\") // Default log level\n}\n\n// get initializes the configuration by reading from environment variables.\n// Environment variables should be prefixed with \"NEXA_\" (e.g., NEXA_HOST).\n// This function is called only once via sync.Once for thread safety.\nfunc get() {\n\tconfig = &Config{}\n\n\t// Set environment variable prefix to \"NEXA_\"\n\tviper.SetEnvPrefix(\"nexa\")\n\t// Automatically read environment variables\n\tviper.AutomaticEnv()\n\t// Unmarshal configuration into the Config struct\n\tviper.Unmarshal(config)\n}\n"
  },
  {
    "path": "runner/internal/config/config_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage config\n"
  },
  {
    "path": "runner/internal/config/model_mapping.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage config\n\nimport (\n\t\"runtime\"\n\t\"sync\"\n)\n\n// key: shortcut\n// value:\n//   - list of (os, arch, actual model_name)\n//   - os and arch can be empty string to match any\n//   - the later value will override the previous one if both match\nvar modelMappingSrc = map[string][][3]string{\n\t\"qwen3\": {\n\t\t{\"\", \"\", \"NexaAI/Qwen3-4B-GGUF\"},\n\t},\n\t\"qwen2vl\": {\n\t\t{\"\", \"\", \"ggml-org/Qwen2-VL-2B-Instruct-GGUF\"},\n\t},\n\t\"qwen2.5vl\": {\n\t\t{\"\", \"\", \"unsloth/Qwen2.5-VL-3B-Instruct-GGUF\"},\n\t\t{\"darwin\", \"arm64\", \"Qwen/Qwen2.5-VL-3B-Instruct\"},\n\t},\n\t\"qwen3vl\": {\n\t\t{\"windows\", \"amd64\", \"NexaAI/Qwen3-VL-4B-GGUF\"},\n\t\t{\"windows\", \"arm64\", \"NexaAI/Qwen3-VL-4B-NPU\"},\n\t\t{\"darwin\", \"arm64\", \"NexaAI/Qwen3-VL-4B-MLX-4bit\"},\n\t},\n\t\"gemma3\": {\n\t\t{\"\", \"\", \"ggml-org/gemma-3-4b-it-GGUF\"},\n\t},\n\t\"smolvlm\": {\n\t\t{\"\", \"\", \"ggml-org/SmolVLM-500M-Instruct-GGUF\"},\n\t},\n\t\"gpt-oss\": {\n\t\t{\"\", \"\", \"NexaAI/gpt-oss-20b-GGUF\"},\n\t},\n\t\"gpt-oss-mlx\": {\n\t\t{\"darwin\", \"arm64\", \"NexaAI/gpt-oss-20b-MLX-4bit\"},\n\t},\n\t\"omni-neural\": {\n\t\t{\"windows\", \"arm64\", \"NexaAI/OmniNeural-4B\"},\n\t},\n}\n\nvar modelMappingInit sync.Once\n\nvar modelMapping = make(map[string]string)\n\nfunc GetModelMapping(shortcut string) (string, bool) {\n\tmodelMappingInit.Do(func() {\n\t\tfor model, aliases := range modelMappingSrc {\n\t\t\tfor _, entry := range aliases {\n\t\t\t\tif (entry[0] == \"\" || entry[0] == runtime.GOOS) && (entry[1] == \"\" || entry[1] == runtime.GOARCH) {\n\t\t\t\t\tmodelMapping[model] = entry[2]\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\n\tactualPath, exists := modelMapping[shortcut]\n\treturn actualPath, exists\n}\n"
  },
  {
    "path": "runner/internal/config/model_mapping_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage config\n\nimport (\n\t\"testing\"\n)\n\nfunc TestGetModelMapping(t *testing.T) {\n\ttests := []struct {\n\t\tshortcut    string\n\t\texpected    string\n\t\tshouldExist bool\n\t}{\n\t\t{\"qwen3\", \"Qwen/Qwen3-4B-GGUF\", true},\n\t\t{\"qwen2vl\", \"ggml-org/Qwen2-VL-2B-Instruct-GGUF\", true},\n\t\t{\"qwen2.5vl\", \"Qwen/Qwen2.5-VL-3B-Instruct\", true},\n\t\t{\"gemma3\", \"ggml-org/gemma-3-4b-it-GGUF\", true},\n\t\t{\"smolvlm\", \"ggml-org/SmolVLM-500M-Instruct-GGUF\", true},\n\t\t{\"unknown\", \"\", false},\n\t\t{\"\", \"\", false},\n\t}\n\n\tfor _, test := range tests {\n\t\tactual, exists := GetModelMapping(test.shortcut)\n\t\tif exists != test.shouldExist {\n\t\t\tt.Errorf(\"GetModelMapping(%q) exists = %v, want %v\", test.shortcut, exists, test.shouldExist)\n\t\t}\n\t\tif exists && actual != test.expected {\n\t\t\tt.Errorf(\"GetModelMapping(%q) = %q, want %q\", test.shortcut, actual, test.expected)\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "runner/internal/downloader/http.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage downloader\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/url\"\n\t\"time\"\n\n\t\"github.com/valyala/fasthttp\"\n)\n\ntype HTTPDownloader struct {\n\tauthToken    string\n\tmaxRedirects int\n\n\tmaxRetries   int\n\tretryDelayMs int\n\n\tfasthttp.Client\n}\n\nfunc NewDownloader(authToken string) *HTTPDownloader {\n\treturn &HTTPDownloader{\n\t\tauthToken:    authToken,\n\t\tmaxRedirects: 3,\n\t\tmaxRetries:   3,\n\t\tretryDelayMs: 1000,\n\t\tClient: fasthttp.Client{\n\t\t\tNoDefaultUserAgentHeader:  true,\n\t\t\tMaxIdemponentCallAttempts: 3,\n\t\t\tReadBufferSize:            64 * 1024,\n\t\t\tWriteBufferSize:           64 * 1024,\n\t\t},\n\t}\n}\n\nfunc (d *HTTPDownloader) DownloadChunk(ctx context.Context, url string, offset, limit int64, writer io.Writer) error {\n\treq := fasthttp.AcquireRequest()\n\tresp := fasthttp.AcquireResponse()\n\tdefer fasthttp.ReleaseRequest(req)\n\tdefer fasthttp.ReleaseResponse(resp)\n\n\tfor range d.maxRedirects {\n\t\treq.Reset()\n\t\tresp.Reset()\n\n\t\treq.SetRequestURI(url)\n\t\treq.Header.SetMethod(fasthttp.MethodGet)\n\t\treq.Header.Set(\"User-Agent\", \"NexaSDK/0.0\")\n\t\tif d.authToken != \"\" {\n\t\t\treq.Header.Set(\"Authorization\", \"Bearer \"+d.authToken)\n\t\t}\n\t\tif limit > 0 {\n\t\t\treq.Header.Set(\"Range\", fmt.Sprintf(\"bytes=%d-%d\", offset, offset+limit-1))\n\t\t} else {\n\t\t\treq.Header.Set(\"Range\", fmt.Sprintf(\"bytes=%d-\", offset))\n\t\t}\n\n\t\tvar lastErr error\n\t\tbaseDelay := d.retryDelayMs\n\t\tfor retry := 0; retry < d.maxRetries; retry++ {\n\t\t\tif retry > 0 {\n\t\t\t\tselect {\n\t\t\t\tcase <-ctx.Done():\n\t\t\t\t\treturn ctx.Err()\n\t\t\t\tdefault:\n\t\t\t\t}\n\t\t\t\ttime.Sleep(time.Duration(baseDelay) * time.Millisecond)\n\t\t\t}\n\t\t\tif err := d.Client.Do(req, resp); err != nil {\n\t\t\t\tlastErr = err\n\t\t\t\tif errors.Is(err, fasthttp.ErrTimeout) || errors.Is(err, io.EOF) {\n\t\t\t\t\tslog.Warn(\"Request failed, retrying\", \"error\", err, \"retry\", retry+1)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// Other errors are returned directly\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\tlastErr = nil\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tif lastErr != nil {\n\t\t\treturn fmt.Errorf(\"download failed after %d retries: %w\", d.maxRetries, lastErr)\n\t\t}\n\n\t\tif resp.StatusCode() >= 300 && resp.StatusCode() < 400 {\n\t\t\tlocation := resp.Header.Peek(\"Location\")\n\t\t\tif len(location) == 0 {\n\t\t\t\treturn fmt.Errorf(\"redirect status %d with no Location\", resp.StatusCode())\n\t\t\t}\n\t\t\turl = resolveRelativeURL(url, string(location))\n\t\t\tcontinue\n\t\t}\n\n\t\tif resp.StatusCode() != fasthttp.StatusPartialContent && resp.StatusCode() != fasthttp.StatusOK {\n\t\t\treturn fmt.Errorf(\"unexpected status code: %d\", resp.StatusCode())\n\t\t}\n\n\t\t_, err := writer.Write(resp.Body())\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}\n\n\treturn fmt.Errorf(\"exceeded max redirects (%d)\", d.maxRedirects)\n}\n\nfunc resolveRelativeURL(base, location string) string {\n\tu, err := url.Parse(location)\n\tif err != nil {\n\t\treturn location\n\t}\n\tif u.IsAbs() {\n\t\treturn location\n\t}\n\n\tbaseURL, err := url.Parse(base)\n\tif err != nil {\n\t\treturn location\n\t}\n\treturn baseURL.ResolveReference(u).String()\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"reflect\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"golang.org/x/sync/errgroup\"\n\t\"resty.dev/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n)\n\nconst ProgressSuffix = \".progress\"\n\ntype ModelFileInfo struct {\n\tName string `json:\"name\"`\n\tSize int64  `json:\"size\"`\n}\n\ntype ModelHub interface {\n\tChinaMainlandOnly() bool\n\tMaxConcurrency() int\n\tCheckAvailable(ctx context.Context, modelName string) error\n\tModelInfo(ctx context.Context, modelName string) ([]ModelFileInfo, error)\n\tGetFileContent(ctx context.Context, modelName, fileName string, offset, limit int64, writer io.Writer) error\n}\n\nvar hubs = []ModelHub{\n\tNewVolces(),\n\tNewModelScope(),\n\tNewS3(),\n\tNewHuggingFace(),\n}\n\nvar errUnavailable = fmt.Errorf(\"no model hub contains the model\")\n\n// Specify hub to use\nfunc SetHub(h ModelHub) {\n\thubs = []ModelHub{h}\n}\n\n// list model files\n\nfunc ModelInfo(ctx context.Context, modelName string) ([]ModelFileInfo, *types.ModelManifest, error) {\n\tslog.Debug(\"fetching model info\", \"model\", modelName)\n\n\thub, err := getHub(ctx, modelName)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tfiles, err := hub.ModelInfo(ctx, modelName)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\t// check manifest available\n\tconst manifestFile = \"nexa.manifest\"\n\tvar hasManifest bool\n\tfor i := 0; i < len(files); i++ {\n\t\tif files[i].Name == manifestFile {\n\t\t\tfiles = append(files[:i], files[i+1:]...)\n\t\t\thasManifest = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif !hasManifest {\n\t\treturn files, nil, nil\n\t}\n\n\t// parse manifest\n\tdata, err := GetFileContent(ctx, modelName, manifestFile)\n\tif err != nil {\n\t\tslog.Warn(\"failed to get manifest file, ignore\", \"error\", err)\n\t\treturn nil, nil, err\n\t}\n\n\tvar manifest types.ModelManifest\n\tif err := sonic.Unmarshal(data, &manifest); err != nil {\n\t\tslog.Warn(\"failed to parse manifest file, ignore\", \"error\", err)\n\t\treturn nil, nil, err\n\t}\n\n\treturn files, &manifest, nil\n\n}\n\n// Get single file content\n\nfunc GetFileContent(ctx context.Context, modelName, fileName string) ([]byte, error) {\n\tslog.Debug(\"fetching file content\", \"model\", modelName, \"file\", fileName)\n\n\thub, err := getHub(ctx, modelName)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbuf := bytes.NewBuffer(nil)\n\tif err := hub.GetFileContent(ctx, modelName, fileName, 0, 0, buf); err != nil {\n\t\treturn nil, err\n\t}\n\treturn buf.Bytes(), nil\n}\n\n// Batch download\n\ntype downloadTask struct {\n\tOutputPath string\n\tModelName  string\n\tFileName   string\n\tOffset     int64\n\tLimit      int64\n\tMarkerPath string\n\tChunkIndex int\n}\n\nconst (\n\tminChunkSize = 16 * 1024 * 1024 // 16MiB\n)\n\nfunc StartDownload(ctx context.Context, modelName, outputPath string, files []ModelFileInfo) (resChan chan types.DownloadInfo, errChan chan error) {\n\tslog.Info(\"Starting download\", \"model\", modelName, \"outputPath\", outputPath, \"files\", files)\n\n\thub, err := getHub(ctx, modelName)\n\tif err != nil {\n\t\tresCh := make(chan types.DownloadInfo)\n\t\terrCh := make(chan error, 1)\n\t\tclose(resCh)\n\t\terrCh <- err\n\t\tclose(errCh)\n\t\treturn resCh, errCh\n\t}\n\n\tmaxConcurrency := hub.MaxConcurrency()\n\tresCh := make(chan types.DownloadInfo)\n\terrCh := make(chan error, maxConcurrency)\n\tslog.Info(\"GetHub\", \"hub\", reflect.TypeOf(hub), \"maxConcurrency\", maxConcurrency)\n\n\tgo func() {\n\t\tdefer close(errCh)\n\t\tdefer close(resCh)\n\n\t\tvar totalSize int64\n\t\tfor _, f := range files {\n\t\t\ttotalSize += f.Size\n\t\t}\n\t\tvar downloaded int64\n\t\tvar markerPaths []string\n\t\tg, gctx := errgroup.WithContext(ctx)\n\t\tg.SetLimit(maxConcurrency)\n\n\t\tfor _, f := range files {\n\t\t\tif err := os.MkdirAll(filepath.Dir(filepath.Join(outputPath, f.Name)), 0o755); err != nil {\n\t\t\t\terrCh <- fmt.Errorf(\"failed to create directory: %v, %s\", err, f.Name)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tchunkSize := max(minChunkSize, f.Size/128)\n\t\t\tnChunks := int((f.Size + chunkSize - 1) / chunkSize)\n\t\t\toutPath := filepath.Join(outputPath, f.Name)\n\t\t\tmarkerPath := filepath.Join(outputPath, f.Name+ProgressSuffix)\n\n\t\t\tmarkers, err := os.ReadFile(markerPath)\n\t\t\tif err != nil && !errors.Is(err, os.ErrNotExist) {\n\t\t\t\terrCh <- err\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif err != nil || len(markers) != nChunks {\n\t\t\t\tmarkers = make([]byte, nChunks)\n\t\t\t\tif err := os.WriteFile(markerPath, markers, 0o644); err != nil {\n\t\t\t\t\terrCh <- err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile, err := os.OpenFile(outPath, os.O_RDWR|os.O_CREATE, 0o644)\n\t\t\tif err != nil {\n\t\t\t\terrCh <- err\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif fi, _ := file.Stat(); fi == nil || fi.Size() < f.Size {\n\t\t\t\tif err := file.Truncate(f.Size); err != nil {\n\t\t\t\t\tfile.Close()\n\t\t\t\t\terrCh <- err\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.Close()\n\t\t\tmarkerPaths = append(markerPaths, markerPath)\n\n\t\t\tslog.Info(\"Download file\", \"name\", f.Name, \"size\", f.Size, \"chunkSize\", chunkSize)\n\n\t\t\tfor i, marker := range markers {\n\t\t\t\tif marker == 0x01 {\n\t\t\t\t\tdownloaded += min(chunkSize, f.Size-int64(i)*chunkSize)\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\toffset := int64(i) * chunkSize\n\t\t\t\tt := downloadTask{\n\t\t\t\t\tOutputPath: outputPath,\n\t\t\t\t\tModelName:  modelName,\n\t\t\t\t\tFileName:   f.Name,\n\t\t\t\t\tOffset:     offset,\n\t\t\t\t\tLimit:      min(chunkSize, f.Size-offset),\n\t\t\t\t\tMarkerPath: markerPath,\n\t\t\t\t\tChunkIndex: i,\n\t\t\t\t}\n\t\t\t\tg.Go(func() error {\n\t\t\t\t\tif err := doTask(gctx, hub, t); err != nil {\n\t\t\t\t\t\tslog.Error(\"Download task failed\", \"task\", t, \"error\", err)\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t\tresCh <- types.DownloadInfo{\n\t\t\t\t\t\tTotalDownloaded: atomic.AddInt64(&downloaded, t.Limit),\n\t\t\t\t\t\tTotalSize:       totalSize,\n\t\t\t\t\t}\n\t\t\t\t\treturn nil\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\n\t\tif err := g.Wait(); err != nil {\n\t\t\terrCh <- err\n\t\t\treturn\n\t\t}\n\t\tfor _, p := range markerPaths {\n\t\t\t_ = os.Remove(p)\n\t\t}\n\t\tslog.Info(\"download complete\", \"model\", modelName, \"outputPath\", outputPath)\n\t}()\n\n\treturn resCh, errCh\n}\n\nvar (\n\tchinaMainlandCheck sync.Once\n\tisChinaMainland    bool\n)\n\nfunc checkChinaMainland() bool {\n\tchinaMainlandCheck.Do(func() {\n\t\tclient := resty.New()\n\t\tclient.SetTimeout(2 * time.Second)\n\t\tdefer client.Close()\n\n\t\tfor _, ep := range [][]string{\n\t\t\t{\"http://ip-api.com/json\", \"countryCode\"},\n\t\t\t{\"https://ipapi.co/json\", \"country_code\"},\n\t\t\t{\"https://ipinfo.io/json\", \"country\"},\n\t\t} {\n\t\t\tres, err := client.R().\n\t\t\t\t// EnableDebug().\n\t\t\t\tGet(ep[0])\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tn, err := sonic.GetFromString(res.String(), ep[1])\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tcode, err := n.String()\n\t\t\tif err != nil {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tslog.Info(\"Detected country code\", \"endpoint\", ep[0], \"code\", code)\n\t\t\tisChinaMainland = code == \"CN\"\n\t\t\treturn\n\t\t}\n\t\tslog.Error(\"Detect country code failed\")\n\t})\n\treturn isChinaMainland\n}\n\nfunc getHub(ctx context.Context, modelName string) (ModelHub, error) {\n\t// if only one hub specified, check availability first\n\tif len(hubs) == 1 {\n\t\th := hubs[0]\n\t\tslog.Info(\"specified single hub\", \"hub\", reflect.TypeOf(h))\n\t\treturn h, h.CheckAvailable(ctx, modelName)\n\t}\n\n\t// try each hub\n\tfor _, h := range hubs {\n\t\tif h.ChinaMainlandOnly() && !checkChinaMainland() {\n\t\t\tslog.Info(\"skip china mainland only hub\", \"hub\", reflect.TypeOf(h))\n\t\t\tcontinue\n\t\t}\n\t\tif err := h.CheckAvailable(ctx, modelName); err != nil {\n\t\t\tslog.Warn(\"hub not available, try next\", \"hub\", reflect.TypeOf(h), \"err\", err)\n\t\t} else {\n\t\t\tslog.Info(\"hub available\", \"hub\", reflect.TypeOf(h))\n\t\t\treturn h, nil\n\t\t}\n\t}\n\n\treturn nil, errUnavailable\n}\n\nfunc doTask(ctx context.Context, hub ModelHub, task downloadTask) error {\n\tslog.Debug(\"Downloading chunk\", \"OutputPath\", task.OutputPath, \"model\", task.ModelName, \"file\", task.FileName, \"offset\", task.Offset, \"limit\", task.Limit)\n\n\tfile, err := os.OpenFile(filepath.Join(task.OutputPath, task.FileName), os.O_CREATE|os.O_WRONLY, 0o644)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\tif _, err := file.Seek(task.Offset, io.SeekStart); err != nil {\n\t\treturn err\n\t}\n\tif err := hub.GetFileContent(ctx, task.ModelName, task.FileName, task.Offset, task.Limit, file); err != nil {\n\t\treturn err\n\t}\n\tmarker, err := os.OpenFile(task.MarkerPath, os.O_WRONLY, 0o644)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer marker.Close()\n\t_, _ = marker.WriteAt([]byte{0x01}, int64(task.ChunkIndex))\n\treturn nil\n}\n\nfunc code2error(client *resty.Client, response *resty.Response) error {\n\tswitch response.StatusCode() {\n\tcase http.StatusOK:\n\t\treturn nil\n\tcase http.StatusNotFound, http.StatusUnauthorized:\n\t\treturn fmt.Errorf(\"model not found, please check the model name or auth token\")\n\tdefault:\n\t\treturn fmt.Errorf(\"HTTPError: %s\", response.Status())\n\t}\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub_hf.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"golang.org/x/sync/errgroup\"\n\t\"resty.dev/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/downloader\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n)\n\nconst HF_ENDPOINT = \"https://huggingface.co\"\n\ntype HuggingFace struct {\n\tdownloader *downloader.HTTPDownloader\n}\n\nfunc NewHuggingFace() *HuggingFace {\n\treturn &HuggingFace{downloader: downloader.NewDownloader(config.Get().HFToken)}\n}\n\nfunc (d *HuggingFace) ChinaMainlandOnly() bool {\n\treturn false\n}\n\nfunc (d *HuggingFace) MaxConcurrency() int {\n\tif config.Get().HFToken != \"\" {\n\t\treturn 8\n\t} else {\n\t\tfmt.Println(render.GetTheme().Warning.Sprintf(\"NEXA_HFTOKEN not set. Set it for speeding up downloads from https://huggingface.co/settings/tokens\"))\n\t\treturn 1\n\t}\n}\n\nfunc (d *HuggingFace) CheckAvailable(ctx context.Context, name string) error {\n\treturn nil\n}\n\nfunc (d *HuggingFace) ModelInfo(ctx context.Context, name string) ([]ModelFileInfo, error) {\n\tinfo := struct {\n\t\tSiblings []struct {\n\t\t\tRFileName string `json:\"rfilename\"`\n\t\t} `json:\"siblings\"`\n\t}{}\n\n\tclient := resty.New()\n\tdefer client.Close()\n\tclient.SetTimeout(10 * time.Second)\n\tclient.AddResponseMiddleware(code2error)\n\n\treq := client.R()\n\tif config.Get().HFToken != \"\" {\n\t\treq.SetHeader(\"Authorization\", \"Bearer \"+config.Get().HFToken)\n\t}\n\tresp, err := req.Get(fmt.Sprintf(\"%s/api/models/%s\", HF_ENDPOINT, name))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := sonic.UnmarshalString(resp.String(), &info); err != nil {\n\t\treturn nil, err\n\t}\n\n\tres := make([]ModelFileInfo, len(info.Siblings))\n\tvar resLock sync.Mutex\n\n\tg, gctx := errgroup.WithContext(ctx)\n\tg.SetLimit(d.MaxConcurrency())\n\n\tfor i := range info.Siblings {\n\t\ti := i\n\t\tg.Go(func() error {\n\t\t\treq := client.R()\n\t\t\tif config.Get().HFToken != \"\" {\n\t\t\t\treq.SetHeader(\"Authorization\", \"Bearer \"+config.Get().HFToken)\n\t\t\t}\n\t\t\treq.SetHeader(\"Accept-Encoding\", \"identity\")\n\n\t\t\tresp, err := req.SetContext(gctx).Head(fmt.Sprintf(\"%s/%s/resolve/main/%s\", HF_ENDPOINT, name, info.Siblings[i].RFileName))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tif resp.StatusCode() != http.StatusOK || resp.RawResponse.ContentLength < 0 {\n\t\t\t\treturn fmt.Errorf(\"Get file [%s] info error: %s\", info.Siblings[i].RFileName, resp.Status())\n\t\t\t}\n\n\t\t\tresLock.Lock()\n\t\t\tres[i] = ModelFileInfo{\n\t\t\t\tName: info.Siblings[i].RFileName,\n\t\t\t\tSize: resp.RawResponse.ContentLength,\n\t\t\t}\n\t\t\tresLock.Unlock()\n\n\t\t\treturn nil\n\t\t})\n\t}\n\n\tif err := g.Wait(); err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn res, nil\n}\n\nfunc (d *HuggingFace) GetFileContent(ctx context.Context, modelName, fileName string, offset, limit int64, writer io.Writer) error {\n\treturn d.downloader.DownloadChunk(ctx, fmt.Sprintf(\"%s/%s/resolve/main/%s\", HF_ENDPOINT, modelName, fileName), offset, limit, writer)\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub_localfs.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\ntype LocalFS struct {\n\tbasePath string\n}\n\nfunc NewLocalFS(base string) *LocalFS {\n\treturn &LocalFS{base}\n}\n\nfunc (d *LocalFS) ChinaMainlandOnly() bool {\n\treturn false\n}\n\nfunc (d *LocalFS) MaxConcurrency() int {\n\treturn 4\n}\n\nfunc (d *LocalFS) CheckAvailable(ctx context.Context, name string) error {\n\t// check is directory exists\n\tinfo, err := os.Stat(d.basePath)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !info.IsDir() {\n\t\treturn os.ErrNotExist\n\t}\n\treturn nil\n}\n\nfunc (d *LocalFS) ModelInfo(ctx context.Context, name string) ([]ModelFileInfo, error) {\n\tres := make([]ModelFileInfo, 0)\n\n\t// recursive list files in basePath\n\terr := filepath.Walk(d.basePath, func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tif !info.IsDir() {\n\t\t\trelPath, err := filepath.Rel(d.basePath, path)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tres = append(res, ModelFileInfo{\n\t\t\t\tName: relPath,\n\t\t\t\tSize: info.Size(),\n\t\t\t})\n\t\t}\n\t\treturn nil\n\t})\n\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn res, nil\n}\n\nfunc (d *LocalFS) GetFileContent(ctx context.Context, modelName, fileName string, offset, limit int64, writer io.Writer) error {\n\tfile, err := os.Open(filepath.Join(d.basePath, fileName))\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer file.Close()\n\n\t// seek to offset\n\tif offset > 0 {\n\t\t_, err = file.Seek(offset, io.SeekStart)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tvar reader io.Reader = file\n\tif limit > 0 {\n\t\treader = io.LimitReader(file, limit)\n\t}\n\n\t_, err = io.Copy(writer, reader)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub_modelscope.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"time\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"resty.dev/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/downloader\"\n)\n\nconst MS_ENDPOINT = \"https://modelscope.cn\"\n\ntype ModelScope struct {\n\tdownloader *downloader.HTTPDownloader\n}\n\nfunc NewModelScope() *ModelScope {\n\treturn &ModelScope{downloader: downloader.NewDownloader(\"\")}\n}\n\nfunc (d *ModelScope) ChinaMainlandOnly() bool {\n\treturn true\n}\n\nfunc (d *ModelScope) MaxConcurrency() int {\n\treturn 8\n}\n\nfunc (d *ModelScope) CheckAvailable(ctx context.Context, name string) error {\n\tclient := resty.New()\n\tdefer client.Close()\n\tclient.SetTimeout(5 * time.Second)\n\tclient.AddResponseMiddleware(code2error)\n\n\t_, err := client.R().Get(fmt.Sprintf(\"%s/api/v1/models/%s/revisions\", MS_ENDPOINT, name))\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (d *ModelScope) ModelInfo(ctx context.Context, name string) ([]ModelFileInfo, error) {\n\treturn d.modelInfo(ctx, name, \"\")\n}\n\nfunc (d *ModelScope) modelInfo(ctx context.Context, name string, root string) ([]ModelFileInfo, error) {\n\tinfo := struct {\n\t\tData struct {\n\t\t\tFiles []struct {\n\t\t\t\tPath string\n\t\t\t\tSize int64\n\t\t\t\tType string\n\t\t\t}\n\t\t}\n\t}{}\n\n\tclient := resty.New()\n\tdefer client.Close()\n\tclient.SetTimeout(10 * time.Second)\n\tclient.AddResponseMiddleware(code2error)\n\n\tresp, err := client.R().\n\t\tGet(fmt.Sprintf(\"%s/api/v1/models/%s/repo/files?Root=%s\", MS_ENDPOINT, name, root))\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif err := sonic.UnmarshalString(resp.String(), &info); err != nil {\n\t\treturn nil, err\n\t}\n\n\tres := make([]ModelFileInfo, 0)\n\tfor _, file := range info.Data.Files {\n\t\t// blob, tree\n\t\tswitch file.Type {\n\t\tcase \"tree\":\n\t\t\tsubFiles, err := d.modelInfo(ctx, name, file.Path)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tres = append(res, subFiles...)\n\t\tcase \"blob\":\n\t\t\tres = append(res, ModelFileInfo{\n\t\t\t\tName: file.Path,\n\t\t\t\tSize: file.Size,\n\t\t\t})\n\t\tdefault:\n\t\t\tslog.Warn(\"modelscope unknown file type\", \"model\", name, \"file\", file.Path, \"type\", file.Type)\n\t\t\tcontinue\n\t\t}\n\t}\n\treturn res, nil\n}\n\nfunc (d *ModelScope) GetFileContent(ctx context.Context, modelName, fileName string, offset, limit int64, writer io.Writer) error {\n\treturn d.downloader.DownloadChunk(ctx, fmt.Sprintf(\"%s/models/%s/resolve/main/%s\", MS_ENDPOINT, modelName, fileName), offset, limit, writer)\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub_s3.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"strings\"\n\n\t\"github.com/aws/aws-sdk-go-v2/aws\"\n\t\"github.com/aws/aws-sdk-go-v2/config\"\n\t\"github.com/aws/aws-sdk-go-v2/service/s3\"\n\t\"github.com/aws/smithy-go/logging\"\n)\n\ntype S3 struct {\n\ts3Client *s3.Client\n}\n\nfunc NewS3() *S3 {\n\ts := &S3{}\n\ts.initS3Client()\n\treturn s\n}\n\nfunc (s *S3) initS3Client() {\n\tcfg, err := config.LoadDefaultConfig(\n\t\tcontext.TODO(),\n\t\tconfig.WithLogger(logging.Nop{}),\n\t\tconfig.WithCredentialsProvider(aws.AnonymousCredentials{}),\n\t\tconfig.WithRegion(\"us-west-1\"),\n\t)\n\tif err != nil {\n\t\tpanic(\"unable to load SDK config, \" + err.Error())\n\t}\n\ts.s3Client = s3.NewFromConfig(cfg)\n}\n\nfunc (s *S3) ChinaMainlandOnly() bool {\n\treturn false\n}\n\nfunc (s *S3) MaxConcurrency() int {\n\treturn 8\n}\n\nfunc (s *S3) CheckAvailable(ctx context.Context, modelName string) error {\n\tif !strings.HasPrefix(modelName, \"NexaAI/\") {\n\t\treturn errNotSupported\n\t}\n\n\tmodelName = strings.ReplaceAll(modelName, \"NexaAI/\", \"public/nexa_sdk/huggingface-models/\") + \"/\"\n\tres, err := s.s3Client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{\n\t\tBucket:  aws.String(\"nexa-model-hub-bucket\"),\n\t\tPrefix:  aws.String(modelName),\n\t\tMaxKeys: aws.Int32(1),\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif aws.ToInt32(res.KeyCount) == 0 {\n\t\treturn fmt.Errorf(\"model %s not found\", modelName)\n\t}\n\n\treturn nil\n}\n\nfunc (s *S3) ModelInfo(ctx context.Context, modelName string) ([]ModelFileInfo, error) {\n\tmodelName = strings.ReplaceAll(modelName, \"NexaAI/\", \"public/nexa_sdk/huggingface-models/\") + \"/\"\n\n\tdata, err := s.s3Client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{\n\t\tBucket: aws.String(\"nexa-model-hub-bucket\"),\n\t\tPrefix: aws.String(modelName),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tres := make([]ModelFileInfo, len(data.Contents))\n\tfor i, item := range data.Contents {\n\t\tres[i] = ModelFileInfo{\n\t\t\tName: strings.TrimPrefix(*item.Key, modelName),\n\t\t\tSize: *item.Size,\n\t\t}\n\t}\n\treturn res, nil\n}\n\nfunc (s *S3) GetFileContent(ctx context.Context, modelName, fileName string, offset, limit int64, writer io.Writer) error {\n\tname := strings.ReplaceAll(modelName, \"NexaAI/\", \"public/nexa_sdk/huggingface-models/\") + \"/\" + fileName\n\n\tslog.Debug(\"S3 GetFileContent\", \"modelName\", modelName, \"fileName\", fileName, \"name\", name, \"offset\", offset, \"limit\", limit)\n\n\tinput := &s3.GetObjectInput{\n\t\tBucket: aws.String(\"nexa-model-hub-bucket\"),\n\t\tKey:    aws.String(name),\n\t}\n\n\tif limit > 0 {\n\t\tinput.Range = aws.String(fmt.Sprintf(\"bytes=%d-%d\", offset, offset+limit-1))\n\t} else if offset > 0 {\n\t\tinput.Range = aws.String(fmt.Sprintf(\"bytes=%d-\", offset))\n\t}\n\n\tdata, err := s.s3Client.GetObject(ctx, input)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer data.Body.Close()\n\n\t_, err = io.Copy(writer, data.Body)\n\treturn err\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"context\"\n\t\"log/slog\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/lmittmann/tint\"\n)\n\nconst MODEL_NAME = \"NexaAI/OmniNeural-4B\"\n\nfunc TestMain(m *testing.M) {\n\tslog.SetDefault(slog.New(tint.NewHandler(os.Stderr, &tint.Options{\n\t\tAddSource: true,\n\t\tLevel:     slog.LevelDebug,\n\t})))\n\n\t// only test huggingface\n\thubs = hubs[3:]\n\n\tos.Exit(m.Run())\n}\n\nfunc TestModelInfo(t *testing.T) {\n\tdata, _, err := ModelInfo(context.Background(), MODEL_NAME)\n\tif err != nil {\n\t\tt.Error(err)\n\t}\n\tt.Log(data)\n}\n\nfunc TestGetFileContent(t *testing.T) {\n\tdata, err := GetFileContent(context.Background(), MODEL_NAME, \".gitattributes\")\n\tif err != nil {\n\t\tt.Error(err)\n\t\treturn\n\t}\n\n\tt.Logf(\"GetFileContent:\\n%s\", data)\n}\n\nfunc TestDownload(t *testing.T) {\n\tfiles, _, err := ModelInfo(context.Background(), MODEL_NAME)\n\tif err != nil {\n\t\tt.Error(err)\n\t\treturn\n\t}\n\n\tresCh, errCh := StartDownload(context.Background(), MODEL_NAME, \"/tmp/OmniNeural-4B\", files)\n\tfor p := range resCh {\n\t\tt.Logf(\"Downloaded: %d / %d\", p.TotalDownloaded, p.TotalSize)\n\t}\n\tfor e := range errCh {\n\t\tt.Error(e)\n\t}\n\n\tos.RemoveAll(\"/tmp/OmniNeural-4B/\")\n}\n\nfunc BenchmarkDownload(b *testing.B) {\n\tfiles, _, err := ModelInfo(context.Background(), \"ggml-org/embeddinggemma-300M-qat-q4_0-GGUF\")\n\tif err != nil {\n\t\tb.Error(err)\n\t\treturn\n\t}\n\n\tresCh, errCh := StartDownload(context.Background(), \"ggml-org/embeddinggemma-300M-qat-q4_0-GGUF\", \"/tmp/embeddinggemma-300M-qat-q4_0-GGUF\", files)\n\tfor p := range resCh {\n\t\tb.Logf(\"Downloaded: %d / %d\", p.TotalDownloaded, p.TotalSize)\n\t}\n\tfor e := range errCh {\n\t\tb.Error(e)\n\t}\n}\n"
  },
  {
    "path": "runner/internal/model_hub/model_hub_volces.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage model_hub\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"strings\"\n\n\t\"github.com/aws/aws-sdk-go-v2/aws\"\n\t\"github.com/aws/aws-sdk-go-v2/config\"\n\t\"github.com/aws/aws-sdk-go-v2/service/s3\"\n\t\"github.com/aws/smithy-go/logging\"\n)\n\ntype Volces struct {\n\ts3Client *s3.Client\n}\n\nfunc NewVolces() *Volces {\n\tv := &Volces{}\n\tv.initS3Client()\n\treturn v\n}\n\nvar (\n\terrNotSupported = fmt.Errorf(\"not supported\")\n)\n\nfunc (v *Volces) initS3Client() {\n\tcfg, err := config.LoadDefaultConfig(\n\t\tcontext.TODO(),\n\t\tconfig.WithLogger(logging.Nop{}),\n\t\tconfig.WithCredentialsProvider(aws.AnonymousCredentials{}),\n\t\tconfig.WithBaseEndpoint(\"https://tos-s3-cn-beijing.volces.com\"),\n\t\tconfig.WithRegion(\"cn-beijing\"),\n\t)\n\tif err != nil {\n\t\tpanic(\"unable to load SDK config, \" + err.Error())\n\t}\n\tv.s3Client = s3.NewFromConfig(cfg)\n}\n\nfunc (v *Volces) ChinaMainlandOnly() bool {\n\treturn true\n}\n\nfunc (v *Volces) MaxConcurrency() int {\n\treturn 4\n}\n\nfunc (v *Volces) CheckAvailable(ctx context.Context, modelName string) error {\n\tif !strings.HasPrefix(modelName, \"NexaAI/\") {\n\t\treturn errNotSupported\n\t}\n\n\tmodelName = strings.ReplaceAll(modelName, \"NexaAI/\", \"model/\") + \"/\"\n\tres, err := v.s3Client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{\n\t\tBucket:  aws.String(\"nexa-model-hub-bucket\"),\n\t\tPrefix:  aws.String(modelName),\n\t\tMaxKeys: aws.Int32(1),\n\t})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif aws.ToInt32(res.KeyCount) == 0 {\n\t\treturn fmt.Errorf(\"model %s not found\", modelName)\n\t}\n\n\treturn nil\n}\n\nfunc (v *Volces) ModelInfo(ctx context.Context, modelName string) ([]ModelFileInfo, error) {\n\tmodelName = strings.ReplaceAll(modelName, \"NexaAI/\", \"model/\") + \"/\"\n\n\tdata, err := v.s3Client.ListObjectsV2(ctx, &s3.ListObjectsV2Input{\n\t\tBucket: aws.String(\"nexa-model-hub-bucket\"),\n\t\tPrefix: aws.String(modelName),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tres := make([]ModelFileInfo, len(data.Contents))\n\tfor i, item := range data.Contents {\n\t\tres[i] = ModelFileInfo{\n\t\t\tName: strings.TrimPrefix(*item.Key, modelName),\n\t\t\tSize: *item.Size,\n\t\t}\n\t}\n\treturn res, nil\n}\n\nfunc (v *Volces) GetFileContent(ctx context.Context, modelName, fileName string, offset, limit int64, writer io.Writer) error {\n\tname := strings.ReplaceAll(modelName, \"NexaAI/\", \"model/\") + \"/\" + fileName\n\n\tslog.Debug(\"Volces GetFileContent\", \"modelName\", modelName, \"fileName\", fileName, \"name\", name, \"offset\", offset, \"limit\", limit)\n\n\tinput := &s3.GetObjectInput{\n\t\tBucket: aws.String(\"nexa-model-hub-bucket\"),\n\t\tKey:    aws.String(name),\n\t}\n\n\tif limit > 0 {\n\t\tinput.Range = aws.String(fmt.Sprintf(\"bytes=%d-%d\", offset, offset+limit-1))\n\t} else if offset > 0 {\n\t\tinput.Range = aws.String(fmt.Sprintf(\"bytes=%d-\", offset))\n\t}\n\n\tdata, err := v.s3Client.GetObject(ctx, input)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer data.Body.Close()\n\n\t_, err = io.Copy(writer, data.Body)\n\treturn err\n}\n"
  },
  {
    "path": "runner/internal/readline/action.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport (\n\t\"errors\"\n\t\"io\"\n)\n\nvar (\n\tErrComplete = errors.New(\"Complete\") // readline complete\n\n\tErrInterrupt = errors.New(\"Interrupt\")\n)\n\nconst (\n\tNull      = 0\n\tCtrlA     = 1\n\tCtrlB     = 2\n\tCtrlC     = 3\n\tCtrlD     = 4\n\tCtrlE     = 5\n\tCtrlF     = 6\n\tBell      = 7\n\tCtrlH     = 8\n\tTab       = 9\n\tCtrlJ     = 10\n\tKill      = 11\n\tCtrlL     = 12\n\tEnter     = 13\n\tNext      = 14\n\tPrev      = 16\n\tBckSearch = 18\n\tFwdSearch = 19\n\tTranspose = 20\n\tCtrlU     = 21\n\tCtrlW     = 23\n\tCtrlY     = 25\n\tCtrlZ     = 26\n\tEsc       = 27\n\tBackspace = 127\n)\n\nfunc (rl *Readline) initializeEventMaps() {\n\trl.eventMap = map[rune]func() error{\n\t\tNull:  rl.noop,\n\t\tCtrlA: rl.begin,\n\t\tCtrlB: rl.left,\n\t\tCtrlC: rl.interrupt,\n\t\tCtrlD: rl.eof,\n\t\tCtrlE: rl.end,\n\t\tCtrlF: rl.right,\n\t\tBell:  rl.noop,\n\t\tCtrlH: rl.noop,\n\t\tTab:   rl.tab,\n\t\t// CtrlJ:     rl.lf,\n\t\tKill:      rl.noop,\n\t\tCtrlL:     rl.clear,\n\t\tEnter:     rl.enter,\n\t\tNext:      rl.noop,\n\t\tPrev:      rl.noop,\n\t\tBckSearch: rl.noop,\n\t\tFwdSearch: rl.noop,\n\t\tTranspose: rl.noop,\n\t\tCtrlU:     rl.noop,\n\t\tCtrlW:     rl.noop,\n\t\tCtrlY:     rl.noop,\n\t\tCtrlZ:     rl.noop,\n\t\tEsc:       rl.esc,\n\t\tBackspace: rl.backspace,\n\t}\n\trl.escEventMap = map[string]func() error{\n\t\t\"[200~\": rl.pasteStart, // start paste\n\t\t\"[201~\": rl.pasteEnd,   // end paste\n\n\t\t\"[2~\": rl.noop,   // insert\n\t\t\"[3~\": rl.delete, // delete\n\t\t\"[5~\": rl.noop,   // page up\n\t\t\"[6~\": rl.noop,   // page down\n\t\t\"[H\":  rl.noop,   // home\n\t\t\"[F\":  rl.noop,   // end\n\n\t\t\"[A\": rl.prevHistory, // up\n\t\t\"[B\": rl.nextHistory, // down\n\t\t\"[C\": rl.right,       // right\n\t\t\"[D\": rl.left,        // left\n\n\t\t\"OP\":   rl.noop, // F1\n\t\t\"OQ\":   rl.noop, // F2\n\t\t\"OR\":   rl.noop, // F3\n\t\t\"OS\":   rl.noop, // F4\n\t\t\"[15~\": rl.noop, // F5\n\t\t\"[17~\": rl.noop, // F6\n\t\t\"[18~\": rl.noop, // F7\n\t\t\"[19~\": rl.noop, // F8\n\t\t\"[20~\": rl.noop, // F9\n\t\t\"[21~\": rl.noop, // F10\n\t\t\"[23~\": rl.noop, // F11\n\t\t\"[24~\": rl.noop, // F12\n\t}\n}\n\nfunc (rl *Readline) noop() error {\n\treturn nil\n}\n\n// control actions\n\nfunc (rl *Readline) interrupt() error {\n\tif len(rl.buf.data) == 0 {\n\t\tprintln(\"^C\")\n\t\treturn ErrInterrupt\n\t}\n\n\trl.buf.resetState()\n\tprintln()\n\treturn nil\n}\n\nfunc (rl *Readline) eof() error {\n\tif len(rl.buf.data) == 0 {\n\t\treturn io.EOF\n\t}\n\treturn nil\n}\n\nfunc (rl *Readline) esc() error {\n\trl.isEsc = true\n\treturn nil\n}\n\nfunc (rl *Readline) pasteStart() error {\n\trl.isPaste = true\n\treturn nil\n}\n\nfunc (rl *Readline) pasteEnd() error {\n\trl.isPaste = false\n\treturn nil\n}\n\n// cursor move\n\nfunc (rl *Readline) left() error {\n\tif rl.buf.cursorIndex > 0 {\n\t\trl.buf.cursorIndex--\n\t}\n\treturn nil\n}\n\nfunc (rl *Readline) right() error {\n\tif rl.buf.cursorIndex < len(rl.buf.data) {\n\t\trl.buf.cursorIndex++\n\t}\n\treturn nil\n}\n\nfunc (rl *Readline) begin() error {\n\trl.buf.cursorIndex = 0\n\treturn nil\n}\n\nfunc (rl *Readline) end() error {\n\trl.buf.cursorIndex = len(rl.buf.data)\n\treturn nil\n}\n\n// edit actions\n\nfunc (rl *Readline) backspace() error {\n\tif len(rl.buf.data) > 0 && rl.buf.cursorIndex > 0 {\n\t\trl.buf.data = append(rl.buf.data[:rl.buf.cursorIndex-1], rl.buf.data[rl.buf.cursorIndex:]...)\n\t\trl.buf.cursorIndex--\n\t}\n\treturn nil\n}\n\nfunc (rl *Readline) delete() error {\n\tif rl.buf.cursorIndex < len(rl.buf.data) {\n\t\trl.buf.data = append(rl.buf.data[:rl.buf.cursorIndex], rl.buf.data[rl.buf.cursorIndex+1:]...)\n\t}\n\treturn nil\n}\n\nfunc (rl *Readline) clear() error {\n\tprint(\"\\x1b[H\\x1b[2J\") // clear screen\n\treturn nil\n}\n\nfunc (rl *Readline) tab() error {\n\trl.buf.insertRuneAtCursor(' ')\n\trl.buf.insertRuneAtCursor(' ')\n\trl.buf.insertRuneAtCursor(' ')\n\trl.buf.insertRuneAtCursor(' ')\n\treturn nil\n}\n\nfunc (rl *Readline) enter() error {\n\tif rl.isPaste {\n\t\trl.buf.insertRuneAtCursor(CtrlJ)\n\t\treturn nil\n\t} else {\n\t\tprintln()\n\t\trl.history.Add(rl.buf.data)\n\t\treturn ErrComplete\n\t}\n}\n\nfunc (rl *Readline) prevHistory() error {\n\thist := rl.history.Prev()\n\tif hist != nil {\n\t\trl.buf.data = []rune(hist)\n\t\trl.buf.cursorIndex = len(rl.buf.data)\n\t}\n\treturn nil\n}\n\nfunc (rl *Readline) nextHistory() error {\n\thist := rl.history.Next()\n\tif hist != nil {\n\t\trl.buf.data = []rune(hist)\n\t\trl.buf.cursorIndex = len(rl.buf.data)\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "runner/internal/readline/buffer.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n\n\t\"github.com/mattn/go-runewidth\"\n\t\"golang.org/x/term\"\n)\n\n// TODO: placeholder\ntype Buffer struct {\n\t// configuration\n\tprompt    string\n\taltPrompt string\n\n\t// state\n\tdata         []rune\n\tcursorIndex  int\n\tcursorHeight int\n}\n\nfunc NewBuffer(prompt, altPrompt string) *Buffer {\n\treturn &Buffer{\n\t\tprompt:    prompt,\n\t\taltPrompt: altPrompt,\n\t\tdata:      make([]rune, 0),\n\t}\n}\n\nfunc (b *Buffer) insertRuneAtCursor(r rune) {\n\tb.data = append(b.data, 0) // extend slice\n\tcopy(b.data[b.cursorIndex+1:], b.data[b.cursorIndex:])\n\tb.data[b.cursorIndex] = r\n\tb.cursorIndex++\n}\n\nfunc (b *Buffer) resetState() {\n\tb.data = b.data[:0]\n\tb.cursorIndex = 0\n\tb.cursorHeight = 1\n}\n\nfunc (b *Buffer) refresh() {\n\twidth, _, err := term.GetSize(int(os.Stdout.Fd()))\n\tif err != nil {\n\t\twidth = 80\n\t\tslog.Warn(\"failed to get terminal width\", \"error\", err)\n\t}\n\n\t// check min width\n\tif width <= runewidth.StringWidth(b.prompt)+4 || width <= runewidth.StringWidth(b.altPrompt)+4 {\n\t\tprint(\"\\x1b[H\\x1b[2J\")\n\t\tprint(\"terminal width is too small!\")\n\t\treturn\n\t}\n\n\tvar buffer strings.Builder\n\n\t// move cursor to the top\n\tif b.cursorHeight != 1 {\n\t\tfmt.Fprintf(&buffer, \"\\x1b[%dA\", b.cursorHeight-1)\n\t}\n\n\t// render lines\n\n\tcurWidth := 0\n\tcurHeight := 1\n\tcursorWidth := 0\n\tcursorHeight := 1\n\n\tbuffer.WriteString(\"\\x1b[1G\") // move cursor to beginning\n\tbuffer.WriteString(\"\\x1b[J\")  // clean after\n\tbuffer.WriteString(b.prompt)\n\tcurWidth += calcANSIWidth(b.prompt)\n\tcursorWidth = curWidth\n\n\tfor i, r := range b.data {\n\t\t// line wrap\n\t\trw := runewidth.RuneWidth(r)\n\t\tif r == CtrlJ {\n\t\t\t// new line\n\t\t\tbuffer.WriteString(\"\\n\")\n\t\t\tbuffer.WriteString(b.altPrompt)\n\t\t\tcurHeight++\n\t\t\tcurWidth = calcANSIWidth(b.altPrompt)\n\t\t} else if curWidth+rw == width {\n\t\t\t// exactly fit\n\t\t\tbuffer.WriteString(string(r))\n\t\t\tbuffer.WriteString(\"\\n\")\n\t\t\tbuffer.WriteString(b.altPrompt)\n\t\t\tcurHeight++\n\t\t\tcurWidth = calcANSIWidth(b.altPrompt)\n\t\t} else if curWidth+rw > width {\n\t\t\t// over flow\n\t\t\tbuffer.WriteString(\"\\n\")\n\t\t\tbuffer.WriteString(b.altPrompt)\n\t\t\tcurHeight++\n\t\t\tbuffer.WriteString(string(r))\n\t\t\tcurWidth = calcANSIWidth(b.altPrompt) + rw\n\t\t} else {\n\t\t\t// normal char\n\t\t\tbuffer.WriteString(string(r))\n\t\t\tcurWidth += rw\n\t\t}\n\t\t// record cursor position\n\t\tif i == b.cursorIndex-1 {\n\t\t\tcursorHeight = curHeight\n\t\t\tcursorWidth = curWidth\n\t\t}\n\t}\n\n\t// move cursor to the position\n\n\tb.cursorHeight = cursorHeight\n\tif curHeight > cursorHeight {\n\t\tfmt.Fprintf(&buffer, \"\\x1b[%dA\", curHeight-cursorHeight)\n\t}\n\tbuffer.WriteString(\"\\x1b[1G\") // move cursor to beginning\n\tfmt.Fprintf(&buffer, \"\\x1b[%dC\", cursorWidth)\n\n\tprint(buffer.String())\n}\n\nvar ansiRegexp = regexp.MustCompile(`\\x1b\\[[0-9;?]*[ -/]*[@-~]`)\n\nfunc calcANSIWidth(s string) int {\n\treturn runewidth.StringWidth(ansiRegexp.ReplaceAllString(s, \"\"))\n}\n"
  },
  {
    "path": "runner/internal/readline/history.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\n// TODO: implement history persistence\ntype History struct {\n\t// config\n\tfile string\n\n\t// state\n\tentries [][]rune\n\tindex   int\n}\n\nfunc NewHistory(file string) *History {\n\treturn &History{\n\t\tfile:    file,\n\t\tentries: [][]rune{},\n\t\tindex:   0,\n\t}\n}\n\nfunc (h *History) Add(entry []rune) {\n\th.entries = append(h.entries, entry)\n\th.index = len(h.entries)\n}\n\nfunc (h *History) Prev() []rune {\n\tif h.index > 0 {\n\t\th.index--\n\t\treturn h.entries[h.index]\n\t}\n\treturn nil\n}\n\nfunc (h *History) Next() []rune {\n\tif h.index < len(h.entries)-1 {\n\t\th.index++\n\t\treturn h.entries[h.index]\n\t} else {\n\t\th.index = len(h.entries)\n\t\treturn []rune{}\n\t}\n}\n\nfunc (h *History) Save() error {\n\treturn nil\n}\n"
  },
  {
    "path": "runner/internal/readline/readline.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport (\n\t\"errors\"\n)\n\ntype Config struct {\n\tPrompt      string\n\tAltPrompt   string\n\tHistoryFile string\n}\n\ntype Readline struct {\n\tterm    *Terminal\n\tbuf     *Buffer\n\thistory *History\n\n\teventMap map[rune]func() error\n\n\t// csi\n\tisEsc       bool\n\tisEscEx     bool\n\tescBuf      string\n\tescEventMap map[string]func() error\n\tisPaste     bool\n}\n\nfunc New(config *Config) (*Readline, error) {\n\tterm, err := NewTerminal()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tbuf := NewBuffer(\n\t\tconfig.Prompt,\n\t\tconfig.AltPrompt,\n\t)\n\n\thist := NewHistory(config.HistoryFile)\n\n\trl := Readline{\n\t\tterm:    term,\n\t\tbuf:     buf,\n\t\thistory: hist,\n\t}\n\trl.initializeEventMaps()\n\treturn &rl, nil\n}\n\nfunc (rl *Readline) Read() (string, error) {\n\trl.buf.resetState()\n\trl.buf.refresh()\n\n\tif err := rl.term.EnterRaw(); err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer rl.term.ExitRaw()\n\n\tfor {\n\t\tr, err := rl.term.Read()\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\n\t\tif err := rl.parse(r); err != nil {\n\t\t\tif errors.Is(err, ErrComplete) {\n\t\t\t\treturn string(rl.buf.data), nil\n\t\t\t}\n\t\t\treturn \"\", err\n\t\t}\n\t}\n}\n\nfunc (rl *Readline) parse(r rune) error {\n\tif rl.isEsc {\n\t\t// escape sequence\n\n\t\trl.isEsc = false\n\n\t\tswitch r {\n\t\tcase 'O': // VT100\n\t\t\trl.isEscEx = true\n\t\t\trl.escBuf = \"O\"\n\t\t\treturn nil\n\t\tcase '[': // CSI\n\t\t\trl.isEscEx = true\n\t\t\trl.escBuf = \"[\"\n\t\t\treturn nil\n\t\t}\n\n\t} else if rl.isEscEx {\n\t\t// escape ex sequence\n\n\t\tif r < 0x20 || r >= 0x80 {\n\t\t\t// invalid char, end escape ex\n\t\t\trl.isEscEx = false\n\t\t\treturn nil\n\t\t}\n\t\trl.escBuf += string(r)\n\t\tif r >= 0x40 {\n\t\t\t// end of escape ex\n\t\t\trl.isEscEx = false\n\t\t\tif event, ok := rl.escEventMap[rl.escBuf]; ok {\n\t\t\t\tif err := event(); err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// print(\"unknown escape sequence: \" + rl.escBuf + \"\\n\") // debug\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\t// single char\n\n\t\tif event, ok := rl.eventMap[r]; !ok {\n\t\t\trl.buf.insertRuneAtCursor(r)\n\t\t} else if err := event(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\trl.buf.refresh()\n\treturn nil\n}\n\nfunc (rl *Readline) Close() error {\n\treturn rl.term.Close()\n}\n"
  },
  {
    "path": "runner/internal/readline/terminal.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport (\n\t\"bufio\"\n\t\"os\"\n)\n\ntype Terminal struct {\n\toldState Termios\n\tstate    Termios\n\tr        *bufio.Reader\n}\n\nfunc NewTerminal() (*Terminal, error) {\n\tt := &Terminal{}\n\n\ttermios, err := getTermios()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tt.oldState = *termios\n\tt.state = *termios\n\tapplyRawMode(&t.state)\n\n\tt.r = bufio.NewReader(os.Stdin)\n\n\treturn t, nil\n}\n\nfunc (t *Terminal) Read() (rune, error) {\n\tr, _, err := t.r.ReadRune()\n\treturn r, err\n}\n\nfunc (t *Terminal) Close() error {\n\treturn t.ExitRaw()\n}\n\nfunc (t *Terminal) EnterRaw() error {\n\terr := setTermios(&t.state)\n\tif err != nil {\n\t\treturn err\n\t}\n\tprint(\"\\x1b[?2004h\") // enable bracketed paste mode\n\treturn nil\n}\n\nfunc (t *Terminal) ExitRaw() error {\n\tprint(\"\\x1b[?2004l\") // disable bracketed paste mode\n\treturn setTermios(&t.oldState)\n}\n"
  },
  {
    "path": "runner/internal/readline/terminal_darwin.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\ntype Termios syscall.Termios\n\nfunc getTermios() (*Termios, error) {\n\tfd := uintptr(syscall.Stdin)\n\ttermios := new(Termios)\n\t_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, syscall.TIOCGETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)\n\tif err != 0 {\n\t\treturn nil, err\n\t}\n\treturn termios, nil\n}\n\nfunc setTermios(termios *Termios) error {\n\tfd := uintptr(syscall.Stdin)\n\t_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, syscall.TIOCSETA, uintptr(unsafe.Pointer(termios)), 0, 0, 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc applyRawMode(termios *Termios) {\n\ttermios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON\n\ttermios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN\n\ttermios.Cflag &^= syscall.CSIZE | syscall.PARENB\n\ttermios.Cflag |= syscall.CS8\n\ttermios.Cc[syscall.VMIN] = 1\n\ttermios.Cc[syscall.VTIME] = 0\n}\n"
  },
  {
    "path": "runner/internal/readline/terminal_linux.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\ntype Termios syscall.Termios\n\nfunc getTermios() (*Termios, error) {\n\tfd := uintptr(syscall.Stdin)\n\ttermios := new(Termios)\n\t_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, syscall.TCGETS, uintptr(unsafe.Pointer(termios)), 0, 0, 0)\n\tif err != 0 {\n\t\treturn nil, err\n\t}\n\treturn termios, nil\n}\n\nfunc setTermios(termios *Termios) error {\n\tfd := uintptr(syscall.Stdin)\n\t_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, syscall.TCSETS, uintptr(unsafe.Pointer(termios)), 0, 0, 0)\n\tif err != 0 {\n\t\treturn err\n\t}\n\treturn nil\n}\n\nfunc applyRawMode(termios *Termios) {\n\ttermios.Iflag &^= syscall.IGNBRK | syscall.BRKINT | syscall.PARMRK | syscall.ISTRIP | syscall.INLCR | syscall.IGNCR | syscall.ICRNL | syscall.IXON\n\ttermios.Lflag &^= syscall.ECHO | syscall.ECHONL | syscall.ICANON | syscall.ISIG | syscall.IEXTEN\n\ttermios.Cflag &^= syscall.CSIZE | syscall.PARENB\n\ttermios.Cflag |= syscall.CS8\n\ttermios.Cc[syscall.VMIN] = 1\n\ttermios.Cc[syscall.VTIME] = 0\n}\n"
  },
  {
    "path": "runner/internal/readline/terminal_windows.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage readline\n\nimport \"golang.org/x/sys/windows\"\n\ntype Termios uint32\n\nfunc getTermios() (*Termios, error) {\n\ttermios := new(Termios)\n\treturn termios, windows.GetConsoleMode(windows.Stdin, (*uint32)(termios))\n}\n\nfunc setTermios(termios *Termios) error {\n\treturn windows.SetConsoleMode(windows.Stdin, uint32(*termios))\n}\n\nfunc applyRawMode(termios *Termios) {\n\t*termios &^= windows.ENABLE_ECHO_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_INPUT\n\t*termios |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT\n}\n"
  },
  {
    "path": "runner/internal/record/record.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage record\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n)\n\ntype Recorder struct {\n\tcmd        *exec.Cmd\n\toutputFile string\n}\n\nfunc NewRecorder(outputFile string) (*Recorder, error) {\n\tvar cmd *exec.Cmd\n\tvar args []string\n\n\tif err := os.MkdirAll(filepath.Dir(outputFile), 0755); err != nil {\n\t\treturn nil, err\n\t}\n\n\tswitch runtime.GOOS {\n\tcase \"darwin\", \"linux\":\n\t\targs = []string{\"-d\", \"-t\", \"wav\", outputFile}\n\t\tcmd = exec.Command(\"sox\", args...)\n\n\tcase \"windows\":\n\t\targs = []string{\"-t\", \"waveaudio\", \"-c\", \"1\", \"-r\", \"16000\", \"-d\", outputFile}\n\t\tcmd = exec.Command(\"sox\", args...)\n\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported OS: %s\", runtime.GOOS)\n\t}\n\n\tcmd.Stdout = os.Stderr\n\tcmd.Stderr = os.Stderr\n\treturn &Recorder{\n\t\tcmd:        cmd,\n\t\toutputFile: outputFile,\n\t}, nil\n}\n\nfunc (r *Recorder) Run() error {\n\treturn r.cmd.Run()\n}\n\nfunc (r *Recorder) Stop() error {\n\tif r.cmd.Process == nil {\n\t\treturn fmt.Errorf(\"recording not started yet\")\n\t}\n\n\treturn r.cmd.Process.Kill()\n\t// _ = r.cmd.Wait()\n}\n\nfunc (r *Recorder) GetOutputFile() string {\n\treturn r.outputFile\n}\n"
  },
  {
    "path": "runner/internal/record/stream_record.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage record\n\nimport (\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"math\"\n\t\"os/exec\"\n\t\"runtime\"\n\t\"strings\"\n)\n\ntype StreamRecorder struct {\n\tcmd    *exec.Cmd\n\tstdout io.ReadCloser\n}\n\nfunc NewStreamRecorder() (*StreamRecorder, error) {\n\tvar args []string\n\n\tsr := StreamRecorder{}\n\n\tswitch runtime.GOOS {\n\tcase \"windows\":\n\t\targs = []string{\n\t\t\t// input (device)\n\t\t\t\"-t\", \"waveaudio\",\n\t\t\t\"-d\",\n\t\t\t// output format options\n\t\t\t\"-t\", \"raw\",\n\t\t\t\"-e\", \"float\",\n\t\t\t\"-b\", \"32\",\n\t\t\t\"-r\", \"16000\",\n\t\t\t\"-c\", \"1\",\n\t\t\t\"-\", // OUTFILE = stdout\n\t\t\t\"rate\", \"16000\",\n\t\t\t\"channels\", \"1\",\n\t\t}\n\tcase \"darwin\", \"linux\":\n\t\targs = []string{\n\t\t\t// input (device)\n\t\t\t\"-d\",\n\t\t\t// output format options\n\t\t\t\"-t\", \"raw\",\n\t\t\t\"-e\", \"float\",\n\t\t\t\"-b\", \"32\",\n\t\t\t\"-r\", \"16000\",\n\t\t\t\"-c\", \"1\",\n\t\t\t\"-\", // OUTFILE = stdout\n\t\t\t\"rate\", \"16000\",\n\t\t\t\"channels\", \"1\",\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported OS: %s\", runtime.GOOS)\n\t}\n\n\tslog.Debug(\"sox cmd\", \"cmd\", \"sox \"+strings.Join(args, \" \"))\n\tsr.cmd = exec.Command(\"sox\", args...)\n\n\tvar err error\n\tsr.stdout, err = sr.cmd.StdoutPipe()\n\t//sr.cmd.Stderr = os.Stderr\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn &sr, nil\n}\n\nfunc (sr *StreamRecorder) Start() error {\n\treturn sr.cmd.Start()\n}\n\nfunc (sr *StreamRecorder) ReadFloat32(buffer []float32) (int, error) {\n\tif sr.stdout == nil {\n\t\treturn 0, fmt.Errorf(\"recorder not started\")\n\t}\n\n\trawBytes := make([]byte, len(buffer)*4)\n\tn, err := sr.stdout.Read(rawBytes)\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tsampleCount := n / 4\n\tfor i := range sampleCount {\n\t\tbits := binary.LittleEndian.Uint32(rawBytes[i*4 : (i+1)*4])\n\t\tbuffer[i] = math.Float32frombits(bits)\n\t}\n\n\treturn sampleCount, nil\n}\n\nfunc (sr *StreamRecorder) Stop() error {\n\tif sr.cmd != nil {\n\t\treturn sr.cmd.Process.Kill()\n\t}\n\treturn nil\n}\n"
  },
  {
    "path": "runner/internal/render/progressbar.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage render\n\nimport (\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/schollz/progressbar/v3\"\n)\n\n// ProgressBar wraps the progressbar functionality with huh-style interface\ntype ProgressBar struct {\n\tbar *progressbar.ProgressBar\n}\n\n// NewProgressBar creates a new progress bar with huh-style interface\nfunc NewProgressBar(total int64, description string) *ProgressBar {\n\tbar := progressbar.NewOptions64(\n\t\ttotal,\n\t\tprogressbar.OptionSetDescription(description),\n\t\tprogressbar.OptionSetWriter(os.Stderr),\n\t\tprogressbar.OptionShowBytes(true),\n\t\tprogressbar.OptionShowTotalBytes(true),\n\t\tprogressbar.OptionSetWidth(10),\n\t\tprogressbar.OptionThrottle(65*time.Millisecond),\n\t\tprogressbar.OptionShowCount(),\n\t\tprogressbar.OptionOnCompletion(func() {\n\t\t\tos.Stderr.WriteString(\"\\n\")\n\t\t}),\n\t\tprogressbar.OptionSpinnerType(14),\n\t\tprogressbar.OptionFullWidth(),\n\t\tprogressbar.OptionSetRenderBlankState(true),\n\t\tprogressbar.OptionUseANSICodes(true),\n\t)\n\treturn &ProgressBar{bar: bar}\n}\n\n// Set sets the current progress\nfunc (p *ProgressBar) Set(current int64) {\n\tp.bar.Set64(current)\n}\n\n// Set sets the current progress\nfunc (p *ProgressBar) Add(chunk int64) {\n\tp.bar.Add64(chunk)\n}\n\n// Exit finishes the progress bar\nfunc (p *ProgressBar) Exit() {\n\tp.bar.Exit()\n}\n\n// Clear clears the progress bar\nfunc (p *ProgressBar) Clear() {\n\tp.bar.Clear()\n}\n"
  },
  {
    "path": "runner/internal/render/spinner.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage render\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"sync\"\n\n\t\"github.com/charmbracelet/huh/spinner\"\n)\n\ntype Spinner struct {\n\t*spinner.Spinner\n\tstart sync.WaitGroup\n\tstop  sync.WaitGroup\n}\n\nfunc NewSpinner(desc string) *Spinner {\n\ts := Spinner{\n\t\tSpinner: spinner.New().Title(desc).Type(spinner.Globe),\n\t}\n\n\ts.Action(func() { s.start.Wait() })\n\n\treturn &s\n}\n\nfunc (s *Spinner) Start() {\n\ts.start.Add(1)\n\ts.stop.Add(1)\n\n\tgo func() {\n\t\t// if NO_COLOR is set, do not show spinner\n\t\tif os.Getenv(\"NO_COLOR\") == \"1\" {\n\t\t\tfmt.Println(s.View())\n\t\t\ts.start.Wait()\n\t\t} else {\n\t\t\ts.Spinner.Run()\n\t\t}\n\t\ts.stop.Done()\n\t}()\n}\n\nfunc (s *Spinner) Stop() {\n\ts.start.Done()\n\ts.stop.Wait()\n}\n"
  },
  {
    "path": "runner/internal/render/theme.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage render\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"sync\"\n\n\t\"github.com/gookit/color\"\n)\n\nvar theme *Theme\nvar themeInit sync.Once\n\ntype Theme struct {\n\tNormal  Style\n\tInfo    Style\n\tSuccess Style\n\tWarning Style\n\tError   Style\n\n\tQuant       Style\n\tPrompt      Style\n\tAddFiles    Style\n\tThinkOutput Style\n\tModelOutput Style\n\tProfile     Style\n}\n\nfunc GetTheme() *Theme {\n\tthemeInit.Do(func() {\n\t\tslog.Debug(\"Detect terminal theme\")\n\t\ttheme = defaultColorTheme()\n\t})\n\treturn theme\n}\n\ntype Style interface {\n\tSprint(...any) string\n\tSprintf(string, ...any) string\n\tCode() string\n}\n\ntype NoColor struct{}\n\nfunc (n NoColor) Sprint(a ...any) string                 { return fmt.Sprint(a...) }\nfunc (n NoColor) Sprintf(format string, a ...any) string { return fmt.Sprintf(format, a...) }\nfunc (n NoColor) Code() string                           { return \"\" }\n\nfunc (t *Theme) Set(s Style) {\n\tcolor.SetTerminal(s.Code())\n}\n\nfunc (t *Theme) Reset() {\n\tcolor.ResetTerminal()\n}\n\nfunc noColorTheme() *Theme {\n\treturn &Theme{\n\t\tNormal:      NoColor{},\n\t\tInfo:        NoColor{},\n\t\tSuccess:     NoColor{},\n\t\tWarning:     NoColor{},\n\t\tError:       NoColor{},\n\t\tQuant:       NoColor{},\n\t\tPrompt:      NoColor{},\n\t\tAddFiles:    NoColor{},\n\t\tThinkOutput: NoColor{},\n\t\tModelOutput: NoColor{},\n\t\tProfile:     NoColor{},\n\t}\n}\n\nfunc defaultColorTheme() *Theme {\n\ttheme := noColorTheme()\n\tif color.SupportColor() {\n\t\tslog.Debug(\"apply 16 color\")\n\t\ttheme.Normal = NoColor{}\n\t\ttheme.Info = color.Style{color.FgBlue}\n\t\ttheme.Success = color.Style{color.FgGreen}\n\t\ttheme.Warning = color.Style{color.FgYellow}\n\t\ttheme.Error = color.Style{color.FgRed}\n\n\t\ttheme.Quant = color.Style{color.FgLightBlue}\n\t\ttheme.Prompt = color.Style{color.FgGreen, color.Bold}\n\t\ttheme.AddFiles = color.Style{color.FgWhite}\n\t\ttheme.ThinkOutput = color.Style{color.FgDarkGray}\n\t\ttheme.ModelOutput = NoColor{}\n\t\ttheme.Profile = color.Style{color.FgLightCyan}\n\t}\n\tif color.Support256Color() {\n\t\tslog.Debug(\"apply 256 color\")\n\t\ttheme.Quant = color.S256(31)\n\t\t//theme.AddFiles = color.S256(7)\n\t\t//theme.ModelOutput = color.S256(15)\n\t\ttheme.Profile = color.S256(44)\n\t}\n\tif color.SupportTrueColor() {\n\t\tslog.Debug(\"apply true color\")\n\t\ttheme.Quant = color.NewRGBStyle(color.RGB(0, 135, 175))\n\t\t//theme.AddFiles = color.NewRGBStyle(color.RGB(192, 192, 192))\n\t\ttheme.Profile = color.NewRGBStyle(color.RGB(0, 215, 215))\n\t}\n\treturn theme\n}\n"
  },
  {
    "path": "runner/internal/render/theme_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage render\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc TestThemeColor(t *testing.T) {\n\ttheme := GetTheme()\n\tfmt.Println(theme.Normal.Sprint(\"This is a normal message.\"))\n\tfmt.Println(theme.Info.Sprint(\"This is an info message.\"))\n\tfmt.Println(theme.Success.Sprint(\"This is a success message.\"))\n\tfmt.Println(theme.Warning.Sprint(\"This is a warning message.\"))\n\tfmt.Println(theme.Error.Sprint(\"This is an error message.\"))\n\n\tfmt.Println(theme.Quant.Sprint(\"🔹 Quant=Q4_K_M\"))\n\tfmt.Println(theme.Prompt.Sprint(\"> \") + \"/path/to/image how are you\")\n\tfmt.Println(theme.AddFiles.Sprint(\"add image: /path/to/image\"))\n\tfmt.Println(theme.ThinkOutput.Sprint(\"<think>this is think message</think>\"))\n\tfmt.Println(theme.ModelOutput.Sprint(\"hi how are you today\"))\n\tfmt.Println(theme.Profile.Sprint(\"— 64.8 tok/s • 61 tok • 18.4 s first token —\"))\n}\n"
  },
  {
    "path": "runner/internal/store/config.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage store\n\nimport (\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nfunc (s *Store) ConfigGet(key string) (string, error) {\n\tslog.Debug(\"ConfigGet\", \"key\", key)\n\tdata, err := os.ReadFile(filepath.Join(s.home, \"config\"))\n\treturn string(data), err\n}\n\nfunc (s *Store) ConfigSet(key string, value string) error {\n\tslog.Debug(\"ConfigSet\", \"key\", key, \"value\", value)\n\treturn os.WriteFile(filepath.Join(s.home, \"config\"), []byte(value), 0o600)\n}\n"
  },
  {
    "path": "runner/internal/store/errors.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage store\n\nimport \"errors\"\n\n// File lock related errors\nvar (\n\tErrModelNameEmpty = errors.New(\"model name is empty\")\n\tErrModelLocked    = errors.New(\"model is currently locked by another process\")\n)\n"
  },
  {
    "path": "runner/internal/store/lock.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage store\n\nimport (\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/gofrs/flock\"\n)\n\nfunc (s *Store) LockModel(modelName string) error {\n\tslog.Debug(\"LockModel\", \"modelName\", modelName)\n\n\tif modelName == \"\" {\n\t\treturn ErrModelNameEmpty\n\t}\n\n\tmodelsDir := s.ModelDirPath()\n\tos.MkdirAll(filepath.Join(modelsDir, modelName), 0o770)\n\tlockPath := filepath.Join(modelsDir, modelName+\".lock\")\n\n\tfl := flock.New(lockPath)\n\n\tlocked, err := fl.TryLock()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !locked {\n\t\treturn ErrModelLocked\n\t}\n\n\ts.modelLocks.Store(modelName, fl)\n\treturn nil\n}\n\nfunc (s *Store) UnlockModel(modelName string) error {\n\tslog.Debug(\"UnLockModel\", \"modelName\", modelName)\n\n\tif modelName == \"\" {\n\t\treturn nil\n\t}\n\n\tif info, ok := s.modelLocks.Load(modelName); ok {\n\t\tfl := info.(*flock.Flock)\n\t\tfl.Unlock()\n\t\ts.modelLocks.Delete(modelName)\n\t}\n\n\treturn nil\n}\n"
  },
  {
    "path": "runner/internal/store/manager.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage store\n\nimport (\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/gofrs/flock\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/model_hub\"\n)\n\ntype Store struct {\n\thome       string\n\tmodelLocks sync.Map // Model locks mapping map[string]*flock.Flock\n}\n\nvar (\n\tinstance *Store\n\tonce     sync.Once\n)\n\n// Get returns the singleton instance of Store\nfunc Get() *Store {\n\tonce.Do(func() {\n\t\tinstance = &Store{}\n\t\tinstance.init()\n\t})\n\treturn instance\n}\n\n// init sets up the store's directory structure\nfunc (s *Store) init() {\n\tif config.Get().DataDir != \"\" {\n\t\ts.home = config.Get().DataDir\n\t} else {\n\t\t// Get user's cache directory (OS-specific)\n\t\thomeDir, e := os.UserHomeDir()\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\n\t\t// Set nexa cache directory\n\t\ts.home = filepath.Join(homeDir, \".cache\", \"nexa.ai\", \"nexa_sdk\")\n\t}\n\tslog.Info(\"Using data directory\", \"path\", s.home)\n\n\t// Create models directory structure\n\tfor _, d := range []string{\"models\"} {\n\t\te := os.MkdirAll(filepath.Join(s.home, d), 0o770)\n\t\tif e != nil {\n\t\t\tpanic(e)\n\t\t}\n\t}\n\n\ts.cleanCorruptedDirectories()\n}\n\nfunc (s *Store) Close() error {\n\ts.modelLocks.Range(func(key, value any) bool {\n\t\tfl := value.(*flock.Flock)\n\t\tif fl != nil {\n\t\t\tfl.Unlock()\n\t\t}\n\t\ts.modelLocks.Delete(key)\n\t\treturn true\n\t})\n\n\treturn nil\n}\n\nfunc (s *Store) cleanCorruptedDirectories() {\n\tmodels, err := s.scanModelDir()\n\tif err != nil {\n\t\tslog.Error(\"Failed to scan model directory\", \"err\", err)\n\t\treturn\n\t}\n\n\tfor _, models := range models {\n\t\tslog.Info(\"Checking model directory\", \"name\", models)\n\t\tif s.isCorruptedModelDirectory(models) {\n\t\t\tif err := s.LockModel(models); err != nil {\n\t\t\t\tslog.Warn(\"Skipping cleanup of directory\", \"name\", models, \"err\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tslog.Info(\"Cleaning corrupted model directory\", \"name\", models)\n\t\t\tif err := os.RemoveAll(s.ModelfilePath(models, \"\")); err != nil {\n\t\t\t\tslog.Error(\"Failed to remove corrupted directory\", \"name\", models, \"err\", err)\n\t\t\t}\n\n\t\t\ts.UnlockModel(models)\n\t\t}\n\t}\n}\n\nfunc (s *Store) isCorruptedModelDirectory(name string) bool {\n\tmanifestPath := s.ModelfilePath(name, \"nexa.manifest\")\n\tif _, err := os.Stat(manifestPath); err == nil {\n\t\treturn false\n\t}\n\tdir := s.ModelfilePath(name, \"\")\n\tentries, err := os.ReadDir(dir)\n\tif err != nil {\n\t\treturn true\n\t}\n\tfor _, e := range entries {\n\t\tif !e.IsDir() && strings.HasSuffix(e.Name(), model_hub.ProgressSuffix) {\n\t\t\treturn false\n\t\t}\n\t}\n\tslog.Info(\"Cleaning corrupted model directory\", \"name\", name)\n\treturn true\n}\n"
  },
  {
    "path": "runner/internal/store/model.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage store\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"github.com/shirou/gopsutil/disk\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/model_hub\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n)\n\n// isBundlePath checks if a path is a macOS bundle (.mlmodelc or .mlpackage)\n// These are directory references, not downloadable files\nfunc isBundlePath(path string) bool {\n\treturn strings.HasSuffix(strings.ToLower(path), \".mlmodelc\") ||\n\t\tstrings.HasSuffix(strings.ToLower(path), \".mlpackage\")\n}\n\nfunc (s *Store) ensureEnoughDiskSpace(requiredBytes int64) error {\n\tusage, err := disk.Usage(s.ModelDirPath())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfree := int64(usage.Free)\n\tslog.Debug(\"Disk space check\", \"required_bytes\", requiredBytes, \"free_bytes\", free)\n\tif free < requiredBytes {\n\t\treturn fmt.Errorf(\"not enough disk space: required %d bytes, available %d bytes\", requiredBytes, free)\n\t}\n\n\treturn nil\n}\n\n// List returns all locally stored models by reading their manifest files\nfunc (s *Store) List() ([]types.ModelManifest, error) {\n\tres := make([]types.ModelManifest, 0)\n\tmodels, err := s.scanModelDir()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, model := range models {\n\t\t// Parse each model directory's manifest\n\t\tmodel, err := s.GetManifest(model)\n\t\tif err != nil {\n\t\t\tslog.Warn(\"GetManifest Error\", \"err\", err)\n\t\t\tcontinue\n\t\t}\n\n\t\tres = append(res, *model)\n\t}\n\n\treturn res, nil\n}\n\n// Remove deletes a specific model and all its files\nfunc (s *Store) Remove(name string) error {\n\tslog.Debug(\"Remove model\", \"model\", name)\n\n\terr := s.LockModel(name)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer s.UnlockModel(name)\n\treturn os.RemoveAll(filepath.Join(s.home, \"models\", name))\n}\n\n// Clean removes all stored models and the models directory\nfunc (s *Store) Clean() int {\n\tslog.Debug(\"Start clean model\")\n\n\tmodels, err := s.scanModelDir()\n\tif err != nil {\n\t\treturn 0\n\t}\n\n\t// Get list of all model names to remove\n\tcount := 0\n\tfor _, model := range models {\n\t\tif err := s.Remove(model); err != nil {\n\t\t\tslog.Warn(\"Failed to remove model\", \"model\", model, \"err\", err)\n\t\t\tcontinue\n\t\t}\n\t\tcount += 1\n\t}\n\n\treturn count\n}\n\nfunc (s *Store) GetManifest(name string) (*types.ModelManifest, error) {\n\terr := s.LockModel(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer s.UnlockModel(name)\n\n\tdir := filepath.Join(s.home, \"models\")\n\t// Read manifest file\n\tdata, e := os.ReadFile(filepath.Join(dir, name, \"nexa.manifest\"))\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\n\t// Parse manifest JSON\n\tmodel := types.ModelManifest{}\n\te = sonic.Unmarshal(data, &model)\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\treturn &model, nil\n}\n\n// Pull downloads a model from HuggingFace and stores it locally\n// It fetches the model tree, finds .gguf files, downloads them, and saves metadata\n// if model not specify, all is set true, and autodetect true\nfunc (s *Store) Pull(ctx context.Context, mf types.ModelManifest) (infoCh <-chan types.DownloadInfo, errCh <-chan error) {\n\tinfoC := make(chan types.DownloadInfo, 10)\n\tinfoCh = infoC\n\terrC := make(chan error, 1)\n\terrCh = errC\n\n\tgo func() {\n\t\tdefer close(errC)\n\t\tdefer close(infoC)\n\n\t\t// check free disk space\n\t\tif err := s.ensureEnoughDiskSpace(mf.GetSize()); err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\n\t\tmodelDir := filepath.Join(s.home, \"models\", mf.Name)\n\t\thasProgress := false\n\t\tif entries, _ := os.ReadDir(modelDir); entries != nil {\n\t\t\tfor _, e := range entries {\n\t\t\t\tif !e.IsDir() && strings.HasSuffix(e.Name(), model_hub.ProgressSuffix) {\n\t\t\t\t\thasProgress = true\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif !hasProgress {\n\t\t\tif err := s.Remove(mf.Name); err != nil {\n\t\t\t\terrC <- err\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\n\t\tif err := s.LockModel(mf.Name); err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\t\tdefer s.UnlockModel(mf.Name)\n\n\t\t// filter download file\n\t\tvar needs []model_hub.ModelFileInfo\n\t\tfor _, f := range mf.ModelFile {\n\t\t\tif f.Downloaded {\n\t\t\t\t// Skip bundle paths (.mlmodelc and .mlpackage) - they are directory references, not files\n\t\t\t\t// Only the individual files within the bundles will be downloaded via ExtraFiles\n\t\t\t\tif isBundlePath(f.Name) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: f.Name, Size: f.Size})\n\t\t\t}\n\t\t}\n\t\tif mf.MMProjFile.Name != \"\" {\n\t\t\tif mf.MMProjFile.Downloaded {\n\t\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: mf.MMProjFile.Name, Size: mf.MMProjFile.Size})\n\t\t\t}\n\t\t}\n\t\tif mf.TokenizerFile.Name != \"\" {\n\t\t\tif mf.TokenizerFile.Downloaded {\n\t\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: mf.TokenizerFile.Name, Size: mf.TokenizerFile.Size})\n\t\t\t}\n\t\t}\n\t\tfor _, f := range mf.ExtraFiles {\n\t\t\tif f.Downloaded {\n\t\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: f.Name, Size: f.Size})\n\t\t\t}\n\t\t}\n\n\t\t// Create model directory structure\n\t\terr := os.MkdirAll(filepath.Join(s.home, \"models\", mf.Name), 0o770)\n\t\tif err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\n\t\t// Create modelfile for storing downloaded content\n\t\tresCh, errCh := model_hub.StartDownload(ctx, mf.Name, filepath.Join(s.home, \"models\", mf.Name), needs)\n\t\tfor d := range resCh {\n\t\t\tinfoC <- d\n\t\t}\n\t\tfor e := range errCh {\n\t\t\terrC <- e\n\t\t\treturn\n\t\t}\n\n\t\tmodel := types.ModelManifest{\n\t\t\tName:          mf.Name,\n\t\t\tModelName:     mf.ModelName,\n\t\t\tModelType:     mf.ModelType,\n\t\t\tPluginId:      mf.PluginId,\n\t\t\tDeviceId:      mf.DeviceId,\n\t\t\tMinSDKVersion: mf.MinSDKVersion,\n\t\t\tModelFile:     mf.ModelFile,\n\t\t\tMMProjFile:    mf.MMProjFile,\n\t\t\tTokenizerFile: mf.TokenizerFile,\n\t\t\tExtraFiles:    mf.ExtraFiles,\n\t\t}\n\t\tmanifestPath := filepath.Join(s.home, \"models\", mf.Name, \"nexa.manifest\")\n\t\tmanifestData, _ := sonic.Marshal(model) // JSON marshal won't fail, ignore error\n\t\terr = os.WriteFile(manifestPath, manifestData, 0o664)\n\t\tif err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\t}()\n\n\treturn\n}\n\nfunc (s *Store) PullExtraQuant(ctx context.Context, omf, nmf types.ModelManifest) (infoCh <-chan types.DownloadInfo, errCh <-chan error) {\n\tinfoC := make(chan types.DownloadInfo, 10)\n\tinfoCh = infoC\n\terrC := make(chan error, 1)\n\terrCh = errC\n\n\tgo func() {\n\t\tdefer close(errC)\n\t\tdefer close(infoC)\n\n\t\tif err := s.LockModel(nmf.Name); err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\t\tdefer s.UnlockModel(nmf.Name)\n\n\t\t// filter download file\n\t\tvar needs []model_hub.ModelFileInfo\n\t\tfor q, f := range nmf.ModelFile {\n\t\t\tif f.Downloaded && !omf.ModelFile[q].Downloaded {\n\t\t\t\t// Skip bundle paths (.mlmodelc and .mlpackage) - they are directory references, not files\n\t\t\t\tif isBundlePath(f.Name) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: f.Name, Size: f.Size})\n\t\t\t}\n\t\t}\n\t\tif nmf.TokenizerFile.Downloaded && !omf.TokenizerFile.Downloaded {\n\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: nmf.TokenizerFile.Name, Size: nmf.TokenizerFile.Size})\n\t\t}\n\t\tfor q, f := range nmf.ExtraFiles {\n\t\t\tif f.Downloaded && !omf.ExtraFiles[q].Downloaded {\n\t\t\t\tneeds = append(needs, model_hub.ModelFileInfo{Name: f.Name, Size: f.Size})\n\t\t\t}\n\t\t}\n\n\t\t// check free disk space\n\t\ttotalNeeded := int64(0)\n\t\tfor _, n := range needs {\n\t\t\ttotalNeeded += n.Size\n\t\t}\n\t\tif err := s.ensureEnoughDiskSpace(totalNeeded); err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\n\t\t// Create model directory structure\n\t\terr := os.MkdirAll(filepath.Join(s.home, \"models\", nmf.Name), 0o770)\n\t\tif err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\n\t\tresCh, errCh := model_hub.StartDownload(ctx, nmf.Name, filepath.Join(s.home, \"models\", nmf.Name), needs)\n\t\tfor d := range resCh {\n\t\t\tinfoC <- d\n\t\t}\n\t\tfor e := range errCh {\n\t\t\terrC <- e\n\t\t\treturn\n\t\t}\n\n\t\tmodel := types.ModelManifest{\n\t\t\tName:          nmf.Name,\n\t\t\tModelName:     nmf.ModelName,\n\t\t\tModelType:     nmf.ModelType,\n\t\t\tPluginId:      nmf.PluginId,\n\t\t\tDeviceId:      nmf.DeviceId,\n\t\t\tModelFile:     nmf.ModelFile,\n\t\t\tMMProjFile:    nmf.MMProjFile,\n\t\t\tTokenizerFile: nmf.TokenizerFile,\n\t\t\tExtraFiles:    nmf.ExtraFiles,\n\t\t}\n\t\tmanifestPath := filepath.Join(s.home, \"models\", nmf.Name, \"nexa.manifest\")\n\t\tmanifestData, _ := sonic.Marshal(model) // JSON marshal won't fail, ignore error\n\t\terr = os.WriteFile(manifestPath, manifestData, 0o664)\n\t\tif err != nil {\n\t\t\terrC <- err\n\t\t\treturn\n\t\t}\n\t}()\n\n\treturn\n}\n\nfunc (s *Store) DataPath() string {\n\treturn s.home\n}\n\nfunc (s *Store) ModelDirPath() string {\n\treturn filepath.Join(s.home, \"models\")\n}\n\n// ModelfilePath returns the full path to a model's data file\nfunc (s *Store) ModelfilePath(name string, file string) string {\n\treturn filepath.Join(s.home, \"models\", name, file)\n}\n\nfunc (s *Store) scanModelDir() ([]string, error) {\n\torgs, e := os.ReadDir(s.ModelDirPath())\n\tif e != nil {\n\t\tslog.Warn(\"Failed to read model directory\", \"err\", e)\n\t\treturn nil, e\n\t}\n\n\t// Parse each model directory's manifest\n\tres := make([]string, 0)\n\tfor _, org := range orgs {\n\t\tif !org.IsDir() {\n\t\t\tcontinue\n\t\t}\n\n\t\tignoreDirs := []string{\".cache\"}\n\t\tif slices.Contains(ignoreDirs, org.Name()) {\n\t\t\tcontinue\n\t\t}\n\n\t\trepos, e := os.ReadDir(filepath.Join(s.ModelDirPath(), org.Name()))\n\t\tif e != nil {\n\t\t\tslog.Warn(\"Failed to read model subdirectory\", \"org\", org.Name(), \"err\", e)\n\t\t\tcontinue\n\t\t}\n\n\t\tfor _, repo := range repos {\n\t\t\tif !repo.IsDir() {\n\t\t\t\tcontinue\n\t\t\t}\n\n\t\t\tres = append(res, org.Name()+\"/\"+repo.Name())\n\t\t}\n\t}\n\n\treturn res, nil\n}\n"
  },
  {
    "path": "runner/internal/types/model.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage types\n\ntype ModelType string\n\nconst (\n\tModelTypeLLM      ModelType = \"llm\"\n\tModelTypeVLM      ModelType = \"vlm\"\n\tModelTypeEmbedder ModelType = \"embedder\"\n\tModelTypeReranker ModelType = \"reranker\"\n\tModelTypeTTS      ModelType = \"tts\"\n\tModelTypeASR      ModelType = \"asr\"\n\tModelTypeDiarize  ModelType = \"diarize\"\n\tModelTypeCV       ModelType = \"cv\"\n\tModelTypeImageGen ModelType = \"image_gen\"\n)\n\nvar AllModelTypes = []ModelType{\n\tModelTypeLLM,\n\tModelTypeVLM,\n\tModelTypeEmbedder,\n\tModelTypeReranker,\n\tModelTypeTTS,\n\tModelTypeASR,\n\tModelTypeDiarize,\n\tModelTypeCV,\n\tModelTypeImageGen,\n}\n\ntype ModelFileInfo struct {\n\tName       string\n\tDownloaded bool\n\tSize       int64\n}\n\ntype ModelManifest struct {\n\tName          string // OrgName/RepoName\n\tModelName     string // model arch name like \"qwen3-4b\", \"yolov12\", etc.\n\tModelType     ModelType\n\tPluginId      string\n\tDeviceId      string\n\tMinSDKVersion string\n\n\tModelFile     map[string]ModelFileInfo // quant -> modelfile\n\tMMProjFile    ModelFileInfo\n\tTokenizerFile ModelFileInfo\n\tExtraFiles    []ModelFileInfo\n}\n\nfunc (m ModelManifest) GetSize() int64 {\n\tvar count int64\n\n\tfor _, v := range m.ModelFile {\n\t\tif v.Downloaded {\n\t\t\tcount += v.Size\n\t\t}\n\t}\n\tif m.MMProjFile.Downloaded {\n\t\tcount += m.MMProjFile.Size\n\t}\n\tif m.TokenizerFile.Downloaded {\n\t\tcount += m.TokenizerFile.Size\n\t}\n\tfor _, v := range m.ExtraFiles {\n\t\tif v.Downloaded {\n\t\t\tcount += v.Size\n\t\t}\n\t}\n\n\treturn count\n}\n\ntype ModelParam struct {\n\tNCtx       int32\n\tNGpuLayers int32\n}\n\ntype DownloadInfo struct {\n\t// CurrentFileName   string\n\t// CurrentDownloaded int64\n\t// CurrentSize       int64\n\tTotalDownloaded int64\n\tTotalSize       int64\n}\n"
  },
  {
    "path": "runner/internal/types/utils.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage types\n\nimport \"io\"\n\ntype TeeReadF struct {\n\tRaw     io.Reader\n\tWriterF func(p []byte) (int, error)\n}\n\nfunc (w *TeeReadF) Read(p []byte) (n int, err error) {\n\tn, err = w.Raw.Read(p)\n\tw.WriterF(p[:n])\n\treturn\n}\n"
  },
  {
    "path": "runner/nexa-sdk/.gitignore",
    "content": "modelfiles"
  },
  {
    "path": "runner/nexa-sdk/asr.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n\nextern bool go_asr_stream_on_transcription(char*, void*);\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// ASRConfig represents ASR processing configuration\ntype ASRConfig struct {\n\tTimestamps string\n\tBeamSize   int32\n\tStream     bool\n}\n\n// ASRStreamConfig represents ASR streaming configuration\ntype ASRStreamConfig struct {\n\tChunkDuration   float32\n\tOverlapDuration float32\n\tSampleRate      int32\n\tMaxQueueSize    int32\n\tBufferSize      int32\n\tTimestamps      string\n\tBeamSize        int32\n}\n\nfunc (ac ASRConfig) toCPtr() *C.ml_ASRConfig {\n\tcPtr := (*C.ml_ASRConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ASRConfig{}))))\n\t*cPtr = C.ml_ASRConfig{}\n\n\tif ac.Timestamps != \"\" {\n\t\tcPtr.timestamps = C.CString(ac.Timestamps)\n\t}\n\tcPtr.beam_size = C.int32_t(ac.BeamSize)\n\tcPtr.stream = C.bool(ac.Stream)\n\n\treturn cPtr\n}\n\nfunc (asc ASRStreamConfig) toCPtr() *C.ml_ASRStreamConfig {\n\tcPtr := (*C.ml_ASRStreamConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ASRStreamConfig{}))))\n\t*cPtr = C.ml_ASRStreamConfig{}\n\n\tcPtr.chunk_duration = C.float(asc.ChunkDuration)\n\tcPtr.overlap_duration = C.float(asc.OverlapDuration)\n\tcPtr.sample_rate = C.int32_t(asc.SampleRate)\n\tcPtr.max_queue_size = C.int32_t(asc.MaxQueueSize)\n\tcPtr.buffer_size = C.int32_t(asc.BufferSize)\n\tif asc.Timestamps != \"\" {\n\t\tcPtr.timestamps = C.CString(asc.Timestamps)\n\t}\n\tcPtr.beam_size = C.int32_t(asc.BeamSize)\n\n\treturn cPtr\n}\n\nfunc freeASRConfig(cPtr *C.ml_ASRConfig) {\n\tif cPtr != nil {\n\t\tif cPtr.timestamps != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.timestamps))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\nfunc freeASRStreamConfig(cPtr *C.ml_ASRStreamConfig) {\n\tif cPtr != nil {\n\t\tif cPtr.timestamps != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.timestamps))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// ASRResult represents ASR transcription result\ntype ASRResult struct {\n\tTranscript       string\n\tConfidenceScores []float32\n\tTimestamps       []float32\n}\n\nfunc newASRResultFromCPtr(c *C.ml_ASRResult) ASRResult {\n\tresult := ASRResult{}\n\n\tif c == nil {\n\t\treturn result\n\t}\n\n\tif c.transcript != nil {\n\t\tresult.Transcript = C.GoString(c.transcript)\n\t}\n\n\t// Convert confidence scores array\n\tif c.confidence_scores != nil && c.confidence_count > 0 {\n\t\tscores := unsafe.Slice((*C.float)(unsafe.Pointer(c.confidence_scores)), int(c.confidence_count))\n\t\tresult.ConfidenceScores = make([]float32, c.confidence_count)\n\t\tfor i := range result.ConfidenceScores {\n\t\t\tresult.ConfidenceScores[i] = float32(scores[i])\n\t\t}\n\t}\n\n\t// Convert timestamps array\n\tif c.timestamps != nil && c.timestamp_count > 0 {\n\t\ttimestamps := unsafe.Slice((*C.float)(unsafe.Pointer(c.timestamps)), int(c.timestamp_count))\n\t\tresult.Timestamps = make([]float32, c.timestamp_count)\n\t\tfor i := range result.Timestamps {\n\t\t\tresult.Timestamps[i] = float32(timestamps[i])\n\t\t}\n\t}\n\n\treturn result\n}\n\nfunc freeASRResult(ptr *C.ml_ASRResult) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.transcript != nil {\n\t\tmlFree(unsafe.Pointer(ptr.transcript))\n\t}\n\tif ptr.confidence_scores != nil {\n\t\tmlFree(unsafe.Pointer(ptr.confidence_scores))\n\t}\n\tif ptr.timestamps != nil {\n\t\tmlFree(unsafe.Pointer(ptr.timestamps))\n\t}\n}\n\n// ASRModelConfig represents ASR model configuration\ntype ASRModelConfig struct {\n\tNCtx                int32\n\tNThreads            int32\n\tNThreadsBatch       int32\n\tNBatch              int32\n\tNUbatch             int32\n\tNSeqMax             int32\n\tNGpuLayers          int32\n\tChatTemplatePath    string\n\tChatTemplateContent string\n\tEnableSampling      bool\n\tGrammarStr          string\n\tMaxTokens           int32\n\tEnableThinking      bool\n\tVerbose             bool\n\tQnnModelFolderPath  string\n\tQnnLibFolderPath    string\n}\n\n// AsrCreateInput represents input parameters for ASR creation\ntype AsrCreateInput struct {\n\tModelName     string\n\tModelPath     string\n\tTokenizerPath string\n\tConfig        ASRModelConfig\n\tLanguage      string\n\tPluginID      string\n\tDeviceID      string\n\tLicenseID     string\n\tLicenseKey    string\n}\n\nfunc (mc ASRModelConfig) toCPtr() *C.ml_ModelConfig {\n\tcPtr := (*C.ml_ModelConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ModelConfig{}))))\n\t*cPtr = C.ml_ModelConfig{}\n\n\tcPtr.n_ctx = C.int32_t(mc.NCtx)\n\tcPtr.n_threads = C.int32_t(mc.NThreads)\n\tcPtr.n_threads_batch = C.int32_t(mc.NThreadsBatch)\n\tcPtr.n_batch = C.int32_t(mc.NBatch)\n\tcPtr.n_ubatch = C.int32_t(mc.NUbatch)\n\tcPtr.n_seq_max = C.int32_t(mc.NSeqMax)\n\tcPtr.n_gpu_layers = C.int32_t(mc.NGpuLayers)\n\n\tif mc.ChatTemplatePath != \"\" {\n\t\tcPtr.chat_template_path = C.CString(mc.ChatTemplatePath)\n\t}\n\tif mc.ChatTemplateContent != \"\" {\n\t\tcPtr.chat_template_content = C.CString(mc.ChatTemplateContent)\n\t}\n\tcPtr.enable_sampling = C.bool(mc.EnableSampling)\n\tif mc.GrammarStr != \"\" {\n\t\tcPtr.grammar_str = C.CString(mc.GrammarStr)\n\t}\n\tcPtr.max_tokens = C.int32_t(mc.MaxTokens)\n\tcPtr.enable_thinking = C.bool(mc.EnableThinking)\n\tcPtr.verbose = C.bool(mc.Verbose)\n\n\tif mc.QnnModelFolderPath != \"\" {\n\t\tcPtr.qnn_model_folder_path = C.CString(mc.QnnModelFolderPath)\n\t}\n\tif mc.QnnLibFolderPath != \"\" {\n\t\tcPtr.qnn_lib_folder_path = C.CString(mc.QnnLibFolderPath)\n\t}\n\n\treturn cPtr\n}\n\nfunc (aci AsrCreateInput) toCPtr() *C.ml_AsrCreateInput {\n\tcPtr := (*C.ml_AsrCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_AsrCreateInput{}))))\n\t*cPtr = C.ml_AsrCreateInput{}\n\n\tif aci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(aci.ModelName)\n\t}\n\tif aci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(aci.ModelPath)\n\t}\n\tif aci.TokenizerPath != \"\" {\n\t\tcPtr.tokenizer_path = C.CString(aci.TokenizerPath)\n\t}\n\tcPtr.config = *aci.Config.toCPtr()\n\tif aci.Language != \"\" {\n\t\tcPtr.language = C.CString(aci.Language)\n\t}\n\tif aci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(aci.PluginID)\n\t}\n\tif aci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(aci.DeviceID)\n\t}\n\tif aci.LicenseID != \"\" {\n\t\tcPtr.license_id = C.CString(aci.LicenseID)\n\t}\n\tif aci.LicenseKey != \"\" {\n\t\tcPtr.license_key = C.CString(aci.LicenseKey)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeAsrCreateInput(cPtr *C.ml_AsrCreateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.model_name != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_name))\n\t\t}\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.tokenizer_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.tokenizer_path))\n\t\t}\n\t\t// config is a struct, not a pointer, so no need to free it\n\t\tif cPtr.language != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.language))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tif cPtr.license_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.license_id))\n\t\t}\n\t\tif cPtr.license_key != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.license_key))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// AsrTranscribeInput represents input parameters for ASR transcription\ntype AsrTranscribeInput struct {\n\tAudioPath string\n\tLanguage  string\n\tConfig    *ASRConfig\n}\n\nfunc (ati AsrTranscribeInput) toCPtr() *C.ml_AsrTranscribeInput {\n\tcPtr := (*C.ml_AsrTranscribeInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_AsrTranscribeInput{}))))\n\t*cPtr = C.ml_AsrTranscribeInput{}\n\n\tcPtr.audio_path = C.CString(ati.AudioPath)\n\tif ati.Language != \"\" {\n\t\tcPtr.language = C.CString(ati.Language)\n\t} else {\n\t\tcPtr.language = nil\n\t}\n\tif ati.Config != nil {\n\t\tcPtr.config = ati.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\n\treturn cPtr\n}\n\nfunc freeAsrTranscribeInput(cPtr *C.ml_AsrTranscribeInput) {\n\tif cPtr != nil {\n\t\tif cPtr.audio_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.audio_path))\n\t\t}\n\t\tif cPtr.language != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.language))\n\t\t}\n\t\tif cPtr.config != nil {\n\t\t\tfreeASRConfig(cPtr.config)\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// AsrTranscribeOutput represents output from ASR transcription\ntype AsrTranscribeOutput struct {\n\tResult      ASRResult\n\tProfileData ProfileData\n}\n\nfunc newAsrTranscribeOutputFromCPtr(c *C.ml_AsrTranscribeOutput) AsrTranscribeOutput {\n\toutput := AsrTranscribeOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\toutput.Result = newASRResultFromCPtr(&c.result)\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\treturn output\n}\n\nfunc freeAsrTranscribeOutput(ptr *C.ml_AsrTranscribeOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tfreeASRResult(&ptr.result)\n}\n\n// AsrListSupportedLanguagesInput represents input for listing supported languages\ntype AsrListSupportedLanguagesInput struct {\n\tReserved any\n}\n\nfunc (asli AsrListSupportedLanguagesInput) toCPtr() *C.ml_AsrListSupportedLanguagesInput {\n\tcPtr := (*C.ml_AsrListSupportedLanguagesInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_AsrListSupportedLanguagesInput{}))))\n\t*cPtr = C.ml_AsrListSupportedLanguagesInput{}\n\treturn cPtr\n}\n\nfunc freeAsrListSupportedLanguagesInput(cPtr *C.ml_AsrListSupportedLanguagesInput) {\n\tif cPtr != nil {\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// AsrListSupportedLanguagesOutput represents output for listing supported languages\ntype AsrListSupportedLanguagesOutput struct {\n\tLanguageCodes []string\n}\n\nfunc newAsrListSupportedLanguagesOutputFromCPtr(c *C.ml_AsrListSupportedLanguagesOutput) AsrListSupportedLanguagesOutput {\n\toutput := AsrListSupportedLanguagesOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\toutput.LanguageCodes = cCharArrayToSlice(c.language_codes, c.language_count)\n\n\treturn output\n}\n\nfunc freeAsrListSupportedLanguagesOutput(ptr *C.ml_AsrListSupportedLanguagesOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.language_codes != nil {\n\t\tmlFreeCCharArray(ptr.language_codes, ptr.language_count)\n\t}\n}\n\n// ASRTranscriptionCallback represents callback function for streaming transcription updates\ntype ASRTranscriptionCallback func(text string, userData any)\n\n// AsrStreamBeginInput represents input for beginning ASR streaming\ntype AsrStreamBeginInput struct {\n\tStreamConfig    *ASRStreamConfig\n\tLanguage        string\n\tOnTranscription ASRTranscriptionCallback\n\tUserData        any\n}\n\n// AsrStreamBeginOutput represents output for streaming begin\ntype AsrStreamBeginOutput struct {\n\tReserved any\n}\n\n// AsrStreamPushAudioInput represents input for processing audio data\ntype AsrStreamPushAudioInput struct {\n\tAudioData []float32\n}\n\n// AsrStreamStopInput represents input for stopping streaming\ntype AsrStreamStopInput struct {\n\tGraceful bool\n}\n\n// ASR represents an ASR instance\ntype ASR struct {\n\tptr *C.ml_ASR\n}\n\n// NewASR creates a new ASR instance\nfunc NewASR(input AsrCreateInput) (*ASR, error) {\n\tslog.Debug(\"NewASR called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeAsrCreateInput(cInput)\n\n\tvar cHandle *C.ml_ASR\n\tres := C.ml_asr_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &ASR{ptr: cHandle}, nil\n}\n\n// Destroy destroys the ASR instance and frees associated resources\nfunc (a *ASR) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", a.ptr)\n\n\tif a.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_asr_destroy(a.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\ta.ptr = nil\n\treturn nil\n}\n\n// Transcribe transcribes audio file to text with specified language\nfunc (a *ASR) Transcribe(input AsrTranscribeInput) (AsrTranscribeOutput, error) {\n\tslog.Debug(\"Transcribe called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeAsrTranscribeInput(cInput)\n\n\tvar cOutput C.ml_AsrTranscribeOutput\n\tdefer freeAsrTranscribeOutput(&cOutput)\n\n\tres := C.ml_asr_transcribe(a.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn AsrTranscribeOutput{}, SDKError(res)\n\t}\n\n\toutput := newAsrTranscribeOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n\n// ListSupportedLanguages gets list of supported languages for ASR model\nfunc (a *ASR) ListSupportedLanguages() (AsrListSupportedLanguagesOutput, error) {\n\tslog.Debug(\"ListSupportedLanguages called\")\n\n\tinput := AsrListSupportedLanguagesInput{}\n\tcInput := input.toCPtr()\n\tdefer freeAsrListSupportedLanguagesInput(cInput)\n\n\tvar cOutput C.ml_AsrListSupportedLanguagesOutput\n\tdefer freeAsrListSupportedLanguagesOutput(&cOutput)\n\n\tres := C.ml_asr_list_supported_languages(a.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn AsrListSupportedLanguagesOutput{}, SDKError(res)\n\t}\n\n\toutput := newAsrListSupportedLanguagesOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n\nfunc (a *ASR) StreamBegin(input AsrStreamBeginInput) (AsrStreamBeginOutput, error) {\n\tslog.Debug(\"StreamBegin called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeAsrStreamBeginInput(cInput)\n\n\t// Set up the callback\n\tonASRTranscription = input.OnTranscription\n\n\tcInput.on_transcription = C.ml_asr_transcription_callback(C.go_asr_stream_on_transcription)\n\n\tvar cOutput C.ml_AsrStreamBeginOutput\n\tdefer freeAsrStreamBeginOutput(&cOutput)\n\n\tres := C.ml_asr_stream_begin(a.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn AsrStreamBeginOutput{}, SDKError(res)\n\t}\n\n\toutput := newAsrStreamBeginOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n\nfunc (a *ASR) StreamPushAudio(input AsrStreamPushAudioInput) error {\n\tslog.Debug(\"StreamPushAudio called\", \"length\", len(input.AudioData))\n\n\tcInput := input.toCPtr()\n\tdefer freeAsrStreamPushAudioInput(cInput)\n\n\tres := C.ml_asr_stream_push_audio(a.ptr, cInput)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\n\treturn nil\n}\n\n// StreamStop stops streaming ASR\nfunc (a *ASR) StreamStop(input AsrStreamStopInput) error {\n\tslog.Debug(\"StreamStop called\", \"graceful\", input.Graceful)\n\n\tonASRTranscription = nil // reset to default\n\n\tcInput := input.toCPtr()\n\tdefer freeAsrStreamStopInput(cInput)\n\n\tres := C.ml_asr_stream_stop(a.ptr, cInput)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\n\treturn nil\n}\n\n// Note: ASR callback is now handled via global variables in common.go\n// similar to how LLM callbacks are implemented\n\nfunc (asbi AsrStreamBeginInput) toCPtr() *C.ml_AsrStreamBeginInput {\n\tcPtr := (*C.ml_AsrStreamBeginInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_AsrStreamBeginInput{}))))\n\t*cPtr = C.ml_AsrStreamBeginInput{}\n\n\tif asbi.StreamConfig != nil {\n\t\tcPtr.stream_config = asbi.StreamConfig.toCPtr()\n\t}\n\tif asbi.Language != \"\" {\n\t\tcPtr.language = C.CString(asbi.Language)\n\t}\n\n\t// Note: callback will be set in StreamBegin method\n\tcPtr.on_transcription = nil\n\tcPtr.user_data = nil\n\n\treturn cPtr\n}\n\nfunc freeAsrStreamBeginInput(cPtr *C.ml_AsrStreamBeginInput) {\n\tif cPtr != nil {\n\t\tif cPtr.stream_config != nil {\n\t\t\tfreeASRStreamConfig(cPtr.stream_config)\n\t\t}\n\t\tif cPtr.language != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.language))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\nfunc newAsrStreamBeginOutputFromCPtr(c *C.ml_AsrStreamBeginOutput) AsrStreamBeginOutput {\n\toutput := AsrStreamBeginOutput{}\n\tif c == nil {\n\t\treturn output\n\t}\n\t// Reserved field is empty for now\n\treturn output\n}\n\nfunc freeAsrStreamBeginOutput(ptr *C.ml_AsrStreamBeginOutput) {\n\t// Nothing to free for now as it's reserved\n}\n\nfunc (aspai AsrStreamPushAudioInput) toCPtr() *C.ml_AsrStreamPushAudioInput {\n\tcPtr := (*C.ml_AsrStreamPushAudioInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_AsrStreamPushAudioInput{}))))\n\t*cPtr = C.ml_AsrStreamPushAudioInput{}\n\n\tif len(aspai.AudioData) > 0 {\n\t\tcPtr.audio_data = (*C.float)(unsafe.Pointer(&aspai.AudioData[0]))\n\t}\n\tcPtr.length = C.int32_t(len(aspai.AudioData))\n\n\treturn cPtr\n}\n\nfunc freeAsrStreamPushAudioInput(cPtr *C.ml_AsrStreamPushAudioInput) {\n\tif cPtr != nil {\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\nfunc (assi AsrStreamStopInput) toCPtr() *C.ml_AsrStreamStopInput {\n\tcPtr := (*C.ml_AsrStreamStopInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_AsrStreamStopInput{}))))\n\t*cPtr = C.ml_AsrStreamStopInput{}\n\n\tcPtr.graceful = C.bool(assi.Graceful)\n\n\treturn cPtr\n}\n\nfunc freeAsrStreamStopInput(cPtr *C.ml_AsrStreamStopInput) {\n\tif cPtr != nil {\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n"
  },
  {
    "path": "runner/nexa-sdk/common.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\n\nimport (\n\t\"unsafe\"\n)\n\n/* ========================================================================== */\n/*                              Utilities\t\t\t\t\t  \t\t\t\t */\n/* ========================================================================== */\n\nfunc mlFree(ptr unsafe.Pointer) {\n\tC.ml_free(ptr)\n}\n\nfunc sliceToCCharArray(slice []string) (**C.char, C.int32_t) {\n\tif len(slice) == 0 {\n\t\treturn nil, 0\n\t}\n\tcount := C.size_t(len(slice))\n\traw := C.malloc(C.size_t(count) * C.size_t(unsafe.Sizeof(uintptr(0))))\n\tif raw == nil {\n\t\tpanic(\"C.malloc failed\")\n\t}\n\n\tcArray := unsafe.Slice((**C.char)(raw), len(slice))\n\tfor i, s := range slice {\n\t\tcArray[i] = C.CString(s)\n\t}\n\treturn (**C.char)(raw), C.int32_t(count)\n}\n\nfunc cCharArrayToSlice(ptr **C.char, count C.int32_t) []string {\n\tif ptr == nil || count == 0 {\n\t\treturn nil\n\t}\n\tarr := unsafe.Slice(ptr, int(count))\n\tout := make([]string, count)\n\tfor i, cstr := range arr {\n\t\tout[i] = C.GoString(cstr)\n\t}\n\treturn out\n}\n\n// free the C char array in Go side allocated\nfunc freeCCharArray(ptr **C.char, count C.int32_t) {\n\tif ptr == nil || count == 0 {\n\t\treturn\n\t}\n\tarr := unsafe.Slice(ptr, int(count))\n\tfor _, p := range arr {\n\t\tC.free(unsafe.Pointer(p))\n\t}\n\tC.free(unsafe.Pointer(ptr))\n}\n\nfunc mlFreeCCharArray(ptr **C.char, count C.int32_t) {\n\tif ptr == nil || count == 0 {\n\t\treturn\n\t}\n\tarr := unsafe.Slice(ptr, int(count))\n\tfor _, p := range arr {\n\t\tmlFree(unsafe.Pointer(p))\n\t}\n\tmlFree(unsafe.Pointer(ptr))\n}\n\n/* ========================================================================== */\n/*                              Callbacks\t\t\t\t\t\t\t\t  */\n/* ========================================================================== */\n\n// TODO: use this to manage callbacks\n// type CallbackManager struct {\n// \tmu      sync.RWMutex\n// \tcallbacks map[unsafe.Pointer]OnTokenCallback\n// }\n\ntype OnTokenCallback func(token string) bool\n\nvar onToken OnTokenCallback = nil\n\n//export go_generate_stream_on_token\nfunc go_generate_stream_on_token(token *C.char, _ *C.void) C.bool {\n\tif onToken == nil {\n\t\treturn C.bool(true)\n\t}\n\treturn C.bool(onToken(C.GoString(token)))\n}\n\nvar onASRTranscription ASRTranscriptionCallback = nil\n\n//export go_asr_stream_on_transcription\nfunc go_asr_stream_on_transcription(text *C.char, _ *C.void) {\n\tif onASRTranscription == nil {\n\t\treturn\n\t}\n\tonASRTranscription(C.GoString(text), nil)\n}\n\n/* ========================================================================== */\n/*                              Common Types & Utilities\t\t\t\t\t  */\n/* ========================================================================== */\n\ntype ProfileData struct {\n\tTTFT            int64\n\tPromptTime      int64\n\tDecodeTime      int64\n\tPromptTokens    int64\n\tGeneratedTokens int64\n\tAudioDuration   int64\n\tPrefillSpeed    float64\n\tDecodingSpeed   float64\n\tRealTimeFactor  float64\n\tStopReason      string\n}\n\nfunc (p ProfileData) TotalTokens() int64 {\n\treturn p.PromptTokens + p.GeneratedTokens\n}\n\nfunc (p ProfileData) TotalTimeUs() int64 {\n\treturn p.PromptTime + p.DecodeTime\n}\n\nfunc newProfileDataFromCPtr(c C.ml_ProfileData) ProfileData {\n\treturn ProfileData{\n\t\tTTFT:            int64(c.ttft),\n\t\tPromptTime:      int64(c.prompt_time),\n\t\tDecodeTime:      int64(c.decode_time),\n\t\tPromptTokens:    int64(c.prompt_tokens),\n\t\tGeneratedTokens: int64(c.generated_tokens),\n\t\tAudioDuration:   int64(c.audio_duration),\n\t\tPrefillSpeed:    float64(c.prefill_speed),\n\t\tDecodingSpeed:   float64(c.decoding_speed),\n\t\tRealTimeFactor:  float64(c.real_time_factor),\n\t\tStopReason:      C.GoString(c.stop_reason),\n\t}\n}\n\n/* ========================================================================== */\n/*                              LANGUAGE MODELS (LLM) */\n/* ========================================================================== */\ntype SamplerConfig struct {\n\tTemperature       float32\n\tTopP              float32\n\tTopK              int32\n\tMinP              float32\n\tRepetitionPenalty float32\n\tPresencePenalty   float32\n\tFrequencyPenalty  float32\n\tSeed              int32\n\tGrammarPath       string\n\tGrammarString     string\n\tEnableJson        bool\n\n\tC *C.ml_SamplerConfig\n}\n\nfunc (sc SamplerConfig) toCPtr() *C.ml_SamplerConfig {\n\t// Allocate C structure\n\tcPtr := (*C.ml_SamplerConfig)(C.malloc(C.sizeof_ml_SamplerConfig))\n\t*cPtr = C.ml_SamplerConfig{}\n\n\tcPtr.temperature = C.float(sc.Temperature)\n\tcPtr.top_p = C.float(sc.TopP)\n\tcPtr.top_k = C.int32_t(sc.TopK)\n\tcPtr.min_p = C.float(sc.MinP)\n\tcPtr.repetition_penalty = C.float(sc.RepetitionPenalty)\n\tcPtr.presence_penalty = C.float(sc.PresencePenalty)\n\tcPtr.frequency_penalty = C.float(sc.FrequencyPenalty)\n\tcPtr.seed = C.int32_t(sc.Seed)\n\tcPtr.enable_json = C.bool(sc.EnableJson)\n\n\tif sc.GrammarPath != \"\" {\n\t\tcPtr.grammar_path = C.CString(sc.GrammarPath)\n\t}\n\tif sc.GrammarString != \"\" {\n\t\tcPtr.grammar_string = C.CString(sc.GrammarString)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeSamplerConfig(cPtr *C.ml_SamplerConfig) {\n\tif cPtr != nil {\n\t\tif cPtr.grammar_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.grammar_path))\n\t\t}\n\t\tif cPtr.grammar_string != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.grammar_string))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\ntype GenerationConfig struct {\n\tMaxTokens      int32\n\tStop           []string\n\tNPast          int32\n\tSamplerConfig  *SamplerConfig\n\tImagePaths     []string\n\tImageMaxLength int32\n\tAudioPaths     []string\n}\n\nfunc (gc GenerationConfig) toCPtr() *C.ml_GenerationConfig {\n\t// Allocate C structure\n\tcPtr := (*C.ml_GenerationConfig)(C.malloc(C.sizeof_ml_GenerationConfig))\n\t*cPtr = C.ml_GenerationConfig{}\n\n\tcPtr.max_tokens = C.int32_t(gc.MaxTokens)\n\tcPtr.n_past = C.int32_t(gc.NPast)\n\tcPtr.image_max_length = C.int32_t(gc.ImageMaxLength)\n\tif len(gc.Stop) > 0 {\n\t\tcPtr.stop, cPtr.stop_count = sliceToCCharArray(gc.Stop)\n\t}\n\n\tif len(gc.ImagePaths) > 0 {\n\t\timagePaths, imageCount := sliceToCCharArray(gc.ImagePaths)\n\t\tcPtr.image_paths = (*C.ml_Path)(imagePaths)\n\t\tcPtr.image_count = C.int32_t(imageCount)\n\t}\n\n\tif len(gc.AudioPaths) > 0 {\n\t\taudioPaths, audioCount := sliceToCCharArray(gc.AudioPaths)\n\t\tcPtr.audio_paths = (*C.ml_Path)(audioPaths)\n\t\tcPtr.audio_count = C.int32_t(audioCount)\n\t}\n\n\tif gc.SamplerConfig != nil {\n\t\tcPtr.sampler_config = gc.SamplerConfig.toCPtr()\n\t}\n\n\treturn cPtr\n}\n\nfunc freeGenerationConfig(ptr *C.ml_GenerationConfig) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\n\tfreeCCharArray(ptr.stop, ptr.stop_count)\n\tfreeCCharArray((**C.char)(unsafe.Pointer(ptr.image_paths)), ptr.image_count)\n\tfreeCCharArray((**C.char)(unsafe.Pointer(ptr.audio_paths)), ptr.audio_count)\n\n\tif ptr.sampler_config != nil {\n\t\tfreeSamplerConfig(ptr.sampler_config)\n\t}\n}\n\ntype ModelConfig struct {\n\tNCtx                int32\n\tNThreads            int32\n\tNThreadsBatch       int32\n\tNBatch              int32\n\tNUbatch             int32\n\tNSeqMax             int32\n\tNGpuLayers          int32\n\tChatTemplatePath    string\n\tChatTemplateContent string\n}\n"
  },
  {
    "path": "runner/nexa-sdk/cv.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// CVCapabilities represents CV model capabilities\ntype CVCapabilities int32\n\nconst (\n\tCVCapabilityOCR            CVCapabilities = C.ML_CV_OCR\n\tCVCapabilityClassification CVCapabilities = C.ML_CV_CLASSIFICATION\n\tCVCapabilitySegmentation   CVCapabilities = C.ML_CV_SEGMENTATION\n\tCVCapabilityCustom         CVCapabilities = C.ML_CV_CUSTOM\n)\n\n// BoundingBox represents a generic bounding box structure\ntype BoundingBox struct {\n\tX      float32\n\tY      float32\n\tWidth  float32\n\tHeight float32\n}\n\nfunc newBoundingBoxFromCPtr(c *C.ml_BoundingBox) BoundingBox {\n\tbbox := BoundingBox{}\n\n\tif c == nil {\n\t\treturn bbox\n\t}\n\n\tbbox.X = float32(c.x)\n\tbbox.Y = float32(c.y)\n\tbbox.Width = float32(c.width)\n\tbbox.Height = float32(c.height)\n\n\treturn bbox\n}\n\n// CVResult represents a generic detection/classification result\ntype CVResult struct {\n\tImagePaths   []string\n\tClassID      int32\n\tConfidence   float32\n\tBBox         BoundingBox\n\tText         string\n\tEmbedding    []float32\n\tEmbeddingDim int32\n\tMask         []float32\n\tMaskWidth    int32\n\tMaskHeight   int32\n}\n\nfunc (c CVResult) String() string {\n\treturn fmt.Sprintf(\"CVResult{ImagePaths: %v, ClassID: %d, Confidence: %.4f, BBox: %v, Text: %s, EmbeddingDim: %d, MaskWidth: %d, MaskHeight: %d}\",\n\t\tc.ImagePaths, c.ClassID, c.Confidence, c.BBox, c.Text, c.EmbeddingDim, c.MaskWidth, c.MaskHeight)\n}\n\nfunc newCVResultFromCPtr(c *C.ml_CVResult) CVResult {\n\tresult := CVResult{}\n\n\tif c == nil {\n\t\treturn result\n\t}\n\n\t// Convert image paths\n\tif c.image_paths != nil && c.image_count > 0 {\n\t\timagePaths := unsafe.Slice(c.image_paths, int(c.image_count))\n\t\tresult.ImagePaths = make([]string, c.image_count)\n\t\tfor i := range result.ImagePaths {\n\t\t\tif imagePaths[i] != nil {\n\t\t\t\tresult.ImagePaths[i] = C.GoString(imagePaths[i])\n\t\t\t}\n\t\t}\n\t}\n\n\tresult.ClassID = int32(c.class_id)\n\tresult.Confidence = float32(c.confidence)\n\tresult.BBox = newBoundingBoxFromCPtr(&c.bbox)\n\n\t// Convert text\n\tif c.text != nil {\n\t\tresult.Text = C.GoString(c.text)\n\t}\n\n\t// Convert embedding\n\tif c.embedding != nil && c.embedding_dim > 0 {\n\t\tembedding := unsafe.Slice((*C.float)(unsafe.Pointer(c.embedding)), int(c.embedding_dim))\n\t\tresult.Embedding = make([]float32, c.embedding_dim)\n\t\tfor i := range result.Embedding {\n\t\t\tresult.Embedding[i] = float32(embedding[i])\n\t\t}\n\t\tresult.EmbeddingDim = int32(c.embedding_dim)\n\t}\n\n\t// Convert mask\n\tif c.mask != nil && c.mask_w > 0 && c.mask_h > 0 {\n\t\tmaskSize := int(c.mask_w * c.mask_h)\n\t\tmask := unsafe.Slice((*C.float)(unsafe.Pointer(c.mask)), maskSize)\n\t\tresult.Mask = make([]float32, maskSize)\n\t\tfor i := range result.Mask {\n\t\t\tresult.Mask[i] = float32(mask[i])\n\t\t}\n\t\tresult.MaskWidth = int32(c.mask_w)\n\t\tresult.MaskHeight = int32(c.mask_h)\n\t}\n\n\treturn result\n}\n\nfunc freeCVResult(ptr *C.ml_CVResult) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\n\t// Free image paths\n\tif ptr.image_paths != nil {\n\t\timagePaths := unsafe.Slice(ptr.image_paths, int(ptr.image_count))\n\t\tfor i := range imagePaths {\n\t\t\tif imagePaths[i] != nil {\n\t\t\t\tmlFree(unsafe.Pointer(imagePaths[i]))\n\t\t\t}\n\t\t}\n\t\tmlFree(unsafe.Pointer(ptr.image_paths))\n\t}\n\n\t// Free text\n\tif ptr.text != nil {\n\t\tmlFree(unsafe.Pointer(ptr.text))\n\t}\n\n\t// Free embedding\n\tif ptr.embedding != nil {\n\t\tmlFree(unsafe.Pointer(ptr.embedding))\n\t}\n\n\t// Free mask\n\tif ptr.mask != nil {\n\t\tmlFree(unsafe.Pointer(ptr.mask))\n\t}\n}\n\n// CVModelConfig represents CV model preprocessing configuration\ntype CVModelConfig struct {\n\tCapabilities CVCapabilities\n\t// MLX-OCR\n\tDetModelPath string // Detection model path\n\tRecModelPath string // Recognition model path\n\tCharDictPath string\n}\n\nfunc (cmc CVModelConfig) toCPtr() *C.ml_CVModelConfig {\n\tcPtr := (*C.ml_CVModelConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_CVModelConfig{}))))\n\t*cPtr = C.ml_CVModelConfig{}\n\n\tcPtr.capabilities = C.ml_CVCapabilities(cmc.Capabilities)\n\n\tif cmc.DetModelPath != \"\" {\n\t\tcPtr.det_model_path = C.CString(cmc.DetModelPath)\n\t}\n\tif cmc.RecModelPath != \"\" {\n\t\tcPtr.rec_model_path = C.CString(cmc.RecModelPath)\n\t}\n\tif cmc.CharDictPath != \"\" {\n\t\tcPtr.char_dict_path = C.CString(cmc.CharDictPath)\n\t}\n\n\treturn cPtr\n}\n\n// CVCreateInput represents input parameters for CV model creation\ntype CVCreateInput struct {\n\tModelName string\n\tConfig    CVModelConfig\n\tPluginID  string\n\tDeviceID  string\n}\n\nfunc (cvi CVCreateInput) toCPtr() *C.ml_CVCreateInput {\n\tcPtr := (*C.ml_CVCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_CVCreateInput{}))))\n\t*cPtr = C.ml_CVCreateInput{}\n\n\t// Convert config - config is a value type, not a pointer\n\tconfigPtr := cvi.Config.toCPtr()\n\tcPtr.config = *configPtr\n\tC.free(unsafe.Pointer(configPtr))\n\n\tif cvi.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(cvi.ModelName)\n\t}\n\tif cvi.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(cvi.PluginID)\n\t}\n\tif cvi.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(cvi.DeviceID)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeCVCreateInput(cPtr *C.ml_CVCreateInput) {\n\tif cPtr != nil {\n\t\t// Note: config is a value type, so we don't need to free it separately\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// CVInferInput represents input parameters for CV inference\ntype CVInferInput struct {\n\tInputImagePath string\n}\n\nfunc (cii CVInferInput) toCPtr() *C.ml_CVInferInput {\n\tcPtr := (*C.ml_CVInferInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_CVInferInput{}))))\n\t*cPtr = C.ml_CVInferInput{}\n\n\tif cii.InputImagePath != \"\" {\n\t\tcPtr.input_image_path = C.CString(cii.InputImagePath)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeCVInferInput(cPtr *C.ml_CVInferInput) {\n\tif cPtr != nil {\n\t\tif cPtr.input_image_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.input_image_path))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// CVInferOutput represents output from CV inference\ntype CVInferOutput struct {\n\tResults []CVResult\n}\n\nfunc newCVInferOutputFromCPtr(c *C.ml_CVInferOutput) CVInferOutput {\n\toutput := CVInferOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\t// Convert results array\n\tif c.results != nil && c.result_count > 0 {\n\t\tresults := unsafe.Slice(c.results, int(c.result_count))\n\t\toutput.Results = make([]CVResult, c.result_count)\n\t\tfor i := range output.Results {\n\t\t\toutput.Results[i] = newCVResultFromCPtr(&results[i])\n\t\t}\n\t}\n\n\treturn output\n}\n\nfunc freeCVInferOutput(ptr *C.ml_CVInferOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\n\t// Free individual results\n\tif ptr.results != nil && ptr.result_count > 0 {\n\t\tresults := unsafe.Slice(ptr.results, int(ptr.result_count))\n\t\tfor i := range results {\n\t\t\tfreeCVResult(&results[i])\n\t\t}\n\t\tmlFree(unsafe.Pointer(ptr.results))\n\t}\n}\n\n// CV represents a CV model instance\ntype CV struct {\n\tptr *C.ml_CV\n}\n\n// NewCV creates a new CV model instance\nfunc NewCV(input CVCreateInput) (*CV, error) {\n\tslog.Debug(\"NewCV called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeCVCreateInput(cInput)\n\n\tvar cHandle *C.ml_CV\n\tres := C.ml_cv_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &CV{ptr: cHandle}, nil\n}\n\n// Destroy destroys the CV model instance and frees associated resources\nfunc (c *CV) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", c.ptr)\n\n\tif c.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_cv_destroy(c.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\tc.ptr = nil\n\treturn nil\n}\n\n// Infer performs inference on a single image\nfunc (c *CV) Infer(input CVInferInput) (CVInferOutput, error) {\n\tslog.Debug(\"Infer called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeCVInferInput(cInput)\n\n\tvar cOutput C.ml_CVInferOutput\n\tdefer freeCVInferOutput(&cOutput)\n\n\tres := C.ml_cv_infer(c.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn CVInferOutput{}, SDKError(res)\n\t}\n\n\toutput := newCVInferOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/diarize.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// DiarizeConfig represents diarization processing configuration\ntype DiarizeConfig struct {\n\tMinSpeakers int32\n\tMaxSpeakers int32\n}\n\nfunc (dc DiarizeConfig) toCPtr() *C.ml_DiarizeConfig {\n\tcPtr := (*C.ml_DiarizeConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_DiarizeConfig{}))))\n\t*cPtr = C.ml_DiarizeConfig{}\n\n\tcPtr.min_speakers = C.int32_t(dc.MinSpeakers)\n\tcPtr.max_speakers = C.int32_t(dc.MaxSpeakers)\n\n\treturn cPtr\n}\n\nfunc freeDiarizeConfig(cPtr *C.ml_DiarizeConfig) {\n\tif cPtr != nil {\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// DiarizeSpeechSegment represents a speech segment with speaker label\ntype DiarizeSpeechSegment struct {\n\tStartTime    float32\n\tEndTime      float32\n\tSpeakerLabel string\n}\n\nfunc newDiarizeSpeechSegmentFromCPtr(c *C.ml_DiarizeSpeechSegment) DiarizeSpeechSegment {\n\tsegment := DiarizeSpeechSegment{}\n\n\tif c == nil {\n\t\treturn segment\n\t}\n\n\tsegment.StartTime = float32(c.start_time)\n\tsegment.EndTime = float32(c.end_time)\n\n\tif c.speaker_label != nil {\n\t\tsegment.SpeakerLabel = C.GoString(c.speaker_label)\n\t}\n\n\treturn segment\n}\n\nfunc freeDiarizeSpeechSegment(ptr *C.ml_DiarizeSpeechSegment) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.speaker_label != nil {\n\t\tmlFree(unsafe.Pointer(ptr.speaker_label))\n\t}\n}\n\n// DiarizeModelConfig represents diarization model configuration\ntype DiarizeModelConfig struct {\n\tNCtx                int32\n\tNThreads            int32\n\tNThreadsBatch       int32\n\tNBatch              int32\n\tNUbatch             int32\n\tNSeqMax             int32\n\tNGpuLayers          int32\n\tChatTemplatePath    string\n\tChatTemplateContent string\n\tEnableSampling      bool\n\tGrammarStr          string\n\tMaxTokens           int32\n\tEnableThinking      bool\n\tVerbose             bool\n\tQnnModelFolderPath  string\n\tQnnLibFolderPath    string\n}\n\nfunc (mc DiarizeModelConfig) toCPtr() *C.ml_ModelConfig {\n\tcPtr := (*C.ml_ModelConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ModelConfig{}))))\n\t*cPtr = C.ml_ModelConfig{}\n\n\tcPtr.n_ctx = C.int32_t(mc.NCtx)\n\tcPtr.n_threads = C.int32_t(mc.NThreads)\n\tcPtr.n_threads_batch = C.int32_t(mc.NThreadsBatch)\n\tcPtr.n_batch = C.int32_t(mc.NBatch)\n\tcPtr.n_ubatch = C.int32_t(mc.NUbatch)\n\tcPtr.n_seq_max = C.int32_t(mc.NSeqMax)\n\tcPtr.n_gpu_layers = C.int32_t(mc.NGpuLayers)\n\n\tif mc.ChatTemplatePath != \"\" {\n\t\tcPtr.chat_template_path = C.CString(mc.ChatTemplatePath)\n\t}\n\tif mc.ChatTemplateContent != \"\" {\n\t\tcPtr.chat_template_content = C.CString(mc.ChatTemplateContent)\n\t}\n\tcPtr.enable_sampling = C.bool(mc.EnableSampling)\n\tif mc.GrammarStr != \"\" {\n\t\tcPtr.grammar_str = C.CString(mc.GrammarStr)\n\t}\n\tcPtr.max_tokens = C.int32_t(mc.MaxTokens)\n\tcPtr.enable_thinking = C.bool(mc.EnableThinking)\n\tcPtr.verbose = C.bool(mc.Verbose)\n\n\tif mc.QnnModelFolderPath != \"\" {\n\t\tcPtr.qnn_model_folder_path = C.CString(mc.QnnModelFolderPath)\n\t}\n\tif mc.QnnLibFolderPath != \"\" {\n\t\tcPtr.qnn_lib_folder_path = C.CString(mc.QnnLibFolderPath)\n\t}\n\n\treturn cPtr\n}\n\n// DiarizeCreateInput represents input parameters for diarization creation\ntype DiarizeCreateInput struct {\n\tModelName  string\n\tModelPath  string\n\tConfig     DiarizeModelConfig\n\tPluginID   string\n\tDeviceID   string\n\tLicenseID  string\n\tLicenseKey string\n}\n\nfunc (dci DiarizeCreateInput) toCPtr() *C.ml_DiarizeCreateInput {\n\tcPtr := (*C.ml_DiarizeCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_DiarizeCreateInput{}))))\n\t*cPtr = C.ml_DiarizeCreateInput{}\n\n\tif dci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(dci.ModelName)\n\t}\n\tif dci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(dci.ModelPath)\n\t}\n\tcPtr.config = *dci.Config.toCPtr()\n\tif dci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(dci.PluginID)\n\t}\n\tif dci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(dci.DeviceID)\n\t}\n\tif dci.LicenseID != \"\" {\n\t\tcPtr.license_id = C.CString(dci.LicenseID)\n\t}\n\tif dci.LicenseKey != \"\" {\n\t\tcPtr.license_key = C.CString(dci.LicenseKey)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeDiarizeCreateInput(cPtr *C.ml_DiarizeCreateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.model_name != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_name))\n\t\t}\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\t// config is a struct, not a pointer, so no need to free it\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tif cPtr.license_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.license_id))\n\t\t}\n\t\tif cPtr.license_key != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.license_key))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// DiarizeInferInput represents input parameters for diarization inference\ntype DiarizeInferInput struct {\n\tAudioPath string\n\tConfig    *DiarizeConfig\n}\n\nfunc (dii DiarizeInferInput) toCPtr() *C.ml_DiarizeInferInput {\n\tcPtr := (*C.ml_DiarizeInferInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_DiarizeInferInput{}))))\n\t*cPtr = C.ml_DiarizeInferInput{}\n\n\tcPtr.audio_path = C.CString(dii.AudioPath)\n\tif dii.Config != nil {\n\t\tcPtr.config = dii.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\n\treturn cPtr\n}\n\nfunc freeDiarizeInferInput(cPtr *C.ml_DiarizeInferInput) {\n\tif cPtr != nil {\n\t\tif cPtr.audio_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.audio_path))\n\t\t}\n\t\tif cPtr.config != nil {\n\t\t\tfreeDiarizeConfig(cPtr.config)\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// DiarizeInferOutput represents output from diarization inference\ntype DiarizeInferOutput struct {\n\tSegments    []DiarizeSpeechSegment\n\tNumSpeakers int32\n\tDuration    float32\n\tProfileData ProfileData\n}\n\nfunc newDiarizeInferOutputFromCPtr(c *C.ml_DiarizeInferOutput) DiarizeInferOutput {\n\toutput := DiarizeInferOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\t// Convert segments array\n\tif c.segments != nil && c.segment_count > 0 {\n\t\tsegments := unsafe.Slice((*C.ml_DiarizeSpeechSegment)(unsafe.Pointer(c.segments)), int(c.segment_count))\n\t\toutput.Segments = make([]DiarizeSpeechSegment, c.segment_count)\n\t\tfor i := range output.Segments {\n\t\t\toutput.Segments[i] = newDiarizeSpeechSegmentFromCPtr(&segments[i])\n\t\t}\n\t}\n\n\toutput.NumSpeakers = int32(c.num_speakers)\n\toutput.Duration = float32(c.duration)\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\n\treturn output\n}\n\nfunc freeDiarizeInferOutput(ptr *C.ml_DiarizeInferOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.segments != nil && ptr.segment_count > 0 {\n\t\tsegments := unsafe.Slice((*C.ml_DiarizeSpeechSegment)(unsafe.Pointer(ptr.segments)), int(ptr.segment_count))\n\t\tfor i := range segments {\n\t\t\tfreeDiarizeSpeechSegment(&segments[i])\n\t\t}\n\t\tmlFree(unsafe.Pointer(ptr.segments))\n\t}\n}\n\n// Diarize represents a diarization instance\ntype Diarize struct {\n\tptr *C.ml_Diarize\n}\n\n// NewDiarize creates a new diarization instance\nfunc NewDiarize(input DiarizeCreateInput) (*Diarize, error) {\n\tslog.Debug(\"NewDiarize called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeDiarizeCreateInput(cInput)\n\n\tvar cHandle *C.ml_Diarize\n\tres := C.ml_diarize_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &Diarize{ptr: cHandle}, nil\n}\n\n// Destroy destroys the diarization instance and frees associated resources\nfunc (d *Diarize) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", d.ptr)\n\n\tif d.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_diarize_destroy(d.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\td.ptr = nil\n\treturn nil\n}\n\n// Infer performs speaker diarization on audio file\nfunc (d *Diarize) Infer(input DiarizeInferInput) (DiarizeInferOutput, error) {\n\tslog.Debug(\"Infer called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeDiarizeInferInput(cInput)\n\n\tvar cOutput C.ml_DiarizeInferOutput\n\tdefer freeDiarizeInferOutput(&cOutput)\n\n\tres := C.ml_diarize_infer(d.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn DiarizeInferOutput{}, SDKError(res)\n\t}\n\n\toutput := newDiarizeInferOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/embedder.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// EmbeddingConfig represents embedding generation configuration\ntype EmbeddingConfig struct {\n\tBatchSize       int32\n\tNormalize       bool\n\tNormalizeMethod string\n}\n\nfunc (ec EmbeddingConfig) toCPtr() *C.ml_EmbeddingConfig {\n\tcPtr := (*C.ml_EmbeddingConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_EmbeddingConfig{}))))\n\t*cPtr = C.ml_EmbeddingConfig{}\n\n\tcPtr.batch_size = C.int32_t(ec.BatchSize)\n\tcPtr.normalize = C.bool(ec.Normalize)\n\tif ec.NormalizeMethod != \"\" {\n\t\tcPtr.normalize_method = C.CString(ec.NormalizeMethod)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeEmbeddingConfig(cPtr *C.ml_EmbeddingConfig) {\n\tif cPtr != nil {\n\t\tif cPtr.normalize_method != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.normalize_method))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// EmbedderCreateInput represents input parameters for embedder creation\ntype EmbedderCreateInput struct {\n\tModelName     string\n\tModelPath     string\n\tTokenizerPath string\n\tPluginID      string\n\tDeviceID      string\n}\n\nfunc (eci EmbedderCreateInput) toCPtr() *C.ml_EmbedderCreateInput {\n\tcPtr := (*C.ml_EmbedderCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_EmbedderCreateInput{}))))\n\t*cPtr = C.ml_EmbedderCreateInput{}\n\n\tif eci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(eci.ModelName)\n\t}\n\tif eci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(eci.ModelPath)\n\t}\n\tif eci.TokenizerPath != \"\" {\n\t\tcPtr.tokenizer_path = C.CString(eci.TokenizerPath)\n\t}\n\tif eci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(eci.PluginID)\n\t}\n\tif eci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(eci.DeviceID)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeEmbedderCreateInput(cPtr *C.ml_EmbedderCreateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.tokenizer_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.tokenizer_path))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// EmbedderEmbedInput represents input parameters for embedding generation\ntype EmbedderEmbedInput struct {\n\tTexts              []string\n\tConfig             *EmbeddingConfig\n\tInputIDs2D         [][]int32\n\tInputIDsRowLengths []int32\n\tTaskType           string\n\tImagePaths         []string\n}\n\nfunc (eei EmbedderEmbedInput) toCPtr() *C.ml_EmbedderEmbedInput {\n\tcPtr := (*C.ml_EmbedderEmbedInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_EmbedderEmbedInput{}))))\n\t*cPtr = C.ml_EmbedderEmbedInput{}\n\n\t// Convert texts array\n\tif len(eei.Texts) > 0 {\n\t\ttextsArray, textCount := sliceToCCharArray(eei.Texts)\n\t\tcPtr.texts = textsArray\n\t\tcPtr.text_count = textCount\n\t} else {\n\t\tcPtr.texts = nil\n\t\tcPtr.text_count = 0\n\t}\n\n\t// Set config\n\tif eei.Config != nil {\n\t\tcPtr.config = eei.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\n\t// Convert input_ids_2d array (if provided)\n\tif len(eei.InputIDs2D) > 0 {\n\t\t// Allocate array of pointers\n\t\traw := C.malloc(C.size_t(len(eei.InputIDs2D)) * C.size_t(unsafe.Sizeof(uintptr(0))))\n\t\tinputIDs2D := unsafe.Slice((**C.int32_t)(raw), len(eei.InputIDs2D))\n\n\t\t// Allocate each row\n\t\tfor i, row := range eei.InputIDs2D {\n\t\t\tif len(row) > 0 {\n\t\t\t\trowPtr := C.malloc(C.size_t(len(row)) * C.size_t(unsafe.Sizeof(C.int32_t(0))))\n\t\t\t\tcRow := unsafe.Slice((*C.int32_t)(rowPtr), len(row))\n\t\t\t\tfor j, val := range row {\n\t\t\t\t\tcRow[j] = C.int32_t(val)\n\t\t\t\t}\n\t\t\t\tinputIDs2D[i] = (*C.int32_t)(rowPtr)\n\t\t\t} else {\n\t\t\t\tinputIDs2D[i] = nil\n\t\t\t}\n\t\t}\n\n\t\tcPtr.input_ids_2d = (**C.int32_t)(raw)\n\t\tcPtr.input_ids_row_count = C.int32_t(len(eei.InputIDs2D))\n\n\t\t// Convert row lengths\n\t\tif len(eei.InputIDsRowLengths) > 0 {\n\t\t\trowLengthsPtr := C.malloc(C.size_t(len(eei.InputIDsRowLengths)) * C.size_t(unsafe.Sizeof(C.int32_t(0))))\n\t\t\tcRowLengths := unsafe.Slice((*C.int32_t)(rowLengthsPtr), len(eei.InputIDsRowLengths))\n\t\t\tfor i, length := range eei.InputIDsRowLengths {\n\t\t\t\tcRowLengths[i] = C.int32_t(length)\n\t\t\t}\n\t\t\tcPtr.input_ids_row_lengths = (*C.int32_t)(rowLengthsPtr)\n\t\t} else {\n\t\t\tcPtr.input_ids_row_lengths = nil\n\t\t}\n\t} else {\n\t\tcPtr.input_ids_2d = nil\n\t\tcPtr.input_ids_row_lengths = nil\n\t\tcPtr.input_ids_row_count = 0\n\t}\n\n\tif eei.TaskType != \"\" {\n\t\tcPtr.task_type = C.CString(eei.TaskType)\n\t} else {\n\t\tcPtr.task_type = nil\n\t}\n\n\t// Convert image paths array\n\tif len(eei.ImagePaths) > 0 {\n\t\timagePathsArray, imageCount := sliceToCCharArray(eei.ImagePaths)\n\t\tcPtr.image_paths = (*C.ml_Path)(unsafe.Pointer(imagePathsArray))\n\t\tcPtr.image_count = imageCount\n\t} else {\n\t\tcPtr.image_paths = nil\n\t\tcPtr.image_count = 0\n\t}\n\n\treturn cPtr\n}\n\nfunc freeEmbedderEmbedInput(cPtr *C.ml_EmbedderEmbedInput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\n\t// Free texts array\n\tif cPtr.texts != nil {\n\t\tfreeCCharArray(cPtr.texts, cPtr.text_count)\n\t}\n\n\t// Free config\n\tif cPtr.config != nil {\n\t\tfreeEmbeddingConfig(cPtr.config)\n\t}\n\n\t// Free input_ids_2d array\n\tif cPtr.input_ids_2d != nil && cPtr.input_ids_row_count > 0 {\n\t\tinputIDs2D := unsafe.Slice(cPtr.input_ids_2d, int(cPtr.input_ids_row_count))\n\t\tfor _, rowPtr := range inputIDs2D {\n\t\t\tif rowPtr != nil {\n\t\t\t\tC.free(unsafe.Pointer(rowPtr))\n\t\t\t}\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr.input_ids_2d))\n\t}\n\n\t// Free input_ids_row_lengths\n\tif cPtr.input_ids_row_lengths != nil {\n\t\tC.free(unsafe.Pointer(cPtr.input_ids_row_lengths))\n\t}\n\n\t// Free task_type\n\tif cPtr.task_type != nil {\n\t\tC.free(unsafe.Pointer(cPtr.task_type))\n\t}\n\n\t// Free image paths array\n\tif cPtr.image_paths != nil {\n\t\tfreeCCharArray((**C.char)(unsafe.Pointer(cPtr.image_paths)), cPtr.image_count)\n\t}\n\n\tC.free(unsafe.Pointer(cPtr))\n}\n\n// EmbedderEmbedOutput represents output from embedding generation\ntype EmbedderEmbedOutput struct {\n\tEmbeddings  [][]float32\n\tProfileData ProfileData\n}\n\nfunc newEmbedderEmbedOutputFromCPtr(c *C.ml_EmbedderEmbedOutput, embeddingDim int32) EmbedderEmbedOutput {\n\toutput := EmbedderEmbedOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\tif c.embeddings != nil && c.embedding_count > 0 {\n\t\tembeddingCount := int(c.embedding_count)\n\t\toutput.Embeddings = make([][]float32, embeddingCount)\n\n\t\ttotalFloats := int(c.embedding_count * C.int32_t(embeddingDim))\n\t\tembeddings := unsafe.Slice((*C.float)(unsafe.Pointer(c.embeddings)), totalFloats)\n\n\t\tfor i := range embeddingCount {\n\t\t\tstart := i * int(embeddingDim)\n\t\t\tend := start + int(embeddingDim)\n\t\t\toutput.Embeddings[i] = make([]float32, embeddingDim)\n\t\t\tfor j, val := range embeddings[start:end] {\n\t\t\t\toutput.Embeddings[i][j] = float32(val)\n\t\t\t}\n\t\t}\n\t}\n\n\treturn output\n}\n\nfunc freeEmbedderEmbedOutput(ptr *C.ml_EmbedderEmbedOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.embeddings != nil {\n\t\tmlFree(unsafe.Pointer(ptr.embeddings))\n\t}\n}\n\n// EmbedderDimOutput represents output for getting embedding dimension\ntype EmbedderDimOutput struct {\n\tDimension int32\n}\n\nfunc newEmbedderDimOutputFromCPtr(c *C.ml_EmbedderDimOutput) EmbedderDimOutput {\n\toutput := EmbedderDimOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\toutput.Dimension = int32(c.dimension)\n\treturn output\n}\n\n// Embedder represents an embedder instance\ntype Embedder struct {\n\tptr *C.ml_Embedder\n}\n\n// NewEmbedder creates a new embedder instance\nfunc NewEmbedder(input EmbedderCreateInput) (*Embedder, error) {\n\tslog.Debug(\"NewEmbedder called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeEmbedderCreateInput(cInput)\n\n\tvar cHandle *C.ml_Embedder\n\tres := C.ml_embedder_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &Embedder{ptr: cHandle}, nil\n}\n\n// Destroy destroys the embedder instance and frees associated resources\nfunc (e *Embedder) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", e.ptr)\n\n\tif e.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_embedder_destroy(e.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\te.ptr = nil\n\treturn nil\n}\n\n// Embed generates embeddings for input texts\nfunc (e *Embedder) Embed(input EmbedderEmbedInput) (EmbedderEmbedOutput, error) {\n\tslog.Debug(\"Embed called\", \"input\", input)\n\n\t// First get embedding dimension\n\tdimOutput, err := e.EmbeddingDimension()\n\tif err != nil {\n\t\treturn EmbedderEmbedOutput{}, err\n\t}\n\n\tcInput := input.toCPtr()\n\tdefer freeEmbedderEmbedInput(cInput)\n\n\tvar cOutput C.ml_EmbedderEmbedOutput\n\tdefer freeEmbedderEmbedOutput(&cOutput)\n\n\tres := C.ml_embedder_embed(e.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn EmbedderEmbedOutput{}, SDKError(res)\n\t}\n\n\toutput := newEmbedderEmbedOutputFromCPtr(&cOutput, dimOutput.Dimension)\n\treturn output, nil\n}\n\n// EmbeddingDimension gets embedding dimension from the model\nfunc (e *Embedder) EmbeddingDimension() (EmbedderDimOutput, error) {\n\tslog.Debug(\"EmbeddingDimension called\")\n\n\tvar cOutput C.ml_EmbedderDimOutput\n\n\tres := C.ml_embedder_embedding_dim(e.ptr, &cOutput)\n\tif res < 0 {\n\t\treturn EmbedderDimOutput{}, SDKError(res)\n\t}\n\n\toutput := newEmbedderDimOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/image_gen.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// ImageGenCreateInput represents input parameters for creating an ImageGen instance\ntype ImageGenCreateInput struct {\n\tModelName           string\n\tModelPath           string\n\tSchedulerConfigPath string\n\tPluginID            string\n\tDeviceID            string\n}\n\nfunc (igci ImageGenCreateInput) toCPtr() *C.ml_ImageGenCreateInput {\n\tcPtr := (*C.ml_ImageGenCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ImageGenCreateInput{}))))\n\t*cPtr = C.ml_ImageGenCreateInput{}\n\n\tif igci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(igci.ModelName)\n\t}\n\tif igci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(igci.ModelPath)\n\t}\n\tif igci.SchedulerConfigPath != \"\" {\n\t\tcPtr.scheduler_config_path = C.CString(igci.SchedulerConfigPath)\n\t}\n\tif igci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(igci.PluginID)\n\t}\n\tif igci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(igci.DeviceID)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeImageGenCreateInput(cPtr *C.ml_ImageGenCreateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.scheduler_config_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.scheduler_config_path))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// ImageSamplerConfig represents image sampling configuration\ntype ImageSamplerConfig struct {\n\tMethod        string\n\tSteps         int32\n\tGuidanceScale float32\n\tEta           float32\n\tSeed          int32\n}\n\n// SchedulerConfig represents scheduler configuration\ntype SchedulerConfig struct {\n\tType              string\n\tNumTrainTimesteps int32\n\tStepsOffset       int32\n\tBetaStart         float32\n\tBetaEnd           float32\n\tBetaSchedule      string\n\tPredictionType    string\n\tTimestepType      string\n\tTimestepSpacing   string\n\tInterpolationType string\n\tConfigPath        string\n}\n\n// ImageGenerationConfig represents image generation configuration\ntype ImageGenerationConfig struct {\n\tPrompts         []string\n\tNegativePrompts []string\n\tHeight          int32\n\tWidth           int32\n\tSamplerConfig   ImageSamplerConfig\n\tSchedulerConfig SchedulerConfig\n\tStrength        float32\n}\n\nfunc (igc ImageGenerationConfig) toCPtr() *C.ml_ImageGenerationConfig {\n\tcPtr := (*C.ml_ImageGenerationConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ImageGenerationConfig{}))))\n\t*cPtr = C.ml_ImageGenerationConfig{}\n\n\tif len(igc.Prompts) > 0 {\n\t\tcPtr.prompts, cPtr.prompt_count = sliceToCCharArray(igc.Prompts)\n\t}\n\tif len(igc.NegativePrompts) > 0 {\n\t\tcPtr.negative_prompts, cPtr.negative_prompt_count = sliceToCCharArray(igc.NegativePrompts)\n\t}\n\tcPtr.height = C.int32_t(igc.Height)\n\tcPtr.width = C.int32_t(igc.Width)\n\n\t// Convert sampler config to C struct (not pointer)\n\tif igc.SamplerConfig.Method != \"\" {\n\t\tcPtr.sampler_config.method = C.CString(igc.SamplerConfig.Method)\n\t}\n\tcPtr.sampler_config.steps = C.int32_t(igc.SamplerConfig.Steps)\n\tcPtr.sampler_config.guidance_scale = C.float(igc.SamplerConfig.GuidanceScale)\n\tcPtr.sampler_config.eta = C.float(igc.SamplerConfig.Eta)\n\tcPtr.sampler_config.seed = C.int32_t(igc.SamplerConfig.Seed)\n\n\t// Convert scheduler config to C struct (not pointer)\n\tif igc.SchedulerConfig.Type != \"\" {\n\t\tcPtr.scheduler_config._type = C.CString(igc.SchedulerConfig.Type)\n\t}\n\tcPtr.scheduler_config.num_train_timesteps = C.int32_t(igc.SchedulerConfig.NumTrainTimesteps)\n\tcPtr.scheduler_config.steps_offset = C.int32_t(igc.SchedulerConfig.StepsOffset)\n\tcPtr.scheduler_config.beta_start = C.float(igc.SchedulerConfig.BetaStart)\n\tcPtr.scheduler_config.beta_end = C.float(igc.SchedulerConfig.BetaEnd)\n\tif igc.SchedulerConfig.BetaSchedule != \"\" {\n\t\tcPtr.scheduler_config.beta_schedule = C.CString(igc.SchedulerConfig.BetaSchedule)\n\t}\n\tif igc.SchedulerConfig.PredictionType != \"\" {\n\t\tcPtr.scheduler_config.prediction_type = C.CString(igc.SchedulerConfig.PredictionType)\n\t}\n\tif igc.SchedulerConfig.TimestepType != \"\" {\n\t\tcPtr.scheduler_config.timestep_type = C.CString(igc.SchedulerConfig.TimestepType)\n\t}\n\tif igc.SchedulerConfig.TimestepSpacing != \"\" {\n\t\tcPtr.scheduler_config.timestep_spacing = C.CString(igc.SchedulerConfig.TimestepSpacing)\n\t}\n\tif igc.SchedulerConfig.InterpolationType != \"\" {\n\t\tcPtr.scheduler_config.interpolation_type = C.CString(igc.SchedulerConfig.InterpolationType)\n\t}\n\tif igc.SchedulerConfig.ConfigPath != \"\" {\n\t\tcPtr.scheduler_config.config_path = C.CString(igc.SchedulerConfig.ConfigPath)\n\t}\n\n\tcPtr.strength = C.float(igc.Strength)\n\n\treturn cPtr\n}\n\nfunc freeImageGenerationConfig(cPtr *C.ml_ImageGenerationConfig) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\n\tfreeCCharArray(cPtr.prompts, cPtr.prompt_count)\n\tfreeCCharArray(cPtr.negative_prompts, cPtr.negative_prompt_count)\n\n\t// Free sampler config strings\n\tif cPtr.sampler_config.method != nil {\n\t\tC.free(unsafe.Pointer(cPtr.sampler_config.method))\n\t}\n\n\t// Free scheduler config strings\n\tif cPtr.scheduler_config._type != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config._type))\n\t}\n\tif cPtr.scheduler_config.beta_schedule != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config.beta_schedule))\n\t}\n\tif cPtr.scheduler_config.prediction_type != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config.prediction_type))\n\t}\n\tif cPtr.scheduler_config.timestep_type != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config.timestep_type))\n\t}\n\tif cPtr.scheduler_config.timestep_spacing != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config.timestep_spacing))\n\t}\n\tif cPtr.scheduler_config.interpolation_type != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config.interpolation_type))\n\t}\n\tif cPtr.scheduler_config.config_path != nil {\n\t\tC.free(unsafe.Pointer(cPtr.scheduler_config.config_path))\n\t}\n\n\tC.free(unsafe.Pointer(cPtr))\n}\n\n// ImageGenTxt2ImgInput represents input parameters for text-to-image generation\ntype ImageGenTxt2ImgInput struct {\n\tPromptUTF8 string\n\tConfig     *ImageGenerationConfig\n\tOutputPath string\n}\n\nfunc (igtii ImageGenTxt2ImgInput) toCPtr() *C.ml_ImageGenTxt2ImgInput {\n\tcPtr := (*C.ml_ImageGenTxt2ImgInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_ImageGenTxt2ImgInput{}))))\n\t*cPtr = C.ml_ImageGenTxt2ImgInput{}\n\n\tcPtr.prompt_utf8 = C.CString(igtii.PromptUTF8)\n\tif igtii.Config != nil {\n\t\tcPtr.config = igtii.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\tif igtii.OutputPath != \"\" {\n\t\tcPtr.output_path = C.CString(igtii.OutputPath)\n\t} else {\n\t\tcPtr.output_path = nil\n\t}\n\n\treturn cPtr\n}\n\nfunc freeImageGenTxt2ImgInput(cPtr *C.ml_ImageGenTxt2ImgInput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\tif cPtr.prompt_utf8 != nil {\n\t\tC.free(unsafe.Pointer(cPtr.prompt_utf8))\n\t}\n\tif cPtr.config != nil {\n\t\tfreeImageGenerationConfig(cPtr.config)\n\t}\n\tif cPtr.output_path != nil {\n\t\tC.free(unsafe.Pointer(cPtr.output_path))\n\t}\n\tC.free(unsafe.Pointer(cPtr))\n}\n\n// ImageGenOutput represents output from image generation\ntype ImageGenOutput struct {\n\tOutputImagePath string\n}\n\nfunc newImageGenOutputFromCPtr(c *C.ml_ImageGenOutput) ImageGenOutput {\n\toutput := ImageGenOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\tif c.output_image_path != nil {\n\t\toutput.OutputImagePath = C.GoString(c.output_image_path)\n\t}\n\n\treturn output\n}\n\nfunc freeImageGenOutput(ptr *C.ml_ImageGenOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.output_image_path != nil {\n\t\tmlFree(unsafe.Pointer(ptr.output_image_path))\n\t}\n}\n\n// ImageGen represents an ImageGen instance\ntype ImageGen struct {\n\tptr *C.ml_ImageGen\n}\n\n// NewImageGen creates a new ImageGen instance\nfunc NewImageGen(input ImageGenCreateInput) (*ImageGen, error) {\n\tslog.Debug(\"NewImageGen called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeImageGenCreateInput(cInput)\n\n\tvar cHandle *C.ml_ImageGen\n\tres := C.ml_imagegen_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &ImageGen{ptr: cHandle}, nil\n}\n\n// Destroy destroys the ImageGen instance and frees associated resources\nfunc (ig *ImageGen) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", ig.ptr)\n\n\tif ig.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_imagegen_destroy(ig.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\tig.ptr = nil\n\treturn nil\n}\n\n// Txt2Img generates an image from text prompt\nfunc (ig *ImageGen) Txt2Img(input ImageGenTxt2ImgInput) (ImageGenOutput, error) {\n\tslog.Debug(\"Txt2Img called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeImageGenTxt2ImgInput(cInput)\n\n\tvar cOutput C.ml_ImageGenOutput\n\tdefer freeImageGenOutput(&cOutput)\n\n\tres := C.ml_imagegen_txt2img(ig.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn ImageGenOutput{}, SDKError(res)\n\t}\n\n\toutput := newImageGenOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/llm.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n\nextern bool go_generate_stream_on_token(char*, void*);\n*/\nimport \"C\"\n\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// TODO: use same role const with VLM and others\n// LLMRole represents different roles in a chat conversation\ntype LLMRole string\n\nconst (\n\tLLMRoleSystem    LLMRole = \"system\"    // System role for instructions\n\tLLMRoleUser      LLMRole = \"user\"      // User role for queries\n\tLLMRoleAssistant LLMRole = \"assistant\" // Assistant role for responses\n)\n\ntype LlmCreateInput struct {\n\tModelName     string\n\tModelPath     string\n\tTokenizerPath string\n\tConfig        ModelConfig\n\tPluginID      string\n\tDeviceID      string\n}\n\nfunc (lci LlmCreateInput) toCPtr() *C.ml_LlmCreateInput {\n\tcPtr := (*C.ml_LlmCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_LlmCreateInput{}))))\n\t*cPtr = C.ml_LlmCreateInput{}\n\n\tif lci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(lci.ModelName)\n\t}\n\tif lci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(lci.ModelPath)\n\t}\n\tif lci.TokenizerPath != \"\" {\n\t\tcPtr.tokenizer_path = C.CString(lci.TokenizerPath)\n\t}\n\tif lci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(lci.PluginID)\n\t}\n\tif lci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(lci.DeviceID)\n\t}\n\n\t// no need to use toCPtr() here, because we are not using the config pointer\n\tcPtr.config = C.ml_ModelConfig{\n\t\tn_ctx:           C.int32_t(lci.Config.NCtx),\n\t\tn_threads:       C.int32_t(lci.Config.NThreads),\n\t\tn_threads_batch: C.int32_t(lci.Config.NThreadsBatch),\n\t\tn_batch:         C.int32_t(lci.Config.NBatch),\n\t\tn_ubatch:        C.int32_t(lci.Config.NUbatch),\n\t\tn_seq_max:       C.int32_t(lci.Config.NSeqMax),\n\t\tn_gpu_layers:    C.int32_t(lci.Config.NGpuLayers),\n\t}\n\tif lci.Config.ChatTemplatePath != \"\" {\n\t\tcPtr.config.chat_template_path = C.CString(lci.Config.ChatTemplatePath)\n\t}\n\tif lci.Config.ChatTemplateContent != \"\" {\n\t\tcPtr.config.chat_template_content = C.CString(lci.Config.ChatTemplateContent)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeLlmCreateInput(cPtr *C.ml_LlmCreateInput) {\n\tif cPtr != nil {\n\t\t// Free string fields\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.tokenizer_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.tokenizer_path))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\n\t\t// Free nested ModelConfig - config is a value, not a pointer\n\t\t// We need to free the string fields manually\n\t\tif cPtr.config.chat_template_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.config.chat_template_path))\n\t\t}\n\t\tif cPtr.config.chat_template_content != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.config.chat_template_content))\n\t\t}\n\n\t\t// Free the main structure\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\ntype LlmGenerateInput struct {\n\tPromptUTF8 string\n\tInputIDs   []int32\n\tConfig     *GenerationConfig\n\tOnToken    OnTokenCallback\n\t// UserData   unsafe.Pointer\n}\n\nfunc (lgi LlmGenerateInput) toCPtr() *C.ml_LlmGenerateInput {\n\tcPtr := (*C.ml_LlmGenerateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_LlmGenerateInput{}))))\n\t*cPtr = C.ml_LlmGenerateInput{}\n\n\tif lgi.PromptUTF8 != \"\" {\n\t\tcPtr.prompt_utf8 = C.CString(lgi.PromptUTF8)\n\t}\n\n\tif len(lgi.InputIDs) > 0 {\n\t\tcPtr.input_ids_count = C.int32_t(len(lgi.InputIDs))\n\t\tcInputIDs := (*C.int32_t)(C.malloc(C.size_t(len(lgi.InputIDs)) * C.size_t(unsafe.Sizeof(C.int32_t(0)))))\n\t\tcInputIDsSlice := unsafe.Slice(cInputIDs, len(lgi.InputIDs))\n\t\tfor i, id := range lgi.InputIDs {\n\t\t\tcInputIDsSlice[i] = C.int32_t(id)\n\t\t}\n\t\tcPtr.input_ids = cInputIDs\n\t} else {\n\t\tcPtr.input_ids = nil\n\t\tcPtr.input_ids_count = 0\n\t}\n\n\tif lgi.Config != nil {\n\t\tcPtr.config = lgi.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\n\t// Note: on_token and user_data should be set by the caller\n\tcPtr.on_token = nil\n\tcPtr.user_data = nil\n\n\treturn cPtr\n}\n\nfunc freeLlmGenerateInput(cPtr *C.ml_LlmGenerateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.prompt_utf8 != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.prompt_utf8))\n\t\t}\n\n\t\tif cPtr.input_ids != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.input_ids))\n\t\t}\n\n\t\tif cPtr.config != nil {\n\t\t\tfreeGenerationConfig(cPtr.config)\n\t\t}\n\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\ntype LlmGenerateOutput struct {\n\tFullText    string\n\tProfileData ProfileData\n}\n\nfunc newLlmGenerateOutputFromCPtr(c *C.ml_LlmGenerateOutput) LlmGenerateOutput {\n\toutput := LlmGenerateOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\tif c.full_text != nil {\n\t\toutput.FullText = C.GoString(c.full_text)\n\t}\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\treturn output\n}\n\nfunc freeLlmGenerateOutput(ptr *C.ml_LlmGenerateOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.full_text != nil {\n\t\tmlFree(unsafe.Pointer(ptr.full_text))\n\t}\n}\n\ntype LlmChatMessage struct {\n\tRole    LLMRole\n\tContent string\n}\n\ntype llmChatMessages []LlmChatMessage\n\nfunc (lcm llmChatMessages) toCPtr() (*C.ml_LlmChatMessage, C.int32_t) {\n\tif len(lcm) == 0 {\n\t\treturn nil, 0\n\t}\n\n\tcount := len(lcm)\n\traw := C.malloc(C.size_t(count * C.sizeof_ml_LlmChatMessage))\n\tcMessages := unsafe.Slice((*C.ml_LlmChatMessage)(raw), count)\n\n\tfor i, msg := range lcm {\n\t\tif msg.Role != \"\" {\n\t\t\tcMessages[i].role = C.CString(string(msg.Role))\n\t\t\tcMessages[i].content = C.CString(msg.Content)\n\t\t}\n\t}\n\n\treturn (*C.ml_LlmChatMessage)(raw), C.int32_t(count)\n}\n\nfunc freeLlmChatMessages(cPtr *C.ml_LlmChatMessage, count C.int32_t) {\n\tif cPtr == nil || count == 0 {\n\t\treturn\n\t}\n\n\tcMessages := unsafe.Slice(cPtr, int(count))\n\tfor i := range count {\n\t\tif cMessages[i].role != nil {\n\t\t\tC.free(unsafe.Pointer(cMessages[i].role))\n\t\t}\n\t\tif cMessages[i].content != nil {\n\t\t\tC.free(unsafe.Pointer(cMessages[i].content))\n\t\t}\n\t}\n\n\tC.free(unsafe.Pointer(cPtr))\n}\n\ntype LlmApplyChatTemplateInput struct {\n\tMessages            []LlmChatMessage\n\tTools               string\n\tEnableThink         bool\n\tAddGenerationPrompt bool\n}\n\nfunc (lati LlmApplyChatTemplateInput) toCPtr() *C.ml_LlmApplyChatTemplateInput {\n\tcPtr := (*C.ml_LlmApplyChatTemplateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_LlmApplyChatTemplateInput{}))))\n\t*cPtr = C.ml_LlmApplyChatTemplateInput{}\n\n\tif len(lati.Messages) > 0 {\n\t\tcMessages, messageCount := llmChatMessages(lati.Messages).toCPtr()\n\t\tcPtr.messages = cMessages\n\t\tcPtr.message_count = C.int32_t(messageCount)\n\t}\n\n\tif lati.Tools != \"\" {\n\t\tcPtr.tools = C.CString(lati.Tools)\n\t}\n\n\tcPtr.enable_thinking = C.bool(lati.EnableThink)\n\tcPtr.add_generation_prompt = C.bool(lati.AddGenerationPrompt)\n\n\treturn cPtr\n}\n\nfunc freeLlmApplyChatTemplateInput(cPtr *C.ml_LlmApplyChatTemplateInput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\tfreeLlmChatMessages(cPtr.messages, cPtr.message_count)\n\tif cPtr.tools != nil {\n\t\tC.free(unsafe.Pointer(cPtr.tools))\n\t}\n\tC.free(unsafe.Pointer(cPtr))\n}\n\ntype LlmApplyChatTemplateOutput struct {\n\tFormattedText string\n}\n\nfunc newLlmApplyChatTemplateOutputFromCPtr(c *C.ml_LlmApplyChatTemplateOutput) LlmApplyChatTemplateOutput {\n\toutput := LlmApplyChatTemplateOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\tif c.formatted_text != nil {\n\t\toutput.FormattedText = C.GoString(c.formatted_text)\n\t}\n\n\treturn output\n}\n\nfunc freeLlmApplyChatTemplateOutput(cPtr *C.ml_LlmApplyChatTemplateOutput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\tif cPtr.formatted_text != nil {\n\t\tmlFree(unsafe.Pointer(cPtr.formatted_text))\n\t}\n}\n\ntype LLM struct {\n\tptr *C.ml_LLM\n}\n\nfunc NewLLM(input LlmCreateInput) (*LLM, error) {\n\tslog.Debug(\"NewLLM called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeLlmCreateInput(cInput)\n\n\tvar cHandle *C.ml_LLM\n\tres := C.ml_llm_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &LLM{ptr: cHandle}, nil\n}\n\nfunc (l *LLM) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", l.ptr)\n\n\tif l.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_llm_destroy(l.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\tl.ptr = nil\n\treturn nil\n}\n\nfunc (l *LLM) Reset() error {\n\tslog.Debug(\"Reset called\", \"ptr\", l.ptr)\n\tif l.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_llm_reset(l.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\treturn nil\n}\n\n// LlmSaveKVCacheInput represents input for saving LLM KV cache\ntype LlmSaveKVCacheInput struct {\n\tPath string\n}\n\nfunc (lsci LlmSaveKVCacheInput) toCPtr() *C.ml_KvCacheSaveInput {\n\tcPtr := (*C.ml_KvCacheSaveInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_KvCacheSaveInput{}))))\n\t*cPtr = C.ml_KvCacheSaveInput{}\n\n\tif lsci.Path != \"\" {\n\t\tcPtr.path = C.CString(lsci.Path)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeLlmSaveKVCacheInput(cPtr *C.ml_KvCacheSaveInput) {\n\tif cPtr != nil {\n\t\tif cPtr.path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.path))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// LlmSaveKVCacheOutput represents output from saving LLM KV cache\ntype LlmSaveKVCacheOutput struct {\n\tReserved any\n}\n\nfunc newLlmSaveKVCacheOutputFromCPtr(c *C.ml_KvCacheSaveOutput) LlmSaveKVCacheOutput {\n\toutput := LlmSaveKVCacheOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\t// Currently no fields to copy from C structure\n\treturn output\n}\n\nfunc freeLlmSaveKVCacheOutput(cPtr *C.ml_KvCacheSaveOutput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\t// Currently no fields to free\n}\n\n// LlmLoadKVCacheInput represents input for loading LLM KV cache\ntype LlmLoadKVCacheInput struct {\n\tPath string\n}\n\nfunc (llci LlmLoadKVCacheInput) toCPtr() *C.ml_KvCacheLoadInput {\n\tcPtr := (*C.ml_KvCacheLoadInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_KvCacheLoadInput{}))))\n\t*cPtr = C.ml_KvCacheLoadInput{}\n\n\tif llci.Path != \"\" {\n\t\tcPtr.path = C.CString(llci.Path)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeLlmLoadKVCacheInput(cPtr *C.ml_KvCacheLoadInput) {\n\tif cPtr != nil {\n\t\tif cPtr.path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.path))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// LlmLoadKVCacheOutput represents output from loading LLM KV cache\ntype LlmLoadKVCacheOutput struct {\n\tReserved any\n}\n\nfunc newLlmLoadKVCacheOutputFromCPtr(c *C.ml_KvCacheLoadOutput) LlmLoadKVCacheOutput {\n\toutput := LlmLoadKVCacheOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\t// Currently no fields to copy from C structure\n\treturn output\n}\n\nfunc freeLlmLoadKVCacheOutput(cPtr *C.ml_KvCacheLoadOutput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\t// Currently no fields to free\n}\n\nfunc (l *LLM) ApplyChatTemplate(input LlmApplyChatTemplateInput) (*LlmApplyChatTemplateOutput, error) {\n\tslog.Debug(\"ApplyChatTemplate called\", \"input\", input)\n\n\tcinput := input.toCPtr()\n\tdefer freeLlmApplyChatTemplateInput(cinput)\n\n\tvar cOutput C.ml_LlmApplyChatTemplateOutput\n\tdefer freeLlmApplyChatTemplateOutput(&cOutput)\n\n\tres := C.ml_llm_apply_chat_template(l.ptr, cinput, &cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newLlmApplyChatTemplateOutputFromCPtr(&cOutput)\n\n\treturn &output, nil\n}\n\nfunc (l *LLM) SaveKVCache(input LlmSaveKVCacheInput) (*LlmSaveKVCacheOutput, error) {\n\tslog.Debug(\"SaveKVCache called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeLlmSaveKVCacheInput(cInput)\n\n\tvar cOutput C.ml_KvCacheSaveOutput\n\tdefer freeLlmSaveKVCacheOutput(&cOutput)\n\n\tres := C.ml_llm_save_kv_cache(l.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newLlmSaveKVCacheOutputFromCPtr(&cOutput)\n\n\treturn &output, nil\n}\n\nfunc (l *LLM) LoadKVCache(input LlmLoadKVCacheInput) (*LlmLoadKVCacheOutput, error) {\n\tslog.Debug(\"LoadKVCache called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeLlmLoadKVCacheInput(cInput)\n\n\tvar cOutput C.ml_KvCacheLoadOutput\n\tdefer freeLlmLoadKVCacheOutput(&cOutput)\n\n\tres := C.ml_llm_load_kv_cache(l.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newLlmLoadKVCacheOutputFromCPtr(&cOutput)\n\n\treturn &output, nil\n}\n\nfunc (l *LLM) Generate(input LlmGenerateInput) (LlmGenerateOutput, error) {\n\tslog.Debug(\"Generate called\", \"input\", input, \"config\", input.Config, \"sampler\", input.Config.SamplerConfig)\n\n\tcInput := input.toCPtr()\n\tdefer freeLlmGenerateInput(cInput)\n\n\t// set the callback\n\tonToken = input.OnToken\n\tdefer func() {\n\t\tonToken = nil // reset to default\n\t}()\n\tcInput.on_token = C.ml_token_callback(C.go_generate_stream_on_token)\n\n\tvar cOutput C.ml_LlmGenerateOutput\n\tdefer freeLlmGenerateOutput(&cOutput)\n\n\tres := C.ml_llm_generate(l.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn LlmGenerateOutput{}, SDKError(res)\n\t}\n\n\toutput := newLlmGenerateOutputFromCPtr(&cOutput)\n\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/ml.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#cgo linux LDFLAGS: -Wl,-rpath,'$ORIGIN' -Wl,-rpath,${SRCDIR}/../build\n#cgo darwin LDFLAGS: -Wl,-rpath,${SRCDIR}/../build\n\n#cgo CFLAGS: -I../build\n#cgo LDFLAGS: -L../build -lnexa_bridge\n\n#include <stdlib.h>\n#include \"ml.h\"\n\n#if defined(_WIN32)\n__declspec(dllexport) void go_log_wrap(ml_LogLevel level, char *msg);\n#else\nextern void go_log_wrap(ml_LogLevel level, char *msg);\n#endif\n\nstatic void set_token(const char* token) {\n#if defined(_WIN32)\n\t_putenv_s(\"NEXA_TOKEN\", token);\n#else\n\tsetenv(\"NEXA_TOKEN\", token, 1);\n#endif\n}\n*/\nimport \"C\"\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"os\"\n\t\"unsafe\"\n)\n\nvar bridgeLogEnabled = false\n\ntype SDKError int32\n\nfunc (s SDKError) Error() string {\n\treturn fmt.Sprintf(\"SDKError(%s)\", C.GoString(C.ml_get_error_message(C.ml_ErrorCode(s))))\n}\n\nfunc SDKErrorCode(err error) int32 {\n\tif sdkErr, ok := err.(SDKError); ok {\n\t\treturn int32(sdkErr)\n\t}\n\treturn -1\n}\n\nvar (\n\tErrCommonNotSupport             = SDKError(C.ML_ERROR_COMMON_NOT_SUPPORTED)\n\tErrCommonModelLoad              = SDKError(C.ML_ERROR_COMMON_MODEL_LOAD)\n\tErrCommonPluginLoad             = SDKError(C.ML_ERROR_COMMON_PLUGIN_LOAD)\n\tErrCommonPluginInvalid          = SDKError(C.ML_ERROR_COMMON_PLUGIN_INVALID)\n\tErrLlmTokenizationContextLength = SDKError(C.ML_ERROR_LLM_TOKENIZATION_CONTEXT_LENGTH)\n)\n\n// Init initializes the Nexa SDK by calling the underlying C library initialization\n// This must be called before using any other SDK functions\nfunc Init() {\n\tslog.Debug(\"[ML] Init\", \"bridgeLogEnabled\", bridgeLogEnabled)\n\tif bridgeLogEnabled {\n\t\tC.ml_set_log((C.ml_log_callback)(C.go_log_wrap))\n\t}\n\tC.set_token(C.CString(os.Getenv(\"NEXA_TOKEN\"))) // sync token to C env\n\tC.ml_init()\n}\n\n// DeInit cleans up resources allocated by the Nexa SDK\n// This should be called when the SDK is no longer needed\nfunc DeInit() {\n\tC.ml_deinit()\n}\n\n// Get SDK Version\nfunc Version() string {\n\treturn C.GoString(C.ml_version())\n}\n\ntype PluginListOutput struct {\n\tPluginIDs []string\n}\n\nfunc newPluginListOutputFromCPtr(c *C.ml_GetPluginListOutput) PluginListOutput {\n\treturn PluginListOutput{\n\t\tPluginIDs: cCharArrayToSlice((**C.char)(unsafe.Pointer(c.plugin_ids)), c.plugin_count),\n\t}\n}\n\nfunc GetPluginList() (*PluginListOutput, error) {\n\tvar cOutput C.ml_GetPluginListOutput\n\n\tres := C.ml_get_plugin_list(&cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newPluginListOutputFromCPtr(&cOutput)\n\n\tif cOutput.plugin_ids != nil {\n\t\tmlFreeCCharArray((**C.char)(unsafe.Pointer(cOutput.plugin_ids)), cOutput.plugin_count)\n\t}\n\n\treturn &output, nil\n}\n\ntype DeviceListInput struct {\n\tPluginID string\n}\n\nfunc (di DeviceListInput) toCPtr() *C.ml_GetDeviceListInput {\n\tcPtr := (*C.ml_GetDeviceListInput)(C.malloc(C.sizeof_ml_GetDeviceListInput))\n\tcPtr.plugin_id = C.CString(di.PluginID)\n\treturn cPtr\n}\n\nfunc freeDeviceListInput(cPtr *C.ml_GetDeviceListInput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\tif cPtr.plugin_id != nil {\n\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t}\n\tC.free(unsafe.Pointer(cPtr))\n}\n\ntype Device struct {\n\tID   string\n\tName string\n}\n\ntype DeviceListOutput struct {\n\tDevices []Device\n}\n\nfunc freeDeviceListOutput(c *C.ml_GetDeviceListOutput) {\n\tif c == nil {\n\t\treturn\n\t}\n\tmlFree(unsafe.Pointer(c.device_ids))\n\tmlFree(unsafe.Pointer(c.device_names))\n}\n\nfunc newDeviceListOutputFromCPtr(c *C.ml_GetDeviceListOutput) DeviceListOutput {\n\tdevices := make([]Device, c.device_count)\n\n\tdeviceIDs := unsafe.Slice(c.device_ids, int(c.device_count))\n\tdeviceNames := unsafe.Slice(c.device_names, int(c.device_count))\n\tfor i := range devices {\n\t\tdevices[i] = Device{\n\t\t\tID:   C.GoString(deviceIDs[i]),\n\t\t\tName: C.GoString(deviceNames[i]),\n\t\t}\n\t}\n\n\treturn DeviceListOutput{\n\t\tDevices: devices,\n\t}\n}\n\nfunc GetDeviceList(input DeviceListInput) (*DeviceListOutput, error) {\n\tcInput := input.toCPtr()\n\tdefer freeDeviceListInput(cInput)\n\n\tvar cOutput C.ml_GetDeviceListOutput\n\tdefer freeDeviceListOutput(&cOutput)\n\n\tres := C.ml_get_device_list(cInput, &cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newDeviceListOutputFromCPtr(&cOutput)\n\n\treturn &output, nil\n}\n\n// go_log_wrap is exported to C and handles log messages from the C library\n// It converts C strings to Go strings and prints them to stdout\n//\n//export go_log_wrap\nfunc go_log_wrap(level C.ml_LogLevel, msg *C.char) {\n\tmsgStr := C.GoString(msg)\n\tswitch level {\n\tcase C.ML_LOG_LEVEL_INFO:\n\t\tslog.Info(\"[ML] \" + msgStr)\n\tcase C.ML_LOG_LEVEL_WARN:\n\t\tslog.Warn(\"[ML] \" + msgStr)\n\tcase C.ML_LOG_LEVEL_ERROR:\n\t\tslog.Error(\"[ML] \" + msgStr)\n\tdefault:\n\t\tslog.Debug(\"[ML] \" + msgStr)\n\t}\n}\n\n// EnableBridgeLog enables or disables the bridge log\nfunc EnableBridgeLog(enable bool) {\n\tbridgeLogEnabled = enable\n}\n"
  },
  {
    "path": "runner/nexa-sdk/reranker.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// RerankConfig represents reranking configuration\ntype RerankConfig struct {\n\tBatchSize       int32\n\tNormalize       bool\n\tNormalizeMethod string\n}\n\nfunc (rc RerankConfig) toCPtr() *C.ml_RerankConfig {\n\tcPtr := (*C.ml_RerankConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_RerankConfig{}))))\n\t*cPtr = C.ml_RerankConfig{}\n\n\tcPtr.batch_size = C.int32_t(rc.BatchSize)\n\tcPtr.normalize = C.bool(rc.Normalize)\n\tif rc.NormalizeMethod != \"\" {\n\t\tcPtr.normalize_method = C.CString(rc.NormalizeMethod)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeRerankConfig(cPtr *C.ml_RerankConfig) {\n\tif cPtr != nil {\n\t\tif cPtr.normalize_method != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.normalize_method))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// RerankerCreateInput represents input parameters for reranker creation\ntype RerankerCreateInput struct {\n\tModelName     string\n\tModelPath     string\n\tTokenizerPath string\n\tPluginID      string\n\tDeviceID      string\n}\n\nfunc (rci RerankerCreateInput) toCPtr() *C.ml_RerankerCreateInput {\n\tcPtr := (*C.ml_RerankerCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_RerankerCreateInput{}))))\n\t*cPtr = C.ml_RerankerCreateInput{}\n\n\tif rci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(rci.ModelName)\n\t}\n\tif rci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(rci.ModelPath)\n\t}\n\tif rci.TokenizerPath != \"\" {\n\t\tcPtr.tokenizer_path = C.CString(rci.TokenizerPath)\n\t}\n\tif rci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(rci.PluginID)\n\t}\n\tif rci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(rci.DeviceID)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeRerankerCreateInput(cPtr *C.ml_RerankerCreateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.tokenizer_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.tokenizer_path))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// RerankerRerankInput represents input parameters for reranking operation\ntype RerankerRerankInput struct {\n\tQuery     string\n\tDocuments []string\n\tConfig    *RerankConfig\n}\n\nfunc (rri RerankerRerankInput) toCPtr() *C.ml_RerankerRerankInput {\n\tcPtr := (*C.ml_RerankerRerankInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_RerankerRerankInput{}))))\n\t*cPtr = C.ml_RerankerRerankInput{}\n\n\tif rri.Query != \"\" {\n\t\tcPtr.query = C.CString(rri.Query)\n\t}\n\n\t// Convert documents array\n\tif len(rri.Documents) > 0 {\n\t\tdocumentsArray, documentCount := sliceToCCharArray(rri.Documents)\n\t\tcPtr.documents = documentsArray\n\t\tcPtr.documents_count = documentCount\n\t} else {\n\t\tcPtr.documents = nil\n\t\tcPtr.documents_count = 0\n\t}\n\n\t// Set config\n\tif rri.Config != nil {\n\t\tcPtr.config = rri.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\n\treturn cPtr\n}\n\nfunc freeRerankerRerankInput(cPtr *C.ml_RerankerRerankInput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\n\tif cPtr.query != nil {\n\t\tC.free(unsafe.Pointer(cPtr.query))\n\t}\n\n\tif cPtr.documents != nil {\n\t\tfreeCCharArray(cPtr.documents, cPtr.documents_count)\n\t}\n\n\tif cPtr.config != nil {\n\t\tfreeRerankConfig(cPtr.config)\n\t}\n\n\tC.free(unsafe.Pointer(cPtr))\n}\n\n// RerankerRerankOutput represents output from reranking operation\ntype RerankerRerankOutput struct {\n\tScores      []float32\n\tScoreCount  int32\n\tProfileData ProfileData\n}\n\nfunc newRerankerRerankOutputFromCPtr(c *C.ml_RerankerRerankOutput) RerankerRerankOutput {\n\toutput := RerankerRerankOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\t// Convert scores array\n\tif c.scores != nil && c.score_count > 0 {\n\t\tscores := unsafe.Slice((*C.float)(unsafe.Pointer(c.scores)), int(c.score_count))\n\t\toutput.Scores = make([]float32, c.score_count)\n\t\tfor i := range output.Scores {\n\t\t\toutput.Scores[i] = float32(scores[i])\n\t\t}\n\t}\n\n\toutput.ScoreCount = int32(c.score_count)\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\n\treturn output\n}\n\nfunc freeRerankerRerankOutput(ptr *C.ml_RerankerRerankOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.scores != nil {\n\t\tmlFree(unsafe.Pointer(ptr.scores))\n\t}\n}\n\n// Reranker represents a reranker instance\ntype Reranker struct {\n\tptr *C.ml_Reranker\n}\n\n// NewReranker creates a new reranker instance\nfunc NewReranker(input RerankerCreateInput) (*Reranker, error) {\n\tslog.Debug(\"NewReranker called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeRerankerCreateInput(cInput)\n\n\tvar cHandle *C.ml_Reranker\n\tres := C.ml_reranker_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &Reranker{ptr: cHandle}, nil\n}\n\n// Destroy destroys the reranker instance and frees associated resources\nfunc (r *Reranker) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", r.ptr)\n\n\tif r.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_reranker_destroy(r.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\tr.ptr = nil\n\treturn nil\n}\n\n// Rerank performs reranking operation on documents against a query\nfunc (r *Reranker) Rerank(input RerankerRerankInput) (RerankerRerankOutput, error) {\n\tslog.Debug(\"Rerank called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeRerankerRerankInput(cInput)\n\n\tvar cOutput C.ml_RerankerRerankOutput\n\tdefer freeRerankerRerankOutput(&cOutput)\n\n\tres := C.ml_reranker_rerank(r.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn RerankerRerankOutput{}, SDKError(res)\n\t}\n\n\toutput := newRerankerRerankOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/tts.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// TTSConfig represents TTS synthesis configuration\ntype TTSConfig struct {\n\tVoice      string\n\tSpeed      float32\n\tSeed       int32\n\tSampleRate int32\n}\n\nfunc (tc TTSConfig) toCPtr() *C.ml_TTSConfig {\n\tcPtr := (*C.ml_TTSConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_TTSConfig{}))))\n\t*cPtr = C.ml_TTSConfig{}\n\n\tif tc.Voice != \"\" {\n\t\tcPtr.voice = C.CString(tc.Voice)\n\t}\n\tcPtr.speed = C.float(tc.Speed)\n\tcPtr.seed = C.int32_t(tc.Seed)\n\tcPtr.sample_rate = C.int32_t(tc.SampleRate)\n\n\treturn cPtr\n}\n\nfunc freeTTSConfig(cPtr *C.ml_TTSConfig) {\n\tif cPtr != nil {\n\t\tif cPtr.voice != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.voice))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// // TTSSamplerConfig represents TTS sampling parameters\n// type TTSSamplerConfig struct {\n// \tTemperature  float32\n// \tNoiseScale   float32\n// \tLengthScale  float32\n// }\n\n// func (tsc TTSSamplerConfig) toCPtr() *C.ml_TTSSamplerConfig {\n// \tcPtr := (*C.ml_TTSSamplerConfig)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_TTSSamplerConfig{}))))\n// \t*cPtr = C.ml_TTSSamplerConfig{}\n\n// \tcPtr.temperature = C.float(tsc.Temperature)\n// \tcPtr.noise_scale = C.float(tsc.NoiseScale)\n// \tcPtr.length_scale = C.float(tsc.LengthScale)\n\n// \treturn cPtr\n// }\n\n// func freeTTSSamplerConfig(cPtr *C.ml_TTSSamplerConfig) {\n// \tif cPtr != nil {\n// \t\tC.free(unsafe.Pointer(cPtr))\n// \t}\n// }\n\n// TTSResult represents TTS synthesis result\ntype TTSResult struct {\n\tAudioPath       string\n\tDurationSeconds float32\n\tSampleRate      int32\n\tChannels        int32\n\tNumSamples      int32\n}\n\nfunc newTTSResultFromCPtr(c *C.ml_TTSResult) TTSResult {\n\tresult := TTSResult{}\n\n\tif c == nil {\n\t\treturn result\n\t}\n\n\tif c.audio_path != nil {\n\t\tresult.AudioPath = C.GoString(c.audio_path)\n\t}\n\tresult.DurationSeconds = float32(c.duration_seconds)\n\tresult.SampleRate = int32(c.sample_rate)\n\tresult.Channels = int32(c.channels)\n\tresult.NumSamples = int32(c.num_samples)\n\n\treturn result\n}\n\nfunc freeTTSResult(ptr *C.ml_TTSResult) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.audio_path != nil {\n\t\tmlFree(unsafe.Pointer(ptr.audio_path))\n\t}\n}\n\n// TtsCreateInput represents input parameters for TTS creation\ntype TtsCreateInput struct {\n\tModelName   string\n\tModelPath   string\n\tVocoderPath string\n\tPluginID    string\n\tDeviceID    string\n}\n\nfunc (tci TtsCreateInput) toCPtr() *C.ml_TtsCreateInput {\n\tcPtr := (*C.ml_TtsCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_TtsCreateInput{}))))\n\t*cPtr = C.ml_TtsCreateInput{}\n\n\tif tci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(tci.ModelName)\n\t}\n\tif tci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(tci.ModelPath)\n\t}\n\tif tci.VocoderPath != \"\" {\n\t\tcPtr.vocoder_path = C.CString(tci.VocoderPath)\n\t}\n\tif tci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(tci.PluginID)\n\t}\n\tif tci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(tci.DeviceID)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeTtsCreateInput(cPtr *C.ml_TtsCreateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.vocoder_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.vocoder_path))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// TtsSynthesizeInput represents input parameters for TTS synthesis\ntype TtsSynthesizeInput struct {\n\tTextUTF8   string\n\tConfig     *TTSConfig\n\tOutputPath string\n}\n\nfunc (tsi TtsSynthesizeInput) toCPtr() *C.ml_TtsSynthesizeInput {\n\tcPtr := (*C.ml_TtsSynthesizeInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_TtsSynthesizeInput{}))))\n\t*cPtr = C.ml_TtsSynthesizeInput{}\n\n\tcPtr.text_utf8 = C.CString(tsi.TextUTF8)\n\tif tsi.Config != nil {\n\t\tcPtr.config = tsi.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\tif tsi.OutputPath != \"\" {\n\t\tcPtr.output_path = C.CString(tsi.OutputPath)\n\t} else {\n\t\tcPtr.output_path = nil\n\t}\n\n\treturn cPtr\n}\n\nfunc freeTtsSynthesizeInput(cPtr *C.ml_TtsSynthesizeInput) {\n\tif cPtr != nil {\n\t\tif cPtr.text_utf8 != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.text_utf8))\n\t\t}\n\t\tif cPtr.config != nil {\n\t\t\tfreeTTSConfig(cPtr.config)\n\t\t}\n\t\tif cPtr.output_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.output_path))\n\t\t}\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// TtsSynthesizeOutput represents output from TTS synthesis\ntype TtsSynthesizeOutput struct {\n\tResult      TTSResult\n\tProfileData ProfileData\n}\n\nfunc newTtsSynthesizeOutputFromCPtr(c *C.ml_TtsSynthesizeOutput) TtsSynthesizeOutput {\n\toutput := TtsSynthesizeOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\toutput.Result = newTTSResultFromCPtr(&c.result)\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\treturn output\n}\n\nfunc freeTtsSynthesizeOutput(ptr *C.ml_TtsSynthesizeOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tfreeTTSResult(&ptr.result)\n}\n\n// TtsListAvailableVoicesInput represents input for listing available voices\ntype TtsListAvailableVoicesInput struct {\n\tReserved any\n}\n\nfunc (tlavi TtsListAvailableVoicesInput) toCPtr() *C.ml_TtsListAvailableVoicesInput {\n\tcPtr := (*C.ml_TtsListAvailableVoicesInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_TtsListAvailableVoicesInput{}))))\n\t*cPtr = C.ml_TtsListAvailableVoicesInput{}\n\treturn cPtr\n}\n\nfunc freeTtsListAvailableVoicesInput(cPtr *C.ml_TtsListAvailableVoicesInput) {\n\tif cPtr != nil {\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// TtsListAvailableVoicesOutput represents output for listing available voices\ntype TtsListAvailableVoicesOutput struct {\n\tVoiceIDs []string\n}\n\nfunc newTtsListAvailableVoicesOutputFromCPtr(c *C.ml_TtsListAvailableVoicesOutput) TtsListAvailableVoicesOutput {\n\toutput := TtsListAvailableVoicesOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\toutput.VoiceIDs = cCharArrayToSlice(c.voice_ids, c.voice_count)\n\n\treturn output\n}\n\nfunc freeTtsListAvailableVoicesOutput(ptr *C.ml_TtsListAvailableVoicesOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.voice_ids != nil {\n\t\tmlFreeCCharArray(ptr.voice_ids, ptr.voice_count)\n\t}\n}\n\n// TTS represents a TTS instance\ntype TTS struct {\n\tptr *C.ml_TTS\n}\n\n// NewTTS creates a new TTS instance\nfunc NewTTS(input TtsCreateInput) (*TTS, error) {\n\tslog.Debug(\"NewTTS called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeTtsCreateInput(cInput)\n\n\tvar cHandle *C.ml_TTS\n\tres := C.ml_tts_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &TTS{ptr: cHandle}, nil\n}\n\n// Destroy destroys the TTS instance and frees associated resources\nfunc (t *TTS) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", t.ptr)\n\n\tif t.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_tts_destroy(t.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\tt.ptr = nil\n\treturn nil\n}\n\n// Synthesize synthesizes speech from text and saves to filesystem\nfunc (t *TTS) Synthesize(input TtsSynthesizeInput) (TtsSynthesizeOutput, error) {\n\tslog.Debug(\"Synthesize called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeTtsSynthesizeInput(cInput)\n\n\tvar cOutput C.ml_TtsSynthesizeOutput\n\tdefer freeTtsSynthesizeOutput(&cOutput)\n\n\tres := C.ml_tts_synthesize(t.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn TtsSynthesizeOutput{}, SDKError(res)\n\t}\n\n\toutput := newTtsSynthesizeOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n\n// ListAvailableVoices gets list of available voice identifiers\nfunc (t *TTS) ListAvailableVoices() (TtsListAvailableVoicesOutput, error) {\n\tslog.Debug(\"ListAvailableVoices called\")\n\n\tinput := TtsListAvailableVoicesInput{}\n\tcInput := input.toCPtr()\n\tdefer freeTtsListAvailableVoicesInput(cInput)\n\n\tvar cOutput C.ml_TtsListAvailableVoicesOutput\n\tdefer freeTtsListAvailableVoicesOutput(&cOutput)\n\n\tres := C.ml_tts_list_available_voices(t.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn TtsListAvailableVoicesOutput{}, SDKError(res)\n\t}\n\n\toutput := newTtsListAvailableVoicesOutputFromCPtr(&cOutput)\n\treturn output, nil\n}\n"
  },
  {
    "path": "runner/nexa-sdk/vlm.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage nexa_sdk\n\n/*\n#include <stdlib.h>\n#include \"ml.h\"\n\nextern bool go_generate_stream_on_token(char*, void*);\n*/\nimport \"C\"\nimport (\n\t\"log/slog\"\n\t\"unsafe\"\n)\n\n// VlmCreateInput represents input parameters for creating a VLM instance\ntype VlmCreateInput struct {\n\tModelName     string\n\tModelPath     string\n\tMmprojPath    string\n\tTokenizerPath string\n\tConfig        ModelConfig\n\tPluginID      string\n\tDeviceID      string\n}\n\nfunc (vci VlmCreateInput) toCPtr() *C.ml_VlmCreateInput {\n\tcPtr := (*C.ml_VlmCreateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_VlmCreateInput{}))))\n\t*cPtr = C.ml_VlmCreateInput{}\n\n\tif vci.ModelName != \"\" {\n\t\tcPtr.model_name = C.CString(vci.ModelName)\n\t}\n\tif vci.ModelPath != \"\" {\n\t\tcPtr.model_path = C.CString(vci.ModelPath)\n\t}\n\tif vci.MmprojPath != \"\" {\n\t\tcPtr.mmproj_path = C.CString(vci.MmprojPath)\n\t}\n\tif vci.TokenizerPath != \"\" {\n\t\tcPtr.tokenizer_path = C.CString(vci.TokenizerPath)\n\t}\n\tif vci.PluginID != \"\" {\n\t\tcPtr.plugin_id = C.CString(vci.PluginID)\n\t}\n\tif vci.DeviceID != \"\" {\n\t\tcPtr.device_id = C.CString(vci.DeviceID)\n\t}\n\n\t// Directly assign the ModelConfig to the C structure because it's not a pointer\n\tcPtr.config = C.ml_ModelConfig{\n\t\tn_ctx:           C.int32_t(vci.Config.NCtx),\n\t\tn_threads:       C.int32_t(vci.Config.NThreads),\n\t\tn_threads_batch: C.int32_t(vci.Config.NThreadsBatch),\n\t\tn_batch:         C.int32_t(vci.Config.NBatch),\n\t\tn_ubatch:        C.int32_t(vci.Config.NUbatch),\n\t\tn_seq_max:       C.int32_t(vci.Config.NSeqMax),\n\t\tn_gpu_layers:    C.int32_t(vci.Config.NGpuLayers),\n\t}\n\tif vci.Config.ChatTemplatePath != \"\" {\n\t\tcPtr.config.chat_template_path = C.CString(vci.Config.ChatTemplatePath)\n\t}\n\tif vci.Config.ChatTemplateContent != \"\" {\n\t\tcPtr.config.chat_template_content = C.CString(vci.Config.ChatTemplateContent)\n\t}\n\n\treturn cPtr\n}\n\nfunc freeVlmCreateInput(cPtr *C.ml_VlmCreateInput) {\n\tif cPtr != nil {\n\t\t// Free string fields\n\t\tif cPtr.model_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.model_path))\n\t\t}\n\t\tif cPtr.mmproj_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.mmproj_path))\n\t\t}\n\t\tif cPtr.tokenizer_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.tokenizer_path))\n\t\t}\n\t\tif cPtr.plugin_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.plugin_id))\n\t\t}\n\t\tif cPtr.device_id != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.device_id))\n\t\t}\n\n\t\t// Free nested ModelConfig string fields\n\t\tif cPtr.config.chat_template_path != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.config.chat_template_path))\n\t\t}\n\t\tif cPtr.config.chat_template_content != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.config.chat_template_content))\n\t\t}\n\n\t\t// Free the main structure\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\ntype VlmContentType string\n\nconst (\n\tVlmContentTypeText  VlmContentType = \"text\"\n\tVlmContentTypeImage VlmContentType = \"image\"\n\tVlmContentTypeAudio VlmContentType = \"audio\"\n)\n\n// VlmContent represents a content item in a VLM message\ntype VlmContent struct {\n\tType VlmContentType\n\tText string\n}\n\ntype vlmContents []VlmContent\n\nfunc (vcs vlmContents) toCPtr() (*C.ml_VlmContent, C.int32_t) {\n\tif len(vcs) == 0 {\n\t\treturn nil, 0\n\t}\n\n\tcount := len(vcs)\n\traw := C.malloc(C.size_t(count * C.sizeof_ml_VlmContent))\n\tcContents := unsafe.Slice((*C.ml_VlmContent)(raw), count)\n\n\tfor i, vc := range vcs {\n\t\t// Initialize all fields to prevent garbage memory\n\t\tcContents[i]._type = nil\n\t\tcContents[i].text = nil\n\n\t\tif vc.Type != \"\" {\n\t\t\tcContents[i]._type = C.CString(string(vc.Type))\n\t\t}\n\t\t// Always allocate text field, even for empty strings to prevent garbage memory\n\t\tcContents[i].text = C.CString(vc.Text)\n\t}\n\n\treturn (*C.ml_VlmContent)(raw), C.int32_t(count)\n}\n\nfunc freeVlmContents(cPtr *C.ml_VlmContent, count C.int64_t) {\n\tif cPtr == nil || count == 0 {\n\t\treturn\n\t}\n\n\tcContents := unsafe.Slice(cPtr, int(count))\n\tfor i := range count {\n\t\tif cContents[i]._type != nil {\n\t\t\tC.free(unsafe.Pointer(cContents[i]._type))\n\t\t}\n\t\tif cContents[i].text != nil {\n\t\t\tC.free(unsafe.Pointer(cContents[i].text))\n\t\t}\n\t}\n\n\tC.free(unsafe.Pointer(cPtr))\n}\n\ntype VlmRole string\n\nconst (\n\tVlmRoleUser      VlmRole = \"user\"\n\tVlmRoleAssistant VlmRole = \"assistant\"\n\tVlmRoleSystem    VlmRole = \"system\"\n)\n\n// VlmChatMessage represents a chat message in VLM\ntype VlmChatMessage struct {\n\tRole     VlmRole\n\tContents []VlmContent\n}\n\ntype vlmChatMessages []VlmChatMessage\n\nfunc (vcms vlmChatMessages) toCPtr() (*C.ml_VlmChatMessage, C.int32_t) {\n\tif len(vcms) == 0 {\n\t\treturn nil, 0\n\t}\n\n\tcount := len(vcms)\n\traw := C.malloc(C.size_t(count * C.sizeof_ml_VlmChatMessage))\n\tcMessages := unsafe.Slice((*C.ml_VlmChatMessage)(raw), count)\n\n\tfor i, vcm := range vcms {\n\t\tif vcm.Role != \"\" {\n\t\t\tcMessages[i].role = C.CString(string(vcm.Role))\n\t\t}\n\t\tif len(vcm.Contents) > 0 {\n\t\t\tcontents, contentCount := vlmContents(vcm.Contents).toCPtr()\n\t\t\tcMessages[i].contents = contents\n\t\t\tcMessages[i].content_count = C.int64_t(contentCount)\n\t\t}\n\t}\n\n\treturn (*C.ml_VlmChatMessage)(raw), C.int32_t(count)\n}\n\nfunc freeVlmChatMessages(cPtr *C.ml_VlmChatMessage, count C.int32_t) {\n\tif cPtr == nil || count == 0 {\n\t\treturn\n\t}\n\n\tcMessages := unsafe.Slice(cPtr, int(count))\n\tfor i := range count {\n\t\tif cMessages[i].role != nil {\n\t\t\tC.free(unsafe.Pointer(cMessages[i].role))\n\t\t}\n\t\tif cMessages[i].contents != nil {\n\t\t\tfreeVlmContents(cMessages[i].contents, cMessages[i].content_count)\n\t\t}\n\t}\n\n\tC.free(unsafe.Pointer(cPtr))\n}\n\n// VlmApplyChatTemplateInput represents input for applying VLM chat template\ntype VlmApplyChatTemplateInput struct {\n\tMessages    []VlmChatMessage\n\tTools       string\n\tEnableThink bool\n}\n\nfunc (vati VlmApplyChatTemplateInput) toCPtr() *C.ml_VlmApplyChatTemplateInput {\n\tcPtr := (*C.ml_VlmApplyChatTemplateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_VlmApplyChatTemplateInput{}))))\n\t*cPtr = C.ml_VlmApplyChatTemplateInput{}\n\n\tif len(vati.Messages) > 0 {\n\t\tcMessages, messageCount := vlmChatMessages(vati.Messages).toCPtr()\n\t\tcPtr.messages = cMessages\n\t\tcPtr.message_count = C.int32_t(messageCount)\n\t}\n\n\tif vati.Tools != \"\" {\n\t\tcPtr.tools = C.CString(vati.Tools)\n\t}\n\n\tcPtr.enable_thinking = C.bool(vati.EnableThink)\n\n\treturn cPtr\n}\n\nfunc freeVlmApplyChatTemplateInput(cPtr *C.ml_VlmApplyChatTemplateInput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\n\tfreeVlmChatMessages(cPtr.messages, cPtr.message_count)\n\tif cPtr.tools != nil {\n\t\tC.free(unsafe.Pointer(cPtr.tools))\n\t}\n\tC.free(unsafe.Pointer(cPtr))\n}\n\n// VlmApplyChatTemplateOutput represents output from applying VLM chat template\ntype VlmApplyChatTemplateOutput struct {\n\tFormattedText string\n}\n\nfunc newVlmApplyChatTemplateOutputFromCPtr(c *C.ml_VlmApplyChatTemplateOutput) VlmApplyChatTemplateOutput {\n\toutput := VlmApplyChatTemplateOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\tif c.formatted_text != nil {\n\t\toutput.FormattedText = C.GoString(c.formatted_text)\n\t}\n\n\treturn output\n}\n\nfunc freeVlmApplyChatTemplateOutput(cPtr *C.ml_VlmApplyChatTemplateOutput) {\n\tif cPtr == nil {\n\t\treturn\n\t}\n\tif cPtr.formatted_text != nil {\n\t\tmlFree(unsafe.Pointer(cPtr.formatted_text))\n\t}\n}\n\n// VlmGenerateInput represents input for VLM text generation\ntype VlmGenerateInput struct {\n\tPromptUTF8 string\n\tConfig     *GenerationConfig\n\tOnToken    OnTokenCallback\n}\n\nfunc (vgi VlmGenerateInput) toCPtr() *C.ml_VlmGenerateInput {\n\tcPtr := (*C.ml_VlmGenerateInput)(C.malloc(C.size_t(unsafe.Sizeof(C.ml_VlmGenerateInput{}))))\n\t*cPtr = C.ml_VlmGenerateInput{}\n\n\tcPtr.prompt_utf8 = C.CString(vgi.PromptUTF8)\n\tif vgi.Config != nil {\n\t\tcPtr.config = vgi.Config.toCPtr()\n\t} else {\n\t\tcPtr.config = nil\n\t}\n\n\t// Note: on_token and user_data should be set by the caller\n\tcPtr.on_token = nil\n\tcPtr.user_data = nil\n\n\treturn cPtr\n}\n\nfunc freeVlmGenerateInput(cPtr *C.ml_VlmGenerateInput) {\n\tif cPtr != nil {\n\t\tif cPtr.prompt_utf8 != nil {\n\t\t\tC.free(unsafe.Pointer(cPtr.prompt_utf8))\n\t\t}\n\n\t\tif cPtr.config != nil {\n\t\t\tfreeGenerationConfig(cPtr.config)\n\t\t}\n\n\t\tC.free(unsafe.Pointer(cPtr))\n\t}\n}\n\n// VlmGenerateOutput represents output from VLM text generation\ntype VlmGenerateOutput struct {\n\tFullText    string\n\tProfileData ProfileData\n}\n\nfunc newVlmGenerateOutputFromCPtr(c *C.ml_VlmGenerateOutput) VlmGenerateOutput {\n\toutput := VlmGenerateOutput{}\n\n\tif c == nil {\n\t\treturn output\n\t}\n\n\tif c.full_text != nil {\n\t\toutput.FullText = C.GoString(c.full_text)\n\t}\n\toutput.ProfileData = newProfileDataFromCPtr(c.profile_data)\n\treturn output\n}\n\nfunc freeVlmGenerateOutput(ptr *C.ml_VlmGenerateOutput) {\n\tif ptr == nil {\n\t\treturn\n\t}\n\tif ptr.full_text != nil {\n\t\tmlFree(unsafe.Pointer(ptr.full_text))\n\t}\n}\n\n// VLM represents a VLM instance\ntype VLM struct {\n\tptr *C.ml_VLM\n}\n\n// NewVLM creates a new VLM instance\nfunc NewVLM(input VlmCreateInput) (*VLM, error) {\n\tslog.Debug(\"NewVLM called\", \"input\", input)\n\n\tcInput := input.toCPtr()\n\tdefer freeVlmCreateInput(cInput)\n\n\tvar cHandle *C.ml_VLM\n\tres := C.ml_vlm_create(cInput, &cHandle)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\treturn &VLM{ptr: cHandle}, nil\n}\n\n// Destroy destroys the VLM instance and frees associated resources\nfunc (v *VLM) Destroy() error {\n\tslog.Debug(\"Destroy called\", \"ptr\", v.ptr)\n\n\tif v.ptr == nil {\n\t\treturn nil\n\t}\n\n\tres := C.ml_vlm_destroy(v.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\tv.ptr = nil\n\treturn nil\n}\n\n// Reset resets the VLM internal state (clear KV cache, reset sampling)\nfunc (v *VLM) Reset() error {\n\tslog.Debug(\"Reset called\", \"ptr\", v.ptr)\n\n\tif v.ptr == nil {\n\t\treturn SDKError(C.ML_ERROR_COMMON_INVALID_INPUT)\n\t}\n\n\tres := C.ml_vlm_reset(v.ptr)\n\tif res < 0 {\n\t\treturn SDKError(res)\n\t}\n\treturn nil\n}\n\n// ApplyChatTemplate applies chat template to messages\nfunc (v *VLM) ApplyChatTemplate(input VlmApplyChatTemplateInput) (*VlmApplyChatTemplateOutput, error) {\n\tslog.Debug(\"ApplyChatTemplate called\", \"input\", input)\n\n\tcinput := input.toCPtr()\n\tdefer freeVlmApplyChatTemplateInput(cinput)\n\n\tvar cOutput C.ml_VlmApplyChatTemplateOutput\n\tdefer freeVlmApplyChatTemplateOutput(&cOutput)\n\n\tres := C.ml_vlm_apply_chat_template(v.ptr, cinput, &cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newVlmApplyChatTemplateOutputFromCPtr(&cOutput)\n\n\treturn &output, nil\n}\n\n// Generate generates text with streaming token callback\nfunc (v *VLM) Generate(input VlmGenerateInput) (*VlmGenerateOutput, error) {\n\tslog.Debug(\"Generate called\", \"input\", input, \"config\", input.Config, \"sampler\", input.Config.SamplerConfig)\n\n\tcInput := input.toCPtr()\n\tdefer freeVlmGenerateInput(cInput)\n\n\t// set the callback\n\tonToken = input.OnToken\n\tdefer func() {\n\t\tonToken = nil // reset to default\n\t}()\n\tcInput.on_token = C.ml_token_callback(C.go_generate_stream_on_token)\n\n\tvar cOutput C.ml_VlmGenerateOutput\n\tdefer freeVlmGenerateOutput(&cOutput)\n\n\tres := C.ml_vlm_generate(v.ptr, cInput, &cOutput)\n\tif res < 0 {\n\t\treturn nil, SDKError(res)\n\t}\n\n\toutput := newVlmGenerateOutputFromCPtr(&cOutput)\n\n\treturn &output, nil\n}\n"
  },
  {
    "path": "runner/release/darwin/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>CFBundleName</key>\n    <string>NexaCLI</string>\n    <key>CFBundleDisplayName</key>\n    <string>Nexa CLI</string>\n    <key>CFBundleIdentifier</key>\n    <string>com.nexaai.nexa-sdk</string>\n    <key>CFBundleVersion</key>\n    <string>${VERSION}</string>\n    <key>CFBundlePackageType</key>\n    <string>APPL</string>\n    <key>CFBundleExecutable</key>\n    <string>launcher</string>\n    <key>NSAppleScriptEnabled</key>\n    <true/>\n    <key>CFBundleIconFile</key>\n    <string>nexa-icon</string>\n</dict>\n</plist>"
  },
  {
    "path": "runner/release/darwin/entitlements.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>com.apple.security.cs.disable-library-validation</key>\n    <true/>\n    <key>com.apple.security.cs.allow-jit</key>\n    <true/>\n\n    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>\n    <true/>\n\n    <key>com.apple.security.cs.allow-dyld-environment-variables</key>\n    <true/>\n\n    <key>com.apple.security.cs.allow-executable-page-write</key>\n    <true/>\n</dict>\n</plist>"
  },
  {
    "path": "runner/release/darwin/scripts/notarize.sh",
    "content": "#!/bin/bash\n# Copyright 2024-2026 Nexa AI, Inc.\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\nset -e\n\nPKG_PATH=\"$1\"\nAPPLE_ID=\"$2\"\nAPPLE_PASSWORD=\"$3\"\nTEAM_ID=\"$4\"\n\nif [ -z \"$PKG_PATH\" ] || [ -z \"$APPLE_ID\" ] || [ -z \"$APPLE_PASSWORD\" ] || [ -z \"$TEAM_ID\" ]; then\n  echo \"Usage: $0 <pkg_path> <apple_id> <app_specific_password> <team_id>\"\n  exit 1\nfi\n\necho \"--- Starting notarization for ${PKG_PATH} ---\"\n\nNOTARIZATION_OUTPUT=$(xcrun notarytool submit \"$PKG_PATH\" --apple-id \"$APPLE_ID\" --password \"$APPLE_PASSWORD\" --team-id \"$TEAM_ID\" --wait)\necho \"$NOTARIZATION_OUTPUT\"\n\nSUBMISSION_ID=$(echo \"$NOTARIZATION_OUTPUT\" | grep -oE 'id: [0-9a-f-]+' | head -n 1 | awk '{print $2}')\n\nif [ -z \"$SUBMISSION_ID\" ]; then\n  echo \"::error::Failed to extract submission ID. Notarization failed.\"\n  exit 1\nfi\n\nNOTARIZATION_INFO=$(xcrun notarytool info \"$SUBMISSION_ID\" --apple-id \"$APPLE_ID\" --password \"$APPLE_PASSWORD\" --team-id \"$TEAM_ID\")\nSTATUS=$(echo \"$NOTARIZATION_INFO\" | grep \"status:\" | awk '{print $2}')\necho \"Final notarization status: $STATUS\"\n\nif [ \"$STATUS\" != \"Accepted\" ]; then\n  echo \"::error::Notarization was not successful. Fetching log...\"\n  xcrun notarytool log \"$SUBMISSION_ID\" --apple-id \"$APPLE_ID\" --password \"$APPLE_PASSWORD\" --team-id \"$TEAM_ID\"\n  exit 1\nfi\n\necho \"Stapling notarization ticket...\"\nxcrun stapler staple \"$PKG_PATH\"\n\necho \"--- Notarization and stapling complete ---\""
  },
  {
    "path": "runner/release/darwin/scripts/postinstall",
    "content": "#!/bin/sh\n\necho \"Creating symbolic links for Nexa CLI...\"\n\nAPP_PATH=\"/Applications/NexaCLI.app\"\nBIN_DIR=\"/usr/local/bin\"\n\nif [ ! -d \"$BIN_DIR\" ]; then\n    mkdir -p \"$BIN_DIR\"\n    chown root:wheel \"$BIN_DIR\"\n    chmod 755 \"$BIN_DIR\"\nfi\n\nln -sf \"${APP_PATH}/Contents/Resources/nexa\" \"${BIN_DIR}/nexa\"\n\nexit 0"
  },
  {
    "path": "runner/release/darwin/scripts/preinstall",
    "content": "#!/bin/sh\n\necho \"Pre-installation script for Nexa CLI...\"\n\n# echo \"Cleaning up previous package receipt to ensure a clean install...\"\n# pkgutil --forget \"com.nexaai.nexa-sdk\" >/dev/null 2>&1 || true\n\necho \"Stopping any running nexa processes...\"\npkill -f \"/Applications/Nexa.*CLI.app\" >/dev/null 2>&1 || true\n\nsleep 1\n\necho \"Removing previous installation files...\"\nrm -rf \"/Applications/Nexa CLI.app\"\nrm -rf \"/Applications/NexaCLI.app\"\n\necho \"Pre-installation cleanup completed successfully.\"\nexit 0"
  },
  {
    "path": "runner/release/darwin/scripts/prepackage.sh",
    "content": "#!/bin/bash\n# Copyright 2024-2026 Nexa AI, Inc.\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\nset -e\n\nVERSION=\"$1\"\nif [ -z \"$VERSION\" ]; then\n  echo \"Usage: $0 <version>\"\n  exit 1\nfi\n\necho \"--- Preparing file structure for version ${VERSION} ---\"\n\nAPP_BASE=\"staging/Applications\"\nAPP_NAME=\"NexaCLI\"\nAPP_PATH=\"${APP_BASE}/${APP_NAME}.app\"\n\necho \"Creating directories...\"\nmkdir -p \"${APP_PATH}/Contents/MacOS\"\nmkdir -p \"${APP_PATH}/Contents/Resources\"\n\necho \"Moving build artifacts...\"\nmv artifacts/* \"${APP_PATH}/Contents/Resources/\"\n\necho \"Copying support files...\"\ncp runner/release/darwin/scripts/uninstall.sh \"${APP_PATH}/Contents/Resources/\"\nchmod +x \"${APP_PATH}/Contents/Resources/uninstall.sh\"\ncp runner/release/darwin/nexa-icon.icns \"${APP_PATH}/Contents/Resources/\"\n\necho \"Creating Info.plist...\"\nsed \"s/\\${VERSION}/${VERSION}/g\" runner/release/darwin/Info.plist > \"${APP_PATH}/Contents/Info.plist\"\n\necho \"Creating launcher script...\"\ncat << EOF > \"${APP_PATH}/Contents/MacOS/launcher\"\n#!/usr/bin/osascript\ntell application \"Terminal\"\n    activate\n    do script \"nexa\"\nend tell\nEOF\n\necho \"Setting permissions...\"\nchmod +x \"${APP_PATH}/Contents/MacOS/launcher\"\nchmod +x \"${APP_PATH}/Contents/Resources/nexa\"\nchmod +x \"${APP_PATH}/Contents/Resources/nexa-cli\"\n\nif [ -d \"${APP_PATH}/Contents/Resources/common/python_runtime/bin\" ]; then\n  chmod -R +x \"${APP_PATH}/Contents/Resources/common/python_runtime/bin\"\nfi\n# Remove joblib test data files to avoid notarization warnings\nrm -rf \"${APP_PATH}/Contents/Resources/common/python_runtime/lib/python3.10/site-packages/joblib/test/data\"\n\necho \"Preparing PKG scripts...\"\nmkdir -p \"pkg_scripts\"\ncp runner/release/darwin/scripts/preinstall pkg_scripts/\nchmod +x pkg_scripts/preinstall\ncp runner/release/darwin/scripts/postinstall pkg_scripts/\nchmod +x pkg_scripts/postinstall\n\necho \"--- File preparation complete ---\"\n\necho \"STAGING_DIR=staging\" >> $GITHUB_OUTPUT\necho \"SCRIPTS_DIR=pkg_scripts\" >> $GITHUB_OUTPUT\necho \"APP_PATH=${APP_PATH}\" >> $GITHUB_ENV\n"
  },
  {
    "path": "runner/release/darwin/scripts/sign.sh",
    "content": "#!/bin/bash\n# Copyright 2024-2026 Nexa AI, Inc.\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\nset -e\n\nAPP_PATH=\"$1\"\nSIGNING_IDENTITY=\"$2\"\n\nif [ -z \"$APP_PATH\" ] || [ -z \"$SIGNING_IDENTITY\" ]; then\n  echo \"Usage: $0 <app_path> <signing_identity>\"\n  exit 1\nfi\n\necho \"--- Signing binaries and libraries in ${APP_PATH} ---\"\n\nRESOURCES_PATH=\"${APP_PATH}/Contents/Resources\"\n\necho \"Signing dylibs and executables...\"\nfind \"$RESOURCES_PATH\" -type f \\( -name \"*.dylib\" -o -name \"*.so\" \\) -exec codesign --force --options runtime --timestamp --verify -s \"$SIGNING_IDENTITY\" {} \\;\n\nif [ -d \"$RESOURCES_PATH/common/python_runtime/bin\" ]; then\n  find \"$RESOURCES_PATH/common/python_runtime/bin\" -type f -name \"python*\" -exec codesign --force --options runtime --timestamp --verify -s \"$SIGNING_IDENTITY\" --entitlements runner/release/darwin/entitlements.plist {} \\;\n\nfi\n\nif [ -d \"$RESOURCES_PATH/common/python_runtime/lib/python3.10/site-packages/torch/bin\" ]; then\n  find \"$RESOURCES_PATH/common/python_runtime/lib/python3.10/site-packages/torch/bin\" -type f -exec codesign --force --options runtime --timestamp --verify -s \"$SIGNING_IDENTITY\" --entitlements runner/release/darwin/entitlements.plist {} \\;\nfi\n\nfind \"$RESOURCES_PATH\" -type f -name \"nexa*\" -maxdepth 1 -exec codesign --force --options runtime --timestamp --verify -s \"$SIGNING_IDENTITY\" --entitlements runner/release/darwin/entitlements.plist {} \\;\ncodesign --force --options runtime --timestamp --verify -s \"$SIGNING_IDENTITY\" --entitlements runner/release/darwin/entitlements.plist \"${APP_PATH}/Contents/MacOS/launcher\"\n\necho \"Signing main app bundle...\"\ncodesign --force --options runtime --timestamp --verify -s \"$SIGNING_IDENTITY\" --entitlements runner/release/darwin/entitlements.plist \"$APP_PATH\"\n\necho \"Verifying signatures...\"\ncodesign --verify --deep --strict --verbose=4 \"$APP_PATH\"\n\necho \"--- Signing complete ---\"\n"
  },
  {
    "path": "runner/release/darwin/scripts/uninstall.sh",
    "content": "#!/bin/bash\n# Copyright 2024-2026 Nexa AI, Inc.\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\necho \"Uninstalling Nexa SDK...\"\n\nif [ \"$(id -u)\" != \"0\" ]; then\n    echo \"This script requires superuser privileges. Please run with sudo.\"\n    exit 1\nfi\n\n# Force kill if still running\npkill -9 -f \"nexa\" 2>/dev/null || true\npkill -9 -f \"nexa-cli\" 2>/dev/null || true\n\necho \"Removing symbolic links...\"\nrm -f /usr/local/bin/nexa\n\necho \"Removing launcher applications...\"\nrm -rf \"/Applications/Nexa CLI.app\"\nrm -rf \"/Applications/NexaCLI.app\"\n\npkgutil --forget com.nexaai.nexa-sdk > /dev/null 2>&1 || true\n\necho \"Nexa SDK has been successfully uninstalled.\"\n\nexit 0"
  },
  {
    "path": "runner/release/linux/Dockerfile",
    "content": "# Multi-architecture Linux Docker image for Nexa SDK\n# Supports both amd64 and arm64 platforms\n# Usage: docker run --rm -it -v /path/to/data:/root/.cache/nexa.ai nexa4ai/nexasdk:latest\n\nARG BASE_IMAGE=ubuntu:22.04\n\nFROM ${BASE_IMAGE}\n\nLABEL org.opencontainers.image.title=\"Nexa SDK\"\nLABEL org.opencontainers.image.description=\"Nexa SDK CLI for running multi models\"\nLABEL org.opencontainers.image.vendor=\"NexaAI\"\n\nRUN DEBIAN_FRONTEND=noninteractive \\\n    apt-get update \\\n    && apt-get install -y libgomp1 curl ffmpeg sox \\\n    && rm -rf /var/lib/apt/lists/*\n\nARG TARGETARCH\nCOPY nexa_sdk.$TARGETARCH/ /opt/nexa_sdk/\nRUN ln -s /opt/nexa_sdk/nexa /usr/local/bin/nexa\n\nRUN mkdir -p /data && mkdir -p /root/.cache && ln -s /data /root/.cache/nexa.ai && ln -s /data /root/.nexa\n\nEXPOSE 18181\nENTRYPOINT [\"nexa\"]\n"
  },
  {
    "path": "runner/release/linux/install.sh",
    "content": "#!/bin/bash\n# Copyright 2024-2026 Nexa AI, Inc.\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#\n# Self-contained installer for the Nexa SDK on Linux.\n# This script includes an embedded binary payload.\n#\n# Usage:\n#   chmod +x ./install.sh\n#   sudo ./install.sh              # Full installation\n#   ./install.sh --extract-only     # Extract only (no installation)\n\nset -eu\n\n# --- Shell UI Helper Functions ---\nred=\"$( (tput bold 2>/dev/null || :) && (tput setaf 1 2>/dev/null || :) )\"\nplain=\"$( tput sgr0 2>/dev/null || : )\"\n\nstatus() { echo \">>> $*\" >&2; }\nerror() { echo \"${red}ERROR:${plain} $*\" >&2; exit 1; }\nwarning() { echo \"${red}WARNING:${plain} $*\" >&2; }\n\n# --- Cleanup handler ---\n# Ensures temporary files are removed on exit\nTEMP_DIR=$(mktemp -d)\ncleanup() {\n    rm -rf \"$TEMP_DIR\"\n}\ntrap cleanup EXIT\n\n# --- Global Variables ---\nSUDO=\"\"\nNEXA_INSTALL_DIR=\"/opt/nexa_sdk\"\nBINDIR=\"/usr/local/bin\"\nEXTRACT_ONLY=false\n\n# --- Prerequisite and Environment Checks ---\n\n# Checks if a command is available on the system\navailable() {\n    command -v \"$1\" >/dev/null 2>&1\n}\n\n# Checks for a list of required tools and reports missing ones\nrequire_tools() {\n    local missing_tools=\"\"\n    for tool in \"$@\"; do\n        if ! available \"$tool\"; then\n            missing_tools=\"${missing_tools} ${tool}\"\n        fi\n    done\n    echo \"$missing_tools\"\n}\n\n\n# Sets up the SUDO variable if not running as root\nsetup_sudo() {\n    if [ \"$(id -u)\" -ne 0 ]; then\n        if ! available sudo; then\n            error \"This script requires superuser permissions, but 'sudo' is not available. Please re-run as root.\"\n        fi\n        SUDO=\"sudo\"\n        status \"Using 'sudo' for privileged operations.\"\n    fi\n}\n\n# Validates all system requirements before proceeding\nvalidate_requirements() {\n    local needs\n    needs=$(require_tools tar cat awk)\n    if [ -n \"$needs\" ]; then\n        error \"The following required tools are missing:$needs\"\n    fi\n    status \"All required tools are available.\"\n}\n\n# --- Core Installation Logic ---\n\n# Extract-only function\nextract_only() {\n    local target_dir=\"./nexa_sdk\"\n\n    status \"Starting Nexa SDK extraction...\"\n\n    # --- 1. Locate and extract the embedded payload ---\n    local payload_line\n    payload_line=$(awk '/^__PAYLOAD_BELOW__/ {print NR + 1}' \"$0\")\n    if [ -z \"$payload_line\" ]; then\n        error \"Could not find payload in the script. The installer appears to be corrupted.\"\n    fi\n\n    status \"Creating extraction directory: $target_dir\"\n    mkdir -p \"$target_dir\"\n\n    status \"Extracting embedded payload to $target_dir...\"\n    tail -n \"+$payload_line\" \"$0\" | tar -xzf - -C \"$target_dir\"\n    if [ $? -ne 0 ]; then\n        error \"Failed to extract payload. The installer might be corrupted or incomplete.\"\n    fi\n\n    # Make binaries executable\n    chmod +x \"$target_dir/nexa\" \"$target_dir/nexa-cli\" 2>/dev/null || true\n\n    # Get absolute path for display\n    local abs_dir\n    abs_dir=$(cd \"$target_dir\" && pwd)\n\n    status \"${plain}Extraction complete! Files extracted to: $abs_dir\"\n    echo \"\"\n    status \"To use the extracted binaries, add the following to your PATH:\"\n    echo \"  export PATH=\\\"$abs_dir:\\$PATH\\\"\"\n    echo \"\"\n    status \"Or add it permanently to your shell profile (~/.bashrc, ~/.zshrc, etc.):\"\n    echo \"  echo 'export PATH=\\\"$abs_dir:\\$PATH\\\"' >> ~/.bashrc\"\n    echo \"\"\n    status \"Then you can use 'nexa' commands directly.\"\n}\n\n# Main installation function\ninstall_nexa_sdk() {\n    status \"Starting Nexa SDK installation...\"\n\n    # --- 1. Locate and extract the embedded payload ---\n    local payload_line\n    payload_line=$(awk '/^__PAYLOAD_BELOW__/ {print NR + 1}' \"$0\")\n    if [ -z \"$payload_line\" ]; then\n        error \"Could not find payload in the script. The installer appears to be corrupted.\"\n    fi\n\n    local temp_extract_dir\n    temp_extract_dir=$(mktemp -d)\n\n    status \"Extracting embedded payload to a temporary directory...\"\n    tail -n \"+$payload_line\" \"$0\" | tar -xzf - -C \"$temp_extract_dir\"\n    if [ $? -ne 0 ]; then\n        rm -rf \"$temp_extract_dir\"\n        error \"Failed to extract payload. The installer might be corrupted or incomplete.\"\n    fi\n\n    # --- 2. Clean up previous installations ---\n    if [ -d \"$NEXA_INSTALL_DIR\" ]; then\n        status \"Removing existing installation at $NEXA_INSTALL_DIR\"\n        $SUDO rm -rf \"$NEXA_INSTALL_DIR\"\n    fi\n\n    # --- 3. Install new files ---\n    status \"Creating installation directory: $NEXA_INSTALL_DIR\"\n    $SUDO install -o root -g root -m 755 -d \"$NEXA_INSTALL_DIR\"\n\n    status \"Installing Nexa SDK files...\"\n    $SUDO mv \"$temp_extract_dir\"/* \"$NEXA_INSTALL_DIR/\"\n    $SUDO chmod a+x \"$NEXA_INSTALL_DIR/nexa\" \"$NEXA_INSTALL_DIR/nexa-cli\"\n\n    # --- 4. Create symbolic links ---\n    status \"Creating symbolic links in $BINDIR...\"\n    $SUDO mkdir -p \"$BINDIR\"\n    $SUDO ln -sf \"$NEXA_INSTALL_DIR/nexa\" \"$BINDIR/nexa\"\n\n    # --- 5. Clean up ---\n    rm -rf \"$temp_extract_dir\"\n    status \"Nexa SDK files installed successfully.\"\n}\n\n\n# Parse command line arguments\nparse_args() {\n    while [ $# -gt 0 ]; do\n        case \"$1\" in\n            --extract-only)\n                EXTRACT_ONLY=true\n                shift\n                ;;\n            -h|--help)\n                echo \"Usage: $0 [OPTIONS]\"\n                echo \"\"\n                echo \"Options:\"\n                echo \"  --extract-only    Extract files only, do not install (extracts to ./nexa_sdk)\"\n                echo \"  -h, --help        Show this help message\"\n                echo \"\"\n                echo \"Examples:\"\n                echo \"  sudo $0              # Full installation to /opt/nexa_sdk\"\n                echo \"  $0 --extract-only     # Extract to ./nexa_sdk\"\n                exit 0\n                ;;\n            *)\n                error \"Unknown option: $1. Use -h or --help for usage information.\"\n                ;;\n        esac\n    done\n}\n\n# Main function to orchestrate the installation\nmain() {\n    if [ \"$(uname -s)\" != \"Linux\" ]; then\n        error \"This script is intended to run on Linux only.\"\n    fi\n\n    parse_args \"$@\"\n\n    if [ \"$EXTRACT_ONLY\" = true ]; then\n        validate_requirements\n        extract_only\n    else\n        status \"Starting Nexa SDK installer...\"\n\n        setup_sudo\n        validate_requirements\n\n        install_nexa_sdk\n\n        status \"${plain}Install complete! The Nexa SDK is now installed.\"\n        status \"You can use the 'nexa' commands from your terminal.\"\n    fi\n\n    # warning for missing libgomp1\n    warning \"libgomp1 is required for Nexa SDK to function properly. make sure it is installed on your system.\"\n    warning \"You can install it using your package manager, e.g., 'sudo apt-get install libgomp1' on Debian-based systems.\"\n}\n\n# Run the main function with all arguments passed to the script\nmain \"$@\"\n\n# --- IMPORTANT ---\n# The script MUST exit before the payload marker.\n# The CI/CD process will append the base64 encoded payload below this line.\nexit 0\n__PAYLOAD_BELOW__\n"
  },
  {
    "path": "runner/release/linux/package.sh",
    "content": "#!/bin/bash\n# Copyright 2024-2026 Nexa AI, Inc.\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#\n# This script creates a self-contained installer for a given platform.\n# It takes a directory of build artifacts, creates a compressed payload,\n# and embeds it into an installer script template.\n#\n# Usage:\n#   ./package.sh <source_dir> <template_path> <output_name>\n\nset -eu\n\n# --- 1. Argument validation ---\nSOURCE_DIR=\"$1\"\nTEMPLATE_PATH=\"$2\"\nOUTPUT_NAME=\"$3\"\n\nif [ -z \"$SOURCE_DIR\" ] || [ -z \"$TEMPLATE_PATH\" ] || [ -z \"$OUTPUT_NAME\" ]; then\n    echo \"Error: Missing arguments.\" >&2\n    echo \"Usage: $0 <source_dir> <template_path> <output_name>\" >&2\n    exit 1\nfi\n\nif [ ! -d \"$SOURCE_DIR\" ]; then\n    echo \"Error: Source directory '$SOURCE_DIR' not found.\" >&2\n    exit 1\nfi\n\nif [ ! -f \"$TEMPLATE_PATH\" ]; then\n    echo \"Error: Installer template '$TEMPLATE_PATH' not found.\" >&2\n    exit 1\nfi\n\n# Create a temporary file for the payload\nPAYLOAD_FILE=$(mktemp)\n# Ensure the temporary payload is cleaned up on exit\ntrap 'rm -f \"$PAYLOAD_FILE\"' EXIT\n\necho \"--- Creating Self-Contained Installer ---\"\necho \"Source:      $SOURCE_DIR\"\necho \"Template:    $TEMPLATE_PATH\"\necho \"Output:      $OUTPUT_NAME\"\n\n# --- 2. Create the compressed payload ---\necho \"Step 1: Creating compressed payload from source directory...\"\n# -C changes directory to SOURCE_DIR before archiving, so the paths in the archive are relative\ntar -czf \"$PAYLOAD_FILE\" -C \"$SOURCE_DIR\" .\nif [ $? -ne 0 ]; then\n    echo \"Error: Failed to create tarball from '$SOURCE_DIR'.\" >&2\n    exit 1\nfi\necho \"Payload created successfully.\"\n\n# --- 3. Generate the final installer script ---\necho \"Step 2: Generating final installer script...\"\n# Copy the template to the final output file\ncp \"$TEMPLATE_PATH\" \"$OUTPUT_NAME\"\n# Make the output script executable\nchmod +x \"$OUTPUT_NAME\"\necho \"Template copied and made executable.\"\n\n# --- 4. Embed the payload ---\necho \"Step 3: Encoding and embedding payload...\"\n# Append the base64 encoded payload to the end of the script\ncat \"$PAYLOAD_FILE\" >> \"$OUTPUT_NAME\"\nif [ $? -ne 0 ]; then\n    echo \"Error: Failed to embed payload into '$OUTPUT_NAME'.\" >&2\n    exit 1\nfi\necho \"Payload embedded successfully.\"\n\n# The temporary payload file will be removed by the trap\necho \"----------------------------------------\"\necho \"Installer script '$OUTPUT_NAME' created successfully!\"\necho \"----------------------------------------\""
  },
  {
    "path": "runner/release/windows/nexa_installer.iss",
    "content": "#define MyAppName \"Nexa CLI\"\n#define MyAppVersion GetEnv('VERSION')\n#define MyAppArch GetEnv('ARCH')\n#define MyAppORT GetEnv('ORT')\n#define MyAppPublisher \"Nexa AI\"\n#define MyAppExeName \"nexa.exe\"\n#define MyAppServiceName \"NexaService\"\n#define MyAppLauncherName \"nexa-cli-launcher.exe\"\n\n[Setup]\nAppId={{e9b30237-d65d-4a79-a7c0-f4e217e78f54}}\nAppName={#MyAppName}\nAppVersion={#MyAppVersion}\nAppPublisher={#MyAppPublisher}\nDefaultDirName={localappdata}\\{#MyAppName}\nDefaultGroupName={#MyAppName}\nOutputDir=..\\..\\..\\\nOutputBaseFilename=nexa-cli_windows_{#MyAppArch}{#MyAppORT}\nCompression=lzma\nSolidCompression=yes\nWizardStyle=modern\nChangesEnvironment=yes\nSetupIconFile=nexa_logo.ico\nPrivilegesRequired=lowest\nUninstallDisplayName={#MyAppName}\nUninstallDisplayIcon={app}\\{#MyAppLauncherName}\nArchitecturesAllowed=x64compatible\nArchitecturesInstallIn64BitMode=x64compatible\n\n[Files]\n; Main executables\nSource: \"..\\..\\..\\artifacts{#MyAppORT}\\*\"; DestDir: \"{app}\"; Flags: ignoreversion recursesubdirs createallsubdirs\n\n[Registry]\n; Launcher registration (primary application)\nRoot: HKCU; Subkey: \"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\{#MyAppLauncherName}\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}\\{#MyAppLauncherName}\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\{#MyAppLauncherName}\"; ValueType: string; ValueName: \"Path\"; ValueData: \"{app}\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Classes\\Applications\\{#MyAppLauncherName}\"; ValueType: string; ValueName: \"FriendlyAppName\"; ValueData: \"{#MyAppName}\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Classes\\Applications\\{#MyAppLauncherName}\\DefaultIcon\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}\\{#MyAppLauncherName}\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Classes\\Applications\\{#MyAppLauncherName}\\Shell\\Open\\Command\"; ValueType: string; ValueName: \"\"; ValueData: \"\"\"{app}\\{#MyAppLauncherName}\"\" \"\"%1\"\"\"; Flags: uninsdeletekey\n\n; CLI executable registration (secondary)\nRoot: HKCU; Subkey: \"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\{#MyAppExeName}\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}\\{#MyAppExeName}\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\{#MyAppExeName}\"; ValueType: string; ValueName: \"Path\"; ValueData: \"{app}\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Classes\\Applications\\{#MyAppExeName}\"; ValueType: string; ValueName: \"FriendlyAppName\"; ValueData: \"{#MyAppName} CLI\"; Flags: uninsdeletekey\nRoot: HKCU; Subkey: \"SOFTWARE\\Classes\\Applications\\{#MyAppExeName}\\DefaultIcon\"; ValueType: string; ValueName: \"\"; ValueData: \"{app}\\{#MyAppExeName}\"; Flags: uninsdeletekey\n\n[Code]\nconst\n  EnvironmentKey = 'Environment';\n\nvar\n  VersionPage: TInputOptionWizardPage;\n\nfunction InitializeSetup(): Boolean;\nvar\n  UninstallString: String;\n  ResultCode: Integer;\nbegin\n  Result := True;\n\n  UninstallString := '';\n  RegQueryStringValue(HKCU, ExpandConstant('Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{#emit SetupSetting(\"AppId\")}_is1'), 'UninstallString', UninstallString);\n\n  if UninstallString <> '' then\n  begin\n    if MsgBox('Existing version detected.'#13#10 +\n               'Please uninstall the existing version first.'#13#10#13#10 +\n               'Uninstall now?', mbConfirmation, MB_YESNO) = IDYES then\n    begin\n      if not Exec(RemoveQuotes(UninstallString), '/SILENT', '', SW_HIDE, ewWaitUntilTerminated, ResultCode) then\n      begin\n        MsgBox('Uninstall failed. Please try again later.', mbError, MB_OK);\n        Result := False;\n      end\n      else if ResultCode <> 0 then\n      begin\n        MsgBox(Format('Uninstall failed (ErrCode: %d).', [ResultCode]), mbError, MB_OK);\n        Result := False;\n      end\n      else\n      begin\n        MsgBox('Uninstall successful', mbInformation, MB_OK);\n      end;\n    end\n    else\n    begin\n      MsgBox('Installation aborted.', mbInformation, MB_OK);\n      Result := False;\n    end;\n  end;\nend;\n\nprocedure InitializeWizard;\nbegin\nend;\n\nprocedure EnvAddPath(Path: string);\nvar\n    Paths: string;\nbegin\n    if not RegQueryStringValue(HKCU, EnvironmentKey, 'Path', Paths)\n    then Paths := '';\n\n    if Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(Paths) + ';') > 0 then exit;\n\n    Paths := Paths + ';'+ Path +';'\n\n    if RegWriteStringValue(HKCU, EnvironmentKey, 'Path', Paths)\n    then Log(Format('The [%s] added to PATH: [%s]', [Path, Paths]))\n    else Log(Format('Error while adding the [%s] to PATH: [%s]', [Path, Paths]));\nend;\n\nprocedure EnvRemovePath(Path: string);\nvar\n    Paths: string;\n    P: Integer;\nbegin\n    if not RegQueryStringValue(HKCU, EnvironmentKey, 'Path', Paths) then\n        exit;\n\n    P := Pos(';' + Uppercase(Path) + ';', ';' + Uppercase(Paths) + ';');\n    if P = 0 then exit;\n\n    Delete(Paths, P - 1, Length(Path) + 1);\n\n    if RegWriteStringValue(HKCU, EnvironmentKey, 'Path', Paths)\n    then Log(Format('The [%s] removed from PATH: [%s]', [Path, Paths]))\n    else Log(Format('Error while removing the [%s] from PATH: [%s]', [Path, Paths]));\nend;\n\nprocedure CurStepChanged(CurStep: TSetupStep);\nbegin\n    if CurStep = ssPostInstall\n     then EnvAddPath(ExpandConstant('{app}'));\nend;\n\nprocedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);\nbegin\n    if CurUninstallStep = usPostUninstall\n    then EnvRemovePath(ExpandConstant('{app}'));\nend;\n\n[UninstallRun]\nFilename: \"taskkill.exe\"; Parameters: \"/F /IM nexa.exe\"; Flags: runhidden\nFilename: \"taskkill.exe\"; Parameters: \"/F /IM nexa-cli.exe\"; Flags: runhidden\n\n[UninstallDelete]\nType: files; Name: \"{app}\\*.exe\"\nType: files; Name: \"{app}\\*.dll\"\nType: filesandordirs; Name: \"{app}\\lib\"\nType: dirifempty; Name: \"{app}\"\n\n[Icons]\nName: \"{group}\\{#MyAppName}\"; Filename: \"{app}\\{#MyAppLauncherName}\"\nName: \"{userdesktop}\\{#MyAppName}\"; Filename: \"{app}\\{#MyAppLauncherName}\"; Tasks: desktopicon\n\n[Tasks]\nName: \"desktopicon\"; Description: \"{cm:CreateDesktopIcon}\"; GroupDescription: \"{cm:AdditionalIcons}\"\n"
  },
  {
    "path": "runner/release/windows/nexa_launcher.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nimport subprocess\n\n# Launch PowerShell with the -NoProfile flag which is generally faster to start\n# Use -NoExit to keep PowerShell open after running the command\n# Use -Command to specify the command to run\nsubprocess.Popen(\n    [\"powershell\", \"-NoProfile\", \"-NoExit\", \"-Command\", \"nexa\"],\n    creationflags=subprocess.CREATE_NEW_CONSOLE\n)\n"
  },
  {
    "path": "runner/server/docs/swagger.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage docs\n\nimport (\n\t\"embed\"\n\t\"io/fs\"\n\t\"net/http\"\n\t\"strings\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\n//go:embed ui/*\nvar StaticFiles embed.FS\n\n//go:embed swagger.yaml\nvar StaticYAML []byte\n\ntype embedFileSystem struct {\n\thttp.FileSystem\n}\n\nfunc (e embedFileSystem) Exists(prefix string, path string) bool {\n\tif path != \"/\" {\n\t\tpath = strings.TrimSuffix(path, \"/\")\n\t}\n\t_, err := e.Open(path)\n\treturn err == nil\n}\n\nfunc getSwaggerSubFS() fs.FS {\n\tsub, _ := fs.Sub(StaticFiles, \"ui\")\n\treturn sub\n}\n\nvar FS = embedFileSystem{http.FS(getSwaggerSubFS())}\n\nfunc SwaggerYAMLHandler() gin.HandlerFunc {\n\treturn func(c *gin.Context) {\n\t\tc.Header(\"Content-Type\", \"application/x-yaml\")\n\t\tc.Data(http.StatusOK, \"application/x-yaml\", StaticYAML)\n\t}\n}\n"
  },
  {
    "path": "runner/server/docs/swagger.yaml",
    "content": "openapi: 3.0.3\ninfo:\n  title: Nexa AI Server\n  version: 0.0.0\n  description: |\n    Nexa AI Server - OpenAI compatible API endpoints\n\npaths:\n  /v1/chat/completions:\n    post:\n      summary: Creates a model response for the given chat conversation\n      description: This endpoint generates a model response for a given conversation, which can include text and images. It supports both single-turn and multi-turn conversations and can be used for various tasks like question answering, code generation, and function calling.\n      operationId: PostV1ChatCompletions\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/ChatCompletionRequest\"\n      responses:\n        \"200\":\n          description: Successful response for non-streaming requests\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ChatCompletionResponse\"\n\n  /v1/embeddings:\n    post:\n      summary: Creates an embedding for the given input\n      description: Creates an embedding for the given input\n      operationId: PostV1Embeddings\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/EmbeddingRequest\"\n      responses:\n        \"200\":\n          description: OK\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/EmbeddingResponse\"\n\n  /v1/images/generations:\n    post:\n      summary: Creates an image given a prompt\n      description: Creates an image given a prompt. This endpoint follows OpenAI DALL-E 3 API specification for compatibility.\n      operationId: PostV1ImagesGenerations\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/ImageGenerationRequest\"\n      responses:\n        \"200\":\n          description: Successful image generation response\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ImageGenerationResponse\"\n        \"400\":\n          description: Bad request - invalid parameters\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"404\":\n          description: Model not found\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"500\":\n          description: Internal server error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\n  /v1/reranking:\n    post:\n      summary: Rerank documents based on their relevance to a query\n      description: Reranks a list of documents according to their semantic relevance to the provided query. Returns relevance scores for each document. Higher scores indicate greater relevance.\n      operationId: PostV1Reranking\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/RerankingRequest\"\n            example:\n              model: \"NexaAI/jina-v2-rerank-npu\"\n              query: \"What is machine learning?\"\n              documents:\n                - \"Machine learning is a subset of artificial intelligence.\"\n                - \"Machine learning algorithms learn patterns from data.\"\n                - \"The weather is sunny today.\"\n                - \"Deep learning is a type of machine learning.\"\n              batch_size: 4\n              normalize: true\n              normalize_method: \"softmax\"\n      responses:\n        \"200\":\n          description: Successfully reranked documents with relevance scores\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/RerankingResponse\"\n              example:\n                result: [0.95, 0.92, 0.10, 0.88]\n        \"400\":\n          description: Bad request - invalid parameters\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"500\":\n          description: Internal server error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\n  /v1/audio/speech:\n    post:\n      summary: Generates audio from the input text\n      description: |\n        Creates audio from the given text using text-to-speech. When stream_format is omitted or not \"sse\",\n        returns raw WAV binary. When stream_format is \"sse\", returns Server-Sent Events stream with\n        speech.audio.delta (base64 audio chunks) and speech.audio.done (usage). Empty input returns 200 with null (warm up).\n      operationId: PostV1AudioSpeech\n      parameters:\n        - name: Nexa-KeepCache\n          in: header\n          required: false\n          schema:\n            type: string\n          description: If \"true\", keeps the model in cache after use\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/AudioSpeechRequest\"\n      responses:\n        \"200\":\n          description: Successful audio generation. Binary WAV when stream_format is not sse; SSE stream when stream_format is sse; null body for warm up.\n          content:\n            audio/wav:\n              schema:\n                type: string\n                format: binary\n            text/event-stream:\n              schema:\n                type: string\n                description: SSE events - speech.audio.delta { type, audio (base64) }, speech.audio.done { type, usage }\n        \"400\":\n          description: Bad request - invalid parameters\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"500\":\n          description: Internal server error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\n  /v1/audio/transcriptions:\n    post:\n      summary: Transcribes audio into the input language\n      description: |\n        Transcribes audio files into text using ASR. Request must be multipart/form-data with model and file.\n        stream=true is not supported (returns 400). Omit file for warm up (returns 200 with null).\n      operationId: PostV1AudioTranscriptions\n      requestBody:\n        required: true\n        content:\n          multipart/form-data:\n            schema:\n              $ref: \"#/components/schemas/AudioTranscriptionRequest\"\n      responses:\n        \"200\":\n          description: Successful transcription (or null body when no file sent for warm up)\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/AudioTranscriptionResponse\"\n        \"400\":\n          description: Bad request - invalid parameters, or stream=true (streaming not supported)\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"500\":\n          description: Internal server error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\n  /v1/audio/diarize:\n    post:\n      summary: Performs speaker diarization on audio\n      description: |\n        Identifies and separates different speakers in an audio file. Audio can be base64 data URL or URL.\n        Empty audio returns 200 with null (warm up).\n      operationId: PostV1AudioDiarize\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/AudioDiarizeRequest\"\n      responses:\n        \"200\":\n          description: Successful diarization with segments, num_speakers, duration (or null body for warm up)\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/AudioDiarizeResponse\"\n        \"400\":\n          description: Bad request - invalid parameters or failed to save audio\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"500\":\n          description: Internal server error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\n  /v1/cv:\n    post:\n      summary: Performs computer vision analysis on images\n      description: Analyzes images using computer vision models for various tasks like object detection, classification, etc.\n      operationId: PostV1CV\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: \"#/components/schemas/CVRequest\"\n      responses:\n        \"200\":\n          description: Successful computer vision analysis\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/CVResponse\"\n        \"400\":\n          description: Bad request - invalid parameters\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n        \"500\":\n          description: Internal server error\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\n  /v1/models:\n    get:\n      summary: Lists the currently available models\n      description: Lists the currently available models, and provides basic information about each one such as the owner and availability\n      operationId: GetV1Models\n      responses:\n        \"200\":\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ModelsListResponse\"\n\n  /v1/models/{model}:\n    get:\n      summary: Retrieves a model instance\n      description: Retrieves a model instance, providing basic information about the model such as the owner and permissioning\n      operationId: GetV1ModelsModel\n      parameters:\n        - name: model\n          in: path\n          required: true\n          description: The ID of the model to use for this request\n          schema:\n            type: string\n      responses:\n        \"200\":\n          description: Successful response\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ModelResponse\"\n        \"404\":\n          description: Model not found\n          content:\n            application/json:\n              schema:\n                $ref: \"#/components/schemas/ErrorResponse\"\n\ncomponents:\n  schemas:\n    # ---------- Chat ----------\n    ChatCompletionRequest:\n      type: object\n      required: [model, messages]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"Qwen/Qwen3-1.7B-GGUF\"\n        messages:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ChatMessage\"\n          description: A list of messages comprising the conversation so far\n        nctx:\n          type: integer\n          minimum: 1\n          description: The maximum number of tokens that can be processed in the chat completion\n          default: 4096\n        max_completion_tokens:\n          type: integer\n          minimum: 1\n          description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.\n          default: 2048\n        temperature:\n          type: number\n          format: float\n          minimum: 0\n          maximum: 2\n          default: 0.8\n          description: What sampling temperature to use, between 0 and 2\n        top_p:\n          type: number\n          format: float\n          minimum: 0\n          maximum: 1\n          default: 0.95\n          description: An alternative to sampling with temperature, called nucleus sampling\n        n:\n          type: integer\n          minimum: 1\n          description: How many chat completion choices to generate for each input message\n          default: 1\n        stream:\n          type: boolean\n          description: If set, partial message deltas will be sent\n          default: false\n        stop:\n          oneOf:\n            - type: string\n            - type: array\n              items: { type: string }\n          description: Up to 4 sequences where the API will stop generating further tokens\n          default: \"\"\n        presence_penalty:\n          type: number\n          format: float\n          minimum: -2\n          maximum: 2\n          default: 0.0\n          description: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far\n        frequency_penalty:\n          type: number\n          format: float\n          minimum: -2\n          maximum: 2\n          default: 0.0\n          description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far\n        logit_bias:\n          type: object\n          additionalProperties:\n            type: integer\n          description: Modify the likelihood of specified tokens appearing in the completion\n        user:\n          type: string\n          description: A unique identifier representing your end-user\n          default: \"role\"\n        tools:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ChatCompletionTool\"\n          description: A list of tools the model may call\n          default: []\n        tool_choice:\n          oneOf:\n            - type: string\n            - $ref: \"#/components/schemas/ChatCompletionToolChoice\"\n          description: Controls which (if any) function is called by the model\n          default: \"\"\n        enable_json:\n          type: boolean\n          description: Whether to enable JSON response generation\n          default: false\n        enable_think:\n          type: boolean\n          description: Whether to enable thinking mode for the model\n          default: true\n        top_k:\n          type: integer\n          minimum: 0\n          description: An alternative to sampling with temperature, called top-k sampling\n          default: 0\n        min_p:\n          type: number\n          format: float\n          minimum: 0\n          maximum: 1\n          description: An alternative to sampling with temperature, called nucleus sampling\n          default: 0.0\n        repetition_penalty:\n          type: number\n          format: float\n          minimum: 0\n          maximum: 100\n          description: The parameter for repetition penalty. 1.0 means no penalty\n          default: 1.0\n        grammar_path:\n          type: string\n          description: Path to the grammar file for structured output\n          default: \"\"\n        grammar_string:\n          type: string\n          description: Grammar string for structured output\n          default: \"\"\n        ngl:\n          type: integer\n          description: Number of GPU layers to use\n          default: 999\n        image_max_length:\n          type: integer\n          description: Maximum length for image processing\n          default: 512\n\n    ChatMessage:\n      type: object\n      required: [role, content]\n      default:\n        {\n          \"role\": \"user\",\n          \"content\": \"What is the weather like in Boston today?\",\n        }\n      properties:\n        role:\n          type: string\n          enum: [system, user, assistant, tool]\n          description: The role of the author of this message\n        content:\n          oneOf:\n            - type: string\n            - type: array\n              items:\n                $ref: \"#/components/schemas/ChatMessageContent\"\n          description: The contents of the message\n        name:\n          type: string\n          description: The name of the author of this message\n        tool_calls:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ChatCompletionMessageToolCall\"\n          description: The tool calls generated by the model\n        function_call:\n          $ref: \"#/components/schemas/ChatCompletionMessageFunctionCall\"\n          description: Deprecated and replaced by tool_calls\n\n    ChatMessageContent:\n      type: object\n      properties:\n        type:\n          type: string\n          enum: [text, image_url, input_audio]\n        text:\n          type: string\n        image_url:\n          $ref: \"#/components/schemas/ChatMessageImageURL\"\n        input_audio:\n          $ref: \"#/components/schemas/ChatMessageAudioURL\"\n\n    ChatMessageImageURL:\n      type: object\n      properties:\n        url:\n          type: string\n        detail:\n          type: string\n          enum: [low, high, auto]\n\n    ChatMessageAudioURL:\n      type: object\n      properties:\n        data:\n          type: string\n          description: The audio data (base64 encoded or URL)\n\n    ChatCompletionTool:\n      type: object\n      properties:\n        type:\n          type: string\n          enum: [function]\n        function:\n          $ref: \"#/components/schemas/ChatCompletionToolFunction\"\n\n    ChatCompletionToolFunction:\n      type: object\n      required: [name]\n      properties:\n        name:\n          type: string\n          description: The name of the function to be called\n        description:\n          type: string\n          description: A description of what the function does\n        parameters:\n          type: object\n          description: The parameters the functions accepts\n\n    ChatCompletionToolChoice:\n      type: object\n      properties:\n        type:\n          type: string\n          enum: [function]\n        function:\n          type: object\n          properties:\n            name:\n              type: string\n\n    ChatCompletionMessageToolCall:\n      type: object\n      properties:\n        id:\n          type: string\n          description: The ID of the tool call\n        type:\n          type: string\n          enum: [function]\n          description: The type of the tool\n        function:\n          $ref: \"#/components/schemas/ChatCompletionMessageToolCallFunction\"\n\n    ChatCompletionMessageToolCallFunction:\n      type: object\n      properties:\n        name:\n          type: string\n          description: The name of the function to call\n        arguments:\n          type: string\n          description: The arguments to call the function with, as generated by the model in JSON format\n\n    ChatCompletionMessageFunctionCall:\n      type: object\n      properties:\n        name:\n          type: string\n          description: The name of the function to call\n        arguments:\n          type: string\n          description: The arguments to call the function with, as generated by the model in JSON format\n\n    ChatCompletionResponse:\n      type: object\n      required: [choices]\n      properties:\n        id:\n          type: string\n          description: A unique identifier for the chat completion\n        object:\n          type: string\n          description: The object type, which is always \"chat.completion\"\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the chat completion was created\n        model:\n          type: string\n          description: The model used for the chat completion\n        choices:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ChatChoice\"\n          description: A list of chat completion choices\n        usage:\n          $ref: \"#/components/schemas/TokenUsage\"\n\n    ChatChoice:\n      type: object\n      properties:\n        index:\n          type: integer\n          description: The index of the choice in the list of choices\n        message:\n          $ref: \"#/components/schemas/ChatMessage\"\n          description: A chat completion message generated by the model\n        finish_reason:\n          type: string\n          enum: [stop, length, tool_calls, content_filter, function_call]\n          description: The reason the model stopped generating tokens\n        logprobs:\n          $ref: \"#/components/schemas/ChatCompletionChoiceLogprobs\"\n\n    ChatCompletionChoiceLogprobs:\n      type: object\n      properties:\n        content:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ChatCompletionTokenLogprob\"\n\n    ChatCompletionTokenLogprob:\n      type: object\n      properties:\n        token:\n          type: string\n        logprob:\n          type: number\n        bytes:\n          type: array\n          items:\n            type: integer\n        top_logprobs:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ChatCompletionTokenLogprobTopLogprob\"\n\n    ChatCompletionTokenLogprobTopLogprob:\n      type: object\n      properties:\n        token:\n          type: string\n        logprob:\n          type: number\n        bytes:\n          type: array\n          items:\n            type: integer\n\n    # ---------- Embeddings ----------\n    EmbeddingRequest:\n      type: object\n      required: [model, input]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"djuna/jina-embeddings-v2-small-en-Q5_K_M-GGUF\"\n        input:\n          oneOf:\n            - type: string\n            - type: array\n              items: { type: string }\n            - type: array\n              items: { type: integer }\n            - type: array\n              items:\n                type: array\n                items: { type: integer }\n          description: Input text to embed\n          default: \"Hello, world!\"\n        encoding_format:\n          type: string\n          enum: [float, base64]\n          description: The format to return the embeddings in\n        dimensions:\n          type: integer\n          description: The number of dimensions the resulting output embeddings should have\n        user:\n          type: string\n          description: A unique identifier representing your end-user\n        task_type:\n          type: string\n          description: The type of task for the embedding\n          default: \"default\"\n\n    EmbeddingResponse:\n      type: object\n      required: [data]\n      properties:\n        object:\n          type: string\n          description: The object type, which is always \"list\"\n        data:\n          type: array\n          items:\n            $ref: \"#/components/schemas/EmbeddingVector\"\n          description: The list of embeddings generated by the model\n        model:\n          type: string\n          description: The name of the model used to generate the embedding\n        usage:\n          $ref: \"#/components/schemas/TokenUsage\"\n\n    EmbeddingVector:\n      type: object\n      required: [embedding]\n      properties:\n        object:\n          type: string\n          description: The object type, which is always \"embedding\"\n        embedding:\n          type: array\n          items: { type: number, format: float }\n          description: The embedding vector\n        index:\n          type: integer\n          description: The index of the embedding in the list of embeddings\n\n    # ---------- Image Generation ----------\n    ImageGenerationRequest:\n      type: object\n      required: [model, prompt]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"nexaml/sdxl-turbo-ryzen-ai\"\n        prompt:\n          type: string\n          description: A text description of the desired image(s). The maximum length is 1000 characters.\n          default: \"A white cat with red eyes\"\n        n:\n          type: integer\n          minimum: 1\n          maximum: 10\n          description: The number of images to generate. Must be between 1 and 10.\n          default: 1\n        size:\n          type: string\n          enum: [\"256x256\", \"512x512\", \"1024x1024\", \"1792x1024\", \"1024x1792\"]\n          description: The size of the generated images. Must be one of the supported sizes.\n          default: \"256x256\"\n        quality:\n          type: string\n          enum: [\"standard\", \"hd\"]\n          description: The quality of the image that will be generated\n          default: \"standard\"\n        style:\n          type: string\n          enum: [\"vivid\", \"natural\"]\n          description: The style of the generated images\n          default: \"vivid\"\n        response_format:\n          type: string\n          enum: [\"b64_json\"]\n          description: The format in which the generated images are returned\n          default: \"b64_json\"\n        user:\n          type: string\n          description: A unique identifier representing your end-user\n\n    ImageGenerationResponse:\n      type: object\n      required: [created, data]\n      properties:\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the image was created\n        data:\n          type: array\n          items:\n            $ref: \"#/components/schemas/ImageGenerationData\"\n          description: The list of generated images\n\n    ImageGenerationData:\n      type: object\n      properties:\n        b64_json:\n          type: string\n          description: The base64-encoded JSON of the generated image\n        revised_prompt:\n          type: string\n          description: The prompt that was used to generate the image, if there was a revision to the prompt\n\n    # ---------- Reranking ----------\n    RerankingRequest:\n      type: object\n      required: [model]\n      properties:\n        model:\n          type: string\n          description: ID of the reranking model to use\n          default: \"NexaAI/jina-v2-rerank-npu\"\n          example: \"NexaAI/jina-v2-rerank-npu\"\n        query:\n          type: string\n          description: The search query to compare documents against\n          default: \"What is machine learning?\"\n          example: \"What is machine learning?\"\n        documents:\n          type: array\n          items: { type: string }\n          description: A list of documents to rerank based on relevance to the query\n          example:\n            - \"Machine learning is a subset of artificial intelligence.\"\n            - \"Machine learning algorithms learn patterns from data.\"\n            - \"The weather is sunny today.\"\n            - \"Deep learning is a type of machine learning.\"\n        batch_size:\n          type: integer\n          description: The batch size to use for reranking\n          default: 4\n          example: 4\n        normalize:\n          type: boolean\n          description: Whether to normalize the relevance scores\n          default: false\n          example: true\n        normalize_method:\n          type: string\n          description: The normalization method to apply to scores\n          enum: [softmax, linear]\n          default: \"softmax\"\n          example: \"softmax\"\n\n    RerankingResponse:\n      type: object\n      required: [result]\n      properties:\n        result:\n          type: array\n          items:\n            type: number\n            format: float\n          description: Array of relevance scores corresponding to each document in the input. Higher scores indicate greater relevance to the query.\n          example: [0.95, 0.92, 0.10, 0.88]\n\n    # ---------- Common ----------\n    ErrorResponse:\n      type: object\n      required: [error]\n      properties:\n        error:\n          type: string\n          description: Error message describing what went wrong\n\n    TokenUsage:\n      type: object\n      properties:\n        prompt_tokens:\n          type: integer\n          description: Number of tokens in the prompt\n        completion_tokens:\n          type: integer\n          description: Number of tokens in the generated completion\n        total_tokens:\n          type: integer\n          description: Total number of tokens used in the request\n\n    # ---------- Audio ----------\n    AudioSpeechRequest:\n      type: object\n      required: [model, input]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"nexaml/Kokoro-82M-bf16-MLX\"\n        input:\n          type: string\n          description: The text to generate audio for. Empty for warm up (returns null).\n        voice:\n          type: string\n          description: The voice to use when generating the audio\n        response_format:\n          type: string\n          enum: [wav]\n          description: The format to return the audio in (when not streaming)\n          default: \"wav\"\n        stream_format:\n          type: string\n          enum: [wav, sse]\n          description: '\"sse\" returns Server-Sent Events stream; otherwise returns binary WAV'\n        speed:\n          type: number\n          format: float\n          minimum: 0.25\n          maximum: 4.0\n          description: The speed of the generated audio\n          default: 1.0\n\n    AudioTranscriptionRequest:\n      type: object\n      description: multipart/form-data form fields\n      required: [model]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"NexaAI/parakeet-tdt-0.6b-v3-npu\"\n        file:\n          type: string\n          format: binary\n          description: The audio file to transcribe. Omit for warm up (returns null).\n        stream:\n          type: string\n          description: '\"true\" is not supported and returns 400'\n        language:\n          type: string\n          description: The language of the input audio\n        prompt:\n          type: string\n          description: An optional text to guide the model's style or continue a previous audio segment\n        response_format:\n          type: string\n          enum: [json, text, srt, verbose_json, vtt]\n          description: The format of the transcript output\n          default: \"text\"\n        temperature:\n          type: number\n          format: float\n          minimum: 0\n          maximum: 1\n          description: The sampling temperature\n          default: 0.0\n\n    AudioTranscriptionResponse:\n      type: object\n      properties:\n        text:\n          type: string\n          description: The transcribed text\n\n    AudioDiarizeRequest:\n      type: object\n      required: [model]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"nexaml/pyannote-npu\"\n        audio:\n          type: string\n          description: The audio to diarize (base64 data URL or URL). Empty for warm up (returns null).\n\n    AudioDiarizeResponse:\n      type: object\n      properties:\n        segments:\n          type: array\n          items:\n            $ref: \"#/components/schemas/DiarizeSegment\"\n          description: Speaker segments with time ranges\n        num_speakers:\n          type: integer\n          format: int32\n          description: Number of speakers detected\n        duration:\n          type: number\n          format: float\n          description: Audio duration in seconds\n\n    DiarizeSegment:\n      type: object\n      properties:\n        start_time:\n          type: number\n          format: float\n          description: Start time in seconds\n        end_time:\n          type: number\n          format: float\n          description: End time in seconds\n        speaker_label:\n          type: string\n          description: The speaker identifier for this segment\n\n    # ---------- Computer Vision ----------\n    CVRequest:\n      type: object\n      required: [model, image]\n      properties:\n        model:\n          type: string\n          description: ID of the model to use\n          default: \"NexaAI/paddleocr-npu\"\n        image:\n          type: string\n          description: The image data to analyze (base64 encoded or URL)\n\n    CVResponse:\n      type: object\n      properties:\n        results:\n          type: array\n          items:\n            $ref: \"#/components/schemas/CVResult\"\n\n    CVResult:\n      type: object\n      properties:\n        label:\n          type: string\n          description: The detected label or class\n        confidence:\n          type: number\n          format: float\n          description: The confidence score\n        bbox:\n          type: object\n          properties:\n            x:\n              type: number\n              format: float\n            y:\n              type: number\n              format: float\n            width:\n              type: number\n              format: float\n            height:\n              type: number\n              format: float\n          description: Bounding box coordinates\n\n    # ---------- Models ----------\n    ModelsListResponse:\n      type: object\n      properties:\n        object:\n          type: string\n          description: The object type, which is always \"list\"\n        data:\n          type: array\n          items:\n            $ref: \"#/components/schemas/Model\"\n\n    ModelResponse:\n      type: object\n      properties:\n        id:\n          type: string\n          description: The model identifier\n        object:\n          type: string\n          description: The object type, which is always \"model\"\n        owned_by:\n          type: string\n          description: The organization that owns the model\n        created:\n          type: integer\n          description: The Unix timestamp (in seconds) of when the model was created\n        permission:\n          type: array\n          items:\n            type: object\n          description: The permissions associated with the model\n\n    Model:\n      type: object\n      properties:\n        id:\n          type: string\n          description: The model identifier\n        owned_by:\n          type: string\n          description: The organization that owns the model\n"
  },
  {
    "path": "runner/server/docs/ui/index.css",
    "content": "html {\n    box-sizing: border-box;\n    overflow: -moz-scrollbars-vertical;\n    overflow-y: scroll;\n}\n\n*,\n*:before,\n*:after {\n    box-sizing: inherit;\n}\n\nbody {\n    margin: 0;\n    background: #fafafa;\n}\n"
  },
  {
    "path": "runner/server/docs/ui/index.html",
    "content": "<!-- HTML for static distribution bundle build -->\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Swagger UI</title>\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"./swagger-ui.css\" />\n    <link rel=\"stylesheet\" type=\"text/css\" href=\"index.css\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"./favicon-32x32.png\" sizes=\"32x32\" />\n    <link rel=\"icon\" type=\"image/png\" href=\"./favicon-16x16.png\" sizes=\"16x16\" />\n  </head>\n\n  <body>\n    <div id=\"swagger-ui\"></div>\n    <script src=\"./swagger-ui-bundle.js\" charset=\"UTF-8\"> </script>\n    <script src=\"./swagger-ui-standalone-preset.js\" charset=\"UTF-8\"> </script>\n    <script src=\"./swagger-initializer.js\" charset=\"UTF-8\"> </script>\n  </body>\n</html>\n"
  },
  {
    "path": "runner/server/docs/ui/oauth2-redirect.html",
    "content": "<!doctype html>\n<html lang=\"en-US\">\n<head>\n    <title>Swagger UI: OAuth2 Redirect</title>\n</head>\n<body>\n<script>\n    'use strict';\n    function run () {\n        var oauth2 = window.opener.swaggerUIRedirectOauth2;\n        var sentState = oauth2.state;\n        var redirectUrl = oauth2.redirectUrl;\n        var isValid, qp, arr;\n\n        if (/code|token|error/.test(window.location.hash)) {\n            qp = window.location.hash.substring(1).replace('?', '&');\n        } else {\n            qp = location.search.substring(1);\n        }\n\n        arr = qp.split(\"&\");\n        arr.forEach(function (v,i,_arr) { _arr[i] = '\"' + v.replace('=', '\":\"') + '\"';});\n        qp = qp ? JSON.parse('{' + arr.join() + '}',\n                function (key, value) {\n                    return key === \"\" ? value : decodeURIComponent(value);\n                }\n        ) : {};\n\n        isValid = qp.state === sentState;\n\n        if ((\n          oauth2.auth.schema.get(\"flow\") === \"accessCode\" ||\n          oauth2.auth.schema.get(\"flow\") === \"authorizationCode\" ||\n          oauth2.auth.schema.get(\"flow\") === \"authorization_code\"\n        ) && !oauth2.auth.code) {\n            if (!isValid) {\n                oauth2.errCb({\n                    authId: oauth2.auth.name,\n                    source: \"auth\",\n                    level: \"warning\",\n                    message: \"Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server.\"\n                });\n            }\n\n            if (qp.code) {\n                delete oauth2.state;\n                oauth2.auth.code = qp.code;\n                oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});\n            } else {\n                let oauthErrorMsg;\n                if (qp.error) {\n                    oauthErrorMsg = \"[\"+qp.error+\"]: \" +\n                        (qp.error_description ? qp.error_description+ \". \" : \"no accessCode received from the server. \") +\n                        (qp.error_uri ? \"More info: \"+qp.error_uri : \"\");\n                }\n\n                oauth2.errCb({\n                    authId: oauth2.auth.name,\n                    source: \"auth\",\n                    level: \"error\",\n                    message: oauthErrorMsg || \"[Authorization failed]: no accessCode received from the server.\"\n                });\n            }\n        } else {\n            oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});\n        }\n        window.close();\n    }\n\n    if (document.readyState !== 'loading') {\n        run();\n    } else {\n        document.addEventListener('DOMContentLoaded', function () {\n            run();\n        });\n    }\n</script>\n</body>\n</html>\n"
  },
  {
    "path": "runner/server/docs/ui/swagger-initializer.js",
    "content": "window.onload = function() {\n  //<editor-fold desc=\"Changeable Configuration Block\">\n\n  // the following lines will be replaced by docker/configurator, when it runs in a docker-container\n  window.ui = SwaggerUIBundle({\n\turl: \"/docs/swagger.yaml\",\n    dom_id: '#swagger-ui',\n    deepLinking: true,\n    presets: [\n      SwaggerUIBundle.presets.apis,\n      SwaggerUIStandalonePreset\n    ],\n    plugins: [\n      SwaggerUIBundle.plugins.DownloadUrl\n    ],\n    layout: \"StandaloneLayout\"\n  });\n\n  //</editor-fold>\n};\n"
  },
  {
    "path": "runner/server/docs/ui/swagger-ui-bundle.js",
    "content": "/*! For license information please see swagger-ui-bundle.js.LICENSE.txt */\n!function webpackUniversalModuleDefinition(s,o){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=o():\"function\"==typeof define&&define.amd?define([],o):\"object\"==typeof exports?exports.SwaggerUIBundle=o():s.SwaggerUIBundle=o()}(this,(()=>(()=>{var s={251:(s,o)=>{o.read=function(s,o,i,a,u){var _,w,x=8*u-a-1,C=(1<<x)-1,j=C>>1,L=-7,B=i?u-1:0,$=i?-1:1,V=s[o+B];for(B+=$,_=V&(1<<-L)-1,V>>=-L,L+=x;L>0;_=256*_+s[o+B],B+=$,L-=8);for(w=_&(1<<-L)-1,_>>=-L,L+=a;L>0;w=256*w+s[o+B],B+=$,L-=8);if(0===_)_=1-j;else{if(_===C)return w?NaN:1/0*(V?-1:1);w+=Math.pow(2,a),_-=j}return(V?-1:1)*w*Math.pow(2,_-a)},o.write=function(s,o,i,a,u,_){var w,x,C,j=8*_-u-1,L=(1<<j)-1,B=L>>1,$=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,V=a?0:_-1,U=a?1:-1,z=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(x=isNaN(o)?1:0,w=L):(w=Math.floor(Math.log(o)/Math.LN2),o*(C=Math.pow(2,-w))<1&&(w--,C*=2),(o+=w+B>=1?$/C:$*Math.pow(2,1-B))*C>=2&&(w++,C/=2),w+B>=L?(x=0,w=L):w+B>=1?(x=(o*C-1)*Math.pow(2,u),w+=B):(x=o*Math.pow(2,B-1)*Math.pow(2,u),w=0));u>=8;s[i+V]=255&x,V+=U,x/=256,u-=8);for(w=w<<u|x,j+=u;j>0;s[i+V]=255&w,V+=U,w/=256,j-=8);s[i+V-U]|=128*z}},462:(s,o,i)=>{\"use strict\";var a=i(40975);s.exports=a},659:(s,o,i)=>{var a=i(51873),u=Object.prototype,_=u.hasOwnProperty,w=u.toString,x=a?a.toStringTag:void 0;s.exports=function getRawTag(s){var o=_.call(s,x),i=s[x];try{s[x]=void 0;var a=!0}catch(s){}var u=w.call(s);return a&&(o?s[x]=i:delete s[x]),u}},694:(s,o,i)=>{\"use strict\";i(91599);var a=i(37257);i(12560),s.exports=a},953:(s,o,i)=>{\"use strict\";s.exports=i(53375)},1733:s=>{var o=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;s.exports=function asciiWords(s){return s.match(o)||[]}},1882:(s,o,i)=>{var a=i(72552),u=i(23805);s.exports=function isFunction(s){if(!u(s))return!1;var o=a(s);return\"[object Function]\"==o||\"[object GeneratorFunction]\"==o||\"[object AsyncFunction]\"==o||\"[object Proxy]\"==o}},1907:(s,o,i)=>{\"use strict\";var a=i(41505),u=Function.prototype,_=u.call,w=a&&u.bind.bind(_,_);s.exports=a?w:function(s){return function(){return _.apply(s,arguments)}}},2205:function(s,o,i){var a;a=void 0!==i.g?i.g:this,s.exports=function(s){if(s.CSS&&s.CSS.escape)return s.CSS.escape;var cssEscape=function(s){if(0==arguments.length)throw new TypeError(\"`CSS.escape` requires an argument.\");for(var o,i=String(s),a=i.length,u=-1,_=\"\",w=i.charCodeAt(0);++u<a;)0!=(o=i.charCodeAt(u))?_+=o>=1&&o<=31||127==o||0==u&&o>=48&&o<=57||1==u&&o>=48&&o<=57&&45==w?\"\\\\\"+o.toString(16)+\" \":0==u&&1==a&&45==o||!(o>=128||45==o||95==o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122)?\"\\\\\"+i.charAt(u):i.charAt(u):_+=\"�\";return _};return s.CSS||(s.CSS={}),s.CSS.escape=cssEscape,cssEscape}(a)},2209:(s,o,i)=>{\"use strict\";var a,u=i(9404),_=function productionTypeChecker(){invariant(!1,\"ImmutablePropTypes type checking code is stripped in production.\")};_.isRequired=_;var w=function getProductionTypeChecker(){return _};function getPropType(s){var o=typeof s;return Array.isArray(s)?\"array\":s instanceof RegExp?\"object\":s instanceof u.Iterable?\"Immutable.\"+s.toSource().split(\" \")[0]:o}function createChainableTypeChecker(s){function checkType(o,i,a,u,_,w){for(var x=arguments.length,C=Array(x>6?x-6:0),j=6;j<x;j++)C[j-6]=arguments[j];return w=w||a,u=u||\"<<anonymous>>\",null!=i[a]?s.apply(void 0,[i,a,u,_,w].concat(C)):o?new Error(\"Required \"+_+\" `\"+w+\"` was not specified in `\"+u+\"`.\"):void 0}var o=checkType.bind(null,!1);return o.isRequired=checkType.bind(null,!0),o}function createIterableSubclassTypeChecker(s,o){return function createImmutableTypeChecker(s,o){return createChainableTypeChecker((function validate(i,a,u,_,w){var x=i[a];if(!o(x)){var C=getPropType(x);return new Error(\"Invalid \"+_+\" `\"+w+\"` of type `\"+C+\"` supplied to `\"+u+\"`, expected `\"+s+\"`.\")}return null}))}(\"Iterable.\"+s,(function(s){return u.Iterable.isIterable(s)&&o(s)}))}(a={listOf:w,mapOf:w,orderedMapOf:w,setOf:w,orderedSetOf:w,stackOf:w,iterableOf:w,recordOf:w,shape:w,contains:w,mapContains:w,orderedMapContains:w,list:_,map:_,orderedMap:_,set:_,orderedSet:_,stack:_,seq:_,record:_,iterable:_}).iterable.indexed=createIterableSubclassTypeChecker(\"Indexed\",u.Iterable.isIndexed),a.iterable.keyed=createIterableSubclassTypeChecker(\"Keyed\",u.Iterable.isKeyed),s.exports=a},2404:(s,o,i)=>{var a=i(60270);s.exports=function isEqual(s,o){return a(s,o)}},2523:s=>{s.exports=function baseFindIndex(s,o,i,a){for(var u=s.length,_=i+(a?1:-1);a?_--:++_<u;)if(o(s[_],_,s))return _;return-1}},2532:(s,o,i)=>{\"use strict\";var a=i(45951),u=Object.defineProperty;s.exports=function(s,o){try{u(a,s,{value:o,configurable:!0,writable:!0})}catch(i){a[s]=o}return o}},2694:(s,o,i)=>{\"use strict\";var a=i(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,o,i,u,_,w){if(w!==a){var x=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw x.name=\"Invariant Violation\",x}}function getShim(){return shim}shim.isRequired=shim;var s={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return s.PropTypes=s,s}},2874:s=>{s.exports={}},2875:(s,o,i)=>{\"use strict\";var a=i(23045),u=i(80376);s.exports=Object.keys||function keys(s){return a(s,u)}},2955:(s,o,i)=>{\"use strict\";var a,u=i(65606);function _defineProperty(s,o,i){return(o=function _toPropertyKey(s){var o=function _toPrimitive(s,o){if(\"object\"!=typeof s||null===s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||\"default\");if(\"object\"!=typeof a)return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===o?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof o?o:String(o)}(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var _=i(86238),w=Symbol(\"lastResolve\"),x=Symbol(\"lastReject\"),C=Symbol(\"error\"),j=Symbol(\"ended\"),L=Symbol(\"lastPromise\"),B=Symbol(\"handlePromise\"),$=Symbol(\"stream\");function createIterResult(s,o){return{value:s,done:o}}function readAndResolve(s){var o=s[w];if(null!==o){var i=s[$].read();null!==i&&(s[L]=null,s[w]=null,s[x]=null,o(createIterResult(i,!1)))}}function onReadable(s){u.nextTick(readAndResolve,s)}var V=Object.getPrototypeOf((function(){})),U=Object.setPrototypeOf((_defineProperty(a={get stream(){return this[$]},next:function next(){var s=this,o=this[C];if(null!==o)return Promise.reject(o);if(this[j])return Promise.resolve(createIterResult(void 0,!0));if(this[$].destroyed)return new Promise((function(o,i){u.nextTick((function(){s[C]?i(s[C]):o(createIterResult(void 0,!0))}))}));var i,a=this[L];if(a)i=new Promise(function wrapForNext(s,o){return function(i,a){s.then((function(){o[j]?i(createIterResult(void 0,!0)):o[B](i,a)}),a)}}(a,this));else{var _=this[$].read();if(null!==_)return Promise.resolve(createIterResult(_,!1));i=new Promise(this[B])}return this[L]=i,i}},Symbol.asyncIterator,(function(){return this})),_defineProperty(a,\"return\",(function _return(){var s=this;return new Promise((function(o,i){s[$].destroy(null,(function(s){s?i(s):o(createIterResult(void 0,!0))}))}))})),a),V);s.exports=function createReadableStreamAsyncIterator(s){var o,i=Object.create(U,(_defineProperty(o={},$,{value:s,writable:!0}),_defineProperty(o,w,{value:null,writable:!0}),_defineProperty(o,x,{value:null,writable:!0}),_defineProperty(o,C,{value:null,writable:!0}),_defineProperty(o,j,{value:s._readableState.endEmitted,writable:!0}),_defineProperty(o,B,{value:function value(s,o){var a=i[$].read();a?(i[L]=null,i[w]=null,i[x]=null,s(createIterResult(a,!1))):(i[w]=s,i[x]=o)},writable:!0}),o));return i[L]=null,_(s,(function(s){if(s&&\"ERR_STREAM_PREMATURE_CLOSE\"!==s.code){var o=i[x];return null!==o&&(i[L]=null,i[w]=null,i[x]=null,o(s)),void(i[C]=s)}var a=i[w];null!==a&&(i[L]=null,i[w]=null,i[x]=null,a(createIterResult(void 0,!0))),i[j]=!0})),s.on(\"readable\",onReadable.bind(null,i)),i}},3110:(s,o,i)=>{const a=i(5187),u=i(85015),_=i(98023),w=i(53812),x=i(23805),C=i(85105),j=i(86804);class Namespace{constructor(s){this.elementMap={},this.elementDetection=[],this.Element=j.Element,this.KeyValuePair=j.KeyValuePair,s&&s.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({base:this}),this}useDefault(){return this.register(\"null\",j.NullElement).register(\"string\",j.StringElement).register(\"number\",j.NumberElement).register(\"boolean\",j.BooleanElement).register(\"array\",j.ArrayElement).register(\"object\",j.ObjectElement).register(\"member\",j.MemberElement).register(\"ref\",j.RefElement).register(\"link\",j.LinkElement),this.detect(a,j.NullElement,!1).detect(u,j.StringElement,!1).detect(_,j.NumberElement,!1).detect(w,j.BooleanElement,!1).detect(Array.isArray,j.ArrayElement,!1).detect(x,j.ObjectElement,!1),this}register(s,o){return this._elements=void 0,this.elementMap[s]=o,this}unregister(s){return this._elements=void 0,delete this.elementMap[s],this}detect(s,o,i){return void 0===i||i?this.elementDetection.unshift([s,o]):this.elementDetection.push([s,o]),this}toElement(s){if(s instanceof this.Element)return s;let o;for(let i=0;i<this.elementDetection.length;i+=1){const a=this.elementDetection[i][0],u=this.elementDetection[i][1];if(a(s)){o=new u(s);break}}return o}getElementClass(s){const o=this.elementMap[s];return void 0===o?this.Element:o}fromRefract(s){return this.serialiser.deserialise(s)}toRefract(s){return this.serialiser.serialise(s)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((s=>{const o=s[0].toUpperCase()+s.substr(1);this._elements[o]=this.elementMap[s]}))),this._elements}get serialiser(){return new C(this)}}C.prototype.Namespace=Namespace,s.exports=Namespace},3121:(s,o,i)=>{\"use strict\";var a=i(65482),u=Math.min;s.exports=function(s){var o=a(s);return o>0?u(o,9007199254740991):0}},3209:(s,o,i)=>{var a=i(91596),u=i(53320),_=i(36306),w=\"__lodash_placeholder__\",x=128,C=Math.min;s.exports=function mergeData(s,o){var i=s[1],j=o[1],L=i|j,B=L<131,$=j==x&&8==i||j==x&&256==i&&s[7].length<=o[8]||384==j&&o[7].length<=o[8]&&8==i;if(!B&&!$)return s;1&j&&(s[2]=o[2],L|=1&i?0:4);var V=o[3];if(V){var U=s[3];s[3]=U?a(U,V,o[4]):V,s[4]=U?_(s[3],w):o[4]}return(V=o[5])&&(U=s[5],s[5]=U?u(U,V,o[6]):V,s[6]=U?_(s[5],w):o[6]),(V=o[7])&&(s[7]=V),j&x&&(s[8]=null==s[8]?o[8]:C(s[8],o[8])),null==s[9]&&(s[9]=o[9]),s[0]=o[0],s[1]=L,s}},3650:(s,o,i)=>{var a=i(74335)(Object.keys,Object);s.exports=a},3656:(s,o,i)=>{s=i.nmd(s);var a=i(9325),u=i(89935),_=o&&!o.nodeType&&o,w=_&&s&&!s.nodeType&&s,x=w&&w.exports===_?a.Buffer:void 0,C=(x?x.isBuffer:void 0)||u;s.exports=C},4509:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheHas(s){return a(this,s).has(s)}},4640:s=>{\"use strict\";var o=String;s.exports=function(s){try{return o(s)}catch(s){return\"Object\"}}},4664:(s,o,i)=>{var a=i(79770),u=i(63345),_=Object.prototype.propertyIsEnumerable,w=Object.getOwnPropertySymbols,x=w?function(s){return null==s?[]:(s=Object(s),a(w(s),(function(o){return _.call(s,o)})))}:u;s.exports=x},4901:(s,o,i)=>{var a=i(72552),u=i(30294),_=i(40346),w={};w[\"[object Float32Array]\"]=w[\"[object Float64Array]\"]=w[\"[object Int8Array]\"]=w[\"[object Int16Array]\"]=w[\"[object Int32Array]\"]=w[\"[object Uint8Array]\"]=w[\"[object Uint8ClampedArray]\"]=w[\"[object Uint16Array]\"]=w[\"[object Uint32Array]\"]=!0,w[\"[object Arguments]\"]=w[\"[object Array]\"]=w[\"[object ArrayBuffer]\"]=w[\"[object Boolean]\"]=w[\"[object DataView]\"]=w[\"[object Date]\"]=w[\"[object Error]\"]=w[\"[object Function]\"]=w[\"[object Map]\"]=w[\"[object Number]\"]=w[\"[object Object]\"]=w[\"[object RegExp]\"]=w[\"[object Set]\"]=w[\"[object String]\"]=w[\"[object WeakMap]\"]=!1,s.exports=function baseIsTypedArray(s){return _(s)&&u(s.length)&&!!w[a(s)]}},4993:(s,o,i)=>{\"use strict\";var a=i(16946),u=i(74239);s.exports=function(s){return a(u(s))}},5187:s=>{s.exports=function isNull(s){return null===s}},5419:s=>{s.exports=function(s,o,i,a){var u=new Blob(void 0!==a?[a,s]:[s],{type:i||\"application/octet-stream\"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(u,o);else{var _=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(u):window.webkitURL.createObjectURL(u),w=document.createElement(\"a\");w.style.display=\"none\",w.href=_,w.setAttribute(\"download\",o),void 0===w.download&&w.setAttribute(\"target\",\"_blank\"),document.body.appendChild(w),w.click(),setTimeout((function(){document.body.removeChild(w),window.URL.revokeObjectURL(_)}),200)}}},5556:(s,o,i)=>{s.exports=i(2694)()},5861:(s,o,i)=>{var a=i(55580),u=i(68223),_=i(32804),w=i(76545),x=i(28303),C=i(72552),j=i(47473),L=\"[object Map]\",B=\"[object Promise]\",$=\"[object Set]\",V=\"[object WeakMap]\",U=\"[object DataView]\",z=j(a),Y=j(u),Z=j(_),ee=j(w),ie=j(x),ae=C;(a&&ae(new a(new ArrayBuffer(1)))!=U||u&&ae(new u)!=L||_&&ae(_.resolve())!=B||w&&ae(new w)!=$||x&&ae(new x)!=V)&&(ae=function(s){var o=C(s),i=\"[object Object]\"==o?s.constructor:void 0,a=i?j(i):\"\";if(a)switch(a){case z:return U;case Y:return L;case Z:return B;case ee:return $;case ie:return V}return o}),s.exports=ae},6048:s=>{s.exports=function negate(s){if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}},6205:s=>{s.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},6233:(s,o,i)=>{const a=i(6048),u=i(10316),_=i(92340);class ArrayElement extends u{constructor(s,o,i){super(s||[],o,i),this.element=\"array\"}primitive(){return\"array\"}get(s){return this.content[s]}getValue(s){const o=this.get(s);if(o)return o.toValue()}getIndex(s){return this.content[s]}set(s,o){return this.content[s]=this.refract(o),this}remove(s){const o=this.content.splice(s,1);return o.length?o[0]:null}map(s,o){return this.content.map(s,o)}flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(a);u&&i.push(u)})),i}filter(s,o){return new _(this.content.filter(s,o))}reject(s,o){return this.filter(a(s),o)}reduce(s,o){let i,a;void 0!==o?(i=0,a=this.refract(o)):(i=1,a=\"object\"===this.primitive()?this.first.value:this.first);for(let o=i;o<this.length;o+=1){const i=this.content[o];a=\"object\"===this.primitive()?this.refract(s(a,i.value,i.key,i,this)):this.refract(s(a,i,o,this))}return a}forEach(s,o){this.content.forEach(((i,a)=>{s.bind(o)(i,this.refract(a))}))}shift(){return this.content.shift()}unshift(s){this.content.unshift(this.refract(s))}push(s){return this.content.push(this.refract(s)),this}add(s){this.push(s)}findElements(s,o){const i=o||{},a=!!i.recursive,u=void 0===i.results?[]:i.results;return this.forEach(((o,i,_)=>{a&&void 0!==o.findElements&&o.findElements(s,{results:u,recursive:a}),s(o,i,_)&&u.push(o)})),u}find(s){return new _(this.findElements(s,{recursive:!0}))}findByElement(s){return this.find((o=>o.element===s))}findByClass(s){return this.find((o=>o.classes.includes(s)))}getById(s){return this.find((o=>o.id.toValue()===s)).first}includes(s){return this.content.some((o=>o.equals(s)))}contains(s){return this.includes(s)}empty(){return new this.constructor([])}\"fantasy-land/empty\"(){return this.empty()}concat(s){return new this.constructor(this.content.concat(s.content))}\"fantasy-land/concat\"(s){return this.concat(s)}\"fantasy-land/map\"(s){return new this.constructor(this.map(s))}\"fantasy-land/chain\"(s){return this.map((o=>s(o)),this).reduce(((s,o)=>s.concat(o)),this.empty())}\"fantasy-land/filter\"(s){return new this.constructor(this.content.filter(s))}\"fantasy-land/reduce\"(s,o){return this.content.reduce(s,o)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement[\"fantasy-land/empty\"]=ArrayElement.empty,\"undefined\"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),s.exports=ArrayElement},6499:(s,o,i)=>{\"use strict\";var a=i(1907),u=0,_=Math.random(),w=a(1..toString);s.exports=function(s){return\"Symbol(\"+(void 0===s?\"\":s)+\")_\"+w(++u+_,36)}},6925:s=>{\"use strict\";s.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},7057:(s,o,i)=>{\"use strict\";var a=i(11470).charAt,u=i(90160),_=i(64932),w=i(60183),x=i(59550),C=\"String Iterator\",j=_.set,L=_.getterFor(C);w(String,\"String\",(function(s){j(this,{type:C,string:u(s),index:0})}),(function next(){var s,o=L(this),i=o.string,u=o.index;return u>=i.length?x(void 0,!0):(s=a(i,u),o.index+=s.length,x(s,!1))}))},7309:(s,o,i)=>{var a=i(62006)(i(24713));s.exports=a},7376:s=>{\"use strict\";s.exports=!0},7463:(s,o,i)=>{\"use strict\";var a=i(98828),u=i(62250),_=/#|\\.prototype\\./,isForced=function(s,o){var i=x[w(s)];return i===j||i!==C&&(u(o)?a(o):!!o)},w=isForced.normalize=function(s){return String(s).replace(_,\".\").toLowerCase()},x=isForced.data={},C=isForced.NATIVE=\"N\",j=isForced.POLYFILL=\"P\";s.exports=isForced},7666:(s,o,i)=>{var a=i(84851),u=i(953);function _extends(){var o;return s.exports=_extends=a?u(o=a).call(o):function(s){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},s.exports.__esModule=!0,s.exports.default=s.exports,_extends.apply(null,arguments)}s.exports=_extends,s.exports.__esModule=!0,s.exports.default=s.exports},8048:(s,o,i)=>{const a=i(6205);o.wordBoundary=()=>({type:a.POSITION,value:\"b\"}),o.nonWordBoundary=()=>({type:a.POSITION,value:\"B\"}),o.begin=()=>({type:a.POSITION,value:\"^\"}),o.end=()=>({type:a.POSITION,value:\"$\"})},8068:s=>{\"use strict\";var o=(()=>{var s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,i,a)=>i in o?s(o,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[i]=a,__spreadValues=(s,o)=>{for(var i in o||(o={}))u.call(o,i)&&__defNormalProp(s,i,o[i]);if(a)for(var i of a(o))_.call(o,i)&&__defNormalProp(s,i,o[i]);return s},__publicField=(s,o,i)=>__defNormalProp(s,\"symbol\"!=typeof o?o+\"\":o,i),w={};((o,i)=>{for(var a in i)s(o,a,{get:i[a],enumerable:!0})})(w,{DEFAULT_OPTIONS:()=>C,DEFAULT_UUID_LENGTH:()=>x,default:()=>B});var x=6,C={dictionary:\"alphanum\",shuffle:!0,debug:!1,length:x,counter:0},j=class _ShortUniqueId{constructor(s={}){__publicField(this,\"counter\"),__publicField(this,\"debug\"),__publicField(this,\"dict\"),__publicField(this,\"version\"),__publicField(this,\"dictIndex\",0),__publicField(this,\"dictRange\",[]),__publicField(this,\"lowerBound\",0),__publicField(this,\"upperBound\",0),__publicField(this,\"dictLength\",0),__publicField(this,\"uuidLength\"),__publicField(this,\"_digit_first_ascii\",48),__publicField(this,\"_digit_last_ascii\",58),__publicField(this,\"_alpha_lower_first_ascii\",97),__publicField(this,\"_alpha_lower_last_ascii\",123),__publicField(this,\"_hex_last_ascii\",103),__publicField(this,\"_alpha_upper_first_ascii\",65),__publicField(this,\"_alpha_upper_last_ascii\",91),__publicField(this,\"_number_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),__publicField(this,\"_alpha_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alpha_lower_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alpha_upper_dict_ranges\",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_lower_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alphanum_upper_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_hex_dict_ranges\",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),__publicField(this,\"_dict_ranges\",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),__publicField(this,\"log\",((...s)=>{const o=[...s];o[0]=\"[short-unique-id] \".concat(s[0]),!0!==this.debug||\"undefined\"==typeof console||null===console||console.log(...o)})),__publicField(this,\"_normalizeDictionary\",((s,o)=>{let i;if(s&&Array.isArray(s)&&s.length>1)i=s;else{i=[],this.dictIndex=0;const o=\"_\".concat(s,\"_dict_ranges\"),a=this._dict_ranges[o];let u=0;for(const[,s]of Object.entries(a)){const[o,i]=s;u+=Math.abs(i-o)}i=new Array(u);let _=0;for(const[,s]of Object.entries(a)){this.dictRange=s,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];const o=this.lowerBound<=this.upperBound,a=this.lowerBound,u=this.upperBound;if(o)for(let s=a;s<u;s++)i[_++]=String.fromCharCode(s),this.dictIndex=s;else for(let s=a;s>u;s--)i[_++]=String.fromCharCode(s),this.dictIndex=s}i.length=_}if(o){for(let s=i.length-1;s>0;s--){const o=Math.floor(Math.random()*(s+1));[i[s],i[o]]=[i[o],i[s]]}}return i})),__publicField(this,\"setDictionary\",((s,o)=>{this.dict=this._normalizeDictionary(s,o),this.dictLength=this.dict.length,this.setCounter(0)})),__publicField(this,\"seq\",(()=>this.sequentialUUID())),__publicField(this,\"sequentialUUID\",(()=>{const s=this.dictLength,o=this.dict;let i=this.counter;const a=[];do{const u=i%s;i=Math.trunc(i/s),a.push(o[u])}while(0!==i);const u=a.join(\"\");return this.counter+=1,u})),__publicField(this,\"rnd\",((s=this.uuidLength||x)=>this.randomUUID(s))),__publicField(this,\"randomUUID\",((s=this.uuidLength||x)=>{if(null==s||s<1)throw new Error(\"Invalid UUID Length Provided\");const o=new Array(s),i=this.dictLength,a=this.dict;for(let u=0;u<s;u++){const s=Math.floor(Math.random()*i);o[u]=a[s]}return o.join(\"\")})),__publicField(this,\"fmt\",((s,o)=>this.formattedUUID(s,o))),__publicField(this,\"formattedUUID\",((s,o)=>{const i={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return s.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const a=s.slice(0,2),u=Number.parseInt(s.slice(2),10);return\"$s\"===a?i[a]().padStart(u,\"0\"):\"$t\"===a&&o?i[a](u,o):i[a](u)}))})),__publicField(this,\"availableUUIDs\",((s=this.uuidLength)=>Number.parseFloat(([...new Set(this.dict)].length**s).toFixed(0)))),__publicField(this,\"_collisionCache\",new Map),__publicField(this,\"approxMaxBeforeCollision\",((s=this.availableUUIDs(this.uuidLength))=>{const o=s,i=this._collisionCache.get(o);if(void 0!==i)return i;const a=Number.parseFloat(Math.sqrt(Math.PI/2*s).toFixed(20));return this._collisionCache.set(o,a),a})),__publicField(this,\"collisionProbability\",((s=this.availableUUIDs(this.uuidLength),o=this.uuidLength)=>Number.parseFloat((this.approxMaxBeforeCollision(s)/this.availableUUIDs(o)).toFixed(20)))),__publicField(this,\"uniqueness\",((s=this.availableUUIDs(this.uuidLength))=>{const o=Number.parseFloat((1-this.approxMaxBeforeCollision(s)/s).toFixed(20));return o>1?1:o<0?0:o})),__publicField(this,\"getVersion\",(()=>this.version)),__publicField(this,\"stamp\",((s,o)=>{const i=Math.floor(+(o||new Date)/1e3).toString(16);if(\"number\"==typeof s&&0===s)return i;if(\"number\"!=typeof s||s<10)throw new Error([\"Param finalLength must be a number greater than or equal to 10,\",\"or 0 if you want the raw hexadecimal timestamp\"].join(\"\\n\"));const a=s-9,u=Math.round(Math.random()*(a>15?15:a)),_=this.randomUUID(a);return\"\".concat(_.substring(0,u)).concat(i).concat(_.substring(u)).concat(u.toString(16))})),__publicField(this,\"parseStamp\",((s,o)=>{if(o&&!/t0|t[1-9]\\d{1,}/.test(o))throw new Error(\"Cannot extract date from a formated UUID with no timestamp in the format\");const i=o?o.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const o={$r:s=>[...Array(s)].map((()=>\"r\")).join(\"\"),$s:s=>[...Array(s)].map((()=>\"s\")).join(\"\"),$t:s=>[...Array(s)].map((()=>\"t\")).join(\"\")},i=s.slice(0,2),a=Number.parseInt(s.slice(2),10);return o[i](a)})).replace(/^(.*?)(t{8,})(.*)$/g,((o,i,a)=>s.substring(i.length,i.length+a.length))):s;if(8===i.length)return new Date(1e3*Number.parseInt(i,16));if(i.length<10)throw new Error(\"Stamp length invalid\");const a=Number.parseInt(i.substring(i.length-1),16);return new Date(1e3*Number.parseInt(i.substring(a,a+8),16))})),__publicField(this,\"setCounter\",(s=>{this.counter=s})),__publicField(this,\"validate\",((s,o)=>{const i=o?this._normalizeDictionary(o):this.dict;return s.split(\"\").every((s=>i.includes(s)))}));const o=__spreadValues(__spreadValues({},C),s);this.counter=0,this.debug=!1,this.dict=[],this.version=\"5.3.2\";const{dictionary:i,shuffle:a,length:u,counter:_}=o;this.uuidLength=u,this.setDictionary(i,a),this.setCounter(_),this.debug=o.debug,this.log(this.dict),this.log(\"Generator instantiated with Dictionary Size \".concat(this.dictLength,\" and counter set to \").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};__publicField(j,\"default\",j);var L,B=j;return L=w,((a,_,w,x)=>{if(_&&\"object\"==typeof _||\"function\"==typeof _)for(let C of i(_))u.call(a,C)||C===w||s(a,C,{get:()=>_[C],enumerable:!(x=o(_,C))||x.enumerable});return a})(s({},\"__esModule\",{value:!0}),L)})();s.exports=o.default,\"undefined\"!=typeof window&&(o=o.default)},9325:(s,o,i)=>{var a=i(34840),u=\"object\"==typeof self&&self&&self.Object===Object&&self,_=a||u||Function(\"return this\")();s.exports=_},9404:function(s){s.exports=function(){\"use strict\";var s=Array.prototype.slice;function createClass(s,o){o&&(s.prototype=Object.create(o.prototype)),s.prototype.constructor=s}function Iterable(s){return isIterable(s)?s:Seq(s)}function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq(s)}function isIterable(s){return!(!s||!s[o])}function isKeyed(s){return!(!s||!s[i])}function isIndexed(s){return!(!s||!s[a])}function isAssociative(s){return isKeyed(s)||isIndexed(s)}function isOrdered(s){return!(!s||!s[u])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var o=\"@@__IMMUTABLE_ITERABLE__@@\",i=\"@@__IMMUTABLE_KEYED__@@\",a=\"@@__IMMUTABLE_INDEXED__@@\",u=\"@@__IMMUTABLE_ORDERED__@@\",_=\"delete\",w=5,x=1<<w,C=x-1,j={},L={value:!1},B={value:!1};function MakeRef(s){return s.value=!1,s}function SetRef(s){s&&(s.value=!0)}function OwnerID(){}function arrCopy(s,o){o=o||0;for(var i=Math.max(0,s.length-o),a=new Array(i),u=0;u<i;u++)a[u]=s[u+o];return a}function ensureSize(s){return void 0===s.size&&(s.size=s.__iterate(returnTrue)),s.size}function wrapIndex(s,o){if(\"number\"!=typeof o){var i=o>>>0;if(\"\"+i!==o||4294967295===i)return NaN;o=i}return o<0?ensureSize(s)+o:o}function returnTrue(){return!0}function wholeSlice(s,o,i){return(0===s||void 0!==i&&s<=-i)&&(void 0===o||void 0!==i&&o>=i)}function resolveBegin(s,o){return resolveIndex(s,o,0)}function resolveEnd(s,o){return resolveIndex(s,o,o)}function resolveIndex(s,o,i){return void 0===s?i:s<0?Math.max(0,o+s):void 0===o?s:Math.min(o,s)}var $=0,V=1,U=2,z=\"function\"==typeof Symbol&&Symbol.iterator,Y=\"@@iterator\",Z=z||Y;function Iterator(s){this.next=s}function iteratorValue(s,o,i,a){var u=0===s?o:1===s?i:[o,i];return a?a.value=u:a={value:u,done:!1},a}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(s){return!!getIteratorFn(s)}function isIterator(s){return s&&\"function\"==typeof s.next}function getIterator(s){var o=getIteratorFn(s);return o&&o.call(s)}function getIteratorFn(s){var o=s&&(z&&s[z]||s[Y]);if(\"function\"==typeof o)return o}function isArrayLike(s){return s&&\"number\"==typeof s.length}function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():seqFromValue(s)}function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isIterable(s)?isKeyed(s)?s.toSeq():s.fromEntrySeq():keyedSeqFromValue(s)}function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s.toIndexedSeq():indexedSeqFromValue(s)}function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s:indexedSeqFromValue(s)).toSetSeq()}Iterator.prototype.toString=function(){return\"[Iterator]\"},Iterator.KEYS=$,Iterator.VALUES=V,Iterator.ENTRIES=U,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[Z]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(s,o){return seqIterate(this,s,o,!0)},Seq.prototype.__iterator=function(s,o){return seqIterator(this,s,o,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\")},IndexedSeq.prototype.__iterate=function(s,o){return seqIterate(this,s,o,!1)},IndexedSeq.prototype.__iterator=function(s,o){return seqIterator(this,s,o,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ee,ie,ae,ce=\"@@__IMMUTABLE_SEQ__@@\";function ArraySeq(s){this._array=s,this.size=s.length}function ObjectSeq(s){var o=Object.keys(s);this._object=s,this._keys=o,this.size=o.length}function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}function isSeq(s){return!(!s||!s[ce])}function emptySequence(){return ee||(ee=new ArraySeq([]))}function keyedSeqFromValue(s){var o=Array.isArray(s)?new ArraySeq(s).fromEntrySeq():isIterator(s)?new IteratorSeq(s).fromEntrySeq():hasIterator(s)?new IterableSeq(s).fromEntrySeq():\"object\"==typeof s?new ObjectSeq(s):void 0;if(!o)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+s);return o}function indexedSeqFromValue(s){var o=maybeIndexedSeqFromValue(s);if(!o)throw new TypeError(\"Expected Array or iterable object of values: \"+s);return o}function seqFromValue(s){var o=maybeIndexedSeqFromValue(s)||\"object\"==typeof s&&new ObjectSeq(s);if(!o)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+s);return o}function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(s):isIterator(s)?new IteratorSeq(s):hasIterator(s)?new IterableSeq(s):void 0}function seqIterate(s,o,i,a){var u=s._cache;if(u){for(var _=u.length-1,w=0;w<=_;w++){var x=u[i?_-w:w];if(!1===o(x[1],a?x[0]:w,s))return w+1}return w}return s.__iterateUncached(o,i)}function seqIterator(s,o,i,a){var u=s._cache;if(u){var _=u.length-1,w=0;return new Iterator((function(){var s=u[i?_-w:w];return w++>_?iteratorDone():iteratorValue(o,a?s[0]:w-1,s[1])}))}return s.__iteratorUncached(o,i)}function fromJS(s,o){return o?fromJSWith(o,s,\"\",{\"\":s}):fromJSDefault(s)}function fromJSWith(s,o,i,a){return Array.isArray(o)?s.call(a,i,IndexedSeq(o).map((function(i,a){return fromJSWith(s,i,a,o)}))):isPlainObj(o)?s.call(a,i,KeyedSeq(o).map((function(i,a){return fromJSWith(s,i,a,o)}))):o}function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(fromJSDefault).toList():isPlainObj(s)?KeyedSeq(s).map(fromJSDefault).toMap():s}function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.constructor)}function is(s,o){if(s===o||s!=s&&o!=o)return!0;if(!s||!o)return!1;if(\"function\"==typeof s.valueOf&&\"function\"==typeof o.valueOf){if((s=s.valueOf())===(o=o.valueOf())||s!=s&&o!=o)return!0;if(!s||!o)return!1}return!(\"function\"!=typeof s.equals||\"function\"!=typeof o.equals||!s.equals(o))}function deepEqual(s,o){if(s===o)return!0;if(!isIterable(o)||void 0!==s.size&&void 0!==o.size&&s.size!==o.size||void 0!==s.__hash&&void 0!==o.__hash&&s.__hash!==o.__hash||isKeyed(s)!==isKeyed(o)||isIndexed(s)!==isIndexed(o)||isOrdered(s)!==isOrdered(o))return!1;if(0===s.size&&0===o.size)return!0;var i=!isAssociative(s);if(isOrdered(s)){var a=s.entries();return o.every((function(s,o){var u=a.next().value;return u&&is(u[1],s)&&(i||is(u[0],o))}))&&a.next().done}var u=!1;if(void 0===s.size)if(void 0===o.size)\"function\"==typeof s.cacheResult&&s.cacheResult();else{u=!0;var _=s;s=o,o=_}var w=!0,x=o.__iterate((function(o,a){if(i?!s.has(o):u?!is(o,s.get(a,j)):!is(s.get(a,j),o))return w=!1,!1}));return w&&s.size===x}function Repeat(s,o){if(!(this instanceof Repeat))return new Repeat(s,o);if(this._value=s,this.size=void 0===o?1/0:Math.max(0,o),0===this.size){if(ie)return ie;ie=this}}function invariant(s,o){if(!s)throw new Error(o)}function Range(s,o,i){if(!(this instanceof Range))return new Range(s,o,i);if(invariant(0!==i,\"Cannot step a Range by 0\"),s=s||0,void 0===o&&(o=1/0),i=void 0===i?1:Math.abs(i),o<s&&(i=-i),this._start=s,this._end=o,this._step=i,this.size=Math.max(0,Math.ceil((o-s)/i-1)+1),0===this.size){if(ae)return ae;ae=this}}function Collection(){throw TypeError(\"Abstract\")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[ce]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(s,o){return this.has(s)?this._array[wrapIndex(this,s)]:o},ArraySeq.prototype.__iterate=function(s,o){for(var i=this._array,a=i.length-1,u=0;u<=a;u++)if(!1===s(i[o?a-u:u],u,this))return u+1;return u},ArraySeq.prototype.__iterator=function(s,o){var i=this._array,a=i.length-1,u=0;return new Iterator((function(){return u>a?iteratorDone():iteratorValue(s,u,i[o?a-u++:u++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(s,o){return void 0===o||this.has(s)?this._object[s]:o},ObjectSeq.prototype.has=function(s){return this._object.hasOwnProperty(s)},ObjectSeq.prototype.__iterate=function(s,o){for(var i=this._object,a=this._keys,u=a.length-1,_=0;_<=u;_++){var w=a[o?u-_:_];if(!1===s(i[w],w,this))return _+1}return _},ObjectSeq.prototype.__iterator=function(s,o){var i=this._object,a=this._keys,u=a.length-1,_=0;return new Iterator((function(){var w=a[o?u-_:_];return _++>u?iteratorDone():iteratorValue(s,w,i[w])}))},ObjectSeq.prototype[u]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(s,o){if(o)return this.cacheResult().__iterate(s,o);var i=getIterator(this._iterable),a=0;if(isIterator(i))for(var u;!(u=i.next()).done&&!1!==s(u.value,a++,this););return a},IterableSeq.prototype.__iteratorUncached=function(s,o){if(o)return this.cacheResult().__iterator(s,o);var i=getIterator(this._iterable);if(!isIterator(i))return new Iterator(iteratorDone);var a=0;return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,a++,o.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(s,o){if(o)return this.cacheResult().__iterate(s,o);for(var i,a=this._iterator,u=this._iteratorCache,_=0;_<u.length;)if(!1===s(u[_],_++,this))return _;for(;!(i=a.next()).done;){var w=i.value;if(u[_]=w,!1===s(w,_++,this))break}return _},IteratorSeq.prototype.__iteratorUncached=function(s,o){if(o)return this.cacheResult().__iterator(s,o);var i=this._iterator,a=this._iteratorCache,u=0;return new Iterator((function(){if(u>=a.length){var o=i.next();if(o.done)return o;a[u]=o.value}return iteratorValue(s,u,a[u++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},Repeat.prototype.get=function(s,o){return this.has(s)?this._value:o},Repeat.prototype.includes=function(s){return is(this._value,s)},Repeat.prototype.slice=function(s,o){var i=this.size;return wholeSlice(s,o,i)?this:new Repeat(this._value,resolveEnd(o,i)-resolveBegin(s,i))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(s){return is(this._value,s)?0:-1},Repeat.prototype.lastIndexOf=function(s){return is(this._value,s)?this.size:-1},Repeat.prototype.__iterate=function(s,o){for(var i=0;i<this.size;i++)if(!1===s(this._value,i,this))return i+1;return i},Repeat.prototype.__iterator=function(s,o){var i=this,a=0;return new Iterator((function(){return a<i.size?iteratorValue(s,a++,i._value):iteratorDone()}))},Repeat.prototype.equals=function(s){return s instanceof Repeat?is(this._value,s._value):deepEqual(s)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\"},Range.prototype.get=function(s,o){return this.has(s)?this._start+wrapIndex(this,s)*this._step:o},Range.prototype.includes=function(s){var o=(s-this._start)/this._step;return o>=0&&o<this.size&&o===Math.floor(o)},Range.prototype.slice=function(s,o){return wholeSlice(s,o,this.size)?this:(s=resolveBegin(s,this.size),(o=resolveEnd(o,this.size))<=s?new Range(0,0):new Range(this.get(s,this._end),this.get(o,this._end),this._step))},Range.prototype.indexOf=function(s){var o=s-this._start;if(o%this._step==0){var i=o/this._step;if(i>=0&&i<this.size)return i}return-1},Range.prototype.lastIndexOf=function(s){return this.indexOf(s)},Range.prototype.__iterate=function(s,o){for(var i=this.size-1,a=this._step,u=o?this._start+i*a:this._start,_=0;_<=i;_++){if(!1===s(u,_,this))return _+1;u+=o?-a:a}return _},Range.prototype.__iterator=function(s,o){var i=this.size-1,a=this._step,u=o?this._start+i*a:this._start,_=0;return new Iterator((function(){var w=u;return u+=o?-a:a,_>i?iteratorDone():iteratorValue(s,_++,w)}))},Range.prototype.equals=function(s){return s instanceof Range?this._start===s._start&&this._end===s._end&&this._step===s._step:deepEqual(this,s)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var le=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(s,o){var i=65535&(s|=0),a=65535&(o|=0);return i*a+((s>>>16)*a+i*(o>>>16)<<16>>>0)|0};function smi(s){return s>>>1&1073741824|3221225471&s}function hash(s){if(!1===s||null==s)return 0;if(\"function\"==typeof s.valueOf&&(!1===(s=s.valueOf())||null==s))return 0;if(!0===s)return 1;var o=typeof s;if(\"number\"===o){if(s!=s||s===1/0)return 0;var i=0|s;for(i!==s&&(i^=4294967295*s);s>4294967295;)i^=s/=4294967295;return smi(i)}if(\"string\"===o)return s.length>Se?cachedHashString(s):hashString(s);if(\"function\"==typeof s.hashCode)return s.hashCode();if(\"object\"===o)return hashJSObj(s);if(\"function\"==typeof s.toString)return hashString(s.toString());throw new Error(\"Value type \"+o+\" cannot be hashed.\")}function cachedHashString(s){var o=Pe[s];return void 0===o&&(o=hashString(s),xe===we&&(xe=0,Pe={}),xe++,Pe[s]=o),o}function hashString(s){for(var o=0,i=0;i<s.length;i++)o=31*o+s.charCodeAt(i)|0;return smi(o)}function hashJSObj(s){var o;if(ye&&void 0!==(o=fe.get(s)))return o;if(void 0!==(o=s[_e]))return o;if(!de){if(void 0!==(o=s.propertyIsEnumerable&&s.propertyIsEnumerable[_e]))return o;if(void 0!==(o=getIENodeHash(s)))return o}if(o=++be,1073741824&be&&(be=0),ye)fe.set(s,o);else{if(void 0!==pe&&!1===pe(s))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(de)Object.defineProperty(s,_e,{enumerable:!1,configurable:!1,writable:!1,value:o});else if(void 0!==s.propertyIsEnumerable&&s.propertyIsEnumerable===s.constructor.prototype.propertyIsEnumerable)s.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},s.propertyIsEnumerable[_e]=o;else{if(void 0===s.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");s[_e]=o}}return o}var pe=Object.isExtensible,de=function(){try{return Object.defineProperty({},\"@\",{}),!0}catch(s){return!1}}();function getIENodeHash(s){if(s&&s.nodeType>0)switch(s.nodeType){case 1:return s.uniqueID;case 9:return s.documentElement&&s.documentElement.uniqueID}}var fe,ye=\"function\"==typeof WeakMap;ye&&(fe=new WeakMap);var be=0,_e=\"__immutablehash__\";\"function\"==typeof Symbol&&(_e=Symbol(_e));var Se=16,we=255,xe=0,Pe={};function assertNotInfinite(s){invariant(s!==1/0,\"Cannot perform this action with an infinite size.\")}function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:emptyMap().withMutations((function(o){var i=KeyedIterable(s);assertNotInfinite(i.size),i.forEach((function(s,i){return o.set(i,s)}))}))}function isMap(s){return!(!s||!s[Re])}createClass(Map,KeyedCollection),Map.of=function(){var o=s.call(arguments,0);return emptyMap().withMutations((function(s){for(var i=0;i<o.length;i+=2){if(i+1>=o.length)throw new Error(\"Missing value for key: \"+o[i]);s.set(o[i],o[i+1])}}))},Map.prototype.toString=function(){return this.__toString(\"Map {\",\"}\")},Map.prototype.get=function(s,o){return this._root?this._root.get(0,void 0,s,o):o},Map.prototype.set=function(s,o){return updateMap(this,s,o)},Map.prototype.setIn=function(s,o){return this.updateIn(s,j,(function(){return o}))},Map.prototype.remove=function(s){return updateMap(this,s,j)},Map.prototype.deleteIn=function(s){return this.updateIn(s,(function(){return j}))},Map.prototype.update=function(s,o,i){return 1===arguments.length?s(this):this.updateIn([s],o,i)},Map.prototype.updateIn=function(s,o,i){i||(i=o,o=void 0);var a=updateInDeepMap(this,forceIterator(s),o,i);return a===j?void 0:a},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(o){return mergeIntoMapWith(this,o,s.call(arguments,1))},Map.prototype.mergeIn=function(o){var i=s.call(arguments,1);return this.updateIn(o,emptyMap(),(function(s){return\"function\"==typeof s.merge?s.merge.apply(s,i):i[i.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(o){var i=s.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(o),i)},Map.prototype.mergeDeepIn=function(o){var i=s.call(arguments,1);return this.updateIn(o,emptyMap(),(function(s){return\"function\"==typeof s.mergeDeep?s.mergeDeep.apply(s,i):i[i.length-1]}))},Map.prototype.sort=function(s){return OrderedMap(sortFactory(this,s))},Map.prototype.sortBy=function(s,o){return OrderedMap(sortFactory(this,o,s))},Map.prototype.withMutations=function(s){var o=this.asMutable();return s(o),o.wasAltered()?o.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(s,o){return new MapIterator(this,s,o)},Map.prototype.__iterate=function(s,o){var i=this,a=0;return this._root&&this._root.iterate((function(o){return a++,s(o[1],o[0],i)}),o),a},Map.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeMap(this.size,this._root,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Map.isMap=isMap;var Te,Re=\"@@__IMMUTABLE_MAP__@@\",$e=Map.prototype;function ArrayMapNode(s,o){this.ownerID=s,this.entries=o}function BitmapIndexedNode(s,o,i){this.ownerID=s,this.bitmap=o,this.nodes=i}function HashArrayMapNode(s,o,i){this.ownerID=s,this.count=o,this.nodes=i}function HashCollisionNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entries=i}function ValueNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entry=i}function MapIterator(s,o,i){this._type=o,this._reverse=i,this._stack=s._root&&mapIteratorFrame(s._root)}function mapIteratorValue(s,o){return iteratorValue(s,o[0],o[1])}function mapIteratorFrame(s,o){return{node:s,index:0,__prev:o}}function makeMap(s,o,i,a){var u=Object.create($e);return u.size=s,u._root=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyMap(){return Te||(Te=makeMap(0))}function updateMap(s,o,i){var a,u;if(s._root){var _=MakeRef(L),w=MakeRef(B);if(a=updateNode(s._root,s.__ownerID,0,void 0,o,i,_,w),!w.value)return s;u=s.size+(_.value?i===j?-1:1:0)}else{if(i===j)return s;u=1,a=new ArrayMapNode(s.__ownerID,[[o,i]])}return s.__ownerID?(s.size=u,s._root=a,s.__hash=void 0,s.__altered=!0,s):a?makeMap(u,a):emptyMap()}function updateNode(s,o,i,a,u,_,w,x){return s?s.update(o,i,a,u,_,w,x):_===j?s:(SetRef(x),SetRef(w),new ValueNode(o,a,[u,_]))}function isLeafNode(s){return s.constructor===ValueNode||s.constructor===HashCollisionNode}function mergeIntoNode(s,o,i,a,u){if(s.keyHash===a)return new HashCollisionNode(o,a,[s.entry,u]);var _,x=(0===i?s.keyHash:s.keyHash>>>i)&C,j=(0===i?a:a>>>i)&C;return new BitmapIndexedNode(o,1<<x|1<<j,x===j?[mergeIntoNode(s,o,i+w,a,u)]:(_=new ValueNode(o,a,u),x<j?[s,_]:[_,s]))}function createNodes(s,o,i,a){s||(s=new OwnerID);for(var u=new ValueNode(s,hash(i),[i,a]),_=0;_<o.length;_++){var w=o[_];u=u.update(s,0,void 0,w[0],w[1])}return u}function packNodes(s,o,i,a){for(var u=0,_=0,w=new Array(i),x=0,C=1,j=o.length;x<j;x++,C<<=1){var L=o[x];void 0!==L&&x!==a&&(u|=C,w[_++]=L)}return new BitmapIndexedNode(s,u,w)}function expandNodes(s,o,i,a,u){for(var _=0,w=new Array(x),C=0;0!==i;C++,i>>>=1)w[C]=1&i?o[_++]:void 0;return w[a]=u,new HashArrayMapNode(s,_+1,w)}function mergeIntoMapWith(s,o,i){for(var a=[],u=0;u<i.length;u++){var _=i[u],w=KeyedIterable(_);isIterable(_)||(w=w.map((function(s){return fromJS(s)}))),a.push(w)}return mergeIntoCollectionWith(s,o,a)}function deepMerger(s,o,i){return s&&s.mergeDeep&&isIterable(o)?s.mergeDeep(o):is(s,o)?s:o}function deepMergerWith(s){return function(o,i,a){if(o&&o.mergeDeepWith&&isIterable(i))return o.mergeDeepWith(s,i);var u=s(o,i,a);return is(o,u)?o:u}}function mergeIntoCollectionWith(s,o,i){return 0===(i=i.filter((function(s){return 0!==s.size}))).length?s:0!==s.size||s.__ownerID||1!==i.length?s.withMutations((function(s){for(var a=o?function(i,a){s.update(a,j,(function(s){return s===j?i:o(s,i,a)}))}:function(o,i){s.set(i,o)},u=0;u<i.length;u++)i[u].forEach(a)})):s.constructor(i[0])}function updateInDeepMap(s,o,i,a){var u=s===j,_=o.next();if(_.done){var w=u?i:s,x=a(w);return x===w?s:x}invariant(u||s&&s.set,\"invalid keyPath\");var C=_.value,L=u?j:s.get(C,j),B=updateInDeepMap(L,o,i,a);return B===L?s:B===j?s.remove(C):(u?emptyMap():s).set(C,B)}function popCount(s){return s=(s=(858993459&(s-=s>>1&1431655765))+(s>>2&858993459))+(s>>4)&252645135,s+=s>>8,127&(s+=s>>16)}function setIn(s,o,i,a){var u=a?s:arrCopy(s);return u[o]=i,u}function spliceIn(s,o,i,a){var u=s.length+1;if(a&&o+1===u)return s[o]=i,s;for(var _=new Array(u),w=0,x=0;x<u;x++)x===o?(_[x]=i,w=-1):_[x]=s[x+w];return _}function spliceOut(s,o,i){var a=s.length-1;if(i&&o===a)return s.pop(),s;for(var u=new Array(a),_=0,w=0;w<a;w++)w===o&&(_=1),u[w]=s[w+_];return u}$e[Re]=!0,$e[_]=$e.remove,$e.removeIn=$e.deleteIn,ArrayMapNode.prototype.get=function(s,o,i,a){for(var u=this.entries,_=0,w=u.length;_<w;_++)if(is(i,u[_][0]))return u[_][1];return a},ArrayMapNode.prototype.update=function(s,o,i,a,u,_,w){for(var x=u===j,C=this.entries,L=0,B=C.length;L<B&&!is(a,C[L][0]);L++);var $=L<B;if($?C[L][1]===u:x)return this;if(SetRef(w),(x||!$)&&SetRef(_),!x||1!==C.length){if(!$&&!x&&C.length>=qe)return createNodes(s,C,a,u);var V=s&&s===this.ownerID,U=V?C:arrCopy(C);return $?x?L===B-1?U.pop():U[L]=U.pop():U[L]=[a,u]:U.push([a,u]),V?(this.entries=U,this):new ArrayMapNode(s,U)}},BitmapIndexedNode.prototype.get=function(s,o,i,a){void 0===o&&(o=hash(i));var u=1<<((0===s?o:o>>>s)&C),_=this.bitmap;return _&u?this.nodes[popCount(_&u-1)].get(s+w,o,i,a):a},BitmapIndexedNode.prototype.update=function(s,o,i,a,u,_,x){void 0===i&&(i=hash(a));var L=(0===o?i:i>>>o)&C,B=1<<L,$=this.bitmap,V=!!($&B);if(!V&&u===j)return this;var U=popCount($&B-1),z=this.nodes,Y=V?z[U]:void 0,Z=updateNode(Y,s,o+w,i,a,u,_,x);if(Z===Y)return this;if(!V&&Z&&z.length>=ze)return expandNodes(s,z,$,L,Z);if(V&&!Z&&2===z.length&&isLeafNode(z[1^U]))return z[1^U];if(V&&Z&&1===z.length&&isLeafNode(Z))return Z;var ee=s&&s===this.ownerID,ie=V?Z?$:$^B:$|B,ae=V?Z?setIn(z,U,Z,ee):spliceOut(z,U,ee):spliceIn(z,U,Z,ee);return ee?(this.bitmap=ie,this.nodes=ae,this):new BitmapIndexedNode(s,ie,ae)},HashArrayMapNode.prototype.get=function(s,o,i,a){void 0===o&&(o=hash(i));var u=(0===s?o:o>>>s)&C,_=this.nodes[u];return _?_.get(s+w,o,i,a):a},HashArrayMapNode.prototype.update=function(s,o,i,a,u,_,x){void 0===i&&(i=hash(a));var L=(0===o?i:i>>>o)&C,B=u===j,$=this.nodes,V=$[L];if(B&&!V)return this;var U=updateNode(V,s,o+w,i,a,u,_,x);if(U===V)return this;var z=this.count;if(V){if(!U&&--z<We)return packNodes(s,$,z,L)}else z++;var Y=s&&s===this.ownerID,Z=setIn($,L,U,Y);return Y?(this.count=z,this.nodes=Z,this):new HashArrayMapNode(s,z,Z)},HashCollisionNode.prototype.get=function(s,o,i,a){for(var u=this.entries,_=0,w=u.length;_<w;_++)if(is(i,u[_][0]))return u[_][1];return a},HashCollisionNode.prototype.update=function(s,o,i,a,u,_,w){void 0===i&&(i=hash(a));var x=u===j;if(i!==this.keyHash)return x?this:(SetRef(w),SetRef(_),mergeIntoNode(this,s,o,i,[a,u]));for(var C=this.entries,L=0,B=C.length;L<B&&!is(a,C[L][0]);L++);var $=L<B;if($?C[L][1]===u:x)return this;if(SetRef(w),(x||!$)&&SetRef(_),x&&2===B)return new ValueNode(s,this.keyHash,C[1^L]);var V=s&&s===this.ownerID,U=V?C:arrCopy(C);return $?x?L===B-1?U.pop():U[L]=U.pop():U[L]=[a,u]:U.push([a,u]),V?(this.entries=U,this):new HashCollisionNode(s,this.keyHash,U)},ValueNode.prototype.get=function(s,o,i,a){return is(i,this.entry[0])?this.entry[1]:a},ValueNode.prototype.update=function(s,o,i,a,u,_,w){var x=u===j,C=is(a,this.entry[0]);return(C?u===this.entry[1]:x)?this:(SetRef(w),x?void SetRef(_):C?s&&s===this.ownerID?(this.entry[1]=u,this):new ValueNode(s,this.keyHash,[a,u]):(SetRef(_),mergeIntoNode(this,s,o,hash(a),[a,u])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(s,o){for(var i=this.entries,a=0,u=i.length-1;a<=u;a++)if(!1===s(i[o?u-a:a]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(s,o){for(var i=this.nodes,a=0,u=i.length-1;a<=u;a++){var _=i[o?u-a:a];if(_&&!1===_.iterate(s,o))return!1}},ValueNode.prototype.iterate=function(s,o){return s(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var s=this._type,o=this._stack;o;){var i,a=o.node,u=o.index++;if(a.entry){if(0===u)return mapIteratorValue(s,a.entry)}else if(a.entries){if(u<=(i=a.entries.length-1))return mapIteratorValue(s,a.entries[this._reverse?i-u:u])}else if(u<=(i=a.nodes.length-1)){var _=a.nodes[this._reverse?i-u:u];if(_){if(_.entry)return mapIteratorValue(s,_.entry);o=this._stack=mapIteratorFrame(_,o)}continue}o=this._stack=this._stack.__prev}return iteratorDone()};var qe=x/4,ze=x/2,We=x/4;function List(s){var o=emptyList();if(null==s)return o;if(isList(s))return s;var i=IndexedIterable(s),a=i.size;return 0===a?o:(assertNotInfinite(a),a>0&&a<x?makeList(0,a,w,null,new VNode(i.toArray())):o.withMutations((function(s){s.setSize(a),i.forEach((function(o,i){return s.set(i,o)}))})))}function isList(s){return!(!s||!s[He])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString(\"List [\",\"]\")},List.prototype.get=function(s,o){if((s=wrapIndex(this,s))>=0&&s<this.size){var i=listNodeFor(this,s+=this._origin);return i&&i.array[s&C]}return o},List.prototype.set=function(s,o){return updateList(this,s,o)},List.prototype.remove=function(s){return this.has(s)?0===s?this.shift():s===this.size-1?this.pop():this.splice(s,1):this},List.prototype.insert=function(s,o){return this.splice(s,0,o)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=w,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var s=arguments,o=this.size;return this.withMutations((function(i){setListBounds(i,0,o+s.length);for(var a=0;a<s.length;a++)i.set(o+a,s[a])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var s=arguments;return this.withMutations((function(o){setListBounds(o,-s.length);for(var i=0;i<s.length;i++)o.set(i,s[i])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(o){return mergeIntoListWith(this,o,s.call(arguments,1))},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(o){var i=s.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(o),i)},List.prototype.setSize=function(s){return setListBounds(this,0,s)},List.prototype.slice=function(s,o){var i=this.size;return wholeSlice(s,o,i)?this:setListBounds(this,resolveBegin(s,i),resolveEnd(o,i))},List.prototype.__iterator=function(s,o){var i=0,a=iterateList(this,o);return new Iterator((function(){var o=a();return o===et?iteratorDone():iteratorValue(s,i++,o)}))},List.prototype.__iterate=function(s,o){for(var i,a=0,u=iterateList(this,o);(i=u())!==et&&!1!==s(i,a++,this););return a},List.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeList(this._origin,this._capacity,this._level,this._root,this._tail,s,this.__hash):(this.__ownerID=s,this)},List.isList=isList;var He=\"@@__IMMUTABLE_LIST__@@\",Ye=List.prototype;function VNode(s,o){this.array=s,this.ownerID=o}Ye[He]=!0,Ye[_]=Ye.remove,Ye.setIn=$e.setIn,Ye.deleteIn=Ye.removeIn=$e.removeIn,Ye.update=$e.update,Ye.updateIn=$e.updateIn,Ye.mergeIn=$e.mergeIn,Ye.mergeDeepIn=$e.mergeDeepIn,Ye.withMutations=$e.withMutations,Ye.asMutable=$e.asMutable,Ye.asImmutable=$e.asImmutable,Ye.wasAltered=$e.wasAltered,VNode.prototype.removeBefore=function(s,o,i){if(i===o?1<<o:0===this.array.length)return this;var a=i>>>o&C;if(a>=this.array.length)return new VNode([],s);var u,_=0===a;if(o>0){var x=this.array[a];if((u=x&&x.removeBefore(s,o-w,i))===x&&_)return this}if(_&&!u)return this;var j=editableVNode(this,s);if(!_)for(var L=0;L<a;L++)j.array[L]=void 0;return u&&(j.array[a]=u),j},VNode.prototype.removeAfter=function(s,o,i){if(i===(o?1<<o:0)||0===this.array.length)return this;var a,u=i-1>>>o&C;if(u>=this.array.length)return this;if(o>0){var _=this.array[u];if((a=_&&_.removeAfter(s,o-w,i))===_&&u===this.array.length-1)return this}var x=editableVNode(this,s);return x.array.splice(u+1),a&&(x.array[u]=a),x};var Xe,Qe,et={};function iterateList(s,o){var i=s._origin,a=s._capacity,u=getTailOffset(a),_=s._tail;return iterateNodeOrLeaf(s._root,s._level,0);function iterateNodeOrLeaf(s,o,i){return 0===o?iterateLeaf(s,i):iterateNode(s,o,i)}function iterateLeaf(s,w){var C=w===u?_&&_.array:s&&s.array,j=w>i?0:i-w,L=a-w;return L>x&&(L=x),function(){if(j===L)return et;var s=o?--L:j++;return C&&C[s]}}function iterateNode(s,u,_){var C,j=s&&s.array,L=_>i?0:i-_>>u,B=1+(a-_>>u);return B>x&&(B=x),function(){for(;;){if(C){var s=C();if(s!==et)return s;C=null}if(L===B)return et;var i=o?--B:L++;C=iterateNodeOrLeaf(j&&j[i],u-w,_+(i<<u))}}}}function makeList(s,o,i,a,u,_,w){var x=Object.create(Ye);return x.size=o-s,x._origin=s,x._capacity=o,x._level=i,x._root=a,x._tail=u,x.__ownerID=_,x.__hash=w,x.__altered=!1,x}function emptyList(){return Xe||(Xe=makeList(0,0,w))}function updateList(s,o,i){if((o=wrapIndex(s,o))!=o)return s;if(o>=s.size||o<0)return s.withMutations((function(s){o<0?setListBounds(s,o).set(0,i):setListBounds(s,0,o+1).set(o,i)}));o+=s._origin;var a=s._tail,u=s._root,_=MakeRef(B);return o>=getTailOffset(s._capacity)?a=updateVNode(a,s.__ownerID,0,o,i,_):u=updateVNode(u,s.__ownerID,s._level,o,i,_),_.value?s.__ownerID?(s._root=u,s._tail=a,s.__hash=void 0,s.__altered=!0,s):makeList(s._origin,s._capacity,s._level,u,a):s}function updateVNode(s,o,i,a,u,_){var x,j=a>>>i&C,L=s&&j<s.array.length;if(!L&&void 0===u)return s;if(i>0){var B=s&&s.array[j],$=updateVNode(B,o,i-w,a,u,_);return $===B?s:((x=editableVNode(s,o)).array[j]=$,x)}return L&&s.array[j]===u?s:(SetRef(_),x=editableVNode(s,o),void 0===u&&j===x.array.length-1?x.array.pop():x.array[j]=u,x)}function editableVNode(s,o){return o&&s&&o===s.ownerID?s:new VNode(s?s.array.slice():[],o)}function listNodeFor(s,o){if(o>=getTailOffset(s._capacity))return s._tail;if(o<1<<s._level+w){for(var i=s._root,a=s._level;i&&a>0;)i=i.array[o>>>a&C],a-=w;return i}}function setListBounds(s,o,i){void 0!==o&&(o|=0),void 0!==i&&(i|=0);var a=s.__ownerID||new OwnerID,u=s._origin,_=s._capacity,x=u+o,j=void 0===i?_:i<0?_+i:u+i;if(x===u&&j===_)return s;if(x>=j)return s.clear();for(var L=s._level,B=s._root,$=0;x+$<0;)B=new VNode(B&&B.array.length?[void 0,B]:[],a),$+=1<<(L+=w);$&&(x+=$,u+=$,j+=$,_+=$);for(var V=getTailOffset(_),U=getTailOffset(j);U>=1<<L+w;)B=new VNode(B&&B.array.length?[B]:[],a),L+=w;var z=s._tail,Y=U<V?listNodeFor(s,j-1):U>V?new VNode([],a):z;if(z&&U>V&&x<_&&z.array.length){for(var Z=B=editableVNode(B,a),ee=L;ee>w;ee-=w){var ie=V>>>ee&C;Z=Z.array[ie]=editableVNode(Z.array[ie],a)}Z.array[V>>>w&C]=z}if(j<_&&(Y=Y&&Y.removeAfter(a,0,j)),x>=U)x-=U,j-=U,L=w,B=null,Y=Y&&Y.removeBefore(a,0,x);else if(x>u||U<V){for($=0;B;){var ae=x>>>L&C;if(ae!==U>>>L&C)break;ae&&($+=(1<<L)*ae),L-=w,B=B.array[ae]}B&&x>u&&(B=B.removeBefore(a,L,x-$)),B&&U<V&&(B=B.removeAfter(a,L,U-$)),$&&(x-=$,j-=$)}return s.__ownerID?(s.size=j-x,s._origin=x,s._capacity=j,s._level=L,s._root=B,s._tail=Y,s.__hash=void 0,s.__altered=!0,s):makeList(x,j,L,B,Y)}function mergeIntoListWith(s,o,i){for(var a=[],u=0,_=0;_<i.length;_++){var w=i[_],x=IndexedIterable(w);x.size>u&&(u=x.size),isIterable(w)||(x=x.map((function(s){return fromJS(s)}))),a.push(x)}return u>s.size&&(s=s.setSize(u)),mergeIntoCollectionWith(s,o,a)}function getTailOffset(s){return s<x?0:s-1>>>w<<w}function OrderedMap(s){return null==s?emptyOrderedMap():isOrderedMap(s)?s:emptyOrderedMap().withMutations((function(o){var i=KeyedIterable(s);assertNotInfinite(i.size),i.forEach((function(s,i){return o.set(i,s)}))}))}function isOrderedMap(s){return isMap(s)&&isOrdered(s)}function makeOrderedMap(s,o,i,a){var u=Object.create(OrderedMap.prototype);return u.size=s?s.size:0,u._map=s,u._list=o,u.__ownerID=i,u.__hash=a,u}function emptyOrderedMap(){return Qe||(Qe=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(s,o,i){var a,u,_=s._map,w=s._list,C=_.get(o),L=void 0!==C;if(i===j){if(!L)return s;w.size>=x&&w.size>=2*_.size?(a=(u=w.filter((function(s,o){return void 0!==s&&C!==o}))).toKeyedSeq().map((function(s){return s[0]})).flip().toMap(),s.__ownerID&&(a.__ownerID=u.__ownerID=s.__ownerID)):(a=_.remove(o),u=C===w.size-1?w.pop():w.set(C,void 0))}else if(L){if(i===w.get(C)[1])return s;a=_,u=w.set(C,[o,i])}else a=_.set(o,w.size),u=w.set(w.size,[o,i]);return s.__ownerID?(s.size=a.size,s._map=a,s._list=u,s.__hash=void 0,s):makeOrderedMap(a,u)}function ToKeyedSequence(s,o){this._iter=s,this._useKeys=o,this.size=s.size}function ToIndexedSequence(s){this._iter=s,this.size=s.size}function ToSetSequence(s){this._iter=s,this.size=s.size}function FromEntriesSequence(s){this._iter=s,this.size=s.size}function flipFactory(s){var o=makeSequence(s);return o._iter=s,o.size=s.size,o.flip=function(){return s},o.reverse=function(){var o=s.reverse.apply(this);return o.flip=function(){return s.reverse()},o},o.has=function(o){return s.includes(o)},o.includes=function(o){return s.has(o)},o.cacheResult=cacheResultThrough,o.__iterateUncached=function(o,i){var a=this;return s.__iterate((function(s,i){return!1!==o(i,s,a)}),i)},o.__iteratorUncached=function(o,i){if(o===U){var a=s.__iterator(o,i);return new Iterator((function(){var s=a.next();if(!s.done){var o=s.value[0];s.value[0]=s.value[1],s.value[1]=o}return s}))}return s.__iterator(o===V?$:V,i)},o}function mapFactory(s,o,i){var a=makeSequence(s);return a.size=s.size,a.has=function(o){return s.has(o)},a.get=function(a,u){var _=s.get(a,j);return _===j?u:o.call(i,_,a,s)},a.__iterateUncached=function(a,u){var _=this;return s.__iterate((function(s,u,w){return!1!==a(o.call(i,s,u,w),u,_)}),u)},a.__iteratorUncached=function(a,u){var _=s.__iterator(U,u);return new Iterator((function(){var u=_.next();if(u.done)return u;var w=u.value,x=w[0];return iteratorValue(a,x,o.call(i,w[1],x,s),u)}))},a}function reverseFactory(s,o){var i=makeSequence(s);return i._iter=s,i.size=s.size,i.reverse=function(){return s},s.flip&&(i.flip=function(){var o=flipFactory(s);return o.reverse=function(){return s.flip()},o}),i.get=function(i,a){return s.get(o?i:-1-i,a)},i.has=function(i){return s.has(o?i:-1-i)},i.includes=function(o){return s.includes(o)},i.cacheResult=cacheResultThrough,i.__iterate=function(o,i){var a=this;return s.__iterate((function(s,i){return o(s,i,a)}),!i)},i.__iterator=function(o,i){return s.__iterator(o,!i)},i}function filterFactory(s,o,i,a){var u=makeSequence(s);return a&&(u.has=function(a){var u=s.get(a,j);return u!==j&&!!o.call(i,u,a,s)},u.get=function(a,u){var _=s.get(a,j);return _!==j&&o.call(i,_,a,s)?_:u}),u.__iterateUncached=function(u,_){var w=this,x=0;return s.__iterate((function(s,_,C){if(o.call(i,s,_,C))return x++,u(s,a?_:x-1,w)}),_),x},u.__iteratorUncached=function(u,_){var w=s.__iterator(U,_),x=0;return new Iterator((function(){for(;;){var _=w.next();if(_.done)return _;var C=_.value,j=C[0],L=C[1];if(o.call(i,L,j,s))return iteratorValue(u,a?j:x++,L,_)}}))},u}function countByFactory(s,o,i){var a=Map().asMutable();return s.__iterate((function(u,_){a.update(o.call(i,u,_,s),0,(function(s){return s+1}))})),a.asImmutable()}function groupByFactory(s,o,i){var a=isKeyed(s),u=(isOrdered(s)?OrderedMap():Map()).asMutable();s.__iterate((function(_,w){u.update(o.call(i,_,w,s),(function(s){return(s=s||[]).push(a?[w,_]:_),s}))}));var _=iterableClass(s);return u.map((function(o){return reify(s,_(o))}))}function sliceFactory(s,o,i,a){var u=s.size;if(void 0!==o&&(o|=0),void 0!==i&&(i===1/0?i=u:i|=0),wholeSlice(o,i,u))return s;var _=resolveBegin(o,u),w=resolveEnd(i,u);if(_!=_||w!=w)return sliceFactory(s.toSeq().cacheResult(),o,i,a);var x,C=w-_;C==C&&(x=C<0?0:C);var j=makeSequence(s);return j.size=0===x?x:s.size&&x||void 0,!a&&isSeq(s)&&x>=0&&(j.get=function(o,i){return(o=wrapIndex(this,o))>=0&&o<x?s.get(o+_,i):i}),j.__iterateUncached=function(o,i){var u=this;if(0===x)return 0;if(i)return this.cacheResult().__iterate(o,i);var w=0,C=!0,j=0;return s.__iterate((function(s,i){if(!C||!(C=w++<_))return j++,!1!==o(s,a?i:j-1,u)&&j!==x})),j},j.__iteratorUncached=function(o,i){if(0!==x&&i)return this.cacheResult().__iterator(o,i);var u=0!==x&&s.__iterator(o,i),w=0,C=0;return new Iterator((function(){for(;w++<_;)u.next();if(++C>x)return iteratorDone();var s=u.next();return a||o===V?s:iteratorValue(o,C-1,o===$?void 0:s.value[1],s)}))},j}function takeWhileFactory(s,o,i){var a=makeSequence(s);return a.__iterateUncached=function(a,u){var _=this;if(u)return this.cacheResult().__iterate(a,u);var w=0;return s.__iterate((function(s,u,x){return o.call(i,s,u,x)&&++w&&a(s,u,_)})),w},a.__iteratorUncached=function(a,u){var _=this;if(u)return this.cacheResult().__iterator(a,u);var w=s.__iterator(U,u),x=!0;return new Iterator((function(){if(!x)return iteratorDone();var s=w.next();if(s.done)return s;var u=s.value,C=u[0],j=u[1];return o.call(i,j,C,_)?a===U?s:iteratorValue(a,C,j,s):(x=!1,iteratorDone())}))},a}function skipWhileFactory(s,o,i,a){var u=makeSequence(s);return u.__iterateUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterate(u,_);var x=!0,C=0;return s.__iterate((function(s,_,j){if(!x||!(x=o.call(i,s,_,j)))return C++,u(s,a?_:C-1,w)})),C},u.__iteratorUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterator(u,_);var x=s.__iterator(U,_),C=!0,j=0;return new Iterator((function(){var s,_,L;do{if((s=x.next()).done)return a||u===V?s:iteratorValue(u,j++,u===$?void 0:s.value[1],s);var B=s.value;_=B[0],L=B[1],C&&(C=o.call(i,L,_,w))}while(C);return u===U?s:iteratorValue(u,_,L,s)}))},u}function concatFactory(s,o){var i=isKeyed(s),a=[s].concat(o).map((function(s){return isIterable(s)?i&&(s=KeyedIterable(s)):s=i?keyedSeqFromValue(s):indexedSeqFromValue(Array.isArray(s)?s:[s]),s})).filter((function(s){return 0!==s.size}));if(0===a.length)return s;if(1===a.length){var u=a[0];if(u===s||i&&isKeyed(u)||isIndexed(s)&&isIndexed(u))return u}var _=new ArraySeq(a);return i?_=_.toKeyedSeq():isIndexed(s)||(_=_.toSetSeq()),(_=_.flatten(!0)).size=a.reduce((function(s,o){if(void 0!==s){var i=o.size;if(void 0!==i)return s+i}}),0),_}function flattenFactory(s,o,i){var a=makeSequence(s);return a.__iterateUncached=function(a,u){var _=0,w=!1;function flatDeep(s,x){var C=this;s.__iterate((function(s,u){return(!o||x<o)&&isIterable(s)?flatDeep(s,x+1):!1===a(s,i?u:_++,C)&&(w=!0),!w}),u)}return flatDeep(s,0),_},a.__iteratorUncached=function(a,u){var _=s.__iterator(a,u),w=[],x=0;return new Iterator((function(){for(;_;){var s=_.next();if(!1===s.done){var C=s.value;if(a===U&&(C=C[1]),o&&!(w.length<o)||!isIterable(C))return i?s:iteratorValue(a,x++,C,s);w.push(_),_=C.__iterator(a,u)}else _=w.pop()}return iteratorDone()}))},a}function flatMapFactory(s,o,i){var a=iterableClass(s);return s.toSeq().map((function(u,_){return a(o.call(i,u,_,s))})).flatten(!0)}function interposeFactory(s,o){var i=makeSequence(s);return i.size=s.size&&2*s.size-1,i.__iterateUncached=function(i,a){var u=this,_=0;return s.__iterate((function(s,a){return(!_||!1!==i(o,_++,u))&&!1!==i(s,_++,u)}),a),_},i.__iteratorUncached=function(i,a){var u,_=s.__iterator(V,a),w=0;return new Iterator((function(){return(!u||w%2)&&(u=_.next()).done?u:w%2?iteratorValue(i,w++,o):iteratorValue(i,w++,u.value,u)}))},i}function sortFactory(s,o,i){o||(o=defaultComparator);var a=isKeyed(s),u=0,_=s.toSeq().map((function(o,a){return[a,o,u++,i?i(o,a,s):o]})).toArray();return _.sort((function(s,i){return o(s[3],i[3])||s[2]-i[2]})).forEach(a?function(s,o){_[o].length=2}:function(s,o){_[o]=s[1]}),a?KeyedSeq(_):isIndexed(s)?IndexedSeq(_):SetSeq(_)}function maxFactory(s,o,i){if(o||(o=defaultComparator),i){var a=s.toSeq().map((function(o,a){return[o,i(o,a,s)]})).reduce((function(s,i){return maxCompare(o,s[1],i[1])?i:s}));return a&&a[0]}return s.reduce((function(s,i){return maxCompare(o,s,i)?i:s}))}function maxCompare(s,o,i){var a=s(i,o);return 0===a&&i!==o&&(null==i||i!=i)||a>0}function zipWithFactory(s,o,i){var a=makeSequence(s);return a.size=new ArraySeq(i).map((function(s){return s.size})).min(),a.__iterate=function(s,o){for(var i,a=this.__iterator(V,o),u=0;!(i=a.next()).done&&!1!==s(i.value,u++,this););return u},a.__iteratorUncached=function(s,a){var u=i.map((function(s){return s=Iterable(s),getIterator(a?s.reverse():s)})),_=0,w=!1;return new Iterator((function(){var i;return w||(i=u.map((function(s){return s.next()})),w=i.some((function(s){return s.done}))),w?iteratorDone():iteratorValue(s,_++,o.apply(null,i.map((function(s){return s.value}))))}))},a}function reify(s,o){return isSeq(s)?o:s.constructor(o)}function validateEntry(s){if(s!==Object(s))throw new TypeError(\"Expected [K, V] tuple: \"+s)}function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?IndexedIterable:SetIterable}function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isIndexed(s)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(s,o){return s>o?1:s<o?-1:0}function forceIterator(s){var o=getIterator(s);if(!o){if(!isArrayLike(s))throw new TypeError(\"Expected iterable or array-like: \"+s);o=getIterator(Iterable(s))}return o}function Record(s,o){var i,a=function Record(_){if(_ instanceof a)return _;if(!(this instanceof a))return new a(_);if(!i){i=!0;var w=Object.keys(s);setProps(u,w),u.size=w.length,u._name=o,u._keys=w,u._defaultValues=s}this._map=Map(_)},u=a.prototype=Object.create(tt);return u.constructor=a,a}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\")},OrderedMap.prototype.get=function(s,o){var i=this._map.get(s);return void 0!==i?this._list.get(i)[1]:o},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(s,o){return updateOrderedMap(this,s,o)},OrderedMap.prototype.remove=function(s){return updateOrderedMap(this,s,j)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(s,o){var i=this;return this._list.__iterate((function(o){return o&&s(o[1],o[0],i)}),o)},OrderedMap.prototype.__iterator=function(s,o){return this._list.fromEntrySeq().__iterator(s,o)},OrderedMap.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var o=this._map.__ensureOwner(s),i=this._list.__ensureOwner(s);return s?makeOrderedMap(o,i,s,this.__hash):(this.__ownerID=s,this._map=o,this._list=i,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[u]=!0,OrderedMap.prototype[_]=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(s,o){return this._iter.get(s,o)},ToKeyedSequence.prototype.has=function(s){return this._iter.has(s)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var s=this,o=reverseFactory(this,!0);return this._useKeys||(o.valueSeq=function(){return s._iter.toSeq().reverse()}),o},ToKeyedSequence.prototype.map=function(s,o){var i=this,a=mapFactory(this,s,o);return this._useKeys||(a.valueSeq=function(){return i._iter.toSeq().map(s,o)}),a},ToKeyedSequence.prototype.__iterate=function(s,o){var i,a=this;return this._iter.__iterate(this._useKeys?function(o,i){return s(o,i,a)}:(i=o?resolveSize(this):0,function(u){return s(u,o?--i:i++,a)}),o)},ToKeyedSequence.prototype.__iterator=function(s,o){if(this._useKeys)return this._iter.__iterator(s,o);var i=this._iter.__iterator(V,o),a=o?resolveSize(this):0;return new Iterator((function(){var u=i.next();return u.done?u:iteratorValue(s,o?--a:a++,u.value,u)}))},ToKeyedSequence.prototype[u]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(s){return this._iter.includes(s)},ToIndexedSequence.prototype.__iterate=function(s,o){var i=this,a=0;return this._iter.__iterate((function(o){return s(o,a++,i)}),o)},ToIndexedSequence.prototype.__iterator=function(s,o){var i=this._iter.__iterator(V,o),a=0;return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,a++,o.value,o)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(s){return this._iter.includes(s)},ToSetSequence.prototype.__iterate=function(s,o){var i=this;return this._iter.__iterate((function(o){return s(o,o,i)}),o)},ToSetSequence.prototype.__iterator=function(s,o){var i=this._iter.__iterator(V,o);return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,o.value,o.value,o)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(s,o){var i=this;return this._iter.__iterate((function(o){if(o){validateEntry(o);var a=isIterable(o);return s(a?o.get(1):o[1],a?o.get(0):o[0],i)}}),o)},FromEntriesSequence.prototype.__iterator=function(s,o){var i=this._iter.__iterator(V,o);return new Iterator((function(){for(;;){var o=i.next();if(o.done)return o;var a=o.value;if(a){validateEntry(a);var u=isIterable(a);return iteratorValue(s,u?a.get(0):a[0],u?a.get(1):a[1],o)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+\" {\",\"}\")},Record.prototype.has=function(s){return this._defaultValues.hasOwnProperty(s)},Record.prototype.get=function(s,o){if(!this.has(s))return o;var i=this._defaultValues[s];return this._map?this._map.get(s,i):i},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var s=this.constructor;return s._empty||(s._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(s,o){if(!this.has(s))throw new Error('Cannot set unknown key \"'+s+'\" on '+recordName(this));if(this._map&&!this._map.has(s)&&o===this._defaultValues[s])return this;var i=this._map&&this._map.set(s,o);return this.__ownerID||i===this._map?this:makeRecord(this,i)},Record.prototype.remove=function(s){if(!this.has(s))return this;var o=this._map&&this._map.remove(s);return this.__ownerID||o===this._map?this:makeRecord(this,o)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(s,o){var i=this;return KeyedIterable(this._defaultValues).map((function(s,o){return i.get(o)})).__iterator(s,o)},Record.prototype.__iterate=function(s,o){var i=this;return KeyedIterable(this._defaultValues).map((function(s,o){return i.get(o)})).__iterate(s,o)},Record.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var o=this._map&&this._map.__ensureOwner(s);return s?makeRecord(this,o,s):(this.__ownerID=s,this._map=o,this)};var tt=Record.prototype;function makeRecord(s,o,i){var a=Object.create(Object.getPrototypeOf(s));return a._map=o,a.__ownerID=i,a}function recordName(s){return s._name||s.constructor.name||\"Record\"}function setProps(s,o){try{o.forEach(setProp.bind(void 0,s))}catch(s){}}function setProp(s,o){Object.defineProperty(s,o,{get:function(){return this.get(o)},set:function(s){invariant(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(o,s)}})}function Set(s){return null==s?emptySet():isSet(s)&&!isOrdered(s)?s:emptySet().withMutations((function(o){var i=SetIterable(s);assertNotInfinite(i.size),i.forEach((function(s){return o.add(s)}))}))}function isSet(s){return!(!s||!s[nt])}tt[_]=tt.remove,tt.deleteIn=tt.removeIn=$e.removeIn,tt.merge=$e.merge,tt.mergeWith=$e.mergeWith,tt.mergeIn=$e.mergeIn,tt.mergeDeep=$e.mergeDeep,tt.mergeDeepWith=$e.mergeDeepWith,tt.mergeDeepIn=$e.mergeDeepIn,tt.setIn=$e.setIn,tt.update=$e.update,tt.updateIn=$e.updateIn,tt.withMutations=$e.withMutations,tt.asMutable=$e.asMutable,tt.asImmutable=$e.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},Set.prototype.toString=function(){return this.__toString(\"Set {\",\"}\")},Set.prototype.has=function(s){return this._map.has(s)},Set.prototype.add=function(s){return updateSet(this,this._map.set(s,!0))},Set.prototype.remove=function(s){return updateSet(this,this._map.remove(s))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var o=s.call(arguments,0);return 0===(o=o.filter((function(s){return 0!==s.size}))).length?this:0!==this.size||this.__ownerID||1!==o.length?this.withMutations((function(s){for(var i=0;i<o.length;i++)SetIterable(o[i]).forEach((function(o){return s.add(o)}))})):this.constructor(o[0])},Set.prototype.intersect=function(){var o=s.call(arguments,0);if(0===o.length)return this;o=o.map((function(s){return SetIterable(s)}));var i=this;return this.withMutations((function(s){i.forEach((function(i){o.every((function(s){return s.includes(i)}))||s.remove(i)}))}))},Set.prototype.subtract=function(){var o=s.call(arguments,0);if(0===o.length)return this;o=o.map((function(s){return SetIterable(s)}));var i=this;return this.withMutations((function(s){i.forEach((function(i){o.some((function(s){return s.includes(i)}))&&s.remove(i)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(o){var i=s.call(arguments,1);return this.union.apply(this,i)},Set.prototype.sort=function(s){return OrderedSet(sortFactory(this,s))},Set.prototype.sortBy=function(s,o){return OrderedSet(sortFactory(this,o,s))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(s,o){var i=this;return this._map.__iterate((function(o,a){return s(a,a,i)}),o)},Set.prototype.__iterator=function(s,o){return this._map.map((function(s,o){return o})).__iterator(s,o)},Set.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var o=this._map.__ensureOwner(s);return s?this.__make(o,s):(this.__ownerID=s,this._map=o,this)},Set.isSet=isSet;var rt,nt=\"@@__IMMUTABLE_SET__@@\",st=Set.prototype;function updateSet(s,o){return s.__ownerID?(s.size=o.size,s._map=o,s):o===s._map?s:0===o.size?s.__empty():s.__make(o)}function makeSet(s,o){var i=Object.create(st);return i.size=s?s.size:0,i._map=s,i.__ownerID=o,i}function emptySet(){return rt||(rt=makeSet(emptyMap()))}function OrderedSet(s){return null==s?emptyOrderedSet():isOrderedSet(s)?s:emptyOrderedSet().withMutations((function(o){var i=SetIterable(s);assertNotInfinite(i.size),i.forEach((function(s){return o.add(s)}))}))}function isOrderedSet(s){return isSet(s)&&isOrdered(s)}st[nt]=!0,st[_]=st.remove,st.mergeDeep=st.merge,st.mergeDeepWith=st.mergeWith,st.withMutations=$e.withMutations,st.asMutable=$e.asMutable,st.asImmutable=$e.asImmutable,st.__empty=emptySet,st.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\")},OrderedSet.isOrderedSet=isOrderedSet;var ot,it=OrderedSet.prototype;function makeOrderedSet(s,o){var i=Object.create(it);return i.size=s?s.size:0,i._map=s,i.__ownerID=o,i}function emptyOrderedSet(){return ot||(ot=makeOrderedSet(emptyOrderedMap()))}function Stack(s){return null==s?emptyStack():isStack(s)?s:emptyStack().unshiftAll(s)}function isStack(s){return!(!s||!s[ct])}it[u]=!0,it.__empty=emptyOrderedSet,it.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\")},Stack.prototype.get=function(s,o){var i=this._head;for(s=wrapIndex(this,s);i&&s--;)i=i.next;return i?i.value:o},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var s=this.size+arguments.length,o=this._head,i=arguments.length-1;i>=0;i--)o={value:arguments[i],next:o};return this.__ownerID?(this.size=s,this._head=o,this.__hash=void 0,this.__altered=!0,this):makeStack(s,o)},Stack.prototype.pushAll=function(s){if(0===(s=IndexedIterable(s)).size)return this;assertNotInfinite(s.size);var o=this.size,i=this._head;return s.reverse().forEach((function(s){o++,i={value:s,next:i}})),this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(o,i)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(s){return this.pushAll(s)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(s,o){if(wholeSlice(s,o,this.size))return this;var i=resolveBegin(s,this.size);if(resolveEnd(o,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,s,o);for(var a=this.size-i,u=this._head;i--;)u=u.next;return this.__ownerID?(this.size=a,this._head=u,this.__hash=void 0,this.__altered=!0,this):makeStack(a,u)},Stack.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeStack(this.size,this._head,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Stack.prototype.__iterate=function(s,o){if(o)return this.reverse().__iterate(s);for(var i=0,a=this._head;a&&!1!==s(a.value,i++,this);)a=a.next;return i},Stack.prototype.__iterator=function(s,o){if(o)return this.reverse().__iterator(s);var i=0,a=this._head;return new Iterator((function(){if(a){var o=a.value;return a=a.next,iteratorValue(s,i++,o)}return iteratorDone()}))},Stack.isStack=isStack;var at,ct=\"@@__IMMUTABLE_STACK__@@\",lt=Stack.prototype;function makeStack(s,o,i,a){var u=Object.create(lt);return u.size=s,u._head=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyStack(){return at||(at=makeStack(0))}function mixin(s,o){var keyCopier=function(i){s.prototype[i]=o[i]};return Object.keys(o).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(o).forEach(keyCopier),s}lt[ct]=!0,lt.withMutations=$e.withMutations,lt.asMutable=$e.asMutable,lt.asImmutable=$e.asImmutable,lt.wasAltered=$e.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var s=new Array(this.size||0);return this.valueSeq().__iterate((function(o,i){s[i]=o})),s},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJS?s.toJS():s})).__toJS()},toJSON:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJSON?s.toJSON():s})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var s={};return this.__iterate((function(o,i){s[i]=o})),s},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(s,o){return 0===this.size?s+o:s+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+o},concat:function(){return reify(this,concatFactory(this,s.call(arguments,0)))},includes:function(s){return this.some((function(o){return is(o,s)}))},entries:function(){return this.__iterator(U)},every:function(s,o){assertNotInfinite(this.size);var i=!0;return this.__iterate((function(a,u,_){if(!s.call(o,a,u,_))return i=!1,!1})),i},filter:function(s,o){return reify(this,filterFactory(this,s,o,!0))},find:function(s,o,i){var a=this.findEntry(s,o);return a?a[1]:i},forEach:function(s,o){return assertNotInfinite(this.size),this.__iterate(o?s.bind(o):s)},join:function(s){assertNotInfinite(this.size),s=void 0!==s?\"\"+s:\",\";var o=\"\",i=!0;return this.__iterate((function(a){i?i=!1:o+=s,o+=null!=a?a.toString():\"\"})),o},keys:function(){return this.__iterator($)},map:function(s,o){return reify(this,mapFactory(this,s,o))},reduce:function(s,o,i){var a,u;return assertNotInfinite(this.size),arguments.length<2?u=!0:a=o,this.__iterate((function(o,_,w){u?(u=!1,a=o):a=s.call(i,a,o,_,w)})),a},reduceRight:function(s,o,i){var a=this.toKeyedSeq().reverse();return a.reduce.apply(a,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(s,o){return reify(this,sliceFactory(this,s,o,!0))},some:function(s,o){return!this.every(not(s),o)},sort:function(s){return reify(this,sortFactory(this,s))},values:function(){return this.__iterator(V)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(s,o){return ensureSize(s?this.toSeq().filter(s,o):this)},countBy:function(s,o){return countByFactory(this,s,o)},equals:function(s){return deepEqual(this,s)},entrySeq:function(){var s=this;if(s._cache)return new ArraySeq(s._cache);var o=s.toSeq().map(entryMapper).toIndexedSeq();return o.fromEntrySeq=function(){return s.toSeq()},o},filterNot:function(s,o){return this.filter(not(s),o)},findEntry:function(s,o,i){var a=i;return this.__iterate((function(i,u,_){if(s.call(o,i,u,_))return a=[u,i],!1})),a},findKey:function(s,o){var i=this.findEntry(s,o);return i&&i[0]},findLast:function(s,o,i){return this.toKeyedSeq().reverse().find(s,o,i)},findLastEntry:function(s,o,i){return this.toKeyedSeq().reverse().findEntry(s,o,i)},findLastKey:function(s,o){return this.toKeyedSeq().reverse().findKey(s,o)},first:function(){return this.find(returnTrue)},flatMap:function(s,o){return reify(this,flatMapFactory(this,s,o))},flatten:function(s){return reify(this,flattenFactory(this,s,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(s,o){return this.find((function(o,i){return is(i,s)}),void 0,o)},getIn:function(s,o){for(var i,a=this,u=forceIterator(s);!(i=u.next()).done;){var _=i.value;if((a=a&&a.get?a.get(_,j):j)===j)return o}return a},groupBy:function(s,o){return groupByFactory(this,s,o)},has:function(s){return this.get(s,j)!==j},hasIn:function(s){return this.getIn(s,j)!==j},isSubset:function(s){return s=\"function\"==typeof s.includes?s:Iterable(s),this.every((function(o){return s.includes(o)}))},isSuperset:function(s){return(s=\"function\"==typeof s.isSubset?s:Iterable(s)).isSubset(this)},keyOf:function(s){return this.findKey((function(o){return is(o,s)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(s){return this.toKeyedSeq().reverse().keyOf(s)},max:function(s){return maxFactory(this,s)},maxBy:function(s,o){return maxFactory(this,o,s)},min:function(s){return maxFactory(this,s?neg(s):defaultNegComparator)},minBy:function(s,o){return maxFactory(this,o?neg(o):defaultNegComparator,s)},rest:function(){return this.slice(1)},skip:function(s){return this.slice(Math.max(0,s))},skipLast:function(s){return reify(this,this.toSeq().reverse().skip(s).reverse())},skipWhile:function(s,o){return reify(this,skipWhileFactory(this,s,o,!0))},skipUntil:function(s,o){return this.skipWhile(not(s),o)},sortBy:function(s,o){return reify(this,sortFactory(this,o,s))},take:function(s){return this.slice(0,Math.max(0,s))},takeLast:function(s){return reify(this,this.toSeq().reverse().take(s).reverse())},takeWhile:function(s,o){return reify(this,takeWhileFactory(this,s,o))},takeUntil:function(s,o){return this.takeWhile(not(s),o)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var ut=Iterable.prototype;ut[o]=!0,ut[Z]=ut.values,ut.__toJS=ut.toArray,ut.__toStringMapper=quoteString,ut.inspect=ut.toSource=function(){return this.toString()},ut.chain=ut.flatMap,ut.contains=ut.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(s,o){var i=this,a=0;return reify(this,this.toSeq().map((function(u,_){return s.call(o,[_,u],a++,i)})).fromEntrySeq())},mapKeys:function(s,o){var i=this;return reify(this,this.toSeq().flip().map((function(a,u){return s.call(o,a,u,i)})).flip())}});var pt=KeyedIterable.prototype;function keyMapper(s,o){return o}function entryMapper(s,o){return[o,s]}function not(s){return function(){return!s.apply(this,arguments)}}function neg(s){return function(){return-s.apply(this,arguments)}}function quoteString(s){return\"string\"==typeof s?JSON.stringify(s):String(s)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(s,o){return s<o?1:s>o?-1:0}function hashIterable(s){if(s.size===1/0)return 0;var o=isOrdered(s),i=isKeyed(s),a=o?1:0;return murmurHashOfSize(s.__iterate(i?o?function(s,o){a=31*a+hashMerge(hash(s),hash(o))|0}:function(s,o){a=a+hashMerge(hash(s),hash(o))|0}:o?function(s){a=31*a+hash(s)|0}:function(s){a=a+hash(s)|0}),a)}function murmurHashOfSize(s,o){return o=le(o,3432918353),o=le(o<<15|o>>>-15,461845907),o=le(o<<13|o>>>-13,5),o=le((o=o+3864292196^s)^o>>>16,2246822507),o=smi((o=le(o^o>>>13,3266489909))^o>>>16)}function hashMerge(s,o){return s^o+2654435769+(s<<6)+(s>>2)}return pt[i]=!0,pt[Z]=ut.entries,pt.__toJS=ut.toObject,pt.__toStringMapper=function(s,o){return JSON.stringify(o)+\": \"+quoteString(s)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(s,o){return reify(this,filterFactory(this,s,o,!1))},findIndex:function(s,o){var i=this.findEntry(s,o);return i?i[0]:-1},indexOf:function(s){var o=this.keyOf(s);return void 0===o?-1:o},lastIndexOf:function(s){var o=this.lastKeyOf(s);return void 0===o?-1:o},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(s,o){return reify(this,sliceFactory(this,s,o,!1))},splice:function(s,o){var i=arguments.length;if(o=Math.max(0|o,0),0===i||2===i&&!o)return this;s=resolveBegin(s,s<0?this.count():this.size);var a=this.slice(0,s);return reify(this,1===i?a:a.concat(arrCopy(arguments,2),this.slice(s+o)))},findLastIndex:function(s,o){var i=this.findLastEntry(s,o);return i?i[0]:-1},first:function(){return this.get(0)},flatten:function(s){return reify(this,flattenFactory(this,s,!1))},get:function(s,o){return(s=wrapIndex(this,s))<0||this.size===1/0||void 0!==this.size&&s>this.size?o:this.find((function(o,i){return i===s}),void 0,o)},has:function(s){return(s=wrapIndex(this,s))>=0&&(void 0!==this.size?this.size===1/0||s<this.size:-1!==this.indexOf(s))},interpose:function(s){return reify(this,interposeFactory(this,s))},interleave:function(){var s=[this].concat(arrCopy(arguments)),o=zipWithFactory(this.toSeq(),IndexedSeq.of,s),i=o.flatten(!0);return o.size&&(i.size=o.size*s.length),reify(this,i)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(s,o){return reify(this,skipWhileFactory(this,s,o,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipWith:function(s){var o=arrCopy(arguments);return o[0]=this,reify(this,zipWithFactory(this,s,o))}}),IndexedIterable.prototype[a]=!0,IndexedIterable.prototype[u]=!0,mixin(SetIterable,{get:function(s,o){return this.has(s)?s:o},includes:function(s){return this.has(s)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=ut.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is,fromJS}}()},9748:(s,o,i)=>{\"use strict\";i(71340);var a=i(92046);s.exports=a.Object.assign},9999:(s,o,i)=>{var a=i(37217),u=i(83729),_=i(16547),w=i(74733),x=i(43838),C=i(93290),j=i(23007),L=i(92271),B=i(48948),$=i(50002),V=i(83349),U=i(5861),z=i(76189),Y=i(77199),Z=i(35529),ee=i(56449),ie=i(3656),ae=i(87730),ce=i(23805),le=i(38440),pe=i(95950),de=i(37241),fe=\"[object Arguments]\",ye=\"[object Function]\",be=\"[object Object]\",_e={};_e[fe]=_e[\"[object Array]\"]=_e[\"[object ArrayBuffer]\"]=_e[\"[object DataView]\"]=_e[\"[object Boolean]\"]=_e[\"[object Date]\"]=_e[\"[object Float32Array]\"]=_e[\"[object Float64Array]\"]=_e[\"[object Int8Array]\"]=_e[\"[object Int16Array]\"]=_e[\"[object Int32Array]\"]=_e[\"[object Map]\"]=_e[\"[object Number]\"]=_e[be]=_e[\"[object RegExp]\"]=_e[\"[object Set]\"]=_e[\"[object String]\"]=_e[\"[object Symbol]\"]=_e[\"[object Uint8Array]\"]=_e[\"[object Uint8ClampedArray]\"]=_e[\"[object Uint16Array]\"]=_e[\"[object Uint32Array]\"]=!0,_e[\"[object Error]\"]=_e[ye]=_e[\"[object WeakMap]\"]=!1,s.exports=function baseClone(s,o,i,Se,we,xe){var Pe,Te=1&o,Re=2&o,$e=4&o;if(i&&(Pe=we?i(s,Se,we,xe):i(s)),void 0!==Pe)return Pe;if(!ce(s))return s;var qe=ee(s);if(qe){if(Pe=z(s),!Te)return j(s,Pe)}else{var ze=U(s),We=ze==ye||\"[object GeneratorFunction]\"==ze;if(ie(s))return C(s,Te);if(ze==be||ze==fe||We&&!we){if(Pe=Re||We?{}:Z(s),!Te)return Re?B(s,x(Pe,s)):L(s,w(Pe,s))}else{if(!_e[ze])return we?s:{};Pe=Y(s,ze,Te)}}xe||(xe=new a);var He=xe.get(s);if(He)return He;xe.set(s,Pe),le(s)?s.forEach((function(a){Pe.add(baseClone(a,o,i,a,s,xe))})):ae(s)&&s.forEach((function(a,u){Pe.set(u,baseClone(a,o,i,u,s,xe))}));var Ye=qe?void 0:($e?Re?V:$:Re?de:pe)(s);return u(Ye||s,(function(a,u){Ye&&(a=s[u=a]),_(Pe,u,baseClone(a,o,i,u,s,xe))})),Pe}},10023:(s,o,i)=>{const a=i(6205),INTS=()=>[{type:a.RANGE,from:48,to:57}],WORDS=()=>[{type:a.CHAR,value:95},{type:a.RANGE,from:97,to:122},{type:a.RANGE,from:65,to:90}].concat(INTS()),WHITESPACE=()=>[{type:a.CHAR,value:9},{type:a.CHAR,value:10},{type:a.CHAR,value:11},{type:a.CHAR,value:12},{type:a.CHAR,value:13},{type:a.CHAR,value:32},{type:a.CHAR,value:160},{type:a.CHAR,value:5760},{type:a.RANGE,from:8192,to:8202},{type:a.CHAR,value:8232},{type:a.CHAR,value:8233},{type:a.CHAR,value:8239},{type:a.CHAR,value:8287},{type:a.CHAR,value:12288},{type:a.CHAR,value:65279}];o.words=()=>({type:a.SET,set:WORDS(),not:!1}),o.notWords=()=>({type:a.SET,set:WORDS(),not:!0}),o.ints=()=>({type:a.SET,set:INTS(),not:!1}),o.notInts=()=>({type:a.SET,set:INTS(),not:!0}),o.whitespace=()=>({type:a.SET,set:WHITESPACE(),not:!1}),o.notWhitespace=()=>({type:a.SET,set:WHITESPACE(),not:!0}),o.anyChar=()=>({type:a.SET,set:[{type:a.CHAR,value:10},{type:a.CHAR,value:13},{type:a.CHAR,value:8232},{type:a.CHAR,value:8233}],not:!0})},10043:(s,o,i)=>{\"use strict\";var a=i(54018),u=String,_=TypeError;s.exports=function(s){if(a(s))return s;throw new _(\"Can't set \"+u(s)+\" as a prototype\")}},10124:(s,o,i)=>{var a=i(9325);s.exports=function(){return a.Date.now()}},10300:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(82159),_=i(36624),w=i(4640),x=i(73448),C=TypeError;s.exports=function(s,o){var i=arguments.length<2?x(s):o;if(u(i))return _(a(i,s));throw new C(w(s)+\" is not iterable\")}},10316:(s,o,i)=>{const a=i(2404),u=i(55973),_=i(92340);class Element{constructor(s,o,i){o&&(this.meta=o),i&&(this.attributes=i),this.content=s}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((s=>{s.parent=this,s.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const s=new this.constructor;return s.element=this.element,this.meta.length&&(s._meta=this.meta.clone()),this.attributes.length&&(s._attributes=this.attributes.clone()),this.content?this.content.clone?s.content=this.content.clone():Array.isArray(this.content)?s.content=this.content.map((s=>s.clone())):s.content=this.content:s.content=this.content,s}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof u?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((s=>s.toValue()),this):this.content}toRef(s){if(\"\"===this.id.toValue())throw Error(\"Cannot create reference to an element that does not contain an ID\");const o=new this.RefElement(this.id.toValue());return s&&(o.path=s),o}findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Error(\"Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`\");const o=s.pop();let i=new _;const append=(s,o)=>(s.push(o),s),checkElement=(s,i)=>{i.element===o&&s.push(i);const a=i.findRecursive(o);return a&&a.reduce(append,s),i.content instanceof u&&(i.content.key&&checkElement(s,i.content.key),i.content.value&&checkElement(s,i.content.value)),s};return this.content&&(this.content.element&&checkElement(i,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,i)),s.isEmpty||(i=i.filter((o=>{let i=o.parents.map((s=>s.element));for(const o in s){const a=s[o],u=i.indexOf(a);if(-1===u)return!1;i=i.splice(0,u)}return!0}))),i}set(s){return this.content=s,this}equals(s){return a(this.toValue(),s)}getMetaProperty(s,o){if(!this.meta.hasKey(s)){if(this.isFrozen){const s=this.refract(o);return s.freeze(),s}this.meta.set(s,o)}return this.meta.get(s)}setMetaProperty(s,o){this.meta.set(s,o)}get element(){return this._storedElement||\"element\"}set element(s){this._storedElement=s}get content(){return this._content}set content(s){if(s instanceof Element)this._content=s;else if(s instanceof _)this.content=s.elements;else if(\"string\"==typeof s||\"number\"==typeof s||\"boolean\"==typeof s||\"null\"===s||null==s)this._content=s;else if(s instanceof u)this._content=s;else if(Array.isArray(s))this._content=s.map(this.refract);else{if(\"object\"!=typeof s)throw new Error(\"Cannot set content to given value\");this._content=Object.keys(s).map((o=>new this.MemberElement(o,s[o])))}}get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._meta=new this.ObjectElement}return this._meta}set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set(s||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._attributes=new this.ObjectElement}return this._attributes}set attributes(s){s instanceof this.ObjectElement?this._attributes=s:this.attributes.set(s||{})}get id(){return this.getMetaProperty(\"id\",\"\")}set id(s){this.setMetaProperty(\"id\",s)}get classes(){return this.getMetaProperty(\"classes\",[])}set classes(s){this.setMetaProperty(\"classes\",s)}get title(){return this.getMetaProperty(\"title\",\"\")}set title(s){this.setMetaProperty(\"title\",s)}get description(){return this.getMetaProperty(\"description\",\"\")}set description(s){this.setMetaProperty(\"description\",s)}get links(){return this.getMetaProperty(\"links\",[])}set links(s){this.setMetaProperty(\"links\",s)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:s}=this;const o=new _;for(;s;)o.push(s),s=s.parent;return o}get children(){if(Array.isArray(this.content))return new _(this.content);if(this.content instanceof u){const s=new _([this.content.key]);return this.content.value&&s.push(this.content.value),s}return this.content instanceof Element?new _([this.content]):new _}get recursiveChildren(){const s=new _;return this.children.forEach((o=>{s.push(o),o.recursiveChildren.forEach((o=>{s.push(o)}))})),s}}s.exports=Element},10392:s=>{s.exports=function getValue(s,o){return null==s?void 0:s[o]}},10776:(s,o,i)=>{var a=i(30756),u=i(95950);s.exports=function getMatchData(s){for(var o=u(s),i=o.length;i--;){var _=o[i],w=s[_];o[i]=[_,w,a(w)]}return o}},10866:(s,o,i)=>{const a=i(6048),u=i(92340);class ObjectSlice extends u{map(s,o){return this.elements.map((i=>s.bind(o)(i.value,i.key,i)))}filter(s,o){return new ObjectSlice(this.elements.filter((i=>s.bind(o)(i.value,i.key,i))))}reject(s,o){return this.filter(a(s.bind(o)))}forEach(s,o){return this.elements.forEach(((i,a)=>{s.bind(o)(i.value,i.key,i,a)}))}keys(){return this.map(((s,o)=>o.toValue()))}values(){return this.map((s=>s.toValue()))}}s.exports=ObjectSlice},11042:(s,o,i)=>{\"use strict\";var a=i(85582),u=i(1907),_=i(24443),w=i(87170),x=i(36624),C=u([].concat);s.exports=a(\"Reflect\",\"ownKeys\")||function ownKeys(s){var o=_.f(x(s)),i=w.f;return i?C(o,i(s)):o}},11091:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(76024),_=i(92361),w=i(62250),x=i(13846).f,C=i(7463),j=i(92046),L=i(28311),B=i(61626),$=i(49724);i(36128);var wrapConstructor=function(s){var Wrapper=function(o,i,a){if(this instanceof Wrapper){switch(arguments.length){case 0:return new s;case 1:return new s(o);case 2:return new s(o,i)}return new s(o,i,a)}return u(s,this,arguments)};return Wrapper.prototype=s.prototype,Wrapper};s.exports=function(s,o){var i,u,V,U,z,Y,Z,ee,ie,ae=s.target,ce=s.global,le=s.stat,pe=s.proto,de=ce?a:le?a[ae]:a[ae]&&a[ae].prototype,fe=ce?j:j[ae]||B(j,ae,{})[ae],ye=fe.prototype;for(U in o)u=!(i=C(ce?U:ae+(le?\".\":\"#\")+U,s.forced))&&de&&$(de,U),Y=fe[U],u&&(Z=s.dontCallGetSet?(ie=x(de,U))&&ie.value:de[U]),z=u&&Z?Z:o[U],(i||pe||typeof Y!=typeof z)&&(ee=s.bind&&u?L(z,a):s.wrap&&u?wrapConstructor(z):pe&&w(z)?_(z):z,(s.sham||z&&z.sham||Y&&Y.sham)&&B(ee,\"sham\",!0),B(fe,U,ee),pe&&($(j,V=ae+\"Prototype\")||B(j,V,{}),B(j[V],U,z),s.real&&ye&&(i||!ye[U])&&B(ye,U,z)))}},11287:s=>{s.exports=function getHolder(s){return s.placeholder}},11331:(s,o,i)=>{var a=i(72552),u=i(28879),_=i(40346),w=Function.prototype,x=Object.prototype,C=w.toString,j=x.hasOwnProperty,L=C.call(Object);s.exports=function isPlainObject(s){if(!_(s)||\"[object Object]\"!=a(s))return!1;var o=u(s);if(null===o)return!0;var i=j.call(o,\"constructor\")&&o.constructor;return\"function\"==typeof i&&i instanceof i&&C.call(i)==L}},11470:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(65482),_=i(90160),w=i(74239),x=a(\"\".charAt),C=a(\"\".charCodeAt),j=a(\"\".slice),createMethod=function(s){return function(o,i){var a,L,B=_(w(o)),$=u(i),V=B.length;return $<0||$>=V?s?\"\":void 0:(a=C(B,$))<55296||a>56319||$+1===V||(L=C(B,$+1))<56320||L>57343?s?x(B,$):a:s?j(B,$,$+2):L-56320+(a-55296<<10)+65536}};s.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},11842:(s,o,i)=>{var a=i(82819),u=i(9325);s.exports=function createBind(s,o,i){var _=1&o,w=a(s);return function wrapper(){return(this&&this!==u&&this instanceof wrapper?w:s).apply(_?i:this,arguments)}}},12242:(s,o,i)=>{const a=i(10316);s.exports=class BooleanElement extends a{constructor(s,o,i){super(s,o,i),this.element=\"boolean\"}primitive(){return\"boolean\"}}},12507:(s,o,i)=>{var a=i(28754),u=i(49698),_=i(63912),w=i(13222);s.exports=function createCaseFirst(s){return function(o){o=w(o);var i=u(o)?_(o):void 0,x=i?i[0]:o.charAt(0),C=i?a(i,1).join(\"\"):o.slice(1);return x[s]()+C}}},12560:(s,o,i)=>{\"use strict\";i(99363);var a=i(19287),u=i(45951),_=i(14840),w=i(93742);for(var x in a)_(u[x],x),w[x]=w.Array},12651:(s,o,i)=>{var a=i(74218);s.exports=function getMapData(s,o){var i=s.__data__;return a(o)?i[\"string\"==typeof o?\"string\":\"hash\"]:i.map}},12749:(s,o,i)=>{var a=i(81042),u=Object.prototype.hasOwnProperty;s.exports=function hashHas(s){var o=this.__data__;return a?void 0!==o[s]:u.call(o,s)}},13222:(s,o,i)=>{var a=i(77556);s.exports=function toString(s){return null==s?\"\":a(s)}},13846:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(13930),_=i(22574),w=i(75817),x=i(4993),C=i(70470),j=i(49724),L=i(73648),B=Object.getOwnPropertyDescriptor;o.f=a?B:function getOwnPropertyDescriptor(s,o){if(s=x(s),o=C(o),L)try{return B(s,o)}catch(s){}if(j(s,o))return w(!u(_.f,s,o),s[o])}},13930:(s,o,i)=>{\"use strict\";var a=i(41505),u=Function.prototype.call;s.exports=a?u.bind(u):function(){return u.apply(u,arguments)}},14248:s=>{s.exports=function arraySome(s,o){for(var i=-1,a=null==s?0:s.length;++i<a;)if(o(s[i],i,s))return!0;return!1}},14528:s=>{s.exports=function arrayPush(s,o){for(var i=-1,a=o.length,u=s.length;++i<a;)s[u+i]=o[i];return s}},14540:(s,o,i)=>{const a=i(10316);s.exports=class RefElement extends a{constructor(s,o,i){super(s||[],o,i),this.element=\"ref\",this.path||(this.path=\"element\")}get path(){return this.attributes.get(\"path\")}set path(s){this.attributes.set(\"path\",s)}}},14744:s=>{\"use strict\";var o=function isMergeableObject(s){return function isNonNullObject(s){return!!s&&\"object\"==typeof s}(s)&&!function isSpecial(s){var o=Object.prototype.toString.call(s);return\"[object RegExp]\"===o||\"[object Date]\"===o||function isReactElement(s){return s.$$typeof===i}(s)}(s)};var i=\"function\"==typeof Symbol&&Symbol.for?Symbol.for(\"react.element\"):60103;function cloneUnlessOtherwiseSpecified(s,o){return!1!==o.clone&&o.isMergeableObject(s)?deepmerge(function emptyTarget(s){return Array.isArray(s)?[]:{}}(s),s,o):s}function defaultArrayMerge(s,o,i){return s.concat(o).map((function(s){return cloneUnlessOtherwiseSpecified(s,i)}))}function getKeys(s){return Object.keys(s).concat(function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter((function(o){return Object.propertyIsEnumerable.call(s,o)})):[]}(s))}function propertyIsOnObject(s,o){try{return o in s}catch(s){return!1}}function mergeObject(s,o,i){var a={};return i.isMergeableObject(s)&&getKeys(s).forEach((function(o){a[o]=cloneUnlessOtherwiseSpecified(s[o],i)})),getKeys(o).forEach((function(u){(function propertyIsUnsafe(s,o){return propertyIsOnObject(s,o)&&!(Object.hasOwnProperty.call(s,o)&&Object.propertyIsEnumerable.call(s,o))})(s,u)||(propertyIsOnObject(s,u)&&i.isMergeableObject(o[u])?a[u]=function getMergeFunction(s,o){if(!o.customMerge)return deepmerge;var i=o.customMerge(s);return\"function\"==typeof i?i:deepmerge}(u,i)(s[u],o[u],i):a[u]=cloneUnlessOtherwiseSpecified(o[u],i))})),a}function deepmerge(s,i,a){(a=a||{}).arrayMerge=a.arrayMerge||defaultArrayMerge,a.isMergeableObject=a.isMergeableObject||o,a.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var u=Array.isArray(i);return u===Array.isArray(s)?u?a.arrayMerge(s,i,a):mergeObject(s,i,a):cloneUnlessOtherwiseSpecified(i,a)}deepmerge.all=function deepmergeAll(s,o){if(!Array.isArray(s))throw new Error(\"first argument should be an array\");return s.reduce((function(s,i){return deepmerge(s,i,o)}),{})};var a=deepmerge;s.exports=a},14792:(s,o,i)=>{var a=i(13222),u=i(55808);s.exports=function capitalize(s){return u(a(s).toLowerCase())}},14840:(s,o,i)=>{\"use strict\";var a=i(52623),u=i(74284).f,_=i(61626),w=i(49724),x=i(54878),C=i(76264)(\"toStringTag\");s.exports=function(s,o,i,j){var L=i?s:s&&s.prototype;L&&(w(L,C)||u(L,C,{configurable:!0,value:o}),j&&!a&&_(L,\"toString\",x))}},14974:s=>{s.exports=function safeGet(s,o){if((\"constructor\"!==o||\"function\"!=typeof s[o])&&\"__proto__\"!=o)return s[o]}},15287:(s,o)=>{\"use strict\";var i=Symbol.for(\"react.element\"),a=Symbol.for(\"react.portal\"),u=Symbol.for(\"react.fragment\"),_=Symbol.for(\"react.strict_mode\"),w=Symbol.for(\"react.profiler\"),x=Symbol.for(\"react.provider\"),C=Symbol.for(\"react.context\"),j=Symbol.for(\"react.forward_ref\"),L=Symbol.for(\"react.suspense\"),B=Symbol.for(\"react.memo\"),$=Symbol.for(\"react.lazy\"),V=Symbol.iterator;var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,Y={};function E(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i||U}function F(){}function G(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i||U}E.prototype.isReactComponent={},E.prototype.setState=function(s,o){if(\"object\"!=typeof s&&\"function\"!=typeof s&&null!=s)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,s,o,\"setState\")},E.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,\"forceUpdate\")},F.prototype=E.prototype;var Z=G.prototype=new F;Z.constructor=G,z(Z,E.prototype),Z.isPureReactComponent=!0;var ee=Array.isArray,ie=Object.prototype.hasOwnProperty,ae={current:null},ce={key:!0,ref:!0,__self:!0,__source:!0};function M(s,o,a){var u,_={},w=null,x=null;if(null!=o)for(u in void 0!==o.ref&&(x=o.ref),void 0!==o.key&&(w=\"\"+o.key),o)ie.call(o,u)&&!ce.hasOwnProperty(u)&&(_[u]=o[u]);var C=arguments.length-2;if(1===C)_.children=a;else if(1<C){for(var j=Array(C),L=0;L<C;L++)j[L]=arguments[L+2];_.children=j}if(s&&s.defaultProps)for(u in C=s.defaultProps)void 0===_[u]&&(_[u]=C[u]);return{$$typeof:i,type:s,key:w,ref:x,props:_,_owner:ae.current}}function O(s){return\"object\"==typeof s&&null!==s&&s.$$typeof===i}var le=/\\/+/g;function Q(s,o){return\"object\"==typeof s&&null!==s&&null!=s.key?function escape(s){var o={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+s.replace(/[=:]/g,(function(s){return o[s]}))}(\"\"+s.key):o.toString(36)}function R(s,o,u,_,w){var x=typeof s;\"undefined\"!==x&&\"boolean\"!==x||(s=null);var C=!1;if(null===s)C=!0;else switch(x){case\"string\":case\"number\":C=!0;break;case\"object\":switch(s.$$typeof){case i:case a:C=!0}}if(C)return w=w(C=s),s=\"\"===_?\".\"+Q(C,0):_,ee(w)?(u=\"\",null!=s&&(u=s.replace(le,\"$&/\")+\"/\"),R(w,o,u,\"\",(function(s){return s}))):null!=w&&(O(w)&&(w=function N(s,o){return{$$typeof:i,type:s.type,key:o,ref:s.ref,props:s.props,_owner:s._owner}}(w,u+(!w.key||C&&C.key===w.key?\"\":(\"\"+w.key).replace(le,\"$&/\")+\"/\")+s)),o.push(w)),1;if(C=0,_=\"\"===_?\".\":_+\":\",ee(s))for(var j=0;j<s.length;j++){var L=_+Q(x=s[j],j);C+=R(x,o,u,L,w)}else if(L=function A(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=V&&s[V]||s[\"@@iterator\"])?s:null}(s),\"function\"==typeof L)for(s=L.call(s),j=0;!(x=s.next()).done;)C+=R(x=x.value,o,u,L=_+Q(x,j++),w);else if(\"object\"===x)throw o=String(s),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===o?\"object with keys {\"+Object.keys(s).join(\", \")+\"}\":o)+\"). If you meant to render a collection of children, use an array instead.\");return C}function S(s,o,i){if(null==s)return s;var a=[],u=0;return R(s,a,\"\",\"\",(function(s){return o.call(i,s,u++)})),a}function T(s){if(-1===s._status){var o=s._result;(o=o()).then((function(o){0!==s._status&&-1!==s._status||(s._status=1,s._result=o)}),(function(o){0!==s._status&&-1!==s._status||(s._status=2,s._result=o)})),-1===s._status&&(s._status=0,s._result=o)}if(1===s._status)return s._result.default;throw s._result}var pe={current:null},de={transition:null},fe={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:de,ReactCurrentOwner:ae};function X(){throw Error(\"act(...) is not supported in production builds of React.\")}o.Children={map:S,forEach:function(s,o,i){S(s,(function(){o.apply(this,arguments)}),i)},count:function(s){var o=0;return S(s,(function(){o++})),o},toArray:function(s){return S(s,(function(s){return s}))||[]},only:function(s){if(!O(s))throw Error(\"React.Children.only expected to receive a single React element child.\");return s}},o.Component=E,o.Fragment=u,o.Profiler=w,o.PureComponent=G,o.StrictMode=_,o.Suspense=L,o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fe,o.act=X,o.cloneElement=function(s,o,a){if(null==s)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+s+\".\");var u=z({},s.props),_=s.key,w=s.ref,x=s._owner;if(null!=o){if(void 0!==o.ref&&(w=o.ref,x=ae.current),void 0!==o.key&&(_=\"\"+o.key),s.type&&s.type.defaultProps)var C=s.type.defaultProps;for(j in o)ie.call(o,j)&&!ce.hasOwnProperty(j)&&(u[j]=void 0===o[j]&&void 0!==C?C[j]:o[j])}var j=arguments.length-2;if(1===j)u.children=a;else if(1<j){C=Array(j);for(var L=0;L<j;L++)C[L]=arguments[L+2];u.children=C}return{$$typeof:i,type:s.type,key:_,ref:w,props:u,_owner:x}},o.createContext=function(s){return(s={$$typeof:C,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:x,_context:s},s.Consumer=s},o.createElement=M,o.createFactory=function(s){var o=M.bind(null,s);return o.type=s,o},o.createRef=function(){return{current:null}},o.forwardRef=function(s){return{$$typeof:j,render:s}},o.isValidElement=O,o.lazy=function(s){return{$$typeof:$,_payload:{_status:-1,_result:s},_init:T}},o.memo=function(s,o){return{$$typeof:B,type:s,compare:void 0===o?null:o}},o.startTransition=function(s){var o=de.transition;de.transition={};try{s()}finally{de.transition=o}},o.unstable_act=X,o.useCallback=function(s,o){return pe.current.useCallback(s,o)},o.useContext=function(s){return pe.current.useContext(s)},o.useDebugValue=function(){},o.useDeferredValue=function(s){return pe.current.useDeferredValue(s)},o.useEffect=function(s,o){return pe.current.useEffect(s,o)},o.useId=function(){return pe.current.useId()},o.useImperativeHandle=function(s,o,i){return pe.current.useImperativeHandle(s,o,i)},o.useInsertionEffect=function(s,o){return pe.current.useInsertionEffect(s,o)},o.useLayoutEffect=function(s,o){return pe.current.useLayoutEffect(s,o)},o.useMemo=function(s,o){return pe.current.useMemo(s,o)},o.useReducer=function(s,o,i){return pe.current.useReducer(s,o,i)},o.useRef=function(s){return pe.current.useRef(s)},o.useState=function(s){return pe.current.useState(s)},o.useSyncExternalStore=function(s,o,i){return pe.current.useSyncExternalStore(s,o,i)},o.useTransition=function(){return pe.current.useTransition()},o.version=\"18.3.1\"},15325:(s,o,i)=>{var a=i(96131);s.exports=function arrayIncludes(s,o){return!!(null==s?0:s.length)&&a(s,o,0)>-1}},15340:()=>{},15389:(s,o,i)=>{var a=i(93663),u=i(87978),_=i(83488),w=i(56449),x=i(50583);s.exports=function baseIteratee(s){return\"function\"==typeof s?s:null==s?_:\"object\"==typeof s?w(s)?u(s[0],s[1]):a(s):x(s)}},15972:(s,o,i)=>{\"use strict\";var a=i(49724),u=i(62250),_=i(39298),w=i(92522),x=i(57382),C=w(\"IE_PROTO\"),j=Object,L=j.prototype;s.exports=x?j.getPrototypeOf:function(s){var o=_(s);if(a(o,C))return o[C];var i=o.constructor;return u(i)&&o instanceof i?i.prototype:o instanceof j?L:null}},16038:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function baseIsSet(s){return u(s)&&\"[object Set]\"==a(s)}},16426:s=>{s.exports=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var o=document.activeElement,i=[],a=0;a<s.rangeCount;a++)i.push(s.getRangeAt(a));switch(o.tagName.toUpperCase()){case\"INPUT\":case\"TEXTAREA\":o.blur();break;default:o=null}return s.removeAllRanges(),function(){\"Caret\"===s.type&&s.removeAllRanges(),s.rangeCount||i.forEach((function(o){s.addRange(o)})),o&&o.focus()}}},16547:(s,o,i)=>{var a=i(43360),u=i(75288),_=Object.prototype.hasOwnProperty;s.exports=function assignValue(s,o,i){var w=s[o];_.call(s,o)&&u(w,i)&&(void 0!==i||o in s)||a(s,o,i)}},16708:(s,o,i)=>{\"use strict\";var a,u=i(65606);function CorkedRequest(s){var o=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(s,o,i){var a=s.entry;s.entry=null;for(;a;){var u=a.callback;o.pendingcb--,u(i),a=a.next}o.corkedRequestsFree.next=s}(o,s)}}s.exports=Writable,Writable.WritableState=WritableState;var _={deprecate:i(94643)},w=i(40345),x=i(48287).Buffer,C=(void 0!==i.g?i.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var j,L=i(75896),B=i(65291).getHighWaterMark,$=i(86048).F,V=$.ERR_INVALID_ARG_TYPE,U=$.ERR_METHOD_NOT_IMPLEMENTED,z=$.ERR_MULTIPLE_CALLBACK,Y=$.ERR_STREAM_CANNOT_PIPE,Z=$.ERR_STREAM_DESTROYED,ee=$.ERR_STREAM_NULL_VALUES,ie=$.ERR_STREAM_WRITE_AFTER_END,ae=$.ERR_UNKNOWN_ENCODING,ce=L.errorOrDestroy;function nop(){}function WritableState(s,o,_){a=a||i(25382),s=s||{},\"boolean\"!=typeof _&&(_=o instanceof a),this.objectMode=!!s.objectMode,_&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=B(this,s,\"writableHighWaterMark\",_),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=!1===s.decodeStrings;this.decodeStrings=!w,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){!function onwrite(s,o){var i=s._writableState,a=i.sync,_=i.writecb;if(\"function\"!=typeof _)throw new z;if(function onwriteStateUpdate(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}(i),o)!function onwriteError(s,o,i,a,_){--o.pendingcb,i?(u.nextTick(_,a),u.nextTick(finishMaybe,s,o),s._writableState.errorEmitted=!0,ce(s,a)):(_(a),s._writableState.errorEmitted=!0,ce(s,a),finishMaybe(s,o))}(s,i,a,o,_);else{var w=needFinish(i)||s.destroyed;w||i.corked||i.bufferProcessing||!i.bufferedRequest||clearBuffer(s,i),a?u.nextTick(afterWrite,s,i,w,_):afterWrite(s,i,w,_)}}(o,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(s){var o=this instanceof(a=a||i(25382));if(!o&&!j.call(Writable,this))return new Writable(s);this._writableState=new WritableState(s,this,o),this.writable=!0,s&&(\"function\"==typeof s.write&&(this._write=s.write),\"function\"==typeof s.writev&&(this._writev=s.writev),\"function\"==typeof s.destroy&&(this._destroy=s.destroy),\"function\"==typeof s.final&&(this._final=s.final)),w.call(this)}function doWrite(s,o,i,a,u,_,w){o.writelen=a,o.writecb=w,o.writing=!0,o.sync=!0,o.destroyed?o.onwrite(new Z(\"write\")):i?s._writev(u,o.onwrite):s._write(u,_,o.onwrite),o.sync=!1}function afterWrite(s,o,i,a){i||function onwriteDrain(s,o){0===o.length&&o.needDrain&&(o.needDrain=!1,s.emit(\"drain\"))}(s,o),o.pendingcb--,a(),finishMaybe(s,o)}function clearBuffer(s,o){o.bufferProcessing=!0;var i=o.bufferedRequest;if(s._writev&&i&&i.next){var a=o.bufferedRequestCount,u=new Array(a),_=o.corkedRequestsFree;_.entry=i;for(var w=0,x=!0;i;)u[w]=i,i.isBuf||(x=!1),i=i.next,w+=1;u.allBuffers=x,doWrite(s,o,!0,o.length,u,\"\",_.finish),o.pendingcb++,o.lastBufferedRequest=null,_.next?(o.corkedRequestsFree=_.next,_.next=null):o.corkedRequestsFree=new CorkedRequest(o),o.bufferedRequestCount=0}else{for(;i;){var C=i.chunk,j=i.encoding,L=i.callback;if(doWrite(s,o,!1,o.objectMode?1:C.length,C,j,L),i=i.next,o.bufferedRequestCount--,o.writing)break}null===i&&(o.lastBufferedRequest=null)}o.bufferedRequest=i,o.bufferProcessing=!1}function needFinish(s){return s.ending&&0===s.length&&null===s.bufferedRequest&&!s.finished&&!s.writing}function callFinal(s,o){s._final((function(i){o.pendingcb--,i&&ce(s,i),o.prefinished=!0,s.emit(\"prefinish\"),finishMaybe(s,o)}))}function finishMaybe(s,o){var i=needFinish(o);if(i&&(function prefinish(s,o){o.prefinished||o.finalCalled||(\"function\"!=typeof s._final||o.destroyed?(o.prefinished=!0,s.emit(\"prefinish\")):(o.pendingcb++,o.finalCalled=!0,u.nextTick(callFinal,s,o)))}(s,o),0===o.pendingcb&&(o.finished=!0,s.emit(\"finish\"),o.autoDestroy))){var a=s._readableState;(!a||a.autoDestroy&&a.endEmitted)&&s.destroy()}return i}i(56698)(Writable,w),WritableState.prototype.getBuffer=function getBuffer(){for(var s=this.bufferedRequest,o=[];s;)o.push(s),s=s.next;return o},function(){try{Object.defineProperty(WritableState.prototype,\"buffer\",{get:_.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(s){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(s){return!!j.call(this,s)||this===Writable&&(s&&s._writableState instanceof WritableState)}})):j=function realHasInstance(s){return s instanceof this},Writable.prototype.pipe=function(){ce(this,new Y)},Writable.prototype.write=function(s,o,i){var a=this._writableState,_=!1,w=!a.objectMode&&function _isUint8Array(s){return x.isBuffer(s)||s instanceof C}(s);return w&&!x.isBuffer(s)&&(s=function _uint8ArrayToBuffer(s){return x.from(s)}(s)),\"function\"==typeof o&&(i=o,o=null),w?o=\"buffer\":o||(o=a.defaultEncoding),\"function\"!=typeof i&&(i=nop),a.ending?function writeAfterEnd(s,o){var i=new ie;ce(s,i),u.nextTick(o,i)}(this,i):(w||function validChunk(s,o,i,a){var _;return null===i?_=new ee:\"string\"==typeof i||o.objectMode||(_=new V(\"chunk\",[\"string\",\"Buffer\"],i)),!_||(ce(s,_),u.nextTick(a,_),!1)}(this,a,s,i))&&(a.pendingcb++,_=function writeOrBuffer(s,o,i,a,u,_){if(!i){var w=function decodeChunk(s,o,i){s.objectMode||!1===s.decodeStrings||\"string\"!=typeof o||(o=x.from(o,i));return o}(o,a,u);a!==w&&(i=!0,u=\"buffer\",a=w)}var C=o.objectMode?1:a.length;o.length+=C;var j=o.length<o.highWaterMark;j||(o.needDrain=!0);if(o.writing||o.corked){var L=o.lastBufferedRequest;o.lastBufferedRequest={chunk:a,encoding:u,isBuf:i,callback:_,next:null},L?L.next=o.lastBufferedRequest:o.bufferedRequest=o.lastBufferedRequest,o.bufferedRequestCount+=1}else doWrite(s,o,!1,C,a,u,_);return j}(this,a,w,s,o,i)),_},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,s.writing||s.corked||s.bufferProcessing||!s.bufferedRequest||clearBuffer(this,s))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(s){if(\"string\"==typeof s&&(s=s.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((s+\"\").toLowerCase())>-1))throw new ae(s);return this._writableState.defaultEncoding=s,this},Object.defineProperty(Writable.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(s,o,i){i(new U(\"_write()\"))},Writable.prototype._writev=null,Writable.prototype.end=function(s,o,i){var a=this._writableState;return\"function\"==typeof s?(i=s,s=null,o=null):\"function\"==typeof o&&(i=o,o=null),null!=s&&this.write(s,o),a.corked&&(a.corked=1,this.uncork()),a.ending||function endWritable(s,o,i){o.ending=!0,finishMaybe(s,o),i&&(o.finished?u.nextTick(i):s.once(\"finish\",i));o.ended=!0,s.writable=!1}(this,a,i),this},Object.defineProperty(Writable.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(s){this._writableState&&(this._writableState.destroyed=s)}}),Writable.prototype.destroy=L.destroy,Writable.prototype._undestroy=L.undestroy,Writable.prototype._destroy=function(s,o){o(s)}},16946:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(98828),_=i(45807),w=Object,x=a(\"\".split);s.exports=u((function(){return!w(\"z\").propertyIsEnumerable(0)}))?function(s){return\"String\"===_(s)?x(s,\"\"):w(s)}:w},16962:(s,o)=>{o.aliasToReal={each:\"forEach\",eachRight:\"forEachRight\",entries:\"toPairs\",entriesIn:\"toPairsIn\",extend:\"assignIn\",extendAll:\"assignInAll\",extendAllWith:\"assignInAllWith\",extendWith:\"assignInWith\",first:\"head\",conforms:\"conformsTo\",matches:\"isMatch\",property:\"get\",__:\"placeholder\",F:\"stubFalse\",T:\"stubTrue\",all:\"every\",allPass:\"overEvery\",always:\"constant\",any:\"some\",anyPass:\"overSome\",apply:\"spread\",assoc:\"set\",assocPath:\"set\",complement:\"negate\",compose:\"flowRight\",contains:\"includes\",dissoc:\"unset\",dissocPath:\"unset\",dropLast:\"dropRight\",dropLastWhile:\"dropRightWhile\",equals:\"isEqual\",identical:\"eq\",indexBy:\"keyBy\",init:\"initial\",invertObj:\"invert\",juxt:\"over\",omitAll:\"omit\",nAry:\"ary\",path:\"get\",pathEq:\"matchesProperty\",pathOr:\"getOr\",paths:\"at\",pickAll:\"pick\",pipe:\"flow\",pluck:\"map\",prop:\"get\",propEq:\"matchesProperty\",propOr:\"getOr\",props:\"at\",symmetricDifference:\"xor\",symmetricDifferenceBy:\"xorBy\",symmetricDifferenceWith:\"xorWith\",takeLast:\"takeRight\",takeLastWhile:\"takeRightWhile\",unapply:\"rest\",unnest:\"flatten\",useWith:\"overArgs\",where:\"conformsTo\",whereEq:\"isMatch\",zipObj:\"zipObject\"},o.aryMethod={1:[\"assignAll\",\"assignInAll\",\"attempt\",\"castArray\",\"ceil\",\"create\",\"curry\",\"curryRight\",\"defaultsAll\",\"defaultsDeepAll\",\"floor\",\"flow\",\"flowRight\",\"fromPairs\",\"invert\",\"iteratee\",\"memoize\",\"method\",\"mergeAll\",\"methodOf\",\"mixin\",\"nthArg\",\"over\",\"overEvery\",\"overSome\",\"rest\",\"reverse\",\"round\",\"runInContext\",\"spread\",\"template\",\"trim\",\"trimEnd\",\"trimStart\",\"uniqueId\",\"words\",\"zipAll\"],2:[\"add\",\"after\",\"ary\",\"assign\",\"assignAllWith\",\"assignIn\",\"assignInAllWith\",\"at\",\"before\",\"bind\",\"bindAll\",\"bindKey\",\"chunk\",\"cloneDeepWith\",\"cloneWith\",\"concat\",\"conformsTo\",\"countBy\",\"curryN\",\"curryRightN\",\"debounce\",\"defaults\",\"defaultsDeep\",\"defaultTo\",\"delay\",\"difference\",\"divide\",\"drop\",\"dropRight\",\"dropRightWhile\",\"dropWhile\",\"endsWith\",\"eq\",\"every\",\"filter\",\"find\",\"findIndex\",\"findKey\",\"findLast\",\"findLastIndex\",\"findLastKey\",\"flatMap\",\"flatMapDeep\",\"flattenDepth\",\"forEach\",\"forEachRight\",\"forIn\",\"forInRight\",\"forOwn\",\"forOwnRight\",\"get\",\"groupBy\",\"gt\",\"gte\",\"has\",\"hasIn\",\"includes\",\"indexOf\",\"intersection\",\"invertBy\",\"invoke\",\"invokeMap\",\"isEqual\",\"isMatch\",\"join\",\"keyBy\",\"lastIndexOf\",\"lt\",\"lte\",\"map\",\"mapKeys\",\"mapValues\",\"matchesProperty\",\"maxBy\",\"meanBy\",\"merge\",\"mergeAllWith\",\"minBy\",\"multiply\",\"nth\",\"omit\",\"omitBy\",\"overArgs\",\"pad\",\"padEnd\",\"padStart\",\"parseInt\",\"partial\",\"partialRight\",\"partition\",\"pick\",\"pickBy\",\"propertyOf\",\"pull\",\"pullAll\",\"pullAt\",\"random\",\"range\",\"rangeRight\",\"rearg\",\"reject\",\"remove\",\"repeat\",\"restFrom\",\"result\",\"sampleSize\",\"some\",\"sortBy\",\"sortedIndex\",\"sortedIndexOf\",\"sortedLastIndex\",\"sortedLastIndexOf\",\"sortedUniqBy\",\"split\",\"spreadFrom\",\"startsWith\",\"subtract\",\"sumBy\",\"take\",\"takeRight\",\"takeRightWhile\",\"takeWhile\",\"tap\",\"throttle\",\"thru\",\"times\",\"trimChars\",\"trimCharsEnd\",\"trimCharsStart\",\"truncate\",\"union\",\"uniqBy\",\"uniqWith\",\"unset\",\"unzipWith\",\"without\",\"wrap\",\"xor\",\"zip\",\"zipObject\",\"zipObjectDeep\"],3:[\"assignInWith\",\"assignWith\",\"clamp\",\"differenceBy\",\"differenceWith\",\"findFrom\",\"findIndexFrom\",\"findLastFrom\",\"findLastIndexFrom\",\"getOr\",\"includesFrom\",\"indexOfFrom\",\"inRange\",\"intersectionBy\",\"intersectionWith\",\"invokeArgs\",\"invokeArgsMap\",\"isEqualWith\",\"isMatchWith\",\"flatMapDepth\",\"lastIndexOfFrom\",\"mergeWith\",\"orderBy\",\"padChars\",\"padCharsEnd\",\"padCharsStart\",\"pullAllBy\",\"pullAllWith\",\"rangeStep\",\"rangeStepRight\",\"reduce\",\"reduceRight\",\"replace\",\"set\",\"slice\",\"sortedIndexBy\",\"sortedLastIndexBy\",\"transform\",\"unionBy\",\"unionWith\",\"update\",\"xorBy\",\"xorWith\",\"zipWith\"],4:[\"fill\",\"setWith\",\"updateWith\"]},o.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},o.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},o.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},o.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},o.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},o.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},o.realToAlias=function(){var s=Object.prototype.hasOwnProperty,i=o.aliasToReal,a={};for(var u in i){var _=i[u];s.call(a,_)?a[_].push(u):a[_]=[u]}return a}(),o.remap={assignAll:\"assign\",assignAllWith:\"assignWith\",assignInAll:\"assignIn\",assignInAllWith:\"assignInWith\",curryN:\"curry\",curryRightN:\"curryRight\",defaultsAll:\"defaults\",defaultsDeepAll:\"defaultsDeep\",findFrom:\"find\",findIndexFrom:\"findIndex\",findLastFrom:\"findLast\",findLastIndexFrom:\"findLastIndex\",getOr:\"get\",includesFrom:\"includes\",indexOfFrom:\"indexOf\",invokeArgs:\"invoke\",invokeArgsMap:\"invokeMap\",lastIndexOfFrom:\"lastIndexOf\",mergeAll:\"merge\",mergeAllWith:\"mergeWith\",padChars:\"pad\",padCharsEnd:\"padEnd\",padCharsStart:\"padStart\",propertyOf:\"get\",rangeStep:\"range\",rangeStepRight:\"rangeRight\",restFrom:\"rest\",spreadFrom:\"spread\",trimChars:\"trim\",trimCharsEnd:\"trimEnd\",trimCharsStart:\"trimStart\",zipAll:\"zip\"},o.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},o.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},17255:(s,o,i)=>{var a=i(47422);s.exports=function basePropertyDeep(s){return function(o){return a(o,s)}}},17285:s=>{function source(s){return s?\"string\"==typeof s?s:s.source:null}function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>source(s))).join(\"\")}function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}s.exports=function xml(s){const o=concat(/[A-Z_]/,function optional(s){return concat(\"(\",s,\")?\")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),i={className:\"symbol\",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\\s/,contains:[{className:\"meta-keyword\",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\\n/}]},u=s.inherit(a,{begin:/\\(/,end:/\\)/}),_=s.inherit(s.APOS_STRING_MODE,{className:\"meta-string\"}),w=s.inherit(s.QUOTE_STRING_MODE,{className:\"meta-string\"}),x={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:\"attr\",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\\s*/,relevance:0,contains:[{className:\"string\",endsParent:!0,variants:[{begin:/\"/,end:/\"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\\s\"'=<>`]+/}]}]}]};return{name:\"HTML, XML\",aliases:[\"html\",\"xhtml\",\"rss\",\"atom\",\"xjb\",\"xsd\",\"xsl\",\"plist\",\"wsf\",\"svg\"],case_insensitive:!0,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,w,_,u,{begin:/\\[/,end:/\\]/,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,contains:[a,u,w,_]}]}]},s.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\\[CDATA\\[/,end:/\\]\\]>/,relevance:10},i,{className:\"meta\",begin:/<\\?xml/,end:/\\?>/,relevance:10},{className:\"tag\",begin:/<style(?=\\s|>)/,end:/>/,keywords:{name:\"style\"},contains:[x],starts:{end:/<\\/style>/,returnEnd:!0,subLanguage:[\"css\",\"xml\"]}},{className:\"tag\",begin:/<script(?=\\s|>)/,end:/>/,keywords:{name:\"script\"},contains:[x],starts:{end:/<\\/script>/,returnEnd:!0,subLanguage:[\"javascript\",\"handlebars\",\"xml\"]}},{className:\"tag\",begin:/<>|<\\/>/},{className:\"tag\",begin:concat(/</,lookahead(concat(o,either(/\\/>/,/>/,/\\s/)))),end:/\\/?>/,contains:[{className:\"name\",begin:o,relevance:0,starts:x}]},{className:\"tag\",begin:concat(/<\\//,lookahead(concat(o,/>/))),contains:[{className:\"name\",begin:o,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},17400:(s,o,i)=>{var a=i(99374),u=1/0;s.exports=function toFinite(s){return s?(s=a(s))===u||s===-1/0?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0}},17533:s=>{s.exports=function yaml(s){var o=\"true false yes no null\",i=\"[\\\\w#;/?:@&=+$,.~*'()[\\\\]]+\",a={className:\"string\",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/\\S+/}],contains:[s.BACKSLASH_ESCAPE,{className:\"template-variable\",variants:[{begin:/\\{\\{/,end:/\\}\\}/},{begin:/%\\{/,end:/\\}/}]}]},u=s.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/[^\\s,{}[\\]]+/}]}),_={className:\"number\",begin:\"\\\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\\\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\\\.[0-9]*)?([ \\\\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\\\b\"},w={end:\",\",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},x={begin:/\\{/,end:/\\}/,contains:[w],illegal:\"\\\\n\",relevance:0},C={begin:\"\\\\[\",end:\"\\\\]\",contains:[w],illegal:\"\\\\n\",relevance:0},j=[{className:\"attr\",variants:[{begin:\"\\\\w[\\\\w :\\\\/.-]*:(?=[ \\t]|$)\"},{begin:'\"\\\\w[\\\\w :\\\\/.-]*\":(?=[ \\t]|$)'},{begin:\"'\\\\w[\\\\w :\\\\/.-]*':(?=[ \\t]|$)\"}]},{className:\"meta\",begin:\"^---\\\\s*$\",relevance:10},{className:\"string\",begin:\"[\\\\|>]([1-9]?[+-])?[ ]*\\\\n( +)[^ ][^\\\\n]*\\\\n(\\\\2[^\\\\n]+\\\\n?)*\"},{begin:\"<%[%=-]?\",end:\"[%-]?%>\",subLanguage:\"ruby\",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:\"type\",begin:\"!\\\\w+!\"+i},{className:\"type\",begin:\"!<\"+i+\">\"},{className:\"type\",begin:\"!\"+i},{className:\"type\",begin:\"!!\"+i},{className:\"meta\",begin:\"&\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"meta\",begin:\"\\\\*\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"bullet\",begin:\"-(?=[ ]|$)\",relevance:0},s.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},_,{className:\"number\",begin:s.C_NUMBER_RE+\"\\\\b\",relevance:0},x,C,a],L=[...j];return L.pop(),L.push(u),w.contains=L,{name:\"YAML\",case_insensitive:!0,aliases:[\"yml\"],contains:j}}},17670:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheDelete(s){var o=a(this,s).delete(s);return this.size-=o?1:0,o}},17965:(s,o,i)=>{\"use strict\";var a=i(16426),u={\"text/plain\":\"Text\",\"text/html\":\"Url\",default:\"Text\"};s.exports=function copy(s,o){var i,_,w,x,C,j,L=!1;o||(o={}),i=o.debug||!1;try{if(w=a(),x=document.createRange(),C=document.getSelection(),(j=document.createElement(\"span\")).textContent=s,j.ariaHidden=\"true\",j.style.all=\"unset\",j.style.position=\"fixed\",j.style.top=0,j.style.clip=\"rect(0, 0, 0, 0)\",j.style.whiteSpace=\"pre\",j.style.webkitUserSelect=\"text\",j.style.MozUserSelect=\"text\",j.style.msUserSelect=\"text\",j.style.userSelect=\"text\",j.addEventListener(\"copy\",(function(a){if(a.stopPropagation(),o.format)if(a.preventDefault(),void 0===a.clipboardData){i&&console.warn(\"unable to use e.clipboardData\"),i&&console.warn(\"trying IE specific stuff\"),window.clipboardData.clearData();var _=u[o.format]||u.default;window.clipboardData.setData(_,s)}else a.clipboardData.clearData(),a.clipboardData.setData(o.format,s);o.onCopy&&(a.preventDefault(),o.onCopy(a.clipboardData))})),document.body.appendChild(j),x.selectNodeContents(j),C.addRange(x),!document.execCommand(\"copy\"))throw new Error(\"copy command was unsuccessful\");L=!0}catch(a){i&&console.error(\"unable to copy using execCommand: \",a),i&&console.warn(\"trying IE specific stuff\");try{window.clipboardData.setData(o.format||\"text\",s),o.onCopy&&o.onCopy(window.clipboardData),L=!0}catch(a){i&&console.error(\"unable to copy using clipboardData: \",a),i&&console.error(\"falling back to prompt\"),_=function format(s){var o=(/mac os x/i.test(navigator.userAgent)?\"⌘\":\"Ctrl\")+\"+C\";return s.replace(/#{\\s*key\\s*}/g,o)}(\"message\"in o?o.message:\"Copy to clipboard: #{key}, Enter\"),window.prompt(_,s)}}finally{C&&(\"function\"==typeof C.removeRange?C.removeRange(x):C.removeAllRanges()),j&&document.body.removeChild(j),w()}return L}},18073:(s,o,i)=>{var a=i(85087),u=i(54641),_=i(70981);s.exports=function createRecurry(s,o,i,w,x,C,j,L,B,$){var V=8&o;o|=V?32:64,4&(o&=~(V?64:32))||(o&=-4);var U=[s,o,x,V?C:void 0,V?j:void 0,V?void 0:C,V?void 0:j,L,B,$],z=i.apply(void 0,U);return a(s)&&u(z,U),z.placeholder=w,_(z,s,o)}},19123:(s,o,i)=>{var a=i(65606),u=i(31499),_=i(88310).Stream;function resolve(s,o,i){var a,_=function create_indent(s,o){return new Array(o||0).join(s||\"\")}(o,i=i||0),w=s;if(\"object\"==typeof s&&((w=s[a=Object.keys(s)[0]])&&w._elem))return w._elem.name=a,w._elem.icount=i,w._elem.indent=o,w._elem.indents=_,w._elem.interrupt=w,w._elem;var x,C=[],j=[];function get_attributes(s){Object.keys(s).forEach((function(o){C.push(function attribute(s,o){return s+'=\"'+u(o)+'\"'}(o,s[o]))}))}switch(typeof w){case\"object\":if(null===w)break;w._attr&&get_attributes(w._attr),w._cdata&&j.push((\"<![CDATA[\"+w._cdata).replace(/\\]\\]>/g,\"]]]]><![CDATA[>\")+\"]]>\"),w.forEach&&(x=!1,j.push(\"\"),w.forEach((function(s){\"object\"==typeof s?\"_attr\"==Object.keys(s)[0]?get_attributes(s._attr):j.push(resolve(s,o,i+1)):(j.pop(),x=!0,j.push(u(s)))})),x||j.push(\"\"));break;default:j.push(u(w))}return{name:a,interrupt:!1,attributes:C,content:j,icount:i,indents:_,indent:o}}function format(s,o,i){if(\"object\"!=typeof o)return s(!1,o);var a=o.interrupt?1:o.content.length;function proceed(){for(;o.content.length;){var u=o.content.shift();if(void 0!==u){if(interrupt(u))return;format(s,u)}}s(!1,(a>1?o.indents:\"\")+(o.name?\"</\"+o.name+\">\":\"\")+(o.indent&&!i?\"\\n\":\"\")),i&&i()}function interrupt(o){return!!o.interrupt&&(o.interrupt.append=s,o.interrupt.end=proceed,o.interrupt=!1,s(!0),!0)}if(s(!1,o.indents+(o.name?\"<\"+o.name:\"\")+(o.attributes.length?\" \"+o.attributes.join(\" \"):\"\")+(a?o.name?\">\":\"\":o.name?\"/>\":\"\")+(o.indent&&a>1?\"\\n\":\"\")),!a)return s(!1,o.indent?\"\\n\":\"\");interrupt(o)||proceed()}s.exports=function xml(s,o){\"object\"!=typeof o&&(o={indent:o});var i=o.stream?new _:null,u=\"\",w=!1,x=o.indent?!0===o.indent?\"    \":o.indent:\"\",C=!0;function delay(s){C?a.nextTick(s):s()}function append(s,o){if(void 0!==o&&(u+=o),s&&!w&&(i=i||new _,w=!0),s&&w){var a=u;delay((function(){i.emit(\"data\",a)})),u=\"\"}}function add(s,o){format(append,resolve(s,x,x?1:0),o)}function end(){if(i){var s=u;delay((function(){i.emit(\"data\",s),i.emit(\"end\"),i.readable=!1,i.emit(\"close\")}))}}return delay((function(){C=!1})),o.declaration&&function addXmlDeclaration(s){var o={version:\"1.0\",encoding:s.encoding||\"UTF-8\"};s.standalone&&(o.standalone=s.standalone),add({\"?xml\":{_attr:o}}),u=u.replace(\"/>\",\"?>\")}(o.declaration),s&&s.forEach?s.forEach((function(o,i){var a;i+1===s.length&&(a=end),add(o,a)})):add(s,end),i?(i.readable=!0,i):u},s.exports.element=s.exports.Element=function element(){var s={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(s){if(!this.append)throw new Error(\"not assigned to a parent!\");var o=this,i=this._elem.indent;format(this.append,resolve(s,i,this._elem.icount+(i?1:0)),(function(){o.append(!0)}))},close:function(s){void 0!==s&&this.push(s),this.end&&this.end()}};return s}},19219:s=>{s.exports=function cacheHas(s,o){return s.has(o)}},19287:s=>{\"use strict\";s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},19358:(s,o,i)=>{\"use strict\";var a=i(85582),u=i(49724),_=i(61626),w=i(88280),x=i(79192),C=i(19595),j=i(54829),L=i(34084),B=i(32096),$=i(39259),V=i(85884),U=i(39447),z=i(7376);s.exports=function(s,o,i,Y){var Z=\"stackTraceLimit\",ee=Y?2:1,ie=s.split(\".\"),ae=ie[ie.length-1],ce=a.apply(null,ie);if(ce){var le=ce.prototype;if(!z&&u(le,\"cause\")&&delete le.cause,!i)return ce;var pe=a(\"Error\"),de=o((function(s,o){var i=B(Y?o:s,void 0),a=Y?new ce(s):new ce;return void 0!==i&&_(a,\"message\",i),V(a,de,a.stack,2),this&&w(le,this)&&L(a,this,de),arguments.length>ee&&$(a,arguments[ee]),a}));if(de.prototype=le,\"Error\"!==ae?x?x(de,pe):C(de,pe,{name:!0}):U&&Z in ce&&(j(de,ce,Z),j(de,ce,\"prepareStackTrace\")),C(de,ce),!z)try{le.name!==ae&&_(le,\"name\",ae),le.constructor=de}catch(s){}return de}}},19570:(s,o,i)=>{var a=i(37334),u=i(93243),_=i(83488),w=u?function(s,o){return u(s,\"toString\",{configurable:!0,enumerable:!1,value:a(o),writable:!0})}:_;s.exports=w},19595:(s,o,i)=>{\"use strict\";var a=i(49724),u=i(11042),_=i(13846),w=i(74284);s.exports=function(s,o,i){for(var x=u(o),C=w.f,j=_.f,L=0;L<x.length;L++){var B=x[L];a(s,B)||i&&a(i,B)||C(s,B,j(o,B))}}},19709:(s,o,i)=>{\"use strict\";var a=i(23034);s.exports=a},19846:(s,o,i)=>{\"use strict\";var a=i(20798),u=i(98828),_=i(45951).String;s.exports=!!Object.getOwnPropertySymbols&&!u((function(){var s=Symbol(\"symbol detection\");return!_(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&a&&a<41}))},19931:(s,o,i)=>{var a=i(31769),u=i(68090),_=i(68969),w=i(77797);s.exports=function baseUnset(s,o){return o=a(o,s),null==(s=_(s,o))||delete s[w(u(o))]}},20181:(s,o,i)=>{var a=/^\\s+|\\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,w=/^0o[0-7]+$/i,x=parseInt,C=\"object\"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,j=\"object\"==typeof self&&self&&self.Object===Object&&self,L=C||j||Function(\"return this\")(),B=Object.prototype.toString,$=Math.max,V=Math.min,now=function(){return L.Date.now()};function isObject(s){var o=typeof s;return!!s&&(\"object\"==o||\"function\"==o)}function toNumber(s){if(\"number\"==typeof s)return s;if(function isSymbol(s){return\"symbol\"==typeof s||function isObjectLike(s){return!!s&&\"object\"==typeof s}(s)&&\"[object Symbol]\"==B.call(s)}(s))return NaN;if(isObject(s)){var o=\"function\"==typeof s.valueOf?s.valueOf():s;s=isObject(o)?o+\"\":o}if(\"string\"!=typeof s)return 0===s?s:+s;s=s.replace(a,\"\");var i=_.test(s);return i||w.test(s)?x(s.slice(2),i?2:8):u.test(s)?NaN:+s}s.exports=function debounce(s,o,i){var a,u,_,w,x,C,j=0,L=!1,B=!1,U=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(o){var i=a,_=u;return a=u=void 0,j=o,w=s.apply(_,i)}function shouldInvoke(s){var i=s-C;return void 0===C||i>=o||i<0||B&&s-j>=_}function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEdge(s);x=setTimeout(timerExpired,function remainingWait(s){var i=o-(s-C);return B?V(i,_-(s-j)):i}(s))}function trailingEdge(s){return x=void 0,U&&a?invokeFunc(s):(a=u=void 0,w)}function debounced(){var s=now(),i=shouldInvoke(s);if(a=arguments,u=this,C=s,i){if(void 0===x)return function leadingEdge(s){return j=s,x=setTimeout(timerExpired,o),L?invokeFunc(s):w}(C);if(B)return x=setTimeout(timerExpired,o),invokeFunc(C)}return void 0===x&&(x=setTimeout(timerExpired,o)),w}return o=toNumber(o)||0,isObject(i)&&(L=!!i.leading,_=(B=\"maxWait\"in i)?$(toNumber(i.maxWait)||0,o):_,U=\"trailing\"in i?!!i.trailing:U),debounced.cancel=function cancel(){void 0!==x&&clearTimeout(x),j=0,a=C=u=x=void 0},debounced.flush=function flush(){return void 0===x?w:trailingEdge(now())},debounced}},20317:s=>{s.exports=function mapToArray(s){var o=-1,i=Array(s.size);return s.forEach((function(s,a){i[++o]=[a,s]})),i}},20334:(s,o,i)=>{\"use strict\";var a=i(48287).Buffer;class NonError extends Error{constructor(s){super(NonError._prepareSuperMessage(s)),Object.defineProperty(this,\"name\",{value:\"NonError\",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,NonError)}static _prepareSuperMessage(s){try{return JSON.stringify(s)}catch{return String(s)}}}const u=[{property:\"name\",enumerable:!1},{property:\"message\",enumerable:!1},{property:\"stack\",enumerable:!1},{property:\"code\",enumerable:!0}],_=Symbol(\".toJSON called\"),destroyCircular=({from:s,seen:o,to_:i,forceEnumerable:w,maxDepth:x,depth:C})=>{const j=i||(Array.isArray(s)?[]:{});if(o.push(s),C>=x)return j;if(\"function\"==typeof s.toJSON&&!0!==s[_])return(s=>{s[_]=!0;const o=s.toJSON();return delete s[_],o})(s);for(const[i,u]of Object.entries(s))\"function\"==typeof a&&a.isBuffer(u)?j[i]=\"[object Buffer]\":\"function\"!=typeof u&&(u&&\"object\"==typeof u?o.includes(s[i])?j[i]=\"[Circular]\":(C++,j[i]=destroyCircular({from:s[i],seen:o.slice(),forceEnumerable:w,maxDepth:x,depth:C})):j[i]=u);for(const{property:o,enumerable:i}of u)\"string\"==typeof s[o]&&Object.defineProperty(j,o,{value:s[o],enumerable:!!w||i,configurable:!0,writable:!0});return j};s.exports={serializeError:(s,o={})=>{const{maxDepth:i=Number.POSITIVE_INFINITY}=o;return\"object\"==typeof s&&null!==s?destroyCircular({from:s,seen:[],forceEnumerable:!0,maxDepth:i,depth:0}):\"function\"==typeof s?`[Function: ${s.name||\"anonymous\"}]`:s},deserializeError:(s,o={})=>{const{maxDepth:i=Number.POSITIVE_INFINITY}=o;if(s instanceof Error)return s;if(\"object\"==typeof s&&null!==s&&!Array.isArray(s)){const o=new Error;return destroyCircular({from:s,seen:[],to_:o,maxDepth:i,depth:0}),o}return new NonError(s)}}},20426:s=>{var o=Object.prototype.hasOwnProperty;s.exports=function baseHas(s,i){return null!=s&&o.call(s,i)}},20575:(s,o,i)=>{\"use strict\";var a=i(3121);s.exports=function(s){return a(s.length)}},20798:(s,o,i)=>{\"use strict\";var a,u,_=i(45951),w=i(96794),x=_.process,C=_.Deno,j=x&&x.versions||C&&C.version,L=j&&j.v8;L&&(u=(a=L.split(\".\"))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&w&&(!(a=w.match(/Edge\\/(\\d+)/))||a[1]>=74)&&(a=w.match(/Chrome\\/(\\d+)/))&&(u=+a[1]),s.exports=u},20850:(s,o,i)=>{\"use strict\";s.exports=i(46076)},20999:(s,o,i)=>{var a=i(69302),u=i(36800);s.exports=function createAssigner(s){return a((function(o,i){var a=-1,_=i.length,w=_>1?i[_-1]:void 0,x=_>2?i[2]:void 0;for(w=s.length>3&&\"function\"==typeof w?(_--,w):void 0,x&&u(i[0],i[1],x)&&(w=_<3?void 0:w,_=1),o=Object(o);++a<_;){var C=i[a];C&&s(o,C,a,w)}return o}))}},21549:(s,o,i)=>{var a=i(22032),u=i(63862),_=i(66721),w=i(12749),x=i(35749);function Hash(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){var a=s[o];this.set(a[0],a[1])}}Hash.prototype.clear=a,Hash.prototype.delete=u,Hash.prototype.get=_,Hash.prototype.has=w,Hash.prototype.set=x,s.exports=Hash},21791:(s,o,i)=>{var a=i(16547),u=i(43360);s.exports=function copyObject(s,o,i,_){var w=!i;i||(i={});for(var x=-1,C=o.length;++x<C;){var j=o[x],L=_?_(i[j],s[j],j,i,s):void 0;void 0===L&&(L=s[j]),w?u(i,j,L):a(i,j,L)}return i}},21986:(s,o,i)=>{var a=i(51873),u=i(37828),_=i(75288),w=i(25911),x=i(20317),C=i(84247),j=a?a.prototype:void 0,L=j?j.valueOf:void 0;s.exports=function equalByTag(s,o,i,a,j,B,$){switch(i){case\"[object DataView]\":if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case\"[object ArrayBuffer]\":return!(s.byteLength!=o.byteLength||!B(new u(s),new u(o)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return _(+s,+o);case\"[object Error]\":return s.name==o.name&&s.message==o.message;case\"[object RegExp]\":case\"[object String]\":return s==o+\"\";case\"[object Map]\":var V=x;case\"[object Set]\":var U=1&a;if(V||(V=C),s.size!=o.size&&!U)return!1;var z=$.get(s);if(z)return z==o;a|=2,$.set(s,o);var Y=w(V(s),V(o),a,j,B,$);return $.delete(s),Y;case\"[object Symbol]\":if(L)return L.call(s)==L.call(o)}return!1}},22032:(s,o,i)=>{var a=i(81042);s.exports=function hashClear(){this.__data__=a?a(null):{},this.size=0}},22225:s=>{var o=\"\\\\ud800-\\\\udfff\",i=\"\\\\u2700-\\\\u27bf\",a=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",u=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",_=\"\\\\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\",w=\"[\"+_+\"]\",x=\"\\\\d+\",C=\"[\"+i+\"]\",j=\"[\"+a+\"]\",L=\"[^\"+o+_+x+i+a+u+\"]\",B=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",$=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",V=\"[\"+u+\"]\",U=\"(?:\"+j+\"|\"+L+\")\",z=\"(?:\"+V+\"|\"+L+\")\",Y=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",Z=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",ee=\"(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?\",ie=\"[\\\\ufe0e\\\\ufe0f]?\",ae=ie+ee+(\"(?:\\\\u200d(?:\"+[\"[^\"+o+\"]\",B,$].join(\"|\")+\")\"+ie+ee+\")*\"),ce=\"(?:\"+[C,B,$].join(\"|\")+\")\"+ae,le=RegExp([V+\"?\"+j+\"+\"+Y+\"(?=\"+[w,V,\"$\"].join(\"|\")+\")\",z+\"+\"+Z+\"(?=\"+[w,V+U,\"$\"].join(\"|\")+\")\",V+\"?\"+U+\"+\"+Y,V+\"+\"+Z,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",x,ce].join(\"|\"),\"g\");s.exports=function unicodeWords(s){return s.match(le)||[]}},22551:(s,o,i)=>{\"use strict\";var a=i(96540),u=i(69982);function p(s){for(var o=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+s,i=1;i<arguments.length;i++)o+=\"&args[]=\"+encodeURIComponent(arguments[i]);return\"Minified React error #\"+s+\"; visit \"+o+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var _=new Set,w={};function fa(s,o){ha(s,o),ha(s+\"Capture\",o)}function ha(s,o){for(w[s]=o,s=0;s<o.length;s++)_.add(o[s])}var x=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),C=Object.prototype.hasOwnProperty,j=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,L={},B={};function v(s,o,i,a,u,_,w){this.acceptsBooleans=2===o||3===o||4===o,this.attributeName=a,this.attributeNamespace=u,this.mustUseProperty=i,this.propertyName=s,this.type=o,this.sanitizeURL=_,this.removeEmptyString=w}var $={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach((function(s){$[s]=new v(s,0,!1,s,null,!1,!1)})),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach((function(s){var o=s[0];$[o]=new v(o,1,!1,s[1],null,!1,!1)})),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach((function(s){$[s]=new v(s,2,!1,s.toLowerCase(),null,!1,!1)})),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach((function(s){$[s]=new v(s,2,!1,s,null,!1,!1)})),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach((function(s){$[s]=new v(s,3,!1,s.toLowerCase(),null,!1,!1)})),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach((function(s){$[s]=new v(s,3,!0,s,null,!1,!1)})),[\"capture\",\"download\"].forEach((function(s){$[s]=new v(s,4,!1,s,null,!1,!1)})),[\"cols\",\"rows\",\"size\",\"span\"].forEach((function(s){$[s]=new v(s,6,!1,s,null,!1,!1)})),[\"rowSpan\",\"start\"].forEach((function(s){$[s]=new v(s,5,!1,s.toLowerCase(),null,!1,!1)}));var V=/[\\-:]([a-z])/g;function sa(s){return s[1].toUpperCase()}function ta(s,o,i,a){var u=$.hasOwnProperty(o)?$[o]:null;(null!==u?0!==u.type:a||!(2<o.length)||\"o\"!==o[0]&&\"O\"!==o[0]||\"n\"!==o[1]&&\"N\"!==o[1])&&(function qa(s,o,i,a){if(null==o||function pa(s,o,i,a){if(null!==i&&0===i.type)return!1;switch(typeof o){case\"function\":case\"symbol\":return!0;case\"boolean\":return!a&&(null!==i?!i.acceptsBooleans:\"data-\"!==(s=s.toLowerCase().slice(0,5))&&\"aria-\"!==s);default:return!1}}(s,o,i,a))return!0;if(a)return!1;if(null!==i)switch(i.type){case 3:return!o;case 4:return!1===o;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}(o,i,u,a)&&(i=null),a||null===u?function oa(s){return!!C.call(B,s)||!C.call(L,s)&&(j.test(s)?B[s]=!0:(L[s]=!0,!1))}(o)&&(null===i?s.removeAttribute(o):s.setAttribute(o,\"\"+i)):u.mustUseProperty?s[u.propertyName]=null===i?3!==u.type&&\"\":i:(o=u.attributeName,a=u.attributeNamespace,null===i?s.removeAttribute(o):(i=3===(u=u.type)||4===u&&!0===i?\"\":\"\"+i,a?s.setAttributeNS(a,o,i):s.setAttribute(o,i))))}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach((function(s){var o=s.replace(V,sa);$[o]=new v(o,1,!1,s,null,!1,!1)})),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach((function(s){var o=s.replace(V,sa);$[o]=new v(o,1,!1,s,\"http://www.w3.org/1999/xlink\",!1,!1)})),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach((function(s){var o=s.replace(V,sa);$[o]=new v(o,1,!1,s,\"http://www.w3.org/XML/1998/namespace\",!1,!1)})),[\"tabIndex\",\"crossOrigin\"].forEach((function(s){$[s]=new v(s,1,!1,s.toLowerCase(),null,!1,!1)})),$.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach((function(s){$[s]=new v(s,1,!1,s.toLowerCase(),null,!0,!0)}));var U=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for(\"react.element\"),Y=Symbol.for(\"react.portal\"),Z=Symbol.for(\"react.fragment\"),ee=Symbol.for(\"react.strict_mode\"),ie=Symbol.for(\"react.profiler\"),ae=Symbol.for(\"react.provider\"),ce=Symbol.for(\"react.context\"),le=Symbol.for(\"react.forward_ref\"),pe=Symbol.for(\"react.suspense\"),de=Symbol.for(\"react.suspense_list\"),fe=Symbol.for(\"react.memo\"),ye=Symbol.for(\"react.lazy\");Symbol.for(\"react.scope\"),Symbol.for(\"react.debug_trace_mode\");var be=Symbol.for(\"react.offscreen\");Symbol.for(\"react.legacy_hidden\"),Symbol.for(\"react.cache\"),Symbol.for(\"react.tracing_marker\");var _e=Symbol.iterator;function Ka(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=_e&&s[_e]||s[\"@@iterator\"])?s:null}var Se,we=Object.assign;function Ma(s){if(void 0===Se)try{throw Error()}catch(s){var o=s.stack.trim().match(/\\n( *(at )?)/);Se=o&&o[1]||\"\"}return\"\\n\"+Se+s}var xe=!1;function Oa(s,o){if(!s||xe)return\"\";xe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,\"props\",{set:function(){throw Error()}}),\"object\"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(s){var a=s}Reflect.construct(s,[],o)}else{try{o.call()}catch(s){a=s}s.call(o.prototype)}else{try{throw Error()}catch(s){a=s}s()}}catch(o){if(o&&a&&\"string\"==typeof o.stack){for(var u=o.stack.split(\"\\n\"),_=a.stack.split(\"\\n\"),w=u.length-1,x=_.length-1;1<=w&&0<=x&&u[w]!==_[x];)x--;for(;1<=w&&0<=x;w--,x--)if(u[w]!==_[x]){if(1!==w||1!==x)do{if(w--,0>--x||u[w]!==_[x]){var C=\"\\n\"+u[w].replace(\" at new \",\" at \");return s.displayName&&C.includes(\"<anonymous>\")&&(C=C.replace(\"<anonymous>\",s.displayName)),C}}while(1<=w&&0<=x);break}}}finally{xe=!1,Error.prepareStackTrace=i}return(s=s?s.displayName||s.name:\"\")?Ma(s):\"\"}function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return s=Oa(s.type,!1);case 11:return s=Oa(s.type.render,!1);case 1:return s=Oa(s.type,!0);default:return\"\"}}function Qa(s){if(null==s)return null;if(\"function\"==typeof s)return s.displayName||s.name||null;if(\"string\"==typeof s)return s;switch(s){case Z:return\"Fragment\";case Y:return\"Portal\";case ie:return\"Profiler\";case ee:return\"StrictMode\";case pe:return\"Suspense\";case de:return\"SuspenseList\"}if(\"object\"==typeof s)switch(s.$$typeof){case ce:return(s.displayName||\"Context\")+\".Consumer\";case ae:return(s._context.displayName||\"Context\")+\".Provider\";case le:var o=s.render;return(s=s.displayName)||(s=\"\"!==(s=o.displayName||o.name||\"\")?\"ForwardRef(\"+s+\")\":\"ForwardRef\"),s;case fe:return null!==(o=s.displayName||null)?o:Qa(s.type)||\"Memo\";case ye:o=s._payload,s=s._init;try{return Qa(s(o))}catch(s){}}return null}function Ra(s){var o=s.type;switch(s.tag){case 24:return\"Cache\";case 9:return(o.displayName||\"Context\")+\".Consumer\";case 10:return(o._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return s=(s=o.render).displayName||s.name||\"\",o.displayName||(\"\"!==s?\"ForwardRef(\"+s+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return o;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(o);case 8:return o===ee?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"==typeof o)return o.displayName||o.name||null;if(\"string\"==typeof o)return o}return null}function Sa(s){switch(typeof s){case\"boolean\":case\"number\":case\"string\":case\"undefined\":case\"object\":return s;default:return\"\"}}function Ta(s){var o=s.type;return(s=s.nodeName)&&\"input\"===s.toLowerCase()&&(\"checkbox\"===o||\"radio\"===o)}function Va(s){s._valueTracker||(s._valueTracker=function Ua(s){var o=Ta(s)?\"checked\":\"value\",i=Object.getOwnPropertyDescriptor(s.constructor.prototype,o),a=\"\"+s[o];if(!s.hasOwnProperty(o)&&void 0!==i&&\"function\"==typeof i.get&&\"function\"==typeof i.set){var u=i.get,_=i.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return u.call(this)},set:function(s){a=\"\"+s,_.call(this,s)}}),Object.defineProperty(s,o,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(s){a=\"\"+s},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}(s))}function Wa(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var i=o.getValue(),a=\"\";return s&&(a=Ta(s)?s.checked?\"true\":\"false\":s.value),(s=a)!==i&&(o.setValue(s),!0)}function Xa(s){if(void 0===(s=s||(\"undefined\"!=typeof document?document:void 0)))return null;try{return s.activeElement||s.body}catch(o){return s.body}}function Ya(s,o){var i=o.checked;return we({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=i?i:s._wrapperState.initialChecked})}function Za(s,o){var i=null==o.defaultValue?\"\":o.defaultValue,a=null!=o.checked?o.checked:o.defaultChecked;i=Sa(null!=o.value?o.value:i),s._wrapperState={initialChecked:a,initialValue:i,controlled:\"checkbox\"===o.type||\"radio\"===o.type?null!=o.checked:null!=o.value}}function ab(s,o){null!=(o=o.checked)&&ta(s,\"checked\",o,!1)}function bb(s,o){ab(s,o);var i=Sa(o.value),a=o.type;if(null!=i)\"number\"===a?(0===i&&\"\"===s.value||s.value!=i)&&(s.value=\"\"+i):s.value!==\"\"+i&&(s.value=\"\"+i);else if(\"submit\"===a||\"reset\"===a)return void s.removeAttribute(\"value\");o.hasOwnProperty(\"value\")?cb(s,o.type,i):o.hasOwnProperty(\"defaultValue\")&&cb(s,o.type,Sa(o.defaultValue)),null==o.checked&&null!=o.defaultChecked&&(s.defaultChecked=!!o.defaultChecked)}function db(s,o,i){if(o.hasOwnProperty(\"value\")||o.hasOwnProperty(\"defaultValue\")){var a=o.type;if(!(\"submit\"!==a&&\"reset\"!==a||void 0!==o.value&&null!==o.value))return;o=\"\"+s._wrapperState.initialValue,i||o===s.value||(s.value=o),s.defaultValue=o}\"\"!==(i=s.name)&&(s.name=\"\"),s.defaultChecked=!!s._wrapperState.initialChecked,\"\"!==i&&(s.name=i)}function cb(s,o,i){\"number\"===o&&Xa(s.ownerDocument)===s||(null==i?s.defaultValue=\"\"+s._wrapperState.initialValue:s.defaultValue!==\"\"+i&&(s.defaultValue=\"\"+i))}var Pe=Array.isArray;function fb(s,o,i,a){if(s=s.options,o){o={};for(var u=0;u<i.length;u++)o[\"$\"+i[u]]=!0;for(i=0;i<s.length;i++)u=o.hasOwnProperty(\"$\"+s[i].value),s[i].selected!==u&&(s[i].selected=u),u&&a&&(s[i].defaultSelected=!0)}else{for(i=\"\"+Sa(i),o=null,u=0;u<s.length;u++){if(s[u].value===i)return s[u].selected=!0,void(a&&(s[u].defaultSelected=!0));null!==o||s[u].disabled||(o=s[u])}null!==o&&(o.selected=!0)}}function gb(s,o){if(null!=o.dangerouslySetInnerHTML)throw Error(p(91));return we({},o,{value:void 0,defaultValue:void 0,children:\"\"+s._wrapperState.initialValue})}function hb(s,o){var i=o.value;if(null==i){if(i=o.children,o=o.defaultValue,null!=i){if(null!=o)throw Error(p(92));if(Pe(i)){if(1<i.length)throw Error(p(93));i=i[0]}o=i}null==o&&(o=\"\"),i=o}s._wrapperState={initialValue:Sa(i)}}function ib(s,o){var i=Sa(o.value),a=Sa(o.defaultValue);null!=i&&((i=\"\"+i)!==s.value&&(s.value=i),null==o.defaultValue&&s.defaultValue!==i&&(s.defaultValue=i)),null!=a&&(s.defaultValue=\"\"+a)}function jb(s){var o=s.textContent;o===s._wrapperState.initialValue&&\"\"!==o&&null!==o&&(s.value=o)}function kb(s){switch(s){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function lb(s,o){return null==s||\"http://www.w3.org/1999/xhtml\"===s?kb(o):\"http://www.w3.org/2000/svg\"===s&&\"foreignObject\"===o?\"http://www.w3.org/1999/xhtml\":s}var Te,Re,$e=(Re=function(s,o){if(\"http://www.w3.org/2000/svg\"!==s.namespaceURI||\"innerHTML\"in s)s.innerHTML=o;else{for((Te=Te||document.createElement(\"div\")).innerHTML=\"<svg>\"+o.valueOf().toString()+\"</svg>\",o=Te.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;o.firstChild;)s.appendChild(o.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(s,o,i,a){MSApp.execUnsafeLocalFunction((function(){return Re(s,o)}))}:Re);function ob(s,o){if(o){var i=s.firstChild;if(i&&i===s.lastChild&&3===i.nodeType)return void(i.nodeValue=o)}s.textContent=o}var qe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ze=[\"Webkit\",\"ms\",\"Moz\",\"O\"];function rb(s,o,i){return null==o||\"boolean\"==typeof o||\"\"===o?\"\":i||\"number\"!=typeof o||0===o||qe.hasOwnProperty(s)&&qe[s]?(\"\"+o).trim():o+\"px\"}function sb(s,o){for(var i in s=s.style,o)if(o.hasOwnProperty(i)){var a=0===i.indexOf(\"--\"),u=rb(i,o[i],a);\"float\"===i&&(i=\"cssFloat\"),a?s.setProperty(i,u):s[i]=u}}Object.keys(qe).forEach((function(s){ze.forEach((function(o){o=o+s.charAt(0).toUpperCase()+s.substring(1),qe[o]=qe[s]}))}));var We=we({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(s,o){if(o){if(We[s]&&(null!=o.children||null!=o.dangerouslySetInnerHTML))throw Error(p(137,s));if(null!=o.dangerouslySetInnerHTML){if(null!=o.children)throw Error(p(60));if(\"object\"!=typeof o.dangerouslySetInnerHTML||!(\"__html\"in o.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=o.style&&\"object\"!=typeof o.style)throw Error(p(62))}}function vb(s,o){if(-1===s.indexOf(\"-\"))return\"string\"==typeof o.is;switch(s){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var He=null;function xb(s){return(s=s.target||s.srcElement||window).correspondingUseElement&&(s=s.correspondingUseElement),3===s.nodeType?s.parentNode:s}var Ye=null,Xe=null,Qe=null;function Bb(s){if(s=Cb(s)){if(\"function\"!=typeof Ye)throw Error(p(280));var o=s.stateNode;o&&(o=Db(o),Ye(s.stateNode,s.type,o))}}function Eb(s){Xe?Qe?Qe.push(s):Qe=[s]:Xe=s}function Fb(){if(Xe){var s=Xe,o=Qe;if(Qe=Xe=null,Bb(s),o)for(s=0;s<o.length;s++)Bb(o[s])}}function Gb(s,o){return s(o)}function Hb(){}var et=!1;function Jb(s,o,i){if(et)return s(o,i);et=!0;try{return Gb(s,o,i)}finally{et=!1,(null!==Xe||null!==Qe)&&(Hb(),Fb())}}function Kb(s,o){var i=s.stateNode;if(null===i)return null;var a=Db(i);if(null===a)return null;i=a[o];e:switch(o){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(a=!a.disabled)||(a=!(\"button\"===(s=s.type)||\"input\"===s||\"select\"===s||\"textarea\"===s)),s=!a;break e;default:s=!1}if(s)return null;if(i&&\"function\"!=typeof i)throw Error(p(231,o,typeof i));return i}var tt=!1;if(x)try{var rt={};Object.defineProperty(rt,\"passive\",{get:function(){tt=!0}}),window.addEventListener(\"test\",rt,rt),window.removeEventListener(\"test\",rt,rt)}catch(Re){tt=!1}function Nb(s,o,i,a,u,_,w,x,C){var j=Array.prototype.slice.call(arguments,3);try{o.apply(i,j)}catch(s){this.onError(s)}}var nt=!1,st=null,ot=!1,it=null,at={onError:function(s){nt=!0,st=s}};function Tb(s,o,i,a,u,_,w,x,C){nt=!1,st=null,Nb.apply(at,arguments)}function Vb(s){var o=s,i=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do{!!(4098&(o=s).flags)&&(i=o.return),s=o.return}while(s)}return 3===o.tag?i:null}function Wb(s){if(13===s.tag){var o=s.memoizedState;if(null===o&&(null!==(s=s.alternate)&&(o=s.memoizedState)),null!==o)return o.dehydrated}return null}function Xb(s){if(Vb(s)!==s)throw Error(p(188))}function Zb(s){return null!==(s=function Yb(s){var o=s.alternate;if(!o){if(null===(o=Vb(s)))throw Error(p(188));return o!==s?null:s}for(var i=s,a=o;;){var u=i.return;if(null===u)break;var _=u.alternate;if(null===_){if(null!==(a=u.return)){i=a;continue}break}if(u.child===_.child){for(_=u.child;_;){if(_===i)return Xb(u),s;if(_===a)return Xb(u),o;_=_.sibling}throw Error(p(188))}if(i.return!==a.return)i=u,a=_;else{for(var w=!1,x=u.child;x;){if(x===i){w=!0,i=u,a=_;break}if(x===a){w=!0,a=u,i=_;break}x=x.sibling}if(!w){for(x=_.child;x;){if(x===i){w=!0,i=_,a=u;break}if(x===a){w=!0,a=_,i=u;break}x=x.sibling}if(!w)throw Error(p(189))}}if(i.alternate!==a)throw Error(p(190))}if(3!==i.tag)throw Error(p(188));return i.stateNode.current===i?s:o}(s))?$b(s):null}function $b(s){if(5===s.tag||6===s.tag)return s;for(s=s.child;null!==s;){var o=$b(s);if(null!==o)return o;s=s.sibling}return null}var ct=u.unstable_scheduleCallback,lt=u.unstable_cancelCallback,ut=u.unstable_shouldYield,pt=u.unstable_requestPaint,ht=u.unstable_now,dt=u.unstable_getCurrentPriorityLevel,mt=u.unstable_ImmediatePriority,gt=u.unstable_UserBlockingPriority,yt=u.unstable_NormalPriority,vt=u.unstable_LowPriority,bt=u.unstable_IdlePriority,_t=null,St=null;var Et=Math.clz32?Math.clz32:function nc(s){return s>>>=0,0===s?32:31-(wt(s)/xt|0)|0},wt=Math.log,xt=Math.LN2;var kt=64,Ot=4194304;function tc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&s;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&s;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function uc(s,o){var i=s.pendingLanes;if(0===i)return 0;var a=0,u=s.suspendedLanes,_=s.pingedLanes,w=268435455&i;if(0!==w){var x=w&~u;0!==x?a=tc(x):0!==(_&=w)&&(a=tc(_))}else 0!==(w=i&~u)?a=tc(w):0!==_&&(a=tc(_));if(0===a)return 0;if(0!==o&&o!==a&&!(o&u)&&((u=a&-a)>=(_=o&-o)||16===u&&4194240&_))return o;if(4&a&&(a|=16&i),0!==(o=s.entangledLanes))for(s=s.entanglements,o&=a;0<o;)u=1<<(i=31-Et(o)),a|=s[i],o&=~u;return a}function vc(s,o){switch(s){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;default:return-1}}function xc(s){return 0!==(s=-1073741825&s.pendingLanes)?s:1073741824&s?1073741824:0}function yc(){var s=kt;return!(4194240&(kt<<=1))&&(kt=64),s}function zc(s){for(var o=[],i=0;31>i;i++)o.push(s);return o}function Ac(s,o,i){s.pendingLanes|=o,536870912!==o&&(s.suspendedLanes=0,s.pingedLanes=0),(s=s.eventTimes)[o=31-Et(o)]=i}function Cc(s,o){var i=s.entangledLanes|=o;for(s=s.entanglements;i;){var a=31-Et(i),u=1<<a;u&o|s[a]&o&&(s[a]|=o),i&=~u}}var Ct=0;function Dc(s){return 1<(s&=-s)?4<s?268435455&s?16:536870912:4:1}var At,jt,It,Pt,Tt,Nt=!1,Mt=[],Rt=null,Dt=null,Lt=null,Ft=new Map,Bt=new Map,$t=[],qt=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");function Sc(s,o){switch(s){case\"focusin\":case\"focusout\":Rt=null;break;case\"dragenter\":case\"dragleave\":Dt=null;break;case\"mouseover\":case\"mouseout\":Lt=null;break;case\"pointerover\":case\"pointerout\":Ft.delete(o.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":Bt.delete(o.pointerId)}}function Tc(s,o,i,a,u,_){return null===s||s.nativeEvent!==_?(s={blockedOn:o,domEventName:i,eventSystemFlags:a,nativeEvent:_,targetContainers:[u]},null!==o&&(null!==(o=Cb(o))&&jt(o)),s):(s.eventSystemFlags|=a,o=s.targetContainers,null!==u&&-1===o.indexOf(u)&&o.push(u),s)}function Vc(s){var o=Wc(s.target);if(null!==o){var i=Vb(o);if(null!==i)if(13===(o=i.tag)){if(null!==(o=Wb(i)))return s.blockedOn=o,void Tt(s.priority,(function(){It(i)}))}else if(3===o&&i.stateNode.current.memoizedState.isDehydrated)return void(s.blockedOn=3===i.tag?i.stateNode.containerInfo:null)}s.blockedOn=null}function Xc(s){if(null!==s.blockedOn)return!1;for(var o=s.targetContainers;0<o.length;){var i=Yc(s.domEventName,s.eventSystemFlags,o[0],s.nativeEvent);if(null!==i)return null!==(o=Cb(i))&&jt(o),s.blockedOn=i,!1;var a=new(i=s.nativeEvent).constructor(i.type,i);He=a,i.target.dispatchEvent(a),He=null,o.shift()}return!0}function Zc(s,o,i){Xc(s)&&i.delete(o)}function $c(){Nt=!1,null!==Rt&&Xc(Rt)&&(Rt=null),null!==Dt&&Xc(Dt)&&(Dt=null),null!==Lt&&Xc(Lt)&&(Lt=null),Ft.forEach(Zc),Bt.forEach(Zc)}function ad(s,o){s.blockedOn===o&&(s.blockedOn=null,Nt||(Nt=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,$c)))}function bd(s){function b(o){return ad(o,s)}if(0<Mt.length){ad(Mt[0],s);for(var o=1;o<Mt.length;o++){var i=Mt[o];i.blockedOn===s&&(i.blockedOn=null)}}for(null!==Rt&&ad(Rt,s),null!==Dt&&ad(Dt,s),null!==Lt&&ad(Lt,s),Ft.forEach(b),Bt.forEach(b),o=0;o<$t.length;o++)(i=$t[o]).blockedOn===s&&(i.blockedOn=null);for(;0<$t.length&&null===(o=$t[0]).blockedOn;)Vc(o),null===o.blockedOn&&$t.shift()}var Vt=U.ReactCurrentBatchConfig,Ut=!0;function ed(s,o,i,a){var u=Ct,_=Vt.transition;Vt.transition=null;try{Ct=1,fd(s,o,i,a)}finally{Ct=u,Vt.transition=_}}function gd(s,o,i,a){var u=Ct,_=Vt.transition;Vt.transition=null;try{Ct=4,fd(s,o,i,a)}finally{Ct=u,Vt.transition=_}}function fd(s,o,i,a){if(Ut){var u=Yc(s,o,i,a);if(null===u)hd(s,o,a,zt,i),Sc(s,a);else if(function Uc(s,o,i,a,u){switch(o){case\"focusin\":return Rt=Tc(Rt,s,o,i,a,u),!0;case\"dragenter\":return Dt=Tc(Dt,s,o,i,a,u),!0;case\"mouseover\":return Lt=Tc(Lt,s,o,i,a,u),!0;case\"pointerover\":var _=u.pointerId;return Ft.set(_,Tc(Ft.get(_)||null,s,o,i,a,u)),!0;case\"gotpointercapture\":return _=u.pointerId,Bt.set(_,Tc(Bt.get(_)||null,s,o,i,a,u)),!0}return!1}(u,s,o,i,a))a.stopPropagation();else if(Sc(s,a),4&o&&-1<qt.indexOf(s)){for(;null!==u;){var _=Cb(u);if(null!==_&&At(_),null===(_=Yc(s,o,i,a))&&hd(s,o,a,zt,i),_===u)break;u=_}null!==u&&a.stopPropagation()}else hd(s,o,a,null,i)}}var zt=null;function Yc(s,o,i,a){if(zt=null,null!==(s=Wc(s=xb(a))))if(null===(o=Vb(s)))s=null;else if(13===(i=o.tag)){if(null!==(s=Wb(o)))return s;s=null}else if(3===i){if(o.stateNode.current.memoizedState.isDehydrated)return 3===o.tag?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null);return zt=s,null}function jd(s){switch(s){case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 1;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"toggle\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 4;case\"message\":switch(dt()){case mt:return 1;case gt:return 4;case yt:case vt:return 16;case bt:return 536870912;default:return 16}default:return 16}}var Wt=null,Jt=null,Ht=null;function nd(){if(Ht)return Ht;var s,o,i=Jt,a=i.length,u=\"value\"in Wt?Wt.value:Wt.textContent,_=u.length;for(s=0;s<a&&i[s]===u[s];s++);var w=a-s;for(o=1;o<=w&&i[a-o]===u[_-o];o++);return Ht=u.slice(s,1<o?1-o:void 0)}function od(s){var o=s.keyCode;return\"charCode\"in s?0===(s=s.charCode)&&13===o&&(s=13):s=o,10===s&&(s=13),32<=s||13===s?s:0}function pd(){return!0}function qd(){return!1}function rd(s){function b(o,i,a,u,_){for(var w in this._reactName=o,this._targetInst=a,this.type=i,this.nativeEvent=u,this.target=_,this.currentTarget=null,s)s.hasOwnProperty(w)&&(o=s[w],this[w]=o?o(u):u[w]);return this.isDefaultPrevented=(null!=u.defaultPrevented?u.defaultPrevented:!1===u.returnValue)?pd:qd,this.isPropagationStopped=qd,this}return we(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():\"unknown\"!=typeof s.returnValue&&(s.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():\"unknown\"!=typeof s.cancelBubble&&(s.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),b}var Kt,Gt,Yt,Xt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qt=rd(Xt),Zt=we({},Xt,{view:0,detail:0}),er=rd(Zt),tr=we({},Zt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(s){return void 0===s.relatedTarget?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return\"movementX\"in s?s.movementX:(s!==Yt&&(Yt&&\"mousemove\"===s.type?(Kt=s.screenX-Yt.screenX,Gt=s.screenY-Yt.screenY):Gt=Kt=0,Yt=s),Kt)},movementY:function(s){return\"movementY\"in s?s.movementY:Gt}}),rr=rd(tr),nr=rd(we({},tr,{dataTransfer:0})),sr=rd(we({},Zt,{relatedTarget:0})),ir=rd(we({},Xt,{animationName:0,elapsedTime:0,pseudoElement:0})),ar=we({},Xt,{clipboardData:function(s){return\"clipboardData\"in s?s.clipboardData:window.clipboardData}}),cr=rd(ar),lr=rd(we({},Xt,{data:0})),ur={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},pr={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},dr={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):!!(s=dr[s])&&!!o[s]}function zd(){return Pd}var fr=we({},Zt,{key:function(s){if(s.key){var o=ur[s.key]||s.key;if(\"Unidentified\"!==o)return o}return\"keypress\"===s.type?13===(s=od(s))?\"Enter\":String.fromCharCode(s):\"keydown\"===s.type||\"keyup\"===s.type?pr[s.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(s){return\"keypress\"===s.type?od(s):0},keyCode:function(s){return\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0},which:function(s){return\"keypress\"===s.type?od(s):\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0}}),mr=rd(fr),gr=rd(we({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),yr=rd(we({},Zt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd})),vr=rd(we({},Xt,{propertyName:0,elapsedTime:0,pseudoElement:0})),br=we({},tr,{deltaX:function(s){return\"deltaX\"in s?s.deltaX:\"wheelDeltaX\"in s?-s.wheelDeltaX:0},deltaY:function(s){return\"deltaY\"in s?s.deltaY:\"wheelDeltaY\"in s?-s.wheelDeltaY:\"wheelDelta\"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),_r=rd(br),Sr=[9,13,27,32],Er=x&&\"CompositionEvent\"in window,wr=null;x&&\"documentMode\"in document&&(wr=document.documentMode);var xr=x&&\"TextEvent\"in window&&!wr,kr=x&&(!Er||wr&&8<wr&&11>=wr),Or=String.fromCharCode(32),Cr=!1;function ge(s,o){switch(s){case\"keyup\":return-1!==Sr.indexOf(o.keyCode);case\"keydown\":return 229!==o.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function he(s){return\"object\"==typeof(s=s.detail)&&\"data\"in s?s.data:null}var Ar=!1;var jr={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return\"input\"===o?!!jr[s.type]:\"textarea\"===o}function ne(s,o,i,a){Eb(a),0<(o=oe(o,\"onChange\")).length&&(i=new Qt(\"onChange\",\"change\",null,i,a),s.push({event:i,listeners:o}))}var Ir=null,Pr=null;function re(s){se(s,0)}function te(s){if(Wa(ue(s)))return s}function ve(s,o){if(\"change\"===s)return o}var Tr=!1;if(x){var Nr;if(x){var Mr=\"oninput\"in document;if(!Mr){var Rr=document.createElement(\"div\");Rr.setAttribute(\"oninput\",\"return;\"),Mr=\"function\"==typeof Rr.oninput}Nr=Mr}else Nr=!1;Tr=Nr&&(!document.documentMode||9<document.documentMode)}function Ae(){Ir&&(Ir.detachEvent(\"onpropertychange\",Be),Pr=Ir=null)}function Be(s){if(\"value\"===s.propertyName&&te(Pr)){var o=[];ne(o,Pr,s,xb(s)),Jb(re,o)}}function Ce(s,o,i){\"focusin\"===s?(Ae(),Pr=i,(Ir=o).attachEvent(\"onpropertychange\",Be)):\"focusout\"===s&&Ae()}function De(s){if(\"selectionchange\"===s||\"keyup\"===s||\"keydown\"===s)return te(Pr)}function Ee(s,o){if(\"click\"===s)return te(o)}function Fe(s,o){if(\"input\"===s||\"change\"===s)return te(o)}var Dr=\"function\"==typeof Object.is?Object.is:function Ge(s,o){return s===o&&(0!==s||1/s==1/o)||s!=s&&o!=o};function Ie(s,o){if(Dr(s,o))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof o||null===o)return!1;var i=Object.keys(s),a=Object.keys(o);if(i.length!==a.length)return!1;for(a=0;a<i.length;a++){var u=i[a];if(!C.call(o,u)||!Dr(s[u],o[u]))return!1}return!0}function Je(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ke(s,o){var i,a=Je(s);for(s=0;a;){if(3===a.nodeType){if(i=s+a.textContent.length,s<=o&&i>=o)return{node:a,offset:o-s};s=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Je(a)}}function Le(s,o){return!(!s||!o)&&(s===o||(!s||3!==s.nodeType)&&(o&&3===o.nodeType?Le(s,o.parentNode):\"contains\"in s?s.contains(o):!!s.compareDocumentPosition&&!!(16&s.compareDocumentPosition(o))))}function Me(){for(var s=window,o=Xa();o instanceof s.HTMLIFrameElement;){try{var i=\"string\"==typeof o.contentWindow.location.href}catch(s){i=!1}if(!i)break;o=Xa((s=o.contentWindow).document)}return o}function Ne(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(\"input\"===o&&(\"text\"===s.type||\"search\"===s.type||\"tel\"===s.type||\"url\"===s.type||\"password\"===s.type)||\"textarea\"===o||\"true\"===s.contentEditable)}function Oe(s){var o=Me(),i=s.focusedElem,a=s.selectionRange;if(o!==i&&i&&i.ownerDocument&&Le(i.ownerDocument.documentElement,i)){if(null!==a&&Ne(i))if(o=a.start,void 0===(s=a.end)&&(s=o),\"selectionStart\"in i)i.selectionStart=o,i.selectionEnd=Math.min(s,i.value.length);else if((s=(o=i.ownerDocument||document)&&o.defaultView||window).getSelection){s=s.getSelection();var u=i.textContent.length,_=Math.min(a.start,u);a=void 0===a.end?_:Math.min(a.end,u),!s.extend&&_>a&&(u=a,a=_,_=u),u=Ke(i,_);var w=Ke(i,a);u&&w&&(1!==s.rangeCount||s.anchorNode!==u.node||s.anchorOffset!==u.offset||s.focusNode!==w.node||s.focusOffset!==w.offset)&&((o=o.createRange()).setStart(u.node,u.offset),s.removeAllRanges(),_>a?(s.addRange(o),s.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),s.addRange(o)))}for(o=[],s=i;s=s.parentNode;)1===s.nodeType&&o.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(\"function\"==typeof i.focus&&i.focus(),i=0;i<o.length;i++)(s=o[i]).element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Lr=x&&\"documentMode\"in document&&11>=document.documentMode,Fr=null,Br=null,$r=null,qr=!1;function Ue(s,o,i){var a=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;qr||null==Fr||Fr!==Xa(a)||(\"selectionStart\"in(a=Fr)&&Ne(a)?a={start:a.selectionStart,end:a.selectionEnd}:a={anchorNode:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset},$r&&Ie($r,a)||($r=a,0<(a=oe(Br,\"onSelect\")).length&&(o=new Qt(\"onSelect\",\"select\",null,o,i),s.push({event:o,listeners:a}),o.target=Fr)))}function Ve(s,o){var i={};return i[s.toLowerCase()]=o.toLowerCase(),i[\"Webkit\"+s]=\"webkit\"+o,i[\"Moz\"+s]=\"moz\"+o,i}var Vr={animationend:Ve(\"Animation\",\"AnimationEnd\"),animationiteration:Ve(\"Animation\",\"AnimationIteration\"),animationstart:Ve(\"Animation\",\"AnimationStart\"),transitionend:Ve(\"Transition\",\"TransitionEnd\")},Ur={},zr={};function Ze(s){if(Ur[s])return Ur[s];if(!Vr[s])return s;var o,i=Vr[s];for(o in i)if(i.hasOwnProperty(o)&&o in zr)return Ur[s]=i[o];return s}x&&(zr=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),\"TransitionEvent\"in window||delete Vr.transitionend.transition);var Wr=Ze(\"animationend\"),Jr=Ze(\"animationiteration\"),Hr=Ze(\"animationstart\"),Kr=Ze(\"transitionend\"),Gr=new Map,Yr=\"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");function ff(s,o){Gr.set(s,o),fa(o,[s])}for(var Xr=0;Xr<Yr.length;Xr++){var Qr=Yr[Xr];ff(Qr.toLowerCase(),\"on\"+(Qr[0].toUpperCase()+Qr.slice(1)))}ff(Wr,\"onAnimationEnd\"),ff(Jr,\"onAnimationIteration\"),ff(Hr,\"onAnimationStart\"),ff(\"dblclick\",\"onDoubleClick\"),ff(\"focusin\",\"onFocus\"),ff(\"focusout\",\"onBlur\"),ff(Kr,\"onTransitionEnd\"),ha(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),ha(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),ha(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),ha(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),fa(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),fa(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),fa(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),fa(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Zr=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),en=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(Zr));function nf(s,o,i){var a=s.type||\"unknown-event\";s.currentTarget=i,function Ub(s,o,i,a,u,_,w,x,C){if(Tb.apply(this,arguments),nt){if(!nt)throw Error(p(198));var j=st;nt=!1,st=null,ot||(ot=!0,it=j)}}(a,o,void 0,s),s.currentTarget=null}function se(s,o){o=!!(4&o);for(var i=0;i<s.length;i++){var a=s[i],u=a.event;a=a.listeners;e:{var _=void 0;if(o)for(var w=a.length-1;0<=w;w--){var x=a[w],C=x.instance,j=x.currentTarget;if(x=x.listener,C!==_&&u.isPropagationStopped())break e;nf(u,x,j),_=C}else for(w=0;w<a.length;w++){if(C=(x=a[w]).instance,j=x.currentTarget,x=x.listener,C!==_&&u.isPropagationStopped())break e;nf(u,x,j),_=C}}}if(ot)throw s=it,ot=!1,it=null,s}function D(s,o){var i=o[mn];void 0===i&&(i=o[mn]=new Set);var a=s+\"__bubble\";i.has(a)||(pf(o,s,2,!1),i.add(a))}function qf(s,o,i){var a=0;o&&(a|=4),pf(i,s,a,o)}var tn=\"_reactListening\"+Math.random().toString(36).slice(2);function sf(s){if(!s[tn]){s[tn]=!0,_.forEach((function(o){\"selectionchange\"!==o&&(en.has(o)||qf(o,!1,s),qf(o,!0,s))}));var o=9===s.nodeType?s:s.ownerDocument;null===o||o[tn]||(o[tn]=!0,qf(\"selectionchange\",!1,o))}}function pf(s,o,i,a){switch(jd(o)){case 1:var u=ed;break;case 4:u=gd;break;default:u=fd}i=u.bind(null,o,i,s),u=void 0,!tt||\"touchstart\"!==o&&\"touchmove\"!==o&&\"wheel\"!==o||(u=!0),a?void 0!==u?s.addEventListener(o,i,{capture:!0,passive:u}):s.addEventListener(o,i,!0):void 0!==u?s.addEventListener(o,i,{passive:u}):s.addEventListener(o,i,!1)}function hd(s,o,i,a,u){var _=a;if(!(1&o||2&o||null===a))e:for(;;){if(null===a)return;var w=a.tag;if(3===w||4===w){var x=a.stateNode.containerInfo;if(x===u||8===x.nodeType&&x.parentNode===u)break;if(4===w)for(w=a.return;null!==w;){var C=w.tag;if((3===C||4===C)&&((C=w.stateNode.containerInfo)===u||8===C.nodeType&&C.parentNode===u))return;w=w.return}for(;null!==x;){if(null===(w=Wc(x)))return;if(5===(C=w.tag)||6===C){a=_=w;continue e}x=x.parentNode}}a=a.return}Jb((function(){var a=_,u=xb(i),w=[];e:{var x=Gr.get(s);if(void 0!==x){var C=Qt,j=s;switch(s){case\"keypress\":if(0===od(i))break e;case\"keydown\":case\"keyup\":C=mr;break;case\"focusin\":j=\"focus\",C=sr;break;case\"focusout\":j=\"blur\",C=sr;break;case\"beforeblur\":case\"afterblur\":C=sr;break;case\"click\":if(2===i.button)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":C=rr;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":C=nr;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":C=yr;break;case Wr:case Jr:case Hr:C=ir;break;case Kr:C=vr;break;case\"scroll\":C=er;break;case\"wheel\":C=_r;break;case\"copy\":case\"cut\":case\"paste\":C=cr;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":C=gr}var L=!!(4&o),B=!L&&\"scroll\"===s,$=L?null!==x?x+\"Capture\":null:x;L=[];for(var V,U=a;null!==U;){var z=(V=U).stateNode;if(5===V.tag&&null!==z&&(V=z,null!==$&&(null!=(z=Kb(U,$))&&L.push(tf(U,z,V)))),B)break;U=U.return}0<L.length&&(x=new C(x,j,null,i,u),w.push({event:x,listeners:L}))}}if(!(7&o)){if(C=\"mouseout\"===s||\"pointerout\"===s,(!(x=\"mouseover\"===s||\"pointerover\"===s)||i===He||!(j=i.relatedTarget||i.fromElement)||!Wc(j)&&!j[fn])&&(C||x)&&(x=u.window===u?u:(x=u.ownerDocument)?x.defaultView||x.parentWindow:window,C?(C=a,null!==(j=(j=i.relatedTarget||i.toElement)?Wc(j):null)&&(j!==(B=Vb(j))||5!==j.tag&&6!==j.tag)&&(j=null)):(C=null,j=a),C!==j)){if(L=rr,z=\"onMouseLeave\",$=\"onMouseEnter\",U=\"mouse\",\"pointerout\"!==s&&\"pointerover\"!==s||(L=gr,z=\"onPointerLeave\",$=\"onPointerEnter\",U=\"pointer\"),B=null==C?x:ue(C),V=null==j?x:ue(j),(x=new L(z,U+\"leave\",C,i,u)).target=B,x.relatedTarget=V,z=null,Wc(u)===a&&((L=new L($,U+\"enter\",j,i,u)).target=V,L.relatedTarget=B,z=L),B=z,C&&j)e:{for($=j,U=0,V=L=C;V;V=vf(V))U++;for(V=0,z=$;z;z=vf(z))V++;for(;0<U-V;)L=vf(L),U--;for(;0<V-U;)$=vf($),V--;for(;U--;){if(L===$||null!==$&&L===$.alternate)break e;L=vf(L),$=vf($)}L=null}else L=null;null!==C&&wf(w,x,C,L,!1),null!==j&&null!==B&&wf(w,B,j,L,!0)}if(\"select\"===(C=(x=a?ue(a):window).nodeName&&x.nodeName.toLowerCase())||\"input\"===C&&\"file\"===x.type)var Y=ve;else if(me(x))if(Tr)Y=Fe;else{Y=De;var Z=Ce}else(C=x.nodeName)&&\"input\"===C.toLowerCase()&&(\"checkbox\"===x.type||\"radio\"===x.type)&&(Y=Ee);switch(Y&&(Y=Y(s,a))?ne(w,Y,i,u):(Z&&Z(s,x,a),\"focusout\"===s&&(Z=x._wrapperState)&&Z.controlled&&\"number\"===x.type&&cb(x,\"number\",x.value)),Z=a?ue(a):window,s){case\"focusin\":(me(Z)||\"true\"===Z.contentEditable)&&(Fr=Z,Br=a,$r=null);break;case\"focusout\":$r=Br=Fr=null;break;case\"mousedown\":qr=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":qr=!1,Ue(w,i,u);break;case\"selectionchange\":if(Lr)break;case\"keydown\":case\"keyup\":Ue(w,i,u)}var ee;if(Er)e:{switch(s){case\"compositionstart\":var ie=\"onCompositionStart\";break e;case\"compositionend\":ie=\"onCompositionEnd\";break e;case\"compositionupdate\":ie=\"onCompositionUpdate\";break e}ie=void 0}else Ar?ge(s,i)&&(ie=\"onCompositionEnd\"):\"keydown\"===s&&229===i.keyCode&&(ie=\"onCompositionStart\");ie&&(kr&&\"ko\"!==i.locale&&(Ar||\"onCompositionStart\"!==ie?\"onCompositionEnd\"===ie&&Ar&&(ee=nd()):(Jt=\"value\"in(Wt=u)?Wt.value:Wt.textContent,Ar=!0)),0<(Z=oe(a,ie)).length&&(ie=new lr(ie,s,null,i,u),w.push({event:ie,listeners:Z}),ee?ie.data=ee:null!==(ee=he(i))&&(ie.data=ee))),(ee=xr?function je(s,o){switch(s){case\"compositionend\":return he(o);case\"keypress\":return 32!==o.which?null:(Cr=!0,Or);case\"textInput\":return(s=o.data)===Or&&Cr?null:s;default:return null}}(s,i):function ke(s,o){if(Ar)return\"compositionend\"===s||!Er&&ge(s,o)?(s=nd(),Ht=Jt=Wt=null,Ar=!1,s):null;switch(s){case\"paste\":default:return null;case\"keypress\":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case\"compositionend\":return kr&&\"ko\"!==o.locale?null:o.data}}(s,i))&&(0<(a=oe(a,\"onBeforeInput\")).length&&(u=new lr(\"onBeforeInput\",\"beforeinput\",null,i,u),w.push({event:u,listeners:a}),u.data=ee))}se(w,o)}))}function tf(s,o,i){return{instance:s,listener:o,currentTarget:i}}function oe(s,o){for(var i=o+\"Capture\",a=[];null!==s;){var u=s,_=u.stateNode;5===u.tag&&null!==_&&(u=_,null!=(_=Kb(s,i))&&a.unshift(tf(s,_,u)),null!=(_=Kb(s,o))&&a.push(tf(s,_,u))),s=s.return}return a}function vf(s){if(null===s)return null;do{s=s.return}while(s&&5!==s.tag);return s||null}function wf(s,o,i,a,u){for(var _=o._reactName,w=[];null!==i&&i!==a;){var x=i,C=x.alternate,j=x.stateNode;if(null!==C&&C===a)break;5===x.tag&&null!==j&&(x=j,u?null!=(C=Kb(i,_))&&w.unshift(tf(i,C,x)):u||null!=(C=Kb(i,_))&&w.push(tf(i,C,x))),i=i.return}0!==w.length&&s.push({event:o,listeners:w})}var rn=/\\r\\n?/g,nn=/\\u0000|\\uFFFD/g;function zf(s){return(\"string\"==typeof s?s:\"\"+s).replace(rn,\"\\n\").replace(nn,\"\")}function Af(s,o,i){if(o=zf(o),zf(s)!==o&&i)throw Error(p(425))}function Bf(){}var sn=null,on=null;function Ef(s,o){return\"textarea\"===s||\"noscript\"===s||\"string\"==typeof o.children||\"number\"==typeof o.children||\"object\"==typeof o.dangerouslySetInnerHTML&&null!==o.dangerouslySetInnerHTML&&null!=o.dangerouslySetInnerHTML.__html}var an=\"function\"==typeof setTimeout?setTimeout:void 0,cn=\"function\"==typeof clearTimeout?clearTimeout:void 0,ln=\"function\"==typeof Promise?Promise:void 0,un=\"function\"==typeof queueMicrotask?queueMicrotask:void 0!==ln?function(s){return ln.resolve(null).then(s).catch(If)}:an;function If(s){setTimeout((function(){throw s}))}function Kf(s,o){var i=o,a=0;do{var u=i.nextSibling;if(s.removeChild(i),u&&8===u.nodeType)if(\"/$\"===(i=u.data)){if(0===a)return s.removeChild(u),void bd(o);a--}else\"$\"!==i&&\"$?\"!==i&&\"$!\"!==i||a++;i=u}while(i);bd(o)}function Lf(s){for(;null!=s;s=s.nextSibling){var o=s.nodeType;if(1===o||3===o)break;if(8===o){if(\"$\"===(o=s.data)||\"$!\"===o||\"$?\"===o)break;if(\"/$\"===o)return null}}return s}function Mf(s){s=s.previousSibling;for(var o=0;s;){if(8===s.nodeType){var i=s.data;if(\"$\"===i||\"$!\"===i||\"$?\"===i){if(0===o)return s;o--}else\"/$\"===i&&o++}s=s.previousSibling}return null}var pn=Math.random().toString(36).slice(2),hn=\"__reactFiber$\"+pn,dn=\"__reactProps$\"+pn,fn=\"__reactContainer$\"+pn,mn=\"__reactEvents$\"+pn,gn=\"__reactListeners$\"+pn,yn=\"__reactHandles$\"+pn;function Wc(s){var o=s[hn];if(o)return o;for(var i=s.parentNode;i;){if(o=i[fn]||i[hn]){if(i=o.alternate,null!==o.child||null!==i&&null!==i.child)for(s=Mf(s);null!==s;){if(i=s[hn])return i;s=Mf(s)}return o}i=(s=i).parentNode}return null}function Cb(s){return!(s=s[hn]||s[fn])||5!==s.tag&&6!==s.tag&&13!==s.tag&&3!==s.tag?null:s}function ue(s){if(5===s.tag||6===s.tag)return s.stateNode;throw Error(p(33))}function Db(s){return s[dn]||null}var vn=[],bn=-1;function Uf(s){return{current:s}}function E(s){0>bn||(s.current=vn[bn],vn[bn]=null,bn--)}function G(s,o){bn++,vn[bn]=s.current,s.current=o}var _n={},Sn=Uf(_n),En=Uf(!1),wn=_n;function Yf(s,o){var i=s.type.contextTypes;if(!i)return _n;var a=s.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===o)return a.__reactInternalMemoizedMaskedChildContext;var u,_={};for(u in i)_[u]=o[u];return a&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=_),_}function Zf(s){return null!=(s=s.childContextTypes)}function $f(){E(En),E(Sn)}function ag(s,o,i){if(Sn.current!==_n)throw Error(p(168));G(Sn,o),G(En,i)}function bg(s,o,i){var a=s.stateNode;if(o=o.childContextTypes,\"function\"!=typeof a.getChildContext)return i;for(var u in a=a.getChildContext())if(!(u in o))throw Error(p(108,Ra(s)||\"Unknown\",u));return we({},i,a)}function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||_n,wn=Sn.current,G(Sn,s),G(En,En.current),!0}function dg(s,o,i){var a=s.stateNode;if(!a)throw Error(p(169));i?(s=bg(s,o,wn),a.__reactInternalMemoizedMergedChildContext=s,E(En),E(Sn),G(Sn,s)):E(En),G(En,i)}var xn=null,kn=!1,On=!1;function hg(s){null===xn?xn=[s]:xn.push(s)}function jg(){if(!On&&null!==xn){On=!0;var s=0,o=Ct;try{var i=xn;for(Ct=1;s<i.length;s++){var a=i[s];do{a=a(!0)}while(null!==a)}xn=null,kn=!1}catch(o){throw null!==xn&&(xn=xn.slice(s+1)),ct(mt,jg),o}finally{Ct=o,On=!1}}return null}var Cn=[],An=0,jn=null,In=0,Pn=[],Tn=0,Nn=null,Mn=1,Rn=\"\";function tg(s,o){Cn[An++]=In,Cn[An++]=jn,jn=s,In=o}function ug(s,o,i){Pn[Tn++]=Mn,Pn[Tn++]=Rn,Pn[Tn++]=Nn,Nn=s;var a=Mn;s=Rn;var u=32-Et(a)-1;a&=~(1<<u),i+=1;var _=32-Et(o)+u;if(30<_){var w=u-u%5;_=(a&(1<<w)-1).toString(32),a>>=w,u-=w,Mn=1<<32-Et(o)+u|i<<u|a,Rn=_+s}else Mn=1<<_|i<<u|a,Rn=s}function vg(s){null!==s.return&&(tg(s,1),ug(s,1,0))}function wg(s){for(;s===jn;)jn=Cn[--An],Cn[An]=null,In=Cn[--An],Cn[An]=null;for(;s===Nn;)Nn=Pn[--Tn],Pn[Tn]=null,Rn=Pn[--Tn],Pn[Tn]=null,Mn=Pn[--Tn],Pn[Tn]=null}var Dn=null,Ln=null,Fn=!1,Bn=null;function Ag(s,o){var i=Bg(5,null,null,0);i.elementType=\"DELETED\",i.stateNode=o,i.return=s,null===(o=s.deletions)?(s.deletions=[i],s.flags|=16):o.push(i)}function Cg(s,o){switch(s.tag){case 5:var i=s.type;return null!==(o=1!==o.nodeType||i.toLowerCase()!==o.nodeName.toLowerCase()?null:o)&&(s.stateNode=o,Dn=s,Ln=Lf(o.firstChild),!0);case 6:return null!==(o=\"\"===s.pendingProps||3!==o.nodeType?null:o)&&(s.stateNode=o,Dn=s,Ln=null,!0);case 13:return null!==(o=8!==o.nodeType?null:o)&&(i=null!==Nn?{id:Mn,overflow:Rn}:null,s.memoizedState={dehydrated:o,treeContext:i,retryLane:1073741824},(i=Bg(18,null,null,0)).stateNode=o,i.return=s,s.child=i,Dn=s,Ln=null,!0);default:return!1}}function Dg(s){return!(!(1&s.mode)||128&s.flags)}function Eg(s){if(Fn){var o=Ln;if(o){var i=o;if(!Cg(s,o)){if(Dg(s))throw Error(p(418));o=Lf(i.nextSibling);var a=Dn;o&&Cg(s,o)?Ag(a,i):(s.flags=-4097&s.flags|2,Fn=!1,Dn=s)}}else{if(Dg(s))throw Error(p(418));s.flags=-4097&s.flags|2,Fn=!1,Dn=s}}}function Fg(s){for(s=s.return;null!==s&&5!==s.tag&&3!==s.tag&&13!==s.tag;)s=s.return;Dn=s}function Gg(s){if(s!==Dn)return!1;if(!Fn)return Fg(s),Fn=!0,!1;var o;if((o=3!==s.tag)&&!(o=5!==s.tag)&&(o=\"head\"!==(o=s.type)&&\"body\"!==o&&!Ef(s.type,s.memoizedProps)),o&&(o=Ln)){if(Dg(s))throw Hg(),Error(p(418));for(;o;)Ag(s,o),o=Lf(o.nextSibling)}if(Fg(s),13===s.tag){if(!(s=null!==(s=s.memoizedState)?s.dehydrated:null))throw Error(p(317));e:{for(s=s.nextSibling,o=0;s;){if(8===s.nodeType){var i=s.data;if(\"/$\"===i){if(0===o){Ln=Lf(s.nextSibling);break e}o--}else\"$\"!==i&&\"$!\"!==i&&\"$?\"!==i||o++}s=s.nextSibling}Ln=null}}else Ln=Dn?Lf(s.stateNode.nextSibling):null;return!0}function Hg(){for(var s=Ln;s;)s=Lf(s.nextSibling)}function Ig(){Ln=Dn=null,Fn=!1}function Jg(s){null===Bn?Bn=[s]:Bn.push(s)}var $n=U.ReactCurrentBatchConfig;function Lg(s,o,i){if(null!==(s=i.ref)&&\"function\"!=typeof s&&\"object\"!=typeof s){if(i._owner){if(i=i._owner){if(1!==i.tag)throw Error(p(309));var a=i.stateNode}if(!a)throw Error(p(147,s));var u=a,_=\"\"+s;return null!==o&&null!==o.ref&&\"function\"==typeof o.ref&&o.ref._stringRef===_?o.ref:(o=function(s){var o=u.refs;null===s?delete o[_]:o[_]=s},o._stringRef=_,o)}if(\"string\"!=typeof s)throw Error(p(284));if(!i._owner)throw Error(p(290,s))}return s}function Mg(s,o){throw s=Object.prototype.toString.call(o),Error(p(31,\"[object Object]\"===s?\"object with keys {\"+Object.keys(o).join(\", \")+\"}\":s))}function Ng(s){return(0,s._init)(s._payload)}function Og(s){function b(o,i){if(s){var a=o.deletions;null===a?(o.deletions=[i],o.flags|=16):a.push(i)}}function c(o,i){if(!s)return null;for(;null!==i;)b(o,i),i=i.sibling;return null}function d(s,o){for(s=new Map;null!==o;)null!==o.key?s.set(o.key,o):s.set(o.index,o),o=o.sibling;return s}function e(s,o){return(s=Pg(s,o)).index=0,s.sibling=null,s}function f(o,i,a){return o.index=a,s?null!==(a=o.alternate)?(a=a.index)<i?(o.flags|=2,i):a:(o.flags|=2,i):(o.flags|=1048576,i)}function g(o){return s&&null===o.alternate&&(o.flags|=2),o}function h(s,o,i,a){return null===o||6!==o.tag?((o=Qg(i,s.mode,a)).return=s,o):((o=e(o,i)).return=s,o)}function k(s,o,i,a){var u=i.type;return u===Z?m(s,o,i.props.children,a,i.key):null!==o&&(o.elementType===u||\"object\"==typeof u&&null!==u&&u.$$typeof===ye&&Ng(u)===o.type)?((a=e(o,i.props)).ref=Lg(s,o,i),a.return=s,a):((a=Rg(i.type,i.key,i.props,null,s.mode,a)).ref=Lg(s,o,i),a.return=s,a)}function l(s,o,i,a){return null===o||4!==o.tag||o.stateNode.containerInfo!==i.containerInfo||o.stateNode.implementation!==i.implementation?((o=Sg(i,s.mode,a)).return=s,o):((o=e(o,i.children||[])).return=s,o)}function m(s,o,i,a,u){return null===o||7!==o.tag?((o=Tg(i,s.mode,a,u)).return=s,o):((o=e(o,i)).return=s,o)}function q(s,o,i){if(\"string\"==typeof o&&\"\"!==o||\"number\"==typeof o)return(o=Qg(\"\"+o,s.mode,i)).return=s,o;if(\"object\"==typeof o&&null!==o){switch(o.$$typeof){case z:return(i=Rg(o.type,o.key,o.props,null,s.mode,i)).ref=Lg(s,null,o),i.return=s,i;case Y:return(o=Sg(o,s.mode,i)).return=s,o;case ye:return q(s,(0,o._init)(o._payload),i)}if(Pe(o)||Ka(o))return(o=Tg(o,s.mode,i,null)).return=s,o;Mg(s,o)}return null}function r(s,o,i,a){var u=null!==o?o.key:null;if(\"string\"==typeof i&&\"\"!==i||\"number\"==typeof i)return null!==u?null:h(s,o,\"\"+i,a);if(\"object\"==typeof i&&null!==i){switch(i.$$typeof){case z:return i.key===u?k(s,o,i,a):null;case Y:return i.key===u?l(s,o,i,a):null;case ye:return r(s,o,(u=i._init)(i._payload),a)}if(Pe(i)||Ka(i))return null!==u?null:m(s,o,i,a,null);Mg(s,i)}return null}function y(s,o,i,a,u){if(\"string\"==typeof a&&\"\"!==a||\"number\"==typeof a)return h(o,s=s.get(i)||null,\"\"+a,u);if(\"object\"==typeof a&&null!==a){switch(a.$$typeof){case z:return k(o,s=s.get(null===a.key?i:a.key)||null,a,u);case Y:return l(o,s=s.get(null===a.key?i:a.key)||null,a,u);case ye:return y(s,o,i,(0,a._init)(a._payload),u)}if(Pe(a)||Ka(a))return m(o,s=s.get(i)||null,a,u,null);Mg(o,a)}return null}function n(o,i,a,u){for(var _=null,w=null,x=i,C=i=0,j=null;null!==x&&C<a.length;C++){x.index>C?(j=x,x=null):j=x.sibling;var L=r(o,x,a[C],u);if(null===L){null===x&&(x=j);break}s&&x&&null===L.alternate&&b(o,x),i=f(L,i,C),null===w?_=L:w.sibling=L,w=L,x=j}if(C===a.length)return c(o,x),Fn&&tg(o,C),_;if(null===x){for(;C<a.length;C++)null!==(x=q(o,a[C],u))&&(i=f(x,i,C),null===w?_=x:w.sibling=x,w=x);return Fn&&tg(o,C),_}for(x=d(o,x);C<a.length;C++)null!==(j=y(x,o,C,a[C],u))&&(s&&null!==j.alternate&&x.delete(null===j.key?C:j.key),i=f(j,i,C),null===w?_=j:w.sibling=j,w=j);return s&&x.forEach((function(s){return b(o,s)})),Fn&&tg(o,C),_}function t(o,i,a,u){var _=Ka(a);if(\"function\"!=typeof _)throw Error(p(150));if(null==(a=_.call(a)))throw Error(p(151));for(var w=_=null,x=i,C=i=0,j=null,L=a.next();null!==x&&!L.done;C++,L=a.next()){x.index>C?(j=x,x=null):j=x.sibling;var B=r(o,x,L.value,u);if(null===B){null===x&&(x=j);break}s&&x&&null===B.alternate&&b(o,x),i=f(B,i,C),null===w?_=B:w.sibling=B,w=B,x=j}if(L.done)return c(o,x),Fn&&tg(o,C),_;if(null===x){for(;!L.done;C++,L=a.next())null!==(L=q(o,L.value,u))&&(i=f(L,i,C),null===w?_=L:w.sibling=L,w=L);return Fn&&tg(o,C),_}for(x=d(o,x);!L.done;C++,L=a.next())null!==(L=y(x,o,C,L.value,u))&&(s&&null!==L.alternate&&x.delete(null===L.key?C:L.key),i=f(L,i,C),null===w?_=L:w.sibling=L,w=L);return s&&x.forEach((function(s){return b(o,s)})),Fn&&tg(o,C),_}return function J(s,o,i,a){if(\"object\"==typeof i&&null!==i&&i.type===Z&&null===i.key&&(i=i.props.children),\"object\"==typeof i&&null!==i){switch(i.$$typeof){case z:e:{for(var u=i.key,_=o;null!==_;){if(_.key===u){if((u=i.type)===Z){if(7===_.tag){c(s,_.sibling),(o=e(_,i.props.children)).return=s,s=o;break e}}else if(_.elementType===u||\"object\"==typeof u&&null!==u&&u.$$typeof===ye&&Ng(u)===_.type){c(s,_.sibling),(o=e(_,i.props)).ref=Lg(s,_,i),o.return=s,s=o;break e}c(s,_);break}b(s,_),_=_.sibling}i.type===Z?((o=Tg(i.props.children,s.mode,a,i.key)).return=s,s=o):((a=Rg(i.type,i.key,i.props,null,s.mode,a)).ref=Lg(s,o,i),a.return=s,s=a)}return g(s);case Y:e:{for(_=i.key;null!==o;){if(o.key===_){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){c(s,o.sibling),(o=e(o,i.children||[])).return=s,s=o;break e}c(s,o);break}b(s,o),o=o.sibling}(o=Sg(i,s.mode,a)).return=s,s=o}return g(s);case ye:return J(s,o,(_=i._init)(i._payload),a)}if(Pe(i))return n(s,o,i,a);if(Ka(i))return t(s,o,i,a);Mg(s,i)}return\"string\"==typeof i&&\"\"!==i||\"number\"==typeof i?(i=\"\"+i,null!==o&&6===o.tag?(c(s,o.sibling),(o=e(o,i)).return=s,s=o):(c(s,o),(o=Qg(i,s.mode,a)).return=s,s=o),g(s)):c(s,o)}}var qn=Og(!0),Vn=Og(!1),Un=Uf(null),zn=null,Wn=null,Jn=null;function $g(){Jn=Wn=zn=null}function ah(s){var o=Un.current;E(Un),s._currentValue=o}function bh(s,o,i){for(;null!==s;){var a=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,null!==a&&(a.childLanes|=o)):null!==a&&(a.childLanes&o)!==o&&(a.childLanes|=o),s===i)break;s=s.return}}function ch(s,o){zn=s,Jn=Wn=null,null!==(s=s.dependencies)&&null!==s.firstContext&&(!!(s.lanes&o)&&(bs=!0),s.firstContext=null)}function eh(s){var o=s._currentValue;if(Jn!==s)if(s={context:s,memoizedValue:o,next:null},null===Wn){if(null===zn)throw Error(p(308));Wn=s,zn.dependencies={lanes:0,firstContext:s}}else Wn=Wn.next=s;return o}var Hn=null;function gh(s){null===Hn?Hn=[s]:Hn.push(s)}function hh(s,o,i,a){var u=o.interleaved;return null===u?(i.next=i,gh(o)):(i.next=u.next,u.next=i),o.interleaved=i,ih(s,a)}function ih(s,o){s.lanes|=o;var i=s.alternate;for(null!==i&&(i.lanes|=o),i=s,s=s.return;null!==s;)s.childLanes|=o,null!==(i=s.alternate)&&(i.childLanes|=o),i=s,s=s.return;return 3===i.tag?i.stateNode:null}var Kn=!1;function kh(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function mh(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:null,next:null}}function nh(s,o,i){var a=s.updateQueue;if(null===a)return null;if(a=a.shared,2&Ls){var u=a.pending;return null===u?o.next=o:(o.next=u.next,u.next=o),a.pending=o,ih(s,i)}return null===(u=a.interleaved)?(o.next=o,gh(a)):(o.next=u.next,u.next=o),a.interleaved=o,ih(s,i)}function oh(s,o,i){if(null!==(o=o.updateQueue)&&(o=o.shared,4194240&i)){var a=o.lanes;i|=a&=s.pendingLanes,o.lanes=i,Cc(s,i)}}function ph(s,o){var i=s.updateQueue,a=s.alternate;if(null!==a&&i===(a=a.updateQueue)){var u=null,_=null;if(null!==(i=i.firstBaseUpdate)){do{var w={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};null===_?u=_=w:_=_.next=w,i=i.next}while(null!==i);null===_?u=_=o:_=_.next=o}else u=_=o;return i={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:_,shared:a.shared,effects:a.effects},void(s.updateQueue=i)}null===(s=i.lastBaseUpdate)?i.firstBaseUpdate=o:s.next=o,i.lastBaseUpdate=o}function qh(s,o,i,a){var u=s.updateQueue;Kn=!1;var _=u.firstBaseUpdate,w=u.lastBaseUpdate,x=u.shared.pending;if(null!==x){u.shared.pending=null;var C=x,j=C.next;C.next=null,null===w?_=j:w.next=j,w=C;var L=s.alternate;null!==L&&((x=(L=L.updateQueue).lastBaseUpdate)!==w&&(null===x?L.firstBaseUpdate=j:x.next=j,L.lastBaseUpdate=C))}if(null!==_){var B=u.baseState;for(w=0,L=j=C=null,x=_;;){var $=x.lane,V=x.eventTime;if((a&$)===$){null!==L&&(L=L.next={eventTime:V,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var U=s,z=x;switch($=o,V=i,z.tag){case 1:if(\"function\"==typeof(U=z.payload)){B=U.call(V,B,$);break e}B=U;break e;case 3:U.flags=-65537&U.flags|128;case 0:if(null==($=\"function\"==typeof(U=z.payload)?U.call(V,B,$):U))break e;B=we({},B,$);break e;case 2:Kn=!0}}null!==x.callback&&0!==x.lane&&(s.flags|=64,null===($=u.effects)?u.effects=[x]:$.push(x))}else V={eventTime:V,lane:$,tag:x.tag,payload:x.payload,callback:x.callback,next:null},null===L?(j=L=V,C=B):L=L.next=V,w|=$;if(null===(x=x.next)){if(null===(x=u.shared.pending))break;x=($=x).next,$.next=null,u.lastBaseUpdate=$,u.shared.pending=null}}if(null===L&&(C=B),u.baseState=C,u.firstBaseUpdate=j,u.lastBaseUpdate=L,null!==(o=u.shared.interleaved)){u=o;do{w|=u.lane,u=u.next}while(u!==o)}else null===_&&(u.shared.lanes=0);Ws|=w,s.lanes=w,s.memoizedState=B}}function sh(s,o,i){if(s=o.effects,o.effects=null,null!==s)for(o=0;o<s.length;o++){var a=s[o],u=a.callback;if(null!==u){if(a.callback=null,a=i,\"function\"!=typeof u)throw Error(p(191,u));u.call(a)}}}var Gn={},Yn=Uf(Gn),Xn=Uf(Gn),Qn=Uf(Gn);function xh(s){if(s===Gn)throw Error(p(174));return s}function yh(s,o){switch(G(Qn,o),G(Xn,s),G(Yn,Gn),s=o.nodeType){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:lb(null,\"\");break;default:o=lb(o=(s=8===s?o.parentNode:o).namespaceURI||null,s=s.tagName)}E(Yn),G(Yn,o)}function zh(){E(Yn),E(Xn),E(Qn)}function Ah(s){xh(Qn.current);var o=xh(Yn.current),i=lb(o,s.type);o!==i&&(G(Xn,s),G(Yn,i))}function Bh(s){Xn.current===s&&(E(Yn),E(Xn))}var Zn=Uf(0);function Ch(s){for(var o=s;null!==o;){if(13===o.tag){var i=o.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||\"$?\"===i.data||\"$!\"===i.data))return o}else if(19===o.tag&&void 0!==o.memoizedProps.revealOrder){if(128&o.flags)return o}else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===s)break;for(;null===o.sibling;){if(null===o.return||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var es=[];function Eh(){for(var s=0;s<es.length;s++)es[s]._workInProgressVersionPrimary=null;es.length=0}var ts=U.ReactCurrentDispatcher,rs=U.ReactCurrentBatchConfig,ns=0,ss=null,os=null,as=null,cs=!1,ls=!1,us=0,ps=0;function P(){throw Error(p(321))}function Mh(s,o){if(null===o)return!1;for(var i=0;i<o.length&&i<s.length;i++)if(!Dr(s[i],o[i]))return!1;return!0}function Nh(s,o,i,a,u,_){if(ns=_,ss=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ts.current=null===s||null===s.memoizedState?ds:fs,s=i(a,u),ls){_=0;do{if(ls=!1,us=0,25<=_)throw Error(p(301));_+=1,as=os=null,o.updateQueue=null,ts.current=ms,s=i(a,u)}while(ls)}if(ts.current=hs,o=null!==os&&null!==os.next,ns=0,as=os=ss=null,cs=!1,o)throw Error(p(300));return s}function Sh(){var s=0!==us;return us=0,s}function Th(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===as?ss.memoizedState=as=s:as=as.next=s,as}function Uh(){if(null===os){var s=ss.alternate;s=null!==s?s.memoizedState:null}else s=os.next;var o=null===as?ss.memoizedState:as.next;if(null!==o)as=o,os=s;else{if(null===s)throw Error(p(310));s={memoizedState:(os=s).memoizedState,baseState:os.baseState,baseQueue:os.baseQueue,queue:os.queue,next:null},null===as?ss.memoizedState=as=s:as=as.next=s}return as}function Vh(s,o){return\"function\"==typeof o?o(s):o}function Wh(s){var o=Uh(),i=o.queue;if(null===i)throw Error(p(311));i.lastRenderedReducer=s;var a=os,u=a.baseQueue,_=i.pending;if(null!==_){if(null!==u){var w=u.next;u.next=_.next,_.next=w}a.baseQueue=u=_,i.pending=null}if(null!==u){_=u.next,a=a.baseState;var x=w=null,C=null,j=_;do{var L=j.lane;if((ns&L)===L)null!==C&&(C=C.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),a=j.hasEagerState?j.eagerState:s(a,j.action);else{var B={lane:L,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};null===C?(x=C=B,w=a):C=C.next=B,ss.lanes|=L,Ws|=L}j=j.next}while(null!==j&&j!==_);null===C?w=a:C.next=x,Dr(a,o.memoizedState)||(bs=!0),o.memoizedState=a,o.baseState=w,o.baseQueue=C,i.lastRenderedState=a}if(null!==(s=i.interleaved)){u=s;do{_=u.lane,ss.lanes|=_,Ws|=_,u=u.next}while(u!==s)}else null===u&&(i.lanes=0);return[o.memoizedState,i.dispatch]}function Xh(s){var o=Uh(),i=o.queue;if(null===i)throw Error(p(311));i.lastRenderedReducer=s;var a=i.dispatch,u=i.pending,_=o.memoizedState;if(null!==u){i.pending=null;var w=u=u.next;do{_=s(_,w.action),w=w.next}while(w!==u);Dr(_,o.memoizedState)||(bs=!0),o.memoizedState=_,null===o.baseQueue&&(o.baseState=_),i.lastRenderedState=_}return[_,a]}function Yh(){}function Zh(s,o){var i=ss,a=Uh(),u=o(),_=!Dr(a.memoizedState,u);if(_&&(a.memoizedState=u,bs=!0),a=a.queue,$h(ai.bind(null,i,a,s),[s]),a.getSnapshot!==o||_||null!==as&&1&as.memoizedState.tag){if(i.flags|=2048,bi(9,ci.bind(null,i,a,u,o),void 0,null),null===Fs)throw Error(p(349));30&ns||di(i,o,u)}return u}function di(s,o,i){s.flags|=16384,s={getSnapshot:o,value:i},null===(o=ss.updateQueue)?(o={lastEffect:null,stores:null},ss.updateQueue=o,o.stores=[s]):null===(i=o.stores)?o.stores=[s]:i.push(s)}function ci(s,o,i,a){o.value=i,o.getSnapshot=a,ei(o)&&fi(s)}function ai(s,o,i){return i((function(){ei(o)&&fi(s)}))}function ei(s){var o=s.getSnapshot;s=s.value;try{var i=o();return!Dr(s,i)}catch(s){return!0}}function fi(s){var o=ih(s,1);null!==o&&gi(o,s,1,-1)}function hi(s){var o=Th();return\"function\"==typeof s&&(s=s()),o.memoizedState=o.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:s},o.queue=s,s=s.dispatch=ii.bind(null,ss,s),[o.memoizedState,s]}function bi(s,o,i,a){return s={tag:s,create:o,destroy:i,deps:a,next:null},null===(o=ss.updateQueue)?(o={lastEffect:null,stores:null},ss.updateQueue=o,o.lastEffect=s.next=s):null===(i=o.lastEffect)?o.lastEffect=s.next=s:(a=i.next,i.next=s,s.next=a,o.lastEffect=s),s}function ji(){return Uh().memoizedState}function ki(s,o,i,a){var u=Th();ss.flags|=s,u.memoizedState=bi(1|o,i,void 0,void 0===a?null:a)}function li(s,o,i,a){var u=Uh();a=void 0===a?null:a;var _=void 0;if(null!==os){var w=os.memoizedState;if(_=w.destroy,null!==a&&Mh(a,w.deps))return void(u.memoizedState=bi(o,i,_,a))}ss.flags|=s,u.memoizedState=bi(1|o,i,_,a)}function mi(s,o){return ki(8390656,8,s,o)}function $h(s,o){return li(2048,8,s,o)}function ni(s,o){return li(4,2,s,o)}function oi(s,o){return li(4,4,s,o)}function pi(s,o){return\"function\"==typeof o?(s=s(),o(s),function(){o(null)}):null!=o?(s=s(),o.current=s,function(){o.current=null}):void 0}function qi(s,o,i){return i=null!=i?i.concat([s]):null,li(4,4,pi.bind(null,o,s),i)}function ri(){}function si(s,o){var i=Uh();o=void 0===o?null:o;var a=i.memoizedState;return null!==a&&null!==o&&Mh(o,a[1])?a[0]:(i.memoizedState=[s,o],s)}function ti(s,o){var i=Uh();o=void 0===o?null:o;var a=i.memoizedState;return null!==a&&null!==o&&Mh(o,a[1])?a[0]:(s=s(),i.memoizedState=[s,o],s)}function ui(s,o,i){return 21&ns?(Dr(i,o)||(i=yc(),ss.lanes|=i,Ws|=i,s.baseState=!0),o):(s.baseState&&(s.baseState=!1,bs=!0),s.memoizedState=i)}function vi(s,o){var i=Ct;Ct=0!==i&&4>i?i:4,s(!0);var a=rs.transition;rs.transition={};try{s(!1),o()}finally{Ct=i,rs.transition=a}}function wi(){return Uh().memoizedState}function xi(s,o,i){var a=yi(s);if(i={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null},zi(s))Ai(o,i);else if(null!==(i=hh(s,o,i,a))){gi(i,s,a,R()),Bi(i,o,a)}}function ii(s,o,i){var a=yi(s),u={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null};if(zi(s))Ai(o,u);else{var _=s.alternate;if(0===s.lanes&&(null===_||0===_.lanes)&&null!==(_=o.lastRenderedReducer))try{var w=o.lastRenderedState,x=_(w,i);if(u.hasEagerState=!0,u.eagerState=x,Dr(x,w)){var C=o.interleaved;return null===C?(u.next=u,gh(o)):(u.next=C.next,C.next=u),void(o.interleaved=u)}}catch(s){}null!==(i=hh(s,o,u,a))&&(gi(i,s,a,u=R()),Bi(i,o,a))}}function zi(s){var o=s.alternate;return s===ss||null!==o&&o===ss}function Ai(s,o){ls=cs=!0;var i=s.pending;null===i?o.next=o:(o.next=i.next,i.next=o),s.pending=o}function Bi(s,o,i){if(4194240&i){var a=o.lanes;i|=a&=s.pendingLanes,o.lanes=i,Cc(s,i)}}var hs={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},ds={readContext:eh,useCallback:function(s,o){return Th().memoizedState=[s,void 0===o?null:o],s},useContext:eh,useEffect:mi,useImperativeHandle:function(s,o,i){return i=null!=i?i.concat([s]):null,ki(4194308,4,pi.bind(null,o,s),i)},useLayoutEffect:function(s,o){return ki(4194308,4,s,o)},useInsertionEffect:function(s,o){return ki(4,2,s,o)},useMemo:function(s,o){var i=Th();return o=void 0===o?null:o,s=s(),i.memoizedState=[s,o],s},useReducer:function(s,o,i){var a=Th();return o=void 0!==i?i(o):o,a.memoizedState=a.baseState=o,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},a.queue=s,s=s.dispatch=xi.bind(null,ss,s),[a.memoizedState,s]},useRef:function(s){return s={current:s},Th().memoizedState=s},useState:hi,useDebugValue:ri,useDeferredValue:function(s){return Th().memoizedState=s},useTransition:function(){var s=hi(!1),o=s[0];return s=vi.bind(null,s[1]),Th().memoizedState=s,[o,s]},useMutableSource:function(){},useSyncExternalStore:function(s,o,i){var a=ss,u=Th();if(Fn){if(void 0===i)throw Error(p(407));i=i()}else{if(i=o(),null===Fs)throw Error(p(349));30&ns||di(a,o,i)}u.memoizedState=i;var _={value:i,getSnapshot:o};return u.queue=_,mi(ai.bind(null,a,_,s),[s]),a.flags|=2048,bi(9,ci.bind(null,a,_,i,o),void 0,null),i},useId:function(){var s=Th(),o=Fs.identifierPrefix;if(Fn){var i=Rn;o=\":\"+o+\"R\"+(i=(Mn&~(1<<32-Et(Mn)-1)).toString(32)+i),0<(i=us++)&&(o+=\"H\"+i.toString(32)),o+=\":\"}else o=\":\"+o+\"r\"+(i=ps++).toString(32)+\":\";return s.memoizedState=o},unstable_isNewReconciler:!1},fs={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)},useDebugValue:ri,useDeferredValue:function(s){return ui(Uh(),os.memoizedState,s)},useTransition:function(){return[Wh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1},ms={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(s){var o=Uh();return null===os?o.memoizedState=s:ui(o,os.memoizedState,s)},useTransition:function(){return[Xh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1};function Ci(s,o){if(s&&s.defaultProps){for(var i in o=we({},o),s=s.defaultProps)void 0===o[i]&&(o[i]=s[i]);return o}return o}function Di(s,o,i,a){i=null==(i=i(a,o=s.memoizedState))?o:we({},o,i),s.memoizedState=i,0===s.lanes&&(s.updateQueue.baseState=i)}var gs={isMounted:function(s){return!!(s=s._reactInternals)&&Vb(s)===s},enqueueSetState:function(s,o,i){s=s._reactInternals;var a=R(),u=yi(s),_=mh(a,u);_.payload=o,null!=i&&(_.callback=i),null!==(o=nh(s,_,u))&&(gi(o,s,u,a),oh(o,s,u))},enqueueReplaceState:function(s,o,i){s=s._reactInternals;var a=R(),u=yi(s),_=mh(a,u);_.tag=1,_.payload=o,null!=i&&(_.callback=i),null!==(o=nh(s,_,u))&&(gi(o,s,u,a),oh(o,s,u))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var i=R(),a=yi(s),u=mh(i,a);u.tag=2,null!=o&&(u.callback=o),null!==(o=nh(s,u,a))&&(gi(o,s,a,i),oh(o,s,a))}};function Fi(s,o,i,a,u,_,w){return\"function\"==typeof(s=s.stateNode).shouldComponentUpdate?s.shouldComponentUpdate(a,_,w):!o.prototype||!o.prototype.isPureReactComponent||(!Ie(i,a)||!Ie(u,_))}function Gi(s,o,i){var a=!1,u=_n,_=o.contextType;return\"object\"==typeof _&&null!==_?_=eh(_):(u=Zf(o)?wn:Sn.current,_=(a=null!=(a=o.contextTypes))?Yf(s,u):_n),o=new o(i,_),s.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=gs,s.stateNode=o,o._reactInternals=s,a&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=_),o}function Hi(s,o,i,a){s=o.state,\"function\"==typeof o.componentWillReceiveProps&&o.componentWillReceiveProps(i,a),\"function\"==typeof o.UNSAFE_componentWillReceiveProps&&o.UNSAFE_componentWillReceiveProps(i,a),o.state!==s&&gs.enqueueReplaceState(o,o.state,null)}function Ii(s,o,i,a){var u=s.stateNode;u.props=i,u.state=s.memoizedState,u.refs={},kh(s);var _=o.contextType;\"object\"==typeof _&&null!==_?u.context=eh(_):(_=Zf(o)?wn:Sn.current,u.context=Yf(s,_)),u.state=s.memoizedState,\"function\"==typeof(_=o.getDerivedStateFromProps)&&(Di(s,o,_,i),u.state=s.memoizedState),\"function\"==typeof o.getDerivedStateFromProps||\"function\"==typeof u.getSnapshotBeforeUpdate||\"function\"!=typeof u.UNSAFE_componentWillMount&&\"function\"!=typeof u.componentWillMount||(o=u.state,\"function\"==typeof u.componentWillMount&&u.componentWillMount(),\"function\"==typeof u.UNSAFE_componentWillMount&&u.UNSAFE_componentWillMount(),o!==u.state&&gs.enqueueReplaceState(u,u.state,null),qh(s,i,u,a),u.state=s.memoizedState),\"function\"==typeof u.componentDidMount&&(s.flags|=4194308)}function Ji(s,o){try{var i=\"\",a=o;do{i+=Pa(a),a=a.return}while(a);var u=i}catch(s){u=\"\\nError generating stack: \"+s.message+\"\\n\"+s.stack}return{value:s,source:o,stack:u,digest:null}}function Ki(s,o,i){return{value:s,source:null,stack:null!=i?i:null,digest:null!=o?o:null}}function Li(s,o){try{console.error(o.value)}catch(s){setTimeout((function(){throw s}))}}var ys=\"function\"==typeof WeakMap?WeakMap:Map;function Ni(s,o,i){(i=mh(-1,i)).tag=3,i.payload={element:null};var a=o.value;return i.callback=function(){Zs||(Zs=!0,eo=a),Li(0,o)},i}function Qi(s,o,i){(i=mh(-1,i)).tag=3;var a=s.type.getDerivedStateFromError;if(\"function\"==typeof a){var u=o.value;i.payload=function(){return a(u)},i.callback=function(){Li(0,o)}}var _=s.stateNode;return null!==_&&\"function\"==typeof _.componentDidCatch&&(i.callback=function(){Li(0,o),\"function\"!=typeof a&&(null===to?to=new Set([this]):to.add(this));var s=o.stack;this.componentDidCatch(o.value,{componentStack:null!==s?s:\"\"})}),i}function Si(s,o,i){var a=s.pingCache;if(null===a){a=s.pingCache=new ys;var u=new Set;a.set(o,u)}else void 0===(u=a.get(o))&&(u=new Set,a.set(o,u));u.has(i)||(u.add(i),s=Ti.bind(null,s,o,i),o.then(s,s))}function Ui(s){do{var o;if((o=13===s.tag)&&(o=null===(o=s.memoizedState)||null!==o.dehydrated),o)return s;s=s.return}while(null!==s);return null}function Vi(s,o,i,a,u){return 1&s.mode?(s.flags|=65536,s.lanes=u,s):(s===o?s.flags|=65536:(s.flags|=128,i.flags|=131072,i.flags&=-52805,1===i.tag&&(null===i.alternate?i.tag=17:((o=mh(-1,1)).tag=2,nh(i,o,1))),i.lanes|=1),s)}var vs=U.ReactCurrentOwner,bs=!1;function Xi(s,o,i,a){o.child=null===s?Vn(o,null,i,a):qn(o,s.child,i,a)}function Yi(s,o,i,a,u){i=i.render;var _=o.ref;return ch(o,u),a=Nh(s,o,i,a,_,u),i=Sh(),null===s||bs?(Fn&&i&&vg(o),o.flags|=1,Xi(s,o,a,u),o.child):(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~u,Zi(s,o,u))}function $i(s,o,i,a,u){if(null===s){var _=i.type;return\"function\"!=typeof _||aj(_)||void 0!==_.defaultProps||null!==i.compare||void 0!==i.defaultProps?((s=Rg(i.type,null,a,o,o.mode,u)).ref=o.ref,s.return=o,o.child=s):(o.tag=15,o.type=_,bj(s,o,_,a,u))}if(_=s.child,!(s.lanes&u)){var w=_.memoizedProps;if((i=null!==(i=i.compare)?i:Ie)(w,a)&&s.ref===o.ref)return Zi(s,o,u)}return o.flags|=1,(s=Pg(_,a)).ref=o.ref,s.return=o,o.child=s}function bj(s,o,i,a,u){if(null!==s){var _=s.memoizedProps;if(Ie(_,a)&&s.ref===o.ref){if(bs=!1,o.pendingProps=a=_,!(s.lanes&u))return o.lanes=s.lanes,Zi(s,o,u);131072&s.flags&&(bs=!0)}}return cj(s,o,i,a,u)}function dj(s,o,i){var a=o.pendingProps,u=a.children,_=null!==s?s.memoizedState:null;if(\"hidden\"===a.mode)if(1&o.mode){if(!(1073741824&i))return s=null!==_?_.baseLanes|i:i,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,G(Vs,qs),qs|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=null!==_?_.baseLanes:i,G(Vs,qs),qs|=a}else o.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Vs,qs),qs|=i;else null!==_?(a=_.baseLanes|i,o.memoizedState=null):a=i,G(Vs,qs),qs|=a;return Xi(s,o,u,i),o.child}function gj(s,o){var i=o.ref;(null===s&&null!==i||null!==s&&s.ref!==i)&&(o.flags|=512,o.flags|=2097152)}function cj(s,o,i,a,u){var _=Zf(i)?wn:Sn.current;return _=Yf(o,_),ch(o,u),i=Nh(s,o,i,a,_,u),a=Sh(),null===s||bs?(Fn&&a&&vg(o),o.flags|=1,Xi(s,o,i,u),o.child):(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~u,Zi(s,o,u))}function hj(s,o,i,a,u){if(Zf(i)){var _=!0;cg(o)}else _=!1;if(ch(o,u),null===o.stateNode)ij(s,o),Gi(o,i,a),Ii(o,i,a,u),a=!0;else if(null===s){var w=o.stateNode,x=o.memoizedProps;w.props=x;var C=w.context,j=i.contextType;\"object\"==typeof j&&null!==j?j=eh(j):j=Yf(o,j=Zf(i)?wn:Sn.current);var L=i.getDerivedStateFromProps,B=\"function\"==typeof L||\"function\"==typeof w.getSnapshotBeforeUpdate;B||\"function\"!=typeof w.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof w.componentWillReceiveProps||(x!==a||C!==j)&&Hi(o,w,a,j),Kn=!1;var $=o.memoizedState;w.state=$,qh(o,a,w,u),C=o.memoizedState,x!==a||$!==C||En.current||Kn?(\"function\"==typeof L&&(Di(o,i,L,a),C=o.memoizedState),(x=Kn||Fi(o,i,x,a,$,C,j))?(B||\"function\"!=typeof w.UNSAFE_componentWillMount&&\"function\"!=typeof w.componentWillMount||(\"function\"==typeof w.componentWillMount&&w.componentWillMount(),\"function\"==typeof w.UNSAFE_componentWillMount&&w.UNSAFE_componentWillMount()),\"function\"==typeof w.componentDidMount&&(o.flags|=4194308)):(\"function\"==typeof w.componentDidMount&&(o.flags|=4194308),o.memoizedProps=a,o.memoizedState=C),w.props=a,w.state=C,w.context=j,a=x):(\"function\"==typeof w.componentDidMount&&(o.flags|=4194308),a=!1)}else{w=o.stateNode,lh(s,o),x=o.memoizedProps,j=o.type===o.elementType?x:Ci(o.type,x),w.props=j,B=o.pendingProps,$=w.context,\"object\"==typeof(C=i.contextType)&&null!==C?C=eh(C):C=Yf(o,C=Zf(i)?wn:Sn.current);var V=i.getDerivedStateFromProps;(L=\"function\"==typeof V||\"function\"==typeof w.getSnapshotBeforeUpdate)||\"function\"!=typeof w.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof w.componentWillReceiveProps||(x!==B||$!==C)&&Hi(o,w,a,C),Kn=!1,$=o.memoizedState,w.state=$,qh(o,a,w,u);var U=o.memoizedState;x!==B||$!==U||En.current||Kn?(\"function\"==typeof V&&(Di(o,i,V,a),U=o.memoizedState),(j=Kn||Fi(o,i,j,a,$,U,C)||!1)?(L||\"function\"!=typeof w.UNSAFE_componentWillUpdate&&\"function\"!=typeof w.componentWillUpdate||(\"function\"==typeof w.componentWillUpdate&&w.componentWillUpdate(a,U,C),\"function\"==typeof w.UNSAFE_componentWillUpdate&&w.UNSAFE_componentWillUpdate(a,U,C)),\"function\"==typeof w.componentDidUpdate&&(o.flags|=4),\"function\"==typeof w.getSnapshotBeforeUpdate&&(o.flags|=1024)):(\"function\"!=typeof w.componentDidUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=4),\"function\"!=typeof w.getSnapshotBeforeUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=1024),o.memoizedProps=a,o.memoizedState=U),w.props=a,w.state=U,w.context=C,a=j):(\"function\"!=typeof w.componentDidUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=4),\"function\"!=typeof w.getSnapshotBeforeUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=1024),a=!1)}return jj(s,o,i,a,_,u)}function jj(s,o,i,a,u,_){gj(s,o);var w=!!(128&o.flags);if(!a&&!w)return u&&dg(o,i,!1),Zi(s,o,_);a=o.stateNode,vs.current=o;var x=w&&\"function\"!=typeof i.getDerivedStateFromError?null:a.render();return o.flags|=1,null!==s&&w?(o.child=qn(o,s.child,null,_),o.child=qn(o,null,x,_)):Xi(s,o,x,_),o.memoizedState=a.state,u&&dg(o,i,!0),o.child}function kj(s){var o=s.stateNode;o.pendingContext?ag(0,o.pendingContext,o.pendingContext!==o.context):o.context&&ag(0,o.context,!1),yh(s,o.containerInfo)}function lj(s,o,i,a,u){return Ig(),Jg(u),o.flags|=256,Xi(s,o,i,a),o.child}var _s,Ss,Es,ws,xs={dehydrated:null,treeContext:null,retryLane:0};function nj(s){return{baseLanes:s,cachePool:null,transitions:null}}function oj(s,o,i){var a,u=o.pendingProps,_=Zn.current,w=!1,x=!!(128&o.flags);if((a=x)||(a=(null===s||null!==s.memoizedState)&&!!(2&_)),a?(w=!0,o.flags&=-129):null!==s&&null===s.memoizedState||(_|=1),G(Zn,1&_),null===s)return Eg(o),null!==(s=o.memoizedState)&&null!==(s=s.dehydrated)?(1&o.mode?\"$!\"===s.data?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(x=u.children,s=u.fallback,w?(u=o.mode,w=o.child,x={mode:\"hidden\",children:x},1&u||null===w?w=pj(x,u,0,null):(w.childLanes=0,w.pendingProps=x),s=Tg(s,u,i,null),w.return=o,s.return=o,w.sibling=s,o.child=w,o.child.memoizedState=nj(i),o.memoizedState=xs,s):qj(o,x));if(null!==(_=s.memoizedState)&&null!==(a=_.dehydrated))return function rj(s,o,i,a,u,_,w){if(i)return 256&o.flags?(o.flags&=-257,sj(s,o,w,a=Ki(Error(p(422))))):null!==o.memoizedState?(o.child=s.child,o.flags|=128,null):(_=a.fallback,u=o.mode,a=pj({mode:\"visible\",children:a.children},u,0,null),(_=Tg(_,u,w,null)).flags|=2,a.return=o,_.return=o,a.sibling=_,o.child=a,1&o.mode&&qn(o,s.child,null,w),o.child.memoizedState=nj(w),o.memoizedState=xs,_);if(!(1&o.mode))return sj(s,o,w,null);if(\"$!\"===u.data){if(a=u.nextSibling&&u.nextSibling.dataset)var x=a.dgst;return a=x,sj(s,o,w,a=Ki(_=Error(p(419)),a,void 0))}if(x=!!(w&s.childLanes),bs||x){if(null!==(a=Fs)){switch(w&-w){case 4:u=2;break;case 16:u=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}0!==(u=u&(a.suspendedLanes|w)?0:u)&&u!==_.retryLane&&(_.retryLane=u,ih(s,u),gi(a,s,u,-1))}return tj(),sj(s,o,w,a=Ki(Error(p(421))))}return\"$?\"===u.data?(o.flags|=128,o.child=s.child,o=uj.bind(null,s),u._reactRetry=o,null):(s=_.treeContext,Ln=Lf(u.nextSibling),Dn=o,Fn=!0,Bn=null,null!==s&&(Pn[Tn++]=Mn,Pn[Tn++]=Rn,Pn[Tn++]=Nn,Mn=s.id,Rn=s.overflow,Nn=o),o=qj(o,a.children),o.flags|=4096,o)}(s,o,x,u,a,_,i);if(w){w=u.fallback,x=o.mode,a=(_=s.child).sibling;var C={mode:\"hidden\",children:u.children};return 1&x||o.child===_?(u=Pg(_,C)).subtreeFlags=14680064&_.subtreeFlags:((u=o.child).childLanes=0,u.pendingProps=C,o.deletions=null),null!==a?w=Pg(a,w):(w=Tg(w,x,i,null)).flags|=2,w.return=o,u.return=o,u.sibling=w,o.child=u,u=w,w=o.child,x=null===(x=s.child.memoizedState)?nj(i):{baseLanes:x.baseLanes|i,cachePool:null,transitions:x.transitions},w.memoizedState=x,w.childLanes=s.childLanes&~i,o.memoizedState=xs,u}return s=(w=s.child).sibling,u=Pg(w,{mode:\"visible\",children:u.children}),!(1&o.mode)&&(u.lanes=i),u.return=o,u.sibling=null,null!==s&&(null===(i=o.deletions)?(o.deletions=[s],o.flags|=16):i.push(s)),o.child=u,o.memoizedState=null,u}function qj(s,o){return(o=pj({mode:\"visible\",children:o},s.mode,0,null)).return=s,s.child=o}function sj(s,o,i,a){return null!==a&&Jg(a),qn(o,s.child,null,i),(s=qj(o,o.pendingProps.children)).flags|=2,o.memoizedState=null,s}function vj(s,o,i){s.lanes|=o;var a=s.alternate;null!==a&&(a.lanes|=o),bh(s.return,o,i)}function wj(s,o,i,a,u){var _=s.memoizedState;null===_?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:a,tail:i,tailMode:u}:(_.isBackwards=o,_.rendering=null,_.renderingStartTime=0,_.last=a,_.tail=i,_.tailMode=u)}function xj(s,o,i){var a=o.pendingProps,u=a.revealOrder,_=a.tail;if(Xi(s,o,a.children,i),2&(a=Zn.current))a=1&a|2,o.flags|=128;else{if(null!==s&&128&s.flags)e:for(s=o.child;null!==s;){if(13===s.tag)null!==s.memoizedState&&vj(s,i,o);else if(19===s.tag)vj(s,i,o);else if(null!==s.child){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;null===s.sibling;){if(null===s.return||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}a&=1}if(G(Zn,a),1&o.mode)switch(u){case\"forwards\":for(i=o.child,u=null;null!==i;)null!==(s=i.alternate)&&null===Ch(s)&&(u=i),i=i.sibling;null===(i=u)?(u=o.child,o.child=null):(u=i.sibling,i.sibling=null),wj(o,!1,u,i,_);break;case\"backwards\":for(i=null,u=o.child,o.child=null;null!==u;){if(null!==(s=u.alternate)&&null===Ch(s)){o.child=u;break}s=u.sibling,u.sibling=i,i=u,u=s}wj(o,!0,i,null,_);break;case\"together\":wj(o,!1,null,null,void 0);break;default:o.memoizedState=null}else o.memoizedState=null;return o.child}function ij(s,o){!(1&o.mode)&&null!==s&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Zi(s,o,i){if(null!==s&&(o.dependencies=s.dependencies),Ws|=o.lanes,!(i&o.childLanes))return null;if(null!==s&&o.child!==s.child)throw Error(p(153));if(null!==o.child){for(i=Pg(s=o.child,s.pendingProps),o.child=i,i.return=o;null!==s.sibling;)s=s.sibling,(i=i.sibling=Pg(s,s.pendingProps)).return=o;i.sibling=null}return o.child}function Dj(s,o){if(!Fn)switch(s.tailMode){case\"hidden\":o=s.tail;for(var i=null;null!==o;)null!==o.alternate&&(i=o),o=o.sibling;null===i?s.tail=null:i.sibling=null;break;case\"collapsed\":i=s.tail;for(var a=null;null!==i;)null!==i.alternate&&(a=i),i=i.sibling;null===a?o||null===s.tail?s.tail=null:s.tail.sibling=null:a.sibling=null}}function S(s){var o=null!==s.alternate&&s.alternate.child===s.child,i=0,a=0;if(o)for(var u=s.child;null!==u;)i|=u.lanes|u.childLanes,a|=14680064&u.subtreeFlags,a|=14680064&u.flags,u.return=s,u=u.sibling;else for(u=s.child;null!==u;)i|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=s,u=u.sibling;return s.subtreeFlags|=a,s.childLanes=i,o}function Ej(s,o,i){var a=o.pendingProps;switch(wg(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(o),null;case 1:case 17:return Zf(o.type)&&$f(),S(o),null;case 3:return a=o.stateNode,zh(),E(En),E(Sn),Eh(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==s&&null!==s.child||(Gg(o)?o.flags|=4:null===s||s.memoizedState.isDehydrated&&!(256&o.flags)||(o.flags|=1024,null!==Bn&&(Fj(Bn),Bn=null))),Ss(s,o),S(o),null;case 5:Bh(o);var u=xh(Qn.current);if(i=o.type,null!==s&&null!=o.stateNode)Es(s,o,i,a,u),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!a){if(null===o.stateNode)throw Error(p(166));return S(o),null}if(s=xh(Yn.current),Gg(o)){a=o.stateNode,i=o.type;var _=o.memoizedProps;switch(a[hn]=o,a[dn]=_,s=!!(1&o.mode),i){case\"dialog\":D(\"cancel\",a),D(\"close\",a);break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",a);break;case\"video\":case\"audio\":for(u=0;u<Zr.length;u++)D(Zr[u],a);break;case\"source\":D(\"error\",a);break;case\"img\":case\"image\":case\"link\":D(\"error\",a),D(\"load\",a);break;case\"details\":D(\"toggle\",a);break;case\"input\":Za(a,_),D(\"invalid\",a);break;case\"select\":a._wrapperState={wasMultiple:!!_.multiple},D(\"invalid\",a);break;case\"textarea\":hb(a,_),D(\"invalid\",a)}for(var x in ub(i,_),u=null,_)if(_.hasOwnProperty(x)){var C=_[x];\"children\"===x?\"string\"==typeof C?a.textContent!==C&&(!0!==_.suppressHydrationWarning&&Af(a.textContent,C,s),u=[\"children\",C]):\"number\"==typeof C&&a.textContent!==\"\"+C&&(!0!==_.suppressHydrationWarning&&Af(a.textContent,C,s),u=[\"children\",\"\"+C]):w.hasOwnProperty(x)&&null!=C&&\"onScroll\"===x&&D(\"scroll\",a)}switch(i){case\"input\":Va(a),db(a,_,!0);break;case\"textarea\":Va(a),jb(a);break;case\"select\":case\"option\":break;default:\"function\"==typeof _.onClick&&(a.onclick=Bf)}a=u,o.updateQueue=a,null!==a&&(o.flags|=4)}else{x=9===u.nodeType?u:u.ownerDocument,\"http://www.w3.org/1999/xhtml\"===s&&(s=kb(i)),\"http://www.w3.org/1999/xhtml\"===s?\"script\"===i?((s=x.createElement(\"div\")).innerHTML=\"<script><\\/script>\",s=s.removeChild(s.firstChild)):\"string\"==typeof a.is?s=x.createElement(i,{is:a.is}):(s=x.createElement(i),\"select\"===i&&(x=s,a.multiple?x.multiple=!0:a.size&&(x.size=a.size))):s=x.createElementNS(s,i),s[hn]=o,s[dn]=a,_s(s,o,!1,!1),o.stateNode=s;e:{switch(x=vb(i,a),i){case\"dialog\":D(\"cancel\",s),D(\"close\",s),u=a;break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",s),u=a;break;case\"video\":case\"audio\":for(u=0;u<Zr.length;u++)D(Zr[u],s);u=a;break;case\"source\":D(\"error\",s),u=a;break;case\"img\":case\"image\":case\"link\":D(\"error\",s),D(\"load\",s),u=a;break;case\"details\":D(\"toggle\",s),u=a;break;case\"input\":Za(s,a),u=Ya(s,a),D(\"invalid\",s);break;case\"option\":default:u=a;break;case\"select\":s._wrapperState={wasMultiple:!!a.multiple},u=we({},a,{value:void 0}),D(\"invalid\",s);break;case\"textarea\":hb(s,a),u=gb(s,a),D(\"invalid\",s)}for(_ in ub(i,u),C=u)if(C.hasOwnProperty(_)){var j=C[_];\"style\"===_?sb(s,j):\"dangerouslySetInnerHTML\"===_?null!=(j=j?j.__html:void 0)&&$e(s,j):\"children\"===_?\"string\"==typeof j?(\"textarea\"!==i||\"\"!==j)&&ob(s,j):\"number\"==typeof j&&ob(s,\"\"+j):\"suppressContentEditableWarning\"!==_&&\"suppressHydrationWarning\"!==_&&\"autoFocus\"!==_&&(w.hasOwnProperty(_)?null!=j&&\"onScroll\"===_&&D(\"scroll\",s):null!=j&&ta(s,_,j,x))}switch(i){case\"input\":Va(s),db(s,a,!1);break;case\"textarea\":Va(s),jb(s);break;case\"option\":null!=a.value&&s.setAttribute(\"value\",\"\"+Sa(a.value));break;case\"select\":s.multiple=!!a.multiple,null!=(_=a.value)?fb(s,!!a.multiple,_,!1):null!=a.defaultValue&&fb(s,!!a.multiple,a.defaultValue,!0);break;default:\"function\"==typeof u.onClick&&(s.onclick=Bf)}switch(i){case\"button\":case\"input\":case\"select\":case\"textarea\":a=!!a.autoFocus;break e;case\"img\":a=!0;break e;default:a=!1}}a&&(o.flags|=4)}null!==o.ref&&(o.flags|=512,o.flags|=2097152)}return S(o),null;case 6:if(s&&null!=o.stateNode)ws(s,o,s.memoizedProps,a);else{if(\"string\"!=typeof a&&null===o.stateNode)throw Error(p(166));if(i=xh(Qn.current),xh(Yn.current),Gg(o)){if(a=o.stateNode,i=o.memoizedProps,a[hn]=o,(_=a.nodeValue!==i)&&null!==(s=Dn))switch(s.tag){case 3:Af(a.nodeValue,i,!!(1&s.mode));break;case 5:!0!==s.memoizedProps.suppressHydrationWarning&&Af(a.nodeValue,i,!!(1&s.mode))}_&&(o.flags|=4)}else(a=(9===i.nodeType?i:i.ownerDocument).createTextNode(a))[hn]=o,o.stateNode=a}return S(o),null;case 13:if(E(Zn),a=o.memoizedState,null===s||null!==s.memoizedState&&null!==s.memoizedState.dehydrated){if(Fn&&null!==Ln&&1&o.mode&&!(128&o.flags))Hg(),Ig(),o.flags|=98560,_=!1;else if(_=Gg(o),null!==a&&null!==a.dehydrated){if(null===s){if(!_)throw Error(p(318));if(!(_=null!==(_=o.memoizedState)?_.dehydrated:null))throw Error(p(317));_[hn]=o}else Ig(),!(128&o.flags)&&(o.memoizedState=null),o.flags|=4;S(o),_=!1}else null!==Bn&&(Fj(Bn),Bn=null),_=!0;if(!_)return 65536&o.flags?o:null}return 128&o.flags?(o.lanes=i,o):((a=null!==a)!==(null!==s&&null!==s.memoizedState)&&a&&(o.child.flags|=8192,1&o.mode&&(null===s||1&Zn.current?0===Us&&(Us=3):tj())),null!==o.updateQueue&&(o.flags|=4),S(o),null);case 4:return zh(),Ss(s,o),null===s&&sf(o.stateNode.containerInfo),S(o),null;case 10:return ah(o.type._context),S(o),null;case 19:if(E(Zn),null===(_=o.memoizedState))return S(o),null;if(a=!!(128&o.flags),null===(x=_.rendering))if(a)Dj(_,!1);else{if(0!==Us||null!==s&&128&s.flags)for(s=o.child;null!==s;){if(null!==(x=Ch(s))){for(o.flags|=128,Dj(_,!1),null!==(a=x.updateQueue)&&(o.updateQueue=a,o.flags|=4),o.subtreeFlags=0,a=i,i=o.child;null!==i;)s=a,(_=i).flags&=14680066,null===(x=_.alternate)?(_.childLanes=0,_.lanes=s,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=x.childLanes,_.lanes=x.lanes,_.child=x.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=x.memoizedProps,_.memoizedState=x.memoizedState,_.updateQueue=x.updateQueue,_.type=x.type,s=x.dependencies,_.dependencies=null===s?null:{lanes:s.lanes,firstContext:s.firstContext}),i=i.sibling;return G(Zn,1&Zn.current|2),o.child}s=s.sibling}null!==_.tail&&ht()>Xs&&(o.flags|=128,a=!0,Dj(_,!1),o.lanes=4194304)}else{if(!a)if(null!==(s=Ch(x))){if(o.flags|=128,a=!0,null!==(i=s.updateQueue)&&(o.updateQueue=i,o.flags|=4),Dj(_,!0),null===_.tail&&\"hidden\"===_.tailMode&&!x.alternate&&!Fn)return S(o),null}else 2*ht()-_.renderingStartTime>Xs&&1073741824!==i&&(o.flags|=128,a=!0,Dj(_,!1),o.lanes=4194304);_.isBackwards?(x.sibling=o.child,o.child=x):(null!==(i=_.last)?i.sibling=x:o.child=x,_.last=x)}return null!==_.tail?(o=_.tail,_.rendering=o,_.tail=o.sibling,_.renderingStartTime=ht(),o.sibling=null,i=Zn.current,G(Zn,a?1&i|2:1&i),o):(S(o),null);case 22:case 23:return Hj(),a=null!==o.memoizedState,null!==s&&null!==s.memoizedState!==a&&(o.flags|=8192),a&&1&o.mode?!!(1073741824&qs)&&(S(o),6&o.subtreeFlags&&(o.flags|=8192)):S(o),null;case 24:case 25:return null}throw Error(p(156,o.tag))}function Ij(s,o){switch(wg(o),o.tag){case 1:return Zf(o.type)&&$f(),65536&(s=o.flags)?(o.flags=-65537&s|128,o):null;case 3:return zh(),E(En),E(Sn),Eh(),65536&(s=o.flags)&&!(128&s)?(o.flags=-65537&s|128,o):null;case 5:return Bh(o),null;case 13:if(E(Zn),null!==(s=o.memoizedState)&&null!==s.dehydrated){if(null===o.alternate)throw Error(p(340));Ig()}return 65536&(s=o.flags)?(o.flags=-65537&s|128,o):null;case 19:return E(Zn),null;case 4:return zh(),null;case 10:return ah(o.type._context),null;case 22:case 23:return Hj(),null;default:return null}}_s=function(s,o){for(var i=o.child;null!==i;){if(5===i.tag||6===i.tag)s.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===o)break;for(;null===i.sibling;){if(null===i.return||i.return===o)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Ss=function(){},Es=function(s,o,i,a){var u=s.memoizedProps;if(u!==a){s=o.stateNode,xh(Yn.current);var _,x=null;switch(i){case\"input\":u=Ya(s,u),a=Ya(s,a),x=[];break;case\"select\":u=we({},u,{value:void 0}),a=we({},a,{value:void 0}),x=[];break;case\"textarea\":u=gb(s,u),a=gb(s,a),x=[];break;default:\"function\"!=typeof u.onClick&&\"function\"==typeof a.onClick&&(s.onclick=Bf)}for(L in ub(i,a),i=null,u)if(!a.hasOwnProperty(L)&&u.hasOwnProperty(L)&&null!=u[L])if(\"style\"===L){var C=u[L];for(_ in C)C.hasOwnProperty(_)&&(i||(i={}),i[_]=\"\")}else\"dangerouslySetInnerHTML\"!==L&&\"children\"!==L&&\"suppressContentEditableWarning\"!==L&&\"suppressHydrationWarning\"!==L&&\"autoFocus\"!==L&&(w.hasOwnProperty(L)?x||(x=[]):(x=x||[]).push(L,null));for(L in a){var j=a[L];if(C=null!=u?u[L]:void 0,a.hasOwnProperty(L)&&j!==C&&(null!=j||null!=C))if(\"style\"===L)if(C){for(_ in C)!C.hasOwnProperty(_)||j&&j.hasOwnProperty(_)||(i||(i={}),i[_]=\"\");for(_ in j)j.hasOwnProperty(_)&&C[_]!==j[_]&&(i||(i={}),i[_]=j[_])}else i||(x||(x=[]),x.push(L,i)),i=j;else\"dangerouslySetInnerHTML\"===L?(j=j?j.__html:void 0,C=C?C.__html:void 0,null!=j&&C!==j&&(x=x||[]).push(L,j)):\"children\"===L?\"string\"!=typeof j&&\"number\"!=typeof j||(x=x||[]).push(L,\"\"+j):\"suppressContentEditableWarning\"!==L&&\"suppressHydrationWarning\"!==L&&(w.hasOwnProperty(L)?(null!=j&&\"onScroll\"===L&&D(\"scroll\",s),x||C===j||(x=[])):(x=x||[]).push(L,j))}i&&(x=x||[]).push(\"style\",i);var L=x;(o.updateQueue=L)&&(o.flags|=4)}},ws=function(s,o,i,a){i!==a&&(o.flags|=4)};var ks=!1,Os=!1,Cs=\"function\"==typeof WeakSet?WeakSet:Set,As=null;function Lj(s,o){var i=s.ref;if(null!==i)if(\"function\"==typeof i)try{i(null)}catch(i){W(s,o,i)}else i.current=null}function Mj(s,o,i){try{i()}catch(i){W(s,o,i)}}var js=!1;function Pj(s,o,i){var a=o.updateQueue;if(null!==(a=null!==a?a.lastEffect:null)){var u=a=a.next;do{if((u.tag&s)===s){var _=u.destroy;u.destroy=void 0,void 0!==_&&Mj(o,i,_)}u=u.next}while(u!==a)}}function Qj(s,o){if(null!==(o=null!==(o=o.updateQueue)?o.lastEffect:null)){var i=o=o.next;do{if((i.tag&s)===s){var a=i.create;i.destroy=a()}i=i.next}while(i!==o)}}function Rj(s){var o=s.ref;if(null!==o){var i=s.stateNode;s.tag,s=i,\"function\"==typeof o?o(s):o.current=s}}function Sj(s){var o=s.alternate;null!==o&&(s.alternate=null,Sj(o)),s.child=null,s.deletions=null,s.sibling=null,5===s.tag&&(null!==(o=s.stateNode)&&(delete o[hn],delete o[dn],delete o[mn],delete o[gn],delete o[yn])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Tj(s){return 5===s.tag||3===s.tag||4===s.tag}function Uj(s){e:for(;;){for(;null===s.sibling;){if(null===s.return||Tj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;5!==s.tag&&6!==s.tag&&18!==s.tag;){if(2&s.flags)continue e;if(null===s.child||4===s.tag)continue e;s.child.return=s,s=s.child}if(!(2&s.flags))return s.stateNode}}function Vj(s,o,i){var a=s.tag;if(5===a||6===a)s=s.stateNode,o?8===i.nodeType?i.parentNode.insertBefore(s,o):i.insertBefore(s,o):(8===i.nodeType?(o=i.parentNode).insertBefore(s,i):(o=i).appendChild(s),null!=(i=i._reactRootContainer)||null!==o.onclick||(o.onclick=Bf));else if(4!==a&&null!==(s=s.child))for(Vj(s,o,i),s=s.sibling;null!==s;)Vj(s,o,i),s=s.sibling}function Wj(s,o,i){var a=s.tag;if(5===a||6===a)s=s.stateNode,o?i.insertBefore(s,o):i.appendChild(s);else if(4!==a&&null!==(s=s.child))for(Wj(s,o,i),s=s.sibling;null!==s;)Wj(s,o,i),s=s.sibling}var Is=null,Ps=!1;function Yj(s,o,i){for(i=i.child;null!==i;)Zj(s,o,i),i=i.sibling}function Zj(s,o,i){if(St&&\"function\"==typeof St.onCommitFiberUnmount)try{St.onCommitFiberUnmount(_t,i)}catch(s){}switch(i.tag){case 5:Os||Lj(i,o);case 6:var a=Is,u=Ps;Is=null,Yj(s,o,i),Ps=u,null!==(Is=a)&&(Ps?(s=Is,i=i.stateNode,8===s.nodeType?s.parentNode.removeChild(i):s.removeChild(i)):Is.removeChild(i.stateNode));break;case 18:null!==Is&&(Ps?(s=Is,i=i.stateNode,8===s.nodeType?Kf(s.parentNode,i):1===s.nodeType&&Kf(s,i),bd(s)):Kf(Is,i.stateNode));break;case 4:a=Is,u=Ps,Is=i.stateNode.containerInfo,Ps=!0,Yj(s,o,i),Is=a,Ps=u;break;case 0:case 11:case 14:case 15:if(!Os&&(null!==(a=i.updateQueue)&&null!==(a=a.lastEffect))){u=a=a.next;do{var _=u,w=_.destroy;_=_.tag,void 0!==w&&(2&_||4&_)&&Mj(i,o,w),u=u.next}while(u!==a)}Yj(s,o,i);break;case 1:if(!Os&&(Lj(i,o),\"function\"==typeof(a=i.stateNode).componentWillUnmount))try{a.props=i.memoizedProps,a.state=i.memoizedState,a.componentWillUnmount()}catch(s){W(i,o,s)}Yj(s,o,i);break;case 21:Yj(s,o,i);break;case 22:1&i.mode?(Os=(a=Os)||null!==i.memoizedState,Yj(s,o,i),Os=a):Yj(s,o,i);break;default:Yj(s,o,i)}}function ak(s){var o=s.updateQueue;if(null!==o){s.updateQueue=null;var i=s.stateNode;null===i&&(i=s.stateNode=new Cs),o.forEach((function(o){var a=bk.bind(null,s,o);i.has(o)||(i.add(o),o.then(a,a))}))}}function ck(s,o){var i=o.deletions;if(null!==i)for(var a=0;a<i.length;a++){var u=i[a];try{var _=s,w=o,x=w;e:for(;null!==x;){switch(x.tag){case 5:Is=x.stateNode,Ps=!1;break e;case 3:case 4:Is=x.stateNode.containerInfo,Ps=!0;break e}x=x.return}if(null===Is)throw Error(p(160));Zj(_,w,u),Is=null,Ps=!1;var C=u.alternate;null!==C&&(C.return=null),u.return=null}catch(s){W(u,o,s)}}if(12854&o.subtreeFlags)for(o=o.child;null!==o;)dk(o,s),o=o.sibling}function dk(s,o){var i=s.alternate,a=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ck(o,s),ek(s),4&a){try{Pj(3,s,s.return),Qj(3,s)}catch(o){W(s,s.return,o)}try{Pj(5,s,s.return)}catch(o){W(s,s.return,o)}}break;case 1:ck(o,s),ek(s),512&a&&null!==i&&Lj(i,i.return);break;case 5:if(ck(o,s),ek(s),512&a&&null!==i&&Lj(i,i.return),32&s.flags){var u=s.stateNode;try{ob(u,\"\")}catch(o){W(s,s.return,o)}}if(4&a&&null!=(u=s.stateNode)){var _=s.memoizedProps,w=null!==i?i.memoizedProps:_,x=s.type,C=s.updateQueue;if(s.updateQueue=null,null!==C)try{\"input\"===x&&\"radio\"===_.type&&null!=_.name&&ab(u,_),vb(x,w);var j=vb(x,_);for(w=0;w<C.length;w+=2){var L=C[w],B=C[w+1];\"style\"===L?sb(u,B):\"dangerouslySetInnerHTML\"===L?$e(u,B):\"children\"===L?ob(u,B):ta(u,L,B,j)}switch(x){case\"input\":bb(u,_);break;case\"textarea\":ib(u,_);break;case\"select\":var $=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!_.multiple;var V=_.value;null!=V?fb(u,!!_.multiple,V,!1):$!==!!_.multiple&&(null!=_.defaultValue?fb(u,!!_.multiple,_.defaultValue,!0):fb(u,!!_.multiple,_.multiple?[]:\"\",!1))}u[dn]=_}catch(o){W(s,s.return,o)}}break;case 6:if(ck(o,s),ek(s),4&a){if(null===s.stateNode)throw Error(p(162));u=s.stateNode,_=s.memoizedProps;try{u.nodeValue=_}catch(o){W(s,s.return,o)}}break;case 3:if(ck(o,s),ek(s),4&a&&null!==i&&i.memoizedState.isDehydrated)try{bd(o.containerInfo)}catch(o){W(s,s.return,o)}break;case 4:default:ck(o,s),ek(s);break;case 13:ck(o,s),ek(s),8192&(u=s.child).flags&&(_=null!==u.memoizedState,u.stateNode.isHidden=_,!_||null!==u.alternate&&null!==u.alternate.memoizedState||(Ys=ht())),4&a&&ak(s);break;case 22:if(L=null!==i&&null!==i.memoizedState,1&s.mode?(Os=(j=Os)||L,ck(o,s),Os=j):ck(o,s),ek(s),8192&a){if(j=null!==s.memoizedState,(s.stateNode.isHidden=j)&&!L&&1&s.mode)for(As=s,L=s.child;null!==L;){for(B=As=L;null!==As;){switch(V=($=As).child,$.tag){case 0:case 11:case 14:case 15:Pj(4,$,$.return);break;case 1:Lj($,$.return);var U=$.stateNode;if(\"function\"==typeof U.componentWillUnmount){a=$,i=$.return;try{o=a,U.props=o.memoizedProps,U.state=o.memoizedState,U.componentWillUnmount()}catch(s){W(a,i,s)}}break;case 5:Lj($,$.return);break;case 22:if(null!==$.memoizedState){gk(B);continue}}null!==V?(V.return=$,As=V):gk(B)}L=L.sibling}e:for(L=null,B=s;;){if(5===B.tag){if(null===L){L=B;try{u=B.stateNode,j?\"function\"==typeof(_=u.style).setProperty?_.setProperty(\"display\",\"none\",\"important\"):_.display=\"none\":(x=B.stateNode,w=null!=(C=B.memoizedProps.style)&&C.hasOwnProperty(\"display\")?C.display:null,x.style.display=rb(\"display\",w))}catch(o){W(s,s.return,o)}}}else if(6===B.tag){if(null===L)try{B.stateNode.nodeValue=j?\"\":B.memoizedProps}catch(o){W(s,s.return,o)}}else if((22!==B.tag&&23!==B.tag||null===B.memoizedState||B===s)&&null!==B.child){B.child.return=B,B=B.child;continue}if(B===s)break e;for(;null===B.sibling;){if(null===B.return||B.return===s)break e;L===B&&(L=null),B=B.return}L===B&&(L=null),B.sibling.return=B.return,B=B.sibling}}break;case 19:ck(o,s),ek(s),4&a&&ak(s);case 21:}}function ek(s){var o=s.flags;if(2&o){try{e:{for(var i=s.return;null!==i;){if(Tj(i)){var a=i;break e}i=i.return}throw Error(p(160))}switch(a.tag){case 5:var u=a.stateNode;32&a.flags&&(ob(u,\"\"),a.flags&=-33),Wj(s,Uj(s),u);break;case 3:case 4:var _=a.stateNode.containerInfo;Vj(s,Uj(s),_);break;default:throw Error(p(161))}}catch(o){W(s,s.return,o)}s.flags&=-3}4096&o&&(s.flags&=-4097)}function hk(s,o,i){As=s,ik(s,o,i)}function ik(s,o,i){for(var a=!!(1&s.mode);null!==As;){var u=As,_=u.child;if(22===u.tag&&a){var w=null!==u.memoizedState||ks;if(!w){var x=u.alternate,C=null!==x&&null!==x.memoizedState||Os;x=ks;var j=Os;if(ks=w,(Os=C)&&!j)for(As=u;null!==As;)C=(w=As).child,22===w.tag&&null!==w.memoizedState?jk(u):null!==C?(C.return=w,As=C):jk(u);for(;null!==_;)As=_,ik(_,o,i),_=_.sibling;As=u,ks=x,Os=j}kk(s)}else 8772&u.subtreeFlags&&null!==_?(_.return=u,As=_):kk(s)}}function kk(s){for(;null!==As;){var o=As;if(8772&o.flags){var i=o.alternate;try{if(8772&o.flags)switch(o.tag){case 0:case 11:case 15:Os||Qj(5,o);break;case 1:var a=o.stateNode;if(4&o.flags&&!Os)if(null===i)a.componentDidMount();else{var u=o.elementType===o.type?i.memoizedProps:Ci(o.type,i.memoizedProps);a.componentDidUpdate(u,i.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var _=o.updateQueue;null!==_&&sh(o,_,a);break;case 3:var w=o.updateQueue;if(null!==w){if(i=null,null!==o.child)switch(o.child.tag){case 5:case 1:i=o.child.stateNode}sh(o,w,i)}break;case 5:var x=o.stateNode;if(null===i&&4&o.flags){i=x;var C=o.memoizedProps;switch(o.type){case\"button\":case\"input\":case\"select\":case\"textarea\":C.autoFocus&&i.focus();break;case\"img\":C.src&&(i.src=C.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===o.memoizedState){var j=o.alternate;if(null!==j){var L=j.memoizedState;if(null!==L){var B=L.dehydrated;null!==B&&bd(B)}}}break;default:throw Error(p(163))}Os||512&o.flags&&Rj(o)}catch(s){W(o,o.return,s)}}if(o===s){As=null;break}if(null!==(i=o.sibling)){i.return=o.return,As=i;break}As=o.return}}function gk(s){for(;null!==As;){var o=As;if(o===s){As=null;break}var i=o.sibling;if(null!==i){i.return=o.return,As=i;break}As=o.return}}function jk(s){for(;null!==As;){var o=As;try{switch(o.tag){case 0:case 11:case 15:var i=o.return;try{Qj(4,o)}catch(s){W(o,i,s)}break;case 1:var a=o.stateNode;if(\"function\"==typeof a.componentDidMount){var u=o.return;try{a.componentDidMount()}catch(s){W(o,u,s)}}var _=o.return;try{Rj(o)}catch(s){W(o,_,s)}break;case 5:var w=o.return;try{Rj(o)}catch(s){W(o,w,s)}}}catch(s){W(o,o.return,s)}if(o===s){As=null;break}var x=o.sibling;if(null!==x){x.return=o.return,As=x;break}As=o.return}}var Ts,Ns=Math.ceil,Ms=U.ReactCurrentDispatcher,Rs=U.ReactCurrentOwner,Ds=U.ReactCurrentBatchConfig,Ls=0,Fs=null,Bs=null,$s=0,qs=0,Vs=Uf(0),Us=0,zs=null,Ws=0,Js=0,Hs=0,Ks=null,Gs=null,Ys=0,Xs=1/0,Qs=null,Zs=!1,eo=null,to=null,ro=!1,no=null,so=0,oo=0,io=null,ao=-1,co=0;function R(){return 6&Ls?ht():-1!==ao?ao:ao=ht()}function yi(s){return 1&s.mode?2&Ls&&0!==$s?$s&-$s:null!==$n.transition?(0===co&&(co=yc()),co):0!==(s=Ct)?s:s=void 0===(s=window.event)?16:jd(s.type):1}function gi(s,o,i,a){if(50<oo)throw oo=0,io=null,Error(p(185));Ac(s,i,a),2&Ls&&s===Fs||(s===Fs&&(!(2&Ls)&&(Js|=i),4===Us&&Ck(s,$s)),Dk(s,a),1===i&&0===Ls&&!(1&o.mode)&&(Xs=ht()+500,kn&&jg()))}function Dk(s,o){var i=s.callbackNode;!function wc(s,o){for(var i=s.suspendedLanes,a=s.pingedLanes,u=s.expirationTimes,_=s.pendingLanes;0<_;){var w=31-Et(_),x=1<<w,C=u[w];-1===C?x&i&&!(x&a)||(u[w]=vc(x,o)):C<=o&&(s.expiredLanes|=x),_&=~x}}(s,o);var a=uc(s,s===Fs?$s:0);if(0===a)null!==i&&lt(i),s.callbackNode=null,s.callbackPriority=0;else if(o=a&-a,s.callbackPriority!==o){if(null!=i&&lt(i),1===o)0===s.tag?function ig(s){kn=!0,hg(s)}(Ek.bind(null,s)):hg(Ek.bind(null,s)),un((function(){!(6&Ls)&&jg()})),i=null;else{switch(Dc(a)){case 1:i=mt;break;case 4:i=gt;break;case 16:default:i=yt;break;case 536870912:i=bt}i=Fk(i,Gk.bind(null,s))}s.callbackPriority=o,s.callbackNode=i}}function Gk(s,o){if(ao=-1,co=0,6&Ls)throw Error(p(327));var i=s.callbackNode;if(Hk()&&s.callbackNode!==i)return null;var a=uc(s,s===Fs?$s:0);if(0===a)return null;if(30&a||a&s.expiredLanes||o)o=Ik(s,a);else{o=a;var u=Ls;Ls|=2;var _=Jk();for(Fs===s&&$s===o||(Qs=null,Xs=ht()+500,Kk(s,o));;)try{Lk();break}catch(o){Mk(s,o)}$g(),Ms.current=_,Ls=u,null!==Bs?o=0:(Fs=null,$s=0,o=Us)}if(0!==o){if(2===o&&(0!==(u=xc(s))&&(a=u,o=Nk(s,u))),1===o)throw i=zs,Kk(s,0),Ck(s,a),Dk(s,ht()),i;if(6===o)Ck(s,a);else{if(u=s.current.alternate,!(30&a||function Ok(s){for(var o=s;;){if(16384&o.flags){var i=o.updateQueue;if(null!==i&&null!==(i=i.stores))for(var a=0;a<i.length;a++){var u=i[a],_=u.getSnapshot;u=u.value;try{if(!Dr(_(),u))return!1}catch(s){return!1}}}if(i=o.child,16384&o.subtreeFlags&&null!==i)i.return=o,o=i;else{if(o===s)break;for(;null===o.sibling;){if(null===o.return||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}(u)||(o=Ik(s,a),2===o&&(_=xc(s),0!==_&&(a=_,o=Nk(s,_))),1!==o)))throw i=zs,Kk(s,0),Ck(s,a),Dk(s,ht()),i;switch(s.finishedWork=u,s.finishedLanes=a,o){case 0:case 1:throw Error(p(345));case 2:case 5:Pk(s,Gs,Qs);break;case 3:if(Ck(s,a),(130023424&a)===a&&10<(o=Ys+500-ht())){if(0!==uc(s,0))break;if(((u=s.suspendedLanes)&a)!==a){R(),s.pingedLanes|=s.suspendedLanes&u;break}s.timeoutHandle=an(Pk.bind(null,s,Gs,Qs),o);break}Pk(s,Gs,Qs);break;case 4:if(Ck(s,a),(4194240&a)===a)break;for(o=s.eventTimes,u=-1;0<a;){var w=31-Et(a);_=1<<w,(w=o[w])>u&&(u=w),a&=~_}if(a=u,10<(a=(120>(a=ht()-a)?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Ns(a/1960))-a)){s.timeoutHandle=an(Pk.bind(null,s,Gs,Qs),a);break}Pk(s,Gs,Qs);break;default:throw Error(p(329))}}}return Dk(s,ht()),s.callbackNode===i?Gk.bind(null,s):null}function Nk(s,o){var i=Ks;return s.current.memoizedState.isDehydrated&&(Kk(s,o).flags|=256),2!==(s=Ik(s,o))&&(o=Gs,Gs=i,null!==o&&Fj(o)),s}function Fj(s){null===Gs?Gs=s:Gs.push.apply(Gs,s)}function Ck(s,o){for(o&=~Hs,o&=~Js,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var i=31-Et(o),a=1<<i;s[i]=-1,o&=~a}}function Ek(s){if(6&Ls)throw Error(p(327));Hk();var o=uc(s,0);if(!(1&o))return Dk(s,ht()),null;var i=Ik(s,o);if(0!==s.tag&&2===i){var a=xc(s);0!==a&&(o=a,i=Nk(s,a))}if(1===i)throw i=zs,Kk(s,0),Ck(s,o),Dk(s,ht()),i;if(6===i)throw Error(p(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Pk(s,Gs,Qs),Dk(s,ht()),null}function Qk(s,o){var i=Ls;Ls|=1;try{return s(o)}finally{0===(Ls=i)&&(Xs=ht()+500,kn&&jg())}}function Rk(s){null!==no&&0===no.tag&&!(6&Ls)&&Hk();var o=Ls;Ls|=1;var i=Ds.transition,a=Ct;try{if(Ds.transition=null,Ct=1,s)return s()}finally{Ct=a,Ds.transition=i,!(6&(Ls=o))&&jg()}}function Hj(){qs=Vs.current,E(Vs)}function Kk(s,o){s.finishedWork=null,s.finishedLanes=0;var i=s.timeoutHandle;if(-1!==i&&(s.timeoutHandle=-1,cn(i)),null!==Bs)for(i=Bs.return;null!==i;){var a=i;switch(wg(a),a.tag){case 1:null!=(a=a.type.childContextTypes)&&$f();break;case 3:zh(),E(En),E(Sn),Eh();break;case 5:Bh(a);break;case 4:zh();break;case 13:case 19:E(Zn);break;case 10:ah(a.type._context);break;case 22:case 23:Hj()}i=i.return}if(Fs=s,Bs=s=Pg(s.current,null),$s=qs=o,Us=0,zs=null,Hs=Js=Ws=0,Gs=Ks=null,null!==Hn){for(o=0;o<Hn.length;o++)if(null!==(a=(i=Hn[o]).interleaved)){i.interleaved=null;var u=a.next,_=i.pending;if(null!==_){var w=_.next;_.next=u,a.next=w}i.pending=a}Hn=null}return s}function Mk(s,o){for(;;){var i=Bs;try{if($g(),ts.current=hs,cs){for(var a=ss.memoizedState;null!==a;){var u=a.queue;null!==u&&(u.pending=null),a=a.next}cs=!1}if(ns=0,as=os=ss=null,ls=!1,us=0,Rs.current=null,null===i||null===i.return){Us=1,zs=o,Bs=null;break}e:{var _=s,w=i.return,x=i,C=o;if(o=$s,x.flags|=32768,null!==C&&\"object\"==typeof C&&\"function\"==typeof C.then){var j=C,L=x,B=L.tag;if(!(1&L.mode||0!==B&&11!==B&&15!==B)){var $=L.alternate;$?(L.updateQueue=$.updateQueue,L.memoizedState=$.memoizedState,L.lanes=$.lanes):(L.updateQueue=null,L.memoizedState=null)}var V=Ui(w);if(null!==V){V.flags&=-257,Vi(V,w,x,0,o),1&V.mode&&Si(_,j,o),C=j;var U=(o=V).updateQueue;if(null===U){var z=new Set;z.add(C),o.updateQueue=z}else U.add(C);break e}if(!(1&o)){Si(_,j,o),tj();break e}C=Error(p(426))}else if(Fn&&1&x.mode){var Y=Ui(w);if(null!==Y){!(65536&Y.flags)&&(Y.flags|=256),Vi(Y,w,x,0,o),Jg(Ji(C,x));break e}}_=C=Ji(C,x),4!==Us&&(Us=2),null===Ks?Ks=[_]:Ks.push(_),_=w;do{switch(_.tag){case 3:_.flags|=65536,o&=-o,_.lanes|=o,ph(_,Ni(0,C,o));break e;case 1:x=C;var Z=_.type,ee=_.stateNode;if(!(128&_.flags||\"function\"!=typeof Z.getDerivedStateFromError&&(null===ee||\"function\"!=typeof ee.componentDidCatch||null!==to&&to.has(ee)))){_.flags|=65536,o&=-o,_.lanes|=o,ph(_,Qi(_,x,o));break e}}_=_.return}while(null!==_)}Sk(i)}catch(s){o=s,Bs===i&&null!==i&&(Bs=i=i.return);continue}break}}function Jk(){var s=Ms.current;return Ms.current=hs,null===s?hs:s}function tj(){0!==Us&&3!==Us&&2!==Us||(Us=4),null===Fs||!(268435455&Ws)&&!(268435455&Js)||Ck(Fs,$s)}function Ik(s,o){var i=Ls;Ls|=2;var a=Jk();for(Fs===s&&$s===o||(Qs=null,Kk(s,o));;)try{Tk();break}catch(o){Mk(s,o)}if($g(),Ls=i,Ms.current=a,null!==Bs)throw Error(p(261));return Fs=null,$s=0,Us}function Tk(){for(;null!==Bs;)Uk(Bs)}function Lk(){for(;null!==Bs&&!ut();)Uk(Bs)}function Uk(s){var o=Ts(s.alternate,s,qs);s.memoizedProps=s.pendingProps,null===o?Sk(s):Bs=o,Rs.current=null}function Sk(s){var o=s;do{var i=o.alternate;if(s=o.return,32768&o.flags){if(null!==(i=Ij(i,o)))return i.flags&=32767,void(Bs=i);if(null===s)return Us=6,void(Bs=null);s.flags|=32768,s.subtreeFlags=0,s.deletions=null}else if(null!==(i=Ej(i,o,qs)))return void(Bs=i);if(null!==(o=o.sibling))return void(Bs=o);Bs=o=s}while(null!==o);0===Us&&(Us=5)}function Pk(s,o,i){var a=Ct,u=Ds.transition;try{Ds.transition=null,Ct=1,function Wk(s,o,i,a){do{Hk()}while(null!==no);if(6&Ls)throw Error(p(327));i=s.finishedWork;var u=s.finishedLanes;if(null===i)return null;if(s.finishedWork=null,s.finishedLanes=0,i===s.current)throw Error(p(177));s.callbackNode=null,s.callbackPriority=0;var _=i.lanes|i.childLanes;if(function Bc(s,o){var i=s.pendingLanes&~o;s.pendingLanes=o,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=o,s.mutableReadLanes&=o,s.entangledLanes&=o,o=s.entanglements;var a=s.eventTimes;for(s=s.expirationTimes;0<i;){var u=31-Et(i),_=1<<u;o[u]=0,a[u]=-1,s[u]=-1,i&=~_}}(s,_),s===Fs&&(Bs=Fs=null,$s=0),!(2064&i.subtreeFlags)&&!(2064&i.flags)||ro||(ro=!0,Fk(yt,(function(){return Hk(),null}))),_=!!(15990&i.flags),!!(15990&i.subtreeFlags)||_){_=Ds.transition,Ds.transition=null;var w=Ct;Ct=1;var x=Ls;Ls|=4,Rs.current=null,function Oj(s,o){if(sn=Ut,Ne(s=Me())){if(\"selectionStart\"in s)var i={start:s.selectionStart,end:s.selectionEnd};else e:{var a=(i=(i=s.ownerDocument)&&i.defaultView||window).getSelection&&i.getSelection();if(a&&0!==a.rangeCount){i=a.anchorNode;var u=a.anchorOffset,_=a.focusNode;a=a.focusOffset;try{i.nodeType,_.nodeType}catch(s){i=null;break e}var w=0,x=-1,C=-1,j=0,L=0,B=s,$=null;t:for(;;){for(var V;B!==i||0!==u&&3!==B.nodeType||(x=w+u),B!==_||0!==a&&3!==B.nodeType||(C=w+a),3===B.nodeType&&(w+=B.nodeValue.length),null!==(V=B.firstChild);)$=B,B=V;for(;;){if(B===s)break t;if($===i&&++j===u&&(x=w),$===_&&++L===a&&(C=w),null!==(V=B.nextSibling))break;$=(B=$).parentNode}B=V}i=-1===x||-1===C?null:{start:x,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(on={focusedElem:s,selectionRange:i},Ut=!1,As=o;null!==As;)if(s=(o=As).child,1028&o.subtreeFlags&&null!==s)s.return=o,As=s;else for(;null!==As;){o=As;try{var U=o.alternate;if(1024&o.flags)switch(o.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==U){var z=U.memoizedProps,Y=U.memoizedState,Z=o.stateNode,ee=Z.getSnapshotBeforeUpdate(o.elementType===o.type?z:Ci(o.type,z),Y);Z.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var ie=o.stateNode.containerInfo;1===ie.nodeType?ie.textContent=\"\":9===ie.nodeType&&ie.documentElement&&ie.removeChild(ie.documentElement);break;default:throw Error(p(163))}}catch(s){W(o,o.return,s)}if(null!==(s=o.sibling)){s.return=o.return,As=s;break}As=o.return}return U=js,js=!1,U}(s,i),dk(i,s),Oe(on),Ut=!!sn,on=sn=null,s.current=i,hk(i,s,u),pt(),Ls=x,Ct=w,Ds.transition=_}else s.current=i;if(ro&&(ro=!1,no=s,so=u),_=s.pendingLanes,0===_&&(to=null),function mc(s){if(St&&\"function\"==typeof St.onCommitFiberRoot)try{St.onCommitFiberRoot(_t,s,void 0,!(128&~s.current.flags))}catch(s){}}(i.stateNode),Dk(s,ht()),null!==o)for(a=s.onRecoverableError,i=0;i<o.length;i++)u=o[i],a(u.value,{componentStack:u.stack,digest:u.digest});if(Zs)throw Zs=!1,s=eo,eo=null,s;return!!(1&so)&&0!==s.tag&&Hk(),_=s.pendingLanes,1&_?s===io?oo++:(oo=0,io=s):oo=0,jg(),null}(s,o,i,a)}finally{Ds.transition=u,Ct=a}return null}function Hk(){if(null!==no){var s=Dc(so),o=Ds.transition,i=Ct;try{if(Ds.transition=null,Ct=16>s?16:s,null===no)var a=!1;else{if(s=no,no=null,so=0,6&Ls)throw Error(p(331));var u=Ls;for(Ls|=4,As=s.current;null!==As;){var _=As,w=_.child;if(16&As.flags){var x=_.deletions;if(null!==x){for(var C=0;C<x.length;C++){var j=x[C];for(As=j;null!==As;){var L=As;switch(L.tag){case 0:case 11:case 15:Pj(8,L,_)}var B=L.child;if(null!==B)B.return=L,As=B;else for(;null!==As;){var $=(L=As).sibling,V=L.return;if(Sj(L),L===j){As=null;break}if(null!==$){$.return=V,As=$;break}As=V}}}var U=_.alternate;if(null!==U){var z=U.child;if(null!==z){U.child=null;do{var Y=z.sibling;z.sibling=null,z=Y}while(null!==z)}}As=_}}if(2064&_.subtreeFlags&&null!==w)w.return=_,As=w;else e:for(;null!==As;){if(2048&(_=As).flags)switch(_.tag){case 0:case 11:case 15:Pj(9,_,_.return)}var Z=_.sibling;if(null!==Z){Z.return=_.return,As=Z;break e}As=_.return}}var ee=s.current;for(As=ee;null!==As;){var ie=(w=As).child;if(2064&w.subtreeFlags&&null!==ie)ie.return=w,As=ie;else e:for(w=ee;null!==As;){if(2048&(x=As).flags)try{switch(x.tag){case 0:case 11:case 15:Qj(9,x)}}catch(s){W(x,x.return,s)}if(x===w){As=null;break e}var ae=x.sibling;if(null!==ae){ae.return=x.return,As=ae;break e}As=x.return}}if(Ls=u,jg(),St&&\"function\"==typeof St.onPostCommitFiberRoot)try{St.onPostCommitFiberRoot(_t,s)}catch(s){}a=!0}return a}finally{Ct=i,Ds.transition=o}}return!1}function Xk(s,o,i){s=nh(s,o=Ni(0,o=Ji(i,o),1),1),o=R(),null!==s&&(Ac(s,1,o),Dk(s,o))}function W(s,o,i){if(3===s.tag)Xk(s,s,i);else for(;null!==o;){if(3===o.tag){Xk(o,s,i);break}if(1===o.tag){var a=o.stateNode;if(\"function\"==typeof o.type.getDerivedStateFromError||\"function\"==typeof a.componentDidCatch&&(null===to||!to.has(a))){o=nh(o,s=Qi(o,s=Ji(i,s),1),1),s=R(),null!==o&&(Ac(o,1,s),Dk(o,s));break}}o=o.return}}function Ti(s,o,i){var a=s.pingCache;null!==a&&a.delete(o),o=R(),s.pingedLanes|=s.suspendedLanes&i,Fs===s&&($s&i)===i&&(4===Us||3===Us&&(130023424&$s)===$s&&500>ht()-Ys?Kk(s,0):Hs|=i),Dk(s,o)}function Yk(s,o){0===o&&(1&s.mode?(o=Ot,!(130023424&(Ot<<=1))&&(Ot=4194304)):o=1);var i=R();null!==(s=ih(s,o))&&(Ac(s,o,i),Dk(s,i))}function uj(s){var o=s.memoizedState,i=0;null!==o&&(i=o.retryLane),Yk(s,i)}function bk(s,o){var i=0;switch(s.tag){case 13:var a=s.stateNode,u=s.memoizedState;null!==u&&(i=u.retryLane);break;case 19:a=s.stateNode;break;default:throw Error(p(314))}null!==a&&a.delete(o),Yk(s,i)}function Fk(s,o){return ct(s,o)}function $k(s,o,i,a){this.tag=s,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(s,o,i,a){return new $k(s,o,i,a)}function aj(s){return!(!(s=s.prototype)||!s.isReactComponent)}function Pg(s,o){var i=s.alternate;return null===i?((i=Bg(s.tag,o,s.key,s.mode)).elementType=s.elementType,i.type=s.type,i.stateNode=s.stateNode,i.alternate=s,s.alternate=i):(i.pendingProps=o,i.type=s.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=14680064&s.flags,i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,o=s.dependencies,i.dependencies=null===o?null:{lanes:o.lanes,firstContext:o.firstContext},i.sibling=s.sibling,i.index=s.index,i.ref=s.ref,i}function Rg(s,o,i,a,u,_){var w=2;if(a=s,\"function\"==typeof s)aj(s)&&(w=1);else if(\"string\"==typeof s)w=5;else e:switch(s){case Z:return Tg(i.children,u,_,o);case ee:w=8,u|=8;break;case ie:return(s=Bg(12,i,o,2|u)).elementType=ie,s.lanes=_,s;case pe:return(s=Bg(13,i,o,u)).elementType=pe,s.lanes=_,s;case de:return(s=Bg(19,i,o,u)).elementType=de,s.lanes=_,s;case be:return pj(i,u,_,o);default:if(\"object\"==typeof s&&null!==s)switch(s.$$typeof){case ae:w=10;break e;case ce:w=9;break e;case le:w=11;break e;case fe:w=14;break e;case ye:w=16,a=null;break e}throw Error(p(130,null==s?s:typeof s,\"\"))}return(o=Bg(w,i,o,u)).elementType=s,o.type=a,o.lanes=_,o}function Tg(s,o,i,a){return(s=Bg(7,s,a,o)).lanes=i,s}function pj(s,o,i,a){return(s=Bg(22,s,a,o)).elementType=be,s.lanes=i,s.stateNode={isHidden:!1},s}function Qg(s,o,i){return(s=Bg(6,s,null,o)).lanes=i,s}function Sg(s,o,i){return(o=Bg(4,null!==s.children?s.children:[],s.key,o)).lanes=i,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function al(s,o,i,a,u){this.tag=o,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=a,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function bl(s,o,i,a,u,_,w,x,C){return s=new al(s,o,i,x,C),1===o?(o=1,!0===_&&(o|=8)):o=0,_=Bg(3,null,null,o),s.current=_,_.stateNode=s,_.memoizedState={element:a,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(_),s}function dl(s){if(!s)return _n;e:{if(Vb(s=s._reactInternals)!==s||1!==s.tag)throw Error(p(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Zf(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(null!==o);throw Error(p(171))}if(1===s.tag){var i=s.type;if(Zf(i))return bg(s,i,o)}return o}function el(s,o,i,a,u,_,w,x,C){return(s=bl(i,a,!0,s,0,_,0,x,C)).context=dl(null),i=s.current,(_=mh(a=R(),u=yi(i))).callback=null!=o?o:null,nh(i,_,u),s.current.lanes=u,Ac(s,u,a),Dk(s,a),s}function fl(s,o,i,a){var u=o.current,_=R(),w=yi(u);return i=dl(i),null===o.context?o.context=i:o.pendingContext=i,(o=mh(_,w)).payload={element:s},null!==(a=void 0===a?null:a)&&(o.callback=a),null!==(s=nh(u,o,w))&&(gi(s,u,w,_),oh(s,u,w)),w}function gl(s){return(s=s.current).child?(s.child.tag,s.child.stateNode):null}function hl(s,o){if(null!==(s=s.memoizedState)&&null!==s.dehydrated){var i=s.retryLane;s.retryLane=0!==i&&i<o?i:o}}function il(s,o){hl(s,o),(s=s.alternate)&&hl(s,o)}Ts=function(s,o,i){if(null!==s)if(s.memoizedProps!==o.pendingProps||En.current)bs=!0;else{if(!(s.lanes&i||128&o.flags))return bs=!1,function yj(s,o,i){switch(o.tag){case 3:kj(o),Ig();break;case 5:Ah(o);break;case 1:Zf(o.type)&&cg(o);break;case 4:yh(o,o.stateNode.containerInfo);break;case 10:var a=o.type._context,u=o.memoizedProps.value;G(Un,a._currentValue),a._currentValue=u;break;case 13:if(null!==(a=o.memoizedState))return null!==a.dehydrated?(G(Zn,1&Zn.current),o.flags|=128,null):i&o.child.childLanes?oj(s,o,i):(G(Zn,1&Zn.current),null!==(s=Zi(s,o,i))?s.sibling:null);G(Zn,1&Zn.current);break;case 19:if(a=!!(i&o.childLanes),128&s.flags){if(a)return xj(s,o,i);o.flags|=128}if(null!==(u=o.memoizedState)&&(u.rendering=null,u.tail=null,u.lastEffect=null),G(Zn,Zn.current),a)break;return null;case 22:case 23:return o.lanes=0,dj(s,o,i)}return Zi(s,o,i)}(s,o,i);bs=!!(131072&s.flags)}else bs=!1,Fn&&1048576&o.flags&&ug(o,In,o.index);switch(o.lanes=0,o.tag){case 2:var a=o.type;ij(s,o),s=o.pendingProps;var u=Yf(o,Sn.current);ch(o,i),u=Nh(null,o,a,s,u,i);var _=Sh();return o.flags|=1,\"object\"==typeof u&&null!==u&&\"function\"==typeof u.render&&void 0===u.$$typeof?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Zf(a)?(_=!0,cg(o)):_=!1,o.memoizedState=null!==u.state&&void 0!==u.state?u.state:null,kh(o),u.updater=gs,o.stateNode=u,u._reactInternals=o,Ii(o,a,s,i),o=jj(null,o,a,!0,_,i)):(o.tag=0,Fn&&_&&vg(o),Xi(null,o,u,i),o=o.child),o;case 16:a=o.elementType;e:{switch(ij(s,o),s=o.pendingProps,a=(u=a._init)(a._payload),o.type=a,u=o.tag=function Zk(s){if(\"function\"==typeof s)return aj(s)?1:0;if(null!=s){if((s=s.$$typeof)===le)return 11;if(s===fe)return 14}return 2}(a),s=Ci(a,s),u){case 0:o=cj(null,o,a,s,i);break e;case 1:o=hj(null,o,a,s,i);break e;case 11:o=Yi(null,o,a,s,i);break e;case 14:o=$i(null,o,a,Ci(a.type,s),i);break e}throw Error(p(306,a,\"\"))}return o;case 0:return a=o.type,u=o.pendingProps,cj(s,o,a,u=o.elementType===a?u:Ci(a,u),i);case 1:return a=o.type,u=o.pendingProps,hj(s,o,a,u=o.elementType===a?u:Ci(a,u),i);case 3:e:{if(kj(o),null===s)throw Error(p(387));a=o.pendingProps,u=(_=o.memoizedState).element,lh(s,o),qh(o,a,null,i);var w=o.memoizedState;if(a=w.element,_.isDehydrated){if(_={element:a,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=_,o.memoizedState=_,256&o.flags){o=lj(s,o,a,i,u=Ji(Error(p(423)),o));break e}if(a!==u){o=lj(s,o,a,i,u=Ji(Error(p(424)),o));break e}for(Ln=Lf(o.stateNode.containerInfo.firstChild),Dn=o,Fn=!0,Bn=null,i=Vn(o,null,a,i),o.child=i;i;)i.flags=-3&i.flags|4096,i=i.sibling}else{if(Ig(),a===u){o=Zi(s,o,i);break e}Xi(s,o,a,i)}o=o.child}return o;case 5:return Ah(o),null===s&&Eg(o),a=o.type,u=o.pendingProps,_=null!==s?s.memoizedProps:null,w=u.children,Ef(a,u)?w=null:null!==_&&Ef(a,_)&&(o.flags|=32),gj(s,o),Xi(s,o,w,i),o.child;case 6:return null===s&&Eg(o),null;case 13:return oj(s,o,i);case 4:return yh(o,o.stateNode.containerInfo),a=o.pendingProps,null===s?o.child=qn(o,null,a,i):Xi(s,o,a,i),o.child;case 11:return a=o.type,u=o.pendingProps,Yi(s,o,a,u=o.elementType===a?u:Ci(a,u),i);case 7:return Xi(s,o,o.pendingProps,i),o.child;case 8:case 12:return Xi(s,o,o.pendingProps.children,i),o.child;case 10:e:{if(a=o.type._context,u=o.pendingProps,_=o.memoizedProps,w=u.value,G(Un,a._currentValue),a._currentValue=w,null!==_)if(Dr(_.value,w)){if(_.children===u.children&&!En.current){o=Zi(s,o,i);break e}}else for(null!==(_=o.child)&&(_.return=o);null!==_;){var x=_.dependencies;if(null!==x){w=_.child;for(var C=x.firstContext;null!==C;){if(C.context===a){if(1===_.tag){(C=mh(-1,i&-i)).tag=2;var j=_.updateQueue;if(null!==j){var L=(j=j.shared).pending;null===L?C.next=C:(C.next=L.next,L.next=C),j.pending=C}}_.lanes|=i,null!==(C=_.alternate)&&(C.lanes|=i),bh(_.return,i,o),x.lanes|=i;break}C=C.next}}else if(10===_.tag)w=_.type===o.type?null:_.child;else if(18===_.tag){if(null===(w=_.return))throw Error(p(341));w.lanes|=i,null!==(x=w.alternate)&&(x.lanes|=i),bh(w,i,o),w=_.sibling}else w=_.child;if(null!==w)w.return=_;else for(w=_;null!==w;){if(w===o){w=null;break}if(null!==(_=w.sibling)){_.return=w.return,w=_;break}w=w.return}_=w}Xi(s,o,u.children,i),o=o.child}return o;case 9:return u=o.type,a=o.pendingProps.children,ch(o,i),a=a(u=eh(u)),o.flags|=1,Xi(s,o,a,i),o.child;case 14:return u=Ci(a=o.type,o.pendingProps),$i(s,o,a,u=Ci(a.type,u),i);case 15:return bj(s,o,o.type,o.pendingProps,i);case 17:return a=o.type,u=o.pendingProps,u=o.elementType===a?u:Ci(a,u),ij(s,o),o.tag=1,Zf(a)?(s=!0,cg(o)):s=!1,ch(o,i),Gi(o,a,u),Ii(o,a,u,i),jj(null,o,a,!0,s,i);case 19:return xj(s,o,i);case 22:return dj(s,o,i)}throw Error(p(156,o.tag))};var lo=\"function\"==typeof reportError?reportError:function(s){console.error(s)};function ll(s){this._internalRoot=s}function ml(s){this._internalRoot=s}function nl(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType)}function ol(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType&&(8!==s.nodeType||\" react-mount-point-unstable \"!==s.nodeValue))}function pl(){}function rl(s,o,i,a,u){var _=i._reactRootContainer;if(_){var w=_;if(\"function\"==typeof u){var x=u;u=function(){var s=gl(w);x.call(s)}}fl(o,w,s,u)}else w=function ql(s,o,i,a,u){if(u){if(\"function\"==typeof a){var _=a;a=function(){var s=gl(w);_.call(s)}}var w=el(o,a,s,0,null,!1,0,\"\",pl);return s._reactRootContainer=w,s[fn]=w.current,sf(8===s.nodeType?s.parentNode:s),Rk(),w}for(;u=s.lastChild;)s.removeChild(u);if(\"function\"==typeof a){var x=a;a=function(){var s=gl(C);x.call(s)}}var C=bl(s,0,!1,null,0,!1,0,\"\",pl);return s._reactRootContainer=C,s[fn]=C.current,sf(8===s.nodeType?s.parentNode:s),Rk((function(){fl(o,C,i,a)})),C}(i,o,s,u,a);return gl(w)}ml.prototype.render=ll.prototype.render=function(s){var o=this._internalRoot;if(null===o)throw Error(p(409));fl(s,o,null,null)},ml.prototype.unmount=ll.prototype.unmount=function(){var s=this._internalRoot;if(null!==s){this._internalRoot=null;var o=s.containerInfo;Rk((function(){fl(null,s,null,null)})),o[fn]=null}},ml.prototype.unstable_scheduleHydration=function(s){if(s){var o=Pt();s={blockedOn:null,target:s,priority:o};for(var i=0;i<$t.length&&0!==o&&o<$t[i].priority;i++);$t.splice(i,0,s),0===i&&Vc(s)}},At=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var i=tc(o.pendingLanes);0!==i&&(Cc(o,1|i),Dk(o,ht()),!(6&Ls)&&(Xs=ht()+500,jg()))}break;case 13:Rk((function(){var o=ih(s,1);if(null!==o){var i=R();gi(o,s,1,i)}})),il(s,1)}},jt=function(s){if(13===s.tag){var o=ih(s,134217728);if(null!==o)gi(o,s,134217728,R());il(s,134217728)}},It=function(s){if(13===s.tag){var o=yi(s),i=ih(s,o);if(null!==i)gi(i,s,o,R());il(s,o)}},Pt=function(){return Ct},Tt=function(s,o){var i=Ct;try{return Ct=s,o()}finally{Ct=i}},Ye=function(s,o,i){switch(o){case\"input\":if(bb(s,i),o=i.name,\"radio\"===i.type&&null!=o){for(i=s;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+o)+'][type=\"radio\"]'),o=0;o<i.length;o++){var a=i[o];if(a!==s&&a.form===s.form){var u=Db(a);if(!u)throw Error(p(90));Wa(a),bb(a,u)}}}break;case\"textarea\":ib(s,i);break;case\"select\":null!=(o=i.value)&&fb(s,!!i.multiple,o,!1)}},Gb=Qk,Hb=Rk;var uo={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Qk]},po={findFiberByHostInstance:Wc,bundleType:0,version:\"18.3.1\",rendererPackageName:\"react-dom\"},ho={bundleType:po.bundleType,version:po.version,rendererPackageName:po.rendererPackageName,rendererConfig:po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return null===(s=Zb(s))?null:s.stateNode},findFiberByHostInstance:po.findFiberByHostInstance||function jl(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.3.1-next-f1338f8080-20240426\"};if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fo.isDisabled&&fo.supportsFiber)try{_t=fo.inject(ho),St=fo}catch(Re){}}o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uo,o.createPortal=function(s,o){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nl(o))throw Error(p(200));return function cl(s,o,i){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Y,key:null==a?null:\"\"+a,children:s,containerInfo:o,implementation:i}}(s,o,null,i)},o.createRoot=function(s,o){if(!nl(s))throw Error(p(299));var i=!1,a=\"\",u=lo;return null!=o&&(!0===o.unstable_strictMode&&(i=!0),void 0!==o.identifierPrefix&&(a=o.identifierPrefix),void 0!==o.onRecoverableError&&(u=o.onRecoverableError)),o=bl(s,1,!1,null,0,i,0,a,u),s[fn]=o.current,sf(8===s.nodeType?s.parentNode:s),new ll(o)},o.findDOMNode=function(s){if(null==s)return null;if(1===s.nodeType)return s;var o=s._reactInternals;if(void 0===o){if(\"function\"==typeof s.render)throw Error(p(188));throw s=Object.keys(s).join(\",\"),Error(p(268,s))}return s=null===(s=Zb(o))?null:s.stateNode},o.flushSync=function(s){return Rk(s)},o.hydrate=function(s,o,i){if(!ol(o))throw Error(p(200));return rl(null,s,o,!0,i)},o.hydrateRoot=function(s,o,i){if(!nl(s))throw Error(p(405));var a=null!=i&&i.hydratedSources||null,u=!1,_=\"\",w=lo;if(null!=i&&(!0===i.unstable_strictMode&&(u=!0),void 0!==i.identifierPrefix&&(_=i.identifierPrefix),void 0!==i.onRecoverableError&&(w=i.onRecoverableError)),o=el(o,null,s,1,null!=i?i:null,u,0,_,w),s[fn]=o.current,sf(s),a)for(s=0;s<a.length;s++)u=(u=(i=a[s])._getVersion)(i._source),null==o.mutableSourceEagerHydrationData?o.mutableSourceEagerHydrationData=[i,u]:o.mutableSourceEagerHydrationData.push(i,u);return new ml(o)},o.render=function(s,o,i){if(!ol(o))throw Error(p(200));return rl(null,s,o,!1,i)},o.unmountComponentAtNode=function(s){if(!ol(s))throw Error(p(40));return!!s._reactRootContainer&&(Rk((function(){rl(null,null,s,!1,(function(){s._reactRootContainer=null,s[fn]=null}))})),!0)},o.unstable_batchedUpdates=Qk,o.unstable_renderSubtreeIntoContainer=function(s,o,i,a){if(!ol(i))throw Error(p(200));if(null==s||void 0===s._reactInternals)throw Error(p(38));return rl(s,o,i,!1,a)},o.version=\"18.3.1-next-f1338f8080-20240426\"},22574:(s,o)=>{\"use strict\";var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,u=a&&!i.call({1:2},1);o.f=u?function propertyIsEnumerable(s){var o=a(this,s);return!!o&&o.enumerable}:i},23007:s=>{s.exports=function copyArray(s,o){var i=-1,a=s.length;for(o||(o=Array(a));++i<a;)o[i]=s[i];return o}},23034:(s,o,i)=>{\"use strict\";var a=i(88280),u=i(32567),_=Function.prototype;s.exports=function(s){var o=s.bind;return s===_||a(_,s)&&o===_.bind?u:o}},23045:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(49724),_=i(4993),w=i(74436).indexOf,x=i(38530),C=a([].push);s.exports=function(s,o){var i,a=_(s),j=0,L=[];for(i in a)!u(x,i)&&u(a,i)&&C(L,i);for(;o.length>j;)u(a,i=o[j++])&&(~w(L,i)||C(L,i));return L}},23546:(s,o,i)=>{var a=i(72552),u=i(40346),_=i(11331);s.exports=function isError(s){if(!u(s))return!1;var o=a(s);return\"[object Error]\"==o||\"[object DOMException]\"==o||\"string\"==typeof s.message&&\"string\"==typeof s.name&&!_(s)}},23805:s=>{s.exports=function isObject(s){var o=typeof s;return null!=s&&(\"object\"==o||\"function\"==o)}},23888:(s,o,i)=>{\"use strict\";var a=i(98828),u=i(75817);s.exports=!a((function(){var s=new Error(\"a\");return!(\"stack\"in s)||(Object.defineProperty(s,\"stack\",u(1,7)),7!==s.stack)}))},24107:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],x=new Array(64);function Sha256(){this.init(),this._w=x,u.call(this,64,56)}function ch(s,o,i){return i^s&(o^i)}function maj(s,o,i){return s&o|i&(s|o)}function sigma0(s){return(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10)}function sigma1(s){return(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7)}function gamma0(s){return(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3}a(Sha256,u),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(s){for(var o,i=this._w,a=0|this._a,u=0|this._b,_=0|this._c,x=0|this._d,C=0|this._e,j=0|this._f,L=0|this._g,B=0|this._h,$=0;$<16;++$)i[$]=s.readInt32BE(4*$);for(;$<64;++$)i[$]=0|(((o=i[$-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10)+i[$-7]+gamma0(i[$-15])+i[$-16];for(var V=0;V<64;++V){var U=B+sigma1(C)+ch(C,j,L)+w[V]+i[V]|0,z=sigma0(a)+maj(a,u,_)|0;B=L,L=j,j=C,C=x+U|0,x=_,_=u,u=a,a=U+z|0}this._a=a+this._a|0,this._b=u+this._b|0,this._c=_+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0,this._f=j+this._f|0,this._g=L+this._g|0,this._h=B+this._h|0},Sha256.prototype._hash=function(){var s=_.allocUnsafe(32);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s.writeInt32BE(this._h,28),s},s.exports=Sha256},24168:(s,o,i)=>{var a=i(91033),u=i(82819),_=i(9325);s.exports=function createPartial(s,o,i,w){var x=1&o,C=u(s);return function wrapper(){for(var o=-1,u=arguments.length,j=-1,L=w.length,B=Array(L+u),$=this&&this!==_&&this instanceof wrapper?C:s;++j<L;)B[j]=w[j];for(;u--;)B[j++]=arguments[++o];return a($,x?i:this,B)}}},24443:(s,o,i)=>{\"use strict\";var a=i(23045),u=i(80376).concat(\"length\",\"prototype\");o.f=Object.getOwnPropertyNames||function getOwnPropertyNames(s){return a(s,u)}},24647:(s,o,i)=>{var a=i(54552)({À:\"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\",ſ:\"s\"});s.exports=a},24677:(s,o,i)=>{\"use strict\";var a=i(81214).DebounceInput;a.DebounceInput=a,s.exports=a},24713:(s,o,i)=>{var a=i(2523),u=i(15389),_=i(61489),w=Math.max;s.exports=function findIndex(s,o,i){var x=null==s?0:s.length;if(!x)return-1;var C=null==i?0:_(i);return C<0&&(C=w(x+C,0)),a(s,u(o,3),C)}},24739:(s,o,i)=>{var a=i(26025);s.exports=function listCacheGet(s){var o=this.__data__,i=a(o,s);return i<0?void 0:o[i][1]}},24823:(s,o,i)=>{\"use strict\";var a=i(28311),u=i(13930),_=i(36624),w=i(4640),x=i(37812),C=i(20575),j=i(88280),L=i(10300),B=i(73448),$=i(40154),V=TypeError,Result=function(s,o){this.stopped=s,this.result=o},U=Result.prototype;s.exports=function(s,o,i){var z,Y,Z,ee,ie,ae,ce,le=i&&i.that,pe=!(!i||!i.AS_ENTRIES),de=!(!i||!i.IS_RECORD),fe=!(!i||!i.IS_ITERATOR),ye=!(!i||!i.INTERRUPTED),be=a(o,le),stop=function(s){return z&&$(z,\"normal\",s),new Result(!0,s)},callFn=function(s){return pe?(_(s),ye?be(s[0],s[1],stop):be(s[0],s[1])):ye?be(s,stop):be(s)};if(de)z=s.iterator;else if(fe)z=s;else{if(!(Y=B(s)))throw new V(w(s)+\" is not iterable\");if(x(Y)){for(Z=0,ee=C(s);ee>Z;Z++)if((ie=callFn(s[Z]))&&j(U,ie))return ie;return new Result(!1)}z=L(s,Y)}for(ae=de?s.next:z.next;!(ce=u(ae,z)).done;){try{ie=callFn(ce.value)}catch(s){$(z,\"throw\",s)}if(\"object\"==typeof ie&&ie&&j(U,ie))return ie}return new Result(!1)}},25160:s=>{s.exports=function baseSlice(s,o,i){var a=-1,u=s.length;o<0&&(o=-o>u?0:u+o),(i=i>u?u:i)<0&&(i+=u),u=o>i?0:i-o>>>0,o>>>=0;for(var _=Array(u);++a<u;)_[a]=s[a+o];return _}},25264:(s,o,i)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.CopyToClipboard=void 0;var a=_interopRequireDefault(i(96540)),u=_interopRequireDefault(i(17965)),_=[\"text\",\"onCopy\",\"options\",\"children\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=function _objectWithoutPropertiesLoose(s,o){if(null==s)return{};var i,a,u={},_=Object.keys(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||(u[i]=s[i]);return u}(s,o);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(s,i)&&(u[i]=s[i])}return u}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,o){return s.__proto__=o,s},_setPrototypeOf(s,o)}function _createSuper(s){var o=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(s);if(o){var u=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,u)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(s,o){if(o&&(\"object\"===_typeof(o)||\"function\"==typeof o))return o;if(void 0!==o)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,i)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var w=function(s){!function _inherits(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),o&&_setPrototypeOf(s,o)}(CopyToClipboard,s);var o=_createSuper(CopyToClipboard);function CopyToClipboard(){var s;!function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,CopyToClipboard);for(var i=arguments.length,_=new Array(i),w=0;w<i;w++)_[w]=arguments[w];return _defineProperty(_assertThisInitialized(s=o.call.apply(o,[this].concat(_))),\"onClick\",(function(o){var i=s.props,_=i.text,w=i.onCopy,x=i.children,C=i.options,j=a.default.Children.only(x),L=(0,u.default)(_,C);w&&w(_,L),j&&j.props&&\"function\"==typeof j.props.onClick&&j.props.onClick(o)})),s}return function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(CopyToClipboard,[{key:\"render\",value:function render(){var s=this.props,o=(s.text,s.onCopy,s.options,s.children),i=_objectWithoutProperties(s,_),u=a.default.Children.only(o);return a.default.cloneElement(u,_objectSpread(_objectSpread({},i),{},{onClick:this.onClick}))}}]),CopyToClipboard}(a.default.PureComponent);o.CopyToClipboard=w,_defineProperty(w,\"defaultProps\",{onCopy:void 0,options:void 0})},25382:(s,o,i)=>{\"use strict\";var a=i(65606),u=Object.keys||function(s){var o=[];for(var i in s)o.push(i);return o};s.exports=Duplex;var _=i(45412),w=i(16708);i(56698)(Duplex,_);for(var x=u(w.prototype),C=0;C<x.length;C++){var j=x[C];Duplex.prototype[j]||(Duplex.prototype[j]=w.prototype[j])}function Duplex(s){if(!(this instanceof Duplex))return new Duplex(s);_.call(this,s),w.call(this,s),this.allowHalfOpen=!0,s&&(!1===s.readable&&(this.readable=!1),!1===s.writable&&(this.writable=!1),!1===s.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",onend)))}function onend(){this._writableState.ended||a.nextTick(onEndNT,this)}function onEndNT(s){s.end()}Object.defineProperty(Duplex.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(s){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=s,this._writableState.destroyed=s)}})},25594:(s,o,i)=>{\"use strict\";var a=i(85582),u=i(62250),_=i(88280),w=i(51175),x=Object;s.exports=w?function(s){return\"symbol\"==typeof s}:function(s){var o=a(\"Symbol\");return u(o)&&_(o.prototype,x(s))}},25911:(s,o,i)=>{var a=i(38859),u=i(14248),_=i(19219);s.exports=function equalArrays(s,o,i,w,x,C){var j=1&i,L=s.length,B=o.length;if(L!=B&&!(j&&B>L))return!1;var $=C.get(s),V=C.get(o);if($&&V)return $==o&&V==s;var U=-1,z=!0,Y=2&i?new a:void 0;for(C.set(s,o),C.set(o,s);++U<L;){var Z=s[U],ee=o[U];if(w)var ie=j?w(ee,Z,U,o,s,C):w(Z,ee,U,s,o,C);if(void 0!==ie){if(ie)continue;z=!1;break}if(Y){if(!u(o,(function(s,o){if(!_(Y,o)&&(Z===s||x(Z,s,i,w,C)))return Y.push(o)}))){z=!1;break}}else if(Z!==ee&&!x(Z,ee,i,w,C)){z=!1;break}}return C.delete(s),C.delete(o),z}},26025:(s,o,i)=>{var a=i(75288);s.exports=function assocIndexOf(s,o){for(var i=s.length;i--;)if(a(s[i][0],o))return i;return-1}},26311:s=>{!function(){var o;function format(s){for(var o,i,a,u,_=1,w=[].slice.call(arguments),x=0,C=s.length,j=\"\",L=!1,B=!1,nextArg=function(){return w[_++]},slurpNumber=function(){for(var i=\"\";/\\d/.test(s[x]);)i+=s[x++],o=s[x];return i.length>0?parseInt(i):null};x<C;++x)if(o=s[x],L)switch(L=!1,\".\"==o?(B=!1,o=s[++x]):\"0\"==o&&\".\"==s[x+1]?(B=!0,o=s[x+=2]):B=!0,u=slurpNumber(),o){case\"b\":j+=parseInt(nextArg(),10).toString(2);break;case\"c\":j+=\"string\"==typeof(i=nextArg())||i instanceof String?i:String.fromCharCode(parseInt(i,10));break;case\"d\":j+=parseInt(nextArg(),10);break;case\"f\":a=String(parseFloat(nextArg()).toFixed(u||6)),j+=B?a:a.replace(/^0/,\"\");break;case\"j\":j+=JSON.stringify(nextArg());break;case\"o\":j+=\"0\"+parseInt(nextArg(),10).toString(8);break;case\"s\":j+=nextArg();break;case\"x\":j+=\"0x\"+parseInt(nextArg(),10).toString(16);break;case\"X\":j+=\"0x\"+parseInt(nextArg(),10).toString(16).toUpperCase();break;default:j+=o}else\"%\"===o?L=!0:j+=o;return j}(o=s.exports=format).format=format,o.vsprintf=function vsprintf(s,o){return format.apply(null,[s].concat(o))},\"undefined\"!=typeof console&&\"function\"==typeof console.log&&(o.printf=function printf(){console.log(format.apply(null,arguments))})}()},26571:s=>{s.exports=function powershell(s){const o={$pattern:/-?[A-z\\.\\-]+\\b/,keyword:\"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter\",built_in:\"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write\"},i={begin:\"`[\\\\s\\\\S]\",relevance:0},a={className:\"variable\",variants:[{begin:/\\$\\B/},{className:\"keyword\",begin:/\\$this/},{begin:/\\$[\\w\\d][\\w\\d_:]*/}]},u={className:\"string\",variants:[{begin:/\"/,end:/\"/},{begin:/@\"/,end:/^\"@/}],contains:[i,a,{className:\"variable\",begin:/\\$[A-z]/,end:/[^A-z]/}]},_={className:\"string\",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},w=s.inherit(s.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:\"doctag\",variants:[{begin:/\\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\\s+\\S+/}]}]}),x={className:\"built_in\",variants:[{begin:\"(\".concat(\"Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where\",\")+(-)[\\\\w\\\\d]+\")}]},C={className:\"class\",beginKeywords:\"class enum\",end:/\\s*[{]/,excludeEnd:!0,relevance:0,contains:[s.TITLE_MODE]},j={className:\"function\",begin:/function\\s+/,end:/\\s*\\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:\"function\",relevance:0,className:\"keyword\"},{className:\"title\",begin:/\\w[\\w\\d]*((-)[\\w\\d]+)*/,relevance:0},{begin:/\\(/,end:/\\)/,className:\"params\",relevance:0,contains:[a]}]},L={begin:/using\\s/,end:/$/,returnBegin:!0,contains:[u,_,{className:\"keyword\",begin:/(using|assembly|command|module|namespace|type)/}]},B={variants:[{className:\"operator\",begin:\"(\".concat(\"-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor\",\")\\\\b\")},{className:\"literal\",begin:/(-)[\\w\\d]+/,relevance:0}]},$={className:\"function\",begin:/\\[.*\\]\\s*[\\w]+[ ]??\\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:\"keyword\",begin:\"(\".concat(o.keyword.toString().replace(/\\s/g,\"|\"),\")\\\\b\"),endsParent:!0,relevance:0},s.inherit(s.TITLE_MODE,{endsParent:!0})]},V=[$,w,i,s.NUMBER_MODE,u,_,x,a,{className:\"literal\",begin:/\\$(null|true|false)\\b/},{className:\"selector-tag\",begin:/@\\B/,relevance:0}],U={begin:/\\[/,end:/\\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat(\"self\",V,{begin:\"(\"+[\"string\",\"char\",\"byte\",\"int\",\"long\",\"bool\",\"decimal\",\"single\",\"double\",\"DateTime\",\"xml\",\"array\",\"hashtable\",\"void\"].join(\"|\")+\")\",className:\"built_in\",relevance:0},{className:\"type\",begin:/[\\.\\w\\d]+/,relevance:0})};return $.contains.unshift(U),{name:\"PowerShell\",aliases:[\"ps\",\"ps1\"],case_insensitive:!0,keywords:o,contains:V.concat(C,j,L,B,U)}}},26657:(s,o,i)=>{\"use strict\";var a=i(75208),u=function isClosingTag(s){return/<\\/+[^>]+>/.test(s)},_=function isSelfClosingTag(s){return/<[^>]+\\/>/.test(s)};function getType(s){return u(s)?\"ClosingTag\":function isOpeningTag(s){return function isTag(s){return/<[^>!]+>/.test(s)}(s)&&!u(s)&&!_(s)}(s)?\"OpeningTag\":_(s)?\"SelfClosingTag\":\"Text\"}s.exports=function(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.indentor,u=o.textNodesOnSameLine,_=0,w=[];i=i||\"    \";var x=function lexer(s){return function splitOnTags(s){return s.split(/(<\\/?[^>]+>)/g).filter((function(s){return\"\"!==s.trim()}))}(s).map((function(s){return{value:s,type:getType(s)}}))}(s).map((function(s,o,x){var C=s.value,j=s.type;\"ClosingTag\"===j&&_--;var L=a(i,_),B=L+C;if(\"OpeningTag\"===j&&_++,u){var $=x[o-1],V=x[o-2];\"ClosingTag\"===j&&\"Text\"===$.type&&\"OpeningTag\"===V.type&&(B=\"\"+L+V.value+$.value+C,w.push(o-2,o-1))}return B}));return w.forEach((function(s){return x[s]=null})),x.filter((function(s){return!!s})).join(\"\\n\")}},26710:(s,o,i)=>{var a=i(56698),u=i(24107),_=i(90392),w=i(92861).Buffer,x=new Array(64);function Sha224(){this.init(),this._w=x,_.call(this,64,56)}a(Sha224,u),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var s=w.allocUnsafe(28);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s},s.exports=Sha224},27096:(s,o,i)=>{const a=i(87586),u=i(6205),_=i(10023),w=i(8048);s.exports=s=>{var o,i,x=0,C={type:u.ROOT,stack:[]},j=C,L=C.stack,B=[],repeatErr=o=>{a.error(s,\"Nothing to repeat at column \"+(o-1))},$=a.strToChars(s);for(o=$.length;x<o;)switch(i=$[x++]){case\"\\\\\":switch(i=$[x++]){case\"b\":L.push(w.wordBoundary());break;case\"B\":L.push(w.nonWordBoundary());break;case\"w\":L.push(_.words());break;case\"W\":L.push(_.notWords());break;case\"d\":L.push(_.ints());break;case\"D\":L.push(_.notInts());break;case\"s\":L.push(_.whitespace());break;case\"S\":L.push(_.notWhitespace());break;default:/\\d/.test(i)?L.push({type:u.REFERENCE,value:parseInt(i,10)}):L.push({type:u.CHAR,value:i.charCodeAt(0)})}break;case\"^\":L.push(w.begin());break;case\"$\":L.push(w.end());break;case\"[\":var V;\"^\"===$[x]?(V=!0,x++):V=!1;var U=a.tokenizeClass($.slice(x),s);x+=U[1],L.push({type:u.SET,set:U[0],not:V});break;case\".\":L.push(_.anyChar());break;case\"(\":var z={type:u.GROUP,stack:[],remember:!0};\"?\"===(i=$[x])&&(i=$[x+1],x+=2,\"=\"===i?z.followedBy=!0:\"!\"===i?z.notFollowedBy=!0:\":\"!==i&&a.error(s,`Invalid group, character '${i}' after '?' at column `+(x-1)),z.remember=!1),L.push(z),B.push(j),j=z,L=z.stack;break;case\")\":0===B.length&&a.error(s,\"Unmatched ) at column \"+(x-1)),L=(j=B.pop()).options?j.options[j.options.length-1]:j.stack;break;case\"|\":j.options||(j.options=[j.stack],delete j.stack);var Y=[];j.options.push(Y),L=Y;break;case\"{\":var Z,ee,ie=/^(\\d+)(,(\\d+)?)?\\}/.exec($.slice(x));null!==ie?(0===L.length&&repeatErr(x),Z=parseInt(ie[1],10),ee=ie[2]?ie[3]?parseInt(ie[3],10):1/0:Z,x+=ie[0].length,L.push({type:u.REPETITION,min:Z,max:ee,value:L.pop()})):L.push({type:u.CHAR,value:123});break;case\"?\":0===L.length&&repeatErr(x),L.push({type:u.REPETITION,min:0,max:1,value:L.pop()});break;case\"+\":0===L.length&&repeatErr(x),L.push({type:u.REPETITION,min:1,max:1/0,value:L.pop()});break;case\"*\":0===L.length&&repeatErr(x),L.push({type:u.REPETITION,min:0,max:1/0,value:L.pop()});break;default:L.push({type:u.CHAR,value:i.charCodeAt(0)})}return 0!==B.length&&a.error(s,\"Unterminated group\"),C},s.exports.types=u},27301:s=>{s.exports=function baseUnary(s){return function(o){return s(o)}}},27374:(s,o)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=function(s,o,i){if(void 0===s)throw new Error('Reducer \"'+o+'\" returned undefined when handling \"'+i.type+'\" action. To ignore an action, you must explicitly return the previous state.')},s.exports=o.default},27534:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function baseIsArguments(s){return u(s)&&\"[object Arguments]\"==a(s)}},27816:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1518500249,1859775393,-1894007588,-899497514],x=new Array(80);function Sha(){this.init(),this._w=x,u.call(this,64,56)}function rotl30(s){return s<<30|s>>>2}function ft(s,o,i,a){return 0===s?o&i|~o&a:2===s?o&i|o&a|i&a:o^i^a}a(Sha,u),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(s){for(var o,i=this._w,a=0|this._a,u=0|this._b,_=0|this._c,x=0|this._d,C=0|this._e,j=0;j<16;++j)i[j]=s.readInt32BE(4*j);for(;j<80;++j)i[j]=i[j-3]^i[j-8]^i[j-14]^i[j-16];for(var L=0;L<80;++L){var B=~~(L/20),$=0|((o=a)<<5|o>>>27)+ft(B,u,_,x)+C+i[L]+w[B];C=x,x=_,_=rotl30(u),u=a,a=$}this._a=a+this._a|0,this._b=u+this._b|0,this._c=_+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0},Sha.prototype._hash=function(){var s=_.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha},28077:s=>{s.exports=function baseHasIn(s,o){return null!=s&&o in Object(s)}},28303:(s,o,i)=>{var a=i(56110)(i(9325),\"WeakMap\");s.exports=a},28311:(s,o,i)=>{\"use strict\";var a=i(92361),u=i(82159),_=i(41505),w=a(a.bind);s.exports=function(s,o){return u(s),void 0===o?s:_?w(s,o):function(){return s.apply(o,arguments)}}},28586:(s,o,i)=>{var a=i(56449),u=i(44394),_=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,w=/^\\w*$/;s.exports=function isKey(s,o){if(a(s))return!1;var i=typeof s;return!(\"number\"!=i&&\"symbol\"!=i&&\"boolean\"!=i&&null!=s&&!u(s))||(w.test(s)||!_.test(s)||null!=o&&s in Object(o))}},28754:(s,o,i)=>{var a=i(25160);s.exports=function castSlice(s,o,i){var u=s.length;return i=void 0===i?u:i,!o&&i>=u?s:a(s,o,i)}},28879:(s,o,i)=>{var a=i(74335)(Object.getPrototypeOf,Object);s.exports=a},29172:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function baseIsMap(s){return u(s)&&\"[object Map]\"==a(s)}},29367:(s,o,i)=>{\"use strict\";var a=i(82159),u=i(87136);s.exports=function(s,o){var i=s[o];return u(i)?void 0:a(i)}},29538:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(1907),_=i(13930),w=i(98828),x=i(2875),C=i(87170),j=i(22574),L=i(39298),B=i(16946),$=Object.assign,V=Object.defineProperty,U=u([].concat);s.exports=!$||w((function(){if(a&&1!==$({b:1},$(V({},\"a\",{enumerable:!0,get:function(){V(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var s={},o={},i=Symbol(\"assign detection\"),u=\"abcdefghijklmnopqrst\";return s[i]=7,u.split(\"\").forEach((function(s){o[s]=s})),7!==$({},s)[i]||x($({},o)).join(\"\")!==u}))?function assign(s,o){for(var i=L(s),u=arguments.length,w=1,$=C.f,V=j.f;u>w;)for(var z,Y=B(arguments[w++]),Z=$?U(x(Y),$(Y)):x(Y),ee=Z.length,ie=0;ee>ie;)z=Z[ie++],a&&!_(V,Y,z)||(i[z]=Y[z]);return i}:$},29817:s=>{s.exports=function stackHas(s){return this.__data__.has(s)}},29844:(s,o)=>{\"use strict\";function f(s,o){var i=s.length;s.push(o);e:for(;0<i;){var a=i-1>>>1,u=s[a];if(!(0<g(u,o)))break e;s[a]=o,s[i]=u,i=a}}function h(s){return 0===s.length?null:s[0]}function k(s){if(0===s.length)return null;var o=s[0],i=s.pop();if(i!==o){s[0]=i;e:for(var a=0,u=s.length,_=u>>>1;a<_;){var w=2*(a+1)-1,x=s[w],C=w+1,j=s[C];if(0>g(x,i))C<u&&0>g(j,x)?(s[a]=j,s[C]=i,a=C):(s[a]=x,s[w]=i,a=w);else{if(!(C<u&&0>g(j,i)))break e;s[a]=j,s[C]=i,a=C}}}return o}function g(s,o){var i=s.sortIndex-o.sortIndex;return 0!==i?i:s.id-o.id}if(\"object\"==typeof performance&&\"function\"==typeof performance.now){var i=performance;o.unstable_now=function(){return i.now()}}else{var a=Date,u=a.now();o.unstable_now=function(){return a.now()-u}}var _=[],w=[],x=1,C=null,j=3,L=!1,B=!1,$=!1,V=\"function\"==typeof setTimeout?setTimeout:null,U=\"function\"==typeof clearTimeout?clearTimeout:null,z=\"undefined\"!=typeof setImmediate?setImmediate:null;function G(s){for(var o=h(w);null!==o;){if(null===o.callback)k(w);else{if(!(o.startTime<=s))break;k(w),o.sortIndex=o.expirationTime,f(_,o)}o=h(w)}}function H(s){if($=!1,G(s),!B)if(null!==h(_))B=!0,I(J);else{var o=h(w);null!==o&&K(H,o.startTime-s)}}function J(s,i){B=!1,$&&($=!1,U(ie),ie=-1),L=!0;var a=j;try{for(G(i),C=h(_);null!==C&&(!(C.expirationTime>i)||s&&!M());){var u=C.callback;if(\"function\"==typeof u){C.callback=null,j=C.priorityLevel;var x=u(C.expirationTime<=i);i=o.unstable_now(),\"function\"==typeof x?C.callback=x:C===h(_)&&k(_),G(i)}else k(_);C=h(_)}if(null!==C)var V=!0;else{var z=h(w);null!==z&&K(H,z.startTime-i),V=!1}return V}finally{C=null,j=a,L=!1}}\"undefined\"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var Y,Z=!1,ee=null,ie=-1,ae=5,ce=-1;function M(){return!(o.unstable_now()-ce<ae)}function R(){if(null!==ee){var s=o.unstable_now();ce=s;var i=!0;try{i=ee(!0,s)}finally{i?Y():(Z=!1,ee=null)}}else Z=!1}if(\"function\"==typeof z)Y=function(){z(R)};else if(\"undefined\"!=typeof MessageChannel){var le=new MessageChannel,pe=le.port2;le.port1.onmessage=R,Y=function(){pe.postMessage(null)}}else Y=function(){V(R,0)};function I(s){ee=s,Z||(Z=!0,Y())}function K(s,i){ie=V((function(){s(o.unstable_now())}),i)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(s){s.callback=null},o.unstable_continueExecution=function(){B||L||(B=!0,I(J))},o.unstable_forceFrameRate=function(s){0>s||125<s?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):ae=0<s?Math.floor(1e3/s):5},o.unstable_getCurrentPriorityLevel=function(){return j},o.unstable_getFirstCallbackNode=function(){return h(_)},o.unstable_next=function(s){switch(j){case 1:case 2:case 3:var o=3;break;default:o=j}var i=j;j=o;try{return s()}finally{j=i}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(s,o){switch(s){case 1:case 2:case 3:case 4:case 5:break;default:s=3}var i=j;j=s;try{return o()}finally{j=i}},o.unstable_scheduleCallback=function(s,i,a){var u=o.unstable_now();switch(\"object\"==typeof a&&null!==a?a=\"number\"==typeof(a=a.delay)&&0<a?u+a:u:a=u,s){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return s={id:x++,callback:i,priorityLevel:s,startTime:a,expirationTime:C=a+C,sortIndex:-1},a>u?(s.sortIndex=a,f(w,s),null===h(_)&&s===h(w)&&($?(U(ie),ie=-1):$=!0,K(H,a-u))):(s.sortIndex=C,f(_,s),B||L||(B=!0,I(J))),s},o.unstable_shouldYield=M,o.unstable_wrapCallback=function(s){var o=j;return function(){var i=j;j=o;try{return s.apply(this,arguments)}finally{j=i}}}},30294:s=>{s.exports=function isLength(s){return\"number\"==typeof s&&s>-1&&s%1==0&&s<=9007199254740991}},30361:s=>{var o=/^(?:0|[1-9]\\d*)$/;s.exports=function isIndex(s,i){var a=typeof s;return!!(i=null==i?9007199254740991:i)&&(\"number\"==a||\"symbol\"!=a&&o.test(s))&&s>-1&&s%1==0&&s<i}},30641:(s,o,i)=>{var a=i(86649),u=i(95950);s.exports=function baseForOwn(s,o){return s&&a(s,o,u)}},30756:(s,o,i)=>{var a=i(23805);s.exports=function isStrictComparable(s){return s==s&&!a(s)}},30980:(s,o,i)=>{var a=i(39344),u=i(94033);function LazyWrapper(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}LazyWrapper.prototype=a(u.prototype),LazyWrapper.prototype.constructor=LazyWrapper,s.exports=LazyWrapper},31175:(s,o,i)=>{var a=i(26025);s.exports=function listCacheSet(s,o){var i=this.__data__,u=a(i,s);return u<0?(++this.size,i.push([s,o])):i[u][1]=o,this}},31380:s=>{s.exports=function setCacheAdd(s){return this.__data__.set(s,\"__lodash_hash_undefined__\"),this}},31499:s=>{var o={\"&\":\"&amp;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"<\":\"&lt;\",\">\":\"&gt;\"};s.exports=function escapeForXML(s){return s&&s.replace?s.replace(/([&\"<>'])/g,(function(s,i){return o[i]})):s}},31769:(s,o,i)=>{var a=i(56449),u=i(28586),_=i(61802),w=i(13222);s.exports=function castPath(s,o){return a(s)?s:u(s,o)?[s]:_(w(s))}},31800:s=>{var o=/\\s/;s.exports=function trimmedEndIndex(s){for(var i=s.length;i--&&o.test(s.charAt(i)););return i}},32096:(s,o,i)=>{\"use strict\";var a=i(90160);s.exports=function(s,o){return void 0===s?arguments.length<2?\"\":o:a(s)}},32567:(s,o,i)=>{\"use strict\";i(79307);var a=i(61747);s.exports=a(\"Function\",\"bind\")},32629:(s,o,i)=>{var a=i(9999);s.exports=function clone(s){return a(s,4)}},32804:(s,o,i)=>{var a=i(56110)(i(9325),\"Promise\");s.exports=a},32827:(s,o,i)=>{var a=i(56698),u=i(82890),_=i(90392),w=i(92861).Buffer,x=new Array(160);function Sha384(){this.init(),this._w=x,_.call(this,128,112)}a(Sha384,u),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var s=w.allocUnsafe(48);function writeInt64BE(o,i,a){s.writeInt32BE(o,a),s.writeInt32BE(i,a+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),s},s.exports=Sha384},32865:(s,o,i)=>{var a=i(19570),u=i(51811)(a);s.exports=u},33855:(s,o,i)=>{var a=i(9999),u=i(15389);s.exports=function iteratee(s){return u(\"function\"==typeof s?s:a(s,1))}},34035:(s,o,i)=>{const a=i(3110),u=i(86804);o.g$=a,o.KeyValuePair=i(55973),o.G6=u.ArraySlice,o.ot=u.ObjectSlice,o.Hg=u.Element,o.Om=u.StringElement,o.kT=u.NumberElement,o.bd=u.BooleanElement,o.Os=u.NullElement,o.wE=u.ArrayElement,o.Sh=u.ObjectElement,o.Pr=u.MemberElement,o.sI=u.RefElement,o.Ft=u.LinkElement,o.e=u.refract,i(85105),i(75147)},34084:(s,o,i)=>{\"use strict\";var a=i(62250),u=i(46285),_=i(79192);s.exports=function(s,o,i){var w,x;return _&&a(w=o.constructor)&&w!==i&&u(x=w.prototype)&&x!==i.prototype&&_(s,x),s}},34840:(s,o,i)=>{var a=\"object\"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;s.exports=a},34849:(s,o,i)=>{\"use strict\";var a=i(65482),u=Math.max,_=Math.min;s.exports=function(s,o){var i=a(s);return i<0?u(i+o,0):_(i,o)}},34932:s=>{s.exports=function arrayMap(s,o){for(var i=-1,a=null==s?0:s.length,u=Array(a);++i<a;)u[i]=o(s[i],i,s);return u}},35344:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function bash(s){const o={},i={begin:/\\$\\{/,end:/\\}/,contains:[\"self\",{begin:/:-/,contains:[o]}]};Object.assign(o,{className:\"variable\",variants:[{begin:concat(/\\$[\\w\\d#@][\\w\\d_]*/,\"(?![\\\\w\\\\d])(?![$])\")},i]});const a={className:\"subst\",begin:/\\$\\(/,end:/\\)/,contains:[s.BACKSLASH_ESCAPE]},u={begin:/<<-?\\s*(?=\\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\\w+)/,end:/(\\w+)/,className:\"string\"})]}},_={className:\"string\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE,o,a]};a.contains.push(_);const w={begin:/\\$\\(\\(/,end:/\\)\\)/,contains:[{begin:/\\d+#[0-9a-f]+/,className:\"number\"},s.NUMBER_MODE,o]},x=s.SHEBANG({binary:`(${[\"fish\",\"bash\",\"zsh\",\"sh\",\"csh\",\"ksh\",\"tcsh\",\"dash\",\"scsh\"].join(\"|\")})`,relevance:10}),C={className:\"function\",begin:/\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,returnBegin:!0,contains:[s.inherit(s.TITLE_MODE,{begin:/\\w[\\w\\d_]*/})],relevance:0};return{name:\"Bash\",aliases:[\"sh\",\"zsh\"],keywords:{$pattern:/\\b[a-z._-]+\\b/,keyword:\"if then else elif fi for while in do done case esac function\",literal:\"true false\",built_in:\"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp\"},contains:[x,s.SHEBANG(),C,w,s.HASH_COMMENT_MODE,u,_,{className:\"\",begin:/\\\\\"/},{className:\"string\",begin:/'/,end:/'/},o]}}},35529:(s,o,i)=>{var a=i(39344),u=i(28879),_=i(55527);s.exports=function initCloneObject(s){return\"function\"!=typeof s.constructor||_(s)?{}:a(u(s))}},35749:(s,o,i)=>{var a=i(81042);s.exports=function hashSet(s,o){var i=this.__data__;return this.size+=this.has(s)?0:1,i[s]=a&&void 0===o?\"__lodash_hash_undefined__\":o,this}},35970:(s,o,i)=>{var a=i(83120);s.exports=function flatten(s){return(null==s?0:s.length)?a(s,1):[]}},36128:(s,o,i)=>{\"use strict\";var a=i(7376),u=i(45951),_=i(2532),w=\"__core-js_shared__\",x=s.exports=u[w]||_(w,{});(x.versions||(x.versions=[])).push({version:\"3.40.0\",mode:a?\"pure\":\"global\",copyright:\"© 2014-2025 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},36306:s=>{var o=\"__lodash_placeholder__\";s.exports=function replaceHolders(s,i){for(var a=-1,u=s.length,_=0,w=[];++a<u;){var x=s[a];x!==i&&x!==o||(s[a]=o,w[_++]=a)}return w}},36371:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(85582),_=i(76024),w=i(98828),x=i(19358),C=\"AggregateError\",j=u(C),L=!w((function(){return 1!==j([1]).errors[0]}))&&w((function(){return 7!==j([1],C,{cause:7}).cause}));a({global:!0,constructor:!0,arity:2,forced:L},{AggregateError:x(C,(function(s){return function AggregateError(o,i){return _(s,this,arguments)}}),L,!0)})},36624:(s,o,i)=>{\"use strict\";var a=i(46285),u=String,_=TypeError;s.exports=function(s){if(a(s))return s;throw new _(u(s)+\" is not an object\")}},36800:(s,o,i)=>{var a=i(75288),u=i(64894),_=i(30361),w=i(23805);s.exports=function isIterateeCall(s,o,i){if(!w(i))return!1;var x=typeof o;return!!(\"number\"==x?u(i)&&_(o,i.length):\"string\"==x&&o in i)&&a(i[o],s)}},36833:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(49724),_=Function.prototype,w=a&&Object.getOwnPropertyDescriptor,x=u(_,\"name\"),C=x&&\"something\"===function something(){}.name,j=x&&(!a||a&&w(_,\"name\").configurable);s.exports={EXISTS:x,PROPER:C,CONFIGURABLE:j}},37007:s=>{\"use strict\";var o,i=\"object\"==typeof Reflect?Reflect:null,a=i&&\"function\"==typeof i.apply?i.apply:function ReflectApply(s,o,i){return Function.prototype.apply.call(s,o,i)};o=i&&\"function\"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s)};var u=Number.isNaN||function NumberIsNaN(s){return s!=s};function EventEmitter(){EventEmitter.init.call(this)}s.exports=EventEmitter,s.exports.once=function once(s,o){return new Promise((function(i,a){function errorListener(i){s.removeListener(o,resolver),a(i)}function resolver(){\"function\"==typeof s.removeListener&&s.removeListener(\"error\",errorListener),i([].slice.call(arguments))}eventTargetAgnosticAddListener(s,o,resolver,{once:!0}),\"error\"!==o&&function addErrorHandlerIfEventEmitter(s,o,i){\"function\"==typeof s.on&&eventTargetAgnosticAddListener(s,\"error\",o,i)}(s,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var _=10;function checkListener(s){if(\"function\"!=typeof s)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof s)}function _getMaxListeners(s){return void 0===s._maxListeners?EventEmitter.defaultMaxListeners:s._maxListeners}function _addListener(s,o,i,a){var u,_,w;if(checkListener(i),void 0===(_=s._events)?(_=s._events=Object.create(null),s._eventsCount=0):(void 0!==_.newListener&&(s.emit(\"newListener\",o,i.listener?i.listener:i),_=s._events),w=_[o]),void 0===w)w=_[o]=i,++s._eventsCount;else if(\"function\"==typeof w?w=_[o]=a?[i,w]:[w,i]:a?w.unshift(i):w.push(i),(u=_getMaxListeners(s))>0&&w.length>u&&!w.warned){w.warned=!0;var x=new Error(\"Possible EventEmitter memory leak detected. \"+w.length+\" \"+String(o)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");x.name=\"MaxListenersExceededWarning\",x.emitter=s,x.type=o,x.count=w.length,function ProcessEmitWarning(s){console&&console.warn&&console.warn(s)}(x)}return s}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(s,o,i){var a={fired:!1,wrapFn:void 0,target:s,type:o,listener:i},u=onceWrapper.bind(a);return u.listener=i,a.wrapFn=u,u}function _listeners(s,o,i){var a=s._events;if(void 0===a)return[];var u=a[o];return void 0===u?[]:\"function\"==typeof u?i?[u.listener||u]:[u]:i?function unwrapListeners(s){for(var o=new Array(s.length),i=0;i<o.length;++i)o[i]=s[i].listener||s[i];return o}(u):arrayClone(u,u.length)}function listenerCount(s){var o=this._events;if(void 0!==o){var i=o[s];if(\"function\"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function arrayClone(s,o){for(var i=new Array(o),a=0;a<o;++a)i[a]=s[a];return i}function eventTargetAgnosticAddListener(s,o,i,a){if(\"function\"==typeof s.on)a.once?s.once(o,i):s.on(o,i);else{if(\"function\"!=typeof s.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof s);s.addEventListener(o,(function wrapListener(u){a.once&&s.removeEventListener(o,wrapListener),i(u)}))}}Object.defineProperty(EventEmitter,\"defaultMaxListeners\",{enumerable:!0,get:function(){return _},set:function(s){if(\"number\"!=typeof s||s<0||u(s))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+s+\".\");_=s}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(s){if(\"number\"!=typeof s||s<0||u(s))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+s+\".\");return this._maxListeners=s,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(s){for(var o=[],i=1;i<arguments.length;i++)o.push(arguments[i]);var u=\"error\"===s,_=this._events;if(void 0!==_)u=u&&void 0===_.error;else if(!u)return!1;if(u){var w;if(o.length>0&&(w=o[0]),w instanceof Error)throw w;var x=new Error(\"Unhandled error.\"+(w?\" (\"+w.message+\")\":\"\"));throw x.context=w,x}var C=_[s];if(void 0===C)return!1;if(\"function\"==typeof C)a(C,this,o);else{var j=C.length,L=arrayClone(C,j);for(i=0;i<j;++i)a(L[i],this,o)}return!0},EventEmitter.prototype.addListener=function addListener(s,o){return _addListener(this,s,o,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(s,o){return _addListener(this,s,o,!0)},EventEmitter.prototype.once=function once(s,o){return checkListener(o),this.on(s,_onceWrap(this,s,o)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(s,o){return checkListener(o),this.prependListener(s,_onceWrap(this,s,o)),this},EventEmitter.prototype.removeListener=function removeListener(s,o){var i,a,u,_,w;if(checkListener(o),void 0===(a=this._events))return this;if(void 0===(i=a[s]))return this;if(i===o||i.listener===o)0==--this._eventsCount?this._events=Object.create(null):(delete a[s],a.removeListener&&this.emit(\"removeListener\",s,i.listener||o));else if(\"function\"!=typeof i){for(u=-1,_=i.length-1;_>=0;_--)if(i[_]===o||i[_].listener===o){w=i[_].listener,u=_;break}if(u<0)return this;0===u?i.shift():function spliceOne(s,o){for(;o+1<s.length;o++)s[o]=s[o+1];s.pop()}(i,u),1===i.length&&(a[s]=i[0]),void 0!==a.removeListener&&this.emit(\"removeListener\",s,w||o)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(s){var o,i,a;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[s]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[s]),this;if(0===arguments.length){var u,_=Object.keys(i);for(a=0;a<_.length;++a)\"removeListener\"!==(u=_[a])&&this.removeAllListeners(u);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(o=i[s]))this.removeListener(s,o);else if(void 0!==o)for(a=o.length-1;a>=0;a--)this.removeListener(s,o[a]);return this},EventEmitter.prototype.listeners=function listeners(s){return _listeners(this,s,!0)},EventEmitter.prototype.rawListeners=function rawListeners(s){return _listeners(this,s,!1)},EventEmitter.listenerCount=function(s,o){return\"function\"==typeof s.listenerCount?s.listenerCount(o):listenerCount.call(s,o)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?o(this._events):[]}},37167:(s,o,i)=>{var a=i(4901),u=i(27301),_=i(86009),w=_&&_.isTypedArray,x=w?u(w):a;s.exports=x},37217:(s,o,i)=>{var a=i(80079),u=i(51420),_=i(90938),w=i(63605),x=i(29817),C=i(80945);function Stack(s){var o=this.__data__=new a(s);this.size=o.size}Stack.prototype.clear=u,Stack.prototype.delete=_,Stack.prototype.get=w,Stack.prototype.has=x,Stack.prototype.set=C,s.exports=Stack},37241:(s,o,i)=>{var a=i(70695),u=i(72903),_=i(64894);s.exports=function keysIn(s){return _(s)?a(s,!0):u(s)}},37257:(s,o,i)=>{\"use strict\";i(96605),i(64502),i(36371),i(99363),i(7057);var a=i(92046);s.exports=a.AggregateError},37334:s=>{s.exports=function constant(s){return function(){return s}}},37381:(s,o,i)=>{var a=i(48152),u=i(63950),_=a?function(s){return a.get(s)}:u;s.exports=_},37471:(s,o,i)=>{var a=i(91596),u=i(53320),_=i(58523),w=i(82819),x=i(18073),C=i(11287),j=i(68294),L=i(36306),B=i(9325);s.exports=function createHybrid(s,o,i,$,V,U,z,Y,Z,ee){var ie=128&o,ae=1&o,ce=2&o,le=24&o,pe=512&o,de=ce?void 0:w(s);return function wrapper(){for(var fe=arguments.length,ye=Array(fe),be=fe;be--;)ye[be]=arguments[be];if(le)var _e=C(wrapper),Se=_(ye,_e);if($&&(ye=a(ye,$,V,le)),U&&(ye=u(ye,U,z,le)),fe-=Se,le&&fe<ee){var we=L(ye,_e);return x(s,o,createHybrid,wrapper.placeholder,i,ye,we,Y,Z,ee-fe)}var xe=ae?i:this,Pe=ce?xe[s]:s;return fe=ye.length,Y?ye=j(ye,Y):pe&&fe>1&&ye.reverse(),ie&&Z<fe&&(ye.length=Z),this&&this!==B&&this instanceof wrapper&&(Pe=de||w(Pe)),Pe.apply(xe,ye)}}},37812:(s,o,i)=>{\"use strict\";var a=i(76264),u=i(93742),_=a(\"iterator\"),w=Array.prototype;s.exports=function(s){return void 0!==s&&(u.Array===s||w[_]===s)}},37828:(s,o,i)=>{var a=i(9325).Uint8Array;s.exports=a},38221:(s,o,i)=>{var a=i(23805),u=i(10124),_=i(99374),w=Math.max,x=Math.min;s.exports=function debounce(s,o,i){var C,j,L,B,$,V,U=0,z=!1,Y=!1,Z=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(o){var i=C,a=j;return C=j=void 0,U=o,B=s.apply(a,i)}function shouldInvoke(s){var i=s-V;return void 0===V||i>=o||i<0||Y&&s-U>=L}function timerExpired(){var s=u();if(shouldInvoke(s))return trailingEdge(s);$=setTimeout(timerExpired,function remainingWait(s){var i=o-(s-V);return Y?x(i,L-(s-U)):i}(s))}function trailingEdge(s){return $=void 0,Z&&C?invokeFunc(s):(C=j=void 0,B)}function debounced(){var s=u(),i=shouldInvoke(s);if(C=arguments,j=this,V=s,i){if(void 0===$)return function leadingEdge(s){return U=s,$=setTimeout(timerExpired,o),z?invokeFunc(s):B}(V);if(Y)return clearTimeout($),$=setTimeout(timerExpired,o),invokeFunc(V)}return void 0===$&&($=setTimeout(timerExpired,o)),B}return o=_(o)||0,a(i)&&(z=!!i.leading,L=(Y=\"maxWait\"in i)?w(_(i.maxWait)||0,o):L,Z=\"trailing\"in i?!!i.trailing:Z),debounced.cancel=function cancel(){void 0!==$&&clearTimeout($),U=0,C=V=j=$=void 0},debounced.flush=function flush(){return void 0===$?B:trailingEdge(u())},debounced}},38329:(s,o,i)=>{var a=i(64894);s.exports=function createBaseEach(s,o){return function(i,u){if(null==i)return i;if(!a(i))return s(i,u);for(var _=i.length,w=o?_:-1,x=Object(i);(o?w--:++w<_)&&!1!==u(x[w],w,x););return i}}},38440:(s,o,i)=>{var a=i(16038),u=i(27301),_=i(86009),w=_&&_.isSet,x=w?u(w):a;s.exports=x},38530:s=>{\"use strict\";s.exports={}},38816:(s,o,i)=>{var a=i(35970),u=i(56757),_=i(32865);s.exports=function flatRest(s){return _(u(s,void 0,a),s+\"\")}},38859:(s,o,i)=>{var a=i(53661),u=i(31380),_=i(51459);function SetCache(s){var o=-1,i=null==s?0:s.length;for(this.__data__=new a;++o<i;)this.add(s[o])}SetCache.prototype.add=SetCache.prototype.push=u,SetCache.prototype.has=_,s.exports=SetCache},39259:(s,o,i)=>{\"use strict\";var a=i(46285),u=i(61626);s.exports=function(s,o){a(o)&&\"cause\"in o&&u(s,\"cause\",o.cause)}},39298:(s,o,i)=>{\"use strict\";var a=i(74239),u=Object;s.exports=function(s){return u(a(s))}},39344:(s,o,i)=>{var a=i(23805),u=Object.create,_=function(){function object(){}return function(s){if(!a(s))return{};if(u)return u(s);object.prototype=s;var o=new object;return object.prototype=void 0,o}}();s.exports=_},39447:(s,o,i)=>{\"use strict\";var a=i(98828);s.exports=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},40154:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(36624),_=i(29367);s.exports=function(s,o,i){var w,x;u(s);try{if(!(w=_(s,\"return\"))){if(\"throw\"===o)throw i;return i}w=a(w,s)}catch(s){x=!0,w=s}if(\"throw\"===o)throw i;if(x)throw w;return u(w),i}},40239:(s,o,i)=>{const a=i(10316);s.exports=class NumberElement extends a{constructor(s,o,i){super(s,o,i),this.element=\"number\"}primitive(){return\"number\"}}},40345:(s,o,i)=>{s.exports=i(37007).EventEmitter},40346:s=>{s.exports=function isObjectLike(s){return null!=s&&\"object\"==typeof s}},40551:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(62250),_=a.WeakMap;s.exports=u(_)&&/native code/.test(String(_))},40860:(s,o,i)=>{var a=i(40882),u=i(80909),_=i(15389),w=i(85558),x=i(56449);s.exports=function reduce(s,o,i){var C=x(s)?a:w,j=arguments.length<3;return C(s,_(o,4),i,j,u)}},40882:s=>{s.exports=function arrayReduce(s,o,i,a){var u=-1,_=null==s?0:s.length;for(a&&_&&(i=s[++u]);++u<_;)i=o(i,s[u],u,s);return i}},40961:(s,o,i)=>{\"use strict\";!function checkDCE(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(s){console.error(s)}}(),s.exports=i(22551)},40975:(s,o,i)=>{\"use strict\";var a=i(9748);s.exports=a},41067:(s,o,i)=>{const a=i(10316);s.exports=class NullElement extends a{constructor(s,o,i){super(s||null,o,i),this.element=\"null\"}primitive(){return\"null\"}set(){return new Error(\"Cannot set the value of null\")}}},41176:s=>{\"use strict\";var o=Math.ceil,i=Math.floor;s.exports=Math.trunc||function trunc(s){var a=+s;return(a>0?i:o)(a)}},41505:(s,o,i)=>{\"use strict\";var a=i(98828);s.exports=!a((function(){var s=function(){}.bind();return\"function\"!=typeof s||s.hasOwnProperty(\"prototype\")}))},41799:(s,o,i)=>{var a=i(37217),u=i(60270);s.exports=function baseIsMatch(s,o,i,_){var w=i.length,x=w,C=!_;if(null==s)return!x;for(s=Object(s);w--;){var j=i[w];if(C&&j[2]?j[1]!==s[j[0]]:!(j[0]in s))return!1}for(;++w<x;){var L=(j=i[w])[0],B=s[L],$=j[1];if(C&&j[2]){if(void 0===B&&!(L in s))return!1}else{var V=new a;if(_)var U=_(B,$,L,s,o,V);if(!(void 0===U?u($,B,3,_,V):U))return!1}}return!0}},41859:(s,o,i)=>{const a=i(27096),u=i(78004),_=a.types;s.exports=class RandExp{constructor(s,o){if(this._setDefaults(s),s instanceof RegExp)this.ignoreCase=s.ignoreCase,this.multiline=s.multiline,s=s.source;else{if(\"string\"!=typeof s)throw new Error(\"Expected a regexp or string\");this.ignoreCase=o&&-1!==o.indexOf(\"i\"),this.multiline=o&&-1!==o.indexOf(\"m\")}this.tokens=a(s)}_setDefaults(s){this.max=null!=s.max?s.max:null!=RandExp.prototype.max?RandExp.prototype.max:100,this.defaultRange=s.defaultRange?s.defaultRange:this.defaultRange.clone(),s.randInt&&(this.randInt=s.randInt)}gen(){return this._gen(this.tokens,[])}_gen(s,o){var i,a,u,w,x;switch(s.type){case _.ROOT:case _.GROUP:if(s.followedBy||s.notFollowedBy)return\"\";for(s.remember&&void 0===s.groupNumber&&(s.groupNumber=o.push(null)-1),a=\"\",w=0,x=(i=s.options?this._randSelect(s.options):s.stack).length;w<x;w++)a+=this._gen(i[w],o);return s.remember&&(o[s.groupNumber]=a),a;case _.POSITION:return\"\";case _.SET:var C=this._expand(s);return C.length?String.fromCharCode(this._randSelect(C)):\"\";case _.REPETITION:for(u=this.randInt(s.min,s.max===1/0?s.min+this.max:s.max),a=\"\",w=0;w<u;w++)a+=this._gen(s.value,o);return a;case _.REFERENCE:return o[s.value-1]||\"\";case _.CHAR:var j=this.ignoreCase&&this._randBool()?this._toOtherCase(s.value):s.value;return String.fromCharCode(j)}}_toOtherCase(s){return s+(97<=s&&s<=122?-32:65<=s&&s<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(s){return s instanceof u?s.index(this.randInt(0,s.length-1)):s[this.randInt(0,s.length-1)]}_expand(s){if(s.type===a.types.CHAR)return new u(s.value);if(s.type===a.types.RANGE)return new u(s.from,s.to);{let o=new u;for(let i=0;i<s.set.length;i++){let a=this._expand(s.set[i]);if(o.add(a),this.ignoreCase)for(let s=0;s<a.length;s++){let i=a.index(s),u=this._toOtherCase(i);i!==u&&o.add(u)}}return s.not?this.defaultRange.clone().subtract(o):this.defaultRange.clone().intersect(o)}}randInt(s,o){return s+Math.floor(Math.random()*(1+o-s))}get defaultRange(){return this._range=this._range||new u(32,126)}set defaultRange(s){this._range=s}static randexp(s,o){var i;return\"string\"==typeof s&&(s=new RegExp(s,o)),void 0===s._randexp?(i=new RandExp(s,o),s._randexp=i):(i=s._randexp)._setDefaults(s),i.gen()}static sugar(){RegExp.prototype.gen=function(){return RandExp.randexp(this)}}}},42054:s=>{var o=\"\\\\ud800-\\\\udfff\",i=\"[\"+o+\"]\",a=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",u=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",_=\"[^\"+o+\"]\",w=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",x=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",C=\"(?:\"+a+\"|\"+u+\")\"+\"?\",j=\"[\\\\ufe0e\\\\ufe0f]?\",L=j+C+(\"(?:\\\\u200d(?:\"+[_,w,x].join(\"|\")+\")\"+j+C+\")*\"),B=\"(?:\"+[_+a+\"?\",a,w,x,i].join(\"|\")+\")\",$=RegExp(u+\"(?=\"+u+\")|\"+B+L,\"g\");s.exports=function unicodeToArray(s){return s.match($)||[]}},42072:(s,o,i)=>{var a=i(34932),u=i(23007),_=i(56449),w=i(44394),x=i(61802),C=i(77797),j=i(13222);s.exports=function toPath(s){return _(s)?a(s,C):w(s)?[s]:u(x(j(s)))}},42156:s=>{\"use strict\";s.exports=function(){}},42220:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(58661),_=i(74284),w=i(36624),x=i(4993),C=i(2875);o.f=a&&!u?Object.defineProperties:function defineProperties(s,o){w(s);for(var i,a=x(o),u=C(o),j=u.length,L=0;j>L;)_.f(s,i=u[L++],a[i]);return s}},42426:(s,o,i)=>{var a=i(14248),u=i(15389),_=i(90916),w=i(56449),x=i(36800);s.exports=function some(s,o,i){var C=w(s)?a:_;return i&&x(s,o,i)&&(o=void 0),C(s,u(o,3))}},42824:(s,o,i)=>{var a=i(87805),u=i(93290),_=i(71961),w=i(23007),x=i(35529),C=i(72428),j=i(56449),L=i(83693),B=i(3656),$=i(1882),V=i(23805),U=i(11331),z=i(37167),Y=i(14974),Z=i(69884);s.exports=function baseMergeDeep(s,o,i,ee,ie,ae,ce){var le=Y(s,i),pe=Y(o,i),de=ce.get(pe);if(de)a(s,i,de);else{var fe=ae?ae(le,pe,i+\"\",s,o,ce):void 0,ye=void 0===fe;if(ye){var be=j(pe),_e=!be&&B(pe),Se=!be&&!_e&&z(pe);fe=pe,be||_e||Se?j(le)?fe=le:L(le)?fe=w(le):_e?(ye=!1,fe=u(pe,!0)):Se?(ye=!1,fe=_(pe,!0)):fe=[]:U(pe)||C(pe)?(fe=le,C(le)?fe=Z(le):V(le)&&!$(le)||(fe=x(pe))):ye=!1}ye&&(ce.set(pe,fe),ie(fe,pe,ee,ae,ce),ce.delete(pe)),a(s,i,fe)}}},43360:(s,o,i)=>{var a=i(93243);s.exports=function baseAssignValue(s,o,i){\"__proto__\"==o&&a?a(s,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):s[o]=i}},43768:(s,o,i)=>{\"use strict\";var a=i(45981),u=i(85587);o.highlight=highlight,o.highlightAuto=function highlightAuto(s,o){var i,w,x,C,j=o||{},L=j.subset||a.listLanguages(),B=j.prefix,$=L.length,V=-1;null==B&&(B=_);if(\"string\"!=typeof s)throw u(\"Expected `string` for value, got `%s`\",s);w={relevance:0,language:null,value:[]},i={relevance:0,language:null,value:[]};for(;++V<$;)C=L[V],a.getLanguage(C)&&((x=highlight(C,s,o)).language=C,x.relevance>w.relevance&&(w=x),x.relevance>i.relevance&&(w=i,i=x));w.language&&(i.secondBest=w);return i},o.registerLanguage=function registerLanguage(s,o){a.registerLanguage(s,o)},o.listLanguages=function listLanguages(){return a.listLanguages()},o.registerAlias=function registerAlias(s,o){var i,u=s;o&&((u={})[s]=o);for(i in u)a.registerAliases(u[i],{languageName:i})},Emitter.prototype.addText=function text(s){var o,i,a=this.stack;if(\"\"===s)return;o=a[a.length-1],(i=o.children[o.children.length-1])&&\"text\"===i.type?i.value+=s:o.children.push({type:\"text\",value:s})},Emitter.prototype.addKeyword=function addKeyword(s,o){this.openNode(o),this.addText(s),this.closeNode()},Emitter.prototype.addSublanguage=function addSublanguage(s,o){var i=this.stack,a=i[i.length-1],u=s.rootNode.children,_=o?{type:\"element\",tagName:\"span\",properties:{className:[o]},children:u}:u;a.children=a.children.concat(_)},Emitter.prototype.openNode=function open(s){var o=this.stack,i=this.options.classPrefix+s,a=o[o.length-1],u={type:\"element\",tagName:\"span\",properties:{className:[i]},children:[]};a.children.push(u),o.push(u)},Emitter.prototype.closeNode=function close(){this.stack.pop()},Emitter.prototype.closeAllNodes=noop,Emitter.prototype.finalize=noop,Emitter.prototype.toHTML=function toHtmlNoop(){return\"\"};var _=\"hljs-\";function highlight(s,o,i){var w,x=a.configure({}),C=(i||{}).prefix;if(\"string\"!=typeof s)throw u(\"Expected `string` for name, got `%s`\",s);if(!a.getLanguage(s))throw u(\"Unknown language: `%s` is not registered\",s);if(\"string\"!=typeof o)throw u(\"Expected `string` for value, got `%s`\",o);if(null==C&&(C=_),a.configure({__emitter:Emitter,classPrefix:C}),w=a.highlight(o,{language:s,ignoreIllegals:!0}),a.configure(x||{}),w.errorRaised)throw w.errorRaised;return{relevance:w.relevance,language:w.language,value:w.emitter.rootNode.children}}function Emitter(s){this.options=s,this.rootNode={children:[]},this.stack=[this.rootNode]}function noop(){}},43838:(s,o,i)=>{var a=i(21791),u=i(37241);s.exports=function baseAssignIn(s,o){return s&&a(o,u(o),s)}},44394:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function isSymbol(s){return\"symbol\"==typeof s||u(s)&&\"[object Symbol]\"==a(s)}},44673:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(82159),_=i(46285),w=i(49724),x=i(93427),C=i(41505),j=Function,L=a([].concat),B=a([].join),$={};s.exports=C?j.bind:function bind(s){var o=u(this),i=o.prototype,a=x(arguments,1),C=function bound(){var i=L(a,x(arguments));return this instanceof C?function(s,o,i){if(!w($,o)){for(var a=[],u=0;u<o;u++)a[u]=\"a[\"+u+\"]\";$[o]=j(\"C,a\",\"return new C(\"+B(a,\",\")+\")\")}return $[o](s,i)}(o,i.length,i):o.apply(s,i)};return _(i)&&(C.prototype=i),C}},45083:(s,o,i)=>{var a=i(1882),u=i(87296),_=i(23805),w=i(47473),x=/^\\[object .+?Constructor\\]$/,C=Function.prototype,j=Object.prototype,L=C.toString,B=j.hasOwnProperty,$=RegExp(\"^\"+L.call(B).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");s.exports=function baseIsNative(s){return!(!_(s)||u(s))&&(a(s)?$:x).test(w(s))}},45412:(s,o,i)=>{\"use strict\";var a,u=i(65606);s.exports=Readable,Readable.ReadableState=ReadableState;i(37007).EventEmitter;var _=function EElistenerCount(s,o){return s.listeners(o).length},w=i(40345),x=i(48287).Buffer,C=(void 0!==i.g?i.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var j,L=i(79838);j=L&&L.debuglog?L.debuglog(\"stream\"):function debug(){};var B,$,V,U=i(80345),z=i(75896),Y=i(65291).getHighWaterMark,Z=i(86048).F,ee=Z.ERR_INVALID_ARG_TYPE,ie=Z.ERR_STREAM_PUSH_AFTER_EOF,ae=Z.ERR_METHOD_NOT_IMPLEMENTED,ce=Z.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(56698)(Readable,w);var le=z.errorOrDestroy,pe=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function ReadableState(s,o,u){a=a||i(25382),s=s||{},\"boolean\"!=typeof u&&(u=o instanceof a),this.objectMode=!!s.objectMode,u&&(this.objectMode=this.objectMode||!!s.readableObjectMode),this.highWaterMark=Y(this,s,\"readableHighWaterMark\",u),this.buffer=new U,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.destroyed=!1,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,s.encoding&&(B||(B=i(83141).I),this.decoder=new B(s.encoding),this.encoding=s.encoding)}function Readable(s){if(a=a||i(25382),!(this instanceof Readable))return new Readable(s);var o=this instanceof a;this._readableState=new ReadableState(s,this,o),this.readable=!0,s&&(\"function\"==typeof s.read&&(this._read=s.read),\"function\"==typeof s.destroy&&(this._destroy=s.destroy)),w.call(this)}function readableAddChunk(s,o,i,a,u){j(\"readableAddChunk\",o);var _,w=s._readableState;if(null===o)w.reading=!1,function onEofChunk(s,o){if(j(\"onEofChunk\"),o.ended)return;if(o.decoder){var i=o.decoder.end();i&&i.length&&(o.buffer.push(i),o.length+=o.objectMode?1:i.length)}o.ended=!0,o.sync?emitReadable(s):(o.needReadable=!1,o.emittedReadable||(o.emittedReadable=!0,emitReadable_(s)))}(s,w);else if(u||(_=function chunkInvalid(s,o){var i;(function _isUint8Array(s){return x.isBuffer(s)||s instanceof C})(o)||\"string\"==typeof o||void 0===o||s.objectMode||(i=new ee(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],o));return i}(w,o)),_)le(s,_);else if(w.objectMode||o&&o.length>0)if(\"string\"==typeof o||w.objectMode||Object.getPrototypeOf(o)===x.prototype||(o=function _uint8ArrayToBuffer(s){return x.from(s)}(o)),a)w.endEmitted?le(s,new ce):addChunk(s,w,o,!0);else if(w.ended)le(s,new ie);else{if(w.destroyed)return!1;w.reading=!1,w.decoder&&!i?(o=w.decoder.write(o),w.objectMode||0!==o.length?addChunk(s,w,o,!1):maybeReadMore(s,w)):addChunk(s,w,o,!1)}else a||(w.reading=!1,maybeReadMore(s,w));return!w.ended&&(w.length<w.highWaterMark||0===w.length)}function addChunk(s,o,i,a){o.flowing&&0===o.length&&!o.sync?(o.awaitDrain=0,s.emit(\"data\",i)):(o.length+=o.objectMode?1:i.length,a?o.buffer.unshift(i):o.buffer.push(i),o.needReadable&&emitReadable(s)),maybeReadMore(s,o)}Object.defineProperty(Readable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(s){this._readableState&&(this._readableState.destroyed=s)}}),Readable.prototype.destroy=z.destroy,Readable.prototype._undestroy=z.undestroy,Readable.prototype._destroy=function(s,o){o(s)},Readable.prototype.push=function(s,o){var i,a=this._readableState;return a.objectMode?i=!0:\"string\"==typeof s&&((o=o||a.defaultEncoding)!==a.encoding&&(s=x.from(s,o),o=\"\"),i=!0),readableAddChunk(this,s,o,!1,i)},Readable.prototype.unshift=function(s){return readableAddChunk(this,s,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(s){B||(B=i(83141).I);var o=new B(s);this._readableState.decoder=o,this._readableState.encoding=this._readableState.decoder.encoding;for(var a=this._readableState.buffer.head,u=\"\";null!==a;)u+=o.write(a.data),a=a.next;return this._readableState.buffer.clear(),\"\"!==u&&this._readableState.buffer.push(u),this._readableState.length=u.length,this};var de=1073741824;function howMuchToRead(s,o){return s<=0||0===o.length&&o.ended?0:o.objectMode?1:s!=s?o.flowing&&o.length?o.buffer.head.data.length:o.length:(s>o.highWaterMark&&(o.highWaterMark=function computeNewHighWaterMark(s){return s>=de?s=de:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}(s)),s<=o.length?s:o.ended?o.length:(o.needReadable=!0,0))}function emitReadable(s){var o=s._readableState;j(\"emitReadable\",o.needReadable,o.emittedReadable),o.needReadable=!1,o.emittedReadable||(j(\"emitReadable\",o.flowing),o.emittedReadable=!0,u.nextTick(emitReadable_,s))}function emitReadable_(s){var o=s._readableState;j(\"emitReadable_\",o.destroyed,o.length,o.ended),o.destroyed||!o.length&&!o.ended||(s.emit(\"readable\"),o.emittedReadable=!1),o.needReadable=!o.flowing&&!o.ended&&o.length<=o.highWaterMark,flow(s)}function maybeReadMore(s,o){o.readingMore||(o.readingMore=!0,u.nextTick(maybeReadMore_,s,o))}function maybeReadMore_(s,o){for(;!o.reading&&!o.ended&&(o.length<o.highWaterMark||o.flowing&&0===o.length);){var i=o.length;if(j(\"maybeReadMore read 0\"),s.read(0),i===o.length)break}o.readingMore=!1}function updateReadableListening(s){var o=s._readableState;o.readableListening=s.listenerCount(\"readable\")>0,o.resumeScheduled&&!o.paused?o.flowing=!0:s.listenerCount(\"data\")>0&&s.resume()}function nReadingNextTick(s){j(\"readable nexttick read 0\"),s.read(0)}function resume_(s,o){j(\"resume\",o.reading),o.reading||s.read(0),o.resumeScheduled=!1,s.emit(\"resume\"),flow(s),o.flowing&&!o.reading&&s.read(0)}function flow(s){var o=s._readableState;for(j(\"flow\",o.flowing);o.flowing&&null!==s.read(););}function fromList(s,o){return 0===o.length?null:(o.objectMode?i=o.buffer.shift():!s||s>=o.length?(i=o.decoder?o.buffer.join(\"\"):1===o.buffer.length?o.buffer.first():o.buffer.concat(o.length),o.buffer.clear()):i=o.buffer.consume(s,o.decoder),i);var i}function endReadable(s){var o=s._readableState;j(\"endReadable\",o.endEmitted),o.endEmitted||(o.ended=!0,u.nextTick(endReadableNT,o,s))}function endReadableNT(s,o){if(j(\"endReadableNT\",s.endEmitted,s.length),!s.endEmitted&&0===s.length&&(s.endEmitted=!0,o.readable=!1,o.emit(\"end\"),s.autoDestroy)){var i=o._writableState;(!i||i.autoDestroy&&i.finished)&&o.destroy()}}function indexOf(s,o){for(var i=0,a=s.length;i<a;i++)if(s[i]===o)return i;return-1}Readable.prototype.read=function(s){j(\"read\",s),s=parseInt(s,10);var o=this._readableState,i=s;if(0!==s&&(o.emittedReadable=!1),0===s&&o.needReadable&&((0!==o.highWaterMark?o.length>=o.highWaterMark:o.length>0)||o.ended))return j(\"read: emitReadable\",o.length,o.ended),0===o.length&&o.ended?endReadable(this):emitReadable(this),null;if(0===(s=howMuchToRead(s,o))&&o.ended)return 0===o.length&&endReadable(this),null;var a,u=o.needReadable;return j(\"need readable\",u),(0===o.length||o.length-s<o.highWaterMark)&&j(\"length less than watermark\",u=!0),o.ended||o.reading?j(\"reading or ended\",u=!1):u&&(j(\"do read\"),o.reading=!0,o.sync=!0,0===o.length&&(o.needReadable=!0),this._read(o.highWaterMark),o.sync=!1,o.reading||(s=howMuchToRead(i,o))),null===(a=s>0?fromList(s,o):null)?(o.needReadable=o.length<=o.highWaterMark,s=0):(o.length-=s,o.awaitDrain=0),0===o.length&&(o.ended||(o.needReadable=!0),i!==s&&o.ended&&endReadable(this)),null!==a&&this.emit(\"data\",a),a},Readable.prototype._read=function(s){le(this,new ae(\"_read()\"))},Readable.prototype.pipe=function(s,o){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=s;break;case 1:a.pipes=[a.pipes,s];break;default:a.pipes.push(s)}a.pipesCount+=1,j(\"pipe count=%d opts=%j\",a.pipesCount,o);var w=(!o||!1!==o.end)&&s!==u.stdout&&s!==u.stderr?onend:unpipe;function onunpipe(o,u){j(\"onunpipe\"),o===i&&u&&!1===u.hasUnpiped&&(u.hasUnpiped=!0,function cleanup(){j(\"cleanup\"),s.removeListener(\"close\",onclose),s.removeListener(\"finish\",onfinish),s.removeListener(\"drain\",x),s.removeListener(\"error\",onerror),s.removeListener(\"unpipe\",onunpipe),i.removeListener(\"end\",onend),i.removeListener(\"end\",unpipe),i.removeListener(\"data\",ondata),C=!0,!a.awaitDrain||s._writableState&&!s._writableState.needDrain||x()}())}function onend(){j(\"onend\"),s.end()}a.endEmitted?u.nextTick(w):i.once(\"end\",w),s.on(\"unpipe\",onunpipe);var x=function pipeOnDrain(s){return function pipeOnDrainFunctionResult(){var o=s._readableState;j(\"pipeOnDrain\",o.awaitDrain),o.awaitDrain&&o.awaitDrain--,0===o.awaitDrain&&_(s,\"data\")&&(o.flowing=!0,flow(s))}}(i);s.on(\"drain\",x);var C=!1;function ondata(o){j(\"ondata\");var u=s.write(o);j(\"dest.write\",u),!1===u&&((1===a.pipesCount&&a.pipes===s||a.pipesCount>1&&-1!==indexOf(a.pipes,s))&&!C&&(j(\"false write response, pause\",a.awaitDrain),a.awaitDrain++),i.pause())}function onerror(o){j(\"onerror\",o),unpipe(),s.removeListener(\"error\",onerror),0===_(s,\"error\")&&le(s,o)}function onclose(){s.removeListener(\"finish\",onfinish),unpipe()}function onfinish(){j(\"onfinish\"),s.removeListener(\"close\",onclose),unpipe()}function unpipe(){j(\"unpipe\"),i.unpipe(s)}return i.on(\"data\",ondata),function prependListener(s,o,i){if(\"function\"==typeof s.prependListener)return s.prependListener(o,i);s._events&&s._events[o]?Array.isArray(s._events[o])?s._events[o].unshift(i):s._events[o]=[i,s._events[o]]:s.on(o,i)}(s,\"error\",onerror),s.once(\"close\",onclose),s.once(\"finish\",onfinish),s.emit(\"pipe\",i),a.flowing||(j(\"pipe resume\"),i.resume()),s},Readable.prototype.unpipe=function(s){var o=this._readableState,i={hasUnpiped:!1};if(0===o.pipesCount)return this;if(1===o.pipesCount)return s&&s!==o.pipes||(s||(s=o.pipes),o.pipes=null,o.pipesCount=0,o.flowing=!1,s&&s.emit(\"unpipe\",this,i)),this;if(!s){var a=o.pipes,u=o.pipesCount;o.pipes=null,o.pipesCount=0,o.flowing=!1;for(var _=0;_<u;_++)a[_].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var w=indexOf(o.pipes,s);return-1===w||(o.pipes.splice(w,1),o.pipesCount-=1,1===o.pipesCount&&(o.pipes=o.pipes[0]),s.emit(\"unpipe\",this,i)),this},Readable.prototype.on=function(s,o){var i=w.prototype.on.call(this,s,o),a=this._readableState;return\"data\"===s?(a.readableListening=this.listenerCount(\"readable\")>0,!1!==a.flowing&&this.resume()):\"readable\"===s&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,j(\"on readable\",a.length,a.reading),a.length?emitReadable(this):a.reading||u.nextTick(nReadingNextTick,this))),i},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(s,o){var i=w.prototype.removeListener.call(this,s,o);return\"readable\"===s&&u.nextTick(updateReadableListening,this),i},Readable.prototype.removeAllListeners=function(s){var o=w.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==s&&void 0!==s||u.nextTick(updateReadableListening,this),o},Readable.prototype.resume=function(){var s=this._readableState;return s.flowing||(j(\"resume\"),s.flowing=!s.readableListening,function resume(s,o){o.resumeScheduled||(o.resumeScheduled=!0,u.nextTick(resume_,s,o))}(this,s)),s.paused=!1,this},Readable.prototype.pause=function(){return j(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(j(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(s){var o=this,i=this._readableState,a=!1;for(var u in s.on(\"end\",(function(){if(j(\"wrapped end\"),i.decoder&&!i.ended){var s=i.decoder.end();s&&s.length&&o.push(s)}o.push(null)})),s.on(\"data\",(function(u){(j(\"wrapped data\"),i.decoder&&(u=i.decoder.write(u)),i.objectMode&&null==u)||(i.objectMode||u&&u.length)&&(o.push(u)||(a=!0,s.pause()))})),s)void 0===this[u]&&\"function\"==typeof s[u]&&(this[u]=function methodWrap(o){return function methodWrapReturnFunction(){return s[o].apply(s,arguments)}}(u));for(var _=0;_<pe.length;_++)s.on(pe[_],this.emit.bind(this,pe[_]));return this._read=function(o){j(\"wrapped _read\",o),a&&(a=!1,s.resume())},this},\"function\"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===$&&($=i(2955)),$(this)}),Object.defineProperty(Readable.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,\"readableBuffer\",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,\"readableFlowing\",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(s){this._readableState&&(this._readableState.flowing=s)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,\"readableLength\",{enumerable:!1,get:function get(){return this._readableState.length}}),\"function\"==typeof Symbol&&(Readable.from=function(s,o){return void 0===V&&(V=i(55157)),V(Readable,s,o)})},45434:s=>{var o=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;s.exports=function hasUnicodeWord(s){return o.test(s)}},45539:(s,o,i)=>{var a=i(40882),u=i(50828),_=i(66645),w=RegExp(\"['’]\",\"g\");s.exports=function createCompounder(s){return function(o){return a(_(u(o).replace(w,\"\")),s,\"\")}}},45807:(s,o,i)=>{\"use strict\";var a=i(1907),u=a({}.toString),_=a(\"\".slice);s.exports=function(s){return _(u(s),8,-1)}},45891:(s,o,i)=>{var a=i(51873),u=i(72428),_=i(56449),w=a?a.isConcatSpreadable:void 0;s.exports=function isFlattenable(s){return _(s)||u(s)||!!(w&&s&&s[w])}},45951:function(s,o,i){\"use strict\";var check=function(s){return s&&s.Math===Math&&s};s.exports=check(\"object\"==typeof globalThis&&globalThis)||check(\"object\"==typeof window&&window)||check(\"object\"==typeof self&&self)||check(\"object\"==typeof i.g&&i.g)||check(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()},45981:s=>{function deepFreeze(s){return s instanceof Map?s.clear=s.delete=s.set=function(){throw new Error(\"map is read-only\")}:s instanceof Set&&(s.add=s.clear=s.delete=function(){throw new Error(\"set is read-only\")}),Object.freeze(s),Object.getOwnPropertyNames(s).forEach((function(o){var i=s[o];\"object\"!=typeof i||Object.isFrozen(i)||deepFreeze(i)})),s}var o=deepFreeze,i=deepFreeze;o.default=i;class Response{constructor(s){void 0===s.data&&(s.data={}),this.data=s.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(s){return s.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#x27;\")}function inherit(s,...o){const i=Object.create(null);for(const o in s)i[o]=s[o];return o.forEach((function(s){for(const o in s)i[o]=s[o]})),i}const emitsWrappingTags=s=>!!s.kind;class HTMLRenderer{constructor(s,o){this.buffer=\"\",this.classPrefix=o.classPrefix,s.walk(this)}addText(s){this.buffer+=escapeHTML(s)}openNode(s){if(!emitsWrappingTags(s))return;let o=s.kind;s.sublanguage||(o=`${this.classPrefix}${o}`),this.span(o)}closeNode(s){emitsWrappingTags(s)&&(this.buffer+=\"</span>\")}value(){return this.buffer}span(s){this.buffer+=`<span class=\"${s}\">`}}class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(s){this.top.children.push(s)}openNode(s){const o={kind:s,children:[]};this.add(o),this.stack.push(o)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(s){return this.constructor._walk(s,this.rootNode)}static _walk(s,o){return\"string\"==typeof o?s.addText(o):o.children&&(s.openNode(o),o.children.forEach((o=>this._walk(s,o))),s.closeNode(o)),s}static _collapse(s){\"string\"!=typeof s&&s.children&&(s.children.every((s=>\"string\"==typeof s))?s.children=[s.children.join(\"\")]:s.children.forEach((s=>{TokenTree._collapse(s)})))}}class TokenTreeEmitter extends TokenTree{constructor(s){super(),this.options=s}addKeyword(s,o){\"\"!==s&&(this.openNode(o),this.addText(s),this.closeNode())}addText(s){\"\"!==s&&this.add(s)}addSublanguage(s,o){const i=s.root;i.kind=o,i.sublanguage=!0,this.add(i)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return!0}}function source(s){return s?\"string\"==typeof s?s:s.source:null}const a=/\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;const u=\"[a-zA-Z]\\\\w*\",_=\"[a-zA-Z_]\\\\w*\",w=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",x=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",C=\"\\\\b(0b[01]+)\",j={begin:\"\\\\\\\\[\\\\s\\\\S]\",relevance:0},L={className:\"string\",begin:\"'\",end:\"'\",illegal:\"\\\\n\",contains:[j]},B={className:\"string\",begin:'\"',end:'\"',illegal:\"\\\\n\",contains:[j]},$={begin:/\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/},COMMENT=function(s,o,i={}){const a=inherit({className:\"comment\",begin:s,end:o,contains:[]},i);return a.contains.push($),a.contains.push({className:\"doctag\",begin:\"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):\",relevance:0}),a},V=COMMENT(\"//\",\"$\"),U=COMMENT(\"/\\\\*\",\"\\\\*/\"),z=COMMENT(\"#\",\"$\"),Y={className:\"number\",begin:w,relevance:0},Z={className:\"number\",begin:x,relevance:0},ee={className:\"number\",begin:C,relevance:0},ie={className:\"number\",begin:w+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",relevance:0},ae={begin:/(?=\\/[^/\\n]*\\/)/,contains:[{className:\"regexp\",begin:/\\//,end:/\\/[gimuy]*/,illegal:/\\n/,contains:[j,{begin:/\\[/,end:/\\]/,relevance:0,contains:[j]}]}]},ce={className:\"title\",begin:u,relevance:0},le={className:\"title\",begin:_,relevance:0},pe={begin:\"\\\\.\\\\s*\"+_,relevance:0};var de=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\\b\\B/,IDENT_RE:u,UNDERSCORE_IDENT_RE:_,NUMBER_RE:w,C_NUMBER_RE:x,BINARY_NUMBER_RE:C,RE_STARTERS_RE:\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",SHEBANG:(s={})=>{const o=/^#![ ]*\\//;return s.binary&&(s.begin=function concat(...s){return s.map((s=>source(s))).join(\"\")}(o,/.*\\b/,s.binary,/\\b.*/)),inherit({className:\"meta\",begin:o,end:/$/,relevance:0,\"on:begin\":(s,o)=>{0!==s.index&&o.ignoreMatch()}},s)},BACKSLASH_ESCAPE:j,APOS_STRING_MODE:L,QUOTE_STRING_MODE:B,PHRASAL_WORDS_MODE:$,COMMENT,C_LINE_COMMENT_MODE:V,C_BLOCK_COMMENT_MODE:U,HASH_COMMENT_MODE:z,NUMBER_MODE:Y,C_NUMBER_MODE:Z,BINARY_NUMBER_MODE:ee,CSS_NUMBER_MODE:ie,REGEXP_MODE:ae,TITLE_MODE:ce,UNDERSCORE_TITLE_MODE:le,METHOD_GUARD:pe,END_SAME_AS_BEGIN:function(s){return Object.assign(s,{\"on:begin\":(s,o)=>{o.data._beginMatch=s[1]},\"on:end\":(s,o)=>{o.data._beginMatch!==s[1]&&o.ignoreMatch()}})}});function skipIfhasPrecedingDot(s,o){\".\"===s.input[s.index-1]&&o.ignoreMatch()}function beginKeywords(s,o){o&&s.beginKeywords&&(s.begin=\"\\\\b(\"+s.beginKeywords.split(\" \").join(\"|\")+\")(?!\\\\.)(?=\\\\b|\\\\s)\",s.__beforeBegin=skipIfhasPrecedingDot,s.keywords=s.keywords||s.beginKeywords,delete s.beginKeywords,void 0===s.relevance&&(s.relevance=0))}function compileIllegal(s,o){Array.isArray(s.illegal)&&(s.illegal=function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}(...s.illegal))}function compileMatch(s,o){if(s.match){if(s.begin||s.end)throw new Error(\"begin & end are not supported with match\");s.begin=s.match,delete s.match}}function compileRelevance(s,o){void 0===s.relevance&&(s.relevance=1)}const fe=[\"of\",\"and\",\"for\",\"in\",\"not\",\"or\",\"if\",\"then\",\"parent\",\"list\",\"value\"];function compileKeywords(s,o,i=\"keyword\"){const a={};return\"string\"==typeof s?compileList(i,s.split(\" \")):Array.isArray(s)?compileList(i,s):Object.keys(s).forEach((function(i){Object.assign(a,compileKeywords(s[i],o,i))})),a;function compileList(s,i){o&&(i=i.map((s=>s.toLowerCase()))),i.forEach((function(o){const i=o.split(\"|\");a[i[0]]=[s,scoreForKeyword(i[0],i[1])]}))}}function scoreForKeyword(s,o){return o?Number(o):function commonKeyword(s){return fe.includes(s.toLowerCase())}(s)?0:1}function compileLanguage(s,{plugins:o}){function langRe(o,i){return new RegExp(source(o),\"m\"+(s.case_insensitive?\"i\":\"\")+(i?\"g\":\"\"))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,o){o.position=this.position++,this.matchIndexes[this.matchAt]=o,this.regexes.push([o,s]),this.matchAt+=function countMatchGroups(s){return new RegExp(s.toString()+\"|\").exec(\"\").length-1}(s)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const s=this.regexes.map((s=>s[1]));this.matcherRe=langRe(function join(s,o=\"|\"){let i=0;return s.map((s=>{i+=1;const o=i;let u=source(s),_=\"\";for(;u.length>0;){const s=a.exec(u);if(!s){_+=u;break}_+=u.substring(0,s.index),u=u.substring(s.index+s[0].length),\"\\\\\"===s[0][0]&&s[1]?_+=\"\\\\\"+String(Number(s[1])+o):(_+=s[0],\"(\"===s[0]&&i++)}return _})).map((s=>`(${s})`)).join(o)}(s),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const o=this.matcherRe.exec(s);if(!o)return null;const i=o.findIndex(((s,o)=>o>0&&void 0!==s)),a=this.matchIndexes[i];return o.splice(0,i),Object.assign(o,a)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const o=new MultiRegex;return this.rules.slice(s).forEach((([s,i])=>o.addRule(s,i))),o.compile(),this.multiRegexes[s]=o,o}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(s,o){this.rules.push([s,o]),\"begin\"===o.type&&this.count++}exec(s){const o=this.getMatcher(this.regexIndex);o.lastIndex=this.lastIndex;let i=o.exec(s);if(this.resumingScanAtSamePosition())if(i&&i.index===this.lastIndex);else{const o=this.getMatcher(0);o.lastIndex=this.lastIndex+1,i=o.exec(s)}return i&&(this.regexIndex+=i.position+1,this.regexIndex===this.count&&this.considerAll()),i}}if(s.compilerExtensions||(s.compilerExtensions=[]),s.contains&&s.contains.includes(\"self\"))throw new Error(\"ERR: contains `self` is not supported at the top-level of a language.  See documentation.\");return s.classNameAliases=inherit(s.classNameAliases||{}),function compileMode(o,i){const a=o;if(o.isCompiled)return a;[compileMatch].forEach((s=>s(o,i))),s.compilerExtensions.forEach((s=>s(o,i))),o.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach((s=>s(o,i))),o.isCompiled=!0;let u=null;if(\"object\"==typeof o.keywords&&(u=o.keywords.$pattern,delete o.keywords.$pattern),o.keywords&&(o.keywords=compileKeywords(o.keywords,s.case_insensitive)),o.lexemes&&u)throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");return u=u||o.lexemes||/\\w+/,a.keywordPatternRe=langRe(u,!0),i&&(o.begin||(o.begin=/\\B|\\b/),a.beginRe=langRe(o.begin),o.endSameAsBegin&&(o.end=o.begin),o.end||o.endsWithParent||(o.end=/\\B|\\b/),o.end&&(a.endRe=langRe(o.end)),a.terminatorEnd=source(o.end)||\"\",o.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(o.end?\"|\":\"\")+i.terminatorEnd)),o.illegal&&(a.illegalRe=langRe(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(s){return function expandOrCloneMode(s){s.variants&&!s.cachedVariants&&(s.cachedVariants=s.variants.map((function(o){return inherit(s,{variants:null},o)})));if(s.cachedVariants)return s.cachedVariants;if(dependencyOnParent(s))return inherit(s,{starts:s.starts?inherit(s.starts):null});if(Object.isFrozen(s))return inherit(s);return s}(\"self\"===s?o:s)}))),o.contains.forEach((function(s){compileMode(s,a)})),o.starts&&compileMode(o.starts,i),a.matcher=function buildModeRegex(s){const o=new ResumableMultiRegex;return s.contains.forEach((s=>o.addRule(s.begin,{rule:s,type:\"begin\"}))),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:\"end\"}),s.illegal&&o.addRule(s.illegal,{type:\"illegal\"}),o}(a),a}(s)}function dependencyOnParent(s){return!!s&&(s.endsWithParent||dependencyOnParent(s.starts))}function BuildVuePlugin(s){const o={props:[\"language\",\"code\",\"autodetect\"],data:function(){return{detectedLanguage:\"\",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?\"\":\"hljs \"+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!s.getLanguage(this.language))return console.warn(`The language \"${this.language}\" you specified could not be found.`),this.unknownLanguage=!0,escapeHTML(this.code);let o={};return this.autoDetect?(o=s.highlightAuto(this.code),this.detectedLanguage=o.language):(o=s.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),o.value},autoDetect(){return!this.language||function hasValueOrEmptyAttribute(s){return Boolean(s||\"\"===s)}(this.autodetect)},ignoreIllegals:()=>!0},render(s){return s(\"pre\",{},[s(\"code\",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:o,VuePlugin:{install(s){s.component(\"highlightjs\",o)}}}}const ye={\"after:highlightElement\":({el:s,result:o,text:i})=>{const a=nodeStream(s);if(!a.length)return;const u=document.createElement(\"div\");u.innerHTML=o.value,o.value=function mergeStreams(s,o,i){let a=0,u=\"\";const _=[];function selectStream(){return s.length&&o.length?s[0].offset!==o[0].offset?s[0].offset<o[0].offset?s:o:\"start\"===o[0].event?s:o:s.length?s:o}function open(s){function attributeString(s){return\" \"+s.nodeName+'=\"'+escapeHTML(s.value)+'\"'}u+=\"<\"+tag(s)+[].map.call(s.attributes,attributeString).join(\"\")+\">\"}function close(s){u+=\"</\"+tag(s)+\">\"}function render(s){(\"start\"===s.event?open:close)(s.node)}for(;s.length||o.length;){let o=selectStream();if(u+=escapeHTML(i.substring(a,o[0].offset)),a=o[0].offset,o===s){_.reverse().forEach(close);do{render(o.splice(0,1)[0]),o=selectStream()}while(o===s&&o.length&&o[0].offset===a);_.reverse().forEach(open)}else\"start\"===o[0].event?_.push(o[0].node):_.pop(),render(o.splice(0,1)[0])}return u+escapeHTML(i.substr(a))}(a,nodeStream(u),i)}};function tag(s){return s.nodeName.toLowerCase()}function nodeStream(s){const o=[];return function _nodeStream(s,i){for(let a=s.firstChild;a;a=a.nextSibling)3===a.nodeType?i+=a.nodeValue.length:1===a.nodeType&&(o.push({event:\"start\",offset:i,node:a}),i=_nodeStream(a,i),tag(a).match(/br|hr|img|input/)||o.push({event:\"stop\",offset:i,node:a}));return i}(s,0),o}const be={},error=s=>{console.error(s)},warn=(s,...o)=>{console.log(`WARN: ${s}`,...o)},deprecated=(s,o)=>{be[`${s}/${o}`]||(console.log(`Deprecated as of ${s}. ${o}`),be[`${s}/${o}`]=!0)},_e=escapeHTML,Se=inherit,we=Symbol(\"nomatch\");var xe=function(s){const i=Object.create(null),a=Object.create(null),u=[];let _=!0;const w=/(^(<[^>]+>|\\t|)+|\\n)/gm,x=\"Could not find the language '{}', did you forget to load/include a language module?\",C={disableAutodetect:!0,name:\"Plain text\",contains:[]};let j={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\\blang(?:uage)?-([\\w-]+)\\b/i,classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(s){return j.noHighlightRe.test(s)}function highlight(s,o,i,a){let u=\"\",_=\"\";\"object\"==typeof o?(u=s,i=o.ignoreIllegals,_=o.language,a=void 0):(deprecated(\"10.7.0\",\"highlight(lang, code, ...args) has been deprecated.\"),deprecated(\"10.7.0\",\"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\"),_=s,u=o);const w={code:u,language:_};fire(\"before:highlight\",w);const x=w.result?w.result:_highlight(w.language,w.code,i,a);return x.code=w.code,fire(\"after:highlight\",x),x}function _highlight(s,o,a,w){function keywordData(s,o){const i=L.case_insensitive?o[0].toLowerCase():o[0];return Object.prototype.hasOwnProperty.call(s.keywords,i)&&s.keywords[i]}function processBuffer(){null!=V.subLanguage?function processSubLanguage(){if(\"\"===Y)return;let s=null;if(\"string\"==typeof V.subLanguage){if(!i[V.subLanguage])return void z.addText(Y);s=_highlight(V.subLanguage,Y,!0,U[V.subLanguage]),U[V.subLanguage]=s.top}else s=highlightAuto(Y,V.subLanguage.length?V.subLanguage:null);V.relevance>0&&(Z+=s.relevance),z.addSublanguage(s.emitter,s.language)}():function processKeywords(){if(!V.keywords)return void z.addText(Y);let s=0;V.keywordPatternRe.lastIndex=0;let o=V.keywordPatternRe.exec(Y),i=\"\";for(;o;){i+=Y.substring(s,o.index);const a=keywordData(V,o);if(a){const[s,u]=a;if(z.addText(i),i=\"\",Z+=u,s.startsWith(\"_\"))i+=o[0];else{const i=L.classNameAliases[s]||s;z.addKeyword(o[0],i)}}else i+=o[0];s=V.keywordPatternRe.lastIndex,o=V.keywordPatternRe.exec(Y)}i+=Y.substr(s),z.addText(i)}(),Y=\"\"}function startNewMode(s){return s.className&&z.openNode(L.classNameAliases[s.className]||s.className),V=Object.create(s,{parent:{value:V}}),V}function endOfMode(s,o,i){let a=function startsWith(s,o){const i=s&&s.exec(o);return i&&0===i.index}(s.endRe,i);if(a){if(s[\"on:end\"]){const i=new Response(s);s[\"on:end\"](o,i),i.isMatchIgnored&&(a=!1)}if(a){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return endOfMode(s.parent,o,i)}function doIgnore(s){return 0===V.matcher.regexIndex?(Y+=s[0],1):(ae=!0,0)}function doBeginMatch(s){const o=s[0],i=s.rule,a=new Response(i),u=[i.__beforeBegin,i[\"on:begin\"]];for(const i of u)if(i&&(i(s,a),a.isMatchIgnored))return doIgnore(o);return i&&i.endSameAsBegin&&(i.endRe=function escape(s){return new RegExp(s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\"),\"m\")}(o)),i.skip?Y+=o:(i.excludeBegin&&(Y+=o),processBuffer(),i.returnBegin||i.excludeBegin||(Y=o)),startNewMode(i),i.returnBegin?0:o.length}function doEndMatch(s){const i=s[0],a=o.substr(s.index),u=endOfMode(V,s,a);if(!u)return we;const _=V;_.skip?Y+=i:(_.returnEnd||_.excludeEnd||(Y+=i),processBuffer(),_.excludeEnd&&(Y=i));do{V.className&&z.closeNode(),V.skip||V.subLanguage||(Z+=V.relevance),V=V.parent}while(V!==u.parent);return u.starts&&(u.endSameAsBegin&&(u.starts.endRe=u.endRe),startNewMode(u.starts)),_.returnEnd?0:i.length}let C={};function processLexeme(i,u){const w=u&&u[0];if(Y+=i,null==w)return processBuffer(),0;if(\"begin\"===C.type&&\"end\"===u.type&&C.index===u.index&&\"\"===w){if(Y+=o.slice(u.index,u.index+1),!_){const o=new Error(\"0 width match regex\");throw o.languageName=s,o.badRule=C.rule,o}return 1}if(C=u,\"begin\"===u.type)return doBeginMatch(u);if(\"illegal\"===u.type&&!a){const s=new Error('Illegal lexeme \"'+w+'\" for mode \"'+(V.className||\"<unnamed>\")+'\"');throw s.mode=V,s}if(\"end\"===u.type){const s=doEndMatch(u);if(s!==we)return s}if(\"illegal\"===u.type&&\"\"===w)return 1;if(ie>1e5&&ie>3*u.index){throw new Error(\"potential infinite loop, way more iterations than matches\")}return Y+=w,w.length}const L=getLanguage(s);if(!L)throw error(x.replace(\"{}\",s)),new Error('Unknown language: \"'+s+'\"');const B=compileLanguage(L,{plugins:u});let $=\"\",V=w||B;const U={},z=new j.__emitter(j);!function processContinuations(){const s=[];for(let o=V;o!==L;o=o.parent)o.className&&s.unshift(o.className);s.forEach((s=>z.openNode(s)))}();let Y=\"\",Z=0,ee=0,ie=0,ae=!1;try{for(V.matcher.considerAll();;){ie++,ae?ae=!1:V.matcher.considerAll(),V.matcher.lastIndex=ee;const s=V.matcher.exec(o);if(!s)break;const i=processLexeme(o.substring(ee,s.index),s);ee=s.index+i}return processLexeme(o.substr(ee)),z.closeAllNodes(),z.finalize(),$=z.toHTML(),{relevance:Math.floor(Z),value:$,language:s,illegal:!1,emitter:z,top:V}}catch(i){if(i.message&&i.message.includes(\"Illegal\"))return{illegal:!0,illegalBy:{msg:i.message,context:o.slice(ee-100,ee+100),mode:i.mode},sofar:$,relevance:0,value:_e(o),emitter:z};if(_)return{illegal:!1,relevance:0,value:_e(o),emitter:z,language:s,top:V,errorRaised:i};throw i}}function highlightAuto(s,o){o=o||j.languages||Object.keys(i);const a=function justTextHighlightResult(s){const o={relevance:0,emitter:new j.__emitter(j),value:_e(s),illegal:!1,top:C};return o.emitter.addText(s),o}(s),u=o.filter(getLanguage).filter(autoDetection).map((o=>_highlight(o,s,!1)));u.unshift(a);const _=u.sort(((s,o)=>{if(s.relevance!==o.relevance)return o.relevance-s.relevance;if(s.language&&o.language){if(getLanguage(s.language).supersetOf===o.language)return 1;if(getLanguage(o.language).supersetOf===s.language)return-1}return 0})),[w,x]=_,L=w;return L.second_best=x,L}const L={\"before:highlightElement\":({el:s})=>{j.useBR&&(s.innerHTML=s.innerHTML.replace(/\\n/g,\"\").replace(/<br[ /]*>/g,\"\\n\"))},\"after:highlightElement\":({result:s})=>{j.useBR&&(s.value=s.value.replace(/\\n/g,\"<br>\"))}},B=/^(<[^>]+>|\\t)+/gm,$={\"after:highlightElement\":({result:s})=>{j.tabReplace&&(s.value=s.value.replace(B,(s=>s.replace(/\\t/g,j.tabReplace))))}};function highlightElement(s){let o=null;const i=function blockLanguage(s){let o=s.className+\" \";o+=s.parentNode?s.parentNode.className:\"\";const i=j.languageDetectRe.exec(o);if(i){const o=getLanguage(i[1]);return o||(warn(x.replace(\"{}\",i[1])),warn(\"Falling back to no-highlight mode for this block.\",s)),o?i[1]:\"no-highlight\"}return o.split(/\\s+/).find((s=>shouldNotHighlight(s)||getLanguage(s)))}(s);if(shouldNotHighlight(i))return;fire(\"before:highlightElement\",{el:s,language:i}),o=s;const u=o.textContent,_=i?highlight(u,{language:i,ignoreIllegals:!0}):highlightAuto(u);fire(\"after:highlightElement\",{el:s,result:_,text:u}),s.innerHTML=_.value,function updateClassName(s,o,i){const u=o?a[o]:i;s.classList.add(\"hljs\"),u&&s.classList.add(u)}(s,i,_.language),s.result={language:_.language,re:_.relevance,relavance:_.relevance},_.second_best&&(s.second_best={language:_.second_best.language,re:_.second_best.relevance,relavance:_.second_best.relevance})}const initHighlighting=()=>{if(initHighlighting.called)return;initHighlighting.called=!0,deprecated(\"10.6.0\",\"initHighlighting() is deprecated.  Use highlightAll() instead.\");document.querySelectorAll(\"pre code\").forEach(highlightElement)};let V=!1;function highlightAll(){if(\"loading\"===document.readyState)return void(V=!0);document.querySelectorAll(\"pre code\").forEach(highlightElement)}function getLanguage(s){return s=(s||\"\").toLowerCase(),i[s]||i[a[s]]}function registerAliases(s,{languageName:o}){\"string\"==typeof s&&(s=[s]),s.forEach((s=>{a[s.toLowerCase()]=o}))}function autoDetection(s){const o=getLanguage(s);return o&&!o.disableAutodetect}function fire(s,o){const i=s;u.forEach((function(s){s[i]&&s[i](o)}))}\"undefined\"!=typeof window&&window.addEventListener&&window.addEventListener(\"DOMContentLoaded\",(function boot(){V&&highlightAll()}),!1),Object.assign(s,{highlight,highlightAuto,highlightAll,fixMarkup:function deprecateFixMarkup(s){return deprecated(\"10.2.0\",\"fixMarkup will be removed entirely in v11.0\"),deprecated(\"10.2.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2534\"),function fixMarkup(s){return j.tabReplace||j.useBR?s.replace(w,(s=>\"\\n\"===s?j.useBR?\"<br>\":s:j.tabReplace?s.replace(/\\t/g,j.tabReplace):s)):s}(s)},highlightElement,highlightBlock:function deprecateHighlightBlock(s){return deprecated(\"10.7.0\",\"highlightBlock will be removed entirely in v12.0\"),deprecated(\"10.7.0\",\"Please use highlightElement now.\"),highlightElement(s)},configure:function configure(s){s.useBR&&(deprecated(\"10.3.0\",\"'useBR' will be removed entirely in v11.0\"),deprecated(\"10.3.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2559\")),j=Se(j,s)},initHighlighting,initHighlightingOnLoad:function initHighlightingOnLoad(){deprecated(\"10.6.0\",\"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\"),V=!0},registerLanguage:function registerLanguage(o,a){let u=null;try{u=a(s)}catch(s){if(error(\"Language definition for '{}' could not be registered.\".replace(\"{}\",o)),!_)throw s;error(s),u=C}u.name||(u.name=o),i[o]=u,u.rawDefinition=a.bind(null,s),u.aliases&&registerAliases(u.aliases,{languageName:o})},unregisterLanguage:function unregisterLanguage(s){delete i[s];for(const o of Object.keys(a))a[o]===s&&delete a[o]},listLanguages:function listLanguages(){return Object.keys(i)},getLanguage,registerAliases,requireLanguage:function requireLanguage(s){deprecated(\"10.4.0\",\"requireLanguage will be removed entirely in v11.\"),deprecated(\"10.4.0\",\"Please see https://github.com/highlightjs/highlight.js/pull/2844\");const o=getLanguage(s);if(o)return o;throw new Error(\"The '{}' language is required, but not loaded.\".replace(\"{}\",s))},autoDetection,inherit:Se,addPlugin:function addPlugin(s){!function upgradePluginAPI(s){s[\"before:highlightBlock\"]&&!s[\"before:highlightElement\"]&&(s[\"before:highlightElement\"]=o=>{s[\"before:highlightBlock\"](Object.assign({block:o.el},o))}),s[\"after:highlightBlock\"]&&!s[\"after:highlightElement\"]&&(s[\"after:highlightElement\"]=o=>{s[\"after:highlightBlock\"](Object.assign({block:o.el},o))})}(s),u.push(s)},vuePlugin:BuildVuePlugin(s).VuePlugin}),s.debugMode=function(){_=!1},s.safeMode=function(){_=!0},s.versionString=\"10.7.3\";for(const s in de)\"object\"==typeof de[s]&&o(de[s]);return Object.assign(s,de),s.addPlugin(L),s.addPlugin(ye),s.addPlugin($),s}({});s.exports=xe},46028:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(46285),_=i(25594),w=i(29367),x=i(60581),C=i(76264),j=TypeError,L=C(\"toPrimitive\");s.exports=function(s,o){if(!u(s)||_(s))return s;var i,C=w(s,L);if(C){if(void 0===o&&(o=\"default\"),i=a(C,s,o),!u(i)||_(i))return i;throw new j(\"Can't convert object to primitive value\")}return void 0===o&&(o=\"number\"),x(s,o)}},46076:(s,o,i)=>{\"use strict\";i(91599);var a=i(68623);s.exports=a},46285:(s,o,i)=>{\"use strict\";var a=i(62250);s.exports=function(s){return\"object\"==typeof s?null!==s:a(s)}},46942:(s,o)=>{var i;!function(){\"use strict\";var a={}.hasOwnProperty;function classNames(){for(var s=\"\",o=0;o<arguments.length;o++){var i=arguments[o];i&&(s=appendClass(s,parseValue(i)))}return s}function parseValue(s){if(\"string\"==typeof s||\"number\"==typeof s)return s;if(\"object\"!=typeof s)return\"\";if(Array.isArray(s))return classNames.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes(\"[native code]\"))return s.toString();var o=\"\";for(var i in s)a.call(s,i)&&s[i]&&(o=appendClass(o,i));return o}function appendClass(s,o){return o?s?s+\" \"+o:s+o:s}s.exports?(classNames.default=classNames,s.exports=classNames):void 0===(i=function(){return classNames}.apply(o,[]))||(s.exports=i)}()},47181:(s,o,i)=>{\"use strict\";var a=i(95116).IteratorPrototype,u=i(58075),_=i(75817),w=i(14840),x=i(93742),returnThis=function(){return this};s.exports=function(s,o,i,C){var j=o+\" Iterator\";return s.prototype=u(a,{next:_(+!C,i)}),w(s,j,!1,!0),x[j]=returnThis,s}},47237:s=>{s.exports=function baseProperty(s){return function(o){return null==o?void 0:o[s]}}},47248:(s,o,i)=>{var a=i(16547),u=i(51234);s.exports=function zipObject(s,o){return u(s||[],o||[],a)}},47422:(s,o,i)=>{var a=i(31769),u=i(77797);s.exports=function baseGet(s,o){for(var i=0,_=(o=a(o,s)).length;null!=s&&i<_;)s=s[u(o[i++])];return i&&i==_?s:void 0}},47473:s=>{var o=Function.prototype.toString;s.exports=function toSource(s){if(null!=s){try{return o.call(s)}catch(s){}try{return s+\"\"}catch(s){}}return\"\"}},47886:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function isWeakMap(s){return u(s)&&\"[object WeakMap]\"==a(s)}},47934:(s,o,i)=>{s.exports={ary:i(64626),assign:i(74733),clone:i(32629),curry:i(49747),forEach:i(83729),isArray:i(56449),isError:i(23546),isFunction:i(1882),isWeakMap:i(47886),iteratee:i(33855),keys:i(88984),rearg:i(84195),toInteger:i(61489),toPath:i(42072)}},48152:(s,o,i)=>{var a=i(28303),u=a&&new a;s.exports=u},48287:(s,o,i)=>{\"use strict\";const a=i(67526),u=i(251),_=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;o.Buffer=Buffer,o.SlowBuffer=function SlowBuffer(s){+s!=s&&(s=0);return Buffer.alloc(+s)},o.INSPECT_MAX_BYTES=50;const w=2147483647;function createBuffer(s){if(s>w)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"');const o=new Uint8Array(s);return Object.setPrototypeOf(o,Buffer.prototype),o}function Buffer(s,o,i){if(\"number\"==typeof s){if(\"string\"==typeof o)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(s)}return from(s,o,i)}function from(s,o,i){if(\"string\"==typeof s)return function fromString(s,o){\"string\"==typeof o&&\"\"!==o||(o=\"utf8\");if(!Buffer.isEncoding(o))throw new TypeError(\"Unknown encoding: \"+o);const i=0|byteLength(s,o);let a=createBuffer(i);const u=a.write(s,o);u!==i&&(a=a.slice(0,u));return a}(s,o);if(ArrayBuffer.isView(s))return function fromArrayView(s){if(isInstance(s,Uint8Array)){const o=new Uint8Array(s);return fromArrayBuffer(o.buffer,o.byteOffset,o.byteLength)}return fromArrayLike(s)}(s);if(null==s)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s);if(isInstance(s,ArrayBuffer)||s&&isInstance(s.buffer,ArrayBuffer))return fromArrayBuffer(s,o,i);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(s,SharedArrayBuffer)||s&&isInstance(s.buffer,SharedArrayBuffer)))return fromArrayBuffer(s,o,i);if(\"number\"==typeof s)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const a=s.valueOf&&s.valueOf();if(null!=a&&a!==s)return Buffer.from(a,o,i);const u=function fromObject(s){if(Buffer.isBuffer(s)){const o=0|checked(s.length),i=createBuffer(o);return 0===i.length||s.copy(i,0,0,o),i}if(void 0!==s.length)return\"number\"!=typeof s.length||numberIsNaN(s.length)?createBuffer(0):fromArrayLike(s);if(\"Buffer\"===s.type&&Array.isArray(s.data))return fromArrayLike(s.data)}(s);if(u)return u;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof s[Symbol.toPrimitive])return Buffer.from(s[Symbol.toPrimitive](\"string\"),o,i);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s)}function assertSize(s){if(\"number\"!=typeof s)throw new TypeError('\"size\" argument must be of type number');if(s<0)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"')}function allocUnsafe(s){return assertSize(s),createBuffer(s<0?0:0|checked(s))}function fromArrayLike(s){const o=s.length<0?0:0|checked(s.length),i=createBuffer(o);for(let a=0;a<o;a+=1)i[a]=255&s[a];return i}function fromArrayBuffer(s,o,i){if(o<0||s.byteLength<o)throw new RangeError('\"offset\" is outside of buffer bounds');if(s.byteLength<o+(i||0))throw new RangeError('\"length\" is outside of buffer bounds');let a;return a=void 0===o&&void 0===i?new Uint8Array(s):void 0===i?new Uint8Array(s,o):new Uint8Array(s,o,i),Object.setPrototypeOf(a,Buffer.prototype),a}function checked(s){if(s>=w)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+w.toString(16)+\" bytes\");return 0|s}function byteLength(s,o){if(Buffer.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||isInstance(s,ArrayBuffer))return s.byteLength;if(\"string\"!=typeof s)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);const i=s.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===i)return 0;let u=!1;for(;;)switch(o){case\"ascii\":case\"latin1\":case\"binary\":return i;case\"utf8\":case\"utf-8\":return utf8ToBytes(s).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*i;case\"hex\":return i>>>1;case\"base64\":return base64ToBytes(s).length;default:if(u)return a?-1:utf8ToBytes(s).length;o=(\"\"+o).toLowerCase(),u=!0}}function slowToString(s,o,i){let a=!1;if((void 0===o||o<0)&&(o=0),o>this.length)return\"\";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return\"\";if((i>>>=0)<=(o>>>=0))return\"\";for(s||(s=\"utf8\");;)switch(s){case\"hex\":return hexSlice(this,o,i);case\"utf8\":case\"utf-8\":return utf8Slice(this,o,i);case\"ascii\":return asciiSlice(this,o,i);case\"latin1\":case\"binary\":return latin1Slice(this,o,i);case\"base64\":return base64Slice(this,o,i);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,o,i);default:if(a)throw new TypeError(\"Unknown encoding: \"+s);s=(s+\"\").toLowerCase(),a=!0}}function swap(s,o,i){const a=s[o];s[o]=s[i],s[i]=a}function bidirectionalIndexOf(s,o,i,a,u){if(0===s.length)return-1;if(\"string\"==typeof i?(a=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),numberIsNaN(i=+i)&&(i=u?0:s.length-1),i<0&&(i=s.length+i),i>=s.length){if(u)return-1;i=s.length-1}else if(i<0){if(!u)return-1;i=0}if(\"string\"==typeof o&&(o=Buffer.from(o,a)),Buffer.isBuffer(o))return 0===o.length?-1:arrayIndexOf(s,o,i,a,u);if(\"number\"==typeof o)return o&=255,\"function\"==typeof Uint8Array.prototype.indexOf?u?Uint8Array.prototype.indexOf.call(s,o,i):Uint8Array.prototype.lastIndexOf.call(s,o,i):arrayIndexOf(s,[o],i,a,u);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(s,o,i,a,u){let _,w=1,x=s.length,C=o.length;if(void 0!==a&&(\"ucs2\"===(a=String(a).toLowerCase())||\"ucs-2\"===a||\"utf16le\"===a||\"utf-16le\"===a)){if(s.length<2||o.length<2)return-1;w=2,x/=2,C/=2,i/=2}function read(s,o){return 1===w?s[o]:s.readUInt16BE(o*w)}if(u){let a=-1;for(_=i;_<x;_++)if(read(s,_)===read(o,-1===a?0:_-a)){if(-1===a&&(a=_),_-a+1===C)return a*w}else-1!==a&&(_-=_-a),a=-1}else for(i+C>x&&(i=x-C),_=i;_>=0;_--){let i=!0;for(let a=0;a<C;a++)if(read(s,_+a)!==read(o,a)){i=!1;break}if(i)return _}return-1}function hexWrite(s,o,i,a){i=Number(i)||0;const u=s.length-i;a?(a=Number(a))>u&&(a=u):a=u;const _=o.length;let w;for(a>_/2&&(a=_/2),w=0;w<a;++w){const a=parseInt(o.substr(2*w,2),16);if(numberIsNaN(a))return w;s[i+w]=a}return w}function utf8Write(s,o,i,a){return blitBuffer(utf8ToBytes(o,s.length-i),s,i,a)}function asciiWrite(s,o,i,a){return blitBuffer(function asciiToBytes(s){const o=[];for(let i=0;i<s.length;++i)o.push(255&s.charCodeAt(i));return o}(o),s,i,a)}function base64Write(s,o,i,a){return blitBuffer(base64ToBytes(o),s,i,a)}function ucs2Write(s,o,i,a){return blitBuffer(function utf16leToBytes(s,o){let i,a,u;const _=[];for(let w=0;w<s.length&&!((o-=2)<0);++w)i=s.charCodeAt(w),a=i>>8,u=i%256,_.push(u),_.push(a);return _}(o,s.length-i),s,i,a)}function base64Slice(s,o,i){return 0===o&&i===s.length?a.fromByteArray(s):a.fromByteArray(s.slice(o,i))}function utf8Slice(s,o,i){i=Math.min(s.length,i);const a=[];let u=o;for(;u<i;){const o=s[u];let _=null,w=o>239?4:o>223?3:o>191?2:1;if(u+w<=i){let i,a,x,C;switch(w){case 1:o<128&&(_=o);break;case 2:i=s[u+1],128==(192&i)&&(C=(31&o)<<6|63&i,C>127&&(_=C));break;case 3:i=s[u+1],a=s[u+2],128==(192&i)&&128==(192&a)&&(C=(15&o)<<12|(63&i)<<6|63&a,C>2047&&(C<55296||C>57343)&&(_=C));break;case 4:i=s[u+1],a=s[u+2],x=s[u+3],128==(192&i)&&128==(192&a)&&128==(192&x)&&(C=(15&o)<<18|(63&i)<<12|(63&a)<<6|63&x,C>65535&&C<1114112&&(_=C))}}null===_?(_=65533,w=1):_>65535&&(_-=65536,a.push(_>>>10&1023|55296),_=56320|1023&_),a.push(_),u+=w}return function decodeCodePointsArray(s){const o=s.length;if(o<=x)return String.fromCharCode.apply(String,s);let i=\"\",a=0;for(;a<o;)i+=String.fromCharCode.apply(String,s.slice(a,a+=x));return i}(a)}o.kMaxLength=w,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const s=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(s,o),42===s.foo()}catch(s){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(s,o,i){return from(s,o,i)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(s,o,i){return function alloc(s,o,i){return assertSize(s),s<=0?createBuffer(s):void 0!==o?\"string\"==typeof i?createBuffer(s).fill(o,i):createBuffer(s).fill(o):createBuffer(s)}(s,o,i)},Buffer.allocUnsafe=function(s){return allocUnsafe(s)},Buffer.allocUnsafeSlow=function(s){return allocUnsafe(s)},Buffer.isBuffer=function isBuffer(s){return null!=s&&!0===s._isBuffer&&s!==Buffer.prototype},Buffer.compare=function compare(s,o){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),isInstance(o,Uint8Array)&&(o=Buffer.from(o,o.offset,o.byteLength)),!Buffer.isBuffer(s)||!Buffer.isBuffer(o))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(s===o)return 0;let i=s.length,a=o.length;for(let u=0,_=Math.min(i,a);u<_;++u)if(s[u]!==o[u]){i=s[u],a=o[u];break}return i<a?-1:a<i?1:0},Buffer.isEncoding=function isEncoding(s){switch(String(s).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}},Buffer.concat=function concat(s,o){if(!Array.isArray(s))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===s.length)return Buffer.alloc(0);let i;if(void 0===o)for(o=0,i=0;i<s.length;++i)o+=s[i].length;const a=Buffer.allocUnsafe(o);let u=0;for(i=0;i<s.length;++i){let o=s[i];if(isInstance(o,Uint8Array))u+o.length>a.length?(Buffer.isBuffer(o)||(o=Buffer.from(o)),o.copy(a,u)):Uint8Array.prototype.set.call(a,o,u);else{if(!Buffer.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(a,u)}u+=o.length}return a},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const s=this.length;if(s%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let o=0;o<s;o+=2)swap(this,o,o+1);return this},Buffer.prototype.swap32=function swap32(){const s=this.length;if(s%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let o=0;o<s;o+=4)swap(this,o,o+3),swap(this,o+1,o+2);return this},Buffer.prototype.swap64=function swap64(){const s=this.length;if(s%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let o=0;o<s;o+=8)swap(this,o,o+7),swap(this,o+1,o+6),swap(this,o+2,o+5),swap(this,o+3,o+4);return this},Buffer.prototype.toString=function toString(){const s=this.length;return 0===s?\"\":0===arguments.length?utf8Slice(this,0,s):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(s){if(!Buffer.isBuffer(s))throw new TypeError(\"Argument must be a Buffer\");return this===s||0===Buffer.compare(this,s)},Buffer.prototype.inspect=function inspect(){let s=\"\";const i=o.INSPECT_MAX_BYTES;return s=this.toString(\"hex\",0,i).replace(/(.{2})/g,\"$1 \").trim(),this.length>i&&(s+=\" ... \"),\"<Buffer \"+s+\">\"},_&&(Buffer.prototype[_]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(s,o,i,a,u){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),!Buffer.isBuffer(s))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(void 0===o&&(o=0),void 0===i&&(i=s?s.length:0),void 0===a&&(a=0),void 0===u&&(u=this.length),o<0||i>s.length||a<0||u>this.length)throw new RangeError(\"out of range index\");if(a>=u&&o>=i)return 0;if(a>=u)return-1;if(o>=i)return 1;if(this===s)return 0;let _=(u>>>=0)-(a>>>=0),w=(i>>>=0)-(o>>>=0);const x=Math.min(_,w),C=this.slice(a,u),j=s.slice(o,i);for(let s=0;s<x;++s)if(C[s]!==j[s]){_=C[s],w=j[s];break}return _<w?-1:w<_?1:0},Buffer.prototype.includes=function includes(s,o,i){return-1!==this.indexOf(s,o,i)},Buffer.prototype.indexOf=function indexOf(s,o,i){return bidirectionalIndexOf(this,s,o,i,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(s,o,i){return bidirectionalIndexOf(this,s,o,i,!1)},Buffer.prototype.write=function write(s,o,i,a){if(void 0===o)a=\"utf8\",i=this.length,o=0;else if(void 0===i&&\"string\"==typeof o)a=o,i=this.length,o=0;else{if(!isFinite(o))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");o>>>=0,isFinite(i)?(i>>>=0,void 0===a&&(a=\"utf8\")):(a=i,i=void 0)}const u=this.length-o;if((void 0===i||i>u)&&(i=u),s.length>0&&(i<0||o<0)||o>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");a||(a=\"utf8\");let _=!1;for(;;)switch(a){case\"hex\":return hexWrite(this,s,o,i);case\"utf8\":case\"utf-8\":return utf8Write(this,s,o,i);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,s,o,i);case\"base64\":return base64Write(this,s,o,i);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,s,o,i);default:if(_)throw new TypeError(\"Unknown encoding: \"+a);a=(\"\"+a).toLowerCase(),_=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function asciiSlice(s,o,i){let a=\"\";i=Math.min(s.length,i);for(let u=o;u<i;++u)a+=String.fromCharCode(127&s[u]);return a}function latin1Slice(s,o,i){let a=\"\";i=Math.min(s.length,i);for(let u=o;u<i;++u)a+=String.fromCharCode(s[u]);return a}function hexSlice(s,o,i){const a=s.length;(!o||o<0)&&(o=0),(!i||i<0||i>a)&&(i=a);let u=\"\";for(let a=o;a<i;++a)u+=L[s[a]];return u}function utf16leSlice(s,o,i){const a=s.slice(o,i);let u=\"\";for(let s=0;s<a.length-1;s+=2)u+=String.fromCharCode(a[s]+256*a[s+1]);return u}function checkOffset(s,o,i){if(s%1!=0||s<0)throw new RangeError(\"offset is not uint\");if(s+o>i)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(s,o,i,a,u,_){if(!Buffer.isBuffer(s))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(o>u||o<_)throw new RangeError('\"value\" argument is out of bounds');if(i+a>s.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(s,o,i,a,u){checkIntBI(o,a,u,s,i,7);let _=Number(o&BigInt(4294967295));s[i++]=_,_>>=8,s[i++]=_,_>>=8,s[i++]=_,_>>=8,s[i++]=_;let w=Number(o>>BigInt(32)&BigInt(4294967295));return s[i++]=w,w>>=8,s[i++]=w,w>>=8,s[i++]=w,w>>=8,s[i++]=w,i}function wrtBigUInt64BE(s,o,i,a,u){checkIntBI(o,a,u,s,i,7);let _=Number(o&BigInt(4294967295));s[i+7]=_,_>>=8,s[i+6]=_,_>>=8,s[i+5]=_,_>>=8,s[i+4]=_;let w=Number(o>>BigInt(32)&BigInt(4294967295));return s[i+3]=w,w>>=8,s[i+2]=w,w>>=8,s[i+1]=w,w>>=8,s[i]=w,i+8}function checkIEEE754(s,o,i,a,u,_){if(i+a>s.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"Index out of range\")}function writeFloat(s,o,i,a,_){return o=+o,i>>>=0,_||checkIEEE754(s,0,i,4),u.write(s,o,i,a,23,4),i+4}function writeDouble(s,o,i,a,_){return o=+o,i>>>=0,_||checkIEEE754(s,0,i,8),u.write(s,o,i,a,52,8),i+8}Buffer.prototype.slice=function slice(s,o){const i=this.length;(s=~~s)<0?(s+=i)<0&&(s=0):s>i&&(s=i),(o=void 0===o?i:~~o)<0?(o+=i)<0&&(o=0):o>i&&(o=i),o<s&&(o=s);const a=this.subarray(s,o);return Object.setPrototypeOf(a,Buffer.prototype),a},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=this[s],u=1,_=0;for(;++_<o&&(u*=256);)a+=this[s+_]*u;return a},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=this[s+--o],u=1;for(;o>0&&(u*=256);)a+=this[s+--o]*u;return a},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(s,o){return s>>>=0,o||checkOffset(s,1,this.length),this[s]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(s,o){return s>>>=0,o||checkOffset(s,2,this.length),this[s]|this[s+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(s,o){return s>>>=0,o||checkOffset(s,2,this.length),this[s]<<8|this[s+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=o+256*this[++s]+65536*this[++s]+this[++s]*2**24,u=this[++s]+256*this[++s]+65536*this[++s]+i*2**24;return BigInt(a)+(BigInt(u)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=o*2**24+65536*this[++s]+256*this[++s]+this[++s],u=this[++s]*2**24+65536*this[++s]+256*this[++s]+i;return(BigInt(a)<<BigInt(32))+BigInt(u)})),Buffer.prototype.readIntLE=function readIntLE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=this[s],u=1,_=0;for(;++_<o&&(u*=256);)a+=this[s+_]*u;return u*=128,a>=u&&(a-=Math.pow(2,8*o)),a},Buffer.prototype.readIntBE=function readIntBE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=o,u=1,_=this[s+--a];for(;a>0&&(u*=256);)_+=this[s+--a]*u;return u*=128,_>=u&&(_-=Math.pow(2,8*o)),_},Buffer.prototype.readInt8=function readInt8(s,o){return s>>>=0,o||checkOffset(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},Buffer.prototype.readInt16LE=function readInt16LE(s,o){s>>>=0,o||checkOffset(s,2,this.length);const i=this[s]|this[s+1]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt16BE=function readInt16BE(s,o){s>>>=0,o||checkOffset(s,2,this.length);const i=this[s+1]|this[s]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt32LE=function readInt32LE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=this[s+4]+256*this[s+5]+65536*this[s+6]+(i<<24);return(BigInt(a)<<BigInt(32))+BigInt(o+256*this[++s]+65536*this[++s]+this[++s]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=(o<<24)+65536*this[++s]+256*this[++s]+this[++s];return(BigInt(a)<<BigInt(32))+BigInt(this[++s]*2**24+65536*this[++s]+256*this[++s]+i)})),Buffer.prototype.readFloatLE=function readFloatLE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),u.read(this,s,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),u.read(this,s,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(s,o){return s>>>=0,o||checkOffset(s,8,this.length),u.read(this,s,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(s,o){return s>>>=0,o||checkOffset(s,8,this.length),u.read(this,s,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(s,o,i,a){if(s=+s,o>>>=0,i>>>=0,!a){checkInt(this,s,o,i,Math.pow(2,8*i)-1,0)}let u=1,_=0;for(this[o]=255&s;++_<i&&(u*=256);)this[o+_]=s/u&255;return o+i},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(s,o,i,a){if(s=+s,o>>>=0,i>>>=0,!a){checkInt(this,s,o,i,Math.pow(2,8*i)-1,0)}let u=i-1,_=1;for(this[o+u]=255&s;--u>=0&&(_*=256);)this[o+u]=s/_&255;return o+i},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,1,255,0),this[o]=255&s,o+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,65535,0),this[o]=255&s,this[o+1]=s>>>8,o+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,65535,0),this[o]=s>>>8,this[o+1]=255&s,o+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,4294967295,0),this[o+3]=s>>>24,this[o+2]=s>>>16,this[o+1]=s>>>8,this[o]=255&s,o+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,4294967295,0),this[o]=s>>>24,this[o+1]=s>>>16,this[o+2]=s>>>8,this[o+3]=255&s,o+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(s,o=0){return wrtBigUInt64LE(this,s,o,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(s,o=0){return wrtBigUInt64BE(this,s,o,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(s,o,i,a){if(s=+s,o>>>=0,!a){const a=Math.pow(2,8*i-1);checkInt(this,s,o,i,a-1,-a)}let u=0,_=1,w=0;for(this[o]=255&s;++u<i&&(_*=256);)s<0&&0===w&&0!==this[o+u-1]&&(w=1),this[o+u]=(s/_|0)-w&255;return o+i},Buffer.prototype.writeIntBE=function writeIntBE(s,o,i,a){if(s=+s,o>>>=0,!a){const a=Math.pow(2,8*i-1);checkInt(this,s,o,i,a-1,-a)}let u=i-1,_=1,w=0;for(this[o+u]=255&s;--u>=0&&(_*=256);)s<0&&0===w&&0!==this[o+u+1]&&(w=1),this[o+u]=(s/_|0)-w&255;return o+i},Buffer.prototype.writeInt8=function writeInt8(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,1,127,-128),s<0&&(s=255+s+1),this[o]=255&s,o+1},Buffer.prototype.writeInt16LE=function writeInt16LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,32767,-32768),this[o]=255&s,this[o+1]=s>>>8,o+2},Buffer.prototype.writeInt16BE=function writeInt16BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,32767,-32768),this[o]=s>>>8,this[o+1]=255&s,o+2},Buffer.prototype.writeInt32LE=function writeInt32LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,2147483647,-2147483648),this[o]=255&s,this[o+1]=s>>>8,this[o+2]=s>>>16,this[o+3]=s>>>24,o+4},Buffer.prototype.writeInt32BE=function writeInt32BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[o]=s>>>24,this[o+1]=s>>>16,this[o+2]=s>>>8,this[o+3]=255&s,o+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(s,o=0){return wrtBigUInt64LE(this,s,o,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(s,o=0){return wrtBigUInt64BE(this,s,o,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(s,o,i){return writeFloat(this,s,o,!0,i)},Buffer.prototype.writeFloatBE=function writeFloatBE(s,o,i){return writeFloat(this,s,o,!1,i)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(s,o,i){return writeDouble(this,s,o,!0,i)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(s,o,i){return writeDouble(this,s,o,!1,i)},Buffer.prototype.copy=function copy(s,o,i,a){if(!Buffer.isBuffer(s))throw new TypeError(\"argument should be a Buffer\");if(i||(i=0),a||0===a||(a=this.length),o>=s.length&&(o=s.length),o||(o=0),a>0&&a<i&&(a=i),a===i)return 0;if(0===s.length||0===this.length)return 0;if(o<0)throw new RangeError(\"targetStart out of bounds\");if(i<0||i>=this.length)throw new RangeError(\"Index out of range\");if(a<0)throw new RangeError(\"sourceEnd out of bounds\");a>this.length&&(a=this.length),s.length-o<a-i&&(a=s.length-o+i);const u=a-i;return this===s&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(o,i,a):Uint8Array.prototype.set.call(s,this.subarray(i,a),o),u},Buffer.prototype.fill=function fill(s,o,i,a){if(\"string\"==typeof s){if(\"string\"==typeof o?(a=o,o=0,i=this.length):\"string\"==typeof i&&(a=i,i=this.length),void 0!==a&&\"string\"!=typeof a)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof a&&!Buffer.isEncoding(a))throw new TypeError(\"Unknown encoding: \"+a);if(1===s.length){const o=s.charCodeAt(0);(\"utf8\"===a&&o<128||\"latin1\"===a)&&(s=o)}}else\"number\"==typeof s?s&=255:\"boolean\"==typeof s&&(s=Number(s));if(o<0||this.length<o||this.length<i)throw new RangeError(\"Out of range index\");if(i<=o)return this;let u;if(o>>>=0,i=void 0===i?this.length:i>>>0,s||(s=0),\"number\"==typeof s)for(u=o;u<i;++u)this[u]=s;else{const _=Buffer.isBuffer(s)?s:Buffer.from(s,a),w=_.length;if(0===w)throw new TypeError('The value \"'+s+'\" is invalid for argument \"value\"');for(u=0;u<i-o;++u)this[u+o]=_[u%w]}return this};const C={};function E(s,o,i){C[s]=class NodeError extends i{constructor(){super(),Object.defineProperty(this,\"message\",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${s}]`,this.stack,delete this.name}get code(){return s}set code(s){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${s}]: ${this.message}`}}}function addNumericalSeparator(s){let o=\"\",i=s.length;const a=\"-\"===s[0]?1:0;for(;i>=a+4;i-=3)o=`_${s.slice(i-3,i)}${o}`;return`${s.slice(0,i)}${o}`}function checkIntBI(s,o,i,a,u,_){if(s>i||s<o){const a=\"bigint\"==typeof o?\"n\":\"\";let u;throw u=_>3?0===o||o===BigInt(0)?`>= 0${a} and < 2${a} ** ${8*(_+1)}${a}`:`>= -(2${a} ** ${8*(_+1)-1}${a}) and < 2 ** ${8*(_+1)-1}${a}`:`>= ${o}${a} and <= ${i}${a}`,new C.ERR_OUT_OF_RANGE(\"value\",u,s)}!function checkBounds(s,o,i){validateNumber(o,\"offset\"),void 0!==s[o]&&void 0!==s[o+i]||boundsError(o,s.length-(i+1))}(a,u,_)}function validateNumber(s,o){if(\"number\"!=typeof s)throw new C.ERR_INVALID_ARG_TYPE(o,\"number\",s)}function boundsError(s,o,i){if(Math.floor(s)!==s)throw validateNumber(s,i),new C.ERR_OUT_OF_RANGE(i||\"offset\",\"an integer\",s);if(o<0)throw new C.ERR_BUFFER_OUT_OF_BOUNDS;throw new C.ERR_OUT_OF_RANGE(i||\"offset\",`>= ${i?1:0} and <= ${o}`,s)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(s){return s?`${s} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(s,o){return`The \"${s}\" argument must be of type number. Received type ${typeof o}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(s,o,i){let a=`The value of \"${s}\" is out of range.`,u=i;return Number.isInteger(i)&&Math.abs(i)>2**32?u=addNumericalSeparator(String(i)):\"bigint\"==typeof i&&(u=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(u=addNumericalSeparator(u)),u+=\"n\"),a+=` It must be ${o}. Received ${u}`,a}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(s,o){let i;o=o||1/0;const a=s.length;let u=null;const _=[];for(let w=0;w<a;++w){if(i=s.charCodeAt(w),i>55295&&i<57344){if(!u){if(i>56319){(o-=3)>-1&&_.push(239,191,189);continue}if(w+1===a){(o-=3)>-1&&_.push(239,191,189);continue}u=i;continue}if(i<56320){(o-=3)>-1&&_.push(239,191,189),u=i;continue}i=65536+(u-55296<<10|i-56320)}else u&&(o-=3)>-1&&_.push(239,191,189);if(u=null,i<128){if((o-=1)<0)break;_.push(i)}else if(i<2048){if((o-=2)<0)break;_.push(i>>6|192,63&i|128)}else if(i<65536){if((o-=3)<0)break;_.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error(\"Invalid code point\");if((o-=4)<0)break;_.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return _}function base64ToBytes(s){return a.toByteArray(function base64clean(s){if((s=(s=s.split(\"=\")[0]).trim().replace(j,\"\")).length<2)return\"\";for(;s.length%4!=0;)s+=\"=\";return s}(s))}function blitBuffer(s,o,i,a){let u;for(u=0;u<a&&!(u+i>=o.length||u>=s.length);++u)o[u+i]=s[u];return u}function isInstance(s,o){return s instanceof o||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===o.name}function numberIsNaN(s){return s!=s}const L=function(){const s=\"0123456789abcdef\",o=new Array(256);for(let i=0;i<16;++i){const a=16*i;for(let u=0;u<16;++u)o[a+u]=s[i]+s[u]}return o}();function defineBigIntMethod(s){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:s}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},48590:(s,o)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=function(s){return s&&\"@@redux/INIT\"===s.type?\"initialState argument passed to createStore\":\"previous state received by the reducer\"},s.exports=o.default},48655:(s,o,i)=>{var a=i(26025);s.exports=function listCacheHas(s){return a(this.__data__,s)>-1}},48675:(s,o,i)=>{s.exports=i(20850)},48948:(s,o,i)=>{var a=i(21791),u=i(86375);s.exports=function copySymbolsIn(s,o){return a(s,u(s),o)}},49326:(s,o,i)=>{var a=i(31769),u=i(72428),_=i(56449),w=i(30361),x=i(30294),C=i(77797);s.exports=function hasPath(s,o,i){for(var j=-1,L=(o=a(o,s)).length,B=!1;++j<L;){var $=C(o[j]);if(!(B=null!=s&&i(s,$)))break;s=s[$]}return B||++j!=L?B:!!(L=null==s?0:s.length)&&x(L)&&w($,L)&&(_(s)||u(s))}},49552:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(46285),_=a.document,w=u(_)&&u(_.createElement);s.exports=function(s){return w?_.createElement(s):{}}},49653:(s,o,i)=>{var a=i(37828);s.exports=function cloneArrayBuffer(s){var o=new s.constructor(s.byteLength);return new a(o).set(new a(s)),o}},49698:s=>{var o=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");s.exports=function hasUnicode(s){return o.test(s)}},49724:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(39298),_=a({}.hasOwnProperty);s.exports=Object.hasOwn||function hasOwn(s,o){return _(u(s),o)}},49747:(s,o,i)=>{var a=i(66977);function curry(s,o,i){var u=a(s,8,void 0,void 0,void 0,void 0,void 0,o=i?void 0:o);return u.placeholder=curry.placeholder,u}curry.placeholder={},s.exports=curry},50002:(s,o,i)=>{var a=i(82199),u=i(4664),_=i(95950);s.exports=function getAllKeys(s){return a(s,_,u)}},50104:(s,o,i)=>{var a=i(53661);function memoize(s,o){if(\"function\"!=typeof s||null!=o&&\"function\"!=typeof o)throw new TypeError(\"Expected a function\");var memoized=function(){var i=arguments,a=o?o.apply(this,i):i[0],u=memoized.cache;if(u.has(a))return u.get(a);var _=s.apply(this,i);return memoized.cache=u.set(a,_)||u,_};return memoized.cache=new(memoize.Cache||a),memoized}memoize.Cache=a,s.exports=memoize},50583:(s,o,i)=>{var a=i(47237),u=i(17255),_=i(28586),w=i(77797);s.exports=function property(s){return _(s)?a(w(s)):u(s)}},50689:(s,o,i)=>{var a=i(50002),u=Object.prototype.hasOwnProperty;s.exports=function equalObjects(s,o,i,_,w,x){var C=1&i,j=a(s),L=j.length;if(L!=a(o).length&&!C)return!1;for(var B=L;B--;){var $=j[B];if(!(C?$ in o:u.call(o,$)))return!1}var V=x.get(s),U=x.get(o);if(V&&U)return V==o&&U==s;var z=!0;x.set(s,o),x.set(o,s);for(var Y=C;++B<L;){var Z=s[$=j[B]],ee=o[$];if(_)var ie=C?_(ee,Z,$,o,s,x):_(Z,ee,$,s,o,x);if(!(void 0===ie?Z===ee||w(Z,ee,i,_,x):ie)){z=!1;break}Y||(Y=\"constructor\"==$)}if(z&&!Y){var ae=s.constructor,ce=o.constructor;ae==ce||!(\"constructor\"in s)||!(\"constructor\"in o)||\"function\"==typeof ae&&ae instanceof ae&&\"function\"==typeof ce&&ce instanceof ce||(z=!1)}return x.delete(s),x.delete(o),z}},50828:(s,o,i)=>{var a=i(24647),u=i(13222),_=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,w=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\");s.exports=function deburr(s){return(s=u(s))&&s.replace(_,a).replace(w,\"\")}},51175:(s,o,i)=>{\"use strict\";var a=i(19846);s.exports=a&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},51234:s=>{s.exports=function baseZipObject(s,o,i){for(var a=-1,u=s.length,_=o.length,w={};++a<u;){var x=a<_?o[a]:void 0;i(w,s[a],x)}return w}},51420:(s,o,i)=>{var a=i(80079);s.exports=function stackClear(){this.__data__=new a,this.size=0}},51459:s=>{s.exports=function setCacheHas(s){return this.__data__.has(s)}},51811:s=>{var o=Date.now;s.exports=function shortOut(s){var i=0,a=0;return function(){var u=o(),_=16-(u-a);if(a=u,_>0){if(++i>=800)return arguments[0]}else i=0;return s.apply(void 0,arguments)}}},51871:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(82159);s.exports=function(s,o,i){try{return a(u(Object.getOwnPropertyDescriptor(s,o)[i]))}catch(s){}}},51873:(s,o,i)=>{var a=i(9325).Symbol;s.exports=a},52623:(s,o,i)=>{\"use strict\";var a={};a[i(76264)(\"toStringTag\")]=\"z\",s.exports=\"[object z]\"===String(a)},53138:(s,o,i)=>{var a=i(11331);s.exports=function customOmitClone(s){return a(s)?void 0:s}},53209:(s,o,i)=>{\"use strict\";var a=i(65606),u=65536,_=4294967295;var w=i(92861).Buffer,x=i.g.crypto||i.g.msCrypto;x&&x.getRandomValues?s.exports=function randomBytes(s,o){if(s>_)throw new RangeError(\"requested too many random bytes\");var i=w.allocUnsafe(s);if(s>0)if(s>u)for(var C=0;C<s;C+=u)x.getRandomValues(i.slice(C,C+u));else x.getRandomValues(i);if(\"function\"==typeof o)return a.nextTick((function(){o(null,i)}));return i}:s.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},53320:s=>{var o=Math.max;s.exports=function composeArgsRight(s,i,a,u){for(var _=-1,w=s.length,x=-1,C=a.length,j=-1,L=i.length,B=o(w-C,0),$=Array(B+L),V=!u;++_<B;)$[_]=s[_];for(var U=_;++j<L;)$[U+j]=i[j];for(;++x<C;)(V||_<w)&&($[U+a[x]]=s[_++]);return $}},53375:(s,o,i)=>{\"use strict\";var a=i(93700);s.exports=a},53661:(s,o,i)=>{var a=i(63040),u=i(17670),_=i(90289),w=i(4509),x=i(72949);function MapCache(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){var a=s[o];this.set(a[0],a[1])}}MapCache.prototype.clear=a,MapCache.prototype.delete=u,MapCache.prototype.get=_,MapCache.prototype.has=w,MapCache.prototype.set=x,s.exports=MapCache},53758:(s,o,i)=>{var a=i(30980),u=i(56017),_=i(94033),w=i(56449),x=i(40346),C=i(80257),j=Object.prototype.hasOwnProperty;function lodash(s){if(x(s)&&!w(s)&&!(s instanceof a)){if(s instanceof u)return s;if(j.call(s,\"__wrapped__\"))return C(s)}return new u(s)}lodash.prototype=_.prototype,lodash.prototype.constructor=lodash,s.exports=lodash},53812:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function isBoolean(s){return!0===s||!1===s||u(s)&&\"[object Boolean]\"==a(s)}},54018:(s,o,i)=>{\"use strict\";var a=i(46285);s.exports=function(s){return a(s)||null===s}},54128:(s,o,i)=>{var a=i(31800),u=/^\\s+/;s.exports=function baseTrim(s){return s?s.slice(0,a(s)+1).replace(u,\"\"):s}},54552:s=>{s.exports=function basePropertyOf(s){return function(o){return null==s?void 0:s[o]}}},54641:(s,o,i)=>{var a=i(68882),u=i(51811)(a);s.exports=u},54829:(s,o,i)=>{\"use strict\";var a=i(74284).f;s.exports=function(s,o,i){i in s||a(s,i,{configurable:!0,get:function(){return o[i]},set:function(s){o[i]=s}})}},54878:(s,o,i)=>{\"use strict\";var a=i(52623),u=i(73948);s.exports=a?{}.toString:function toString(){return\"[object \"+u(this)+\"]\"}},55157:s=>{s.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},55364:(s,o,i)=>{var a=i(85250),u=i(20999)((function(s,o,i){a(s,o,i)}));s.exports=u},55481:(s,o,i)=>{var a=i(9325)[\"__core-js_shared__\"];s.exports=a},55527:s=>{var o=Object.prototype;s.exports=function isPrototype(s){var i=s&&s.constructor;return s===(\"function\"==typeof i&&i.prototype||o)}},55580:(s,o,i)=>{var a=i(56110)(i(9325),\"DataView\");s.exports=a},55674:(s,o,i)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0}),o.validateNextState=o.getUnexpectedInvocationParameterMessage=o.getStateName=void 0;var a=_interopRequireDefault(i(48590)),u=_interopRequireDefault(i(82261)),_=_interopRequireDefault(i(27374));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}o.getStateName=a.default,o.getUnexpectedInvocationParameterMessage=u.default,o.validateNextState=_.default},55808:(s,o,i)=>{var a=i(12507)(\"toUpperCase\");s.exports=a},55973:s=>{class KeyValuePair{constructor(s,o){this.key=s,this.value=o}clone(){const s=new KeyValuePair;return this.key&&(s.key=this.key.clone()),this.value&&(s.value=this.value.clone()),s}}s.exports=KeyValuePair},56017:(s,o,i)=>{var a=i(39344),u=i(94033);function LodashWrapper(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=void 0}LodashWrapper.prototype=a(u.prototype),LodashWrapper.prototype.constructor=LodashWrapper,s.exports=LodashWrapper},56110:(s,o,i)=>{var a=i(45083),u=i(10392);s.exports=function getNative(s,o){var i=u(s,o);return a(i)?i:void 0}},56367:(s,o,i)=>{s.exports=i(77731)},56449:s=>{var o=Array.isArray;s.exports=o},56698:s=>{\"function\"==typeof Object.create?s.exports=function inherits(s,o){o&&(s.super_=o,s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:s.exports=function inherits(s,o){if(o){s.super_=o;var TempCtor=function(){};TempCtor.prototype=o.prototype,s.prototype=new TempCtor,s.prototype.constructor=s}}},56757:(s,o,i)=>{var a=i(91033),u=Math.max;s.exports=function overRest(s,o,i){return o=u(void 0===o?s.length-1:o,0),function(){for(var _=arguments,w=-1,x=u(_.length-o,0),C=Array(x);++w<x;)C[w]=_[o+w];w=-1;for(var j=Array(o+1);++w<o;)j[w]=_[w];return j[o]=i(C),a(s,this,j)}}},57382:(s,o,i)=>{\"use strict\";var a=i(98828);s.exports=!a((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))},57758:(s,o,i)=>{\"use strict\";var a;var u=i(86048).F,_=u.ERR_MISSING_ARGS,w=u.ERR_STREAM_DESTROYED;function noop(s){if(s)throw s}function call(s){s()}function pipe(s,o){return s.pipe(o)}s.exports=function pipeline(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];var x,C=function popCallback(s){return s.length?\"function\"!=typeof s[s.length-1]?noop:s.pop():noop}(o);if(Array.isArray(o[0])&&(o=o[0]),o.length<2)throw new _(\"streams\");var j=o.map((function(s,u){var _=u<o.length-1;return function destroyer(s,o,u,_){_=function once(s){var o=!1;return function(){o||(o=!0,s.apply(void 0,arguments))}}(_);var x=!1;s.on(\"close\",(function(){x=!0})),void 0===a&&(a=i(86238)),a(s,{readable:o,writable:u},(function(s){if(s)return _(s);x=!0,_()}));var C=!1;return function(o){if(!x&&!C)return C=!0,function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?s.abort():\"function\"==typeof s.destroy?s.destroy():void _(o||new w(\"pipe\"))}}(s,_,u>0,(function(s){x||(x=s),s&&j.forEach(call),_||(j.forEach(call),C(x))}))}));return o.reduce(pipe)}},58075:(s,o,i)=>{\"use strict\";var a,u=i(36624),_=i(42220),w=i(80376),x=i(38530),C=i(62416),j=i(49552),L=i(92522),B=\"prototype\",$=\"script\",V=L(\"IE_PROTO\"),EmptyConstructor=function(){},scriptTag=function(s){return\"<\"+$+\">\"+s+\"</\"+$+\">\"},NullProtoObjectViaActiveX=function(s){s.write(scriptTag(\"\")),s.close();var o=s.parentWindow.Object;return s=null,o},NullProtoObject=function(){try{a=new ActiveXObject(\"htmlfile\")}catch(s){}var s,o,i;NullProtoObject=\"undefined\"!=typeof document?document.domain&&a?NullProtoObjectViaActiveX(a):(o=j(\"iframe\"),i=\"java\"+$+\":\",o.style.display=\"none\",C.appendChild(o),o.src=String(i),(s=o.contentWindow.document).open(),s.write(scriptTag(\"document.F=Object\")),s.close(),s.F):NullProtoObjectViaActiveX(a);for(var u=w.length;u--;)delete NullProtoObject[B][w[u]];return NullProtoObject()};x[V]=!0,s.exports=Object.create||function create(s,o){var i;return null!==s?(EmptyConstructor[B]=u(s),i=new EmptyConstructor,EmptyConstructor[B]=null,i[V]=s):i=NullProtoObject(),void 0===o?i:_.f(i,o)}},58156:(s,o,i)=>{var a=i(47422);s.exports=function get(s,o,i){var u=null==s?void 0:a(s,o);return void 0===u?i:u}},58523:s=>{s.exports=function countHolders(s,o){for(var i=s.length,a=0;i--;)s[i]===o&&++a;return a}},58661:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(98828);s.exports=a&&u((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},59350:s=>{var o=Object.prototype.toString;s.exports=function objectToString(s){return o.call(s)}},59399:(s,o,i)=>{\"use strict\";var a=i(25264).CopyToClipboard;a.CopyToClipboard=a,s.exports=a},59550:s=>{\"use strict\";s.exports=function(s,o){return{value:s,done:o}}},60183:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(13930),_=i(7376),w=i(36833),x=i(62250),C=i(47181),j=i(15972),L=i(79192),B=i(14840),$=i(61626),V=i(68055),U=i(76264),z=i(93742),Y=i(95116),Z=w.PROPER,ee=w.CONFIGURABLE,ie=Y.IteratorPrototype,ae=Y.BUGGY_SAFARI_ITERATORS,ce=U(\"iterator\"),le=\"keys\",pe=\"values\",de=\"entries\",returnThis=function(){return this};s.exports=function(s,o,i,w,U,Y,fe){C(i,o,w);var ye,be,_e,getIterationMethod=function(s){if(s===U&&Te)return Te;if(!ae&&s&&s in xe)return xe[s];switch(s){case le:return function keys(){return new i(this,s)};case pe:return function values(){return new i(this,s)};case de:return function entries(){return new i(this,s)}}return function(){return new i(this)}},Se=o+\" Iterator\",we=!1,xe=s.prototype,Pe=xe[ce]||xe[\"@@iterator\"]||U&&xe[U],Te=!ae&&Pe||getIterationMethod(U),Re=\"Array\"===o&&xe.entries||Pe;if(Re&&(ye=j(Re.call(new s)))!==Object.prototype&&ye.next&&(_||j(ye)===ie||(L?L(ye,ie):x(ye[ce])||V(ye,ce,returnThis)),B(ye,Se,!0,!0),_&&(z[Se]=returnThis)),Z&&U===pe&&Pe&&Pe.name!==pe&&(!_&&ee?$(xe,\"name\",pe):(we=!0,Te=function values(){return u(Pe,this)})),U)if(be={values:getIterationMethod(pe),keys:Y?Te:getIterationMethod(le),entries:getIterationMethod(de)},fe)for(_e in be)(ae||we||!(_e in xe))&&V(xe,_e,be[_e]);else a({target:o,proto:!0,forced:ae||we},be);return _&&!fe||xe[ce]===Te||V(xe,ce,Te,{name:U}),z[o]=Te,be}},60270:(s,o,i)=>{var a=i(87068),u=i(40346);s.exports=function baseIsEqual(s,o,i,_,w){return s===o||(null==s||null==o||!u(s)&&!u(o)?s!=s&&o!=o:a(s,o,i,_,baseIsEqual,w))}},60581:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(62250),_=i(46285),w=TypeError;s.exports=function(s,o){var i,x;if(\"string\"===o&&u(i=s.toString)&&!_(x=a(i,s)))return x;if(u(i=s.valueOf)&&!_(x=a(i,s)))return x;if(\"string\"!==o&&u(i=s.toString)&&!_(x=a(i,s)))return x;throw new w(\"Can't convert object to primitive value\")}},60680:(s,o,i)=>{var a=i(13222),u=/[\\\\^$.*+?()[\\]{}|]/g,_=RegExp(u.source);s.exports=function escapeRegExp(s){return(s=a(s))&&_.test(s)?s.replace(u,\"\\\\$&\"):s}},61045:(s,o,i)=>{const a=i(6048),u=i(23805),_=i(6233),w=i(87726),x=i(10866);s.exports=class ObjectElement extends _{constructor(s,o,i){super(s||[],o,i),this.element=\"object\"}primitive(){return\"object\"}toValue(){return this.content.reduce(((s,o)=>(s[o.key.toValue()]=o.value?o.value.toValue():void 0,s)),{})}get(s){const o=this.getMember(s);if(o)return o.value}getMember(s){if(void 0!==s)return this.content.find((o=>o.key.toValue()===s))}remove(s){let o=null;return this.content=this.content.filter((i=>i.key.toValue()!==s||(o=i,!1))),o}getKey(s){const o=this.getMember(s);if(o)return o.key}set(s,o){if(u(s))return Object.keys(s).forEach((o=>{this.set(o,s[o])})),this;const i=s,a=this.getMember(i);return a?a.value=o:this.content.push(new w(i,o)),this}keys(){return this.content.map((s=>s.key.toValue()))}values(){return this.content.map((s=>s.value.toValue()))}hasKey(s){return this.content.some((o=>o.key.equals(s)))}items(){return this.content.map((s=>[s.key.toValue(),s.value.toValue()]))}map(s,o){return this.content.map((i=>s.bind(o)(i.value,i.key,i)))}compactMap(s,o){const i=[];return this.forEach(((a,u,_)=>{const w=s.bind(o)(a,u,_);w&&i.push(w)})),i}filter(s,o){return new x(this.content).filter(s,o)}reject(s,o){return this.filter(a(s),o)}forEach(s,o){return this.content.forEach((i=>s.bind(o)(i.value,i.key,i)))}}},61074:s=>{s.exports=function asciiToArray(s){return s.split(\"\")}},61160:(s,o,i)=>{\"use strict\";var a=i(92063),u=i(73992),_=/^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,w=/[\\n\\r\\t]/g,x=/^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,C=/:\\d+$/,j=/^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,L=/^[a-zA-Z]:/;function trimLeft(s){return(s||\"\").toString().replace(_,\"\")}var B=[[\"#\",\"hash\"],[\"?\",\"query\"],function sanitize(s,o){return isSpecial(o.protocol)?s.replace(/\\\\/g,\"/\"):s},[\"/\",\"pathname\"],[\"@\",\"auth\",1],[NaN,\"host\",void 0,1,1],[/:(\\d*)$/,\"port\",void 0,1],[NaN,\"hostname\",void 0,1,1]],$={hash:1,query:1};function lolcation(s){var o,a=(\"undefined\"!=typeof window?window:void 0!==i.g?i.g:\"undefined\"!=typeof self?self:{}).location||{},u={},_=typeof(s=s||a);if(\"blob:\"===s.protocol)u=new Url(unescape(s.pathname),{});else if(\"string\"===_)for(o in u=new Url(s,{}),$)delete u[o];else if(\"object\"===_){for(o in s)o in $||(u[o]=s[o]);void 0===u.slashes&&(u.slashes=x.test(s.href))}return u}function isSpecial(s){return\"file:\"===s||\"ftp:\"===s||\"http:\"===s||\"https:\"===s||\"ws:\"===s||\"wss:\"===s}function extractProtocol(s,o){s=(s=trimLeft(s)).replace(w,\"\"),o=o||{};var i,a=j.exec(s),u=a[1]?a[1].toLowerCase():\"\",_=!!a[2],x=!!a[3],C=0;return _?x?(i=a[2]+a[3]+a[4],C=a[2].length+a[3].length):(i=a[2]+a[4],C=a[2].length):x?(i=a[3]+a[4],C=a[3].length):i=a[4],\"file:\"===u?C>=2&&(i=i.slice(2)):isSpecial(u)?i=a[4]:u?_&&(i=i.slice(2)):C>=2&&isSpecial(o.protocol)&&(i=a[4]),{protocol:u,slashes:_||isSpecial(u),slashesCount:C,rest:i}}function Url(s,o,i){if(s=(s=trimLeft(s)).replace(w,\"\"),!(this instanceof Url))return new Url(s,o,i);var _,x,C,j,$,V,U=B.slice(),z=typeof o,Y=this,Z=0;for(\"object\"!==z&&\"string\"!==z&&(i=o,o=null),i&&\"function\"!=typeof i&&(i=u.parse),_=!(x=extractProtocol(s||\"\",o=lolcation(o))).protocol&&!x.slashes,Y.slashes=x.slashes||_&&o.slashes,Y.protocol=x.protocol||o.protocol||\"\",s=x.rest,(\"file:\"===x.protocol&&(2!==x.slashesCount||L.test(s))||!x.slashes&&(x.protocol||x.slashesCount<2||!isSpecial(Y.protocol)))&&(U[3]=[/(.*)/,\"pathname\"]);Z<U.length;Z++)\"function\"!=typeof(j=U[Z])?(C=j[0],V=j[1],C!=C?Y[V]=s:\"string\"==typeof C?~($=\"@\"===C?s.lastIndexOf(C):s.indexOf(C))&&(\"number\"==typeof j[2]?(Y[V]=s.slice(0,$),s=s.slice($+j[2])):(Y[V]=s.slice($),s=s.slice(0,$))):($=C.exec(s))&&(Y[V]=$[1],s=s.slice(0,$.index)),Y[V]=Y[V]||_&&j[3]&&o[V]||\"\",j[4]&&(Y[V]=Y[V].toLowerCase())):s=j(s,Y);i&&(Y.query=i(Y.query)),_&&o.slashes&&\"/\"!==Y.pathname.charAt(0)&&(\"\"!==Y.pathname||\"\"!==o.pathname)&&(Y.pathname=function resolve(s,o){if(\"\"===s)return o;for(var i=(o||\"/\").split(\"/\").slice(0,-1).concat(s.split(\"/\")),a=i.length,u=i[a-1],_=!1,w=0;a--;)\".\"===i[a]?i.splice(a,1):\"..\"===i[a]?(i.splice(a,1),w++):w&&(0===a&&(_=!0),i.splice(a,1),w--);return _&&i.unshift(\"\"),\".\"!==u&&\"..\"!==u||i.push(\"\"),i.join(\"/\")}(Y.pathname,o.pathname)),\"/\"!==Y.pathname.charAt(0)&&isSpecial(Y.protocol)&&(Y.pathname=\"/\"+Y.pathname),a(Y.port,Y.protocol)||(Y.host=Y.hostname,Y.port=\"\"),Y.username=Y.password=\"\",Y.auth&&(~($=Y.auth.indexOf(\":\"))?(Y.username=Y.auth.slice(0,$),Y.username=encodeURIComponent(decodeURIComponent(Y.username)),Y.password=Y.auth.slice($+1),Y.password=encodeURIComponent(decodeURIComponent(Y.password))):Y.username=encodeURIComponent(decodeURIComponent(Y.auth)),Y.auth=Y.password?Y.username+\":\"+Y.password:Y.username),Y.origin=\"file:\"!==Y.protocol&&isSpecial(Y.protocol)&&Y.host?Y.protocol+\"//\"+Y.host:\"null\",Y.href=Y.toString()}Url.prototype={set:function set(s,o,i){var _=this;switch(s){case\"query\":\"string\"==typeof o&&o.length&&(o=(i||u.parse)(o)),_[s]=o;break;case\"port\":_[s]=o,a(o,_.protocol)?o&&(_.host=_.hostname+\":\"+o):(_.host=_.hostname,_[s]=\"\");break;case\"hostname\":_[s]=o,_.port&&(o+=\":\"+_.port),_.host=o;break;case\"host\":_[s]=o,C.test(o)?(o=o.split(\":\"),_.port=o.pop(),_.hostname=o.join(\":\")):(_.hostname=o,_.port=\"\");break;case\"protocol\":_.protocol=o.toLowerCase(),_.slashes=!i;break;case\"pathname\":case\"hash\":if(o){var w=\"pathname\"===s?\"/\":\"#\";_[s]=o.charAt(0)!==w?w+o:o}else _[s]=o;break;case\"username\":case\"password\":_[s]=encodeURIComponent(o);break;case\"auth\":var x=o.indexOf(\":\");~x?(_.username=o.slice(0,x),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=o.slice(x+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(o))}for(var j=0;j<B.length;j++){var L=B[j];L[4]&&(_[L[1]]=_[L[1]].toLowerCase())}return _.auth=_.password?_.username+\":\"+_.password:_.username,_.origin=\"file:\"!==_.protocol&&isSpecial(_.protocol)&&_.host?_.protocol+\"//\"+_.host:\"null\",_.href=_.toString(),_},toString:function toString(s){s&&\"function\"==typeof s||(s=u.stringify);var o,i=this,a=i.host,_=i.protocol;_&&\":\"!==_.charAt(_.length-1)&&(_+=\":\");var w=_+(i.protocol&&i.slashes||isSpecial(i.protocol)?\"//\":\"\");return i.username?(w+=i.username,i.password&&(w+=\":\"+i.password),w+=\"@\"):i.password?(w+=\":\"+i.password,w+=\"@\"):\"file:\"!==i.protocol&&isSpecial(i.protocol)&&!a&&\"/\"!==i.pathname&&(w+=\"@\"),(\":\"===a[a.length-1]||C.test(i.hostname)&&!i.port)&&(a+=\":\"),w+=a+i.pathname,(o=\"object\"==typeof i.query?s(i.query):i.query)&&(w+=\"?\"!==o.charAt(0)?\"?\"+o:o),i.hash&&(w+=i.hash),w}},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=u,s.exports=Url},61448:(s,o,i)=>{var a=i(20426),u=i(49326);s.exports=function has(s,o){return null!=s&&u(s,o,a)}},61489:(s,o,i)=>{var a=i(17400);s.exports=function toInteger(s){var o=a(s),i=o%1;return o==o?i?o-i:o:0}},61626:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(74284),_=i(75817);s.exports=a?function(s,o,i){return u.f(s,o,_(1,i))}:function(s,o,i){return s[o]=i,s}},61747:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(92046);s.exports=function(s,o){var i=u[s+\"Prototype\"],_=i&&i[o];if(_)return _;var w=a[s],x=w&&w.prototype;return x&&x[o]}},61802:(s,o,i)=>{var a=i(62224),u=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,_=/\\\\(\\\\)?/g,w=a((function(s){var o=[];return 46===s.charCodeAt(0)&&o.push(\"\"),s.replace(u,(function(s,i,a,u){o.push(a?u.replace(_,\"$1\"):i||s)})),o}));s.exports=w},62006:(s,o,i)=>{var a=i(15389),u=i(64894),_=i(95950);s.exports=function createFind(s){return function(o,i,w){var x=Object(o);if(!u(o)){var C=a(i,3);o=_(o),i=function(s){return C(x[s],s,x)}}var j=s(o,i,w);return j>-1?x[C?o[j]:j]:void 0}}},62060:s=>{var o=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;s.exports=function insertWrapDetails(s,i){var a=i.length;if(!a)return s;var u=a-1;return i[u]=(a>1?\"& \":\"\")+i[u],i=i.join(a>2?\", \":\" \"),s.replace(o,\"{\\n/* [wrapped with \"+i+\"] */\\n\")}},62193:(s,o,i)=>{var a=i(88984),u=i(5861),_=i(72428),w=i(56449),x=i(64894),C=i(3656),j=i(55527),L=i(37167),B=Object.prototype.hasOwnProperty;s.exports=function isEmpty(s){if(null==s)return!0;if(x(s)&&(w(s)||\"string\"==typeof s||\"function\"==typeof s.splice||C(s)||L(s)||_(s)))return!s.length;var o=u(s);if(\"[object Map]\"==o||\"[object Set]\"==o)return!s.size;if(j(s))return!a(s).length;for(var i in s)if(B.call(s,i))return!1;return!0}},62224:(s,o,i)=>{var a=i(50104);s.exports=function memoizeCapped(s){var o=a(s,(function(s){return 500===i.size&&i.clear(),s})),i=o.cache;return o}},62250:s=>{\"use strict\";var o=\"object\"==typeof document&&document.all;s.exports=void 0===o&&void 0!==o?function(s){return\"function\"==typeof s||s===o}:function(s){return\"function\"==typeof s}},62284:(s,o,i)=>{var a=i(84629),u=Object.prototype.hasOwnProperty;s.exports=function getFuncName(s){for(var o=s.name+\"\",i=a[o],_=u.call(a,o)?i.length:0;_--;){var w=i[_],x=w.func;if(null==x||x==s)return w.name}return o}},62416:(s,o,i)=>{\"use strict\";var a=i(85582);s.exports=a(\"document\",\"documentElement\")},62802:(s,o,i)=>{var a=s.exports=function SHA(s){s=s.toLowerCase();var o=a[s];if(!o)throw new Error(s+\" is not supported (we accept pull requests)\");return new o};a.sha=i(27816),a.sha1=i(63737),a.sha224=i(26710),a.sha256=i(24107),a.sha384=i(32827),a.sha512=i(82890)},63040:(s,o,i)=>{var a=i(21549),u=i(80079),_=i(68223);s.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new a,map:new(_||u),string:new a}}},63345:s=>{s.exports=function stubArray(){return[]}},63560:(s,o,i)=>{var a=i(73170);s.exports=function set(s,o,i){return null==s?s:a(s,o,i)}},63600:(s,o,i)=>{\"use strict\";s.exports=PassThrough;var a=i(74610);function PassThrough(s){if(!(this instanceof PassThrough))return new PassThrough(s);a.call(this,s)}i(56698)(PassThrough,a),PassThrough.prototype._transform=function(s,o,i){i(null,s)}},63605:s=>{s.exports=function stackGet(s){return this.__data__.get(s)}},63702:s=>{s.exports=function listCacheClear(){this.__data__=[],this.size=0}},63737:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1518500249,1859775393,-1894007588,-899497514],x=new Array(80);function Sha1(){this.init(),this._w=x,u.call(this,64,56)}function rotl5(s){return s<<5|s>>>27}function rotl30(s){return s<<30|s>>>2}function ft(s,o,i,a){return 0===s?o&i|~o&a:2===s?o&i|o&a|i&a:o^i^a}a(Sha1,u),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(s){for(var o,i=this._w,a=0|this._a,u=0|this._b,_=0|this._c,x=0|this._d,C=0|this._e,j=0;j<16;++j)i[j]=s.readInt32BE(4*j);for(;j<80;++j)i[j]=(o=i[j-3]^i[j-8]^i[j-14]^i[j-16])<<1|o>>>31;for(var L=0;L<80;++L){var B=~~(L/20),$=rotl5(a)+ft(B,u,_,x)+C+i[L]+w[B]|0;C=x,x=_,_=rotl30(u),u=a,a=$}this._a=a+this._a|0,this._b=u+this._b|0,this._c=_+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0},Sha1.prototype._hash=function(){var s=_.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha1},63862:s=>{s.exports=function hashDelete(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}},63912:(s,o,i)=>{var a=i(61074),u=i(49698),_=i(42054);s.exports=function stringToArray(s){return u(s)?_(s):a(s)}},63950:s=>{s.exports=function noop(){}},64502:(s,o,i)=>{\"use strict\";i(82048)},64626:(s,o,i)=>{var a=i(66977);s.exports=function ary(s,o,i){return o=i?void 0:o,o=s&&null==o?s.length:o,a(s,128,void 0,void 0,void 0,void 0,o)}},64894:(s,o,i)=>{var a=i(1882),u=i(30294);s.exports=function isArrayLike(s){return null!=s&&u(s.length)&&!a(s)}},64932:(s,o,i)=>{\"use strict\";var a,u,_,w=i(40551),x=i(45951),C=i(46285),j=i(61626),L=i(49724),B=i(36128),$=i(92522),V=i(38530),U=\"Object already initialized\",z=x.TypeError,Y=x.WeakMap;if(w||B.state){var Z=B.state||(B.state=new Y);Z.get=Z.get,Z.has=Z.has,Z.set=Z.set,a=function(s,o){if(Z.has(s))throw new z(U);return o.facade=s,Z.set(s,o),o},u=function(s){return Z.get(s)||{}},_=function(s){return Z.has(s)}}else{var ee=$(\"state\");V[ee]=!0,a=function(s,o){if(L(s,ee))throw new z(U);return o.facade=s,j(s,ee,o),o},u=function(s){return L(s,ee)?s[ee]:{}},_=function(s){return L(s,ee)}}s.exports={set:a,get:u,has:_,enforce:function(s){return _(s)?u(s):a(s,{})},getterFor:function(s){return function(o){var i;if(!C(o)||(i=u(o)).type!==s)throw new z(\"Incompatible receiver, \"+s+\" required\");return i}}}},65291:(s,o,i)=>{\"use strict\";var a=i(86048).F.ERR_INVALID_OPT_VALUE;s.exports={getHighWaterMark:function getHighWaterMark(s,o,i,u){var _=function highWaterMarkFrom(s,o,i){return null!=s.highWaterMark?s.highWaterMark:o?s[i]:null}(o,u,i);if(null!=_){if(!isFinite(_)||Math.floor(_)!==_||_<0)throw new a(u?i:\"highWaterMark\",_);return Math.floor(_)}return s.objectMode?16:16384}}},65482:(s,o,i)=>{\"use strict\";var a=i(41176);s.exports=function(s){var o=+s;return o!=o||0===o?0:a(o)}},65606:s=>{var o,i,a=s.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(s){if(o===setTimeout)return setTimeout(s,0);if((o===defaultSetTimout||!o)&&setTimeout)return o=setTimeout,setTimeout(s,0);try{return o(s,0)}catch(i){try{return o.call(null,s,0)}catch(i){return o.call(this,s,0)}}}!function(){try{o=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(s){o=defaultSetTimout}try{i=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(s){i=defaultClearTimeout}}();var u,_=[],w=!1,x=-1;function cleanUpNextTick(){w&&u&&(w=!1,u.length?_=u.concat(_):x=-1,_.length&&drainQueue())}function drainQueue(){if(!w){var s=runTimeout(cleanUpNextTick);w=!0;for(var o=_.length;o;){for(u=_,_=[];++x<o;)u&&u[x].run();x=-1,o=_.length}u=null,w=!1,function runClearTimeout(s){if(i===clearTimeout)return clearTimeout(s);if((i===defaultClearTimeout||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(s);try{return i(s)}catch(o){try{return i.call(null,s)}catch(o){return i.call(this,s)}}}(s)}}function Item(s,o){this.fun=s,this.array=o}function noop(){}a.nextTick=function(s){var o=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)o[i-1]=arguments[i];_.push(new Item(s,o)),1!==_.length||w||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},a.title=\"browser\",a.browser=!0,a.env={},a.argv=[],a.version=\"\",a.versions={},a.on=noop,a.addListener=noop,a.once=noop,a.off=noop,a.removeListener=noop,a.removeAllListeners=noop,a.emit=noop,a.prependListener=noop,a.prependOnceListener=noop,a.listeners=function(s){return[]},a.binding=function(s){throw new Error(\"process.binding is not supported\")},a.cwd=function(){return\"/\"},a.chdir=function(s){throw new Error(\"process.chdir is not supported\")},a.umask=function(){return 0}},65772:s=>{s.exports=function json(s){const o={literal:\"true false null\"},i=[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],a=[s.QUOTE_STRING_MODE,s.C_NUMBER_MODE],u={end:\",\",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:o},_={begin:/\\{/,end:/\\}/,contains:[{className:\"attr\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE],illegal:\"\\\\n\"},s.inherit(u,{begin:/:/})].concat(i),illegal:\"\\\\S\"},w={begin:\"\\\\[\",end:\"\\\\]\",contains:[s.inherit(u)],illegal:\"\\\\S\"};return a.push(_,w),i.forEach((function(s){a.push(s)})),{name:\"JSON\",contains:a,keywords:o,illegal:\"\\\\S\"}}},66645:(s,o,i)=>{var a=i(1733),u=i(45434),_=i(13222),w=i(22225);s.exports=function words(s,o,i){return s=_(s),void 0===(o=i?void 0:o)?u(s)?w(s):a(s):s.match(o)||[]}},66721:(s,o,i)=>{var a=i(81042),u=Object.prototype.hasOwnProperty;s.exports=function hashGet(s){var o=this.__data__;if(a){var i=o[s];return\"__lodash_hash_undefined__\"===i?void 0:i}return u.call(o,s)?o[s]:void 0}},66977:(s,o,i)=>{var a=i(68882),u=i(11842),_=i(77078),w=i(37471),x=i(24168),C=i(37381),j=i(3209),L=i(54641),B=i(70981),$=i(61489),V=Math.max;s.exports=function createWrap(s,o,i,U,z,Y,Z,ee){var ie=2&o;if(!ie&&\"function\"!=typeof s)throw new TypeError(\"Expected a function\");var ae=U?U.length:0;if(ae||(o&=-97,U=z=void 0),Z=void 0===Z?Z:V($(Z),0),ee=void 0===ee?ee:$(ee),ae-=z?z.length:0,64&o){var ce=U,le=z;U=z=void 0}var pe=ie?void 0:C(s),de=[s,o,i,U,z,ce,le,Y,Z,ee];if(pe&&j(de,pe),s=de[0],o=de[1],i=de[2],U=de[3],z=de[4],!(ee=de[9]=void 0===de[9]?ie?0:s.length:V(de[9]-ae,0))&&24&o&&(o&=-25),o&&1!=o)fe=8==o||16==o?_(s,o,ee):32!=o&&33!=o||z.length?w.apply(void 0,de):x(s,o,i,U);else var fe=u(s,o,i);return B((pe?a:L)(fe,de),s,o)}},67197:s=>{s.exports=function matchesStrictComparable(s,o){return function(i){return null!=i&&(i[s]===o&&(void 0!==o||s in Object(i)))}}},67526:(s,o)=>{\"use strict\";o.byteLength=function byteLength(s){var o=getLens(s),i=o[0],a=o[1];return 3*(i+a)/4-a},o.toByteArray=function toByteArray(s){var o,i,_=getLens(s),w=_[0],x=_[1],C=new u(function _byteLength(s,o,i){return 3*(o+i)/4-i}(0,w,x)),j=0,L=x>0?w-4:w;for(i=0;i<L;i+=4)o=a[s.charCodeAt(i)]<<18|a[s.charCodeAt(i+1)]<<12|a[s.charCodeAt(i+2)]<<6|a[s.charCodeAt(i+3)],C[j++]=o>>16&255,C[j++]=o>>8&255,C[j++]=255&o;2===x&&(o=a[s.charCodeAt(i)]<<2|a[s.charCodeAt(i+1)]>>4,C[j++]=255&o);1===x&&(o=a[s.charCodeAt(i)]<<10|a[s.charCodeAt(i+1)]<<4|a[s.charCodeAt(i+2)]>>2,C[j++]=o>>8&255,C[j++]=255&o);return C},o.fromByteArray=function fromByteArray(s){for(var o,a=s.length,u=a%3,_=[],w=16383,x=0,C=a-u;x<C;x+=w)_.push(encodeChunk(s,x,x+w>C?C:x+w));1===u?(o=s[a-1],_.push(i[o>>2]+i[o<<4&63]+\"==\")):2===u&&(o=(s[a-2]<<8)+s[a-1],_.push(i[o>>10]+i[o>>4&63]+i[o<<2&63]+\"=\"));return _.join(\"\")};for(var i=[],a=[],u=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,_=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",w=0;w<64;++w)i[w]=_[w],a[_.charCodeAt(w)]=w;function getLens(s){var o=s.length;if(o%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var i=s.indexOf(\"=\");return-1===i&&(i=o),[i,i===o?0:4-i%4]}function encodeChunk(s,o,a){for(var u,_,w=[],x=o;x<a;x+=3)u=(s[x]<<16&16711680)+(s[x+1]<<8&65280)+(255&s[x+2]),w.push(i[(_=u)>>18&63]+i[_>>12&63]+i[_>>6&63]+i[63&_]);return w.join(\"\")}a[\"-\".charCodeAt(0)]=62,a[\"_\".charCodeAt(0)]=63},68055:(s,o,i)=>{\"use strict\";var a=i(61626);s.exports=function(s,o,i,u){return u&&u.enumerable?s[o]=i:a(s,o,i),s}},68090:s=>{s.exports=function last(s){var o=null==s?0:s.length;return o?s[o-1]:void 0}},68223:(s,o,i)=>{var a=i(56110)(i(9325),\"Map\");s.exports=a},68294:(s,o,i)=>{var a=i(23007),u=i(30361),_=Math.min;s.exports=function reorder(s,o){for(var i=s.length,w=_(o.length,i),x=a(s);w--;){var C=o[w];s[w]=u(C,i)?x[C]:void 0}return s}},68623:(s,o,i)=>{\"use strict\";var a=i(694);s.exports=a},68882:(s,o,i)=>{var a=i(83488),u=i(48152),_=u?function(s,o){return u.set(s,o),s}:a;s.exports=_},68969:(s,o,i)=>{var a=i(47422),u=i(25160);s.exports=function parent(s,o){return o.length<2?s:a(s,u(o,0,-1))}},69302:(s,o,i)=>{var a=i(83488),u=i(56757),_=i(32865);s.exports=function baseRest(s,o){return _(u(s,o,a),s+\"\")}},69884:(s,o,i)=>{var a=i(21791),u=i(37241);s.exports=function toPlainObject(s){return a(s,u(s))}},69982:(s,o,i)=>{\"use strict\";s.exports=i(29844)},70080:(s,o,i)=>{var a=i(26025),u=Array.prototype.splice;s.exports=function listCacheDelete(s){var o=this.__data__,i=a(o,s);return!(i<0)&&(i==o.length-1?o.pop():u.call(o,i,1),--this.size,!0)}},70470:(s,o,i)=>{\"use strict\";var a=i(46028),u=i(25594);s.exports=function(s){var o=a(s,\"string\");return u(o)?o:o+\"\"}},70695:(s,o,i)=>{var a=i(78096),u=i(72428),_=i(56449),w=i(3656),x=i(30361),C=i(37167),j=Object.prototype.hasOwnProperty;s.exports=function arrayLikeKeys(s,o){var i=_(s),L=!i&&u(s),B=!i&&!L&&w(s),$=!i&&!L&&!B&&C(s),V=i||L||B||$,U=V?a(s.length,String):[],z=U.length;for(var Y in s)!o&&!j.call(s,Y)||V&&(\"length\"==Y||B&&(\"offset\"==Y||\"parent\"==Y)||$&&(\"buffer\"==Y||\"byteLength\"==Y||\"byteOffset\"==Y)||x(Y,z))||U.push(Y);return U}},70981:(s,o,i)=>{var a=i(75251),u=i(62060),_=i(32865),w=i(75948);s.exports=function setWrapToString(s,o,i){var x=o+\"\";return _(s,u(x,w(a(x),i)))}},71167:(s,o,i)=>{const a=i(10316);s.exports=class StringElement extends a{constructor(s,o,i){super(s,o,i),this.element=\"string\"}primitive(){return\"string\"}get length(){return this.content.length}}},71340:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(29538);a({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==u},{assign:u})},71961:(s,o,i)=>{var a=i(49653);s.exports=function cloneTypedArray(s,o){var i=o?a(s.buffer):s.buffer;return new s.constructor(i,s.byteOffset,s.length)}},72428:(s,o,i)=>{var a=i(27534),u=i(40346),_=Object.prototype,w=_.hasOwnProperty,x=_.propertyIsEnumerable,C=a(function(){return arguments}())?a:function(s){return u(s)&&w.call(s,\"callee\")&&!x.call(s,\"callee\")};s.exports=C},72552:(s,o,i)=>{var a=i(51873),u=i(659),_=i(59350),w=a?a.toStringTag:void 0;s.exports=function baseGetTag(s){return null==s?void 0===s?\"[object Undefined]\":\"[object Null]\":w&&w in Object(s)?u(s):_(s)}},72903:(s,o,i)=>{var a=i(23805),u=i(55527),_=i(90181),w=Object.prototype.hasOwnProperty;s.exports=function baseKeysIn(s){if(!a(s))return _(s);var o=u(s),i=[];for(var x in s)(\"constructor\"!=x||!o&&w.call(s,x))&&i.push(x);return i}},72949:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheSet(s,o){var i=a(this,s),u=i.size;return i.set(s,o),this.size+=i.size==u?0:1,this}},73170:(s,o,i)=>{var a=i(16547),u=i(31769),_=i(30361),w=i(23805),x=i(77797);s.exports=function baseSet(s,o,i,C){if(!w(s))return s;for(var j=-1,L=(o=u(o,s)).length,B=L-1,$=s;null!=$&&++j<L;){var V=x(o[j]),U=i;if(\"__proto__\"===V||\"constructor\"===V||\"prototype\"===V)return s;if(j!=B){var z=$[V];void 0===(U=C?C(z,V,$):void 0)&&(U=w(z)?z:_(o[j+1])?[]:{})}a($,V,U),$=$[V]}return s}},73201:s=>{var o=/\\w*$/;s.exports=function cloneRegExp(s){var i=new s.constructor(s.source,o.exec(s));return i.lastIndex=s.lastIndex,i}},73402:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function http(s){const o=\"HTTP/(2|1\\\\.[01])\",i={className:\"attribute\",begin:concat(\"^\",/[A-Za-z][A-Za-z0-9-]*/,\"(?=\\\\:\\\\s)\"),starts:{contains:[{className:\"punctuation\",begin:/: /,relevance:0,starts:{end:\"$\",relevance:0}}]}},a=[i,{begin:\"\\\\n\\\\n\",starts:{subLanguage:[],endsWithParent:!0}}];return{name:\"HTTP\",aliases:[\"https\"],illegal:/\\S/,contains:[{begin:\"^(?=\"+o+\" \\\\d{3})\",end:/$/,contains:[{className:\"meta\",begin:o},{className:\"number\",begin:\"\\\\b\\\\d{3}\\\\b\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:a}},{begin:\"(?=^[A-Z]+ (.*?) \"+o+\"$)\",end:/$/,contains:[{className:\"string\",begin:\" \",end:\" \",excludeBegin:!0,excludeEnd:!0},{className:\"meta\",begin:o},{className:\"keyword\",begin:\"[A-Z]+\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:a}},s.inherit(i,{relevance:0})]}}},73424:(s,o,i)=>{var a=i(16962),u=i(2874),_=Array.prototype.push;function baseAry(s,o){return 2==o?function(o,i){return s(o,i)}:function(o){return s(o)}}function cloneArray(s){for(var o=s?s.length:0,i=Array(o);o--;)i[o]=s[o];return i}function wrapImmutable(s,o){return function(){var i=arguments.length;if(i){for(var a=Array(i);i--;)a[i]=arguments[i];var u=a[0]=o.apply(void 0,a);return s.apply(void 0,a),u}}}s.exports=function baseConvert(s,o,i,w){var x=\"function\"==typeof o,C=o===Object(o);if(C&&(w=i,i=o,o=void 0),null==i)throw new TypeError;w||(w={});var j=!(\"cap\"in w)||w.cap,L=!(\"curry\"in w)||w.curry,B=!(\"fixed\"in w)||w.fixed,$=!(\"immutable\"in w)||w.immutable,V=!(\"rearg\"in w)||w.rearg,U=x?i:u,z=\"curry\"in w&&w.curry,Y=\"fixed\"in w&&w.fixed,Z=\"rearg\"in w&&w.rearg,ee=x?i.runInContext():void 0,ie=x?i:{ary:s.ary,assign:s.assign,clone:s.clone,curry:s.curry,forEach:s.forEach,isArray:s.isArray,isError:s.isError,isFunction:s.isFunction,isWeakMap:s.isWeakMap,iteratee:s.iteratee,keys:s.keys,rearg:s.rearg,toInteger:s.toInteger,toPath:s.toPath},ae=ie.ary,ce=ie.assign,le=ie.clone,pe=ie.curry,de=ie.forEach,fe=ie.isArray,ye=ie.isError,be=ie.isFunction,_e=ie.isWeakMap,Se=ie.keys,we=ie.rearg,xe=ie.toInteger,Pe=ie.toPath,Te=Se(a.aryMethod),Re={castArray:function(s){return function(){var o=arguments[0];return fe(o)?s(cloneArray(o)):s.apply(void 0,arguments)}},iteratee:function(s){return function(){var o=arguments[1],i=s(arguments[0],o),a=i.length;return j&&\"number\"==typeof o?(o=o>2?o-2:1,a&&a<=o?i:baseAry(i,o)):i}},mixin:function(s){return function(o){var i=this;if(!be(i))return s(i,Object(o));var a=[];return de(Se(o),(function(s){be(o[s])&&a.push([s,i.prototype[s]])})),s(i,Object(o)),de(a,(function(s){var o=s[1];be(o)?i.prototype[s[0]]=o:delete i.prototype[s[0]]})),i}},nthArg:function(s){return function(o){var i=o<0?1:xe(o)+1;return pe(s(o),i)}},rearg:function(s){return function(o,i){var a=i?i.length:0;return pe(s(o,i),a)}},runInContext:function(o){return function(i){return baseConvert(s,o(i),w)}}};function castCap(s,o){if(j){var i=a.iterateeRearg[s];if(i)return function iterateeRearg(s,o){return overArg(s,(function(s){var i=o.length;return function baseArity(s,o){return 2==o?function(o,i){return s.apply(void 0,arguments)}:function(o){return s.apply(void 0,arguments)}}(we(baseAry(s,i),o),i)}))}(o,i);var u=!x&&a.iterateeAry[s];if(u)return function iterateeAry(s,o){return overArg(s,(function(s){return\"function\"==typeof s?baseAry(s,o):s}))}(o,u)}return o}function castFixed(s,o,i){if(B&&(Y||!a.skipFixed[s])){var u=a.methodSpread[s],w=u&&u.start;return void 0===w?ae(o,i):function flatSpread(s,o){return function(){for(var i=arguments.length,a=i-1,u=Array(i);i--;)u[i]=arguments[i];var w=u[o],x=u.slice(0,o);return w&&_.apply(x,w),o!=a&&_.apply(x,u.slice(o+1)),s.apply(this,x)}}(o,w)}return o}function castRearg(s,o,i){return V&&i>1&&(Z||!a.skipRearg[s])?we(o,a.methodRearg[s]||a.aryRearg[i]):o}function cloneByPath(s,o){for(var i=-1,a=(o=Pe(o)).length,u=a-1,_=le(Object(s)),w=_;null!=w&&++i<a;){var x=o[i],C=w[x];null==C||be(C)||ye(C)||_e(C)||(w[x]=le(i==u?C:Object(C))),w=w[x]}return _}function createConverter(s,o){var i=a.aliasToReal[s]||s,u=a.remap[i]||i,_=w;return function(s){var a=x?ee:ie,w=x?ee[u]:o,C=ce(ce({},_),s);return baseConvert(a,i,w,C)}}function overArg(s,o){return function(){var i=arguments.length;if(!i)return s();for(var a=Array(i);i--;)a[i]=arguments[i];var u=V?0:i-1;return a[u]=o(a[u]),s.apply(void 0,a)}}function wrap(s,o,i){var u,_=a.aliasToReal[s]||s,w=o,x=Re[_];return x?w=x(o):$&&(a.mutate.array[_]?w=wrapImmutable(o,cloneArray):a.mutate.object[_]?w=wrapImmutable(o,function createCloner(s){return function(o){return s({},o)}}(o)):a.mutate.set[_]&&(w=wrapImmutable(o,cloneByPath))),de(Te,(function(s){return de(a.aryMethod[s],(function(o){if(_==o){var i=a.methodSpread[_],x=i&&i.afterRearg;return u=x?castFixed(_,castRearg(_,w,s),s):castRearg(_,castFixed(_,w,s),s),u=function castCurry(s,o,i){return z||L&&i>1?pe(o,i):o}(0,u=castCap(_,u),s),!1}})),!u})),u||(u=w),u==o&&(u=z?pe(u,1):function(){return o.apply(this,arguments)}),u.convert=createConverter(_,o),u.placeholder=o.placeholder=i,u}if(!C)return wrap(o,i,U);var $e=i,qe=[];return de(Te,(function(s){de(a.aryMethod[s],(function(s){var o=$e[a.remap[s]||s];o&&qe.push([s,wrap(s,o,$e)])}))})),de(Se($e),(function(s){var o=$e[s];if(\"function\"==typeof o){for(var i=qe.length;i--;)if(qe[i][0]==s)return;o.convert=createConverter(s,o),qe.push([s,o])}})),de(qe,(function(s){$e[s[0]]=s[1]})),$e.convert=function convertLib(s){return $e.runInContext.convert(s)(void 0)},$e.placeholder=$e,de(Se($e),(function(s){de(a.realToAlias[s]||[],(function(o){$e[o]=$e[s]}))})),$e}},73448:(s,o,i)=>{\"use strict\";var a=i(73948),u=i(29367),_=i(87136),w=i(93742),x=i(76264)(\"iterator\");s.exports=function(s){if(!_(s))return u(s,x)||u(s,\"@@iterator\")||w[a(s)]}},73648:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(98828),_=i(49552);s.exports=!a&&!u((function(){return 7!==Object.defineProperty(_(\"div\"),\"a\",{get:function(){return 7}}).a}))},73948:(s,o,i)=>{\"use strict\";var a=i(52623),u=i(62250),_=i(45807),w=i(76264)(\"toStringTag\"),x=Object,C=\"Arguments\"===_(function(){return arguments}());s.exports=a?_:function(s){var o,i,a;return void 0===s?\"Undefined\":null===s?\"Null\":\"string\"==typeof(i=function(s,o){try{return s[o]}catch(s){}}(o=x(s),w))?i:C?_(o):\"Object\"===(a=_(o))&&u(o.callee)?\"Arguments\":a}},73992:(s,o)=>{\"use strict\";var i=Object.prototype.hasOwnProperty;function decode(s){try{return decodeURIComponent(s.replace(/\\+/g,\" \"))}catch(s){return null}}function encode(s){try{return encodeURIComponent(s)}catch(s){return null}}o.stringify=function querystringify(s,o){o=o||\"\";var a,u,_=[];for(u in\"string\"!=typeof o&&(o=\"?\"),s)if(i.call(s,u)){if((a=s[u])||null!=a&&!isNaN(a)||(a=\"\"),u=encode(u),a=encode(a),null===u||null===a)continue;_.push(u+\"=\"+a)}return _.length?o+_.join(\"&\"):\"\"},o.parse=function querystring(s){for(var o,i=/([^=?#&]+)=?([^&]*)/g,a={};o=i.exec(s);){var u=decode(o[1]),_=decode(o[2]);null===u||null===_||u in a||(a[u]=_)}return a}},74218:s=>{s.exports=function isKeyable(s){var o=typeof s;return\"string\"==o||\"number\"==o||\"symbol\"==o||\"boolean\"==o?\"__proto__\"!==s:null===s}},74239:(s,o,i)=>{\"use strict\";var a=i(87136),u=TypeError;s.exports=function(s){if(a(s))throw new u(\"Can't call method on \"+s);return s}},74284:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(73648),_=i(58661),w=i(36624),x=i(70470),C=TypeError,j=Object.defineProperty,L=Object.getOwnPropertyDescriptor,B=\"enumerable\",$=\"configurable\",V=\"writable\";o.f=a?_?function defineProperty(s,o,i){if(w(s),o=x(o),w(i),\"function\"==typeof s&&\"prototype\"===o&&\"value\"in i&&V in i&&!i[V]){var a=L(s,o);a&&a[V]&&(s[o]=i.value,i={configurable:$ in i?i[$]:a[$],enumerable:B in i?i[B]:a[B],writable:!1})}return j(s,o,i)}:j:function defineProperty(s,o,i){if(w(s),o=x(o),w(i),u)try{return j(s,o,i)}catch(s){}if(\"get\"in i||\"set\"in i)throw new C(\"Accessors not supported\");return\"value\"in i&&(s[o]=i.value),s}},74335:s=>{s.exports=function overArg(s,o){return function(i){return s(o(i))}}},74436:(s,o,i)=>{\"use strict\";var a=i(4993),u=i(34849),_=i(20575),createMethod=function(s){return function(o,i,w){var x=a(o),C=_(x);if(0===C)return!s&&-1;var j,L=u(w,C);if(s&&i!=i){for(;C>L;)if((j=x[L++])!=j)return!0}else for(;C>L;L++)if((s||L in x)&&x[L]===i)return s||L||0;return!s&&-1}};s.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},74610:(s,o,i)=>{\"use strict\";s.exports=Transform;var a=i(86048).F,u=a.ERR_METHOD_NOT_IMPLEMENTED,_=a.ERR_MULTIPLE_CALLBACK,w=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,x=a.ERR_TRANSFORM_WITH_LENGTH_0,C=i(25382);function afterTransform(s,o){var i=this._transformState;i.transforming=!1;var a=i.writecb;if(null===a)return this.emit(\"error\",new _);i.writechunk=null,i.writecb=null,null!=o&&this.push(o),a(s);var u=this._readableState;u.reading=!1,(u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}function Transform(s){if(!(this instanceof Transform))return new Transform(s);C.call(this,s),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,s&&(\"function\"==typeof s.transform&&(this._transform=s.transform),\"function\"==typeof s.flush&&(this._flush=s.flush)),this.on(\"prefinish\",prefinish)}function prefinish(){var s=this;\"function\"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(o,i){done(s,o,i)}))}function done(s,o,i){if(o)return s.emit(\"error\",o);if(null!=i&&s.push(i),s._writableState.length)throw new x;if(s._transformState.transforming)throw new w;return s.push(null)}i(56698)(Transform,C),Transform.prototype.push=function(s,o){return this._transformState.needTransform=!1,C.prototype.push.call(this,s,o)},Transform.prototype._transform=function(s,o,i){i(new u(\"_transform()\"))},Transform.prototype._write=function(s,o,i){var a=this._transformState;if(a.writecb=i,a.writechunk=s,a.writeencoding=o,!a.transforming){var u=this._readableState;(a.needTransform||u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}},Transform.prototype._read=function(s){var o=this._transformState;null===o.writechunk||o.transforming?o.needTransform=!0:(o.transforming=!0,this._transform(o.writechunk,o.writeencoding,o.afterTransform))},Transform.prototype._destroy=function(s,o){C.prototype._destroy.call(this,s,(function(s){o(s)}))}},74733:(s,o,i)=>{var a=i(21791),u=i(95950);s.exports=function baseAssign(s,o){return s&&a(o,u(o),s)}},75147:(s,o,i)=>{const a=i(85105);s.exports=class JSON06Serialiser extends a{serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);let o;s._attributes&&s.attributes.get(\"variable\")&&(o=s.attributes.get(\"variable\"));const i={element:s.element};s._meta&&s._meta.length>0&&(i.meta=this.serialiseObject(s.meta));const a=\"enum\"===s.element||-1!==s.attributes.keys().indexOf(\"enumerations\");if(a){const o=this.enumSerialiseAttributes(s);o&&(i.attributes=o)}else if(s._attributes&&s._attributes.length>0){let{attributes:a}=s;a.get(\"metadata\")&&(a=a.clone(),a.set(\"meta\",a.get(\"metadata\")),a.remove(\"metadata\")),\"member\"===s.element&&o&&(a=a.clone(),a.remove(\"variable\")),a.length>0&&(i.attributes=this.serialiseObject(a))}if(a)i.content=this.enumSerialiseContent(s,i);else if(this[`${s.element}SerialiseContent`])i.content=this[`${s.element}SerialiseContent`](s,i);else if(void 0!==s.content){let a;o&&s.content.key?(a=s.content.clone(),a.key.attributes.set(\"variable\",o),a=this.serialiseContent(a)):a=this.serialiseContent(s.content),this.shouldSerialiseContent(s,a)&&(i.content=a)}else this.shouldSerialiseContent(s,s.content)&&s instanceof this.namespace.elements.Array&&(i.content=[]);return i}shouldSerialiseContent(s,o){return\"parseResult\"===s.element||\"httpRequest\"===s.element||\"httpResponse\"===s.element||\"category\"===s.element||\"link\"===s.element||void 0!==o&&(!Array.isArray(o)||0!==o.length)}refSerialiseContent(s,o){return delete o.attributes,{href:s.toValue(),path:s.path.toValue()}}sourceMapSerialiseContent(s){return s.toValue()}dataStructureSerialiseContent(s){return[this.serialiseContent(s.content)]}enumSerialiseAttributes(s){const o=s.attributes.clone(),i=o.remove(\"enumerations\")||new this.namespace.elements.Array([]),a=o.get(\"default\");let u=o.get(\"samples\")||new this.namespace.elements.Array([]);if(a&&a.content&&(a.content.attributes&&a.content.attributes.remove(\"typeAttributes\"),o.set(\"default\",new this.namespace.elements.Array([a.content]))),u.forEach((s=>{s.content&&s.content.element&&s.content.attributes.remove(\"typeAttributes\")})),s.content&&0!==i.length&&u.unshift(s.content),u=u.map((s=>s instanceof this.namespace.elements.Array?[s]:new this.namespace.elements.Array([s.content]))),u.length&&o.set(\"samples\",u),o.length>0)return this.serialiseObject(o)}enumSerialiseContent(s){if(s._attributes){const o=s.attributes.get(\"enumerations\");if(o&&o.length>0)return o.content.map((s=>{const o=s.clone();return o.attributes.remove(\"typeAttributes\"),this.serialise(o)}))}if(s.content){const o=s.content.clone();return o.attributes.remove(\"typeAttributes\"),[this.serialise(o)]}return[]}deserialise(s){if(\"string\"==typeof s)return new this.namespace.elements.String(s);if(\"number\"==typeof s)return new this.namespace.elements.Number(s);if(\"boolean\"==typeof s)return new this.namespace.elements.Boolean(s);if(null===s)return new this.namespace.elements.Null;if(Array.isArray(s))return new this.namespace.elements.Array(s.map(this.deserialise,this));const o=this.namespace.getElementClass(s.element),i=new o;i.element!==s.element&&(i.element=s.element),s.meta&&this.deserialiseObject(s.meta,i.meta),s.attributes&&this.deserialiseObject(s.attributes,i.attributes);const a=this.deserialiseContent(s.content);if(void 0===a&&null!==i.content||(i.content=a),\"enum\"===i.element){i.content&&i.attributes.set(\"enumerations\",i.content);let s=i.attributes.get(\"samples\");if(i.attributes.remove(\"samples\"),s){const a=s;s=new this.namespace.elements.Array,a.forEach((a=>{a.forEach((a=>{const u=new o(a);u.element=i.element,s.push(u)}))}));const u=s.shift();i.content=u?u.content:void 0,i.attributes.set(\"samples\",s)}else i.content=void 0;let a=i.attributes.get(\"default\");if(a&&a.length>0){a=a.get(0);const s=new o(a);s.element=i.element,i.attributes.set(\"default\",s)}}else if(\"dataStructure\"===i.element&&Array.isArray(i.content))[i.content]=i.content;else if(\"category\"===i.element){const s=i.attributes.get(\"meta\");s&&(i.attributes.set(\"metadata\",s),i.attributes.remove(\"meta\"))}else\"member\"===i.element&&i.key&&i.key._attributes&&i.key._attributes.getValue(\"variable\")&&(i.attributes.set(\"variable\",i.key.attributes.get(\"variable\")),i.key.attributes.remove(\"variable\"));return i}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const o={key:this.serialise(s.key)};return s.value&&(o.value=this.serialise(s.value)),o}return s&&s.map?s.map(this.serialise,this):s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const o=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(o.value=this.deserialise(s.value)),o}if(s.map)return s.map(this.deserialise,this)}return s}shouldRefract(s){return!!(s._attributes&&s.attributes.keys().length||s._meta&&s.meta.keys().length)||\"enum\"!==s.element&&(s.element!==s.primitive()||\"member\"===s.element)}convertKeyToRefract(s,o){return this.shouldRefract(o)?this.serialise(o):\"enum\"===o.element?this.serialiseEnum(o):\"array\"===o.element?o.map((o=>this.shouldRefract(o)||\"default\"===s?this.serialise(o):\"array\"===o.element||\"object\"===o.element||\"enum\"===o.element?o.children.map((s=>this.serialise(s))):o.toValue())):\"object\"===o.element?(o.content||[]).map(this.serialise,this):o.toValue()}serialiseEnum(s){return s.children.map((s=>this.serialise(s)))}serialiseObject(s){const o={};return s.forEach(((s,i)=>{if(s){const a=i.toValue();o[a]=this.convertKeyToRefract(a,s)}})),o}deserialiseObject(s,o){Object.keys(s).forEach((i=>{o.set(i,this.deserialise(s[i]))}))}}},75208:s=>{\"use strict\";var o,i=\"\";s.exports=function repeat(s,a){if(\"string\"!=typeof s)throw new TypeError(\"expected a string\");if(1===a)return s;if(2===a)return s+s;var u=s.length*a;if(o!==s||void 0===o)o=s,i=\"\";else if(i.length>=u)return i.substr(0,u);for(;u>i.length&&a>1;)1&a&&(i+=s),a>>=1,s+=s;return i=(i+=s).substr(0,u)}},75251:s=>{var o=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,i=/,? & /;s.exports=function getWrapDetails(s){var a=s.match(o);return a?a[1].split(i):[]}},75288:s=>{s.exports=function eq(s,o){return s===o||s!=s&&o!=o}},75817:s=>{\"use strict\";s.exports=function(s,o){return{enumerable:!(1&s),configurable:!(2&s),writable:!(4&s),value:o}}},75896:(s,o,i)=>{\"use strict\";var a=i(65606);function emitErrorAndCloseNT(s,o){emitErrorNT(s,o),emitCloseNT(s)}function emitCloseNT(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit(\"close\")}function emitErrorNT(s,o){s.emit(\"error\",o)}s.exports={destroy:function destroy(s,o){var i=this,u=this._readableState&&this._readableState.destroyed,_=this._writableState&&this._writableState.destroyed;return u||_?(o?o(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(emitErrorNT,this,s)):a.nextTick(emitErrorNT,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,(function(s){!o&&s?i._writableState?i._writableState.errorEmitted?a.nextTick(emitCloseNT,i):(i._writableState.errorEmitted=!0,a.nextTick(emitErrorAndCloseNT,i,s)):a.nextTick(emitErrorAndCloseNT,i,s):o?(a.nextTick(emitCloseNT,i),o(s)):a.nextTick(emitCloseNT,i)})),this)},undestroy:function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function errorOrDestroy(s,o){var i=s._readableState,a=s._writableState;i&&i.autoDestroy||a&&a.autoDestroy?s.destroy(o):s.emit(\"error\",o)}}},75948:(s,o,i)=>{var a=i(83729),u=i(15325),_=[[\"ary\",128],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",16],[\"flip\",512],[\"partial\",32],[\"partialRight\",64],[\"rearg\",256]];s.exports=function updateWrapDetails(s,o){return a(_,(function(i){var a=\"_.\"+i[0];o&i[1]&&!u(s,a)&&s.push(a)})),s.sort()}},76024:(s,o,i)=>{\"use strict\";var a=i(41505),u=Function.prototype,_=u.apply,w=u.call;s.exports=\"object\"==typeof Reflect&&Reflect.apply||(a?w.bind(_):function(){return w.apply(_,arguments)})},76169:(s,o,i)=>{var a=i(49653);s.exports=function cloneDataView(s,o){var i=o?a(s.buffer):s.buffer;return new s.constructor(i,s.byteOffset,s.byteLength)}},76189:s=>{var o=Object.prototype.hasOwnProperty;s.exports=function initCloneArray(s){var i=s.length,a=new s.constructor(i);return i&&\"string\"==typeof s[0]&&o.call(s,\"index\")&&(a.index=s.index,a.input=s.input),a}},76264:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(85816),_=i(49724),w=i(6499),x=i(19846),C=i(51175),j=a.Symbol,L=u(\"wks\"),B=C?j.for||j:j&&j.withoutSetter||w;s.exports=function(s){return _(L,s)||(L[s]=x&&_(j,s)?j[s]:B(\"Symbol.\"+s)),L[s]}},76545:(s,o,i)=>{var a=i(56110)(i(9325),\"Set\");s.exports=a},76959:s=>{s.exports=function strictIndexOf(s,o,i){for(var a=i-1,u=s.length;++a<u;)if(s[a]===o)return a;return-1}},77078:(s,o,i)=>{var a=i(91033),u=i(82819),_=i(37471),w=i(18073),x=i(11287),C=i(36306),j=i(9325);s.exports=function createCurry(s,o,i){var L=u(s);return function wrapper(){for(var u=arguments.length,B=Array(u),$=u,V=x(wrapper);$--;)B[$]=arguments[$];var U=u<3&&B[0]!==V&&B[u-1]!==V?[]:C(B,V);return(u-=U.length)<i?w(s,o,_,wrapper.placeholder,void 0,B,U,void 0,void 0,i-u):a(this&&this!==j&&this instanceof wrapper?L:s,this,B)}}},77199:(s,o,i)=>{var a=i(49653),u=i(76169),_=i(73201),w=i(93736),x=i(71961);s.exports=function initCloneByTag(s,o,i){var C=s.constructor;switch(o){case\"[object ArrayBuffer]\":return a(s);case\"[object Boolean]\":case\"[object Date]\":return new C(+s);case\"[object DataView]\":return u(s,i);case\"[object Float32Array]\":case\"[object Float64Array]\":case\"[object Int8Array]\":case\"[object Int16Array]\":case\"[object Int32Array]\":case\"[object Uint8Array]\":case\"[object Uint8ClampedArray]\":case\"[object Uint16Array]\":case\"[object Uint32Array]\":return x(s,i);case\"[object Map]\":case\"[object Set]\":return new C;case\"[object Number]\":case\"[object String]\":return new C(s);case\"[object RegExp]\":return _(s);case\"[object Symbol]\":return w(s)}}},77556:(s,o,i)=>{var a=i(51873),u=i(34932),_=i(56449),w=i(44394),x=a?a.prototype:void 0,C=x?x.toString:void 0;s.exports=function baseToString(s){if(\"string\"==typeof s)return s;if(_(s))return u(s,baseToString)+\"\";if(w(s))return C?C.call(s):\"\";var o=s+\"\";return\"0\"==o&&1/s==-1/0?\"-0\":o}},77731:(s,o,i)=>{var a=i(79920)(\"set\",i(63560));a.placeholder=i(2874),s.exports=a},77797:(s,o,i)=>{var a=i(44394);s.exports=function toKey(s){if(\"string\"==typeof s||a(s))return s;var o=s+\"\";return\"0\"==o&&1/s==-1/0?\"-0\":o}},78004:s=>{\"use strict\";class SubRange{constructor(s,o){this.low=s,this.high=o,this.length=1+o-s}overlaps(s){return!(this.high<s.low||this.low>s.high)}touches(s){return!(this.high+1<s.low||this.low-1>s.high)}add(s){return new SubRange(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){return s.low<=this.low&&s.high>=this.high?[]:s.low>this.low&&s.high<this.high?[new SubRange(this.low,s.low-1),new SubRange(s.high+1,this.high)]:s.low<=this.low?[new SubRange(s.high+1,this.high)]:[new SubRange(this.low,s.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+\"-\"+this.high}}class DRange{constructor(s,o){this.ranges=[],this.length=0,null!=s&&this.add(s,o)}_update_length(){this.length=this.ranges.reduce(((s,o)=>s+o.length),0)}add(s,o){var _add=s=>{for(var o=0;o<this.ranges.length&&!s.touches(this.ranges[o]);)o++;for(var i=this.ranges.slice(0,o);o<this.ranges.length&&s.touches(this.ranges[o]);)s=s.add(this.ranges[o]),o++;i.push(s),this.ranges=i.concat(this.ranges.slice(o)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_add):(null==o&&(o=s),_add(new SubRange(s,o))),this}subtract(s,o){var _subtract=s=>{for(var o=0;o<this.ranges.length&&!s.overlaps(this.ranges[o]);)o++;for(var i=this.ranges.slice(0,o);o<this.ranges.length&&s.overlaps(this.ranges[o]);)i=i.concat(this.ranges[o].subtract(s)),o++;this.ranges=i.concat(this.ranges.slice(o)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_subtract):(null==o&&(o=s),_subtract(new SubRange(s,o))),this}intersect(s,o){var i=[],_intersect=s=>{for(var o=0;o<this.ranges.length&&!s.overlaps(this.ranges[o]);)o++;for(;o<this.ranges.length&&s.overlaps(this.ranges[o]);){var a=Math.max(this.ranges[o].low,s.low),u=Math.min(this.ranges[o].high,s.high);i.push(new SubRange(a,u)),o++}};return s instanceof DRange?s.ranges.forEach(_intersect):(null==o&&(o=s),_intersect(new SubRange(s,o))),this.ranges=i,this._update_length(),this}index(s){for(var o=0;o<this.ranges.length&&this.ranges[o].length<=s;)s-=this.ranges[o].length,o++;return this.ranges[o].low+s}toString(){return\"[ \"+this.ranges.join(\", \")+\" ]\"}clone(){return new DRange(this)}numbers(){return this.ranges.reduce(((s,o)=>{for(var i=o.low;i<=o.high;)s.push(i),i++;return s}),[])}subranges(){return this.ranges.map((s=>({low:s.low,high:s.high,length:1+s.high-s.low})))}}s.exports=DRange},78096:s=>{s.exports=function baseTimes(s,o){for(var i=-1,a=Array(s);++i<s;)a[i]=o(i);return a}},78418:(s,o,i)=>{\"use strict\";i(85160)},79192:(s,o,i)=>{\"use strict\";var a=i(51871),u=i(46285),_=i(74239),w=i(10043);s.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var s,o=!1,i={};try{(s=a(Object.prototype,\"__proto__\",\"set\"))(i,[]),o=i instanceof Array}catch(s){}return function setPrototypeOf(i,a){return _(i),w(a),u(i)?(o?s(i,a):i.__proto__=a,i):i}}():void 0)},79307:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(44673);a({target:\"Function\",proto:!0,forced:Function.bind!==u},{bind:u})},79770:s=>{s.exports=function arrayFilter(s,o){for(var i=-1,a=null==s?0:s.length,u=0,_=[];++i<a;){var w=s[i];o(w,i,s)&&(_[u++]=w)}return _}},79838:()=>{},79920:(s,o,i)=>{var a=i(73424),u=i(47934);s.exports=function convert(s,o,i){return a(u,s,o,i)}},80079:(s,o,i)=>{var a=i(63702),u=i(70080),_=i(24739),w=i(48655),x=i(31175);function ListCache(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){var a=s[o];this.set(a[0],a[1])}}ListCache.prototype.clear=a,ListCache.prototype.delete=u,ListCache.prototype.get=_,ListCache.prototype.has=w,ListCache.prototype.set=x,s.exports=ListCache},80218:(s,o,i)=>{var a=i(13222);s.exports=function toLower(s){return a(s).toLowerCase()}},80257:(s,o,i)=>{var a=i(30980),u=i(56017),_=i(23007);s.exports=function wrapperClone(s){if(s instanceof a)return s.clone();var o=new u(s.__wrapped__,s.__chain__);return o.__actions__=_(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}},80345:(s,o,i)=>{\"use strict\";function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}function _defineProperty(s,o,i){return(o=_toPropertyKey(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,_toPropertyKey(a.key),a)}}function _toPropertyKey(s){var o=function _toPrimitive(s,o){if(\"object\"!=typeof s||null===s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||\"default\");if(\"object\"!=typeof a)return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===o?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof o?o:String(o)}var a=i(48287).Buffer,u=i(15340).inspect,_=u&&u.custom||\"inspect\";s.exports=function(){function BufferList(){!function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(BufferList,[{key:\"push\",value:function push(s){var o={data:s,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:\"unshift\",value:function unshift(s){var o={data:s,next:this.head};0===this.length&&(this.tail=o),this.head=o,++this.length}},{key:\"shift\",value:function shift(){if(0!==this.length){var s=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,s}}},{key:\"clear\",value:function clear(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function join(s){if(0===this.length)return\"\";for(var o=this.head,i=\"\"+o.data;o=o.next;)i+=s+o.data;return i}},{key:\"concat\",value:function concat(s){if(0===this.length)return a.alloc(0);for(var o,i,u,_=a.allocUnsafe(s>>>0),w=this.head,x=0;w;)o=w.data,i=_,u=x,a.prototype.copy.call(o,i,u),x+=w.data.length,w=w.next;return _}},{key:\"consume\",value:function consume(s,o){var i;return s<this.head.data.length?(i=this.head.data.slice(0,s),this.head.data=this.head.data.slice(s)):i=s===this.head.data.length?this.shift():o?this._getString(s):this._getBuffer(s),i}},{key:\"first\",value:function first(){return this.head.data}},{key:\"_getString\",value:function _getString(s){var o=this.head,i=1,a=o.data;for(s-=a.length;o=o.next;){var u=o.data,_=s>u.length?u.length:s;if(_===u.length?a+=u:a+=u.slice(0,s),0===(s-=_)){_===u.length?(++i,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(_));break}++i}return this.length-=i,a}},{key:\"_getBuffer\",value:function _getBuffer(s){var o=a.allocUnsafe(s),i=this.head,u=1;for(i.data.copy(o),s-=i.data.length;i=i.next;){var _=i.data,w=s>_.length?_.length:s;if(_.copy(o,o.length-s,0,w),0===(s-=w)){w===_.length?(++u,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=_.slice(w));break}++u}return this.length-=u,o}},{key:_,value:function value(s,o){return u(this,_objectSpread(_objectSpread({},o),{},{depth:0,customInspect:!1}))}}]),BufferList}()},80376:s=>{\"use strict\";s.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},80631:(s,o,i)=>{var a=i(28077),u=i(49326);s.exports=function hasIn(s,o){return null!=s&&u(s,o,a)}},80909:(s,o,i)=>{var a=i(30641),u=i(38329)(a);s.exports=u},80945:(s,o,i)=>{var a=i(80079),u=i(68223),_=i(53661);s.exports=function stackSet(s,o){var i=this.__data__;if(i instanceof a){var w=i.__data__;if(!u||w.length<199)return w.push([s,o]),this.size=++i.size,this;i=this.__data__=new _(w)}return i.set(s,o),this.size=i.size,this}},81042:(s,o,i)=>{var a=i(56110)(Object,\"create\");s.exports=a},81214:(s,o,i)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.DebounceInput=void 0;var a=_interopRequireDefault(i(96540)),u=_interopRequireDefault(i(20181)),_=[\"element\",\"onChange\",\"value\",\"minLength\",\"debounceTimeout\",\"forceNotifyByEnter\",\"forceNotifyOnBlur\",\"onKeyDown\",\"onBlur\",\"inputRef\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=function _objectWithoutPropertiesLoose(s,o){if(null==s)return{};var i,a,u={},_=Object.keys(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||(u[i]=s[i]);return u}(s,o);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(s,i)&&(u[i]=s[i])}return u}function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,o){return s.__proto__=o,s},_setPrototypeOf(s,o)}function _createSuper(s){var o=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(s);if(o){var u=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,u)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(s,o){if(o&&(\"object\"===_typeof(o)||\"function\"==typeof o))return o;if(void 0!==o)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,i)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var w=function(s){!function _inherits(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),o&&_setPrototypeOf(s,o)}(DebounceInput,s);var o=_createSuper(DebounceInput);function DebounceInput(s){var i;!function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,DebounceInput),_defineProperty(_assertThisInitialized(i=o.call(this,s)),\"onChange\",(function(s){s.persist();var o=i.state.value,a=i.props.minLength;i.setState({value:s.target.value},(function(){var u=i.state.value;u.length>=a?i.notify(s):o.length>u.length&&i.notify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:\"\"})}))}))})),_defineProperty(_assertThisInitialized(i),\"onKeyDown\",(function(s){\"Enter\"===s.key&&i.forceNotify(s);var o=i.props.onKeyDown;o&&(s.persist(),o(s))})),_defineProperty(_assertThisInitialized(i),\"onBlur\",(function(s){i.forceNotify(s);var o=i.props.onBlur;o&&(s.persist(),o(s))})),_defineProperty(_assertThisInitialized(i),\"createNotifier\",(function(s){if(s<0)i.notify=function(){return null};else if(0===s)i.notify=i.doNotify;else{var o=(0,u.default)((function(s){i.isDebouncing=!1,i.doNotify(s)}),s);i.notify=function(s){i.isDebouncing=!0,o(s)},i.flush=function(){return o.flush()},i.cancel=function(){i.isDebouncing=!1,o.cancel()}}})),_defineProperty(_assertThisInitialized(i),\"doNotify\",(function(){i.props.onChange.apply(void 0,arguments)})),_defineProperty(_assertThisInitialized(i),\"forceNotify\",(function(s){var o=i.props.debounceTimeout;if(i.isDebouncing||!(o>0)){i.cancel&&i.cancel();var a=i.state.value,u=i.props.minLength;a.length>=u?i.doNotify(s):i.doNotify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:a})}))}})),i.isDebouncing=!1,i.state={value:void 0===s.value||null===s.value?\"\":s.value};var a=i.props.debounceTimeout;return i.createNotifier(a),i}return function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(DebounceInput,[{key:\"componentDidUpdate\",value:function componentDidUpdate(s){if(!this.isDebouncing){var o=this.props,i=o.value,a=o.debounceTimeout,u=s.debounceTimeout,_=s.value,w=this.state.value;void 0!==i&&_!==i&&w!==i&&this.setState({value:i}),a!==u&&this.createNotifier(a)}}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){this.flush&&this.flush()}},{key:\"render\",value:function render(){var s,o,i=this.props,u=i.element,w=(i.onChange,i.value,i.minLength,i.debounceTimeout,i.forceNotifyByEnter),x=i.forceNotifyOnBlur,C=i.onKeyDown,j=i.onBlur,L=i.inputRef,B=_objectWithoutProperties(i,_),$=this.state.value;s=w?{onKeyDown:this.onKeyDown}:C?{onKeyDown:C}:{},o=x?{onBlur:this.onBlur}:j?{onBlur:j}:{};var V=L?{ref:L}:{};return a.default.createElement(u,_objectSpread(_objectSpread(_objectSpread(_objectSpread({},B),{},{onChange:this.onChange,value:$},s),o),V))}}]),DebounceInput}(a.default.PureComponent);o.DebounceInput=w,_defineProperty(w,\"defaultProps\",{element:\"input\",type:\"text\",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},81919:(s,o,i)=>{\"use strict\";var a=i(48287).Buffer;function isSpecificValue(s){return s instanceof a||s instanceof Date||s instanceof RegExp}function cloneSpecificValue(s){if(s instanceof a){var o=a.alloc?a.alloc(s.length):new a(s.length);return s.copy(o),o}if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error(\"Unexpected situation\")}function deepCloneArray(s){var o=[];return s.forEach((function(s,i){\"object\"==typeof s&&null!==s?Array.isArray(s)?o[i]=deepCloneArray(s):isSpecificValue(s)?o[i]=cloneSpecificValue(s):o[i]=u({},s):o[i]=s})),o}function safeGetProperty(s,o){return\"__proto__\"===o?void 0:s[o]}var u=s.exports=function(){if(arguments.length<1||\"object\"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var s,o,i=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(a){\"object\"!=typeof a||null===a||Array.isArray(a)||Object.keys(a).forEach((function(_){return o=safeGetProperty(i,_),(s=safeGetProperty(a,_))===i?void 0:\"object\"!=typeof s||null===s?void(i[_]=s):Array.isArray(s)?void(i[_]=deepCloneArray(s)):isSpecificValue(s)?void(i[_]=cloneSpecificValue(s)):\"object\"!=typeof o||null===o||Array.isArray(o)?void(i[_]=u({},s)):void(i[_]=u(o,s))}))})),i}},82048:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(88280),_=i(15972),w=i(79192),x=i(19595),C=i(58075),j=i(61626),L=i(75817),B=i(39259),$=i(85884),V=i(24823),U=i(32096),z=i(76264)(\"toStringTag\"),Y=Error,Z=[].push,ee=function AggregateError(s,o){var i,a=u(ie,this);w?i=w(new Y,a?_(this):ie):(i=a?this:C(ie),j(i,z,\"Error\")),void 0!==o&&j(i,\"message\",U(o)),$(i,ee,i.stack,1),arguments.length>2&&B(i,arguments[2]);var x=[];return V(s,Z,{that:x}),j(i,\"errors\",x),i};w?w(ee,Y):x(ee,Y,{name:!0});var ie=ee.prototype=C(Y.prototype,{constructor:L(1,ee),message:L(1,\"\"),name:L(1,\"AggregateError\")});a({global:!0,constructor:!0,arity:2},{AggregateError:ee})},82159:(s,o,i)=>{\"use strict\";var a=i(62250),u=i(4640),_=TypeError;s.exports=function(s){if(a(s))return s;throw new _(u(s)+\" is not a function\")}},82199:(s,o,i)=>{var a=i(14528),u=i(56449);s.exports=function baseGetAllKeys(s,o,i){var _=o(s);return u(s)?_:a(_,i(s))}},82261:(s,o,i)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});var a=_interopRequireDefault(i(9404)),u=_interopRequireDefault(i(48590));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}o.default=function(s,o,i){var _=Object.keys(o);if(!_.length)return\"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";var w=(0,u.default)(i);if(a.default.isImmutable?!a.default.isImmutable(s):!a.default.Iterable.isIterable(s))return\"The \"+w+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: \"'+_.join('\", \"')+'\".';var x=s.toSeq().keySeq().toArray().filter((function(s){return!o.hasOwnProperty(s)}));return x.length>0?\"Unexpected \"+(1===x.length?\"property\":\"properties\")+' \"'+x.join('\", \"')+'\" found in '+w+'. Expected to find one of the known reducer property names instead: \"'+_.join('\", \"')+'\". Unexpected properties will be ignored.':null},s.exports=o.default},82819:(s,o,i)=>{var a=i(39344),u=i(23805);s.exports=function createCtor(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var i=a(s.prototype),_=s.apply(i,o);return u(_)?_:i}}},82890:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],x=new Array(160);function Sha512(){this.init(),this._w=x,u.call(this,128,112)}function Ch(s,o,i){return i^s&(o^i)}function maj(s,o,i){return s&o|i&(s|o)}function sigma0(s,o){return(s>>>28|o<<4)^(o>>>2|s<<30)^(o>>>7|s<<25)}function sigma1(s,o){return(s>>>14|o<<18)^(s>>>18|o<<14)^(o>>>9|s<<23)}function Gamma0(s,o){return(s>>>1|o<<31)^(s>>>8|o<<24)^s>>>7}function Gamma0l(s,o){return(s>>>1|o<<31)^(s>>>8|o<<24)^(s>>>7|o<<25)}function Gamma1(s,o){return(s>>>19|o<<13)^(o>>>29|s<<3)^s>>>6}function Gamma1l(s,o){return(s>>>19|o<<13)^(o>>>29|s<<3)^(s>>>6|o<<26)}function getCarry(s,o){return s>>>0<o>>>0?1:0}a(Sha512,u),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(s){for(var o=this._w,i=0|this._ah,a=0|this._bh,u=0|this._ch,_=0|this._dh,x=0|this._eh,C=0|this._fh,j=0|this._gh,L=0|this._hh,B=0|this._al,$=0|this._bl,V=0|this._cl,U=0|this._dl,z=0|this._el,Y=0|this._fl,Z=0|this._gl,ee=0|this._hl,ie=0;ie<32;ie+=2)o[ie]=s.readInt32BE(4*ie),o[ie+1]=s.readInt32BE(4*ie+4);for(;ie<160;ie+=2){var ae=o[ie-30],ce=o[ie-30+1],le=Gamma0(ae,ce),pe=Gamma0l(ce,ae),de=Gamma1(ae=o[ie-4],ce=o[ie-4+1]),fe=Gamma1l(ce,ae),ye=o[ie-14],be=o[ie-14+1],_e=o[ie-32],Se=o[ie-32+1],we=pe+be|0,xe=le+ye+getCarry(we,pe)|0;xe=(xe=xe+de+getCarry(we=we+fe|0,fe)|0)+_e+getCarry(we=we+Se|0,Se)|0,o[ie]=xe,o[ie+1]=we}for(var Pe=0;Pe<160;Pe+=2){xe=o[Pe],we=o[Pe+1];var Te=maj(i,a,u),Re=maj(B,$,V),$e=sigma0(i,B),qe=sigma0(B,i),ze=sigma1(x,z),We=sigma1(z,x),He=w[Pe],Ye=w[Pe+1],Xe=Ch(x,C,j),Qe=Ch(z,Y,Z),et=ee+We|0,tt=L+ze+getCarry(et,ee)|0;tt=(tt=(tt=tt+Xe+getCarry(et=et+Qe|0,Qe)|0)+He+getCarry(et=et+Ye|0,Ye)|0)+xe+getCarry(et=et+we|0,we)|0;var rt=qe+Re|0,nt=$e+Te+getCarry(rt,qe)|0;L=j,ee=Z,j=C,Z=Y,C=x,Y=z,x=_+tt+getCarry(z=U+et|0,U)|0,_=u,U=V,u=a,V=$,a=i,$=B,i=tt+nt+getCarry(B=et+rt|0,et)|0}this._al=this._al+B|0,this._bl=this._bl+$|0,this._cl=this._cl+V|0,this._dl=this._dl+U|0,this._el=this._el+z|0,this._fl=this._fl+Y|0,this._gl=this._gl+Z|0,this._hl=this._hl+ee|0,this._ah=this._ah+i+getCarry(this._al,B)|0,this._bh=this._bh+a+getCarry(this._bl,$)|0,this._ch=this._ch+u+getCarry(this._cl,V)|0,this._dh=this._dh+_+getCarry(this._dl,U)|0,this._eh=this._eh+x+getCarry(this._el,z)|0,this._fh=this._fh+C+getCarry(this._fl,Y)|0,this._gh=this._gh+j+getCarry(this._gl,Z)|0,this._hh=this._hh+L+getCarry(this._hl,ee)|0},Sha512.prototype._hash=function(){var s=_.allocUnsafe(64);function writeInt64BE(o,i,a){s.writeInt32BE(o,a),s.writeInt32BE(i,a+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),s},s.exports=Sha512},83120:(s,o,i)=>{var a=i(14528),u=i(45891);s.exports=function baseFlatten(s,o,i,_,w){var x=-1,C=s.length;for(i||(i=u),w||(w=[]);++x<C;){var j=s[x];o>0&&i(j)?o>1?baseFlatten(j,o-1,i,_,w):a(w,j):_||(w[w.length]=j)}return w}},83141:(s,o,i)=>{\"use strict\";var a=i(92861).Buffer,u=a.isEncoding||function(s){switch((s=\"\"+s)&&s.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function StringDecoder(s){var o;switch(this.encoding=function normalizeEncoding(s){var o=function _normalizeEncoding(s){if(!s)return\"utf8\";for(var o;;)switch(s){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return s;default:if(o)return;s=(\"\"+s).toLowerCase(),o=!0}}(s);if(\"string\"!=typeof o&&(a.isEncoding===u||!u(s)))throw new Error(\"Unknown encoding: \"+s);return o||s}(s),this.encoding){case\"utf16le\":this.text=utf16Text,this.end=utf16End,o=4;break;case\"utf8\":this.fillLast=utf8FillLast,o=4;break;case\"base64\":this.text=base64Text,this.end=base64End,o=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(o)}function utf8CheckByte(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?4:s>>6==2?-1:-2}function utf8FillLast(s){var o=this.lastTotal-this.lastNeed,i=function utf8CheckExtraBytes(s,o,i){if(128!=(192&o[0]))return s.lastNeed=0,\"�\";if(s.lastNeed>1&&o.length>1){if(128!=(192&o[1]))return s.lastNeed=1,\"�\";if(s.lastNeed>2&&o.length>2&&128!=(192&o[2]))return s.lastNeed=2,\"�\"}}(this,s);return void 0!==i?i:this.lastNeed<=s.length?(s.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(s.copy(this.lastChar,o,0,s.length),void(this.lastNeed-=s.length))}function utf16Text(s,o){if((s.length-o)%2==0){var i=s.toString(\"utf16le\",o);if(i){var a=i.charCodeAt(i.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString(\"utf16le\",o,s.length-1)}function utf16End(s){var o=s&&s.length?this.write(s):\"\";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return o+this.lastChar.toString(\"utf16le\",0,i)}return o}function base64Text(s,o){var i=(s.length-o)%3;return 0===i?s.toString(\"base64\",o):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString(\"base64\",o,s.length-i))}function base64End(s){var o=s&&s.length?this.write(s):\"\";return this.lastNeed?o+this.lastChar.toString(\"base64\",0,3-this.lastNeed):o}function simpleWrite(s){return s.toString(this.encoding)}function simpleEnd(s){return s&&s.length?this.write(s):\"\"}o.I=StringDecoder,StringDecoder.prototype.write=function(s){if(0===s.length)return\"\";var o,i;if(this.lastNeed){if(void 0===(o=this.fillLast(s)))return\"\";i=this.lastNeed,this.lastNeed=0}else i=0;return i<s.length?o?o+this.text(s,i):this.text(s,i):o||\"\"},StringDecoder.prototype.end=function utf8End(s){var o=s&&s.length?this.write(s):\"\";return this.lastNeed?o+\"�\":o},StringDecoder.prototype.text=function utf8Text(s,o){var i=function utf8CheckIncomplete(s,o,i){var a=o.length-1;if(a<i)return 0;var u=utf8CheckByte(o[a]);if(u>=0)return u>0&&(s.lastNeed=u-1),u;if(--a<i||-2===u)return 0;if(u=utf8CheckByte(o[a]),u>=0)return u>0&&(s.lastNeed=u-2),u;if(--a<i||-2===u)return 0;if(u=utf8CheckByte(o[a]),u>=0)return u>0&&(2===u?u=0:s.lastNeed=u-3),u;return 0}(this,s,o);if(!this.lastNeed)return s.toString(\"utf8\",o);this.lastTotal=i;var a=s.length-(i-this.lastNeed);return s.copy(this.lastChar,0,a),s.toString(\"utf8\",o,a)},StringDecoder.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length}},83221:s=>{s.exports=function createBaseFor(s){return function(o,i,a){for(var u=-1,_=Object(o),w=a(o),x=w.length;x--;){var C=w[s?x:++u];if(!1===i(_[C],C,_))break}return o}}},83349:(s,o,i)=>{var a=i(82199),u=i(86375),_=i(37241);s.exports=function getAllKeysIn(s){return a(s,_,u)}},83488:s=>{s.exports=function identity(s){return s}},83693:(s,o,i)=>{var a=i(64894),u=i(40346);s.exports=function isArrayLikeObject(s){return u(s)&&a(s)}},83729:s=>{s.exports=function arrayEach(s,o){for(var i=-1,a=null==s?0:s.length;++i<a&&!1!==o(s[i],i,s););return s}},84058:(s,o,i)=>{var a=i(14792),u=i(45539)((function(s,o,i){return o=o.toLowerCase(),s+(i?a(o):o)}));s.exports=u},84195:(s,o,i)=>{var a=i(66977),u=i(38816),_=u((function(s,o){return a(s,256,void 0,void 0,void 0,o)}));s.exports=_},84247:s=>{s.exports=function setToArray(s){var o=-1,i=Array(s.size);return s.forEach((function(s){i[++o]=s})),i}},84629:s=>{s.exports={}},84851:(s,o,i)=>{\"use strict\";s.exports=i(85401)},84977:(s,o,i)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});var a=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(i(9404)),u=i(55674);o.default=function(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Map,i=Object.keys(s);return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o(),_=arguments[1];return a.withMutations((function(o){i.forEach((function(i){var a=(0,s[i])(o.get(i),_);(0,u.validateNextState)(a,i,_),o.set(i,a)}))}))}},s.exports=o.default},85015:(s,o,i)=>{var a=i(72552),u=i(56449),_=i(40346);s.exports=function isString(s){return\"string\"==typeof s||!u(s)&&_(s)&&\"[object String]\"==a(s)}},85087:(s,o,i)=>{var a=i(30980),u=i(37381),_=i(62284),w=i(53758);s.exports=function isLaziable(s){var o=_(s),i=w[o];if(\"function\"!=typeof i||!(o in a.prototype))return!1;if(s===i)return!0;var x=u(i);return!!x&&s===x[0]}},85105:s=>{s.exports=class JSONSerialiser{constructor(s){this.namespace=s||new this.Namespace}serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);const o={element:s.element};s._meta&&s._meta.length>0&&(o.meta=this.serialiseObject(s.meta)),s._attributes&&s._attributes.length>0&&(o.attributes=this.serialiseObject(s.attributes));const i=this.serialiseContent(s.content);return void 0!==i&&(o.content=i),o}deserialise(s){if(!s.element)throw new Error(\"Given value is not an object containing an element name\");const o=new(this.namespace.getElementClass(s.element));o.element!==s.element&&(o.element=s.element),s.meta&&this.deserialiseObject(s.meta,o.meta),s.attributes&&this.deserialiseObject(s.attributes,o.attributes);const i=this.deserialiseContent(s.content);return void 0===i&&null!==o.content||(o.content=i),o}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const o={key:this.serialise(s.key)};return s.value&&(o.value=this.serialise(s.value)),o}if(s&&s.map){if(0===s.length)return;return s.map(this.serialise,this)}return s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const o=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(o.value=this.deserialise(s.value)),o}if(s.map)return s.map(this.deserialise,this)}return s}serialiseObject(s){const o={};if(s.forEach(((s,i)=>{s&&(o[i.toValue()]=this.serialise(s))})),0!==Object.keys(o).length)return o}deserialiseObject(s,o){Object.keys(s).forEach((i=>{o.set(i,this.deserialise(s[i]))}))}}},85160:(s,o,i)=>{\"use strict\";var a=i(96540);var u=\"function\"==typeof Object.is?Object.is:function is(s,o){return s===o&&(0!==s||1/s==1/o)||s!=s&&o!=o},_=a.useSyncExternalStore,w=a.useRef,x=a.useEffect,C=a.useMemo,j=a.useDebugValue},85250:(s,o,i)=>{var a=i(37217),u=i(87805),_=i(86649),w=i(42824),x=i(23805),C=i(37241),j=i(14974);s.exports=function baseMerge(s,o,i,L,B){s!==o&&_(o,(function(_,C){if(B||(B=new a),x(_))w(s,o,C,i,baseMerge,L,B);else{var $=L?L(j(s,C),_,C+\"\",s,o,B):void 0;void 0===$&&($=_),u(s,C,$)}}),C)}},85401:(s,o,i)=>{\"use strict\";var a=i(462);s.exports=a},85463:s=>{s.exports=function baseIsNaN(s){return s!=s}},85558:s=>{s.exports=function baseReduce(s,o,i,a,u){return u(s,(function(s,u,_){i=a?(a=!1,s):o(i,s,u,_)})),i}},85582:(s,o,i)=>{\"use strict\";var a=i(92046),u=i(45951),_=i(62250),aFunction=function(s){return _(s)?s:void 0};s.exports=function(s,o){return arguments.length<2?aFunction(a[s])||aFunction(u[s]):a[s]&&a[s][o]||u[s]&&u[s][o]}},85587:(s,o,i)=>{\"use strict\";var a=i(26311),u=create(Error);function create(s){return FormattedError.displayName=s.displayName||s.name,FormattedError;function FormattedError(o){return o&&(o=a.apply(null,arguments)),new s(o)}}s.exports=u,u.eval=create(EvalError),u.range=create(RangeError),u.reference=create(ReferenceError),u.syntax=create(SyntaxError),u.type=create(TypeError),u.uri=create(URIError),u.create=create},85762:(s,o,i)=>{\"use strict\";var a=i(1907),u=Error,_=a(\"\".replace),w=String(new u(\"zxcasd\").stack),x=/\\n\\s*at [^:]*:[^\\n]*/,C=x.test(w);s.exports=function(s,o){if(C&&\"string\"==typeof s&&!u.prepareStackTrace)for(;o--;)s=_(s,x,\"\");return s}},85816:(s,o,i)=>{\"use strict\";var a=i(36128);s.exports=function(s,o){return a[s]||(a[s]=o||{})}},85884:(s,o,i)=>{\"use strict\";var a=i(61626),u=i(85762),_=i(23888),w=Error.captureStackTrace;s.exports=function(s,o,i,x){_&&(w?w(s,o):a(s,\"stack\",u(i,x)))}},86009:(s,o,i)=>{s=i.nmd(s);var a=i(34840),u=o&&!o.nodeType&&o,_=u&&s&&!s.nodeType&&s,w=_&&_.exports===u&&a.process,x=function(){try{var s=_&&_.require&&_.require(\"util\").types;return s||w&&w.binding&&w.binding(\"util\")}catch(s){}}();s.exports=x},86048:s=>{\"use strict\";var o={};function createErrorType(s,i,a){a||(a=Error);var u=function(s){function NodeError(o,a,u){return s.call(this,function getMessage(s,o,a){return\"string\"==typeof i?i:i(s,o,a)}(o,a,u))||this}return function _inheritsLoose(s,o){s.prototype=Object.create(o.prototype),s.prototype.constructor=s,s.__proto__=o}(NodeError,s),NodeError}(a);u.prototype.name=a.name,u.prototype.code=s,o[s]=u}function oneOf(s,o){if(Array.isArray(s)){var i=s.length;return s=s.map((function(s){return String(s)})),i>2?\"one of \".concat(o,\" \").concat(s.slice(0,i-1).join(\", \"),\", or \")+s[i-1]:2===i?\"one of \".concat(o,\" \").concat(s[0],\" or \").concat(s[1]):\"of \".concat(o,\" \").concat(s[0])}return\"of \".concat(o,\" \").concat(String(s))}createErrorType(\"ERR_INVALID_OPT_VALUE\",(function(s,o){return'The value \"'+o+'\" is invalid for option \"'+s+'\"'}),TypeError),createErrorType(\"ERR_INVALID_ARG_TYPE\",(function(s,o,i){var a,u;if(\"string\"==typeof o&&function startsWith(s,o,i){return s.substr(!i||i<0?0:+i,o.length)===o}(o,\"not \")?(a=\"must not be\",o=o.replace(/^not /,\"\")):a=\"must be\",function endsWith(s,o,i){return(void 0===i||i>s.length)&&(i=s.length),s.substring(i-o.length,i)===o}(s,\" argument\"))u=\"The \".concat(s,\" \").concat(a,\" \").concat(oneOf(o,\"type\"));else{var _=function includes(s,o,i){return\"number\"!=typeof i&&(i=0),!(i+o.length>s.length)&&-1!==s.indexOf(o,i)}(s,\".\")?\"property\":\"argument\";u='The \"'.concat(s,'\" ').concat(_,\" \").concat(a,\" \").concat(oneOf(o,\"type\"))}return u+=\". Received type \".concat(typeof i)}),TypeError),createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(s){return\"The \"+s+\" method is not implemented\"})),createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),createErrorType(\"ERR_STREAM_DESTROYED\",(function(s){return\"Cannot call \"+s+\" after a stream was destroyed\"})),createErrorType(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),createErrorType(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),createErrorType(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),createErrorType(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),createErrorType(\"ERR_UNKNOWN_ENCODING\",(function(s){return\"Unknown encoding: \"+s}),TypeError),createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),s.exports.F=o},86215:function(s,o){var i,a,u;a=[],i=function(){\"use strict\";var isNativeSmoothScrollEnabledOn=function(s){return s&&\"getComputedStyle\"in window&&\"smooth\"===window.getComputedStyle(s)[\"scroll-behavior\"]};if(\"undefined\"==typeof window||!(\"document\"in window))return{};var makeScroller=function(s,o,i){var a;o=o||999,i||0===i||(i=9);var setScrollTimeoutId=function(s){a=s},stopScroll=function(){clearTimeout(a),setScrollTimeoutId(0)},getTopWithEdgeOffset=function(o){return Math.max(0,s.getTopOf(o)-i)},scrollToY=function(i,a,u){if(stopScroll(),0===a||a&&a<0||isNativeSmoothScrollEnabledOn(s.body))s.toY(i),u&&u();else{var _=s.getY(),w=Math.max(0,i)-_,x=(new Date).getTime();a=a||Math.min(Math.abs(w),o),function loopScroll(){setScrollTimeoutId(setTimeout((function(){var o=Math.min(1,((new Date).getTime()-x)/a),i=Math.max(0,Math.floor(_+w*(o<.5?2*o*o:o*(4-2*o)-1)));s.toY(i),o<1&&s.getHeight()+i<s.body.scrollHeight?loopScroll():(setTimeout(stopScroll,99),u&&u())}),9))}()}},scrollToElem=function(s,o,i){scrollToY(getTopWithEdgeOffset(s),o,i)},scrollIntoView=function(o,a,u){var _=o.getBoundingClientRect().height,w=s.getTopOf(o)+_,x=s.getHeight(),C=s.getY(),j=C+x;getTopWithEdgeOffset(o)<C||_+i>x?scrollToElem(o,a,u):w+i>j?scrollToY(w-x+i,a,u):u&&u()},scrollToCenterOf=function(o,i,a,u){scrollToY(Math.max(0,s.getTopOf(o)-s.getHeight()/2+(a||o.getBoundingClientRect().height/2)),i,u)};return{setup:function(s,a){return(0===s||s)&&(o=s),(0===a||a)&&(i=a),{defaultDuration:o,edgeOffset:i}},to:scrollToElem,toY:scrollToY,intoView:scrollIntoView,center:scrollToCenterOf,stop:stopScroll,moving:function(){return!!a},getY:s.getY,getTopOf:s.getTopOf}},s=document.documentElement,getDocY=function(){return window.scrollY||s.scrollTop},o=makeScroller({body:document.scrollingElement||document.body,toY:function(s){window.scrollTo(0,s)},getY:getDocY,getHeight:function(){return window.innerHeight||s.clientHeight},getTopOf:function(o){return o.getBoundingClientRect().top+getDocY()-s.offsetTop}});if(o.createScroller=function(o,i,a){return makeScroller({body:o,toY:function(s){o.scrollTop=s},getY:function(){return o.scrollTop},getHeight:function(){return Math.min(o.clientHeight,window.innerHeight||s.clientHeight)},getTopOf:function(s){return s.offsetTop}},i,a)},\"addEventListener\"in window&&!window.noZensmooth&&!isNativeSmoothScrollEnabledOn(document.body)){var i=\"history\"in window&&\"pushState\"in history,a=i&&\"scrollRestoration\"in history;a&&(history.scrollRestoration=\"auto\"),window.addEventListener(\"load\",(function(){a&&(setTimeout((function(){history.scrollRestoration=\"manual\"}),9),window.addEventListener(\"popstate\",(function(s){s.state&&\"zenscrollY\"in s.state&&o.toY(s.state.zenscrollY)}),!1)),window.location.hash&&setTimeout((function(){var s=o.setup().edgeOffset;if(s){var i=document.getElementById(window.location.href.split(\"#\")[1]);if(i){var a=Math.max(0,o.getTopOf(i)-s),u=o.getY()-a;0<=u&&u<9&&window.scrollTo(0,a)}}}),9)}),!1);var u=new RegExp(\"(^|\\\\s)noZensmooth(\\\\s|$)\");window.addEventListener(\"click\",(function(s){for(var _=s.target;_&&\"A\"!==_.tagName;)_=_.parentNode;if(!(!_||1!==s.which||s.shiftKey||s.metaKey||s.ctrlKey||s.altKey)){if(a){var w=history.state&&\"object\"==typeof history.state?history.state:{};w.zenscrollY=o.getY();try{history.replaceState(w,\"\")}catch(s){}}var x=_.getAttribute(\"href\")||\"\";if(0===x.indexOf(\"#\")&&!u.test(_.className)){var C=0,j=document.getElementById(x.substring(1));if(\"#\"!==x){if(!j)return;C=o.getTopOf(j)}s.preventDefault();var onDone=function(){window.location=x},L=o.setup().edgeOffset;L&&(C=Math.max(0,C-L),i&&(onDone=function(){history.pushState({},\"\",x)})),o.toY(C,null,onDone)}}}),!1)}return o}(),void 0===(u=\"function\"==typeof i?i.apply(o,a):i)||(s.exports=u)},86238:(s,o,i)=>{\"use strict\";var a=i(86048).F.ERR_STREAM_PREMATURE_CLOSE;function noop(){}s.exports=function eos(s,o,i){if(\"function\"==typeof o)return eos(s,null,o);o||(o={}),i=function once(s){var o=!1;return function(){if(!o){o=!0;for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];s.apply(this,a)}}}(i||noop);var u=o.readable||!1!==o.readable&&s.readable,_=o.writable||!1!==o.writable&&s.writable,w=function onlegacyfinish(){s.writable||C()},x=s._writableState&&s._writableState.finished,C=function onfinish(){_=!1,x=!0,u||i.call(s)},j=s._readableState&&s._readableState.endEmitted,L=function onend(){u=!1,j=!0,_||i.call(s)},B=function onerror(o){i.call(s,o)},$=function onclose(){var o;return u&&!j?(s._readableState&&s._readableState.ended||(o=new a),i.call(s,o)):_&&!x?(s._writableState&&s._writableState.ended||(o=new a),i.call(s,o)):void 0},V=function onrequest(){s.req.on(\"finish\",C)};return!function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?_&&!s._writableState&&(s.on(\"end\",w),s.on(\"close\",w)):(s.on(\"complete\",C),s.on(\"abort\",$),s.req?V():s.on(\"request\",V)),s.on(\"end\",L),s.on(\"finish\",C),!1!==o.error&&s.on(\"error\",B),s.on(\"close\",$),function(){s.removeListener(\"complete\",C),s.removeListener(\"abort\",$),s.removeListener(\"request\",V),s.req&&s.req.removeListener(\"finish\",C),s.removeListener(\"end\",w),s.removeListener(\"close\",w),s.removeListener(\"finish\",C),s.removeListener(\"end\",L),s.removeListener(\"error\",B),s.removeListener(\"close\",$)}}},86303:(s,o,i)=>{const a=i(10316);s.exports=class LinkElement extends a{constructor(s,o,i){super(s||[],o,i),this.element=\"link\"}get relation(){return this.attributes.get(\"relation\")}set relation(s){this.attributes.set(\"relation\",s)}get href(){return this.attributes.get(\"href\")}set href(s){this.attributes.set(\"href\",s)}}},86375:(s,o,i)=>{var a=i(14528),u=i(28879),_=i(4664),w=i(63345),x=Object.getOwnPropertySymbols?function(s){for(var o=[];s;)a(o,_(s)),s=u(s);return o}:w;s.exports=x},86649:(s,o,i)=>{var a=i(83221)();s.exports=a},86804:(s,o,i)=>{const a=i(10316),u=i(41067),_=i(71167),w=i(40239),x=i(12242),C=i(6233),j=i(87726),L=i(61045),B=i(86303),$=i(14540),V=i(92340),U=i(10866),z=i(55973);function refract(s){if(s instanceof a)return s;if(\"string\"==typeof s)return new _(s);if(\"number\"==typeof s)return new w(s);if(\"boolean\"==typeof s)return new x(s);if(null===s)return new u;if(Array.isArray(s))return new C(s.map(refract));if(\"object\"==typeof s){return new L(s)}return s}a.prototype.ObjectElement=L,a.prototype.RefElement=$,a.prototype.MemberElement=j,a.prototype.refract=refract,V.prototype.refract=refract,s.exports={Element:a,NullElement:u,StringElement:_,NumberElement:w,BooleanElement:x,ArrayElement:C,MemberElement:j,ObjectElement:L,LinkElement:B,RefElement:$,refract,ArraySlice:V,ObjectSlice:U,KeyValuePair:z}},87068:(s,o,i)=>{var a=i(37217),u=i(25911),_=i(21986),w=i(50689),x=i(5861),C=i(56449),j=i(3656),L=i(37167),B=\"[object Arguments]\",$=\"[object Array]\",V=\"[object Object]\",U=Object.prototype.hasOwnProperty;s.exports=function baseIsEqualDeep(s,o,i,z,Y,Z){var ee=C(s),ie=C(o),ae=ee?$:x(s),ce=ie?$:x(o),le=(ae=ae==B?V:ae)==V,pe=(ce=ce==B?V:ce)==V,de=ae==ce;if(de&&j(s)){if(!j(o))return!1;ee=!0,le=!1}if(de&&!le)return Z||(Z=new a),ee||L(s)?u(s,o,i,z,Y,Z):_(s,o,ae,i,z,Y,Z);if(!(1&i)){var fe=le&&U.call(s,\"__wrapped__\"),ye=pe&&U.call(o,\"__wrapped__\");if(fe||ye){var be=fe?s.value():s,_e=ye?o.value():o;return Z||(Z=new a),Y(be,_e,i,z,Z)}}return!!de&&(Z||(Z=new a),w(s,o,i,z,Y,Z))}},87136:s=>{\"use strict\";s.exports=function(s){return null==s}},87170:(s,o)=>{\"use strict\";o.f=Object.getOwnPropertySymbols},87296:(s,o,i)=>{var a,u=i(55481),_=(a=/[^.]+$/.exec(u&&u.keys&&u.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+a:\"\";s.exports=function isMasked(s){return!!_&&_ in s}},87586:(s,o,i)=>{const a=i(6205),u=i(10023),_={0:0,t:9,n:10,v:11,f:12,r:13};o.strToChars=function(s){return s=s.replace(/(\\[\\\\b\\])|(\\\\)?\\\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\\\\]^?])|([0tnvfr]))/g,(function(s,o,i,a,u,w,x,C){if(i)return s;var j=o?8:a?parseInt(a,16):u?parseInt(u,16):w?parseInt(w,8):x?\"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^ ?\".indexOf(x):_[C],L=String.fromCharCode(j);return/[[\\]{}^$.|?*+()]/.test(L)&&(L=\"\\\\\"+L),L}))},o.tokenizeClass=(s,i)=>{for(var _,w,x=[],C=/\\\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\\\)(.)|([^\\]\\\\]))-(?:\\\\)?([^\\]]))|(\\])|(?:\\\\)?([^])/g;null!=(_=C.exec(s));)if(_[1])x.push(u.words());else if(_[2])x.push(u.ints());else if(_[3])x.push(u.whitespace());else if(_[4])x.push(u.notWords());else if(_[5])x.push(u.notInts());else if(_[6])x.push(u.notWhitespace());else if(_[7])x.push({type:a.RANGE,from:(_[8]||_[9]).charCodeAt(0),to:_[10].charCodeAt(0)});else{if(!(w=_[12]))return[x,C.lastIndex];x.push({type:a.CHAR,value:w.charCodeAt(0)})}o.error(i,\"Unterminated character class\")},o.error=(s,o)=>{throw new SyntaxError(\"Invalid regular expression: /\"+s+\"/: \"+o)}},87726:(s,o,i)=>{const a=i(55973),u=i(10316);s.exports=class MemberElement extends u{constructor(s,o,i,u){super(new a,i,u),this.element=\"member\",this.key=s,this.value=o}get key(){return this.content.key}set key(s){this.content.key=this.refract(s)}get value(){return this.content.value}set value(s){this.content.value=this.refract(s)}}},87730:(s,o,i)=>{var a=i(29172),u=i(27301),_=i(86009),w=_&&_.isMap,x=w?u(w):a;s.exports=x},87805:(s,o,i)=>{var a=i(43360),u=i(75288);s.exports=function assignMergeValue(s,o,i){(void 0!==i&&!u(s[o],i)||void 0===i&&!(o in s))&&a(s,o,i)}},87978:(s,o,i)=>{var a=i(60270),u=i(58156),_=i(80631),w=i(28586),x=i(30756),C=i(67197),j=i(77797);s.exports=function baseMatchesProperty(s,o){return w(s)&&x(o)?C(j(s),o):function(i){var w=u(i,s);return void 0===w&&w===o?_(i,s):a(o,w,3)}}},88280:(s,o,i)=>{\"use strict\";var a=i(1907);s.exports=a({}.isPrototypeOf)},88310:(s,o,i)=>{s.exports=Stream;var a=i(37007).EventEmitter;function Stream(){a.call(this)}i(56698)(Stream,a),Stream.Readable=i(45412),Stream.Writable=i(16708),Stream.Duplex=i(25382),Stream.Transform=i(74610),Stream.PassThrough=i(63600),Stream.finished=i(86238),Stream.pipeline=i(57758),Stream.Stream=Stream,Stream.prototype.pipe=function(s,o){var i=this;function ondata(o){s.writable&&!1===s.write(o)&&i.pause&&i.pause()}function ondrain(){i.readable&&i.resume&&i.resume()}i.on(\"data\",ondata),s.on(\"drain\",ondrain),s._isStdio||o&&!1===o.end||(i.on(\"end\",onend),i.on(\"close\",onclose));var u=!1;function onend(){u||(u=!0,s.end())}function onclose(){u||(u=!0,\"function\"==typeof s.destroy&&s.destroy())}function onerror(s){if(cleanup(),0===a.listenerCount(this,\"error\"))throw s}function cleanup(){i.removeListener(\"data\",ondata),s.removeListener(\"drain\",ondrain),i.removeListener(\"end\",onend),i.removeListener(\"close\",onclose),i.removeListener(\"error\",onerror),s.removeListener(\"error\",onerror),i.removeListener(\"end\",cleanup),i.removeListener(\"close\",cleanup),s.removeListener(\"close\",cleanup)}return i.on(\"error\",onerror),s.on(\"error\",onerror),i.on(\"end\",cleanup),i.on(\"close\",cleanup),s.on(\"close\",cleanup),s.emit(\"pipe\",i),s}},88984:(s,o,i)=>{var a=i(55527),u=i(3650),_=Object.prototype.hasOwnProperty;s.exports=function baseKeys(s){if(!a(s))return u(s);var o=[];for(var i in Object(s))_.call(s,i)&&\"constructor\"!=i&&o.push(i);return o}},89593:(s,o,i)=>{\"use strict\";o.H=void 0;var a=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(i(84977));o.H=a.default},89935:s=>{s.exports=function stubFalse(){return!1}},90160:(s,o,i)=>{\"use strict\";var a=i(73948),u=String;s.exports=function(s){if(\"Symbol\"===a(s))throw new TypeError(\"Cannot convert a Symbol value to a string\");return u(s)}},90179:(s,o,i)=>{var a=i(34932),u=i(9999),_=i(19931),w=i(31769),x=i(21791),C=i(53138),j=i(38816),L=i(83349),B=j((function(s,o){var i={};if(null==s)return i;var j=!1;o=a(o,(function(o){return o=w(o,s),j||(j=o.length>1),o})),x(s,L(s),i),j&&(i=u(i,7,C));for(var B=o.length;B--;)_(i,o[B]);return i}));s.exports=B},90181:s=>{s.exports=function nativeKeysIn(s){var o=[];if(null!=s)for(var i in Object(s))o.push(i);return o}},90289:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheGet(s){return a(this,s).get(s)}},90392:(s,o,i)=>{var a=i(92861).Buffer;function Hash(s,o){this._block=a.alloc(s),this._finalSize=o,this._blockSize=s,this._len=0}Hash.prototype.update=function(s,o){\"string\"==typeof s&&(o=o||\"utf8\",s=a.from(s,o));for(var i=this._block,u=this._blockSize,_=s.length,w=this._len,x=0;x<_;){for(var C=w%u,j=Math.min(_-x,u-C),L=0;L<j;L++)i[C+L]=s[x+L];x+=j,(w+=j)%u==0&&this._update(i)}return this._len+=_,this},Hash.prototype.digest=function(s){var o=this._len%this._blockSize;this._block[o]=128,this._block.fill(0,o+1),o>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var a=(4294967295&i)>>>0,u=(i-a)/4294967296;this._block.writeUInt32BE(u,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var _=this._hash();return s?_.toString(s):_},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},s.exports=Hash},90916:(s,o,i)=>{var a=i(80909);s.exports=function baseSome(s,o){var i;return a(s,(function(s,a,u){return!(i=o(s,a,u))})),!!i}},90938:s=>{s.exports=function stackDelete(s){var o=this.__data__,i=o.delete(s);return this.size=o.size,i}},91033:s=>{s.exports=function apply(s,o,i){switch(i.length){case 0:return s.call(o);case 1:return s.call(o,i[0]);case 2:return s.call(o,i[0],i[1]);case 3:return s.call(o,i[0],i[1],i[2])}return s.apply(o,i)}},91596:s=>{var o=Math.max;s.exports=function composeArgs(s,i,a,u){for(var _=-1,w=s.length,x=a.length,C=-1,j=i.length,L=o(w-x,0),B=Array(j+L),$=!u;++C<j;)B[C]=i[C];for(;++_<x;)($||_<w)&&(B[a[_]]=s[_]);for(;L--;)B[C++]=s[_++];return B}},91599:(s,o,i)=>{\"use strict\";i(64502)},92046:s=>{\"use strict\";s.exports={}},92063:s=>{\"use strict\";s.exports=function required(s,o){if(o=o.split(\":\")[0],!(s=+s))return!1;switch(o){case\"http\":case\"ws\":return 80!==s;case\"https\":case\"wss\":return 443!==s;case\"ftp\":return 21!==s;case\"gopher\":return 70!==s;case\"file\":return!1}return 0!==s}},92271:(s,o,i)=>{var a=i(21791),u=i(4664);s.exports=function copySymbols(s,o){return a(s,u(s),o)}},92340:(s,o,i)=>{const a=i(6048);function coerceElementMatchingCallback(s){return\"string\"==typeof s?o=>o.element===s:s.constructor&&s.extend?o=>o instanceof s:s}class ArraySlice{constructor(s){this.elements=s||[]}toValue(){return this.elements.map((s=>s.toValue()))}map(s,o){return this.elements.map(s,o)}flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(a);u&&i.push(u)})),i}filter(s,o){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(s,o))}reject(s,o){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(a(s),o))}find(s,o){return s=coerceElementMatchingCallback(s),this.elements.find(s,o)}forEach(s,o){this.elements.forEach(s,o)}reduce(s,o){return this.elements.reduce(s,o)}includes(s){return this.elements.some((o=>o.equals(s)))}shift(){return this.elements.shift()}unshift(s){this.elements.unshift(this.refract(s))}push(s){return this.elements.push(this.refract(s)),this}add(s){this.push(s)}get(s){return this.elements[s]}getValue(s){const o=this.elements[s];if(o)return o.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}\"undefined\"!=typeof Symbol&&(ArraySlice.prototype[Symbol.iterator]=function symbol(){return this.elements[Symbol.iterator]()}),s.exports=ArraySlice},92361:(s,o,i)=>{\"use strict\";var a=i(45807),u=i(1907);s.exports=function(s){if(\"Function\"===a(s))return u(s)}},92522:(s,o,i)=>{\"use strict\";var a=i(85816),u=i(6499),_=a(\"keys\");s.exports=function(s){return _[s]||(_[s]=u(s))}},92861:(s,o,i)=>{var a=i(48287),u=a.Buffer;function copyProps(s,o){for(var i in s)o[i]=s[i]}function SafeBuffer(s,o,i){return u(s,o,i)}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?s.exports=a:(copyProps(a,o),o.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(u.prototype),copyProps(u,SafeBuffer),SafeBuffer.from=function(s,o,i){if(\"number\"==typeof s)throw new TypeError(\"Argument must not be a number\");return u(s,o,i)},SafeBuffer.alloc=function(s,o,i){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");var a=u(s);return void 0!==o?\"string\"==typeof i?a.fill(o,i):a.fill(o):a.fill(0),a},SafeBuffer.allocUnsafe=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return u(s)},SafeBuffer.allocUnsafeSlow=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return a.SlowBuffer(s)}},93243:(s,o,i)=>{var a=i(56110),u=function(){try{var s=a(Object,\"defineProperty\");return s({},\"\",{}),s}catch(s){}}();s.exports=u},93290:(s,o,i)=>{s=i.nmd(s);var a=i(9325),u=o&&!o.nodeType&&o,_=u&&s&&!s.nodeType&&s,w=_&&_.exports===u?a.Buffer:void 0,x=w?w.allocUnsafe:void 0;s.exports=function cloneBuffer(s,o){if(o)return s.slice();var i=s.length,a=x?x(i):new s.constructor(i);return s.copy(a),a}},93427:(s,o,i)=>{\"use strict\";var a=i(1907);s.exports=a([].slice)},93663:(s,o,i)=>{var a=i(41799),u=i(10776),_=i(67197);s.exports=function baseMatches(s){var o=u(s);return 1==o.length&&o[0][2]?_(o[0][0],o[0][1]):function(i){return i===s||a(i,s,o)}}},93700:(s,o,i)=>{\"use strict\";var a=i(19709);s.exports=a},93736:(s,o,i)=>{var a=i(51873),u=a?a.prototype:void 0,_=u?u.valueOf:void 0;s.exports=function cloneSymbol(s){return _?Object(_.call(s)):{}}},93742:s=>{\"use strict\";s.exports={}},94033:s=>{s.exports=function baseLodash(){}},94643:(s,o,i)=>{function config(s){try{if(!i.g.localStorage)return!1}catch(s){return!1}var o=i.g.localStorage[s];return null!=o&&\"true\"===String(o).toLowerCase()}s.exports=function deprecate(s,o){if(config(\"noDeprecation\"))return s;var i=!1;return function deprecated(){if(!i){if(config(\"throwDeprecation\"))throw new Error(o);config(\"traceDeprecation\")?console.trace(o):console.warn(o),i=!0}return s.apply(this,arguments)}}},95089:s=>{const o=\"[A-Za-z$_][0-9A-Za-z$_]*\",i=[\"as\",\"in\",\"of\",\"if\",\"for\",\"while\",\"finally\",\"var\",\"new\",\"function\",\"do\",\"return\",\"void\",\"else\",\"break\",\"catch\",\"instanceof\",\"with\",\"throw\",\"case\",\"default\",\"try\",\"switch\",\"continue\",\"typeof\",\"delete\",\"let\",\"yield\",\"const\",\"class\",\"debugger\",\"async\",\"await\",\"static\",\"import\",\"from\",\"export\",\"extends\"],a=[\"true\",\"false\",\"null\",\"undefined\",\"NaN\",\"Infinity\"],u=[].concat([\"setInterval\",\"setTimeout\",\"clearInterval\",\"clearTimeout\",\"require\",\"exports\",\"eval\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\"],[\"arguments\",\"this\",\"super\",\"console\",\"window\",\"document\",\"localStorage\",\"module\",\"global\"],[\"Intl\",\"DataView\",\"Number\",\"Math\",\"Date\",\"String\",\"RegExp\",\"Object\",\"Function\",\"Boolean\",\"Error\",\"Symbol\",\"Set\",\"Map\",\"WeakSet\",\"WeakMap\",\"Proxy\",\"Reflect\",\"JSON\",\"Promise\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Float32Array\",\"Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"ArrayBuffer\",\"BigInt64Array\",\"BigUint64Array\",\"BigInt\"],[\"EvalError\",\"InternalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\"]);function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function javascript(s){const _=o,w=\"<>\",x=\"</>\",C={begin:/<[A-Za-z0-9\\\\._:-]+/,end:/\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,isTrulyOpeningTag:(s,o)=>{const i=s[0].length+s.index,a=s.input[i];\"<\"!==a?\">\"===a&&(((s,{after:o})=>{const i=\"</\"+s[0].slice(1);return-1!==s.input.indexOf(i,o)})(s,{after:i})||o.ignoreMatch()):o.ignoreMatch()}},j={$pattern:o,keyword:i,literal:a,built_in:u},L=\"[0-9](_?[0-9])*\",B=`\\\\.(${L})`,$=\"0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*\",V={className:\"number\",variants:[{begin:`(\\\\b(${$})((${B})|\\\\.)?|(${B}))[eE][+-]?(${L})\\\\b`},{begin:`\\\\b(${$})\\\\b((${B})\\\\b|\\\\.)?|(${B})\\\\b`},{begin:\"\\\\b(0|[1-9](_?[0-9])*)n\\\\b\"},{begin:\"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\"},{begin:\"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\"},{begin:\"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\"},{begin:\"\\\\b0[0-7]+n?\\\\b\"}],relevance:0},U={className:\"subst\",begin:\"\\\\$\\\\{\",end:\"\\\\}\",keywords:j,contains:[]},z={begin:\"html`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,U],subLanguage:\"xml\"}},Y={begin:\"css`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,U],subLanguage:\"css\"}},Z={className:\"string\",begin:\"`\",end:\"`\",contains:[s.BACKSLASH_ESCAPE,U]},ee={className:\"comment\",variants:[s.COMMENT(/\\/\\*\\*(?!\\/)/,\"\\\\*/\",{relevance:0,contains:[{className:\"doctag\",begin:\"@[A-Za-z]+\",contains:[{className:\"type\",begin:\"\\\\{\",end:\"\\\\}\",relevance:0},{className:\"variable\",begin:_+\"(?=\\\\s*(-)|$)\",endsParent:!0,relevance:0},{begin:/(?=[^\\n])\\s/,relevance:0}]}]}),s.C_BLOCK_COMMENT_MODE,s.C_LINE_COMMENT_MODE]},ie=[s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,z,Y,Z,V,s.REGEXP_MODE];U.contains=ie.concat({begin:/\\{/,end:/\\}/,keywords:j,contains:[\"self\"].concat(ie)});const ae=[].concat(ee,U.contains),ce=ae.concat([{begin:/\\(/,end:/\\)/,keywords:j,contains:[\"self\"].concat(ae)}]),le={className:\"params\",begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:j,contains:ce};return{name:\"Javascript\",aliases:[\"js\",\"jsx\",\"mjs\",\"cjs\"],keywords:j,exports:{PARAMS_CONTAINS:ce},illegal:/#(?![$_A-z])/,contains:[s.SHEBANG({label:\"shebang\",binary:\"node\",relevance:5}),{label:\"use_strict\",className:\"meta\",relevance:10,begin:/^\\s*['\"]use (strict|asm)['\"]/},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,z,Y,Z,ee,V,{begin:concat(/[{,\\n]\\s*/,lookahead(concat(/(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,_+\"\\\\s*:\"))),relevance:0,contains:[{className:\"attr\",begin:_+lookahead(\"\\\\s*:\"),relevance:0}]},{begin:\"(\"+s.RE_STARTERS_RE+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",keywords:\"return throw case\",contains:[ee,s.REGEXP_MODE,{className:\"function\",begin:\"(\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)|\"+s.UNDERSCORE_IDENT_RE+\")\\\\s*=>\",returnBegin:!0,end:\"\\\\s*=>\",contains:[{className:\"params\",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\\(\\s*\\)/,skip:!0},{begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:j,contains:ce}]}]},{begin:/,/,relevance:0},{className:\"\",begin:/\\s/,end:/\\s*/,skip:!0},{variants:[{begin:w,end:x},{begin:C.begin,\"on:begin\":C.isTrulyOpeningTag,end:C.end}],subLanguage:\"xml\",contains:[{begin:C.begin,end:C.end,skip:!0,contains:[\"self\"]}]}],relevance:0},{className:\"function\",beginKeywords:\"function\",end:/[{;]/,excludeEnd:!0,keywords:j,contains:[\"self\",s.inherit(s.TITLE_MODE,{begin:_}),le],illegal:/%/},{beginKeywords:\"while if switch catch for\"},{className:\"function\",begin:s.UNDERSCORE_IDENT_RE+\"\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)\\\\s*\\\\{\",returnBegin:!0,contains:[le,s.inherit(s.TITLE_MODE,{begin:_})]},{variants:[{begin:\"\\\\.\"+_},{begin:\"\\\\$\"+_}],relevance:0},{className:\"class\",beginKeywords:\"class\",end:/[{;=]/,excludeEnd:!0,illegal:/[:\"[\\]]/,contains:[{beginKeywords:\"extends\"},s.UNDERSCORE_TITLE_MODE]},{begin:/\\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[s.inherit(s.TITLE_MODE,{begin:_}),\"self\",le]},{begin:\"(get|set)\\\\s+(?=\"+_+\"\\\\()\",end:/\\{/,keywords:\"get set\",contains:[s.inherit(s.TITLE_MODE,{begin:_}),{begin:/\\(\\)/},le]},{begin:/\\$[(.]/}]}}},95116:(s,o,i)=>{\"use strict\";var a,u,_,w=i(98828),x=i(62250),C=i(46285),j=i(58075),L=i(15972),B=i(68055),$=i(76264),V=i(7376),U=$(\"iterator\"),z=!1;[].keys&&(\"next\"in(_=[].keys())?(u=L(L(_)))!==Object.prototype&&(a=u):z=!0),!C(a)||w((function(){var s={};return a[U].call(s)!==s}))?a={}:V&&(a=j(a)),x(a[U])||B(a,U,(function(){return this})),s.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:z}},95950:(s,o,i)=>{var a=i(70695),u=i(88984),_=i(64894);s.exports=function keys(s){return _(s)?a(s):u(s)}},96131:(s,o,i)=>{var a=i(2523),u=i(85463),_=i(76959);s.exports=function baseIndexOf(s,o,i){return o==o?_(s,o,i):a(s,u,i)}},96540:(s,o,i)=>{\"use strict\";s.exports=i(15287)},96605:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(45951),_=i(76024),w=i(19358),x=\"WebAssembly\",C=u[x],j=7!==new Error(\"e\",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(s,o){var i={};i[s]=w(s,o,j),a({global:!0,constructor:!0,arity:1,forced:j},i)},exportWebAssemblyErrorCauseWrapper=function(s,o){if(C&&C[s]){var i={};i[s]=w(x+\".\"+s,o,j),a({target:x,stat:!0,constructor:!0,arity:1,forced:j},i)}};exportGlobalErrorCauseWrapper(\"Error\",(function(s){return function Error(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"EvalError\",(function(s){return function EvalError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"RangeError\",(function(s){return function RangeError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"ReferenceError\",(function(s){return function ReferenceError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"SyntaxError\",(function(s){return function SyntaxError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"TypeError\",(function(s){return function TypeError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"URIError\",(function(s){return function URIError(o){return _(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"CompileError\",(function(s){return function CompileError(o){return _(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"LinkError\",(function(s){return function LinkError(o){return _(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"RuntimeError\",(function(s){return function RuntimeError(o){return _(s,this,arguments)}}))},96794:(s,o,i)=>{\"use strict\";var a=i(45951).navigator,u=a&&a.userAgent;s.exports=u?String(u):\"\"},98023:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function isNumber(s){return\"number\"==typeof s||u(s)&&\"[object Number]\"==a(s)}},98828:s=>{\"use strict\";s.exports=function(s){try{return!!s()}catch(s){return!0}}},99363:(s,o,i)=>{\"use strict\";var a=i(4993),u=i(42156),_=i(93742),w=i(64932),x=i(74284).f,C=i(60183),j=i(59550),L=i(7376),B=i(39447),$=\"Array Iterator\",V=w.set,U=w.getterFor($);s.exports=C(Array,\"Array\",(function(s,o){V(this,{type:$,target:a(s),index:0,kind:o})}),(function(){var s=U(this),o=s.target,i=s.index++;if(!o||i>=o.length)return s.target=null,j(void 0,!0);switch(s.kind){case\"keys\":return j(i,!1);case\"values\":return j(o[i],!1)}return j([i,o[i]],!1)}),\"values\");var z=_.Arguments=_.Array;if(u(\"keys\"),u(\"values\"),u(\"entries\"),!L&&B&&\"values\"!==z.name)try{x(z,\"name\",{value:\"values\"})}catch(s){}},99374:(s,o,i)=>{var a=i(54128),u=i(23805),_=i(44394),w=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,C=/^0o[0-7]+$/i,j=parseInt;s.exports=function toNumber(s){if(\"number\"==typeof s)return s;if(_(s))return NaN;if(u(s)){var o=\"function\"==typeof s.valueOf?s.valueOf():s;s=u(o)?o+\"\":o}if(\"string\"!=typeof s)return 0===s?s:+s;s=a(s);var i=x.test(s);return i||C.test(s)?j(s.slice(2),i?2:8):w.test(s)?NaN:+s}}},o={};function __webpack_require__(i){var a=o[i];if(void 0!==a)return a.exports;var u=o[i]={id:i,loaded:!1,exports:{}};return s[i].call(u.exports,u,u.exports,__webpack_require__),u.loaded=!0,u.exports}__webpack_require__.n=s=>{var o=s&&s.__esModule?()=>s.default:()=>s;return __webpack_require__.d(o,{a:o}),o},__webpack_require__.d=(s,o)=>{for(var i in o)__webpack_require__.o(o,i)&&!__webpack_require__.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:o[i]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(s){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(s,o)=>Object.prototype.hasOwnProperty.call(s,o),__webpack_require__.r=s=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(s,\"__esModule\",{value:!0})},__webpack_require__.nmd=s=>(s.paths=[],s.children||(s.children=[]),s);var i={};return(()=>{\"use strict\";__webpack_require__.d(i,{default:()=>JT});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{CLEAR:()=>at,CLEAR_BY:()=>ct,NEW_AUTH_ERR:()=>it,NEW_SPEC_ERR:()=>st,NEW_SPEC_ERR_BATCH:()=>ot,NEW_THROWN_ERR:()=>rt,NEW_THROWN_ERR_BATCH:()=>nt,clear:()=>clear,clearBy:()=>clearBy,newAuthErr:()=>newAuthErr,newSpecErr:()=>newSpecErr,newSpecErrBatch:()=>newSpecErrBatch,newThrownErr:()=>newThrownErr,newThrownErrBatch:()=>newThrownErrBatch});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{AUTHORIZE:()=>Rt,AUTHORIZE_OAUTH2:()=>Lt,CONFIGURE_AUTH:()=>Ft,LOGOUT:()=>Dt,RESTORE_AUTHORIZATION:()=>Bt,SHOW_AUTH_POPUP:()=>Mt,authPopup:()=>authPopup,authorize:()=>authorize,authorizeAccessCodeWithBasicAuthentication:()=>authorizeAccessCodeWithBasicAuthentication,authorizeAccessCodeWithFormParams:()=>authorizeAccessCodeWithFormParams,authorizeApplication:()=>authorizeApplication,authorizeOauth2:()=>authorizeOauth2,authorizeOauth2WithPersistOption:()=>authorizeOauth2WithPersistOption,authorizePassword:()=>authorizePassword,authorizeRequest:()=>authorizeRequest,authorizeWithPersistOption:()=>authorizeWithPersistOption,configureAuth:()=>configureAuth,logout:()=>logout,logoutWithPersistOption:()=>logoutWithPersistOption,persistAuthorizationIfNeeded:()=>persistAuthorizationIfNeeded,preAuthorizeImplicit:()=>preAuthorizeImplicit,restoreAuthorization:()=>restoreAuthorization,showDefinitions:()=>showDefinitions});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{authorized:()=>Jt,definitionsForRequirements:()=>definitionsForRequirements,definitionsToAuthorize:()=>Wt,getConfigs:()=>Ht,getDefinitionsByNames:()=>getDefinitionsByNames,isAuthorized:()=>isAuthorized,selectAuthPath:()=>selectAuthPath,shownDefinitions:()=>zt});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{TOGGLE_CONFIGS:()=>gn,UPDATE_CONFIGS:()=>mn,downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl,loaded:()=>actions_loaded,toggle:()=>toggle,update:()=>update});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{get:()=>get});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{transform:()=>transform});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{transform:()=>parameter_oneof_transform});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{allErrors:()=>Pn,lastError:()=>Tn});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{SHOW:()=>Fn,UPDATE_FILTER:()=>Dn,UPDATE_LAYOUT:()=>Rn,UPDATE_MODE:()=>Ln,changeMode:()=>changeMode,show:()=>actions_show,updateFilter:()=>updateFilter,updateLayout:()=>updateLayout});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{current:()=>current,currentFilter:()=>currentFilter,isShown:()=>isShown,showSummary:()=>$n,whatMode:()=>whatMode});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{taggedOperations:()=>taggedOperations});var $={};__webpack_require__.r($),__webpack_require__.d($,{getActiveLanguage:()=>Un,getDefaultExpanded:()=>zn,getGenerators:()=>Vn,getSnippetGenerators:()=>getSnippetGenerators});var V={};__webpack_require__.r(V),__webpack_require__.d(V,{JsonSchemaArrayItemFile:()=>JsonSchemaArrayItemFile,JsonSchemaArrayItemText:()=>JsonSchemaArrayItemText,JsonSchemaForm:()=>JsonSchemaForm,JsonSchema_array:()=>JsonSchema_array,JsonSchema_boolean:()=>JsonSchema_boolean,JsonSchema_object:()=>JsonSchema_object,JsonSchema_string:()=>JsonSchema_string});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{allowTryItOutFor:()=>allowTryItOutFor,basePath:()=>Hs,canExecuteScheme:()=>canExecuteScheme,consumes:()=>Vs,consumesOptionsFor:()=>consumesOptionsFor,contentTypeValues:()=>contentTypeValues,currentProducesFor:()=>currentProducesFor,definitions:()=>Js,externalDocs:()=>Ds,findDefinition:()=>findDefinition,getOAS3RequiredRequestBodyContentType:()=>getOAS3RequiredRequestBodyContentType,getParameter:()=>getParameter,hasHost:()=>ro,host:()=>Ks,info:()=>Rs,isMediaTypeSchemaPropertiesEqual:()=>isMediaTypeSchemaPropertiesEqual,isOAS3:()=>Ms,lastError:()=>Os,mutatedRequestFor:()=>mutatedRequestFor,mutatedRequests:()=>to,operationScheme:()=>operationScheme,operationWithMeta:()=>operationWithMeta,operations:()=>qs,operationsWithRootInherited:()=>Ys,operationsWithTags:()=>Qs,parameterInclusionSettingFor:()=>parameterInclusionSettingFor,parameterValues:()=>parameterValues,parameterWithMeta:()=>parameterWithMeta,parameterWithMetaByIdentity:()=>parameterWithMetaByIdentity,parametersIncludeIn:()=>parametersIncludeIn,parametersIncludeType:()=>parametersIncludeType,paths:()=>Bs,produces:()=>Us,producesOptionsFor:()=>producesOptionsFor,requestFor:()=>requestFor,requests:()=>eo,responseFor:()=>responseFor,responses:()=>Zs,schemes:()=>Gs,security:()=>zs,securityDefinitions:()=>Ws,semver:()=>Fs,spec:()=>spec,specJS:()=>Ps,specJson:()=>Is,specJsonWithResolvedSubtrees:()=>Ns,specResolved:()=>Ts,specResolvedSubtree:()=>specResolvedSubtree,specSource:()=>js,specStr:()=>As,tagDetails:()=>tagDetails,taggedOperations:()=>selectors_taggedOperations,tags:()=>Xs,url:()=>Cs,validOperationMethods:()=>$s,validateBeforeExecute:()=>validateBeforeExecute,validationErrors:()=>validationErrors,version:()=>Ls});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{CLEAR_REQUEST:()=>wo,CLEAR_RESPONSE:()=>Eo,CLEAR_VALIDATE_PARAMS:()=>xo,LOG_REQUEST:()=>So,SET_MUTATED_REQUEST:()=>_o,SET_REQUEST:()=>bo,SET_RESPONSE:()=>vo,SET_SCHEME:()=>Ao,UPDATE_EMPTY_PARAM_INCLUSION:()=>go,UPDATE_JSON:()=>fo,UPDATE_OPERATION_META_VALUE:()=>ko,UPDATE_PARAM:()=>mo,UPDATE_RESOLVED:()=>Oo,UPDATE_RESOLVED_SUBTREE:()=>Co,UPDATE_SPEC:()=>po,UPDATE_URL:()=>ho,VALIDATE_PARAMS:()=>yo,changeConsumesValue:()=>changeConsumesValue,changeParam:()=>changeParam,changeParamByIdentity:()=>changeParamByIdentity,changeProducesValue:()=>changeProducesValue,clearRequest:()=>clearRequest,clearResponse:()=>clearResponse,clearValidateParams:()=>clearValidateParams,execute:()=>actions_execute,executeRequest:()=>executeRequest,invalidateResolvedSubtreeCache:()=>invalidateResolvedSubtreeCache,logRequest:()=>logRequest,parseToJson:()=>parseToJson,requestResolvedSubtree:()=>requestResolvedSubtree,resolveSpec:()=>resolveSpec,setMutatedRequest:()=>setMutatedRequest,setRequest:()=>setRequest,setResponse:()=>setResponse,setScheme:()=>setScheme,updateEmptyParamInclusion:()=>updateEmptyParamInclusion,updateJsonSpec:()=>updateJsonSpec,updateResolved:()=>updateResolved,updateResolvedSubtree:()=>updateResolvedSubtree,updateSpec:()=>updateSpec,updateUrl:()=>updateUrl,validateParams:()=>validateParams});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{executeRequest:()=>wrap_actions_executeRequest,updateJsonSpec:()=>wrap_actions_updateJsonSpec,updateSpec:()=>wrap_actions_updateSpec,validateParams:()=>wrap_actions_validateParams});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{JsonPatchError:()=>Do,_areEquals:()=>_areEquals,applyOperation:()=>applyOperation,applyPatch:()=>applyPatch,applyReducer:()=>applyReducer,deepClone:()=>Lo,getValueByPointer:()=>getValueByPointer,validate:()=>validate,validator:()=>validator});var ee={};__webpack_require__.r(ee),__webpack_require__.d(ee,{compare:()=>compare,generate:()=>generate,observe:()=>observe,unobserve:()=>unobserve});var ie={};__webpack_require__.r(ie),__webpack_require__.d(ie,{hasElementSourceMap:()=>hasElementSourceMap,includesClasses:()=>includesClasses,includesSymbols:()=>includesSymbols,isAnnotationElement:()=>Bu,isArrayElement:()=>Ru,isBooleanElement:()=>Nu,isCommentElement:()=>$u,isElement:()=>ju,isLinkElement:()=>Lu,isMemberElement:()=>Du,isNullElement:()=>Tu,isNumberElement:()=>Pu,isObjectElement:()=>Mu,isParseResultElement:()=>qu,isPrimitiveElement:()=>isPrimitiveElement,isRefElement:()=>Fu,isSourceMapElement:()=>Vu,isStringElement:()=>Iu});var ae={};__webpack_require__.r(ae),__webpack_require__.d(ae,{isJSONReferenceElement:()=>Bd,isJSONSchemaElement:()=>Fd,isLinkDescriptionElement:()=>Vd,isMediaElement:()=>$d});var ce={};__webpack_require__.r(ce),__webpack_require__.d(ce,{isBooleanJsonSchemaElement:()=>isBooleanJsonSchemaElement,isCallbackElement:()=>Mm,isComponentsElement:()=>Rm,isContactElement:()=>Dm,isExampleElement:()=>Lm,isExternalDocumentationElement:()=>Fm,isHeaderElement:()=>Bm,isInfoElement:()=>$m,isLicenseElement:()=>qm,isLinkElement:()=>Vm,isMediaTypeElement:()=>og,isOpenApi3_0Element:()=>zm,isOpenapiElement:()=>Um,isOperationElement:()=>Wm,isParameterElement:()=>Jm,isPathItemElement:()=>Hm,isPathsElement:()=>Km,isReferenceElement:()=>Gm,isRequestBodyElement:()=>Ym,isResponseElement:()=>Xm,isResponsesElement:()=>Qm,isSchemaElement:()=>Zm,isSecurityRequirementElement:()=>eg,isSecuritySchemeElement:()=>rg,isServerElement:()=>ng,isServerVariableElement:()=>sg,isServersElement:()=>lg});var le={};__webpack_require__.r(le),__webpack_require__.d(le,{isJSONReferenceElement:()=>Bd,isJSONSchemaElement:()=>y_,isLinkDescriptionElement:()=>v_,isMediaElement:()=>$d});var pe={};__webpack_require__.r(pe),__webpack_require__.d(pe,{isJSONReferenceElement:()=>Bd,isJSONSchemaElement:()=>A_,isLinkDescriptionElement:()=>j_});var de={};__webpack_require__.r(de),__webpack_require__.d(de,{isJSONSchemaElement:()=>G_,isLinkDescriptionElement:()=>Y_});var fe={};__webpack_require__.r(fe),__webpack_require__.d(fe,{isJSONSchemaElement:()=>iS,isLinkDescriptionElement:()=>aS});var ye={};__webpack_require__.r(ye),__webpack_require__.d(ye,{isBooleanJsonSchemaElement:()=>predicates_isBooleanJsonSchemaElement,isCallbackElement:()=>WS,isComponentsElement:()=>JS,isContactElement:()=>HS,isExampleElement:()=>KS,isExternalDocumentationElement:()=>GS,isHeaderElement:()=>YS,isInfoElement:()=>XS,isJsonSchemaDialectElement:()=>QS,isLicenseElement:()=>ZS,isLinkElement:()=>eE,isMediaTypeElement:()=>gE,isOpenApi3_1Element:()=>rE,isOpenapiElement:()=>tE,isOperationElement:()=>nE,isParameterElement:()=>sE,isPathItemElement:()=>oE,isPathItemElementExternal:()=>isPathItemElementExternal,isPathsElement:()=>iE,isReferenceElement:()=>aE,isReferenceElementExternal:()=>isReferenceElementExternal,isRequestBodyElement:()=>cE,isResponseElement:()=>lE,isResponsesElement:()=>uE,isSchemaElement:()=>pE,isSecurityRequirementElement:()=>hE,isSecuritySchemeElement:()=>dE,isServerElement:()=>fE,isServerVariableElement:()=>mE});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{cookie:()=>cookie,header:()=>parameter_builders_header,path:()=>parameter_builders_path,query:()=>query});var _e={};__webpack_require__.r(_e),__webpack_require__.d(_e,{Button:()=>Button,Col:()=>Col,Collapse:()=>Collapse,Container:()=>Container,Input:()=>Input,Link:()=>layout_utils_Link,Row:()=>Row,Select:()=>Select,TextArea:()=>TextArea});var Se={};__webpack_require__.r(Se),__webpack_require__.d(Se,{basePath:()=>MI,consumes:()=>RI,definitions:()=>II,findDefinition:()=>jI,hasHost:()=>PI,host:()=>NI,produces:()=>DI,schemes:()=>LI,securityDefinitions:()=>TI,validOperationMethods:()=>wrap_selectors_validOperationMethods});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{definitionsToAuthorize:()=>FI});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{callbacksOperations:()=>qI,findSchema:()=>findSchema,isOAS3:()=>selectors_isOAS3,isOAS30:()=>selectors_isOAS30,isSwagger2:()=>selectors_isSwagger2,servers:()=>$I});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>aP,CLEAR_REQUEST_BODY_VALUE:()=>cP,SET_REQUEST_BODY_VALIDATE_ERROR:()=>iP,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>rP,UPDATE_REQUEST_BODY_INCLUSION:()=>tP,UPDATE_REQUEST_BODY_VALUE:()=>ZI,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>eP,UPDATE_REQUEST_CONTENT_TYPE:()=>nP,UPDATE_RESPONSE_CONTENT_TYPE:()=>sP,UPDATE_SELECTED_SERVER:()=>QI,UPDATE_SERVER_VARIABLE_VALUE:()=>oP,clearRequestBodyValidateError:()=>clearRequestBodyValidateError,clearRequestBodyValue:()=>clearRequestBodyValue,initRequestBodyValidateError:()=>initRequestBodyValidateError,setActiveExamplesMember:()=>setActiveExamplesMember,setRequestBodyInclusion:()=>setRequestBodyInclusion,setRequestBodyValidateError:()=>setRequestBodyValidateError,setRequestBodyValue:()=>setRequestBodyValue,setRequestContentType:()=>setRequestContentType,setResponseContentType:()=>setResponseContentType,setRetainRequestBodyValueFlag:()=>setRetainRequestBodyValueFlag,setSelectedServer:()=>setSelectedServer,setServerVariableValue:()=>setServerVariableValue});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{activeExamplesMember:()=>yP,hasUserEditedBody:()=>fP,requestBodyErrors:()=>gP,requestBodyInclusionSetting:()=>mP,requestBodyValue:()=>hP,requestContentType:()=>vP,responseContentType:()=>bP,selectDefaultRequestBodyValue:()=>selectDefaultRequestBodyValue,selectedServer:()=>pP,serverEffectiveValue:()=>EP,serverVariableValue:()=>_P,serverVariables:()=>SP,shouldRetainRequestBodyValue:()=>dP,validOperationMethods:()=>xP,validateBeforeExecute:()=>wP,validateShallowRequired:()=>validateShallowRequired});var Re=__webpack_require__(96540);function formatProdErrorMessage(s){return`Minified Redux error #${s}; visit https://redux.js.org/Errors?code=${s} for the full message or use the non-minified dev environment for full errors. `}var $e=(()=>\"function\"==typeof Symbol&&Symbol.observable||\"@@observable\")(),randomString=()=>Math.random().toString(36).substring(7).split(\"\").join(\".\"),qe={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`};function isPlainObject(s){if(\"object\"!=typeof s||null===s)return!1;let o=s;for(;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(s)===o||null===Object.getPrototypeOf(s)}function createStore(s,o,i){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(2));if(\"function\"==typeof o&&\"function\"==typeof i||\"function\"==typeof i&&\"function\"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if(\"function\"==typeof o&&void 0===i&&(i=o,o=void 0),void 0!==i){if(\"function\"!=typeof i)throw new Error(formatProdErrorMessage(1));return i(createStore)(s,o)}let a=s,u=o,_=new Map,w=_,x=0,C=!1;function ensureCanMutateNextListeners(){w===_&&(w=new Map,_.forEach(((s,o)=>{w.set(o,s)})))}function getState(){if(C)throw new Error(formatProdErrorMessage(3));return u}function subscribe(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(4));if(C)throw new Error(formatProdErrorMessage(5));let o=!0;ensureCanMutateNextListeners();const i=x++;return w.set(i,s),function unsubscribe(){if(o){if(C)throw new Error(formatProdErrorMessage(6));o=!1,ensureCanMutateNextListeners(),w.delete(i),_=null}}}function dispatch(s){if(!isPlainObject(s))throw new Error(formatProdErrorMessage(7));if(void 0===s.type)throw new Error(formatProdErrorMessage(8));if(\"string\"!=typeof s.type)throw new Error(formatProdErrorMessage(17));if(C)throw new Error(formatProdErrorMessage(9));try{C=!0,u=a(u,s)}finally{C=!1}return(_=w).forEach((s=>{s()})),s}dispatch({type:qe.INIT});return{dispatch,subscribe,getState,replaceReducer:function replaceReducer(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(10));a=s,dispatch({type:qe.REPLACE})},[$e]:function observable(){const s=subscribe;return{subscribe(o){if(\"object\"!=typeof o||null===o)throw new Error(formatProdErrorMessage(11));function observeState(){const s=o;s.next&&s.next(getState())}observeState();return{unsubscribe:s(observeState)}},[$e](){return this}}}}}function bindActionCreator(s,o){return function(...i){return o(s.apply(this,i))}}function compose(...s){return 0===s.length?s=>s:1===s.length?s[0]:s.reduce(((s,o)=>(...i)=>s(o(...i))))}var ze=__webpack_require__(9404),We=__webpack_require__.n(ze),He=__webpack_require__(81919),Ye=__webpack_require__.n(He),Xe=__webpack_require__(89593),Qe=__webpack_require__(20334),et=__webpack_require__(55364),tt=__webpack_require__.n(et);const rt=\"err_new_thrown_err\",nt=\"err_new_thrown_err_batch\",st=\"err_new_spec_err\",ot=\"err_new_spec_err_batch\",it=\"err_new_auth_err\",at=\"err_clear\",ct=\"err_clear_by\";function newThrownErr(s){return{type:rt,payload:(0,Qe.serializeError)(s)}}function newThrownErrBatch(s){return{type:nt,payload:s}}function newSpecErr(s){return{type:st,payload:s}}function newSpecErrBatch(s){return{type:ot,payload:s}}function newAuthErr(s){return{type:it,payload:s}}function clear(s={}){return{type:at,payload:s}}function clearBy(s=()=>!0){return{type:ct,payload:s}}const lt=function makeWindow(){var s={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return s;try{s=window;for(var o of[\"File\",\"Blob\",\"FormData\"])o in window&&(s[o]=window[o])}catch(s){console.error(s)}return s}();__webpack_require__(84058),__webpack_require__(55808);var ut=__webpack_require__(50104),pt=__webpack_require__.n(ut),ht=__webpack_require__(7309),dt=__webpack_require__.n(ht),mt=__webpack_require__(42426),gt=__webpack_require__.n(mt),yt=__webpack_require__(75288),vt=__webpack_require__.n(yt),bt=__webpack_require__(1882),_t=__webpack_require__.n(bt),St=__webpack_require__(2205),Et=__webpack_require__.n(St),wt=__webpack_require__(53209),xt=__webpack_require__.n(wt),kt=__webpack_require__(62802),Ot=__webpack_require__.n(kt);const Ct=We().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(s,{isOAS3:o}={}){if(!We().Map.isMap(s))return{schema:We().Map(),parameterContentMediaType:null};if(!o)return\"body\"===s.get(\"in\")?{schema:s.get(\"schema\",We().Map()),parameterContentMediaType:null}:{schema:s.filter(((s,o)=>Ct.includes(o))),parameterContentMediaType:null};if(s.get(\"content\")){const o=s.get(\"content\",We().Map({})).keySeq().first();return{schema:s.getIn([\"content\",o,\"schema\"],We().Map()),parameterContentMediaType:o}}return{schema:s.get(\"schema\")?s.get(\"schema\",We().Map()):We().Map(),parameterContentMediaType:null}}var At=__webpack_require__(48287).Buffer;const jt=\"default\",isImmutable=s=>We().Iterable.isIterable(s),immutableToJS=s=>isImmutable(s)?s.toJS():s;function objectify(s){return isObject(s)?immutableToJS(s):{}}function fromJSOrdered(s){if(isImmutable(s))return s;if(s instanceof lt.File)return s;if(!isObject(s))return s;if(Array.isArray(s))return We().Seq(s).map(fromJSOrdered).toList();if(_t()(s.entries)){const o=function createObjWithHashedKeys(s){if(!_t()(s.entries))return s;const o={},i=\"_**[]\",a={};for(let u of s.entries())if(o[u[0]]||a[u[0]]&&a[u[0]].containsMultiple){if(!a[u[0]]){a[u[0]]={containsMultiple:!0,length:1},o[`${u[0]}${i}${a[u[0]].length}`]=o[u[0]],delete o[u[0]]}a[u[0]].length+=1,o[`${u[0]}${i}${a[u[0]].length}`]=u[1]}else o[u[0]]=u[1];return o}(s);return We().OrderedMap(o).map(fromJSOrdered)}return We().OrderedMap(s).map(fromJSOrdered)}function normalizeArray(s){return Array.isArray(s)?s:[s]}function isFn(s){return\"function\"==typeof s}function isObject(s){return!!s&&\"object\"==typeof s}function isFunc(s){return\"function\"==typeof s}function isArray(s){return Array.isArray(s)}const It=pt();function objMap(s,o){return Object.keys(s).reduce(((i,a)=>(i[a]=o(s[a],a),i)),{})}function objReduce(s,o){return Object.keys(s).reduce(((i,a)=>{let u=o(s[a],a);return u&&\"object\"==typeof u&&Object.assign(i,u),i}),{})}function systemThunkMiddleware(s){return({dispatch:o,getState:i})=>o=>i=>\"function\"==typeof i?i(s()):o(i)}function validateValueBySchema(s,o,i,a,u){if(!o)return[];let _=[],w=o.get(\"nullable\"),x=o.get(\"required\"),C=o.get(\"maximum\"),j=o.get(\"minimum\"),L=o.get(\"type\"),B=o.get(\"format\"),$=o.get(\"maxLength\"),V=o.get(\"minLength\"),U=o.get(\"uniqueItems\"),z=o.get(\"maxItems\"),Y=o.get(\"minItems\"),Z=o.get(\"pattern\");const ee=i||!0===x,ie=null!=s,ae=ee||ie&&\"array\"===L||!(!ee&&!ie),ce=w&&null===s;if(ee&&!ie&&!ce&&!a&&!L)return _.push(\"Required field is not provided\"),_;if(ce||!L||!ae)return[];let le=\"string\"===L&&s,pe=\"array\"===L&&Array.isArray(s)&&s.length,de=\"array\"===L&&We().List.isList(s)&&s.count();const fe=[le,pe,de,\"array\"===L&&\"string\"==typeof s&&s,\"file\"===L&&s instanceof lt.File,\"boolean\"===L&&(s||!1===s),\"number\"===L&&(s||0===s),\"integer\"===L&&(s||0===s),\"object\"===L&&\"object\"==typeof s&&null!==s,\"object\"===L&&\"string\"==typeof s&&s].some((s=>!!s));if(ee&&!fe&&!a)return _.push(\"Required field is not provided\"),_;if(\"object\"===L&&(null===u||\"application/json\"===u)){let i=s;if(\"string\"==typeof s)try{i=JSON.parse(s)}catch(s){return _.push(\"Parameter string value must be valid JSON\"),_}o&&o.has(\"required\")&&isFunc(x.isList)&&x.isList()&&x.forEach((s=>{void 0===i[s]&&_.push({propKey:s,error:\"Required property not found\"})})),o&&o.has(\"properties\")&&o.get(\"properties\").forEach(((s,o)=>{const w=validateValueBySchema(i[o],s,!1,a,u);_.push(...w.map((s=>({propKey:o,error:s}))))}))}if(Z){let o=((s,o)=>{if(!new RegExp(o).test(s))return\"Value must follow pattern \"+o})(s,Z);o&&_.push(o)}if(Y&&\"array\"===L){let o=((s,o)=>{if(!s&&o>=1||s&&s.length<o)return`Array must contain at least ${o} item${1===o?\"\":\"s\"}`})(s,Y);o&&_.push(o)}if(z&&\"array\"===L){let o=((s,o)=>{if(s&&s.length>o)return`Array must not contain more then ${o} item${1===o?\"\":\"s\"}`})(s,z);o&&_.push({needRemove:!0,error:o})}if(U&&\"array\"===L){let o=((s,o)=>{if(s&&(\"true\"===o||!0===o)){const o=(0,ze.fromJS)(s),i=o.toSet();if(s.length>i.size){let s=(0,ze.Set)();if(o.forEach(((i,a)=>{o.filter((s=>isFunc(s.equals)?s.equals(i):s===i)).size>1&&(s=s.add(a))})),0!==s.size)return s.map((s=>({index:s,error:\"No duplicates allowed.\"}))).toArray()}}})(s,U);o&&_.push(...o)}if($||0===$){let o=((s,o)=>{if(s.length>o)return`Value must be no longer than ${o} character${1!==o?\"s\":\"\"}`})(s,$);o&&_.push(o)}if(V){let o=((s,o)=>{if(s.length<o)return`Value must be at least ${o} character${1!==o?\"s\":\"\"}`})(s,V);o&&_.push(o)}if(C||0===C){let o=((s,o)=>{if(s>o)return`Value must be less than or equal to ${o}`})(s,C);o&&_.push(o)}if(j||0===j){let o=((s,o)=>{if(s<o)return`Value must be greater than or equal to ${o}`})(s,j);o&&_.push(o)}if(\"string\"===L){let o;if(o=\"date-time\"===B?(s=>{if(isNaN(Date.parse(s)))return\"Value must be a DateTime\"})(s):\"uuid\"===B?(s=>{if(s=s.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(s))return\"Value must be a Guid\"})(s):(s=>{if(s&&\"string\"!=typeof s)return\"Value must be a string\"})(s),!o)return _;_.push(o)}else if(\"boolean\"===L){let o=(s=>{if(\"true\"!==s&&\"false\"!==s&&!0!==s&&!1!==s)return\"Value must be a boolean\"})(s);if(!o)return _;_.push(o)}else if(\"number\"===L){let o=(s=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(s))return\"Value must be a number\"})(s);if(!o)return _;_.push(o)}else if(\"integer\"===L){let o=(s=>{if(!/^-?\\d+$/.test(s))return\"Value must be an integer\"})(s);if(!o)return _;_.push(o)}else if(\"array\"===L){if(!pe&&!de)return _;s&&s.forEach(((s,i)=>{const w=validateValueBySchema(s,o.get(\"items\"),!1,a,u);_.push(...w.map((s=>({index:i,error:s}))))}))}else if(\"file\"===L){let o=(s=>{if(s&&!(s instanceof lt.File))return\"Value must be a file\"})(s);if(!o)return _;_.push(o)}return _}const utils_btoa=s=>{let o;return o=s instanceof At?s:At.from(s.toString(),\"utf-8\"),o.toString(\"base64\")},Pt={operationsSorter:{alpha:(s,o)=>s.get(\"path\").localeCompare(o.get(\"path\")),method:(s,o)=>s.get(\"method\").localeCompare(o.get(\"method\"))},tagsSorter:{alpha:(s,o)=>s.localeCompare(o)}},buildFormData=s=>{let o=[];for(let i in s){let a=s[i];void 0!==a&&\"\"!==a&&o.push([i,\"=\",encodeURIComponent(a).replace(/%20/g,\"+\")].join(\"\"))}return o.join(\"&\")},shallowEqualKeys=(s,o,i)=>!!dt()(i,(i=>vt()(s[i],o[i])));function requiresValidationURL(s){return!(!s||s.indexOf(\"localhost\")>=0||s.indexOf(\"127.0.0.1\")>=0||\"none\"===s)}const createDeepLinkPath=s=>\"string\"==typeof s||s instanceof String?s.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=s=>Et()(createDeepLinkPath(s).replace(/%20/g,\"_\")),getExtensions=s=>{const o=/^x-/;return ze.Map.isMap(s)?s.filter(((s,i)=>o.test(i))):Object.keys(s).filter((s=>o.test(s)))},getCommonExtensions=s=>s.filter(((s,o)=>/^pattern|maxLength|minLength|maximum|minimum/.test(o)));function deeplyStripKey(s,o,i=()=>!0){if(\"object\"!=typeof s||Array.isArray(s)||null===s||!o)return s;const a=Object.assign({},s);return Object.keys(a).forEach((s=>{s===o&&i(a[s],s)?delete a[s]:a[s]=deeplyStripKey(a[s],o,i)})),a}function stringify(s){if(\"string\"==typeof s)return s;if(s&&s.toJS&&(s=s.toJS()),\"object\"==typeof s&&null!==s)try{return JSON.stringify(s,null,2)}catch(o){return String(s)}return null==s?\"\":s.toString()}function paramToIdentifier(s,{returnAll:o=!1,allowHashes:i=!0}={}){if(!We().Map.isMap(s))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const a=s.get(\"name\"),u=s.get(\"in\");let _=[];return s&&s.hashCode&&u&&a&&i&&_.push(`${u}.${a}.hash-${s.hashCode()}`),u&&a&&_.push(`${u}.${a}`),_.push(a),o?_:_[0]||\"\"}function paramToValue(s,o){return paramToIdentifier(s,{returnAll:!0}).map((s=>o[s])).filter((s=>void 0!==s))[0]}function b64toB64UrlEncoded(s){return s.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=s=>!s||!(!isImmutable(s)||!s.isEmpty()),idFn=s=>s;function createStoreWithMiddleware(s,o,i){let a=[systemThunkMiddleware(i)];return createStore(s,o,(lt.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||compose)(function applyMiddleware(...s){return o=>(i,a)=>{const u=o(i,a);let dispatch=()=>{throw new Error(formatProdErrorMessage(15))};const _={getState:u.getState,dispatch:(s,...o)=>dispatch(s,...o)},w=s.map((s=>s(_)));return dispatch=compose(...w)(u.dispatch),{...u,dispatch}}}(...a)))}class Store{constructor(s={}){Ye()(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},s),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(s,o,i){return createStoreWithMiddleware(s,o,i)}(idFn,(0,ze.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(s,o=!0){var i=combinePlugins(s,this.getSystem());systemExtend(this.system,i),o&&this.buildSystem();callAfterLoad.call(this.system,s,this.getSystem())&&this.buildSystem()}buildSystem(s=!0){let o=this.getStore().dispatch,i=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(o),this.getWrappedAndBoundSelectors(i,this.getSystem),this.getStateThunks(i),this.getFn(),this.getConfigs()),s&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:We(),React:Re},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(s){this.system.configs=s}rebuildReducer(){this.store.replaceReducer(function buildReducer(s,o){return function allReducers(s,o){let i=Object.keys(s).reduce(((i,a)=>(i[a]=function makeReducer(s,o){return(i=new ze.Map,a)=>{if(!s)return i;let u=s[a.type];if(u){const s=wrapWithTryCatch(u,o)(i,a);return null===s?i:s}return i}}(s[a],o),i)),{});if(!Object.keys(i).length)return idFn;return(0,Xe.H)(i)}(objMap(s,(s=>s.reducers)),o)}(this.system.statePlugins,this.getSystem))}getType(s){let o=s[0].toUpperCase()+s.slice(1);return objReduce(this.system.statePlugins,((i,a)=>{let u=i[s];if(u)return{[a+o]:u}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(s=>objReduce(s,((s,o)=>{if(isFn(s))return{[o]:s}}))))}getWrappedAndBoundActions(s){return objMap(this.getBoundActions(s),((s,o)=>{let i=this.system.statePlugins[o.slice(0,-7)].wrapActions;return i?objMap(s,((s,o)=>{let a=i[o];return a?(Array.isArray(a)||(a=[a]),a.reduce(((s,o)=>{let newAction=(...i)=>o(s,this.getSystem())(...i);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction,this.getSystem)}),s||Function.prototype)):s})):s}))}getWrappedAndBoundSelectors(s,o){return objMap(this.getBoundSelectors(s,o),((o,i)=>{let a=[i.slice(0,-9)],u=this.system.statePlugins[a].wrapSelectors;return u?objMap(o,((o,i)=>{let _=u[i];return _?(Array.isArray(_)||(_=[_]),_.reduce(((o,i)=>{let wrappedSelector=(...u)=>i(o,this.getSystem())(s().getIn(a),...u);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),o||Function.prototype)):o})):o}))}getStates(s){return Object.keys(this.system.statePlugins).reduce(((o,i)=>(o[i]=s.get(i),o)),{})}getStateThunks(s){return Object.keys(this.system.statePlugins).reduce(((o,i)=>(o[i]=()=>s().get(i),o)),{})}getFn(){return{fn:this.system.fn}}getComponents(s){const o=this.system.components[s];return Array.isArray(o)?o.reduce(((s,o)=>o(s,this.getSystem()))):void 0!==s?this.system.components[s]:this.system.components}getBoundSelectors(s,o){return objMap(this.getSelectors(),((i,a)=>{let u=[a.slice(0,-9)];return objMap(i,(i=>(...a)=>{let _=wrapWithTryCatch(i,this.getSystem).apply(null,[s().getIn(u),...a]);return\"function\"==typeof _&&(_=wrapWithTryCatch(_,this.getSystem)(o())),_}))}))}getBoundActions(s){s=s||this.getStore().dispatch;const o=this.getActions(),process=s=>\"function\"!=typeof s?objMap(s,(s=>process(s))):(...o)=>{var i=null;try{i=s(...o)}catch(s){i={type:rt,error:!0,payload:(0,Qe.serializeError)(s)}}finally{return i}};return objMap(o,(o=>function bindActionCreators(s,o){if(\"function\"==typeof s)return bindActionCreator(s,o);if(\"object\"!=typeof s||null===s)throw new Error(formatProdErrorMessage(16));const i={};for(const a in s){const u=s[a];\"function\"==typeof u&&(i[a]=bindActionCreator(u,o))}return i}(process(o),s)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(s){return o=>Ye()({},this.getWrappedAndBoundActions(o),this.getFn(),s)}}function combinePlugins(s,o){return isObject(s)&&!isArray(s)?tt()({},s):isFunc(s)?combinePlugins(s(o),o):isArray(s)?s.map((s=>combinePlugins(s,o))).reduce(systemExtend,{components:o.getComponents()}):{}}function callAfterLoad(s,o,{hasLoaded:i}={}){let a=i;return isObject(s)&&!isArray(s)&&\"function\"==typeof s.afterLoad&&(a=!0,wrapWithTryCatch(s.afterLoad,o.getSystem).call(this,o)),isFunc(s)?callAfterLoad.call(this,s(o),o,{hasLoaded:a}):isArray(s)?s.map((s=>callAfterLoad.call(this,s,o,{hasLoaded:a}))):a}function systemExtend(s={},o={}){if(!isObject(s))return{};if(!isObject(o))return s;o.wrapComponents&&(objMap(o.wrapComponents,((i,a)=>{const u=s.components&&s.components[a];u&&Array.isArray(u)?(s.components[a]=u.concat([i]),delete o.wrapComponents[a]):u&&(s.components[a]=[u,i],delete o.wrapComponents[a])})),Object.keys(o.wrapComponents).length||delete o.wrapComponents);const{statePlugins:i}=s;if(isObject(i))for(let s in i){const a=i[s];if(!isObject(a))continue;const{wrapActions:u,wrapSelectors:_}=a;if(isObject(u))for(let i in u){let a=u[i];Array.isArray(a)||(a=[a],u[i]=a),o&&o.statePlugins&&o.statePlugins[s]&&o.statePlugins[s].wrapActions&&o.statePlugins[s].wrapActions[i]&&(o.statePlugins[s].wrapActions[i]=u[i].concat(o.statePlugins[s].wrapActions[i]))}if(isObject(_))for(let i in _){let a=_[i];Array.isArray(a)||(a=[a],_[i]=a),o&&o.statePlugins&&o.statePlugins[s]&&o.statePlugins[s].wrapSelectors&&o.statePlugins[s].wrapSelectors[i]&&(o.statePlugins[s].wrapSelectors[i]=_[i].concat(o.statePlugins[s].wrapSelectors[i]))}}return Ye()(s,o)}function wrapWithTryCatch(s,o,{logErrors:i=!0}={}){return\"function\"!=typeof s?s:function(...a){try{return s.call(this,...a)}catch(s){if(i){const{uncaughtExceptionHandler:i}=o().getConfigs();\"function\"==typeof i?i(s):console.error(s)}return null}}}var Tt=__webpack_require__(61160),Nt=__webpack_require__.n(Tt);const Mt=\"show_popup\",Rt=\"authorize\",Dt=\"logout\",Lt=\"authorize_oauth2\",Ft=\"configure_auth\",Bt=\"restore_authorization\";function showDefinitions(s){return{type:Mt,payload:s}}function authorize(s){return{type:Rt,payload:s}}const authorizeWithPersistOption=s=>({authActions:o})=>{o.authorize(s),o.persistAuthorizationIfNeeded()};function logout(s){return{type:Dt,payload:s}}const logoutWithPersistOption=s=>({authActions:o})=>{o.logout(s),o.persistAuthorizationIfNeeded()},preAuthorizeImplicit=s=>({authActions:o,errActions:i})=>{let{auth:a,token:u,isValid:_}=s,{schema:w,name:x}=a,C=w.get(\"flow\");delete lt.swaggerUIRedirectOauth2,\"accessCode\"===C||_||i.newAuthErr({authId:x,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),u.error?i.newAuthErr({authId:x,source:\"auth\",level:\"error\",message:JSON.stringify(u)}):o.authorizeOauth2WithPersistOption({auth:a,token:u})};function authorizeOauth2(s){return{type:Lt,payload:s}}const authorizeOauth2WithPersistOption=s=>({authActions:o})=>{o.authorizeOauth2(s),o.persistAuthorizationIfNeeded()},authorizePassword=s=>({authActions:o})=>{let{schema:i,name:a,username:u,password:_,passwordType:w,clientId:x,clientSecret:C}=s,j={grant_type:\"password\",scope:s.scopes.join(\" \"),username:u,password:_},L={};switch(w){case\"request-body\":!function setClientIdAndSecret(s,o,i){o&&Object.assign(s,{client_id:o});i&&Object.assign(s,{client_secret:i})}(j,x,C);break;case\"basic\":L.Authorization=\"Basic \"+utils_btoa(x+\":\"+C);break;default:console.warn(`Warning: invalid passwordType ${w} was passed, not including client id and secret`)}return o.authorizeRequest({body:buildFormData(j),url:i.get(\"tokenUrl\"),name:a,headers:L,query:{},auth:s})};const authorizeApplication=s=>({authActions:o})=>{let{schema:i,scopes:a,name:u,clientId:_,clientSecret:w}=s,x={Authorization:\"Basic \"+utils_btoa(_+\":\"+w)},C={grant_type:\"client_credentials\",scope:a.join(\" \")};return o.authorizeRequest({body:buildFormData(C),name:u,url:i.get(\"tokenUrl\"),auth:s,headers:x})},authorizeAccessCodeWithFormParams=({auth:s,redirectUrl:o})=>({authActions:i})=>{let{schema:a,name:u,clientId:_,clientSecret:w,codeVerifier:x}=s,C={grant_type:\"authorization_code\",code:s.code,client_id:_,client_secret:w,redirect_uri:o,code_verifier:x};return i.authorizeRequest({body:buildFormData(C),name:u,url:a.get(\"tokenUrl\"),auth:s})},authorizeAccessCodeWithBasicAuthentication=({auth:s,redirectUrl:o})=>({authActions:i})=>{let{schema:a,name:u,clientId:_,clientSecret:w,codeVerifier:x}=s,C={Authorization:\"Basic \"+utils_btoa(_+\":\"+w)},j={grant_type:\"authorization_code\",code:s.code,client_id:_,redirect_uri:o,code_verifier:x};return i.authorizeRequest({body:buildFormData(j),name:u,url:a.get(\"tokenUrl\"),auth:s,headers:C})},authorizeRequest=s=>({fn:o,getConfigs:i,authActions:a,errActions:u,oas3Selectors:_,specSelectors:w,authSelectors:x})=>{let C,{body:j,query:L={},headers:B={},name:$,url:V,auth:U}=s,{additionalQueryStringParams:z}=x.getConfigs()||{};if(w.isOAS3()){let s=_.serverEffectiveValue(_.selectedServer());C=Nt()(V,s,!0)}else C=Nt()(V,w.url(),!0);\"object\"==typeof z&&(C.query=Object.assign({},C.query,z));const Y=C.toString();let Z=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},B);o.fetch({url:Y,method:\"post\",headers:Z,query:L,body:j,requestInterceptor:i().requestInterceptor,responseInterceptor:i().responseInterceptor}).then((function(s){let o=JSON.parse(s.data),i=o&&(o.error||\"\"),_=o&&(o.parseError||\"\");s.ok?i||_?u.newAuthErr({authId:$,level:\"error\",source:\"auth\",message:JSON.stringify(o)}):a.authorizeOauth2WithPersistOption({auth:U,token:o}):u.newAuthErr({authId:$,level:\"error\",source:\"auth\",message:s.statusText})})).catch((s=>{let o=new Error(s).message;if(s.response&&s.response.data){const i=s.response.data;try{const s=\"string\"==typeof i?JSON.parse(i):i;s.error&&(o+=`, error: ${s.error}`),s.error_description&&(o+=`, description: ${s.error_description}`)}catch(s){}}u.newAuthErr({authId:$,level:\"error\",source:\"auth\",message:o})}))};function configureAuth(s){return{type:Ft,payload:s}}function restoreAuthorization(s){return{type:Bt,payload:s}}const persistAuthorizationIfNeeded=()=>({authSelectors:s,getConfigs:o})=>{if(!o().persistAuthorization)return;const i=s.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(i))},authPopup=(s,o)=>()=>{lt.swaggerUIRedirectOauth2=o,lt.open(s)},$t={[Mt]:(s,{payload:o})=>s.set(\"showDefinitions\",o),[Rt]:(s,{payload:o})=>{let i=(0,ze.fromJS)(o),a=s.get(\"authorized\")||(0,ze.Map)();return i.entrySeq().forEach((([o,i])=>{if(!isFunc(i.getIn))return s.set(\"authorized\",a);let u=i.getIn([\"schema\",\"type\"]);if(\"apiKey\"===u||\"http\"===u)a=a.set(o,i);else if(\"basic\"===u){let s=i.getIn([\"value\",\"username\"]),u=i.getIn([\"value\",\"password\"]);a=a.setIn([o,\"value\"],{username:s,header:\"Basic \"+utils_btoa(s+\":\"+u)}),a=a.setIn([o,\"schema\"],i.get(\"schema\"))}})),s.set(\"authorized\",a)},[Lt]:(s,{payload:o})=>{let i,{auth:a,token:u}=o;a.token=Object.assign({},u),i=(0,ze.fromJS)(a);let _=s.get(\"authorized\")||(0,ze.Map)();return _=_.set(i.get(\"name\"),i),s.set(\"authorized\",_)},[Dt]:(s,{payload:o})=>{let i=s.get(\"authorized\").withMutations((s=>{o.forEach((o=>{s.delete(o)}))}));return s.set(\"authorized\",i)},[Ft]:(s,{payload:o})=>s.set(\"configs\",o),[Bt]:(s,{payload:o})=>s.set(\"authorized\",(0,ze.fromJS)(o.authorized))};function assertIsFunction(s,o=\"expected a function, instead received \"+typeof s){if(\"function\"!=typeof s)throw new TypeError(o)}var ensureIsArray=s=>Array.isArray(s)?s:[s];function getDependencies(s){const o=Array.isArray(s[0])?s[0]:s;return function assertIsArrayOfFunctions(s,o=\"expected all items to be functions, instead received the following types: \"){if(!s.every((s=>\"function\"==typeof s))){const i=s.map((s=>\"function\"==typeof s?`function ${s.name||\"unnamed\"}()`:typeof s)).join(\", \");throw new TypeError(`${o}[${i}]`)}}(o,\"createSelector expects all input-selectors to be functions, but received the following types: \"),o}Symbol(),Object.getPrototypeOf({});var qt=\"undefined\"!=typeof WeakRef?WeakRef:class{constructor(s){this.value=s}deref(){return this.value}};function weakMapMemoize(s,o={}){let i={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:a}=o;let u,_=0;function memoized(){let o=i;const{length:w}=arguments;for(let s=0,i=w;s<i;s++){const i=arguments[s];if(\"function\"==typeof i||\"object\"==typeof i&&null!==i){let s=o.o;null===s&&(o.o=s=new WeakMap);const a=s.get(i);void 0===a?(o={s:0,v:void 0,o:null,p:null},s.set(i,o)):o=a}else{let s=o.p;null===s&&(o.p=s=new Map);const a=s.get(i);void 0===a?(o={s:0,v:void 0,o:null,p:null},s.set(i,o)):o=a}}const x=o;let C;if(1===o.s)C=o.v;else if(C=s.apply(null,arguments),_++,a){const s=u?.deref?.()??u;null!=s&&a(s,C)&&(C=s,0!==_&&_--);u=\"object\"==typeof C&&null!==C||\"function\"==typeof C?new qt(C):C}return x.s=1,x.v=C,C}return memoized.clearCache=()=>{i={s:0,v:void 0,o:null,p:null},memoized.resetResultsCount()},memoized.resultsCount=()=>_,memoized.resetResultsCount=()=>{_=0},memoized}function createSelectorCreator(s,...o){const i=\"function\"==typeof s?{memoize:s,memoizeOptions:o}:s,createSelector2=(...s)=>{let o,a=0,u=0,_={},w=s.pop();\"object\"==typeof w&&(_=w,w=s.pop()),assertIsFunction(w,`createSelector expects an output function after the inputs, but received: [${typeof w}]`);const x={...i,..._},{memoize:C,memoizeOptions:j=[],argsMemoize:L=weakMapMemoize,argsMemoizeOptions:B=[],devModeChecks:$={}}=x,V=ensureIsArray(j),U=ensureIsArray(B),z=getDependencies(s),Y=C((function recomputationWrapper(){return a++,w.apply(null,arguments)}),...V);const Z=L((function dependenciesChecker(){u++;const s=function collectInputSelectorResults(s,o){const i=[],{length:a}=s;for(let u=0;u<a;u++)i.push(s[u].apply(null,o));return i}(z,arguments);return o=Y.apply(null,s),o}),...U);return Object.assign(Z,{resultFunc:w,memoizedResultFunc:Y,dependencies:z,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>o,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:C,argsMemoize:L})};return Object.assign(createSelector2,{withTypes:()=>createSelector2}),createSelector2}var Vt=createSelectorCreator(weakMapMemoize),Ut=Object.assign(((s,o=Vt)=>{!function assertIsObject(s,o=\"expected an object, instead received \"+typeof s){if(\"object\"!=typeof s)throw new TypeError(o)}(s,\"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a \"+typeof s);const i=Object.keys(s);return o(i.map((o=>s[o])),((...s)=>s.reduce(((s,o,a)=>(s[i[a]]=o,s)),{})))}),{withTypes:()=>Ut});const state=s=>s,zt=Vt(state,(s=>s.get(\"showDefinitions\"))),Wt=Vt(state,(()=>({specSelectors:s})=>{let o=s.securityDefinitions()||(0,ze.Map)({}),i=(0,ze.List)();return o.entrySeq().forEach((([s,o])=>{let a=(0,ze.Map)();a=a.set(s,o),i=i.push(a)})),i})),selectAuthPath=(s,o)=>({specSelectors:s})=>(0,ze.List)(s.isOAS3()?[\"components\",\"securitySchemes\",o]:[\"securityDefinitions\",o]),getDefinitionsByNames=(s,o)=>({specSelectors:s})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let i=s.securityDefinitions(),a=(0,ze.List)();return o.valueSeq().forEach((s=>{let o=(0,ze.Map)();s.entrySeq().forEach((([s,a])=>{let u,_=i.get(s);\"oauth2\"===_.get(\"type\")&&a.size&&(u=_.get(\"scopes\"),u.keySeq().forEach((s=>{a.contains(s)||(u=u.delete(s))})),_=_.set(\"allowedScopes\",u)),o=o.set(s,_)})),a=a.push(o)})),a},definitionsForRequirements=(s,o=(0,ze.List)())=>({authSelectors:s})=>{const i=s.definitionsToAuthorize()||(0,ze.List)();let a=(0,ze.List)();return i.forEach((s=>{let i=o.find((o=>o.get(s.keySeq().first())));i&&(s.forEach(((o,a)=>{if(\"oauth2\"===o.get(\"type\")){const u=i.get(a);let _=o.get(\"scopes\");ze.List.isList(u)&&ze.Map.isMap(_)&&(_.keySeq().forEach((s=>{u.contains(s)||(_=_.delete(s))})),s=s.set(a,o.set(\"scopes\",_)))}})),a=a.push(s))})),a},Jt=Vt(state,(s=>s.get(\"authorized\")||(0,ze.Map)())),isAuthorized=(s,o)=>({authSelectors:s})=>{let i=s.authorized();return ze.List.isList(o)?!!o.toJS().filter((s=>-1===Object.keys(s).map((s=>!!i.get(s))).indexOf(!1))).length:null},Ht=Vt(state,(s=>s.get(\"configs\"))),execute=(s,{authSelectors:o,specSelectors:i})=>({path:a,method:u,operation:_,extras:w})=>{let x={authorized:o.authorized()&&o.authorized().toJS(),definitions:i.securityDefinitions()&&i.securityDefinitions().toJS(),specSecurity:i.security()&&i.security().toJS()};return s({path:a,method:u,operation:_,securities:x,...w})},loaded=(s,o)=>i=>{const{getConfigs:a,authActions:u}=o,_=a();if(s(i),_.persistAuthorization){const s=localStorage.getItem(\"authorized\");s&&u.restoreAuthorization({authorized:JSON.parse(s)})}},wrap_actions_authorize=(s,o)=>i=>{s(i);if(o.getConfigs().persistAuthorization)try{const[{schema:s,value:o}]=Object.values(i),a=\"apiKey\"===s.get(\"type\"),u=\"cookie\"===s.get(\"in\");a&&u&&(document.cookie=`${s.get(\"name\")}=${o}; SameSite=None; Secure`)}catch(s){console.error(\"Error persisting cookie based apiKey in document.cookie.\",s)}},wrap_actions_logout=(s,o)=>i=>{const a=o.getConfigs(),u=o.authSelectors.authorized();try{a.persistAuthorization&&Array.isArray(i)&&i.forEach((s=>{const o=u.get(s,{}),i=\"apiKey\"===o.getIn([\"schema\",\"type\"]),a=\"cookie\"===o.getIn([\"schema\",\"in\"]);if(i&&a){const s=o.getIn([\"schema\",\"name\"]);document.cookie=`${s}=; Max-Age=-99999999`}}))}catch(s){console.error(\"Error deleting cookie based apiKey from document.cookie.\",s)}s(i)};var Kt=__webpack_require__(90179),Gt=__webpack_require__.n(Kt);class LockAuthIcon extends Re.Component{mapStateToProps(s,o){return{state:s,ownProps:Gt()(o,Object.keys(o.getSystem()))}}render(){const{getComponent:s,ownProps:o}=this.props,i=s(\"LockIcon\");return Re.createElement(i,o)}}const Yt=LockAuthIcon;class UnlockAuthIcon extends Re.Component{mapStateToProps(s,o){return{state:s,ownProps:Gt()(o,Object.keys(o.getSystem()))}}render(){const{getComponent:s,ownProps:o}=this.props,i=s(\"UnlockIcon\");return Re.createElement(i,o)}}const Xt=UnlockAuthIcon;function auth(){return{afterLoad(s){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=s.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,s),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,s)},components:{LockAuthIcon:Yt,UnlockAuthIcon:Xt,LockAuthOperationIcon:Yt,UnlockAuthOperationIcon:Xt},statePlugins:{auth:{reducers:$t,actions:o,selectors:a,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(s,o,i,a){const{authActions:{authorize:u},specSelectors:{specJson:_,isOAS3:w}}=s,x=w()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],C=_().getIn([...x,o]);return C?u({[o]:{value:{username:i,password:a},schema:C.toJS()}}):null}function preauthorizeApiKey(s,o,i){const{authActions:{authorize:a},specSelectors:{specJson:u,isOAS3:_}}=s,w=_()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],x=u().getIn([...w,o]);return x?a({[o]:{value:i,schema:x.toJS()}}):null}function isNothing(s){return null==s}var Qt=function repeat(s,o){var i,a=\"\";for(i=0;i<o;i+=1)a+=s;return a},Zt=function isNegativeZero(s){return 0===s&&Number.NEGATIVE_INFINITY===1/s},er={isNothing,isObject:function js_yaml_isObject(s){return\"object\"==typeof s&&null!==s},toArray:function toArray(s){return Array.isArray(s)?s:isNothing(s)?[]:[s]},repeat:Qt,isNegativeZero:Zt,extend:function extend(s,o){var i,a,u,_;if(o)for(i=0,a=(_=Object.keys(o)).length;i<a;i+=1)s[u=_[i]]=o[u];return s}};function formatError(s,o){var i=\"\",a=s.reason||\"(unknown reason)\";return s.mark?(s.mark.name&&(i+='in \"'+s.mark.name+'\" '),i+=\"(\"+(s.mark.line+1)+\":\"+(s.mark.column+1)+\")\",!o&&s.mark.snippet&&(i+=\"\\n\\n\"+s.mark.snippet),a+\" \"+i):a}function YAMLException$1(s,o){Error.call(this),this.name=\"YAMLException\",this.reason=s,this.mark=o,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(s){return this.name+\": \"+formatError(this,s)};var tr=YAMLException$1;function getLine(s,o,i,a,u){var _=\"\",w=\"\",x=Math.floor(u/2)-1;return a-o>x&&(o=a-x+(_=\" ... \").length),i-a>x&&(i=a+x-(w=\" ...\").length),{str:_+s.slice(o,i).replace(/\\t/g,\"→\")+w,pos:a-o+_.length}}function padStart(s,o){return er.repeat(\" \",o-s.length)+s}var rr=function makeSnippet(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),\"number\"!=typeof o.indent&&(o.indent=1),\"number\"!=typeof o.linesBefore&&(o.linesBefore=3),\"number\"!=typeof o.linesAfter&&(o.linesAfter=2);for(var i,a=/\\r?\\n|\\r|\\0/g,u=[0],_=[],w=-1;i=a.exec(s.buffer);)_.push(i.index),u.push(i.index+i[0].length),s.position<=i.index&&w<0&&(w=u.length-2);w<0&&(w=u.length-1);var x,C,j=\"\",L=Math.min(s.line+o.linesAfter,_.length).toString().length,B=o.maxLength-(o.indent+L+3);for(x=1;x<=o.linesBefore&&!(w-x<0);x++)C=getLine(s.buffer,u[w-x],_[w-x],s.position-(u[w]-u[w-x]),B),j=er.repeat(\" \",o.indent)+padStart((s.line-x+1).toString(),L)+\" | \"+C.str+\"\\n\"+j;for(C=getLine(s.buffer,u[w],_[w],s.position,B),j+=er.repeat(\" \",o.indent)+padStart((s.line+1).toString(),L)+\" | \"+C.str+\"\\n\",j+=er.repeat(\"-\",o.indent+L+3+C.pos)+\"^\\n\",x=1;x<=o.linesAfter&&!(w+x>=_.length);x++)C=getLine(s.buffer,u[w+x],_[w+x],s.position-(u[w]-u[w+x]),B),j+=er.repeat(\" \",o.indent)+padStart((s.line+x+1).toString(),L)+\" | \"+C.str+\"\\n\";return j.replace(/\\n$/,\"\")},nr=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],sr=[\"scalar\",\"sequence\",\"mapping\"];var ir=function Type$1(s,o){if(o=o||{},Object.keys(o).forEach((function(o){if(-1===nr.indexOf(o))throw new tr('Unknown option \"'+o+'\" is met in definition of \"'+s+'\" YAML type.')})),this.options=o,this.tag=s,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(s){return s},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=function compileStyleAliases(s){var o={};return null!==s&&Object.keys(s).forEach((function(i){s[i].forEach((function(s){o[String(s)]=i}))})),o}(o.styleAliases||null),-1===sr.indexOf(this.kind))throw new tr('Unknown kind \"'+this.kind+'\" is specified for \"'+s+'\" YAML type.')};function compileList(s,o){var i=[];return s[o].forEach((function(s){var o=i.length;i.forEach((function(i,a){i.tag===s.tag&&i.kind===s.kind&&i.multi===s.multi&&(o=a)})),i[o]=s})),i}function Schema$1(s){return this.extend(s)}Schema$1.prototype.extend=function extend(s){var o=[],i=[];if(s instanceof ir)i.push(s);else if(Array.isArray(s))i=i.concat(s);else{if(!s||!Array.isArray(s.implicit)&&!Array.isArray(s.explicit))throw new tr(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");s.implicit&&(o=o.concat(s.implicit)),s.explicit&&(i=i.concat(s.explicit))}o.forEach((function(s){if(!(s instanceof ir))throw new tr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(s.loadKind&&\"scalar\"!==s.loadKind)throw new tr(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(s.multi)throw new tr(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),i.forEach((function(s){if(!(s instanceof ir))throw new tr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var a=Object.create(Schema$1.prototype);return a.implicit=(this.implicit||[]).concat(o),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=compileList(a,\"implicit\"),a.compiledExplicit=compileList(a,\"explicit\"),a.compiledTypeMap=function compileMap(){var s,o,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(s){s.multi?(i.multi[s.kind].push(s),i.multi.fallback.push(s)):i[s.kind][s.tag]=i.fallback[s.tag]=s}for(s=0,o=arguments.length;s<o;s+=1)arguments[s].forEach(collectType);return i}(a.compiledImplicit,a.compiledExplicit),a};var ar=Schema$1,cr=new ir(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(s){return null!==s?s:\"\"}}),lr=new ir(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(s){return null!==s?s:[]}}),ur=new ir(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(s){return null!==s?s:{}}}),pr=new ar({explicit:[cr,lr,ur]});var dr=new ir(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:function resolveYamlNull(s){if(null===s)return!0;var o=s.length;return 1===o&&\"~\"===s||4===o&&(\"null\"===s||\"Null\"===s||\"NULL\"===s)},construct:function constructYamlNull(){return null},predicate:function isNull(s){return null===s},represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});var fr=new ir(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:function resolveYamlBoolean(s){if(null===s)return!1;var o=s.length;return 4===o&&(\"true\"===s||\"True\"===s||\"TRUE\"===s)||5===o&&(\"false\"===s||\"False\"===s||\"FALSE\"===s)},construct:function constructYamlBoolean(s){return\"true\"===s||\"True\"===s||\"TRUE\"===s},predicate:function isBoolean(s){return\"[object Boolean]\"===Object.prototype.toString.call(s)},represent:{lowercase:function(s){return s?\"true\":\"false\"},uppercase:function(s){return s?\"TRUE\":\"FALSE\"},camelcase:function(s){return s?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isOctCode(s){return 48<=s&&s<=55}function isDecCode(s){return 48<=s&&s<=57}var mr=new ir(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:function resolveYamlInteger(s){if(null===s)return!1;var o,i,a=s.length,u=0,_=!1;if(!a)return!1;if(\"-\"!==(o=s[u])&&\"+\"!==o||(o=s[++u]),\"0\"===o){if(u+1===a)return!0;if(\"b\"===(o=s[++u])){for(u++;u<a;u++)if(\"_\"!==(o=s[u])){if(\"0\"!==o&&\"1\"!==o)return!1;_=!0}return _&&\"_\"!==o}if(\"x\"===o){for(u++;u<a;u++)if(\"_\"!==(o=s[u])){if(!(48<=(i=s.charCodeAt(u))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;_=!0}return _&&\"_\"!==o}if(\"o\"===o){for(u++;u<a;u++)if(\"_\"!==(o=s[u])){if(!isOctCode(s.charCodeAt(u)))return!1;_=!0}return _&&\"_\"!==o}}if(\"_\"===o)return!1;for(;u<a;u++)if(\"_\"!==(o=s[u])){if(!isDecCode(s.charCodeAt(u)))return!1;_=!0}return!(!_||\"_\"===o)},construct:function constructYamlInteger(s){var o,i=s,a=1;if(-1!==i.indexOf(\"_\")&&(i=i.replace(/_/g,\"\")),\"-\"!==(o=i[0])&&\"+\"!==o||(\"-\"===o&&(a=-1),o=(i=i.slice(1))[0]),\"0\"===i)return 0;if(\"0\"===o){if(\"b\"===i[1])return a*parseInt(i.slice(2),2);if(\"x\"===i[1])return a*parseInt(i.slice(2),16);if(\"o\"===i[1])return a*parseInt(i.slice(2),8)}return a*parseInt(i,10)},predicate:function isInteger(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&s%1==0&&!er.isNegativeZero(s)},represent:{binary:function(s){return s>=0?\"0b\"+s.toString(2):\"-0b\"+s.toString(2).slice(1)},octal:function(s){return s>=0?\"0o\"+s.toString(8):\"-0o\"+s.toString(8).slice(1)},decimal:function(s){return s.toString(10)},hexadecimal:function(s){return s>=0?\"0x\"+s.toString(16).toUpperCase():\"-0x\"+s.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),gr=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");var yr=/^[-+]?[0-9]+e/;var vr=new ir(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:function resolveYamlFloat(s){return null!==s&&!(!gr.test(s)||\"_\"===s[s.length-1])},construct:function constructYamlFloat(s){var o,i;return i=\"-\"===(o=s.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(o[0])>=0&&(o=o.slice(1)),\".inf\"===o?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===o?NaN:i*parseFloat(o,10)},predicate:function isFloat(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&(s%1!=0||er.isNegativeZero(s))},represent:function representYamlFloat(s,o){var i;if(isNaN(s))switch(o){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===s)switch(o){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===s)switch(o){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(er.isNegativeZero(s))return\"-0.0\";return i=s.toString(10),yr.test(i)?i.replace(\"e\",\".e\"):i},defaultStyle:\"lowercase\"}),br=pr.extend({implicit:[dr,fr,mr,vr]}),_r=br,Sr=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),Er=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");var wr=new ir(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:function resolveYamlTimestamp(s){return null!==s&&(null!==Sr.exec(s)||null!==Er.exec(s))},construct:function constructYamlTimestamp(s){var o,i,a,u,_,w,x,C,j=0,L=null;if(null===(o=Sr.exec(s))&&(o=Er.exec(s)),null===o)throw new Error(\"Date resolve error\");if(i=+o[1],a=+o[2]-1,u=+o[3],!o[4])return new Date(Date.UTC(i,a,u));if(_=+o[4],w=+o[5],x=+o[6],o[7]){for(j=o[7].slice(0,3);j.length<3;)j+=\"0\";j=+j}return o[9]&&(L=6e4*(60*+o[10]+ +(o[11]||0)),\"-\"===o[9]&&(L=-L)),C=new Date(Date.UTC(i,a,u,_,w,x,j)),L&&C.setTime(C.getTime()-L),C},instanceOf:Date,represent:function representYamlTimestamp(s){return s.toISOString()}});var xr=new ir(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:function resolveYamlMerge(s){return\"<<\"===s||null===s}}),kr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";var Or=new ir(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:function resolveYamlBinary(s){if(null===s)return!1;var o,i,a=0,u=s.length,_=kr;for(i=0;i<u;i++)if(!((o=_.indexOf(s.charAt(i)))>64)){if(o<0)return!1;a+=6}return a%8==0},construct:function constructYamlBinary(s){var o,i,a=s.replace(/[\\r\\n=]/g,\"\"),u=a.length,_=kr,w=0,x=[];for(o=0;o<u;o++)o%4==0&&o&&(x.push(w>>16&255),x.push(w>>8&255),x.push(255&w)),w=w<<6|_.indexOf(a.charAt(o));return 0===(i=u%4*6)?(x.push(w>>16&255),x.push(w>>8&255),x.push(255&w)):18===i?(x.push(w>>10&255),x.push(w>>2&255)):12===i&&x.push(w>>4&255),new Uint8Array(x)},predicate:function isBinary(s){return\"[object Uint8Array]\"===Object.prototype.toString.call(s)},represent:function representYamlBinary(s){var o,i,a=\"\",u=0,_=s.length,w=kr;for(o=0;o<_;o++)o%3==0&&o&&(a+=w[u>>18&63],a+=w[u>>12&63],a+=w[u>>6&63],a+=w[63&u]),u=(u<<8)+s[o];return 0===(i=_%3)?(a+=w[u>>18&63],a+=w[u>>12&63],a+=w[u>>6&63],a+=w[63&u]):2===i?(a+=w[u>>10&63],a+=w[u>>4&63],a+=w[u<<2&63],a+=w[64]):1===i&&(a+=w[u>>2&63],a+=w[u<<4&63],a+=w[64],a+=w[64]),a}}),Cr=Object.prototype.hasOwnProperty,Ar=Object.prototype.toString;var jr=new ir(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:function resolveYamlOmap(s){if(null===s)return!0;var o,i,a,u,_,w=[],x=s;for(o=0,i=x.length;o<i;o+=1){if(a=x[o],_=!1,\"[object Object]\"!==Ar.call(a))return!1;for(u in a)if(Cr.call(a,u)){if(_)return!1;_=!0}if(!_)return!1;if(-1!==w.indexOf(u))return!1;w.push(u)}return!0},construct:function constructYamlOmap(s){return null!==s?s:[]}}),Ir=Object.prototype.toString;var Pr=new ir(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:function resolveYamlPairs(s){if(null===s)return!0;var o,i,a,u,_,w=s;for(_=new Array(w.length),o=0,i=w.length;o<i;o+=1){if(a=w[o],\"[object Object]\"!==Ir.call(a))return!1;if(1!==(u=Object.keys(a)).length)return!1;_[o]=[u[0],a[u[0]]]}return!0},construct:function constructYamlPairs(s){if(null===s)return[];var o,i,a,u,_,w=s;for(_=new Array(w.length),o=0,i=w.length;o<i;o+=1)a=w[o],u=Object.keys(a),_[o]=[u[0],a[u[0]]];return _}}),Tr=Object.prototype.hasOwnProperty;var Nr=new ir(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:function resolveYamlSet(s){if(null===s)return!0;var o,i=s;for(o in i)if(Tr.call(i,o)&&null!==i[o])return!1;return!0},construct:function constructYamlSet(s){return null!==s?s:{}}}),Mr=_r.extend({implicit:[wr,xr],explicit:[Or,jr,Pr,Nr]}),Rr=Object.prototype.hasOwnProperty,Dr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Lr=/[\\x85\\u2028\\u2029]/,Fr=/[,\\[\\]\\{\\}]/,Br=/^(?:!|!!|![a-z\\-]+!)$/i,$r=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(s){return Object.prototype.toString.call(s)}function is_EOL(s){return 10===s||13===s}function is_WHITE_SPACE(s){return 9===s||32===s}function is_WS_OR_EOL(s){return 9===s||32===s||10===s||13===s}function is_FLOW_INDICATOR(s){return 44===s||91===s||93===s||123===s||125===s}function fromHexCode(s){var o;return 48<=s&&s<=57?s-48:97<=(o=32|s)&&o<=102?o-97+10:-1}function simpleEscapeSequence(s){return 48===s?\"\\0\":97===s?\"\u0007\":98===s?\"\\b\":116===s||9===s?\"\\t\":110===s?\"\\n\":118===s?\"\\v\":102===s?\"\\f\":114===s?\"\\r\":101===s?\"\u001b\":32===s?\" \":34===s?'\"':47===s?\"/\":92===s?\"\\\\\":78===s?\"\":95===s?\" \":76===s?\"\\u2028\":80===s?\"\\u2029\":\"\"}function charFromCodepoint(s){return s<=65535?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10),56320+(s-65536&1023))}for(var qr=new Array(256),Vr=new Array(256),Ur=0;Ur<256;Ur++)qr[Ur]=simpleEscapeSequence(Ur)?1:0,Vr[Ur]=simpleEscapeSequence(Ur);function State$1(s,o){this.input=s,this.filename=o.filename||null,this.schema=o.schema||Mr,this.onWarning=o.onWarning||null,this.legacy=o.legacy||!1,this.json=o.json||!1,this.listener=o.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=s.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(s,o){var i={name:s.filename,buffer:s.input.slice(0,-1),position:s.position,line:s.line,column:s.position-s.lineStart};return i.snippet=rr(i),new tr(o,i)}function throwError(s,o){throw generateError(s,o)}function throwWarning(s,o){s.onWarning&&s.onWarning.call(null,generateError(s,o))}var zr={YAML:function handleYamlDirective(s,o,i){var a,u,_;null!==s.version&&throwError(s,\"duplication of %YAML directive\"),1!==i.length&&throwError(s,\"YAML directive accepts exactly one argument\"),null===(a=/^([0-9]+)\\.([0-9]+)$/.exec(i[0]))&&throwError(s,\"ill-formed argument of the YAML directive\"),u=parseInt(a[1],10),_=parseInt(a[2],10),1!==u&&throwError(s,\"unacceptable YAML version of the document\"),s.version=i[0],s.checkLineBreaks=_<2,1!==_&&2!==_&&throwWarning(s,\"unsupported YAML version of the document\")},TAG:function handleTagDirective(s,o,i){var a,u;2!==i.length&&throwError(s,\"TAG directive accepts exactly two arguments\"),a=i[0],u=i[1],Br.test(a)||throwError(s,\"ill-formed tag handle (first argument) of the TAG directive\"),Rr.call(s.tagMap,a)&&throwError(s,'there is a previously declared suffix for \"'+a+'\" tag handle'),$r.test(u)||throwError(s,\"ill-formed tag prefix (second argument) of the TAG directive\");try{u=decodeURIComponent(u)}catch(o){throwError(s,\"tag prefix is malformed: \"+u)}s.tagMap[a]=u}};function captureSegment(s,o,i,a){var u,_,w,x;if(o<i){if(x=s.input.slice(o,i),a)for(u=0,_=x.length;u<_;u+=1)9===(w=x.charCodeAt(u))||32<=w&&w<=1114111||throwError(s,\"expected valid JSON character\");else Dr.test(x)&&throwError(s,\"the stream contains non-printable characters\");s.result+=x}}function mergeMappings(s,o,i,a){var u,_,w,x;for(er.isObject(i)||throwError(s,\"cannot merge mappings; the provided source object is unacceptable\"),w=0,x=(u=Object.keys(i)).length;w<x;w+=1)_=u[w],Rr.call(o,_)||(o[_]=i[_],a[_]=!0)}function storeMappingPair(s,o,i,a,u,_,w,x,C){var j,L;if(Array.isArray(u))for(j=0,L=(u=Array.prototype.slice.call(u)).length;j<L;j+=1)Array.isArray(u[j])&&throwError(s,\"nested arrays are not supported inside keys\"),\"object\"==typeof u&&\"[object Object]\"===_class(u[j])&&(u[j]=\"[object Object]\");if(\"object\"==typeof u&&\"[object Object]\"===_class(u)&&(u=\"[object Object]\"),u=String(u),null===o&&(o={}),\"tag:yaml.org,2002:merge\"===a)if(Array.isArray(_))for(j=0,L=_.length;j<L;j+=1)mergeMappings(s,o,_[j],i);else mergeMappings(s,o,_,i);else s.json||Rr.call(i,u)||!Rr.call(o,u)||(s.line=w||s.line,s.lineStart=x||s.lineStart,s.position=C||s.position,throwError(s,\"duplicated mapping key\")),\"__proto__\"===u?Object.defineProperty(o,u,{configurable:!0,enumerable:!0,writable:!0,value:_}):o[u]=_,delete i[u];return o}function readLineBreak(s){var o;10===(o=s.input.charCodeAt(s.position))?s.position++:13===o?(s.position++,10===s.input.charCodeAt(s.position)&&s.position++):throwError(s,\"a line break is expected\"),s.line+=1,s.lineStart=s.position,s.firstTabInLine=-1}function skipSeparationSpace(s,o,i){for(var a=0,u=s.input.charCodeAt(s.position);0!==u;){for(;is_WHITE_SPACE(u);)9===u&&-1===s.firstTabInLine&&(s.firstTabInLine=s.position),u=s.input.charCodeAt(++s.position);if(o&&35===u)do{u=s.input.charCodeAt(++s.position)}while(10!==u&&13!==u&&0!==u);if(!is_EOL(u))break;for(readLineBreak(s),u=s.input.charCodeAt(s.position),a++,s.lineIndent=0;32===u;)s.lineIndent++,u=s.input.charCodeAt(++s.position)}return-1!==i&&0!==a&&s.lineIndent<i&&throwWarning(s,\"deficient indentation\"),a}function testDocumentSeparator(s){var o,i=s.position;return!(45!==(o=s.input.charCodeAt(i))&&46!==o||o!==s.input.charCodeAt(i+1)||o!==s.input.charCodeAt(i+2)||(i+=3,0!==(o=s.input.charCodeAt(i))&&!is_WS_OR_EOL(o)))}function writeFoldedLines(s,o){1===o?s.result+=\" \":o>1&&(s.result+=er.repeat(\"\\n\",o-1))}function readBlockSequence(s,o){var i,a,u=s.tag,_=s.anchor,w=[],x=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=w),a=s.input.charCodeAt(s.position);0!==a&&(-1!==s.firstTabInLine&&(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),45===a)&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1));)if(x=!0,s.position++,skipSeparationSpace(s,!0,-1)&&s.lineIndent<=o)w.push(null),a=s.input.charCodeAt(s.position);else if(i=s.line,composeNode(s,o,3,!1,!0),w.push(s.result),skipSeparationSpace(s,!0,-1),a=s.input.charCodeAt(s.position),(s.line===i||s.lineIndent>o)&&0!==a)throwError(s,\"bad indentation of a sequence entry\");else if(s.lineIndent<o)break;return!!x&&(s.tag=u,s.anchor=_,s.kind=\"sequence\",s.result=w,!0)}function readTagProperty(s){var o,i,a,u,_=!1,w=!1;if(33!==(u=s.input.charCodeAt(s.position)))return!1;if(null!==s.tag&&throwError(s,\"duplication of a tag property\"),60===(u=s.input.charCodeAt(++s.position))?(_=!0,u=s.input.charCodeAt(++s.position)):33===u?(w=!0,i=\"!!\",u=s.input.charCodeAt(++s.position)):i=\"!\",o=s.position,_){do{u=s.input.charCodeAt(++s.position)}while(0!==u&&62!==u);s.position<s.length?(a=s.input.slice(o,s.position),u=s.input.charCodeAt(++s.position)):throwError(s,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==u&&!is_WS_OR_EOL(u);)33===u&&(w?throwError(s,\"tag suffix cannot contain exclamation marks\"):(i=s.input.slice(o-1,s.position+1),Br.test(i)||throwError(s,\"named tag handle cannot contain such characters\"),w=!0,o=s.position+1)),u=s.input.charCodeAt(++s.position);a=s.input.slice(o,s.position),Fr.test(a)&&throwError(s,\"tag suffix cannot contain flow indicator characters\")}a&&!$r.test(a)&&throwError(s,\"tag name cannot contain such characters: \"+a);try{a=decodeURIComponent(a)}catch(o){throwError(s,\"tag name is malformed: \"+a)}return _?s.tag=a:Rr.call(s.tagMap,i)?s.tag=s.tagMap[i]+a:\"!\"===i?s.tag=\"!\"+a:\"!!\"===i?s.tag=\"tag:yaml.org,2002:\"+a:throwError(s,'undeclared tag handle \"'+i+'\"'),!0}function readAnchorProperty(s){var o,i;if(38!==(i=s.input.charCodeAt(s.position)))return!1;for(null!==s.anchor&&throwError(s,\"duplication of an anchor property\"),i=s.input.charCodeAt(++s.position),o=s.position;0!==i&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i);)i=s.input.charCodeAt(++s.position);return s.position===o&&throwError(s,\"name of an anchor node must contain at least one character\"),s.anchor=s.input.slice(o,s.position),!0}function composeNode(s,o,i,a,u){var _,w,x,C,j,L,B,$,V,U=1,z=!1,Y=!1;if(null!==s.listener&&s.listener(\"open\",s),s.tag=null,s.anchor=null,s.kind=null,s.result=null,_=w=x=4===i||3===i,a&&skipSeparationSpace(s,!0,-1)&&(z=!0,s.lineIndent>o?U=1:s.lineIndent===o?U=0:s.lineIndent<o&&(U=-1)),1===U)for(;readTagProperty(s)||readAnchorProperty(s);)skipSeparationSpace(s,!0,-1)?(z=!0,x=_,s.lineIndent>o?U=1:s.lineIndent===o?U=0:s.lineIndent<o&&(U=-1)):x=!1;if(x&&(x=z||u),1!==U&&4!==i||($=1===i||2===i?o:o+1,V=s.position-s.lineStart,1===U?x&&(readBlockSequence(s,V)||function readBlockMapping(s,o,i){var a,u,_,w,x,C,j,L=s.tag,B=s.anchor,$={},V=Object.create(null),U=null,z=null,Y=null,Z=!1,ee=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=$),j=s.input.charCodeAt(s.position);0!==j;){if(Z||-1===s.firstTabInLine||(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),a=s.input.charCodeAt(s.position+1),_=s.line,63!==j&&58!==j||!is_WS_OR_EOL(a)){if(w=s.line,x=s.lineStart,C=s.position,!composeNode(s,i,2,!1,!0))break;if(s.line===_){for(j=s.input.charCodeAt(s.position);is_WHITE_SPACE(j);)j=s.input.charCodeAt(++s.position);if(58===j)is_WS_OR_EOL(j=s.input.charCodeAt(++s.position))||throwError(s,\"a whitespace character is expected after the key-value separator within a block mapping\"),Z&&(storeMappingPair(s,$,V,U,z,null,w,x,C),U=z=Y=null),ee=!0,Z=!1,u=!1,U=s.tag,z=s.result;else{if(!ee)return s.tag=L,s.anchor=B,!0;throwError(s,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!ee)return s.tag=L,s.anchor=B,!0;throwError(s,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===j?(Z&&(storeMappingPair(s,$,V,U,z,null,w,x,C),U=z=Y=null),ee=!0,Z=!0,u=!0):Z?(Z=!1,u=!0):throwError(s,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),s.position+=1,j=a;if((s.line===_||s.lineIndent>o)&&(Z&&(w=s.line,x=s.lineStart,C=s.position),composeNode(s,o,4,!0,u)&&(Z?z=s.result:Y=s.result),Z||(storeMappingPair(s,$,V,U,z,Y,w,x,C),U=z=Y=null),skipSeparationSpace(s,!0,-1),j=s.input.charCodeAt(s.position)),(s.line===_||s.lineIndent>o)&&0!==j)throwError(s,\"bad indentation of a mapping entry\");else if(s.lineIndent<o)break}return Z&&storeMappingPair(s,$,V,U,z,null,w,x,C),ee&&(s.tag=L,s.anchor=B,s.kind=\"mapping\",s.result=$),ee}(s,V,$))||function readFlowCollection(s,o){var i,a,u,_,w,x,C,j,L,B,$,V,U=!0,z=s.tag,Y=s.anchor,Z=Object.create(null);if(91===(V=s.input.charCodeAt(s.position)))w=93,j=!1,_=[];else{if(123!==V)return!1;w=125,j=!0,_={}}for(null!==s.anchor&&(s.anchorMap[s.anchor]=_),V=s.input.charCodeAt(++s.position);0!==V;){if(skipSeparationSpace(s,!0,o),(V=s.input.charCodeAt(s.position))===w)return s.position++,s.tag=z,s.anchor=Y,s.kind=j?\"mapping\":\"sequence\",s.result=_,!0;U?44===V&&throwError(s,\"expected the node content, but found ','\"):throwError(s,\"missed comma between flow collection entries\"),$=null,x=C=!1,63===V&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1))&&(x=C=!0,s.position++,skipSeparationSpace(s,!0,o)),i=s.line,a=s.lineStart,u=s.position,composeNode(s,o,1,!1,!0),B=s.tag,L=s.result,skipSeparationSpace(s,!0,o),V=s.input.charCodeAt(s.position),!C&&s.line!==i||58!==V||(x=!0,V=s.input.charCodeAt(++s.position),skipSeparationSpace(s,!0,o),composeNode(s,o,1,!1,!0),$=s.result),j?storeMappingPair(s,_,Z,B,L,$,i,a,u):x?_.push(storeMappingPair(s,null,Z,B,L,$,i,a,u)):_.push(L),skipSeparationSpace(s,!0,o),44===(V=s.input.charCodeAt(s.position))?(U=!0,V=s.input.charCodeAt(++s.position)):U=!1}throwError(s,\"unexpected end of the stream within a flow collection\")}(s,$)?Y=!0:(w&&function readBlockScalar(s,o){var i,a,u,_,w,x=1,C=!1,j=!1,L=o,B=0,$=!1;if(124===(_=s.input.charCodeAt(s.position)))a=!1;else{if(62!==_)return!1;a=!0}for(s.kind=\"scalar\",s.result=\"\";0!==_;)if(43===(_=s.input.charCodeAt(++s.position))||45===_)1===x?x=43===_?3:2:throwError(s,\"repeat of a chomping mode identifier\");else{if(!((u=48<=(w=_)&&w<=57?w-48:-1)>=0))break;0===u?throwError(s,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):j?throwError(s,\"repeat of an indentation width identifier\"):(L=o+u-1,j=!0)}if(is_WHITE_SPACE(_)){do{_=s.input.charCodeAt(++s.position)}while(is_WHITE_SPACE(_));if(35===_)do{_=s.input.charCodeAt(++s.position)}while(!is_EOL(_)&&0!==_)}for(;0!==_;){for(readLineBreak(s),s.lineIndent=0,_=s.input.charCodeAt(s.position);(!j||s.lineIndent<L)&&32===_;)s.lineIndent++,_=s.input.charCodeAt(++s.position);if(!j&&s.lineIndent>L&&(L=s.lineIndent),is_EOL(_))B++;else{if(s.lineIndent<L){3===x?s.result+=er.repeat(\"\\n\",C?1+B:B):1===x&&C&&(s.result+=\"\\n\");break}for(a?is_WHITE_SPACE(_)?($=!0,s.result+=er.repeat(\"\\n\",C?1+B:B)):$?($=!1,s.result+=er.repeat(\"\\n\",B+1)):0===B?C&&(s.result+=\" \"):s.result+=er.repeat(\"\\n\",B):s.result+=er.repeat(\"\\n\",C?1+B:B),C=!0,j=!0,B=0,i=s.position;!is_EOL(_)&&0!==_;)_=s.input.charCodeAt(++s.position);captureSegment(s,i,s.position,!1)}}return!0}(s,$)||function readSingleQuotedScalar(s,o){var i,a,u;if(39!==(i=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,a=u=s.position;0!==(i=s.input.charCodeAt(s.position));)if(39===i){if(captureSegment(s,a,s.position,!0),39!==(i=s.input.charCodeAt(++s.position)))return!0;a=s.position,s.position++,u=s.position}else is_EOL(i)?(captureSegment(s,a,u,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,o)),a=u=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a single quoted scalar\"):(s.position++,u=s.position);throwError(s,\"unexpected end of the stream within a single quoted scalar\")}(s,$)||function readDoubleQuotedScalar(s,o){var i,a,u,_,w,x,C;if(34!==(x=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,i=a=s.position;0!==(x=s.input.charCodeAt(s.position));){if(34===x)return captureSegment(s,i,s.position,!0),s.position++,!0;if(92===x){if(captureSegment(s,i,s.position,!0),is_EOL(x=s.input.charCodeAt(++s.position)))skipSeparationSpace(s,!1,o);else if(x<256&&qr[x])s.result+=Vr[x],s.position++;else if((w=120===(C=x)?2:117===C?4:85===C?8:0)>0){for(u=w,_=0;u>0;u--)(w=fromHexCode(x=s.input.charCodeAt(++s.position)))>=0?_=(_<<4)+w:throwError(s,\"expected hexadecimal character\");s.result+=charFromCodepoint(_),s.position++}else throwError(s,\"unknown escape sequence\");i=a=s.position}else is_EOL(x)?(captureSegment(s,i,a,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,o)),i=a=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a double quoted scalar\"):(s.position++,a=s.position)}throwError(s,\"unexpected end of the stream within a double quoted scalar\")}(s,$)?Y=!0:!function readAlias(s){var o,i,a;if(42!==(a=s.input.charCodeAt(s.position)))return!1;for(a=s.input.charCodeAt(++s.position),o=s.position;0!==a&&!is_WS_OR_EOL(a)&&!is_FLOW_INDICATOR(a);)a=s.input.charCodeAt(++s.position);return s.position===o&&throwError(s,\"name of an alias node must contain at least one character\"),i=s.input.slice(o,s.position),Rr.call(s.anchorMap,i)||throwError(s,'unidentified alias \"'+i+'\"'),s.result=s.anchorMap[i],skipSeparationSpace(s,!0,-1),!0}(s)?function readPlainScalar(s,o,i){var a,u,_,w,x,C,j,L,B=s.kind,$=s.result;if(is_WS_OR_EOL(L=s.input.charCodeAt(s.position))||is_FLOW_INDICATOR(L)||35===L||38===L||42===L||33===L||124===L||62===L||39===L||34===L||37===L||64===L||96===L)return!1;if((63===L||45===L)&&(is_WS_OR_EOL(a=s.input.charCodeAt(s.position+1))||i&&is_FLOW_INDICATOR(a)))return!1;for(s.kind=\"scalar\",s.result=\"\",u=_=s.position,w=!1;0!==L;){if(58===L){if(is_WS_OR_EOL(a=s.input.charCodeAt(s.position+1))||i&&is_FLOW_INDICATOR(a))break}else if(35===L){if(is_WS_OR_EOL(s.input.charCodeAt(s.position-1)))break}else{if(s.position===s.lineStart&&testDocumentSeparator(s)||i&&is_FLOW_INDICATOR(L))break;if(is_EOL(L)){if(x=s.line,C=s.lineStart,j=s.lineIndent,skipSeparationSpace(s,!1,-1),s.lineIndent>=o){w=!0,L=s.input.charCodeAt(s.position);continue}s.position=_,s.line=x,s.lineStart=C,s.lineIndent=j;break}}w&&(captureSegment(s,u,_,!1),writeFoldedLines(s,s.line-x),u=_=s.position,w=!1),is_WHITE_SPACE(L)||(_=s.position+1),L=s.input.charCodeAt(++s.position)}return captureSegment(s,u,_,!1),!!s.result||(s.kind=B,s.result=$,!1)}(s,$,1===i)&&(Y=!0,null===s.tag&&(s.tag=\"?\")):(Y=!0,null===s.tag&&null===s.anchor||throwError(s,\"alias node should not have any properties\")),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):0===U&&(Y=x&&readBlockSequence(s,V))),null===s.tag)null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);else if(\"?\"===s.tag){for(null!==s.result&&\"scalar\"!==s.kind&&throwError(s,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+s.kind+'\"'),C=0,j=s.implicitTypes.length;C<j;C+=1)if((B=s.implicitTypes[C]).resolve(s.result)){s.result=B.construct(s.result),s.tag=B.tag,null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);break}}else if(\"!\"!==s.tag){if(Rr.call(s.typeMap[s.kind||\"fallback\"],s.tag))B=s.typeMap[s.kind||\"fallback\"][s.tag];else for(B=null,C=0,j=(L=s.typeMap.multi[s.kind||\"fallback\"]).length;C<j;C+=1)if(s.tag.slice(0,L[C].tag.length)===L[C].tag){B=L[C];break}B||throwError(s,\"unknown tag !<\"+s.tag+\">\"),null!==s.result&&B.kind!==s.kind&&throwError(s,\"unacceptable node kind for !<\"+s.tag+'> tag; it should be \"'+B.kind+'\", not \"'+s.kind+'\"'),B.resolve(s.result,s.tag)?(s.result=B.construct(s.result,s.tag),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):throwError(s,\"cannot resolve a node with !<\"+s.tag+\"> explicit tag\")}return null!==s.listener&&s.listener(\"close\",s),null!==s.tag||null!==s.anchor||Y}function readDocument(s){var o,i,a,u,_=s.position,w=!1;for(s.version=null,s.checkLineBreaks=s.legacy,s.tagMap=Object.create(null),s.anchorMap=Object.create(null);0!==(u=s.input.charCodeAt(s.position))&&(skipSeparationSpace(s,!0,-1),u=s.input.charCodeAt(s.position),!(s.lineIndent>0||37!==u));){for(w=!0,u=s.input.charCodeAt(++s.position),o=s.position;0!==u&&!is_WS_OR_EOL(u);)u=s.input.charCodeAt(++s.position);for(a=[],(i=s.input.slice(o,s.position)).length<1&&throwError(s,\"directive name must not be less than one character in length\");0!==u;){for(;is_WHITE_SPACE(u);)u=s.input.charCodeAt(++s.position);if(35===u){do{u=s.input.charCodeAt(++s.position)}while(0!==u&&!is_EOL(u));break}if(is_EOL(u))break;for(o=s.position;0!==u&&!is_WS_OR_EOL(u);)u=s.input.charCodeAt(++s.position);a.push(s.input.slice(o,s.position))}0!==u&&readLineBreak(s),Rr.call(zr,i)?zr[i](s,i,a):throwWarning(s,'unknown document directive \"'+i+'\"')}skipSeparationSpace(s,!0,-1),0===s.lineIndent&&45===s.input.charCodeAt(s.position)&&45===s.input.charCodeAt(s.position+1)&&45===s.input.charCodeAt(s.position+2)?(s.position+=3,skipSeparationSpace(s,!0,-1)):w&&throwError(s,\"directives end mark is expected\"),composeNode(s,s.lineIndent-1,4,!1,!0),skipSeparationSpace(s,!0,-1),s.checkLineBreaks&&Lr.test(s.input.slice(_,s.position))&&throwWarning(s,\"non-ASCII line breaks are interpreted as content\"),s.documents.push(s.result),s.position===s.lineStart&&testDocumentSeparator(s)?46===s.input.charCodeAt(s.position)&&(s.position+=3,skipSeparationSpace(s,!0,-1)):s.position<s.length-1&&throwError(s,\"end of the stream or a document separator is expected\")}function loadDocuments(s,o){o=o||{},0!==(s=String(s)).length&&(10!==s.charCodeAt(s.length-1)&&13!==s.charCodeAt(s.length-1)&&(s+=\"\\n\"),65279===s.charCodeAt(0)&&(s=s.slice(1)));var i=new State$1(s,o),a=s.indexOf(\"\\0\");for(-1!==a&&(i.position=a,throwError(i,\"null byte is not allowed in input\")),i.input+=\"\\0\";32===i.input.charCodeAt(i.position);)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)readDocument(i);return i.documents}var Wr={loadAll:function loadAll$1(s,o,i){null!==o&&\"object\"==typeof o&&void 0===i&&(i=o,o=null);var a=loadDocuments(s,i);if(\"function\"!=typeof o)return a;for(var u=0,_=a.length;u<_;u+=1)o(a[u])},load:function load$1(s,o){var i=loadDocuments(s,o);if(0!==i.length){if(1===i.length)return i[0];throw new tr(\"expected a single document in the stream, but found more\")}}},Jr=Object.prototype.toString,Hr=Object.prototype.hasOwnProperty,Kr=65279,Gr={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},Yr=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Xr=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function encodeHex(s){var o,i,a;if(o=s.toString(16).toUpperCase(),s<=255)i=\"x\",a=2;else if(s<=65535)i=\"u\",a=4;else{if(!(s<=4294967295))throw new tr(\"code point within a string may not be greater than 0xFFFFFFFF\");i=\"U\",a=8}return\"\\\\\"+i+er.repeat(\"0\",a-o.length)+o}function State(s){this.schema=s.schema||Mr,this.indent=Math.max(1,s.indent||2),this.noArrayIndent=s.noArrayIndent||!1,this.skipInvalid=s.skipInvalid||!1,this.flowLevel=er.isNothing(s.flowLevel)?-1:s.flowLevel,this.styleMap=function compileStyleMap(s,o){var i,a,u,_,w,x,C;if(null===o)return{};for(i={},u=0,_=(a=Object.keys(o)).length;u<_;u+=1)w=a[u],x=String(o[w]),\"!!\"===w.slice(0,2)&&(w=\"tag:yaml.org,2002:\"+w.slice(2)),(C=s.compiledTypeMap.fallback[w])&&Hr.call(C.styleAliases,x)&&(x=C.styleAliases[x]),i[w]=x;return i}(this.schema,s.styles||null),this.sortKeys=s.sortKeys||!1,this.lineWidth=s.lineWidth||80,this.noRefs=s.noRefs||!1,this.noCompatMode=s.noCompatMode||!1,this.condenseFlow=s.condenseFlow||!1,this.quotingType='\"'===s.quotingType?2:1,this.forceQuotes=s.forceQuotes||!1,this.replacer=\"function\"==typeof s.replacer?s.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(s,o){for(var i,a=er.repeat(\" \",o),u=0,_=-1,w=\"\",x=s.length;u<x;)-1===(_=s.indexOf(\"\\n\",u))?(i=s.slice(u),u=x):(i=s.slice(u,_+1),u=_+1),i.length&&\"\\n\"!==i&&(w+=a),w+=i;return w}function generateNextLine(s,o){return\"\\n\"+er.repeat(\" \",s.indent*o)}function isWhitespace(s){return 32===s||9===s}function isPrintable(s){return 32<=s&&s<=126||161<=s&&s<=55295&&8232!==s&&8233!==s||57344<=s&&s<=65533&&s!==Kr||65536<=s&&s<=1114111}function isNsCharOrWhitespace(s){return isPrintable(s)&&s!==Kr&&13!==s&&10!==s}function isPlainSafe(s,o,i){var a=isNsCharOrWhitespace(s),u=a&&!isWhitespace(s);return(i?a:a&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s)&&35!==s&&!(58===o&&!u)||isNsCharOrWhitespace(o)&&!isWhitespace(o)&&35===s||58===o&&u}function codePointAt(s,o){var i,a=s.charCodeAt(o);return a>=55296&&a<=56319&&o+1<s.length&&(i=s.charCodeAt(o+1))>=56320&&i<=57343?1024*(a-55296)+i-56320+65536:a}function needIndentIndicator(s){return/^\\n* /.test(s)}function chooseScalarStyle(s,o,i,a,u,_,w,x){var C,j=0,L=null,B=!1,$=!1,V=-1!==a,U=-1,z=function isPlainSafeFirst(s){return isPrintable(s)&&s!==Kr&&!isWhitespace(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s}(codePointAt(s,0))&&function isPlainSafeLast(s){return!isWhitespace(s)&&58!==s}(codePointAt(s,s.length-1));if(o||w)for(C=0;C<s.length;j>=65536?C+=2:C++){if(!isPrintable(j=codePointAt(s,C)))return 5;z=z&&isPlainSafe(j,L,x),L=j}else{for(C=0;C<s.length;j>=65536?C+=2:C++){if(10===(j=codePointAt(s,C)))B=!0,V&&($=$||C-U-1>a&&\" \"!==s[U+1],U=C);else if(!isPrintable(j))return 5;z=z&&isPlainSafe(j,L,x),L=j}$=$||V&&C-U-1>a&&\" \"!==s[U+1]}return B||$?i>9&&needIndentIndicator(s)?5:w?2===_?5:2:$?4:3:!z||w||u(s)?2===_?5:2:1}function writeScalar(s,o,i,a,u){s.dump=function(){if(0===o.length)return 2===s.quotingType?'\"\"':\"''\";if(!s.noCompatMode&&(-1!==Yr.indexOf(o)||Xr.test(o)))return 2===s.quotingType?'\"'+o+'\"':\"'\"+o+\"'\";var _=s.indent*Math.max(1,i),w=-1===s.lineWidth?-1:Math.max(Math.min(s.lineWidth,40),s.lineWidth-_),x=a||s.flowLevel>-1&&i>=s.flowLevel;switch(chooseScalarStyle(o,x,s.indent,w,(function testAmbiguity(o){return function testImplicitResolving(s,o){var i,a;for(i=0,a=s.implicitTypes.length;i<a;i+=1)if(s.implicitTypes[i].resolve(o))return!0;return!1}(s,o)}),s.quotingType,s.forceQuotes&&!a,u)){case 1:return o;case 2:return\"'\"+o.replace(/'/g,\"''\")+\"'\";case 3:return\"|\"+blockHeader(o,s.indent)+dropEndingNewline(indentString(o,_));case 4:return\">\"+blockHeader(o,s.indent)+dropEndingNewline(indentString(function foldString(s,o){var i,a,u=/(\\n+)([^\\n]*)/g,_=(x=s.indexOf(\"\\n\"),x=-1!==x?x:s.length,u.lastIndex=x,foldLine(s.slice(0,x),o)),w=\"\\n\"===s[0]||\" \"===s[0];var x;for(;a=u.exec(s);){var C=a[1],j=a[2];i=\" \"===j[0],_+=C+(w||i||\"\"===j?\"\":\"\\n\")+foldLine(j,o),w=i}return _}(o,w),_));case 5:return'\"'+function escapeString(s){for(var o,i=\"\",a=0,u=0;u<s.length;a>=65536?u+=2:u++)a=codePointAt(s,u),!(o=Gr[a])&&isPrintable(a)?(i+=s[u],a>=65536&&(i+=s[u+1])):i+=o||encodeHex(a);return i}(o)+'\"';default:throw new tr(\"impossible error: invalid scalar style\")}}()}function blockHeader(s,o){var i=needIndentIndicator(s)?String(o):\"\",a=\"\\n\"===s[s.length-1];return i+(a&&(\"\\n\"===s[s.length-2]||\"\\n\"===s)?\"+\":a?\"\":\"-\")+\"\\n\"}function dropEndingNewline(s){return\"\\n\"===s[s.length-1]?s.slice(0,-1):s}function foldLine(s,o){if(\"\"===s||\" \"===s[0])return s;for(var i,a,u=/ [^ ]/g,_=0,w=0,x=0,C=\"\";i=u.exec(s);)(x=i.index)-_>o&&(a=w>_?w:x,C+=\"\\n\"+s.slice(_,a),_=a+1),w=x;return C+=\"\\n\",s.length-_>o&&w>_?C+=s.slice(_,w)+\"\\n\"+s.slice(w+1):C+=s.slice(_),C.slice(1)}function writeBlockSequence(s,o,i,a){var u,_,w,x=\"\",C=s.tag;for(u=0,_=i.length;u<_;u+=1)w=i[u],s.replacer&&(w=s.replacer.call(i,String(u),w)),(writeNode(s,o+1,w,!0,!0,!1,!0)||void 0===w&&writeNode(s,o+1,null,!0,!0,!1,!0))&&(a&&\"\"===x||(x+=generateNextLine(s,o)),s.dump&&10===s.dump.charCodeAt(0)?x+=\"-\":x+=\"- \",x+=s.dump);s.tag=C,s.dump=x||\"[]\"}function detectType(s,o,i){var a,u,_,w,x,C;for(_=0,w=(u=i?s.explicitTypes:s.implicitTypes).length;_<w;_+=1)if(((x=u[_]).instanceOf||x.predicate)&&(!x.instanceOf||\"object\"==typeof o&&o instanceof x.instanceOf)&&(!x.predicate||x.predicate(o))){if(i?x.multi&&x.representName?s.tag=x.representName(o):s.tag=x.tag:s.tag=\"?\",x.represent){if(C=s.styleMap[x.tag]||x.defaultStyle,\"[object Function]\"===Jr.call(x.represent))a=x.represent(o,C);else{if(!Hr.call(x.represent,C))throw new tr(\"!<\"+x.tag+'> tag resolver accepts not \"'+C+'\" style');a=x.represent[C](o,C)}s.dump=a}return!0}return!1}function writeNode(s,o,i,a,u,_,w){s.tag=null,s.dump=i,detectType(s,i,!1)||detectType(s,i,!0);var x,C=Jr.call(s.dump),j=a;a&&(a=s.flowLevel<0||s.flowLevel>o);var L,B,$=\"[object Object]\"===C||\"[object Array]\"===C;if($&&(B=-1!==(L=s.duplicates.indexOf(i))),(null!==s.tag&&\"?\"!==s.tag||B||2!==s.indent&&o>0)&&(u=!1),B&&s.usedDuplicates[L])s.dump=\"*ref_\"+L;else{if($&&B&&!s.usedDuplicates[L]&&(s.usedDuplicates[L]=!0),\"[object Object]\"===C)a&&0!==Object.keys(s.dump).length?(!function writeBlockMapping(s,o,i,a){var u,_,w,x,C,j,L=\"\",B=s.tag,$=Object.keys(i);if(!0===s.sortKeys)$.sort();else if(\"function\"==typeof s.sortKeys)$.sort(s.sortKeys);else if(s.sortKeys)throw new tr(\"sortKeys must be a boolean or a function\");for(u=0,_=$.length;u<_;u+=1)j=\"\",a&&\"\"===L||(j+=generateNextLine(s,o)),x=i[w=$[u]],s.replacer&&(x=s.replacer.call(i,w,x)),writeNode(s,o+1,w,!0,!0,!0)&&((C=null!==s.tag&&\"?\"!==s.tag||s.dump&&s.dump.length>1024)&&(s.dump&&10===s.dump.charCodeAt(0)?j+=\"?\":j+=\"? \"),j+=s.dump,C&&(j+=generateNextLine(s,o)),writeNode(s,o+1,x,!0,C)&&(s.dump&&10===s.dump.charCodeAt(0)?j+=\":\":j+=\": \",L+=j+=s.dump));s.tag=B,s.dump=L||\"{}\"}(s,o,s.dump,u),B&&(s.dump=\"&ref_\"+L+s.dump)):(!function writeFlowMapping(s,o,i){var a,u,_,w,x,C=\"\",j=s.tag,L=Object.keys(i);for(a=0,u=L.length;a<u;a+=1)x=\"\",\"\"!==C&&(x+=\", \"),s.condenseFlow&&(x+='\"'),w=i[_=L[a]],s.replacer&&(w=s.replacer.call(i,_,w)),writeNode(s,o,_,!1,!1)&&(s.dump.length>1024&&(x+=\"? \"),x+=s.dump+(s.condenseFlow?'\"':\"\")+\":\"+(s.condenseFlow?\"\":\" \"),writeNode(s,o,w,!1,!1)&&(C+=x+=s.dump));s.tag=j,s.dump=\"{\"+C+\"}\"}(s,o,s.dump),B&&(s.dump=\"&ref_\"+L+\" \"+s.dump));else if(\"[object Array]\"===C)a&&0!==s.dump.length?(s.noArrayIndent&&!w&&o>0?writeBlockSequence(s,o-1,s.dump,u):writeBlockSequence(s,o,s.dump,u),B&&(s.dump=\"&ref_\"+L+s.dump)):(!function writeFlowSequence(s,o,i){var a,u,_,w=\"\",x=s.tag;for(a=0,u=i.length;a<u;a+=1)_=i[a],s.replacer&&(_=s.replacer.call(i,String(a),_)),(writeNode(s,o,_,!1,!1)||void 0===_&&writeNode(s,o,null,!1,!1))&&(\"\"!==w&&(w+=\",\"+(s.condenseFlow?\"\":\" \")),w+=s.dump);s.tag=x,s.dump=\"[\"+w+\"]\"}(s,o,s.dump),B&&(s.dump=\"&ref_\"+L+\" \"+s.dump));else{if(\"[object String]\"!==C){if(\"[object Undefined]\"===C)return!1;if(s.skipInvalid)return!1;throw new tr(\"unacceptable kind of an object to dump \"+C)}\"?\"!==s.tag&&writeScalar(s,s.dump,o,_,j)}null!==s.tag&&\"?\"!==s.tag&&(x=encodeURI(\"!\"===s.tag[0]?s.tag.slice(1):s.tag).replace(/!/g,\"%21\"),x=\"!\"===s.tag[0]?\"!\"+x:\"tag:yaml.org,2002:\"===x.slice(0,18)?\"!!\"+x.slice(18):\"!<\"+x+\">\",s.dump=x+\" \"+s.dump)}return!0}function getDuplicateReferences(s,o){var i,a,u=[],_=[];for(inspectNode(s,u,_),i=0,a=_.length;i<a;i+=1)o.duplicates.push(u[_[i]]);o.usedDuplicates=new Array(a)}function inspectNode(s,o,i){var a,u,_;if(null!==s&&\"object\"==typeof s)if(-1!==(u=o.indexOf(s)))-1===i.indexOf(u)&&i.push(u);else if(o.push(s),Array.isArray(s))for(u=0,_=s.length;u<_;u+=1)inspectNode(s[u],o,i);else for(u=0,_=(a=Object.keys(s)).length;u<_;u+=1)inspectNode(s[a[u]],o,i)}var Qr=function dump$1(s,o){var i=new State(o=o||{});i.noRefs||getDuplicateReferences(s,i);var a=s;return i.replacer&&(a=i.replacer.call({\"\":a},\"\",a)),writeNode(i,0,a,!0,!0)?i.dump+\"\\n\":\"\"};function renamed(s,o){return function(){throw new Error(\"Function yaml.\"+s+\" is removed in js-yaml 4. Use yaml.\"+o+\" instead, which is now safe by default.\")}}var Zr=ir,en=ar,tn=pr,rn=br,nn=_r,sn=Mr,on=Wr.load,an=Wr.loadAll,cn={dump:Qr}.dump,ln=tr,un={binary:Or,float:vr,map:ur,null:dr,pairs:Pr,set:Nr,timestamp:wr,bool:fr,int:mr,merge:xr,omap:jr,seq:lr,str:cr},pn=renamed(\"safeLoad\",\"load\"),hn=renamed(\"safeLoadAll\",\"loadAll\"),dn=renamed(\"safeDump\",\"dump\");const fn={Type:Zr,Schema:en,FAILSAFE_SCHEMA:tn,JSON_SCHEMA:rn,CORE_SCHEMA:nn,DEFAULT_SCHEMA:sn,load:on,loadAll:an,dump:cn,YAMLException:ln,types:un,safeLoad:pn,safeLoadAll:hn,safeDump:dn},mn=\"configs_update\",gn=\"configs_toggle\";function update(s,o){return{type:mn,payload:{[s]:o}}}function toggle(s){return{type:gn,payload:s}}const actions_loaded=()=>()=>{},downloadConfig=s=>o=>{const{fn:{fetch:i}}=o;return i(s)},getConfigByUrl=(s,o)=>i=>{const{specActions:a,configsActions:u}=i;if(s)return u.downloadConfig(s).then(next,next);function next(u){u instanceof Error||u.status>=400?(a.updateLoadingStatus(\"failedConfig\"),a.updateLoadingStatus(\"failedConfig\"),a.updateUrl(\"\"),console.error(u.statusText+\" \"+s.url),o(null)):o(((s,o)=>{try{return fn.load(s)}catch(s){return o&&o.errActions.newThrownErr(new Error(s)),{}}})(u.text,i))}},get=(s,o)=>s.getIn(Array.isArray(o)?o:[o]),yn={[mn]:(s,o)=>s.merge((0,ze.fromJS)(o.payload)),[gn]:(s,o)=>{const i=o.payload,a=s.get(i);return s.set(i,!a)}};function configsPlugin(){return{statePlugins:{configs:{reducers:yn,actions:u,selectors:_}}}}const setHash=s=>s?history.pushState(null,null,`#${s}`):window.location.hash=\"\";var vn=__webpack_require__(86215),bn=__webpack_require__.n(vn);const _n=\"layout_scroll_to\",Sn=\"layout_clear_scroll\";const En={fn:{getScrollParent:function getScrollParent(s,o){const i=document.documentElement;let a=getComputedStyle(s);const u=\"absolute\"===a.position,_=o?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===a.position)return i;for(let o=s;o=o.parentElement;)if(a=getComputedStyle(o),(!u||\"static\"!==a.position)&&_.test(a.overflow+a.overflowY+a.overflowX))return o;return i}},statePlugins:{layout:{actions:{scrollToElement:(s,o)=>i=>{try{o=o||i.fn.getScrollParent(s),bn().createScroller(o).to(s)}catch(s){console.error(s)}},scrollTo:s=>({type:_n,payload:Array.isArray(s)?s:[s]}),clearScrollTo:()=>({type:Sn}),readyToScroll:(s,o)=>i=>{const a=i.layoutSelectors.getScrollToKey();We().is(a,(0,ze.fromJS)(s))&&(i.layoutActions.scrollToElement(o),i.layoutActions.clearScrollTo())},parseDeepLinkHash:s=>({layoutActions:o,layoutSelectors:i,getConfigs:a})=>{if(a().deepLinking&&s){let a=s.slice(1);\"!\"===a[0]&&(a=a.slice(1)),\"/\"===a[0]&&(a=a.slice(1));const u=a.split(\"/\").map((s=>s||\"\")),_=i.isShownKeyFromUrlHashArray(u),[w,x=\"\",C=\"\"]=_;if(\"operations\"===w){const s=i.isShownKeyFromUrlHashArray([x]);x.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),o.show(s.map((s=>s.replace(/_/g,\" \"))),!0)),o.show(s,!0)}(x.indexOf(\"_\")>-1||C.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),o.show(_.map((s=>s.replace(/_/g,\" \"))),!0)),o.show(_,!0),o.scrollTo(_)}}},selectors:{getScrollToKey:s=>s.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(s,o){const[i,a]=o;return a?[\"operations\",i,a]:i?[\"operations-tag\",i]:[]},urlHashArrayFromIsShownKey(s,o){let[i,a,u]=o;return\"operations\"==i?[a,u]:\"operations-tag\"==i?[a]:[]}},reducers:{[_n]:(s,o)=>s.set(\"scrollToKey\",We().fromJS(o.payload)),[Sn]:s=>s.delete(\"scrollToKey\")},wrapActions:{show:(s,{getConfigs:o,layoutSelectors:i})=>(...a)=>{if(s(...a),o().deepLinking)try{let[s,o]=a;s=Array.isArray(s)?s:[s];const u=i.urlHashArrayFromIsShownKey(s);if(!u.length)return;const[_,w]=u;if(!o)return setHash(\"/\");2===u.length?setHash(createDeepLinkPath(`/${encodeURIComponent(_)}/${encodeURIComponent(w)}`)):1===u.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(_)}`))}catch(s){console.error(s)}}}}}};var wn=__webpack_require__(2209),xn=__webpack_require__.n(wn);const operation_wrapper=(s,o)=>class OperationWrapper extends Re.Component{onLoad=s=>{const{operation:i}=this.props,{tag:a,operationId:u}=i.toObject();let{isShownKey:_}=i.toObject();_=_||[\"operations\",a,u],o.layoutActions.readyToScroll(_,s)};render(){return Re.createElement(\"span\",{ref:this.onLoad},Re.createElement(s,this.props))}},operation_tag_wrapper=(s,o)=>class OperationTagWrapper extends Re.Component{onLoad=s=>{const{tag:i}=this.props,a=[\"operations-tag\",i];o.layoutActions.readyToScroll(a,s)};render(){return Re.createElement(\"span\",{ref:this.onLoad},Re.createElement(s,this.props))}};function deep_linking(){return[En,{statePlugins:{configs:{wrapActions:{loaded:(s,o)=>(...i)=>{s(...i);const a=decodeURIComponent(window.location.hash);o.layoutActions.parseDeepLinkHash(a)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}var kn=__webpack_require__(40860),On=__webpack_require__.n(kn);function transform(s){return s.map((s=>{let o=\"is not of a type(s)\",i=s.get(\"message\").indexOf(o);if(i>-1){let o=s.get(\"message\").slice(i+19).split(\",\");return s.set(\"message\",s.get(\"message\").slice(0,i)+function makeNewMessage(s){return s.reduce(((s,o,i,a)=>i===a.length-1&&a.length>1?s+\"or \"+o:a[i+1]&&a.length>2?s+o+\", \":a[i+1]?s+o+\" \":s+o),\"should be a\")}(o))}return s}))}var Cn=__webpack_require__(58156),An=__webpack_require__.n(Cn);function parameter_oneof_transform(s,{jsSpec:o}){return s}const jn=[w,x];function transformErrors(s){let o={jsSpec:{}},i=On()(jn,((s,i)=>{try{return i.transform(s,o).filter((s=>!!s))}catch(o){return console.error(\"Transformer error:\",o),s}}),s);return i.filter((s=>!!s)).map((s=>(!s.get(\"line\")&&s.get(\"path\"),s)))}let In={line:0,level:\"error\",message:\"Unknown error\"};const Pn=Vt((s=>s),(s=>s.get(\"errors\",(0,ze.List)()))),Tn=Vt(Pn,(s=>s.last()));function err(o){return{statePlugins:{err:{reducers:{[rt]:(s,{payload:o})=>{let i=Object.assign(In,o,{type:\"thrown\"});return s.update(\"errors\",(s=>(s||(0,ze.List)()).push((0,ze.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))},[nt]:(s,{payload:o})=>(o=o.map((s=>(0,ze.fromJS)(Object.assign(In,s,{type:\"thrown\"})))),s.update(\"errors\",(s=>(s||(0,ze.List)()).concat((0,ze.fromJS)(o)))).update(\"errors\",(s=>transformErrors(s)))),[st]:(s,{payload:o})=>{let i=(0,ze.fromJS)(o);return i=i.set(\"type\",\"spec\"),s.update(\"errors\",(s=>(s||(0,ze.List)()).push((0,ze.fromJS)(i)).sortBy((s=>s.get(\"line\"))))).update(\"errors\",(s=>transformErrors(s)))},[ot]:(s,{payload:o})=>(o=o.map((s=>(0,ze.fromJS)(Object.assign(In,s,{type:\"spec\"})))),s.update(\"errors\",(s=>(s||(0,ze.List)()).concat((0,ze.fromJS)(o)))).update(\"errors\",(s=>transformErrors(s)))),[it]:(s,{payload:o})=>{let i=(0,ze.fromJS)(Object.assign({},o));return i=i.set(\"type\",\"auth\"),s.update(\"errors\",(s=>(s||(0,ze.List)()).push((0,ze.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))},[at]:(s,{payload:o})=>{if(!o||!s.get(\"errors\"))return s;let i=s.get(\"errors\").filter((s=>s.keySeq().every((i=>{const a=s.get(i),u=o[i];return!u||a!==u}))));return s.merge({errors:i})},[ct]:(s,{payload:o})=>{if(!o||\"function\"!=typeof o)return s;let i=s.get(\"errors\").filter((s=>o(s)));return s.merge({errors:i})}},actions:s,selectors:C}}}}function opsFilter(s,o){return s.filter(((s,i)=>-1!==i.indexOf(o)))}function filter(){return{fn:{opsFilter}}}var Nn=__webpack_require__(7666),Mn=__webpack_require__.n(Nn);const arrow_up=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),arrow_down=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),arrow=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),components_close=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),copy=({className:s=null,width:o=15,height:i=16,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"g\",{transform:\"translate(2, -1)\"},Re.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))),lock=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),unlock=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}}),Rn=\"layout_update_layout\",Dn=\"layout_update_filter\",Ln=\"layout_update_mode\",Fn=\"layout_show\";function updateLayout(s){return{type:Rn,payload:s}}function updateFilter(s){return{type:Dn,payload:s}}function actions_show(s,o=!0){return s=normalizeArray(s),{type:Fn,payload:{thing:s,shown:o}}}function changeMode(s,o=\"\"){return s=normalizeArray(s),{type:Ln,payload:{thing:s,mode:o}}}const Bn={[Rn]:(s,o)=>s.set(\"layout\",o.payload),[Dn]:(s,o)=>s.set(\"filter\",o.payload),[Fn]:(s,o)=>{const i=o.payload.shown,a=(0,ze.fromJS)(o.payload.thing);return s.update(\"shown\",(0,ze.fromJS)({}),(s=>s.set(a,i)))},[Ln]:(s,o)=>{let i=o.payload.thing,a=o.payload.mode;return s.setIn([\"modes\"].concat(i),(a||\"\")+\"\")}},current=s=>s.get(\"layout\"),currentFilter=s=>s.get(\"filter\"),isShown=(s,o,i)=>(o=normalizeArray(o),s.get(\"shown\",(0,ze.fromJS)({})).get((0,ze.fromJS)(o),i)),whatMode=(s,o,i=\"\")=>(o=normalizeArray(o),s.getIn([\"modes\",...o],i)),$n=Vt((s=>s),(s=>!isShown(s,\"editor\"))),taggedOperations=(s,o)=>(i,...a)=>{let u=s(i,...a);const{fn:_,layoutSelectors:w,getConfigs:x}=o.getSystem(),C=x(),{maxDisplayedTags:j}=C;let L=w.currentFilter();return L&&!0!==L&&(u=_.opsFilter(u,L)),j>=0&&(u=u.slice(0,j)),u};function plugins_layout(){return{statePlugins:{layout:{reducers:Bn,actions:j,selectors:L},spec:{wrapSelectors:B}}}}function logs({configs:s}){const o={debug:0,info:1,log:2,warn:3,error:4},getLevel=s=>o[s]||-1;let{logLevel:i}=s,a=getLevel(i);function log(s,...o){getLevel(s)>=a&&console[s](...o)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let qn=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:s=>(...o)=>(qn=!0,s(...o)),updateJsonSpec:(s,o)=>(...i)=>{const a=o.getConfigs().onComplete;return qn&&\"function\"==typeof a&&(setTimeout(a,0),qn=!1),s(...i)}}}}}}const extractKey=s=>{const o=\"_**[]\";return s.indexOf(o)<0?s:s.split(o)[0].trim()},escapeShell=s=>\"-d \"===s||/^[_\\/-]/g.test(s)?s:\"'\"+s.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=s=>\"-d \"===(s=s.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?s.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(s)?s:'\"'+s+'\"',escapePowershell=s=>{if(\"-d \"===s)return s;if(/\\n/.test(s)){return`@\"\\n${s.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(s)){return`'${s.replace(/'/g,\"''\")}'`}return s};const curlify=(s,o,i,a=\"\")=>{let u=!1,_=\"\";const addWords=(...s)=>_+=\" \"+s.map(o).join(\" \"),addWordsWithoutLeadingSpace=(...s)=>_+=s.map(o).join(\" \"),addNewLine=()=>_+=` ${i}`,addIndent=(s=1)=>_+=\"  \".repeat(s);let w=s.get(\"headers\");_+=\"curl\"+a;const x=s.get(\"curlOptions\");if(ze.List.isList(x)&&!x.isEmpty()&&addWords(...s.get(\"curlOptions\")),addWords(\"-X\",s.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${s.get(\"url\")}`),w&&w.size)for(let o of s.get(\"headers\").entries()){addNewLine(),addIndent();let[s,i]=o;addWordsWithoutLeadingSpace(\"-H\",`${s}: ${i}`),u=u||/^content-type$/i.test(s)&&/^multipart\\/form-data$/i.test(i)}const C=s.get(\"body\");if(C)if(u&&[\"POST\",\"PUT\",\"PATCH\"].includes(s.get(\"method\")))for(let[s,o]of C.entrySeq()){let i=extractKey(s);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),o instanceof lt.File&&\"string\"==typeof o.valueOf()?addWords(`${i}=${o.data}${o.type?`;type=${o.type}`:\"\"}`):o instanceof lt.File?addWords(`${i}=@${o.name}${o.type?`;type=${o.type}`:\"\"}`):addWords(`${i}=${o}`)}else if(C instanceof lt.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${C.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let o=C;ze.Map.isMap(o)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(s){let o=[];for(let[i,a]of s.get(\"body\").entrySeq()){let s=extractKey(i);a instanceof lt.File?o.push(`  \"${s}\": {\\n    \"name\": \"${a.name}\"${a.type?`,\\n    \"type\": \"${a.type}\"`:\"\"}\\n  }`):o.push(`  \"${s}\": ${JSON.stringify(a,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${o.join(\",\\n\")}\\n}`}(s)):(\"string\"!=typeof o&&(o=JSON.stringify(o)),addWordsWithoutLeadingSpace(o))}else C||\"POST\"!==s.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return _},requestSnippetGenerator_curl_powershell=s=>curlify(s,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=s=>curlify(s,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=s=>curlify(s,escapeCMD,\"^\\n\"),request_snippets_selectors_state=s=>s||(0,ze.Map)(),Vn=Vt(request_snippets_selectors_state,(s=>{const o=s.get(\"languages\"),i=s.get(\"generators\",(0,ze.Map)());return!o||o.isEmpty()?i:i.filter(((s,i)=>o.includes(i)))})),getSnippetGenerators=s=>({fn:o})=>Vn(s).map(((s,i)=>{const a=(s=>o[`requestSnippetGenerator_${s}`])(i);return\"function\"!=typeof a?null:s.set(\"fn\",a)})).filter((s=>s)),Un=Vt(request_snippets_selectors_state,(s=>s.get(\"activeLanguage\"))),zn=Vt(request_snippets_selectors_state,(s=>s.get(\"defaultExpanded\")));var Wn=__webpack_require__(46942),Jn=__webpack_require__.n(Wn),Hn=__webpack_require__(59399);const Kn={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},Gn={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"},request_snippets=({request:s,requestSnippetsSelectors:o,getComponent:i})=>{const a=(0,Re.useRef)(null),u=i(\"ArrowUpIcon\"),_=i(\"ArrowDownIcon\"),w=i(\"SyntaxHighlighter\",!0),[x,C]=(0,Re.useState)(o.getSnippetGenerators()?.keySeq().first()),[j,L]=(0,Re.useState)(o?.getDefaultExpanded()),B=o.getSnippetGenerators(),$=B.get(x),V=$.get(\"fn\")(s),handleSetIsExpanded=()=>{L(!j)},handleGetBtnStyle=s=>s===x?Gn:Kn,handlePreventYScrollingBeyondElement=s=>{const{target:o,deltaY:i}=s,{scrollHeight:a,offsetHeight:u,scrollTop:_}=o;a>u&&(0===_&&i<0||u+_>=a&&i>0)&&s.preventDefault()};return(0,Re.useEffect)((()=>{}),[]),(0,Re.useEffect)((()=>{const s=Array.from(a.current.childNodes).filter((s=>!!s.nodeType&&s.classList?.contains(\"curl-command\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s]),Re.createElement(\"div\",{className:\"request-snippets\",ref:a},Re.createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},Re.createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),Re.createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:j?\"Collapse operation\":\"Expand operation\"},j?Re.createElement(_,{className:\"arrow\",width:\"10\",height:\"10\"}):Re.createElement(u,{className:\"arrow\",width:\"10\",height:\"10\"}))),j&&Re.createElement(\"div\",{className:\"curl-command\"},Re.createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},B.entrySeq().map((([s,o])=>Re.createElement(\"div\",{className:Jn()(\"btn\",{active:s===x}),style:handleGetBtnStyle(s),key:s,onClick:()=>(s=>{x!==s&&C(s)})(s)},Re.createElement(\"h4\",{style:s===x?{color:\"white\"}:{}},o.get(\"title\")))))),Re.createElement(\"div\",{className:\"copy-to-clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:V},Re.createElement(\"button\",null))),Re.createElement(\"div\",null,Re.createElement(w,{language:$.get(\"syntax\"),className:\"curl microlight\",renderPlainText:({children:s,PlainTextViewer:o})=>Re.createElement(o,{className:\"curl\"},s)},V))))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:{requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell},statePlugins:{requestSnippets:{selectors:$}}});class ModelCollapse extends Re.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:We().List([])};constructor(s,o){super(s,o);let{expanded:i,collapsedContent:a}=this.props;this.state={expanded:i,collapsedContent:a||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:s,expanded:o,modelName:i}=this.props;s&&o&&this.props.onToggle(i,o)}UNSAFE_componentWillReceiveProps(s){this.props.expanded!==s.expanded&&this.setState({expanded:s.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=s=>{if(s&&this.props.layoutSelectors){const o=this.props.layoutSelectors.getScrollToKey();We().is(o,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,s.parentElement)}};render(){const{title:s,classes:o}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?Re.createElement(\"span\",{className:o||\"\"},this.props.children):Re.createElement(\"span\",{className:o||\"\",ref:this.onLoad},Re.createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},s&&Re.createElement(\"span\",{className:\"pointer\"},s),Re.createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&Re.createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:s,isExecute:o,schema:i,example:a})=>{const u=(0,Re.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),_=(0,Re.useMemo)((()=>Object.keys(u)),[u]).includes(s)&&i&&!o?s:u.example,w=(s=>{const o=(0,Re.useRef)();return(0,Re.useEffect)((()=>{o.current=s})),o.current})(o),[x,C]=(0,Re.useState)(_),j=(0,Re.useCallback)((s=>{C(s.target.dataset.name)}),[]);return(0,Re.useEffect)((()=>{w&&!o&&a&&C(u.example)}),[w,o,a]),{activeTab:x,onTabChange:j,tabs:u}},model_example=({schema:s,example:o,isExecute:i=!1,specPath:a,includeWriteOnly:u=!1,includeReadOnly:_=!1,getComponent:w,getConfigs:x,specSelectors:C})=>{const{defaultModelRendering:j,defaultModelExpandDepth:L}=x(),B=w(\"ModelWrapper\"),$=w(\"HighlightCode\",!0),V=xt()(5).toString(\"base64\"),U=xt()(5).toString(\"base64\"),z=xt()(5).toString(\"base64\"),Y=xt()(5).toString(\"base64\"),Z=C.isOAS3(),{activeTab:ee,tabs:ie,onTabChange:ae}=useTabs({initialTab:j,isExecute:i,schema:s,example:o});return Re.createElement(\"div\",{className:\"model-example\"},Re.createElement(\"ul\",{className:\"tab\",role:\"tablist\"},Re.createElement(\"li\",{className:Jn()(\"tabitem\",{active:ee===ie.example}),role:\"presentation\"},Re.createElement(\"button\",{\"aria-controls\":U,\"aria-selected\":ee===ie.example,className:\"tablinks\",\"data-name\":\"example\",id:V,onClick:ae,role:\"tab\"},i?\"Edit Value\":\"Example Value\")),s&&Re.createElement(\"li\",{className:Jn()(\"tabitem\",{active:ee===ie.model}),role:\"presentation\"},Re.createElement(\"button\",{\"aria-controls\":Y,\"aria-selected\":ee===ie.model,className:Jn()(\"tablinks\",{inactive:i}),\"data-name\":\"model\",id:z,onClick:ae,role:\"tab\"},Z?\"Schema\":\"Model\"))),ee===ie.example&&Re.createElement(\"div\",{\"aria-hidden\":ee!==ie.example,\"aria-labelledby\":V,\"data-name\":\"examplePanel\",id:U,role:\"tabpanel\",tabIndex:\"0\"},o||Re.createElement($,null,\"(no example available\")),ee===ie.model&&Re.createElement(\"div\",{className:\"model-container\",\"aria-hidden\":ee===ie.example,\"aria-labelledby\":z,\"data-name\":\"modelPanel\",id:Y,role:\"tabpanel\",tabIndex:\"0\"},Re.createElement(B,{schema:s,getComponent:w,getConfigs:x,specSelectors:C,expandDepth:L,specPath:a,includeReadOnly:_,includeWriteOnly:u})))};class ModelWrapper extends Re.Component{onToggle=(s,o)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,o)};render(){let{getComponent:s,getConfigs:o}=this.props;const i=s(\"Model\");let a;return this.props.layoutSelectors&&(a=this.props.layoutSelectors.isShown(this.props.fullPath)),Re.createElement(\"div\",{className:\"model-box\"},Re.createElement(i,Mn()({},this.props,{getConfigs:o,expanded:a,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,o){return s.__proto__=o,s},_setPrototypeOf(s,o)}function _possibleConstructorReturn(s,o){return!o||\"object\"!=typeof o&&\"function\"!=typeof o?function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}(s):o}var Yn={};function react_immutable_pure_component_es_get(s,o,i){return function isInvalid(s){return null==s}(s)?i:function isMapLike(s){return null!==s&&\"object\"===_typeof(s)&&\"function\"==typeof s.get&&\"function\"==typeof s.has}(s)?s.has(o)?s.get(o):i:hasOwnProperty.call(s,o)?s[o]:i}function getIn(s,o,i){for(var a=0;a!==o.length;)if((s=react_immutable_pure_component_es_get(s,o[a++],Yn))===Yn)return i;return s}function check(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=function createChecker(s,o){return function(i){if(\"string\"==typeof i)return(0,ze.is)(o[i],s[i]);if(Array.isArray(i))return(0,ze.is)(getIn(o,i),getIn(s,i));throw new TypeError(\"Invalid key: expected Array or string: \"+i)}}(o,i),u=s||Object.keys(function _objectSpread2(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}({},i,{},o));return u.every(a)}const Xn=function(s){function ImmutablePureComponent(){return function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,ImmutablePureComponent),_possibleConstructorReturn(this,_getPrototypeOf(ImmutablePureComponent).apply(this,arguments))}return function _inherits(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),o&&_setPrototypeOf(s,o)}(ImmutablePureComponent,s),function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),s}(ImmutablePureComponent,[{key:\"shouldComponentUpdate\",value:function shouldComponentUpdate(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!check(this.updateOnProps,this.props,s,\"updateOnProps\")||!check(this.updateOnStates,this.state,o,\"updateOnStates\")}}]),ImmutablePureComponent}(Re.Component);var Qn,Zn=__webpack_require__(5556),es=__webpack_require__.n(Zn);function _extends(){return _extends=Object.assign?Object.assign.bind():function(s){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},_extends.apply(null,arguments)}const rolling_load=s=>Re.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},s),Qn||(Qn=Re.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},Re.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"})))),decodeRefName=s=>{const o=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(o)}catch{return o}};class Model extends Xn{static propTypes={schema:xn().map.isRequired,getComponent:es().func.isRequired,getConfigs:es().func.isRequired,specSelectors:es().object.isRequired,name:es().string,displayName:es().string,isRef:es().bool,required:es().bool,expandDepth:es().number,depth:es().number,specPath:xn().list.isRequired,includeReadOnly:es().bool,includeWriteOnly:es().bool};getModelName=s=>-1!==s.indexOf(\"#/definitions/\")?decodeRefName(s.replace(/^.*#\\/definitions\\//,\"\")):-1!==s.indexOf(\"#/components/schemas/\")?decodeRefName(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=s=>{let{specSelectors:o}=this.props;return o.findDefinition(s)};render(){let{getComponent:s,getConfigs:o,specSelectors:i,schema:a,required:u,name:_,isRef:w,specPath:x,displayName:C,includeReadOnly:j,includeWriteOnly:L}=this.props;const B=s(\"ObjectModel\"),$=s(\"ArrayModel\"),V=s(\"PrimitiveModel\");let U=\"object\",z=a&&a.get(\"$$ref\"),Y=a&&a.get(\"$ref\");if(!_&&z&&(_=this.getModelName(z)),Y){const s=this.getModelName(Y),o=this.getRefSchema(s);ze.Map.isMap(o)?(a=o.mergeDeep(a),z||(a=a.set(\"$$ref\",Y),z=Y)):ze.Map.isMap(a)&&1===a.size&&(a=null,_=Y)}if(!a)return Re.createElement(\"span\",{className:\"model model-title\"},Re.createElement(\"span\",{className:\"model-title__text\"},C||_),!Y&&Re.createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const Z=i.isOAS3()&&a.get(\"deprecated\");switch(w=void 0!==w?w:!!z,U=a&&a.get(\"type\")||U,U){case\"object\":return Re.createElement(B,Mn()({className:\"object\"},this.props,{specPath:x,getConfigs:o,schema:a,name:_,deprecated:Z,isRef:w,includeReadOnly:j,includeWriteOnly:L}));case\"array\":return Re.createElement($,Mn()({className:\"array\"},this.props,{getConfigs:o,schema:a,name:_,deprecated:Z,required:u,includeReadOnly:j,includeWriteOnly:L}));default:return Re.createElement(V,Mn()({},this.props,{getComponent:s,getConfigs:o,schema:a,name:_,deprecated:Z,required:u}))}}}class Models extends Re.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(s,o)=>{const{layoutActions:i}=this.props;i.show([...this.getSchemaBasePath(),s],o),o&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),s])};onLoadModels=s=>{s&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),s)};onLoadModel=s=>{if(s){const o=s.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),o],s)}};render(){let{specSelectors:s,getComponent:o,layoutSelectors:i,layoutActions:a,getConfigs:u}=this.props,_=s.definitions(),{docExpansion:w,defaultModelsExpandDepth:x}=u();if(!_.size||x<0)return null;const C=this.getSchemaBasePath();let j=i.isShown(C,x>0&&\"none\"!==w);const L=s.isOAS3(),B=o(\"ModelWrapper\"),$=o(\"Collapse\"),V=o(\"ModelCollapse\"),U=o(\"JumpToPath\",!0),z=o(\"ArrowUpIcon\"),Y=o(\"ArrowDownIcon\");return Re.createElement(\"section\",{className:j?\"models is-open\":\"models\",ref:this.onLoadModels},Re.createElement(\"h4\",null,Re.createElement(\"button\",{\"aria-expanded\":j,className:\"models-control\",onClick:()=>a.show(C,!j)},Re.createElement(\"span\",null,L?\"Schemas\":\"Models\"),j?Re.createElement(z,null):Re.createElement(Y,null))),Re.createElement($,{isOpened:j},_.entrySeq().map((([_])=>{const w=[...C,_],j=We().List(w),L=s.specResolvedSubtree(w),$=s.specJson().getIn(w),z=ze.Map.isMap(L)?L:We().Map(),Y=ze.Map.isMap($)?$:We().Map(),Z=z.get(\"title\")||Y.get(\"title\")||_,ee=i.isShown(w,!1);ee&&0===z.size&&Y.size>0&&this.props.specActions.requestResolvedSubtree(w);const ie=Re.createElement(B,{name:_,expandDepth:x,schema:z||We().Map(),displayName:Z,fullPath:w,specPath:j,getComponent:o,specSelectors:s,getConfigs:u,layoutSelectors:i,layoutActions:a,includeReadOnly:!0,includeWriteOnly:!0}),ae=Re.createElement(\"span\",{className:\"model-box\"},Re.createElement(\"span\",{className:\"model model-title\"},Z));return Re.createElement(\"div\",{id:`model-${_}`,className:\"model-container\",key:`models-section-${_}`,\"data-name\":_,ref:this.onLoadModel},Re.createElement(\"span\",{className:\"models-jump-to-path\"},Re.createElement(U,{path:j})),Re.createElement(V,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(_),onToggle:this.handleToggle,title:ae,displayName:Z,modelName:_,specPath:j,layoutSelectors:i,layoutActions:a,hideSelfOnExpand:!0,expanded:x>0&&ee},ie))})).toArray()))}}const enum_model=({value:s,getComponent:o})=>{let i=o(\"ModelCollapse\"),a=Re.createElement(\"span\",null,\"Array [ \",s.count(),\" ]\");return Re.createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",Re.createElement(\"br\",null),Re.createElement(i,{collapsedContent:a},\"[ \",s.map(String).join(\", \"),\" ]\"))};function isAbsoluteUrl(s){return s.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(s,o){return s?isAbsoluteUrl(s)?function addProtocol(s){return s.match(/^\\/\\//i)?`${window.location.protocol}${s}`:s}(s):new URL(s,o).href:o}function safeBuildUrl(s,o,{selectedServer:i=\"\"}={}){try{return function buildUrl(s,o,{selectedServer:i=\"\"}={}){if(!s)return;if(isAbsoluteUrl(s))return s;const a=buildBaseUrl(i,o);return isAbsoluteUrl(a)?new URL(s,a).href:new URL(s,window.location.href).href}(s,o,{selectedServer:i})}catch{return}}function sanitizeUrl(s){if(\"string\"!=typeof s||\"\"===s.trim())return\"\";const o=s.trim(),i=\"about:blank\";try{const s=`https://base${String(Math.random()).slice(2)}`,a=new URL(o,s),u=a.protocol.slice(0,-1);return[\"javascript\",\"data\",\"vbscript\"].includes(u.toLowerCase())?i:a.origin===s?o.startsWith(\"/\")?`${a.pathname}${a.search}${a.hash}`:o.startsWith(\".\")?`.${a.pathname}${a.search}${a.hash}`:`${a.pathname.substring(1)}${a.search}${a.hash}`:String(a)}catch{return i}}class ObjectModel extends Re.Component{render(){let{schema:s,name:o,displayName:i,isRef:a,getComponent:u,getConfigs:_,depth:w,onToggle:x,expanded:C,specPath:j,...L}=this.props,{specSelectors:B,expandDepth:$,includeReadOnly:V,includeWriteOnly:U}=L;const{isOAS3:z}=B,Y=w>2||2===w&&\"items\"!==j.last();if(!s)return null;const{showExtensions:Z}=_(),ee=Z?getExtensions(s):(0,ze.List)();let ie=s.get(\"description\"),ae=s.get(\"properties\"),ce=s.get(\"additionalProperties\"),le=s.get(\"title\")||i||o,pe=s.get(\"required\"),de=s.filter(((s,o)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(o))),fe=s.get(\"deprecated\"),ye=s.getIn([\"externalDocs\",\"url\"]),be=s.getIn([\"externalDocs\",\"description\"]);const _e=u(\"JumpToPath\",!0),Se=u(\"Markdown\",!0),we=u(\"Model\"),xe=u(\"ModelCollapse\"),Pe=u(\"Property\"),Te=u(\"Link\"),$e=u(\"ModelExtensions\"),JumpToPathSection=()=>Re.createElement(\"span\",{className:\"model-jump-to-path\"},Re.createElement(_e,{path:j})),qe=Re.createElement(\"span\",null,Re.createElement(\"span\",null,\"{\"),\"...\",Re.createElement(\"span\",null,\"}\"),a?Re.createElement(JumpToPathSection,null):\"\"),We=B.isOAS3()?s.get(\"allOf\"):null,He=B.isOAS3()?s.get(\"anyOf\"):null,Ye=B.isOAS3()?s.get(\"oneOf\"):null,Xe=B.isOAS3()?s.get(\"not\"):null,Qe=le&&Re.createElement(\"span\",{className:\"model-title\"},a&&s.get(\"$$ref\")&&Re.createElement(\"span\",{className:Jn()(\"model-hint\",{\"model-hint--embedded\":Y})},s.get(\"$$ref\")),Re.createElement(\"span\",{className:\"model-title__text\"},le));return Re.createElement(\"span\",{className:\"model\"},Re.createElement(xe,{modelName:o,title:Qe,onToggle:x,expanded:!!C||w<=$,collapsedContent:qe},Re.createElement(\"span\",{className:\"brace-open object\"},\"{\"),a?Re.createElement(JumpToPathSection,null):null,Re.createElement(\"span\",{className:\"inner-object\"},Re.createElement(\"table\",{className:\"model\"},Re.createElement(\"tbody\",null,ie?Re.createElement(\"tr\",{className:\"description\"},Re.createElement(\"td\",null,\"description:\"),Re.createElement(\"td\",null,Re.createElement(Se,{source:ie}))):null,ye&&Re.createElement(\"tr\",{className:\"external-docs\"},Re.createElement(\"td\",null,\"externalDocs:\"),Re.createElement(\"td\",null,Re.createElement(Te,{target:\"_blank\",href:sanitizeUrl(ye)},be||ye))),fe?Re.createElement(\"tr\",{className:\"property\"},Re.createElement(\"td\",null,\"deprecated:\"),Re.createElement(\"td\",null,\"true\")):null,ae&&ae.size?ae.entrySeq().filter((([,s])=>(!s.get(\"readOnly\")||V)&&(!s.get(\"writeOnly\")||U))).map((([s,i])=>{let a=z()&&i.get(\"deprecated\"),x=ze.List.isList(pe)&&pe.contains(s),C=[\"property-row\"];return a&&C.push(\"deprecated\"),x&&C.push(\"required\"),Re.createElement(\"tr\",{key:s,className:C.join(\" \")},Re.createElement(\"td\",null,s,x&&Re.createElement(\"span\",{className:\"star\"},\"*\")),Re.createElement(\"td\",null,Re.createElement(we,Mn()({key:`object-${o}-${s}_${i}`},L,{required:x,getComponent:u,specPath:j.push(\"properties\",s),getConfigs:_,schema:i,depth:w+1}))))})).toArray():null,0===ee.size?null:Re.createElement(Re.Fragment,null,Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\" \")),Re.createElement($e,{extensions:ee,propClass:\"extension\"})),ce&&ce.size?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"< * >:\"),Re.createElement(\"td\",null,Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"additionalProperties\"),getConfigs:_,schema:ce,depth:w+1})))):null,We?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"allOf ->\"),Re.createElement(\"td\",null,We.map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"allOf\",o),getConfigs:_,schema:s,depth:w+1}))))))):null,He?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"anyOf ->\"),Re.createElement(\"td\",null,He.map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"anyOf\",o),getConfigs:_,schema:s,depth:w+1}))))))):null,Ye?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"oneOf ->\"),Re.createElement(\"td\",null,Ye.map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"oneOf\",o),getConfigs:_,schema:s,depth:w+1}))))))):null,Xe?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"not ->\"),Re.createElement(\"td\",null,Re.createElement(\"div\",null,Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"not\"),getConfigs:_,schema:Xe,depth:w+1}))))):null))),Re.createElement(\"span\",{className:\"brace-close\"},\"}\")),de.size?de.entrySeq().map((([s,o])=>Re.createElement(Pe,{key:`${s}-${o}`,propKey:s,propVal:o,propClass:\"property\"}))):null)}}class ArrayModel extends Re.Component{render(){let{getComponent:s,getConfigs:o,schema:i,depth:a,expandDepth:u,name:_,displayName:w,specPath:x}=this.props,C=i.get(\"description\"),j=i.get(\"items\"),L=i.get(\"title\")||w||_,B=i.filter(((s,o)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(o))),$=i.getIn([\"externalDocs\",\"url\"]),V=i.getIn([\"externalDocs\",\"description\"]);const U=s(\"Markdown\",!0),z=s(\"ModelCollapse\"),Y=s(\"Model\"),Z=s(\"Property\"),ee=s(\"Link\"),ie=L&&Re.createElement(\"span\",{className:\"model-title\"},Re.createElement(\"span\",{className:\"model-title__text\"},L));return Re.createElement(\"span\",{className:\"model\"},Re.createElement(z,{title:ie,expanded:a<=u,collapsedContent:\"[...]\"},\"[\",B.size?B.entrySeq().map((([s,o])=>Re.createElement(Z,{key:`${s}-${o}`,propKey:s,propVal:o,propClass:\"property\"}))):null,C?Re.createElement(U,{source:C}):B.size?Re.createElement(\"div\",{className:\"markdown\"}):null,$&&Re.createElement(\"div\",{className:\"external-docs\"},Re.createElement(ee,{target:\"_blank\",href:sanitizeUrl($)},V||$)),Re.createElement(\"span\",null,Re.createElement(Y,Mn()({},this.props,{getConfigs:o,specPath:x.push(\"items\"),name:null,schema:j,required:!1,depth:a+1}))),\"]\"))}}const ts=\"property primitive\";class Primitive extends Re.Component{render(){let{schema:s,getComponent:o,getConfigs:i,name:a,displayName:u,depth:_,expandDepth:w}=this.props;const{showExtensions:x}=i();if(!s||!s.get)return Re.createElement(\"div\",null);let C=s.get(\"type\"),j=s.get(\"format\"),L=s.get(\"xml\"),B=s.get(\"enum\"),$=s.get(\"title\")||u||a,V=s.get(\"description\");const U=getExtensions(s);let z=s.filter(((s,o)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(o))).filterNot(((s,o)=>U.has(o))),Y=s.getIn([\"externalDocs\",\"url\"]),Z=s.getIn([\"externalDocs\",\"description\"]);const ee=o(\"Markdown\",!0),ie=o(\"EnumModel\"),ae=o(\"Property\"),ce=o(\"ModelCollapse\"),le=o(\"Link\"),pe=o(\"ModelExtensions\"),de=$&&Re.createElement(\"span\",{className:\"model-title\"},Re.createElement(\"span\",{className:\"model-title__text\"},$));return Re.createElement(\"span\",{className:\"model\"},Re.createElement(ce,{title:de,expanded:_<=w,collapsedContent:\"[...]\"},Re.createElement(\"span\",{className:\"prop\"},a&&_>1&&Re.createElement(\"span\",{className:\"prop-name\"},$),Re.createElement(\"span\",{className:\"prop-type\"},C),j&&Re.createElement(\"span\",{className:\"prop-format\"},\"($\",j,\")\"),z.size?z.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,propKey:s,propVal:o,propClass:ts}))):null,x&&U.size>0?Re.createElement(pe,{extensions:U,propClass:`${ts} extension`}):null,V?Re.createElement(ee,{source:V}):null,Y&&Re.createElement(\"div\",{className:\"external-docs\"},Re.createElement(le,{target:\"_blank\",href:sanitizeUrl(Y)},Z||Y)),L&&L.size?Re.createElement(\"span\",null,Re.createElement(\"br\",null),Re.createElement(\"span\",{className:ts},\"xml:\"),L.entrySeq().map((([s,o])=>Re.createElement(\"span\",{key:`${s}-${o}`,className:ts},Re.createElement(\"br\",null),\"   \",s,\": \",String(o)))).toArray()):null,B&&Re.createElement(ie,{value:B,getComponent:o}))))}}class Schemes extends Re.Component{UNSAFE_componentWillMount(){let{schemes:s}=this.props;this.setScheme(s.first())}UNSAFE_componentWillReceiveProps(s){this.props.currentScheme&&s.schemes.includes(this.props.currentScheme)||this.setScheme(s.schemes.first())}onChange=s=>{this.setScheme(s.target.value)};setScheme=s=>{let{path:o,method:i,specActions:a}=this.props;a.setScheme(s,o,i)};render(){let{schemes:s,currentScheme:o}=this.props;return Re.createElement(\"label\",{htmlFor:\"schemes\"},Re.createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),Re.createElement(\"select\",{onChange:this.onChange,value:o,id:\"schemes\"},s.valueSeq().map((s=>Re.createElement(\"option\",{value:s,key:s},s))).toArray()))}}class SchemesContainer extends Re.Component{render(){const{specActions:s,specSelectors:o,getComponent:i}=this.props,a=o.operationScheme(),u=o.schemes(),_=i(\"schemes\");return u&&u.size?Re.createElement(_,{currentScheme:a,schemes:u,specActions:s}):null}}var rs=__webpack_require__(24677),ns=__webpack_require__.n(rs);const ss={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,ze.List)()};class JsonSchemaForm extends Re.Component{static defaultProps=ss;componentDidMount(){const{dispatchInitialValue:s,value:o,onChange:i}=this.props;s?i(o):!1===s&&i(\"\")}render(){let{schema:s,errors:o,value:i,onChange:a,getComponent:u,fn:_,disabled:w}=this.props;const x=s&&s.get?s.get(\"format\"):null,C=s&&s.get?s.get(\"type\"):null,j=_.getSchemaObjectType(s),L=_.isFileUploadIntended(s);let getComponentSilently=s=>u(s,!1,{failSilently:!0}),B=C?getComponentSilently(x?`JsonSchema_${C}_${x}`:`JsonSchema_${C}`):u(\"JsonSchema_string\");return L||!ze.List.isList(C)||\"array\"!==j&&\"object\"!==j||(B=u(\"JsonSchema_object\")),B||(B=u(\"JsonSchema_string\")),Re.createElement(B,Mn()({},this.props,{errors:o,fn:_,getComponent:u,value:i,onChange:a,schema:s,disabled:w}))}}class JsonSchema_string extends Re.Component{static defaultProps=ss;onChange=s=>{const o=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?s.target.files[0]:s.target.value;this.props.onChange(o,this.props.keyName)};onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:o,schema:i,errors:a,required:u,description:_,disabled:w}=this.props;const x=i&&i.get?i.get(\"enum\"):null,C=i&&i.get?i.get(\"format\"):null,j=i&&i.get?i.get(\"type\"):null,L=i&&i.get?i.get(\"in\"):null;if(o?(isImmutable(o)||\"object\"==typeof o)&&(o=stringify(o)):o=\"\",a=a.toJS?a.toJS():[],x){const i=s(\"Select\");return Re.createElement(i,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",allowedValues:[...x],value:o,allowEmptyValue:!u,disabled:w,onChange:this.onEnumChange})}const B=w||L&&\"formData\"===L&&!(\"FormData\"in window),$=s(\"Input\");return j&&\"file\"===j?Re.createElement($,{type:\"file\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",onChange:this.onChange,disabled:B}):Re.createElement(ns(),{type:C&&\"password\"===C?\"password\":\"text\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",value:o,minLength:0,debounceTimeout:350,placeholder:_,onChange:this.onChange,disabled:B})}}class JsonSchema_array extends Re.PureComponent{static defaultProps=ss;constructor(s,o){super(s,o),this.state={value:valueOrEmptyList(s.value),schema:s.schema}}UNSAFE_componentWillReceiveProps(s){const o=valueOrEmptyList(s.value);o!==this.state.value&&this.setState({value:o}),s.schema!==this.state.schema&&this.setState({schema:s.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(s,o)=>{this.setState((({value:i})=>({value:i.set(o,s)})),this.onChange)};removeItem=s=>{this.setState((({value:o})=>({value:o.delete(s)})),this.onChange)};addItem=()=>{const{fn:s}=this.props;let o=valueOrEmptyList(this.state.value);this.setState((()=>({value:o.push(s.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=s=>{this.setState((()=>({value:s})),this.onChange)};render(){let{getComponent:s,required:o,schema:i,errors:a,fn:u,disabled:_}=this.props;a=a.toJS?a.toJS():Array.isArray(a)?a:[];const w=a.filter((s=>\"string\"==typeof s)),x=a.filter((s=>void 0!==s.needRemove)).map((s=>s.error)),C=this.state.value,j=!!(C&&C.count&&C.count()>0),L=i.getIn([\"items\",\"enum\"]),B=i.get(\"items\"),$=u.getSchemaObjectType(B),V=u.getSchemaObjectTypeLabel(B),U=i.getIn([\"items\",\"format\"]),z=i.get(\"items\");let Y,Z=!1,ee=\"file\"===$||\"string\"===$&&\"binary\"===U;if($&&U?Y=s(`JsonSchema_${$}_${U}`):\"boolean\"!==$&&\"array\"!==$&&\"object\"!==$||(Y=s(`JsonSchema_${$}`)),!ze.List.isList(B?.get(\"type\"))||\"array\"!==$&&\"object\"!==$||(Y=s(\"JsonSchema_object\")),Y||ee||(Z=!0),L){const i=s(\"Select\");return Re.createElement(i,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",multiple:!0,value:C,disabled:_,allowedValues:L,allowEmptyValue:!o,onChange:this.onEnumChange})}const ie=s(\"Button\");return Re.createElement(\"div\",{className:\"json-schema-array\"},j?C.map(((o,i)=>{const w=(0,ze.fromJS)([...a.filter((s=>s.index===i)).map((s=>s.error))]);return Re.createElement(\"div\",{key:i,className:\"json-schema-form-item\"},ee?Re.createElement(JsonSchemaArrayItemFile,{value:o,onChange:s=>this.onItemChange(s,i),disabled:_,errors:w,getComponent:s}):Z?Re.createElement(JsonSchemaArrayItemText,{value:o,onChange:s=>this.onItemChange(s,i),disabled:_,errors:w}):Re.createElement(Y,Mn()({},this.props,{value:o,onChange:s=>this.onItemChange(s,i),disabled:_,errors:w,schema:z,getComponent:s,fn:u})),_?null:Re.createElement(ie,{className:`btn btn-sm json-schema-form-item-remove ${x.length?\"invalid\":null}`,title:x.length?x:\"\",onClick:()=>this.removeItem(i)},\" - \"))})):null,_?null:Re.createElement(ie,{className:`btn btn-sm json-schema-form-item-add ${w.length?\"invalid\":null}`,title:w.length?w:\"\",onClick:this.addItem},\"Add \",V,\" item\"))}}class JsonSchemaArrayItemText extends Re.Component{static defaultProps=ss;onChange=s=>{const o=s.target.value;this.props.onChange(o,this.props.keyName)};render(){let{value:s,errors:o,description:i,disabled:a}=this.props;return s?(isImmutable(s)||\"object\"==typeof s)&&(s=stringify(s)):s=\"\",o=o.toJS?o.toJS():[],Re.createElement(ns(),{type:\"text\",className:o.length?\"invalid\":\"\",title:o.length?o:\"\",value:s,minLength:0,debounceTimeout:350,placeholder:i,onChange:this.onChange,disabled:a})}}class JsonSchemaArrayItemFile extends Re.Component{static defaultProps=ss;onFileChange=s=>{const o=s.target.files[0];this.props.onChange(o,this.props.keyName)};render(){let{getComponent:s,errors:o,disabled:i}=this.props;const a=s(\"Input\"),u=i||!(\"FormData\"in window);return Re.createElement(a,{type:\"file\",className:o.length?\"invalid\":\"\",title:o.length?o:\"\",onChange:this.onFileChange,disabled:u})}}class JsonSchema_boolean extends Re.Component{static defaultProps=ss;onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:o,errors:i,schema:a,required:u,disabled:_}=this.props;i=i.toJS?i.toJS():[];let w=a&&a.get?a.get(\"enum\"):null,x=!w||!u,C=!w&&[\"true\",\"false\"];const j=s(\"Select\");return Re.createElement(j,{className:i.length?\"invalid\":\"\",title:i.length?i:\"\",value:String(o),disabled:_,allowedValues:w?[...w]:C,allowEmptyValue:x,onChange:this.onEnumChange})}}const stringifyObjectErrors=s=>s.map((s=>{const o=void 0!==s.propKey?s.propKey:s.index;let i=\"string\"==typeof s?s:\"string\"==typeof s.error?s.error:null;if(!o&&i)return i;let a=s.error,u=`/${s.propKey}`;for(;\"object\"==typeof a;){const s=void 0!==a.propKey?a.propKey:a.index;if(void 0===s)break;if(u+=`/${s}`,!a.error)break;a=a.error}return`${u}: ${a}`}));class JsonSchema_object extends Re.PureComponent{constructor(){super()}static defaultProps=ss;onChange=s=>{this.props.onChange(s)};handleOnChange=s=>{const o=s.target.value;this.onChange(o)};render(){let{getComponent:s,value:o,errors:i,disabled:a}=this.props;const u=s(\"TextArea\");return i=i.toJS?i.toJS():Array.isArray(i)?i:[],Re.createElement(\"div\",null,Re.createElement(u,{className:Jn()({invalid:i.length}),title:i.length?stringifyObjectErrors(i).join(\", \"):\"\",value:stringify(o),disabled:a,onChange:this.handleOnChange}))}}function valueOrEmptyList(s){return ze.List.isList(s)?s:Array.isArray(s)?(0,ze.fromJS)(s):(0,ze.List)()}const ModelExtensions=({extensions:s,propClass:o=\"\"})=>s.entrySeq().map((([s,i])=>{const a=immutableToJS(i)??null;return Re.createElement(\"tr\",{key:s,className:o},Re.createElement(\"td\",null,s),Re.createElement(\"td\",null,JSON.stringify(a)))})).toArray();var os=__webpack_require__(11331),as=__webpack_require__.n(os);const hasSchemaType=(s,o)=>{const i=ze.Map.isMap(s);if(!i&&!as()(s))return!1;const a=i?s.get(\"type\"):s.type;return o===a||Array.isArray(o)&&o.includes(a)},getType=(s,o=new WeakSet)=>{if(null==s)return\"any\";if(o.has(s))return\"any\";o.add(s);const{type:i,items:a}=s;return Object.hasOwn(s,\"items\")?(()=>{if(a)return`array<${getType(a,o)}>`;return\"array<any>\"})():i},getSchemaObjectTypeLabel=s=>getType(immutableToJS(s)),json_schema_5=()=>({components:{modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,ModelExtensions,schemes:Schemes,SchemesContainer,...V},fn:{hasSchemaType,getSchemaObjectTypeLabel}});var cs=__webpack_require__(19123),ls=__webpack_require__.n(cs),us=__webpack_require__(41859),ps=__webpack_require__.n(us),hs=__webpack_require__(62193),ds=__webpack_require__.n(hs);const shallowArrayEquals=s=>o=>Array.isArray(s)&&Array.isArray(o)&&s.length===o.length&&s.every(((s,i)=>s===o[i])),list=(...s)=>s;class Cache extends Map{delete(s){const o=Array.from(this.keys()).find(shallowArrayEquals(s));return super.delete(o)}get(s){const o=Array.from(this.keys()).find(shallowArrayEquals(s));return super.get(o)}has(s){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(s))}}const utils_memoizeN=(s,o=list)=>{const{Cache:i}=pt();pt().Cache=Cache;const a=pt()(s,o);return pt().Cache=i,a},fs={string:s=>s.pattern?(s=>{try{const o=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,i=s.replace(o,\"100\"),a=new(ps())(i);return a.max=100,a.gen()}catch(s){return\"string\"}})(s.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_time:()=>(new Date).toISOString().substring(11),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:s=>\"boolean\"!=typeof s.default||s.default},primitive=s=>{s=objectify(s);let{type:o,format:i}=s,a=fs[`${o}_${i}`]||fs[o];return isFunc(a)?a(s):\"Unknown Type: \"+s.type},sanitizeRef=s=>deeplyStripKey(s,\"$$ref\",(s=>\"string\"==typeof s&&s.indexOf(\"#\")>-1)),ms=[\"maxProperties\",\"minProperties\"],gs=[\"minItems\",\"maxItems\"],ys=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],vs=[\"minLength\",\"maxLength\"],mergeJsonSchema=(s,o,i={})=>{const a={...s};if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...ms,...gs,...ys,...vs].forEach((s=>(s=>{void 0===a[s]&&void 0!==o[s]&&(a[s]=o[s])})(s))),void 0!==o.required&&Array.isArray(o.required)&&(void 0!==a.required&&a.required.length||(a.required=[]),o.required.forEach((s=>{a.required.includes(s)||a.required.push(s)}))),o.properties){a.properties||(a.properties={});let s=objectify(o.properties);for(let u in s)Object.prototype.hasOwnProperty.call(s,u)&&(s[u]&&s[u].deprecated||s[u]&&s[u].readOnly&&!i.includeReadOnly||s[u]&&s[u].writeOnly&&!i.includeWriteOnly||a.properties[u]||(a.properties[u]=s[u],!o.required&&Array.isArray(o.required)&&-1!==o.required.indexOf(u)&&(a.required?a.required.push(u):a.required=[u])))}return o.items&&(a.items||(a.items={}),a.items=mergeJsonSchema(a.items,o.items,i)),a},sampleFromSchemaGeneric=(s,o={},i=void 0,a=!1)=>{s&&isFunc(s.toJS)&&(s=s.toJS());let u=void 0!==i||s&&void 0!==s.example||s&&void 0!==s.default;const _=!u&&s&&s.oneOf&&s.oneOf.length>0,w=!u&&s&&s.anyOf&&s.anyOf.length>0;if(!u&&(_||w)){const i=objectify(_?s.oneOf[0]:s.anyOf[0]);if(!(s=mergeJsonSchema(s,i,o)).xml&&i.xml&&(s.xml=i.xml),void 0!==s.example&&void 0!==i.example)u=!0;else if(i.properties){s.properties||(s.properties={});let a=objectify(i.properties);for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&(a[u]&&a[u].deprecated||a[u]&&a[u].readOnly&&!o.includeReadOnly||a[u]&&a[u].writeOnly&&!o.includeWriteOnly||s.properties[u]||(s.properties[u]=a[u],!i.required&&Array.isArray(i.required)&&-1!==i.required.indexOf(u)&&(s.required?s.required.push(u):s.required=[u])))}}const x={};let{xml:C,type:j,example:L,properties:B,additionalProperties:$,items:V}=s||{},{includeReadOnly:U,includeWriteOnly:z}=o;C=C||{};let Y,{name:Z,prefix:ee,namespace:ie}=C,ae={};if(a&&(Z=Z||\"notagname\",Y=(ee?ee+\":\":\"\")+Z,ie)){x[ee?\"xmlns:\"+ee:\"xmlns\"]=ie}a&&(ae[Y]=[]);const schemaHasAny=o=>o.some((o=>Object.prototype.hasOwnProperty.call(s,o)));s&&!j&&(B||$||schemaHasAny(ms)?j=\"object\":V||schemaHasAny(gs)?j=\"array\":schemaHasAny(ys)?(j=\"number\",s.type=\"number\"):u||s.enum||(j=\"string\",s.type=\"string\"));const handleMinMaxItems=o=>{if(null!=s?.maxItems&&(o=o.slice(0,s?.maxItems)),null!=s?.minItems){let i=0;for(;o.length<s?.minItems;)o.push(o[i++%o.length])}return o},ce=objectify(B);let le,pe=0;const hasExceededMaxProperties=()=>s&&null!==s.maxProperties&&void 0!==s.maxProperties&&pe>=s.maxProperties,canAddProperty=o=>!s||null===s.maxProperties||void 0===s.maxProperties||!hasExceededMaxProperties()&&(!(o=>!(s&&s.required&&s.required.length&&s.required.includes(o)))(o)||s.maxProperties-pe-(()=>{if(!s||!s.required)return 0;let o=0;return a?s.required.forEach((s=>o+=void 0===ae[s]?0:1)):s.required.forEach((s=>o+=void 0===ae[Y]?.find((o=>void 0!==o[s]))?0:1)),s.required.length-o})()>0);if(le=a?(i,u=void 0)=>{if(s&&ce[i]){if(ce[i].xml=ce[i].xml||{},ce[i].xml.attribute){const s=Array.isArray(ce[i].enum)?ce[i].enum[0]:void 0,o=ce[i].example,a=ce[i].default;return void(x[ce[i].xml.name||i]=void 0!==o?o:void 0!==a?a:void 0!==s?s:primitive(ce[i]))}ce[i].xml.name=ce[i].xml.name||i}else ce[i]||!1===$||(ce[i]={xml:{name:i}});let _=sampleFromSchemaGeneric(s&&ce[i]||void 0,o,u,a);canAddProperty(i)&&(pe++,Array.isArray(_)?ae[Y]=ae[Y].concat(_):ae[Y].push(_))}:(i,u)=>{if(canAddProperty(i)){if(Object.prototype.hasOwnProperty.call(s,\"discriminator\")&&s.discriminator&&Object.prototype.hasOwnProperty.call(s.discriminator,\"mapping\")&&s.discriminator.mapping&&Object.prototype.hasOwnProperty.call(s,\"$$ref\")&&s.$$ref&&s.discriminator.propertyName===i){for(let o in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[o])){ae[i]=o;break}}else ae[i]=sampleFromSchemaGeneric(ce[i],o,u,a);pe++}},u){let u;if(u=sanitizeRef(void 0!==i?i:void 0!==L?L:s.default),!a){if(\"number\"==typeof u&&\"string\"===j)return`${u}`;if(\"string\"!=typeof u||\"string\"===j)return u;try{return JSON.parse(u)}catch(s){return u}}if(s||(j=Array.isArray(u)?\"array\":typeof u),\"array\"===j){if(!Array.isArray(u)){if(\"string\"==typeof u)return u;u=[u]}const i=s?s.items:void 0;i&&(i.xml=i.xml||C||{},i.xml.name=i.xml.name||C.name);let _=u.map((s=>sampleFromSchemaGeneric(i,o,s,a)));return _=handleMinMaxItems(_),C.wrapped?(ae[Y]=_,ds()(x)||ae[Y].push({_attr:x})):ae=_,ae}if(\"object\"===j){if(\"string\"==typeof u)return u;for(let o in u)Object.prototype.hasOwnProperty.call(u,o)&&(s&&ce[o]&&ce[o].readOnly&&!U||s&&ce[o]&&ce[o].writeOnly&&!z||(s&&ce[o]&&ce[o].xml&&ce[o].xml.attribute?x[ce[o].xml.name||o]=u[o]:le(o,u[o])));return ds()(x)||ae[Y].push({_attr:x}),ae}return ae[Y]=ds()(x)?u:[{_attr:x},u],ae}if(\"object\"===j){for(let s in ce)Object.prototype.hasOwnProperty.call(ce,s)&&(ce[s]&&ce[s].deprecated||ce[s]&&ce[s].readOnly&&!U||ce[s]&&ce[s].writeOnly&&!z||le(s));if(a&&x&&ae[Y].push({_attr:x}),hasExceededMaxProperties())return ae;if(!0===$)a?ae[Y].push({additionalProp:\"Anything can be here\"}):ae.additionalProp1={},pe++;else if($){const i=objectify($),u=sampleFromSchemaGeneric(i,o,void 0,a);if(a&&i.xml&&i.xml.name&&\"notagname\"!==i.xml.name)ae[Y].push(u);else{const o=null!==s.minProperties&&void 0!==s.minProperties&&pe<s.minProperties?s.minProperties-pe:3;for(let s=1;s<=o;s++){if(hasExceededMaxProperties())return ae;if(a){const o={};o[\"additionalProp\"+s]=u.notagname,ae[Y].push(o)}else ae[\"additionalProp\"+s]=u;pe++}}}return ae}if(\"array\"===j){if(!V)return;let i;if(a&&(V.xml=V.xml||s?.xml||{},V.xml.name=V.xml.name||C.name),Array.isArray(V.anyOf))i=V.anyOf.map((s=>sampleFromSchemaGeneric(mergeJsonSchema(s,V,o),o,void 0,a)));else if(Array.isArray(V.oneOf))i=V.oneOf.map((s=>sampleFromSchemaGeneric(mergeJsonSchema(s,V,o),o,void 0,a)));else{if(!(!a||a&&C.wrapped))return sampleFromSchemaGeneric(V,o,void 0,a);i=[sampleFromSchemaGeneric(V,o,void 0,a)]}return i=handleMinMaxItems(i),a&&C.wrapped?(ae[Y]=i,ds()(x)||ae[Y].push({_attr:x}),ae):i}let de;if(s&&Array.isArray(s.enum))de=normalizeArray(s.enum)[0];else{if(!s)return;if(de=primitive(s),\"number\"==typeof de){let o=s.minimum;null!=o&&(s.exclusiveMinimum&&o++,de=o);let i=s.maximum;null!=i&&(s.exclusiveMaximum&&i--,de=i)}if(\"string\"==typeof de&&(null!==s.maxLength&&void 0!==s.maxLength&&(de=de.slice(0,s.maxLength)),null!==s.minLength&&void 0!==s.minLength)){let o=0;for(;de.length<s.minLength;)de+=de[o++%de.length]}}if(\"file\"!==j)return a?(ae[Y]=ds()(x)?de:[{_attr:x},de],ae):de},inferSchema=s=>(s.schema&&(s=s.schema),s.properties&&(s.type=\"object\"),s),createXMLExample=(s,o,i)=>{const a=sampleFromSchemaGeneric(s,o,i,!0);if(a)return\"string\"==typeof a?a:ls()(a,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(s,o,i)=>sampleFromSchemaGeneric(s,o,i,!1),resolver=(s,o,i)=>[s,JSON.stringify(o),JSON.stringify(i)],bs=utils_memoizeN(createXMLExample,resolver),_s=utils_memoizeN(sampleFromSchema,resolver),getSchemaObjectType=s=>immutableToJS(s)?.type??\"string\",Ss=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Es=[\"object\"],get_json_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.memoizedSampleFromSchema(o,i,u),x=typeof w,C=Ss.reduce(((s,o)=>o.when.test(a)?[...s,...o.shouldStringifyTypes]:s),Es);return gt()(C,(s=>s===x))?JSON.stringify(w,null,2):w},get_yaml_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.getJsonSampleSchema(o,i,a,u);let x;try{x=fn.dump(fn.load(w),{lineWidth:-1},{schema:rn}),\"\\n\"===x[x.length-1]&&(x=x.slice(0,x.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return x.replace(/\\t/g,\"  \")},get_xml_sample_schema=s=>(o,i,a)=>{const{fn:u}=s();if(o&&!o.xml&&(o.xml={}),o&&!o.xml.name){if(!o.$$ref&&(o.type||o.items||o.properties||o.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(o.$$ref){let s=o.$$ref.match(/\\S*\\/(\\S+)$/);o.xml.name=s[1]}}return u.memoizedCreateXMLExample(o,i,a)},get_sample_schema=s=>(o,i=\"\",a={},u=void 0)=>{const{fn:_}=s();return\"function\"==typeof o?.toJS&&(o=o.toJS()),\"function\"==typeof u?.toJS&&(u=u.toJS()),/xml/.test(i)?_.getXmlSampleSchema(o,a,u):/(yaml|yml)/.test(i)?_.getYamlSampleSchema(o,a,i,u):_.getJsonSampleSchema(o,a,i,u)},json_schema_5_samples=({getSystem:s})=>{const o=get_json_sample_schema(s),i=get_yaml_sample_schema(s),a=get_xml_sample_schema(s),u=get_sample_schema(s);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:_s,memoizedCreateXMLExample:bs,getJsonSampleSchema:o,getYamlSampleSchema:i,getXmlSampleSchema:a,getSampleSchema:u,mergeJsonSchema},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:_s,memoizedCreateXMLExample:bs,getJsonSampleSchema:o,getYamlSampleSchema:i,getXmlSampleSchema:a,getSampleSchema:u,mergeJsonSchema,getSchemaObjectType}}};var ws=__webpack_require__(37334),xs=__webpack_require__.n(ws);const ks=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=s=>s||(0,ze.Map)(),Os=Vt(spec_selectors_state,(s=>s.get(\"lastError\"))),Cs=Vt(spec_selectors_state,(s=>s.get(\"url\"))),As=Vt(spec_selectors_state,(s=>s.get(\"spec\")||\"\")),js=Vt(spec_selectors_state,(s=>s.get(\"specSource\")||\"not-editor\")),Is=Vt(spec_selectors_state,(s=>s.get(\"json\",(0,ze.Map)()))),Ps=Vt(Is,(s=>s.toJS())),Ts=Vt(spec_selectors_state,(s=>s.get(\"resolved\",(0,ze.Map)()))),specResolvedSubtree=(s,o)=>s.getIn([\"resolvedSubtrees\",...o],void 0),mergerFn=(s,o)=>ze.Map.isMap(s)&&ze.Map.isMap(o)?o.get(\"$$ref\")?o:(0,ze.OrderedMap)().mergeWith(mergerFn,s,o):o,Ns=Vt(spec_selectors_state,(s=>(0,ze.OrderedMap)().mergeWith(mergerFn,s.get(\"json\"),s.get(\"resolvedSubtrees\")))),spec=s=>Is(s),Ms=Vt(spec,(()=>!1)),Rs=Vt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"info\")))),Ds=Vt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"externalDocs\")))),Ls=Vt(Rs,(s=>s&&s.get(\"version\"))),Fs=Vt(Ls,(s=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(s).slice(1))),Bs=Vt(Ns,(s=>s.get(\"paths\"))),$s=xs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),qs=Vt(Bs,(s=>{let o=(0,ze.List)();return!ze.Map.isMap(s)||s.isEmpty()||s.forEach(((s,i)=>{if(!s||!s.forEach)return{};s.forEach(((s,a)=>{ks.indexOf(a)<0||(o=o.push((0,ze.fromJS)({path:i,method:a,operation:s,id:`${a}-${i}`})))}))})),o})),Vs=Vt(spec,(s=>(0,ze.Set)(s.get(\"consumes\")))),Us=Vt(spec,(s=>(0,ze.Set)(s.get(\"produces\")))),zs=Vt(spec,(s=>s.get(\"security\",(0,ze.List)()))),Ws=Vt(spec,(s=>s.get(\"securityDefinitions\"))),findDefinition=(s,o)=>{const i=s.getIn([\"resolvedSubtrees\",\"definitions\",o],null),a=s.getIn([\"json\",\"definitions\",o],null);return i||a||null},Js=Vt(spec,(s=>{const o=s.get(\"definitions\");return ze.Map.isMap(o)?o:(0,ze.Map)()})),Hs=Vt(spec,(s=>s.get(\"basePath\"))),Ks=Vt(spec,(s=>s.get(\"host\"))),Gs=Vt(spec,(s=>s.get(\"schemes\",(0,ze.Map)()))),Ys=Vt([qs,Vs,Us],((s,o,i)=>s.map((s=>s.update(\"operation\",(s=>ze.Map.isMap(s)?s.withMutations((s=>(s.get(\"consumes\")||s.update(\"consumes\",(s=>(0,ze.Set)(s).merge(o))),s.get(\"produces\")||s.update(\"produces\",(s=>(0,ze.Set)(s).merge(i))),s))):(0,ze.Map)())))))),Xs=Vt(spec,(s=>{const o=s.get(\"tags\",(0,ze.List)());return ze.List.isList(o)?o.filter((s=>ze.Map.isMap(s))):(0,ze.List)()})),tagDetails=(s,o)=>(Xs(s)||(0,ze.List)()).filter(ze.Map.isMap).find((s=>s.get(\"name\")===o),(0,ze.Map)()),Qs=Vt(Ys,Xs,((s,o)=>s.reduce(((s,o)=>{let i=(0,ze.Set)(o.getIn([\"operation\",\"tags\"]));return i.count()<1?s.update(\"default\",(0,ze.List)(),(s=>s.push(o))):i.reduce(((s,i)=>s.update(i,(0,ze.List)(),(s=>s.push(o)))),s)}),o.reduce(((s,o)=>s.set(o.get(\"name\"),(0,ze.List)())),(0,ze.OrderedMap)())))),selectors_taggedOperations=s=>({getConfigs:o})=>{let{tagsSorter:i,operationsSorter:a}=o();return Qs(s).sortBy(((s,o)=>o),((s,o)=>{let a=\"function\"==typeof i?i:Pt.tagsSorter[i];return a?a(s,o):null})).map(((o,i)=>{let u=\"function\"==typeof a?a:Pt.operationsSorter[a],_=u?o.sort(u):o;return(0,ze.Map)({tagDetails:tagDetails(s,i),operations:_})}))},Zs=Vt(spec_selectors_state,(s=>s.get(\"responses\",(0,ze.Map)()))),eo=Vt(spec_selectors_state,(s=>s.get(\"requests\",(0,ze.Map)()))),to=Vt(spec_selectors_state,(s=>s.get(\"mutatedRequests\",(0,ze.Map)()))),responseFor=(s,o,i)=>Zs(s).getIn([o,i],null),requestFor=(s,o,i)=>eo(s).getIn([o,i],null),mutatedRequestFor=(s,o,i)=>to(s).getIn([o,i],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(s,o,i)=>{const a=Ns(s).getIn([\"paths\",...o,\"parameters\"],(0,ze.OrderedMap)()),u=s.getIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.OrderedMap)());return a.map((s=>{const o=u.get(`${i.get(\"in\")}.${i.get(\"name\")}`),a=u.get(`${i.get(\"in\")}.${i.get(\"name\")}.hash-${i.hashCode()}`);return(0,ze.OrderedMap)().merge(s,o,a)})).find((s=>s.get(\"in\")===i.get(\"in\")&&s.get(\"name\")===i.get(\"name\")),(0,ze.OrderedMap)())},parameterInclusionSettingFor=(s,o,i,a)=>{const u=`${a}.${i}`;return s.getIn([\"meta\",\"paths\",...o,\"parameter_inclusions\",u],!1)},parameterWithMeta=(s,o,i,a)=>{const u=Ns(s).getIn([\"paths\",...o,\"parameters\"],(0,ze.OrderedMap)()).find((s=>s.get(\"in\")===a&&s.get(\"name\")===i),(0,ze.OrderedMap)());return parameterWithMetaByIdentity(s,o,u)},operationWithMeta=(s,o,i)=>{const a=Ns(s).getIn([\"paths\",o,i],(0,ze.OrderedMap)()),u=s.getIn([\"meta\",\"paths\",o,i],(0,ze.OrderedMap)()),_=a.get(\"parameters\",(0,ze.List)()).map((a=>parameterWithMetaByIdentity(s,[o,i],a)));return(0,ze.OrderedMap)().merge(a,u).set(\"parameters\",_)};function getParameter(s,o,i,a){return o=o||[],s.getIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)([])).find((s=>ze.Map.isMap(s)&&s.get(\"name\")===i&&s.get(\"in\")===a))||(0,ze.Map)()}const ro=Vt(spec,(s=>{const o=s.get(\"host\");return\"string\"==typeof o&&o.length>0&&\"/\"!==o[0]}));function parameterValues(s,o,i){return o=o||[],operationWithMeta(s,...o).get(\"parameters\",(0,ze.List)()).reduce(((s,o)=>{let a=i&&\"body\"===o.get(\"in\")?o.get(\"value_xml\"):o.get(\"value\");return ze.List.isList(a)&&(a=a.filter((s=>\"\"!==s))),s.set(paramToIdentifier(o,{allowHashes:!1}),a)}),(0,ze.fromJS)({}))}function parametersIncludeIn(s,o=\"\"){if(ze.List.isList(s))return s.some((s=>ze.Map.isMap(s)&&s.get(\"in\")===o))}function parametersIncludeType(s,o=\"\"){if(ze.List.isList(s))return s.some((s=>ze.Map.isMap(s)&&s.get(\"type\")===o))}function contentTypeValues(s,o){o=o||[];let i=Ns(s).getIn([\"paths\",...o],(0,ze.fromJS)({})),a=s.getIn([\"meta\",\"paths\",...o],(0,ze.fromJS)({})),u=currentProducesFor(s,o);const _=i.get(\"parameters\")||new ze.List,w=a.get(\"consumes_value\")?a.get(\"consumes_value\"):parametersIncludeType(_,\"file\")?\"multipart/form-data\":parametersIncludeType(_,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,ze.fromJS)({requestContentType:w,responseContentType:u})}function currentProducesFor(s,o){o=o||[];const i=Ns(s).getIn([\"paths\",...o],null);if(null===i)return;const a=s.getIn([\"meta\",\"paths\",...o,\"produces_value\"],null),u=i.getIn([\"produces\",0],null);return a||u||\"application/json\"}function producesOptionsFor(s,o){o=o||[];const i=Ns(s),a=i.getIn([\"paths\",...o],null);if(null===a)return;const[u]=o,_=a.get(\"produces\",null),w=i.getIn([\"paths\",u,\"produces\"],null),x=i.getIn([\"produces\"],null);return _||w||x}function consumesOptionsFor(s,o){o=o||[];const i=Ns(s),a=i.getIn([\"paths\",...o],null);if(null===a)return;const[u]=o,_=a.get(\"consumes\",null),w=i.getIn([\"paths\",u,\"consumes\"],null),x=i.getIn([\"consumes\"],null);return _||w||x}const operationScheme=(s,o,i)=>{let a=s.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),u=Array.isArray(a)?a[1]:null;return s.getIn([\"scheme\",o,i])||s.getIn([\"scheme\",\"_defaultScheme\"])||u||\"\"},canExecuteScheme=(s,o,i)=>[\"http\",\"https\"].indexOf(operationScheme(s,o,i))>-1,validationErrors=(s,o)=>{o=o||[];const i=s.getIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)([])),a=[];if(0===i.length)return a;const getErrorsWithPaths=(s,o=[])=>{const getNestedErrorsWithPaths=(s,o)=>{const i=[...o,s.get(\"propKey\")||s.get(\"index\")];return ze.Map.isMap(s.get(\"error\"))?getErrorsWithPaths(s.get(\"error\"),i):{error:s.get(\"error\"),path:i}};return ze.List.isList(s)?s.map((s=>ze.Map.isMap(s)?getNestedErrorsWithPaths(s,o):{error:s,path:o})):getNestedErrorsWithPaths(s,o)};return i.forEach(((s,o)=>{const i=o.split(\".\").slice(1,-1).join(\".\"),u=s.get(\"errors\");if(u&&u.count()){getErrorsWithPaths(u).forEach((({error:s,path:o})=>{a.push(((s,o,i)=>`For '${i}'${(o=o.reduce(((s,o)=>\"number\"==typeof o?`${s}[${o}]`:s?`${s}.${o}`:o),\"\"))?` at path '${o}'`:\"\"}: ${s}.`)(s,o,i))}))}})),a},validateBeforeExecute=(s,o)=>0===validationErrors(s,o).length,getOAS3RequiredRequestBodyContentType=(s,o)=>{let i={requestBody:!1,requestContentType:{}},a=s.getIn([\"resolvedSubtrees\",\"paths\",...o,\"requestBody\"],(0,ze.fromJS)([]));return a.size<1||(a.getIn([\"required\"])&&(i.requestBody=a.getIn([\"required\"])),a.getIn([\"content\"]).entrySeq().forEach((s=>{const o=s[0];if(s[1].getIn([\"schema\",\"required\"])){const a=s[1].getIn([\"schema\",\"required\"]).toJS();i.requestContentType[o]=a}}))),i},isMediaTypeSchemaPropertiesEqual=(s,o,i,a)=>{if((i||a)&&i===a)return!0;let u=s.getIn([\"resolvedSubtrees\",\"paths\",...o,\"requestBody\",\"content\"],(0,ze.fromJS)([]));if(u.size<2||!i||!a)return!1;let _=u.getIn([i,\"schema\",\"properties\"],(0,ze.fromJS)([])),w=u.getIn([a,\"schema\",\"properties\"],(0,ze.fromJS)([]));return!!_.equals(w)};function returnSelfOrNewMap(s){return ze.Map.isMap(s)?s:new ze.Map}var no=__webpack_require__(85015),so=__webpack_require__.n(no),oo=__webpack_require__(38221),io=__webpack_require__.n(oo),ao=__webpack_require__(63560),co=__webpack_require__.n(ao),lo=__webpack_require__(56367),uo=__webpack_require__.n(lo);const po=\"spec_update_spec\",ho=\"spec_update_url\",fo=\"spec_update_json\",mo=\"spec_update_param\",go=\"spec_update_empty_param_inclusion\",yo=\"spec_validate_param\",vo=\"spec_set_response\",bo=\"spec_set_request\",_o=\"spec_set_mutated_request\",So=\"spec_log_request\",Eo=\"spec_clear_response\",wo=\"spec_clear_request\",xo=\"spec_clear_validate_param\",ko=\"spec_update_operation_meta_value\",Oo=\"spec_update_resolved\",Co=\"spec_update_resolved_subtree\",Ao=\"set_scheme\",toStr=s=>so()(s)?s:\"\";function updateSpec(s){const o=toStr(s).replace(/\\t/g,\"  \");if(\"string\"==typeof s)return{type:po,payload:o}}function updateResolved(s){return{type:Oo,payload:s}}function updateUrl(s){return{type:ho,payload:s}}function updateJsonSpec(s){return{type:fo,payload:s}}const parseToJson=s=>({specActions:o,specSelectors:i,errActions:a})=>{let{specStr:u}=i,_=null;try{s=s||u(),a.clear({source:\"parser\"}),_=fn.load(s,{schema:rn})}catch(s){return console.error(s),a.newSpecErr({source:\"parser\",level:\"error\",message:s.reason,line:s.mark&&s.mark.line?s.mark.line+1:void 0})}return _&&\"object\"==typeof _?o.updateJsonSpec(_):o.updateJsonSpec({})};let jo=!1;const resolveSpec=(s,o)=>({specActions:i,specSelectors:a,errActions:u,fn:{fetch:_,resolve:w,AST:x={}},getConfigs:C})=>{jo||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),jo=!0);const{modelPropertyMacro:j,parameterMacro:L,requestInterceptor:B,responseInterceptor:$}=C();void 0===s&&(s=a.specJson()),void 0===o&&(o=a.url());let V=x.getLineNumberForPath?x.getLineNumberForPath:()=>{},U=a.specStr();return w({fetch:_,spec:s,baseDoc:String(new URL(o,document.baseURI)),modelPropertyMacro:j,parameterMacro:L,requestInterceptor:B,responseInterceptor:$}).then((({spec:s,errors:o})=>{if(u.clear({type:\"thrown\"}),Array.isArray(o)&&o.length>0){let s=o.map((s=>(console.error(s),s.line=s.fullPath?V(U,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));u.newThrownErrBatch(s)}return i.updateResolved(s)}))};let Io=[];const Po=io()((()=>{const s=Io.reduce(((s,{path:o,system:i})=>(s.has(i)||s.set(i,[]),s.get(i).push(o),s)),new Map);Io=[],s.forEach((async(s,o)=>{if(!o)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!o.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:i,errSelectors:a,fn:{resolveSubtree:u,fetch:_,AST:w={}},specSelectors:x,specActions:C}=o,j=w.getLineNumberForPath??xs()(void 0),L=x.specStr(),{modelPropertyMacro:B,parameterMacro:$,requestInterceptor:V,responseInterceptor:U}=o.getConfigs();try{const o=await s.reduce((async(s,o)=>{let{resultMap:w,specWithCurrentSubtrees:C}=await s;const{errors:z,spec:Y}=await u(C,o,{baseDoc:String(new URL(x.url(),document.baseURI)),modelPropertyMacro:B,parameterMacro:$,requestInterceptor:V,responseInterceptor:U});if(a.allErrors().size&&i.clearBy((s=>\"thrown\"!==s.get(\"type\")||\"resolver\"!==s.get(\"source\")||!s.get(\"fullPath\")?.every(((s,i)=>s===o[i]||void 0===o[i])))),Array.isArray(z)&&z.length>0){let s=z.map((s=>(s.line=s.fullPath?j(L,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));i.newThrownErrBatch(s)}return Y&&x.isOAS3()&&\"components\"===o[0]&&\"securitySchemes\"===o[1]&&await Promise.all(Object.values(Y).filter((s=>\"openIdConnect\"===s?.type)).map((async s=>{const o={url:s.openIdConnectUrl,requestInterceptor:V,responseInterceptor:U};try{const i=await _(o);i instanceof Error||i.status>=400?console.error(i.statusText+\" \"+o.url):s.openIdConnectData=JSON.parse(i.text)}catch(s){console.error(s)}}))),co()(w,o,Y),C=uo()(o,Y,C),{resultMap:w,specWithCurrentSubtrees:C}}),Promise.resolve({resultMap:(x.specResolvedSubtree([])||(0,ze.Map)()).toJS(),specWithCurrentSubtrees:x.specJS()}));C.updateResolvedSubtree([],o.resultMap)}catch(s){console.error(s)}}))}),35),requestResolvedSubtree=s=>o=>{Io.find((({path:i,system:a})=>a===o&&i.toString()===s.toString()))||(Io.push({path:s,system:o}),Po())};function changeParam(s,o,i,a,u){return{type:mo,payload:{path:s,value:a,paramName:o,paramIn:i,isXml:u}}}function changeParamByIdentity(s,o,i,a){return{type:mo,payload:{path:s,param:o,value:i,isXml:a}}}const updateResolvedSubtree=(s,o)=>({type:Co,payload:{path:s,value:o}}),invalidateResolvedSubtreeCache=()=>({type:Co,payload:{path:[],value:(0,ze.Map)()}}),validateParams=(s,o)=>({type:yo,payload:{pathMethod:s,isOAS3:o}}),updateEmptyParamInclusion=(s,o,i,a)=>({type:go,payload:{pathMethod:s,paramName:o,paramIn:i,includeEmptyValue:a}});function clearValidateParams(s){return{type:xo,payload:{pathMethod:s}}}function changeConsumesValue(s,o){return{type:ko,payload:{path:s,value:o,key:\"consumes_value\"}}}function changeProducesValue(s,o){return{type:ko,payload:{path:s,value:o,key:\"produces_value\"}}}const setResponse=(s,o,i)=>({payload:{path:s,method:o,res:i},type:vo}),setRequest=(s,o,i)=>({payload:{path:s,method:o,req:i},type:bo}),setMutatedRequest=(s,o,i)=>({payload:{path:s,method:o,req:i},type:_o}),logRequest=s=>({payload:s,type:So}),executeRequest=s=>({fn:o,specActions:i,specSelectors:a,getConfigs:u,oas3Selectors:_})=>{let{pathName:w,method:x,operation:C}=s,{requestInterceptor:j,responseInterceptor:L}=u(),B=C.toJS();if(C&&C.get(\"parameters\")&&C.get(\"parameters\").filter((s=>s&&!0===s.get(\"allowEmptyValue\"))).forEach((o=>{if(a.parameterInclusionSettingFor([w,x],o.get(\"name\"),o.get(\"in\"))){s.parameters=s.parameters||{};const i=paramToValue(o,s.parameters);(!i||i&&0===i.size)&&(s.parameters[o.get(\"name\")]=\"\")}})),s.contextUrl=Nt()(a.url()).toString(),B&&B.operationId?s.operationId=B.operationId:B&&w&&x&&(s.operationId=o.opId(B,w,x)),a.isOAS3()){const o=`${w}:${x}`;s.server=_.selectedServer(o)||_.selectedServer();const i=_.serverVariables({server:s.server,namespace:o}).toJS(),a=_.serverVariables({server:s.server}).toJS();s.serverVariables=Object.keys(i).length?i:a,s.requestContentType=_.requestContentType(w,x),s.responseContentType=_.responseContentType(w,x)||\"*/*\";const u=_.requestBodyValue(w,x),C=_.requestBodyInclusionSetting(w,x);u&&u.toJS?s.requestBody=u.map((s=>ze.Map.isMap(s)?s.get(\"value\"):s)).filter(((s,o)=>(Array.isArray(s)?0!==s.length:!isEmptyValue(s))||C.get(o))).toJS():s.requestBody=u}let $=Object.assign({},s);$=o.buildRequest($),i.setRequest(s.pathName,s.method,$);s.requestInterceptor=async o=>{let a=await j.apply(void 0,[o]),u=Object.assign({},a);return i.setMutatedRequest(s.pathName,s.method,u),a},s.responseInterceptor=L;const V=Date.now();return o.execute(s).then((o=>{o.duration=Date.now()-V,i.setResponse(s.pathName,s.method,o)})).catch((o=>{\"Failed to fetch\"===o.message&&(o.name=\"\",o.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),i.setResponse(s.pathName,s.method,{error:!0,err:o})}))},actions_execute=({path:s,method:o,...i}={})=>a=>{let{fn:{fetch:u},specSelectors:_,specActions:w}=a,x=_.specJsonWithResolvedSubtrees().toJS(),C=_.operationScheme(s,o),{requestContentType:j,responseContentType:L}=_.contentTypeValues([s,o]).toJS(),B=/xml/i.test(j),$=_.parameterValues([s,o],B).toJS();return w.executeRequest({...i,fetch:u,spec:x,pathName:s,method:o,parameters:$,requestContentType:j,scheme:C,responseContentType:L})};function clearResponse(s,o){return{type:Eo,payload:{path:s,method:o}}}function clearRequest(s,o){return{type:wo,payload:{path:s,method:o}}}function setScheme(s,o,i){return{type:Ao,payload:{scheme:s,path:o,method:i}}}const To={[po]:(s,o)=>\"string\"==typeof o.payload?s.set(\"spec\",o.payload):s,[ho]:(s,o)=>s.set(\"url\",o.payload+\"\"),[fo]:(s,o)=>s.set(\"json\",fromJSOrdered(o.payload)),[Oo]:(s,o)=>s.setIn([\"resolved\"],fromJSOrdered(o.payload)),[Co]:(s,o)=>{const{value:i,path:a}=o.payload;return s.setIn([\"resolvedSubtrees\",...a],fromJSOrdered(i))},[mo]:(s,{payload:o})=>{let{path:i,paramName:a,paramIn:u,param:_,value:w,isXml:x}=o,C=_?paramToIdentifier(_):`${u}.${a}`;const j=x?\"value_xml\":\"value\";return s.setIn([\"meta\",\"paths\",...i,\"parameters\",C,j],(0,ze.fromJS)(w))},[go]:(s,{payload:o})=>{let{pathMethod:i,paramName:a,paramIn:u,includeEmptyValue:_}=o;if(!a||!u)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),s;const w=`${u}.${a}`;return s.setIn([\"meta\",\"paths\",...i,\"parameter_inclusions\",w],_)},[yo]:(s,{payload:{pathMethod:o,isOAS3:i}})=>{const a=Ns(s).getIn([\"paths\",...o]),u=parameterValues(s,o).toJS();return s.updateIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)({}),(_=>a.get(\"parameters\",(0,ze.List)()).reduce(((a,_)=>{const w=paramToValue(_,u),x=parameterInclusionSettingFor(s,o,_.get(\"name\"),_.get(\"in\")),C=((s,o,{isOAS3:i=!1,bypassRequiredCheck:a=!1}={})=>{let u=s.get(\"required\"),{schema:_,parameterContentMediaType:w}=getParameterSchema(s,{isOAS3:i});return validateValueBySchema(o,_,u,a,w)})(_,w,{bypassRequiredCheck:x,isOAS3:i});return a.setIn([paramToIdentifier(_),\"errors\"],(0,ze.fromJS)(C))}),_)))},[xo]:(s,{payload:{pathMethod:o}})=>s.updateIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)([]),(s=>s.map((s=>s.set(\"errors\",(0,ze.fromJS)([])))))),[vo]:(s,{payload:{res:o,path:i,method:a}})=>{let u;u=o.error?Object.assign({error:!0,name:o.err.name,message:o.err.message,statusCode:o.err.statusCode},o.err.response):o,u.headers=u.headers||{};let _=s.setIn([\"responses\",i,a],fromJSOrdered(u));return lt.Blob&&u.data instanceof lt.Blob&&(_=_.setIn([\"responses\",i,a,\"text\"],u.data)),_},[bo]:(s,{payload:{req:o,path:i,method:a}})=>s.setIn([\"requests\",i,a],fromJSOrdered(o)),[_o]:(s,{payload:{req:o,path:i,method:a}})=>s.setIn([\"mutatedRequests\",i,a],fromJSOrdered(o)),[ko]:(s,{payload:{path:o,value:i,key:a}})=>{let u=[\"paths\",...o],_=[\"meta\",\"paths\",...o];return s.getIn([\"json\",...u])||s.getIn([\"resolved\",...u])||s.getIn([\"resolvedSubtrees\",...u])?s.setIn([..._,a],(0,ze.fromJS)(i)):s},[Eo]:(s,{payload:{path:o,method:i}})=>s.deleteIn([\"responses\",o,i]),[wo]:(s,{payload:{path:o,method:i}})=>s.deleteIn([\"requests\",o,i]),[Ao]:(s,{payload:{scheme:o,path:i,method:a}})=>i&&a?s.setIn([\"scheme\",i,a],o):i||a?void 0:s.setIn([\"scheme\",\"_defaultScheme\"],o)},wrap_actions_updateSpec=(s,{specActions:o})=>(...i)=>{s(...i),o.parseToJson(...i)},wrap_actions_updateJsonSpec=(s,{specActions:o})=>(...i)=>{s(...i),o.invalidateResolvedSubtreeCache();const[a]=i,u=An()(a,[\"paths\"])||{};Object.keys(u).forEach((s=>{const i=An()(u,[s]);as()(i)&&i.$ref&&o.requestResolvedSubtree([\"paths\",s])})),o.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(s,{specActions:o})=>i=>(o.logRequest(i),s(i)),wrap_actions_validateParams=(s,{specSelectors:o})=>i=>s(i,o.isOAS3()),plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...Y},reducers:{...To},actions:{...z},selectors:{...U}}}});var No=function(){var extendStatics=function(s,o){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var i in o)o.hasOwnProperty(i)&&(s[i]=o[i])},extendStatics(s,o)};return function(s,o){function __(){this.constructor=s}extendStatics(s,o),s.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}}(),Mo=Object.prototype.hasOwnProperty;function module_helpers_hasOwnProperty(s,o){return Mo.call(s,o)}function _objectKeys(s){if(Array.isArray(s)){for(var o=new Array(s.length),i=0;i<o.length;i++)o[i]=\"\"+i;return o}if(Object.keys)return Object.keys(s);var a=[];for(var u in s)module_helpers_hasOwnProperty(s,u)&&a.push(u);return a}function _deepClone(s){switch(typeof s){case\"object\":return JSON.parse(JSON.stringify(s));case\"undefined\":return null;default:return s}}function helpers_isInteger(s){for(var o,i=0,a=s.length;i<a;){if(!((o=s.charCodeAt(i))>=48&&o<=57))return!1;i++}return!0}function escapePathComponent(s){return-1===s.indexOf(\"/\")&&-1===s.indexOf(\"~\")?s:s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")}function unescapePathComponent(s){return s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}function hasUndefined(s){if(void 0===s)return!0;if(s)if(Array.isArray(s)){for(var o=0,i=s.length;o<i;o++)if(hasUndefined(s[o]))return!0}else if(\"object\"==typeof s)for(var a=_objectKeys(s),u=a.length,_=0;_<u;_++)if(hasUndefined(s[a[_]]))return!0;return!1}function patchErrorMessageFormatter(s,o){var i=[s];for(var a in o){var u=\"object\"==typeof o[a]?JSON.stringify(o[a],null,2):o[a];void 0!==u&&i.push(a+\": \"+u)}return i.join(\"\\n\")}var Ro=function(s){function PatchError(o,i,a,u,_){var w=this.constructor,x=s.call(this,patchErrorMessageFormatter(o,{name:i,index:a,operation:u,tree:_}))||this;return x.name=i,x.index=a,x.operation=u,x.tree=_,Object.setPrototypeOf(x,w.prototype),x.message=patchErrorMessageFormatter(o,{name:i,index:a,operation:u,tree:_}),x}return No(PatchError,s),PatchError}(Error),Do=Ro,Lo=_deepClone,Fo={add:function(s,o,i){return s[o]=this.value,{newDocument:i}},remove:function(s,o,i){var a=s[o];return delete s[o],{newDocument:i,removed:a}},replace:function(s,o,i){var a=s[o];return s[o]=this.value,{newDocument:i,removed:a}},move:function(s,o,i){var a=getValueByPointer(i,this.path);a&&(a=_deepClone(a));var u=applyOperation(i,{op:\"remove\",path:this.from}).removed;return applyOperation(i,{op:\"add\",path:this.path,value:u}),{newDocument:i,removed:a}},copy:function(s,o,i){var a=getValueByPointer(i,this.from);return applyOperation(i,{op:\"add\",path:this.path,value:_deepClone(a)}),{newDocument:i}},test:function(s,o,i){return{newDocument:i,test:_areEquals(s[o],this.value)}},_get:function(s,o,i){return this.value=s[o],{newDocument:i}}},Bo={add:function(s,o,i){return helpers_isInteger(o)?s.splice(o,0,this.value):s[o]=this.value,{newDocument:i,index:o}},remove:function(s,o,i){return{newDocument:i,removed:s.splice(o,1)[0]}},replace:function(s,o,i){var a=s[o];return s[o]=this.value,{newDocument:i,removed:a}},move:Fo.move,copy:Fo.copy,test:Fo.test,_get:Fo._get};function getValueByPointer(s,o){if(\"\"==o)return s;var i={op:\"_get\",path:o};return applyOperation(s,i),i.value}function applyOperation(s,o,i,a,u,_){if(void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===u&&(u=!0),void 0===_&&(_=0),i&&(\"function\"==typeof i?i(o,0,s,o.path):validator(o,0)),\"\"===o.path){var w={newDocument:s};if(\"add\"===o.op)return w.newDocument=o.value,w;if(\"replace\"===o.op)return w.newDocument=o.value,w.removed=s,w;if(\"move\"===o.op||\"copy\"===o.op)return w.newDocument=getValueByPointer(s,o.from),\"move\"===o.op&&(w.removed=s),w;if(\"test\"===o.op){if(w.test=_areEquals(s,o.value),!1===w.test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",_,o,s);return w.newDocument=s,w}if(\"remove\"===o.op)return w.removed=s,w.newDocument=null,w;if(\"_get\"===o.op)return o.value=s,w;if(i)throw new Do(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",_,o,s);return w}a||(s=_deepClone(s));var x=(o.path||\"\").split(\"/\"),C=s,j=1,L=x.length,B=void 0,$=void 0,V=void 0;for(V=\"function\"==typeof i?i:validator;;){if(($=x[j])&&-1!=$.indexOf(\"~\")&&($=unescapePathComponent($)),u&&(\"__proto__\"==$||\"prototype\"==$&&j>0&&\"constructor\"==x[j-1]))throw new TypeError(\"JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README\");if(i&&void 0===B&&(void 0===C[$]?B=x.slice(0,j).join(\"/\"):j==L-1&&(B=o.path),void 0!==B&&V(o,0,s,B)),j++,Array.isArray(C)){if(\"-\"===$)$=C.length;else{if(i&&!helpers_isInteger($))throw new Do(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\",\"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\",_,o,s);helpers_isInteger($)&&($=~~$)}if(j>=L){if(i&&\"add\"===o.op&&$>C.length)throw new Do(\"The specified index MUST NOT be greater than the number of elements in the array\",\"OPERATION_VALUE_OUT_OF_BOUNDS\",_,o,s);if(!1===(w=Bo[o.op].call(o,C,$,s)).test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",_,o,s);return w}}else if(j>=L){if(!1===(w=Fo[o.op].call(o,C,$,s)).test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",_,o,s);return w}if(C=C[$],i&&j<L&&(!C||\"object\"!=typeof C))throw new Do(\"Cannot perform operation at the desired path\",\"OPERATION_PATH_UNRESOLVABLE\",_,o,s)}}function applyPatch(s,o,i,a,u){if(void 0===a&&(a=!0),void 0===u&&(u=!0),i&&!Array.isArray(o))throw new Do(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");a||(s=_deepClone(s));for(var _=new Array(o.length),w=0,x=o.length;w<x;w++)_[w]=applyOperation(s,o[w],i,!0,u,w),s=_[w].newDocument;return _.newDocument=s,_}function applyReducer(s,o,i){var a=applyOperation(s,o);if(!1===a.test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",i,o,s);return a.newDocument}function validator(s,o,i,a){if(\"object\"!=typeof s||null===s||Array.isArray(s))throw new Do(\"Operation is not an object\",\"OPERATION_NOT_AN_OBJECT\",o,s,i);if(!Fo[s.op])throw new Do(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",o,s,i);if(\"string\"!=typeof s.path)throw new Do(\"Operation `path` property is not a string\",\"OPERATION_PATH_INVALID\",o,s,i);if(0!==s.path.indexOf(\"/\")&&s.path.length>0)throw new Do('Operation `path` property must start with \"/\"',\"OPERATION_PATH_INVALID\",o,s,i);if((\"move\"===s.op||\"copy\"===s.op)&&\"string\"!=typeof s.from)throw new Do(\"Operation `from` property is not present (applicable in `move` and `copy` operations)\",\"OPERATION_FROM_REQUIRED\",o,s,i);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&void 0===s.value)throw new Do(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_REQUIRED\",o,s,i);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&hasUndefined(s.value))throw new Do(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED\",o,s,i);if(i)if(\"add\"==s.op){var u=s.path.split(\"/\").length,_=a.split(\"/\").length;if(u!==_+1&&u!==_)throw new Do(\"Cannot perform an `add` operation at the desired path\",\"OPERATION_PATH_CANNOT_ADD\",o,s,i)}else if(\"replace\"===s.op||\"remove\"===s.op||\"_get\"===s.op){if(s.path!==a)throw new Do(\"Cannot perform the operation at a path that does not exist\",\"OPERATION_PATH_UNRESOLVABLE\",o,s,i)}else if(\"move\"===s.op||\"copy\"===s.op){var w=validate([{op:\"_get\",path:s.from,value:void 0}],i);if(w&&\"OPERATION_PATH_UNRESOLVABLE\"===w.name)throw new Do(\"Cannot perform the operation from a path that does not exist\",\"OPERATION_FROM_UNRESOLVABLE\",o,s,i)}}function validate(s,o,i){try{if(!Array.isArray(s))throw new Do(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");if(o)applyPatch(_deepClone(o),_deepClone(s),i||!0);else{i=i||validator;for(var a=0;a<s.length;a++)i(s[a],a,o,void 0)}}catch(s){if(s instanceof Do)return s;throw s}}function _areEquals(s,o){if(s===o)return!0;if(s&&o&&\"object\"==typeof s&&\"object\"==typeof o){var i,a,u,_=Array.isArray(s),w=Array.isArray(o);if(_&&w){if((a=s.length)!=o.length)return!1;for(i=a;0!=i--;)if(!_areEquals(s[i],o[i]))return!1;return!0}if(_!=w)return!1;var x=Object.keys(s);if((a=x.length)!==Object.keys(o).length)return!1;for(i=a;0!=i--;)if(!o.hasOwnProperty(x[i]))return!1;for(i=a;0!=i--;)if(!_areEquals(s[u=x[i]],o[u]))return!1;return!0}return s!=s&&o!=o}var $o=new WeakMap,qo=function qo(s){this.observers=new Map,this.obj=s},Vo=function Vo(s,o){this.callback=s,this.observer=o};function unobserve(s,o){o.unobserve()}function observe(s,o){var i,a=function getMirror(s){return $o.get(s)}(s);if(a){var u=function getObserverFromMirror(s,o){return s.observers.get(o)}(a,o);i=u&&u.observer}else a=new qo(s),$o.set(s,a);if(i)return i;if(i={},a.value=_deepClone(s),o){i.callback=o,i.next=null;var dirtyCheck=function(){generate(i)},fastCheck=function(){clearTimeout(i.next),i.next=setTimeout(dirtyCheck)};\"undefined\"!=typeof window&&(window.addEventListener(\"mouseup\",fastCheck),window.addEventListener(\"keyup\",fastCheck),window.addEventListener(\"mousedown\",fastCheck),window.addEventListener(\"keydown\",fastCheck),window.addEventListener(\"change\",fastCheck))}return i.patches=[],i.object=s,i.unobserve=function(){generate(i),clearTimeout(i.next),function removeObserverFromMirror(s,o){s.observers.delete(o.callback)}(a,i),\"undefined\"!=typeof window&&(window.removeEventListener(\"mouseup\",fastCheck),window.removeEventListener(\"keyup\",fastCheck),window.removeEventListener(\"mousedown\",fastCheck),window.removeEventListener(\"keydown\",fastCheck),window.removeEventListener(\"change\",fastCheck))},a.observers.set(o,new Vo(o,i)),i}function generate(s,o){void 0===o&&(o=!1);var i=$o.get(s.object);_generate(i.value,s.object,s.patches,\"\",o),s.patches.length&&applyPatch(i.value,s.patches);var a=s.patches;return a.length>0&&(s.patches=[],s.callback&&s.callback(a)),a}function _generate(s,o,i,a,u){if(o!==s){\"function\"==typeof o.toJSON&&(o=o.toJSON());for(var _=_objectKeys(o),w=_objectKeys(s),x=!1,C=w.length-1;C>=0;C--){var j=s[B=w[C]];if(!module_helpers_hasOwnProperty(o,B)||void 0===o[B]&&void 0!==j&&!1===Array.isArray(o))Array.isArray(s)===Array.isArray(o)?(u&&i.push({op:\"test\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(j)}),i.push({op:\"remove\",path:a+\"/\"+escapePathComponent(B)}),x=!0):(u&&i.push({op:\"test\",path:a,value:s}),i.push({op:\"replace\",path:a,value:o}),!0);else{var L=o[B];\"object\"==typeof j&&null!=j&&\"object\"==typeof L&&null!=L&&Array.isArray(j)===Array.isArray(L)?_generate(j,L,i,a+\"/\"+escapePathComponent(B),u):j!==L&&(u&&i.push({op:\"test\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(j)}),i.push({op:\"replace\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(L)}))}}if(x||_.length!=w.length)for(C=0;C<_.length;C++){var B;module_helpers_hasOwnProperty(s,B=_[C])||void 0===o[B]||i.push({op:\"add\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(o[B])})}}}function compare(s,o,i){void 0===i&&(i=!1);var a=[];return _generate(s,o,a,\"\",i),a}Object.assign({},Z,ee,{JsonPatchError:Ro,deepClone:_deepClone,escapePathComponent,unescapePathComponent});var Uo=__webpack_require__(14744),zo=__webpack_require__.n(Uo);const Wo={add:function add(s,o){return{op:\"add\",path:s,value:o}},replace,remove:function remove(s){return{op:\"remove\",path:s}},merge:function lib_merge(s,o){return{type:\"mutation\",op:\"merge\",path:s,value:o}},mergeDeep:function mergeDeep(s,o){return{type:\"mutation\",op:\"mergeDeep\",path:s,value:o}},context:function context(s,o){return{type:\"context\",path:s,value:o}},getIn:function lib_getIn(s,o){return o.reduce(((s,o)=>void 0!==o&&s?s[o]:s),s)},applyPatch:function lib_applyPatch(s,o,i){if(i=i||{},\"merge\"===(o={...o,path:o.path&&normalizeJSONPath(o.path)}).op){const i=getInByJsonPath(s,o.path);Object.assign(i,o.value),applyPatch(s,[replace(o.path,i)])}else if(\"mergeDeep\"===o.op){const i=getInByJsonPath(s,o.path),a=zo()(i,o.value,{customMerge:s=>{if(\"enum\"===s)return(s,o)=>Array.isArray(s)&&Array.isArray(o)?[...new Set([...s,...o])]:zo()(s,o)}});s=applyPatch(s,[replace(o.path,a)]).newDocument}else if(\"add\"===o.op&&\"\"===o.path&&lib_isObject(o.value)){applyPatch(s,Object.keys(o.value).reduce(((s,i)=>(s.push({op:\"add\",path:`/${normalizeJSONPath(i)}`,value:o.value[i]}),s)),[]))}else if(\"replace\"===o.op&&\"\"===o.path){let{value:a}=o;i.allowMetaPatches&&o.meta&&isAdditiveMutation(o)&&(Array.isArray(o.value)||lib_isObject(o.value))&&(a={...a,...o.meta}),s=a}else if(applyPatch(s,[o]),i.allowMetaPatches&&o.meta&&isAdditiveMutation(o)&&(Array.isArray(o.value)||lib_isObject(o.value))){const i={...getInByJsonPath(s,o.path),...o.meta};applyPatch(s,[replace(o.path,i)])}return s},parentPathMatch:function parentPathMatch(s,o){if(!Array.isArray(o))return!1;for(let i=0,a=o.length;i<a;i+=1)if(o[i]!==s[i])return!1;return!0},flatten,fullyNormalizeArray:function fullyNormalizeArray(s){return cleanArray(flatten(lib_normalizeArray(s)))},normalizeArray:lib_normalizeArray,isPromise:function isPromise(s){return lib_isObject(s)&&lib_isFunction(s.then)},forEachNew:function forEachNew(s,o){try{return forEachNewPatch(s,forEach,o)}catch(s){return s}},forEachNewPrimitive:function forEachNewPrimitive(s,o){try{return forEachNewPatch(s,forEachPrimitive,o)}catch(s){return s}},isJsonPatch,isContextPatch:function isContextPatch(s){return isPatch(s)&&\"context\"===s.type},isPatch,isMutation,isAdditiveMutation,isGenerator:function isGenerator(s){return\"[object GeneratorFunction]\"===Object.prototype.toString.call(s)},isFunction:lib_isFunction,isObject:lib_isObject,isError:function lib_isError(s){return s instanceof Error}};function normalizeJSONPath(s){return Array.isArray(s)?s.length<1?\"\":`/${s.map((s=>(s+\"\").replace(/~/g,\"~0\").replace(/\\//g,\"~1\"))).join(\"/\")}`:s}function replace(s,o,i){return{op:\"replace\",path:s,value:o,meta:i}}function forEachNewPatch(s,o,i){return cleanArray(flatten(s.filter(isAdditiveMutation).map((s=>o(s.value,i,s.path)))||[]))}function forEachPrimitive(s,o,i){return i=i||[],Array.isArray(s)?s.map(((s,a)=>forEachPrimitive(s,o,i.concat(a)))):lib_isObject(s)?Object.keys(s).map((a=>forEachPrimitive(s[a],o,i.concat(a)))):o(s,i[i.length-1],i)}function forEach(s,o,i){let a=[];if((i=i||[]).length>0){const u=o(s,i[i.length-1],i);u&&(a=a.concat(u))}if(Array.isArray(s)){const u=s.map(((s,a)=>forEach(s,o,i.concat(a))));u&&(a=a.concat(u))}else if(lib_isObject(s)){const u=Object.keys(s).map((a=>forEach(s[a],o,i.concat(a))));u&&(a=a.concat(u))}return a=flatten(a),a}function lib_normalizeArray(s){return Array.isArray(s)?s:[s]}function flatten(s){return[].concat(...s.map((s=>Array.isArray(s)?flatten(s):s)))}function cleanArray(s){return s.filter((s=>void 0!==s))}function lib_isObject(s){return s&&\"object\"==typeof s}function lib_isFunction(s){return s&&\"function\"==typeof s}function isJsonPatch(s){if(isPatch(s)){const{op:o}=s;return\"add\"===o||\"remove\"===o||\"replace\"===o}return!1}function isMutation(s){return isJsonPatch(s)||isPatch(s)&&\"mutation\"===s.type}function isAdditiveMutation(s){return isMutation(s)&&(\"add\"===s.op||\"replace\"===s.op||\"merge\"===s.op||\"mergeDeep\"===s.op)}function isPatch(s){return s&&\"object\"==typeof s}function getInByJsonPath(s,o){try{return getValueByPointer(s,o)}catch(s){return console.error(s),{}}}var Jo=__webpack_require__(48675);const Ho=class ApiDOMAggregateError extends Jo{constructor(s,o,i){if(super(s,o,i),this.name=this.constructor.name,\"string\"==typeof o&&(this.message=o),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(o).stack,null!=i&&\"object\"==typeof i&&Object.hasOwn(i,\"cause\")&&!(\"cause\"in this)){const{cause:s}=i;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}};class ApiDOMError extends Error{static[Symbol.hasInstance](s){return super[Symbol.hasInstance](s)||Function.prototype[Symbol.hasInstance].call(Ho,s)}constructor(s,o){if(super(s,o),this.name=this.constructor.name,\"string\"==typeof s&&(this.message=s),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack,null!=o&&\"object\"==typeof o&&Object.hasOwn(o,\"cause\")&&!(\"cause\"in this)){const{cause:s}=o;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}}const Ko=ApiDOMError;const Go=class ApiDOMStructuredError extends Ko{constructor(s,o){if(super(s,o),null!=o&&\"object\"==typeof o){const{cause:s,...i}=o;Object.assign(this,i)}}};var Yo=__webpack_require__(65606);function _isPlaceholder(s){return null!=s&&\"object\"==typeof s&&!0===s[\"@@functional/placeholder\"]}function _curry1(s){return function f1(o){return 0===arguments.length||_isPlaceholder(o)?f1:s.apply(this,arguments)}}function _curry2(s){return function f2(o,i){switch(arguments.length){case 0:return f2;case 1:return _isPlaceholder(o)?f2:_curry1((function(i){return s(o,i)}));default:return _isPlaceholder(o)&&_isPlaceholder(i)?f2:_isPlaceholder(o)?_curry1((function(o){return s(o,i)})):_isPlaceholder(i)?_curry1((function(i){return s(o,i)})):s(o,i)}}}function _curry3(s){return function f3(o,i,a){switch(arguments.length){case 0:return f3;case 1:return _isPlaceholder(o)?f3:_curry2((function(i,a){return s(o,i,a)}));case 2:return _isPlaceholder(o)&&_isPlaceholder(i)?f3:_isPlaceholder(o)?_curry2((function(o,a){return s(o,i,a)})):_isPlaceholder(i)?_curry2((function(i,a){return s(o,i,a)})):_curry1((function(a){return s(o,i,a)}));default:return _isPlaceholder(o)&&_isPlaceholder(i)&&_isPlaceholder(a)?f3:_isPlaceholder(o)&&_isPlaceholder(i)?_curry2((function(o,i){return s(o,i,a)})):_isPlaceholder(o)&&_isPlaceholder(a)?_curry2((function(o,a){return s(o,i,a)})):_isPlaceholder(i)&&_isPlaceholder(a)?_curry2((function(i,a){return s(o,i,a)})):_isPlaceholder(o)?_curry1((function(o){return s(o,i,a)})):_isPlaceholder(i)?_curry1((function(i){return s(o,i,a)})):_isPlaceholder(a)?_curry1((function(a){return s(o,i,a)})):s(o,i,a)}}}const Xo=Number.isInteger||function _isInteger(s){return(s|0)===s};function _isString(s){return\"[object String]\"===Object.prototype.toString.call(s)}function _nth(s,o){var i=s<0?o.length+s:s;return _isString(o)?o.charAt(i):o[i]}function _path(s,o){for(var i=o,a=0;a<s.length;a+=1){if(null==i)return;var u=s[a];i=Xo(u)?_nth(u,i):i[u]}return i}const Qo=_curry3((function pathSatisfies(s,o,i){return s(_path(o,i))}));function _cloneRegExp(s){return new RegExp(s.source,s.flags?s.flags:(s.global?\"g\":\"\")+(s.ignoreCase?\"i\":\"\")+(s.multiline?\"m\":\"\")+(s.sticky?\"y\":\"\")+(s.unicode?\"u\":\"\")+(s.dotAll?\"s\":\"\"))}function _arrayFromIterator(s){for(var o,i=[];!(o=s.next()).done;)i.push(o.value);return i}function _includesWith(s,o,i){for(var a=0,u=i.length;a<u;){if(s(o,i[a]))return!0;a+=1}return!1}function _has(s,o){return Object.prototype.hasOwnProperty.call(o,s)}const Zo=\"function\"==typeof Object.is?Object.is:function _objectIs(s,o){return s===o?0!==s||1/s==1/o:s!=s&&o!=o};var _i=Object.prototype.toString;const Ei=function(){return\"[object Arguments]\"===_i.call(arguments)?function _isArguments(s){return\"[object Arguments]\"===_i.call(s)}:function _isArguments(s){return _has(\"callee\",s)}}();var Oi=!{toString:null}.propertyIsEnumerable(\"toString\"),Pi=[\"constructor\",\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"],Mi=function(){return arguments.propertyIsEnumerable(\"length\")}(),Ri=function contains(s,o){for(var i=0;i<s.length;){if(s[i]===o)return!0;i+=1}return!1},Wi=\"function\"!=typeof Object.keys||Mi?_curry1((function keys(s){if(Object(s)!==s)return[];var o,i,a=[],u=Mi&&Ei(s);for(o in s)!_has(o,s)||u&&\"length\"===o||(a[a.length]=o);if(Oi)for(i=Pi.length-1;i>=0;)_has(o=Pi[i],s)&&!Ri(a,o)&&(a[a.length]=o),i-=1;return a})):_curry1((function keys(s){return Object(s)!==s?[]:Object.keys(s)}));const ea=Wi;const ra=_curry1((function type(s){return null===s?\"Null\":void 0===s?\"Undefined\":Object.prototype.toString.call(s).slice(8,-1)}));function _uniqContentEquals(s,o,i,a){var u=_arrayFromIterator(s);function eq(s,o){return _equals(s,o,i.slice(),a.slice())}return!_includesWith((function(s,o){return!_includesWith(eq,o,s)}),_arrayFromIterator(o),u)}function _equals(s,o,i,a){if(Zo(s,o))return!0;var u=ra(s);if(u!==ra(o))return!1;if(\"function\"==typeof s[\"fantasy-land/equals\"]||\"function\"==typeof o[\"fantasy-land/equals\"])return\"function\"==typeof s[\"fantasy-land/equals\"]&&s[\"fantasy-land/equals\"](o)&&\"function\"==typeof o[\"fantasy-land/equals\"]&&o[\"fantasy-land/equals\"](s);if(\"function\"==typeof s.equals||\"function\"==typeof o.equals)return\"function\"==typeof s.equals&&s.equals(o)&&\"function\"==typeof o.equals&&o.equals(s);switch(u){case\"Arguments\":case\"Array\":case\"Object\":if(\"function\"==typeof s.constructor&&\"Promise\"===function _functionName(s){var o=String(s).match(/^function (\\w*)/);return null==o?\"\":o[1]}(s.constructor))return s===o;break;case\"Boolean\":case\"Number\":case\"String\":if(typeof s!=typeof o||!Zo(s.valueOf(),o.valueOf()))return!1;break;case\"Date\":if(!Zo(s.valueOf(),o.valueOf()))return!1;break;case\"Error\":return s.name===o.name&&s.message===o.message;case\"RegExp\":if(s.source!==o.source||s.global!==o.global||s.ignoreCase!==o.ignoreCase||s.multiline!==o.multiline||s.sticky!==o.sticky||s.unicode!==o.unicode)return!1}for(var _=i.length-1;_>=0;){if(i[_]===s)return a[_]===o;_-=1}switch(u){case\"Map\":return s.size===o.size&&_uniqContentEquals(s.entries(),o.entries(),i.concat([s]),a.concat([o]));case\"Set\":return s.size===o.size&&_uniqContentEquals(s.values(),o.values(),i.concat([s]),a.concat([o]));case\"Arguments\":case\"Array\":case\"Object\":case\"Boolean\":case\"Number\":case\"String\":case\"Date\":case\"Error\":case\"RegExp\":case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"ArrayBuffer\":break;default:return!1}var w=ea(s);if(w.length!==ea(o).length)return!1;var x=i.concat([s]),C=a.concat([o]);for(_=w.length-1;_>=0;){var j=w[_];if(!_has(j,o)||!_equals(o[j],s[j],x,C))return!1;_-=1}return!0}const na=_curry2((function equals(s,o){return _equals(s,o,[],[])}));function _includes(s,o){return function _indexOf(s,o,i){var a,u;if(\"function\"==typeof s.indexOf)switch(typeof o){case\"number\":if(0===o){for(a=1/o;i<s.length;){if(0===(u=s[i])&&1/u===a)return i;i+=1}return-1}if(o!=o){for(;i<s.length;){if(\"number\"==typeof(u=s[i])&&u!=u)return i;i+=1}return-1}return s.indexOf(o,i);case\"string\":case\"boolean\":case\"function\":case\"undefined\":return s.indexOf(o,i);case\"object\":if(null===o)return s.indexOf(o,i)}for(;i<s.length;){if(na(s[i],o))return i;i+=1}return-1}(o,s,0)>=0}function _map(s,o){for(var i=0,a=o.length,u=Array(a);i<a;)u[i]=s(o[i]),i+=1;return u}function _quote(s){return'\"'+s.replace(/\\\\/g,\"\\\\\\\\\").replace(/[\\b]/g,\"\\\\b\").replace(/\\f/g,\"\\\\f\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/\\t/g,\"\\\\t\").replace(/\\v/g,\"\\\\v\").replace(/\\0/g,\"\\\\0\").replace(/\"/g,'\\\\\"')+'\"'}var ia=function pad(s){return(s<10?\"0\":\"\")+s};const aa=\"function\"==typeof Date.prototype.toISOString?function _toISOString(s){return s.toISOString()}:function _toISOString(s){return s.getUTCFullYear()+\"-\"+ia(s.getUTCMonth()+1)+\"-\"+ia(s.getUTCDate())+\"T\"+ia(s.getUTCHours())+\":\"+ia(s.getUTCMinutes())+\":\"+ia(s.getUTCSeconds())+\".\"+(s.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+\"Z\"};function _complement(s){return function(){return!s.apply(this,arguments)}}function _arrayReduce(s,o,i){for(var a=0,u=i.length;a<u;)o=s(o,i[a]),a+=1;return o}const ca=Array.isArray||function _isArray(s){return null!=s&&s.length>=0&&\"[object Array]\"===Object.prototype.toString.call(s)};function _dispatchable(s,o,i){return function(){if(0===arguments.length)return i();var a=arguments[arguments.length-1];if(!ca(a)){for(var u=0;u<s.length;){if(\"function\"==typeof a[s[u]])return a[s[u]].apply(a,Array.prototype.slice.call(arguments,0,-1));u+=1}if(function _isTransformer(s){return null!=s&&\"function\"==typeof s[\"@@transducer/step\"]}(a))return o.apply(null,Array.prototype.slice.call(arguments,0,-1))(a)}return i.apply(this,arguments)}}function _isObject(s){return\"[object Object]\"===Object.prototype.toString.call(s)}const _xfBase_init=function(){return this.xf[\"@@transducer/init\"]()},_xfBase_result=function(s){return this.xf[\"@@transducer/result\"](s)};var la=function(){function XFilter(s,o){this.xf=o,this.f=s}return XFilter.prototype[\"@@transducer/init\"]=_xfBase_init,XFilter.prototype[\"@@transducer/result\"]=_xfBase_result,XFilter.prototype[\"@@transducer/step\"]=function(s,o){return this.f(o)?this.xf[\"@@transducer/step\"](s,o):s},XFilter}();function _xfilter(s){return function(o){return new la(s,o)}}var ua=_curry2(_dispatchable([\"fantasy-land/filter\",\"filter\"],_xfilter,(function(s,o){return _isObject(o)?_arrayReduce((function(i,a){return s(o[a])&&(i[a]=o[a]),i}),{},ea(o)):function _filter(s,o){for(var i=0,a=o.length,u=[];i<a;)s(o[i])&&(u[u.length]=o[i]),i+=1;return u}(s,o)})));const da=ua;const ma=_curry2((function reject(s,o){return da(_complement(s),o)}));function _toString_toString(s,o){var i=function recur(i){var a=o.concat([s]);return _includes(i,a)?\"<Circular>\":_toString_toString(i,a)},mapPairs=function(s,o){return _map((function(o){return _quote(o)+\": \"+i(s[o])}),o.slice().sort())};switch(Object.prototype.toString.call(s)){case\"[object Arguments]\":return\"(function() { return arguments; }(\"+_map(i,s).join(\", \")+\"))\";case\"[object Array]\":return\"[\"+_map(i,s).concat(mapPairs(s,ma((function(s){return/^\\d+$/.test(s)}),ea(s)))).join(\", \")+\"]\";case\"[object Boolean]\":return\"object\"==typeof s?\"new Boolean(\"+i(s.valueOf())+\")\":s.toString();case\"[object Date]\":return\"new Date(\"+(isNaN(s.valueOf())?i(NaN):_quote(aa(s)))+\")\";case\"[object Map]\":return\"new Map(\"+i(Array.from(s))+\")\";case\"[object Null]\":return\"null\";case\"[object Number]\":return\"object\"==typeof s?\"new Number(\"+i(s.valueOf())+\")\":1/s==-1/0?\"-0\":s.toString(10);case\"[object Set]\":return\"new Set(\"+i(Array.from(s).sort())+\")\";case\"[object String]\":return\"object\"==typeof s?\"new String(\"+i(s.valueOf())+\")\":_quote(s);case\"[object Undefined]\":return\"undefined\";default:if(\"function\"==typeof s.toString){var a=s.toString();if(\"[object Object]\"!==a)return a}return\"{\"+mapPairs(s,ea(s)).join(\", \")+\"}\"}}const ga=_curry1((function toString(s){return _toString_toString(s,[])}));var ya=_curry2((function test(s,o){if(!function _isRegExp(s){return\"[object RegExp]\"===Object.prototype.toString.call(s)}(s))throw new TypeError(\"‘test’ requires a value of type RegExp as its first argument; received \"+ga(s));return _cloneRegExp(s).test(o)}));const va=ya;function _arity(s,o){switch(s){case 0:return function(){return o.apply(this,arguments)};case 1:return function(s){return o.apply(this,arguments)};case 2:return function(s,i){return o.apply(this,arguments)};case 3:return function(s,i,a){return o.apply(this,arguments)};case 4:return function(s,i,a,u){return o.apply(this,arguments)};case 5:return function(s,i,a,u,_){return o.apply(this,arguments)};case 6:return function(s,i,a,u,_,w){return o.apply(this,arguments)};case 7:return function(s,i,a,u,_,w,x){return o.apply(this,arguments)};case 8:return function(s,i,a,u,_,w,x,C){return o.apply(this,arguments)};case 9:return function(s,i,a,u,_,w,x,C,j){return o.apply(this,arguments)};case 10:return function(s,i,a,u,_,w,x,C,j,L){return o.apply(this,arguments)};default:throw new Error(\"First argument to _arity must be a non-negative integer no greater than ten\")}}function _pipe(s,o){return function(){return o.call(this,s.apply(this,arguments))}}const ba=_curry1((function isArrayLike(s){return!!ca(s)||!!s&&(\"object\"==typeof s&&(!_isString(s)&&(0===s.length||s.length>0&&(s.hasOwnProperty(0)&&s.hasOwnProperty(s.length-1)))))}));var _a=\"undefined\"!=typeof Symbol?Symbol.iterator:\"@@iterator\";function _createReduce(s,o,i){return function _reduce(a,u,_){if(ba(_))return s(a,u,_);if(null==_)return u;if(\"function\"==typeof _[\"fantasy-land/reduce\"])return o(a,u,_,\"fantasy-land/reduce\");if(null!=_[_a])return i(a,u,_[_a]());if(\"function\"==typeof _.next)return i(a,u,_);if(\"function\"==typeof _.reduce)return o(a,u,_,\"reduce\");throw new TypeError(\"reduce: list must be array or iterable\")}}function _xArrayReduce(s,o,i){for(var a=0,u=i.length;a<u;){if((o=s[\"@@transducer/step\"](o,i[a]))&&o[\"@@transducer/reduced\"]){o=o[\"@@transducer/value\"];break}a+=1}return s[\"@@transducer/result\"](o)}const Ea=_curry2((function bind(s,o){return _arity(s.length,(function(){return s.apply(o,arguments)}))}));function _xIterableReduce(s,o,i){for(var a=i.next();!a.done;){if((o=s[\"@@transducer/step\"](o,a.value))&&o[\"@@transducer/reduced\"]){o=o[\"@@transducer/value\"];break}a=i.next()}return s[\"@@transducer/result\"](o)}function _xMethodReduce(s,o,i,a){return s[\"@@transducer/result\"](i[a](Ea(s[\"@@transducer/step\"],s),o))}const wa=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce);var xa=function(){function XWrap(s){this.f=s}return XWrap.prototype[\"@@transducer/init\"]=function(){throw new Error(\"init not implemented on XWrap\")},XWrap.prototype[\"@@transducer/result\"]=function(s){return s},XWrap.prototype[\"@@transducer/step\"]=function(s,o){return this.f(s,o)},XWrap}();function _xwrap(s){return new xa(s)}var ka=_curry3((function(s,o,i){return wa(\"function\"==typeof s?_xwrap(s):s,o,i)}));const Ca=ka;function _checkForMethod(s,o){return function(){var i=arguments.length;if(0===i)return o();var a=arguments[i-1];return ca(a)||\"function\"!=typeof a[s]?o.apply(this,arguments):a[s].apply(a,Array.prototype.slice.call(arguments,0,i-1))}}var Aa=_curry3(_checkForMethod(\"slice\",(function slice(s,o,i){return Array.prototype.slice.call(i,s,o)})));const ja=Aa;const Ia=_curry1(_checkForMethod(\"tail\",ja(1,1/0)));function pipe(){if(0===arguments.length)throw new Error(\"pipe requires at least one argument\");return _arity(arguments[0].length,Ca(_pipe,arguments[0],Ia(arguments)))}const Na=_curry2((function defaultTo(s,o){return null==o||o!=o?s:o}));const Da=_curry2((function prop(s,o){if(null!=o)return Xo(s)?_nth(s,o):o[s]}));const La=_curry3((function propOr(s,o,i){return Na(s,Da(o,i))}));var Fa=_curry1((function(s){return _nth(-1,s)}));const Ba=Fa;function _curryN(s,o,i){return function(){for(var a=[],u=0,_=s,w=0,x=!1;w<o.length||u<arguments.length;){var C;w<o.length&&(!_isPlaceholder(o[w])||u>=arguments.length)?C=o[w]:(C=arguments[u],u+=1),a[w]=C,_isPlaceholder(C)?x=!0:_-=1,w+=1}return!x&&_<=0?i.apply(this,a):_arity(Math.max(0,_),_curryN(s,a,i))}}const $a=_curry2((function curryN(s,o){return 1===s?_curry1(o):_arity(s,_curryN(s,[],o))}));const za=_curry1((function curry(s){return $a(s.length,s)}));function _isFunction(s){var o=Object.prototype.toString.call(s);return\"[object Function]\"===o||\"[object AsyncFunction]\"===o||\"[object GeneratorFunction]\"===o||\"[object AsyncGeneratorFunction]\"===o}const Ja=_curry2((function invoker(s,o){return $a(s+1,(function(){var i=arguments[s];if(null!=i&&_isFunction(i[o]))return i[o].apply(i,Array.prototype.slice.call(arguments,0,s));throw new TypeError(ga(i)+' does not have a method named \"'+o+'\"')}))}));const Ha=Ja(1,\"split\");function dropLastWhile(s,o){for(var i=o.length-1;i>=0&&s(o[i]);)i-=1;return ja(0,i+1,o)}var Ga=function(){function XDropLastWhile(s,o){this.f=s,this.retained=[],this.xf=o}return XDropLastWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropLastWhile.prototype[\"@@transducer/result\"]=function(s){return this.retained=null,this.xf[\"@@transducer/result\"](s)},XDropLastWhile.prototype[\"@@transducer/step\"]=function(s,o){return this.f(o)?this.retain(s,o):this.flush(s,o)},XDropLastWhile.prototype.flush=function(s,o){return s=wa(this.xf,s,this.retained),this.retained=[],this.xf[\"@@transducer/step\"](s,o)},XDropLastWhile.prototype.retain=function(s,o){return this.retained.push(o),s},XDropLastWhile}();function _xdropLastWhile(s){return function(o){return new Ga(s,o)}}const ec=_curry2(_dispatchable([],_xdropLastWhile,dropLastWhile));const rc=Ja(1,\"join\");const sc=_curry1((function flip(s){return $a(s.length,(function(o,i){var a=Array.prototype.slice.call(arguments,0);return a[0]=i,a[1]=o,s.apply(this,a)}))}))(_curry2(_includes));const oc=za((function(s,o){return pipe(Ha(\"\"),ec(sc(s)),rc(\"\"))(o)}));function _iterableReduce(s,o,i){for(var a=i.next();!a.done;)o=s(o,a.value),a=i.next();return o}function _methodReduce(s,o,i,a){return i[a](s,o)}const ic=_createReduce(_arrayReduce,_methodReduce,_iterableReduce);var ac=function(){function XMap(s,o){this.xf=o,this.f=s}return XMap.prototype[\"@@transducer/init\"]=_xfBase_init,XMap.prototype[\"@@transducer/result\"]=_xfBase_result,XMap.prototype[\"@@transducer/step\"]=function(s,o){return this.xf[\"@@transducer/step\"](s,this.f(o))},XMap}();const cc=_curry2(_dispatchable([\"fantasy-land/map\",\"map\"],(function _xmap(s){return function(o){return new ac(s,o)}}),(function map(s,o){switch(Object.prototype.toString.call(o)){case\"[object Function]\":return $a(o.length,(function(){return s.call(this,o.apply(this,arguments))}));case\"[object Object]\":return _arrayReduce((function(i,a){return i[a]=s(o[a]),i}),{},ea(o));default:return _map(s,o)}})));const lc=_curry2((function ap(s,o){return\"function\"==typeof o[\"fantasy-land/ap\"]?o[\"fantasy-land/ap\"](s):\"function\"==typeof s.ap?s.ap(o):\"function\"==typeof s?function(i){return s(i)(o(i))}:ic((function(s,i){return function _concat(s,o){var i;o=o||[];var a=(s=s||[]).length,u=o.length,_=[];for(i=0;i<a;)_[_.length]=s[i],i+=1;for(i=0;i<u;)_[_.length]=o[i],i+=1;return _}(s,cc(i,o))}),[],s)}));const pc=_curry2((function liftN(s,o){var i=$a(s,o);return $a(s,(function(){return _arrayReduce(lc,cc(i,arguments[0]),Array.prototype.slice.call(arguments,1))}))}));const hc=_curry1((function lift(s){return pc(s.length,s)}));const dc=hc(_curry1((function not(s){return!s})));const fc=_curry1((function always(s){return function(){return s}}));const gc=fc(void 0);const bc=na(gc());const _c=dc(bc);const Ec=_curry2((function max(s,o){if(s===o)return o;function safeMax(s,o){if(s>o!=o>s)return o>s?o:s}var i=safeMax(s,o);if(void 0!==i)return i;var a=safeMax(typeof s,typeof o);if(void 0!==a)return a===typeof s?s:o;var u=ga(s),_=safeMax(u,ga(o));return void 0!==_&&_===u?s:o}));var kc=_curry2((function pluck(s,o){return cc(Da(s),o)}));const Oc=kc;const jc=_curry1((function anyPass(s){return $a(Ca(Ec,0,Oc(\"length\",s)),(function(){for(var o=0,i=s.length;o<i;){if(s[o].apply(this,arguments))return!0;o+=1}return!1}))}));var identical=function(s,o){switch(arguments.length){case 0:return identical;case 1:return function unaryIdentical(o){return 0===arguments.length?unaryIdentical:Zo(s,o)};default:return Zo(s,o)}};const Ic=identical;const Pc=$a(1,pipe(ra,Ic(\"GeneratorFunction\")));const Nc=$a(1,pipe(ra,Ic(\"AsyncFunction\")));const Mc=jc([pipe(ra,Ic(\"Function\")),Pc,Nc]);var Rc=_curry3((function replace(s,o,i){return i.replace(s,o)}));const Lc=Rc;const Fc=$a(1,pipe(ra,Ic(\"RegExp\")));const qc=_curry3((function when(s,o,i){return s(i)?o(i):i}));const Jc=$a(1,pipe(ra,Ic(\"String\")));const Hc=qc(Jc,Lc(/[.*+?^${}()|[\\]\\\\-]/g,\"\\\\$&\"));var Kc=function checkValue(s,o){if(\"string\"!=typeof s&&!(s instanceof String))throw TypeError(\"`\".concat(o,\"` must be a string\"))};const Gc=function replaceAll(s,o,i){!function checkArguments(s,o,i){if(null==i||null==s||null==o)throw TypeError(\"Input values must not be `null` or `undefined`\")}(s,o,i),Kc(i,\"str\"),Kc(o,\"replaceValue\"),function checkSearchValue(s){if(!(\"string\"==typeof s||s instanceof String||s instanceof RegExp))throw TypeError(\"`searchValue` must be a string or an regexp\")}(s);var a=new RegExp(Fc(s)?s:Hc(s),\"g\");return Lc(a,o,i)};var Qc=$a(3,Gc),tl=Ja(2,\"replaceAll\");const sl=Mc(String.prototype.replaceAll)?tl:Qc,isWindows=()=>Qo(va(/^win/),[\"platform\"],Yo),getProtocol=s=>{try{const o=new URL(s);return oc(\":\",o.protocol)}catch{return}},ul=(pipe(getProtocol,_c),s=>{if(Yo.browser)return!1;const o=getProtocol(s);return bc(o)||\"file\"===o||/^[a-zA-Z]$/.test(o)}),isHttpUrl=s=>{const o=getProtocol(s);return\"http\"===o||\"https\"===o},toFileSystemPath=(s,o)=>{const i=[/%23/g,\"#\",/%24/g,\"$\",/%26/g,\"&\",/%2C/g,\",\",/%40/g,\"@\"],a=La(!1,\"keepFileProtocol\",o),u=La(isWindows,\"isWindows\",o);let _=decodeURI(s);for(let s=0;s<i.length;s+=2)_=_.replace(i[s],i[s+1]);let w=\"file://\"===_.substring(0,7).toLowerCase();return w&&(_=\"/\"===_[7]?_.substring(8):_.substring(7),u()&&\"/\"===_[1]&&(_=`${_[0]}:${_.substring(1)}`),a?_=`file:///${_}`:(w=!1,_=u()?_:`/${_}`)),u()&&!w&&(_=sl(\"/\",\"\\\\\",_),\":\\\\\"===_.substring(1,3)&&(_=_[0].toUpperCase()+_.substring(1))),_},getHash=s=>{const o=s.indexOf(\"#\");return-1!==o?s.substring(o):\"#\"},stripHash=s=>{const o=s.indexOf(\"#\");let i=s;return o>=0&&(i=s.substring(0,o)),i},url_cwd=()=>{if(Yo.browser)return stripHash(globalThis.location.href);const s=Yo.cwd(),o=Ba(s);return[\"/\",\"\\\\\"].includes(o)?s:s+(isWindows()?\"\\\\\":\"/\")},resolve=(s,o)=>{const i=new URL(o,new URL(s,\"resolve://\"));if(\"resolve:\"===i.protocol){const{pathname:s,search:o,hash:a}=i;return s+o+a}return i.toString()},sanitize=s=>{if(ul(s))return(s=>{const o=[/\\?/g,\"%3F\",/#/g,\"%23\"];let i=s;isWindows()&&(i=i.replace(/\\\\/g,\"/\")),i=encodeURI(i);for(let s=0;s<o.length;s+=2)i=i.replace(o[s],o[s+1]);return i})(toFileSystemPath(s));try{return new URL(s).toString()}catch{return encodeURI(decodeURI(s)).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\")}},unsanitize=s=>ul(s)?toFileSystemPath(s):decodeURI(s),{fetch:yl,Response:vl,Headers:_l,Request:Sl,FormData:El,File:wl,Blob:xl}=globalThis;function _array_like_to_array(s,o){(null==o||o>s.length)&&(o=s.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=s[i];return a}function legacy_defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _instanceof(s,o){return null!=o&&\"undefined\"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](s):s instanceof o}function _sliced_to_array(s,o){return function _array_with_holes(s){if(Array.isArray(s))return s}(s)||function _iterable_to_array_limit(s,o){var i=null==s?null:\"undefined\"!=typeof Symbol&&s[Symbol.iterator]||s[\"@@iterator\"];if(null!=i){var a,u,_=[],w=!0,x=!1;try{for(i=i.call(s);!(w=(a=i.next()).done)&&(_.push(a.value),!o||_.length!==o);w=!0);}catch(s){x=!0,u=s}finally{try{w||null==i.return||i.return()}finally{if(x)throw u}}return _}}(s,o)||function _unsupported_iterable_to_array(s,o){if(!s)return;if(\"string\"==typeof s)return _array_like_to_array(s,o);var i=Object.prototype.toString.call(s).slice(8,-1);\"Object\"===i&&s.constructor&&(i=s.constructor.name);if(\"Map\"===i||\"Set\"===i)return Array.from(i);if(\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _array_like_to_array(s,o)}(s,o)||function _non_iterable_rest(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function _type_of(s){return s&&\"undefined\"!=typeof Symbol&&s.constructor===Symbol?\"symbol\":typeof s}void 0===globalThis.fetch&&(globalThis.fetch=yl),void 0===globalThis.Headers&&(globalThis.Headers=_l),void 0===globalThis.Request&&(globalThis.Request=Sl),void 0===globalThis.Response&&(globalThis.Response=vl),void 0===globalThis.FormData&&(globalThis.FormData=El),void 0===globalThis.File&&(globalThis.File=wl),void 0===globalThis.Blob&&(globalThis.Blob=xl);var __typeError=function(s){throw TypeError(s)},__accessCheck=function(s,o,i){return o.has(s)||__typeError(\"Cannot \"+i)},__privateGet=function(s,o,i){return __accessCheck(s,o,\"read from private field\"),i?i.call(s):o.get(s)},__privateAdd=function(s,o,i){return o.has(s)?__typeError(\"Cannot add the same private member more than once\"):_instanceof(o,WeakSet)?o.add(s):o.set(s,i)},__privateSet=function(s,o,i,a){return __accessCheck(s,o,\"write to private field\"),a?a.call(s,i):o.set(s,i),i},to_string=function(s){return Object.prototype.toString.call(s)},is_typed_array=function(s){return ArrayBuffer.isView(s)&&!_instanceof(s,DataView)},kl=Array.isArray,Ol=Object.getOwnPropertyDescriptor,Cl=Object.prototype.propertyIsEnumerable,Al=Object.getOwnPropertySymbols,Il=Object.prototype.hasOwnProperty;function own_enumerable_keys(s){for(var o=Object.keys(s),i=Al(s),a=0;a<i.length;a++)Cl.call(s,i[a])&&o.push(i[a]);return o}function is_writable(s,o){var i;return!(null===(i=Ol(s,o))||void 0===i?void 0:i.writable)}function legacy_copy(s,o){if(\"object\"===(void 0===s?\"undefined\":_type_of(s))&&null!==s){var i;if(kl(s))i=[];else if(\"[object Date]\"===to_string(s))i=new Date(s.getTime?s.getTime():s);else if(function(s){return\"[object RegExp]\"===to_string(s)}(s))i=new RegExp(s);else if(function(s){return\"[object Error]\"===to_string(s)}(s))i={message:s.message};else if(function(s){return\"[object Boolean]\"===to_string(s)}(s)||function(s){return\"[object Number]\"===to_string(s)}(s)||function(s){return\"[object String]\"===to_string(s)}(s))i=Object(s);else{if(is_typed_array(s))return s.slice();i=Object.create(Object.getPrototypeOf(s))}var a=o.includeSymbols?own_enumerable_keys:Object.keys,u=!0,_=!1,w=void 0;try{for(var x,C=a(s)[Symbol.iterator]();!(u=(x=C.next()).done);u=!0){var j=x.value;i[j]=s[j]}}catch(s){_=!0,w=s}finally{try{u||null==C.return||C.return()}finally{if(_)throw w}}return i}return s}var Pl,Tl,Nl={includeSymbols:!1,immutable:!1};function walk(s,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nl,a=[],u=[],_=!0,w=i.includeSymbols?own_enumerable_keys:Object.keys,x=!!i.immutable;return function walker(s){var C=x?legacy_copy(s,i):s,j={},L=!0,B={node:C,node_:s,path:[].concat(a),parent:u[u.length-1],parents:u,key:a[a.length-1],isRoot:0===a.length,level:a.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function update(s){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];B.isRoot||(B.parent.node[B.key]=s),B.node=s,o&&(L=!1)},delete:function _delete(s){delete B.parent.node[B.key],s&&(L=!1)},remove:function remove(s){kl(B.parent.node)?B.parent.node.splice(B.key,1):delete B.parent.node[B.key],s&&(L=!1)},keys:null,before:function before(s){j.before=s},after:function after(s){j.after=s},pre:function pre(s){j.pre=s},post:function post(s){j.post=s},stop:function stop(){_=!1},block:function block(){L=!1}};if(!_)return B;function update_state(){if(\"object\"===_type_of(B.node)&&null!==B.node){B.keys&&B.node_===B.node||(B.keys=w(B.node)),B.isLeaf=0===B.keys.length;for(var o=0;o<u.length;o++)if(u[o].node_===s){B.circular=u[o];break}}else B.isLeaf=!0,B.keys=null;B.notLeaf=!B.isLeaf,B.notRoot=!B.isRoot}update_state();var $=o.call(B,B.node);if(void 0!==$&&B.update&&B.update($),j.before&&j.before.call(B,B.node),!L)return B;if(\"object\"===_type_of(B.node)&&null!==B.node&&!B.circular){var V;u.push(B),update_state();var U=!0,z=!1,Y=void 0;try{for(var Z,ee=Object.entries(null!==(V=B.keys)&&void 0!==V?V:[])[Symbol.iterator]();!(U=(Z=ee.next()).done);U=!0){var ie,ae=_sliced_to_array(Z.value,2),ce=ae[0],le=ae[1];a.push(le),j.pre&&j.pre.call(B,B.node[le],le);var pe=walker(B.node[le]);x&&Il.call(B.node,le)&&!is_writable(B.node,le)&&(B.node[le]=pe.node),pe.isLast=!!(null===(ie=B.keys)||void 0===ie?void 0:ie.length)&&+ce==B.keys.length-1,pe.isFirst=0==+ce,j.post&&j.post.call(B,pe),a.pop()}}catch(s){z=!0,Y=s}finally{try{U||null==ee.return||ee.return()}finally{if(z)throw Y}}u.pop()}return j.after&&j.after.call(B,B.node),B}(s).node}var Ml=function(){function Traverse(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nl;!function _class_call_check(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,Traverse),__privateAdd(this,Pl),__privateAdd(this,Tl),__privateSet(this,Pl,s),__privateSet(this,Tl,o)}return function _create_class(s,o,i){return o&&legacy_defineProperties(s.prototype,o),i&&legacy_defineProperties(s,i),s}(Traverse,[{key:\"get\",value:function get(s){for(var o=__privateGet(this,Pl),i=0;o&&i<s.length;i++){var a=s[i];if(!Il.call(o,a)||!__privateGet(this,Tl).includeSymbols&&\"symbol\"===(void 0===a?\"undefined\":_type_of(a)))return;o=o[a]}return o}},{key:\"has\",value:function has(s){for(var o=__privateGet(this,Pl),i=0;o&&i<s.length;i++){var a=s[i];if(!Il.call(o,a)||!__privateGet(this,Tl).includeSymbols&&\"symbol\"===(void 0===a?\"undefined\":_type_of(a)))return!1;o=o[a]}return!0}},{key:\"set\",value:function set(s,o){var i=__privateGet(this,Pl),a=0;for(a=0;a<s.length-1;a++){var u=s[a];Il.call(i,u)||(i[u]={}),i=i[u]}return i[s[a]]=o,o}},{key:\"map\",value:function map(s){return walk(__privateGet(this,Pl),s,{immutable:!0,includeSymbols:!!__privateGet(this,Tl).includeSymbols})}},{key:\"forEach\",value:function forEach(s){return __privateSet(this,Pl,walk(__privateGet(this,Pl),s,__privateGet(this,Tl))),__privateGet(this,Pl)}},{key:\"reduce\",value:function reduce(s,o){var i=1===arguments.length,a=i?__privateGet(this,Pl):o;return this.forEach((function(o){this.isRoot&&i||(a=s.call(this,a,o))})),a}},{key:\"paths\",value:function paths(){var s=[];return this.forEach((function(){s.push(this.path)})),s}},{key:\"nodes\",value:function nodes(){var s=[];return this.forEach((function(){s.push(this.node)})),s}},{key:\"clone\",value:function clone(){var s=[],o=[],i=__privateGet(this,Tl);return is_typed_array(__privateGet(this,Pl))?__privateGet(this,Pl).slice():function clone(a){for(var u=0;u<s.length;u++)if(s[u]===a)return o[u];if(\"object\"===(void 0===a?\"undefined\":_type_of(a))&&null!==a){var _=legacy_copy(a,i);s.push(a),o.push(_);var w=i.includeSymbols?own_enumerable_keys:Object.keys,x=!0,C=!1,j=void 0;try{for(var L,B=w(a)[Symbol.iterator]();!(x=(L=B.next()).done);x=!0){var $=L.value;_[$]=clone(a[$])}}catch(s){C=!0,j=s}finally{try{x||null==B.return||B.return()}finally{if(C)throw j}}return s.pop(),o.pop(),_}return a}(__privateGet(this,Pl))}}]),Traverse}();Pl=new WeakMap,Tl=new WeakMap;var traverse=function(s,o){return new Ml(s,o)};traverse.get=function(s,o,i){return new Ml(s,i).get(o)},traverse.set=function(s,o,i,a){return new Ml(s,a).set(o,i)},traverse.has=function(s,o,i){return new Ml(s,i).has(o)},traverse.map=function(s,o,i){return new Ml(s,i).map(o)},traverse.forEach=function(s,o,i){return new Ml(s,i).forEach(o)},traverse.reduce=function(s,o,i,a){return new Ml(s,a).reduce(o,i)},traverse.paths=function(s,o){return new Ml(s,o).paths()},traverse.nodes=function(s,o){return new Ml(s,o).nodes()},traverse.clone=function(s,o){return new Ml(s,o).clone()};var Rl=traverse;const Dl=\"application/json, application/yaml\",Ll=\"https://swagger.io\",Fl=Object.freeze({url:\"/\"}),Bl=3e3,$l=[\"properties\"],Vl=[\"properties\"],Ul=[\"definitions\",\"parameters\",\"responses\",\"securityDefinitions\",\"components/schemas\",\"components/responses\",\"components/parameters\",\"components/securitySchemes\"],zl=[\"schema/example\",\"items/example\"];function isFreelyNamed(s){const o=s[s.length-1],i=s[s.length-2],a=s.join(\"/\");return $l.indexOf(o)>-1&&-1===Vl.indexOf(i)||Ul.indexOf(a)>-1||zl.some((s=>a.indexOf(s)>-1))}function absolutifyPointer(s,o){const[i,a]=s.split(\"#\"),u=null!=o?o:\"\",_=null!=i?i:\"\";let w;if(isHttpUrl(u))w=resolve(u,_);else{const s=resolve(Ll,u),o=resolve(s,_).replace(Ll,\"\");w=_.startsWith(\"/\")?o:o.substring(1)}return a?`${w}#${a}`:w}const Wl=/^([a-z]+:\\/\\/|\\/\\/)/i;class JSONRefError extends Go{}const Jl={},Hl=new WeakMap,Kl=[s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"examples\"===s[5],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"example\"===s[4],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"example\"===s[5],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"examples\"===s[4]&&\"value\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"examples\"===s[5]&&\"value\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[4]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9]],Gl={key:\"$ref\",plugin:(s,o,i,a)=>{const u=a.getInstance(),_=i.slice(0,-1);if(isFreelyNamed(_)||(s=>Kl.some((o=>o(s))))(_))return;const{baseDoc:w}=a.getContext(i);if(\"string\"!=typeof s)return new JSONRefError(\"$ref: must be a string (JSON-Ref)\",{$ref:s,baseDoc:w,fullPath:i});const x=refs_split(s),C=x[0],j=x[1]||\"\";let L,B,$;try{L=w||C?absoluteify(C,w):null}catch(o){return wrapError(o,{pointer:j,$ref:s,basePath:L,fullPath:i})}if(function pointerAlreadyInPath(s,o,i,a){let u=Hl.get(a);u||(u={},Hl.set(a,u));const _=function arrayToJsonPointer(s){if(0===s.length)return\"\";return`/${s.map(escapeJsonPointerToken).join(\"/\")}`}(i),w=`${o||\"<specmap-base>\"}#${s}`,x=_.replace(/allOf\\/\\d+\\/?/g,\"\"),C=a.contextTree.get([]).baseDoc;if(o===C&&pointerIsAParent(x,s))return!0;let j=\"\";const L=i.some((s=>(j=`${j}/${escapeJsonPointerToken(s)}`,u[j]&&u[j].some((s=>pointerIsAParent(s,w)||pointerIsAParent(w,s))))));if(L)return!0;return void(u[x]=(u[x]||[]).concat(w))}(j,L,_,a)&&!u.useCircularStructures){const o=absolutifyPointer(s,L);return s===o?null:Wo.replace(i,o)}if(null==L?($=jsonPointerToArray(j),B=a.get($),void 0===B&&(B=new JSONRefError(`Could not resolve reference: ${s}`,{pointer:j,$ref:s,baseDoc:w,fullPath:i}))):(B=extractFromDoc(L,j),B=null!=B.__value?B.__value:B.catch((o=>{throw wrapError(o,{pointer:j,$ref:s,baseDoc:w,fullPath:i})}))),B instanceof Error)return[Wo.remove(i),B];const V=absolutifyPointer(s,L),U=Wo.replace(_,B,{$$ref:V});if(L&&L!==w)return[U,Wo.context(_,{baseDoc:L})];try{if(!function patchValueAlreadyInPath(s,o){const i=[s];return o.path.reduce(((s,o)=>(i.push(s[o]),s[o])),s),pointToAncestor(o.value);function pointToAncestor(s){return Wo.isObject(s)&&(i.indexOf(s)>=0||Object.keys(s).some((o=>pointToAncestor(s[o]))))}}(a.state,U)||u.useCircularStructures)return U}catch(s){return null}}},Yl=Object.assign(Gl,{docCache:Jl,absoluteify,clearCache:function clearCache(s){void 0!==s?delete Jl[s]:Object.keys(Jl).forEach((s=>{delete Jl[s]}))},JSONRefError,wrapError,getDoc,split:refs_split,extractFromDoc,fetchJSON:function fetchJSON(s){return fetch(s,{headers:{Accept:Dl},loadSpec:!0}).then((s=>s.text())).then((s=>fn.load(s)))},extract,jsonPointerToArray,unescapeJsonPointerToken}),Xl=Yl;function absoluteify(s,o){if(!Wl.test(s)){if(!o)throw new JSONRefError(`Tried to resolve a relative URL, without having a basePath. path: '${s}' basePath: '${o}'`);return resolve(o,s)}return s}function wrapError(s,o){let i;return i=s&&s.response&&s.response.body?`${s.response.body.code} ${s.response.body.message}`:s.message,new JSONRefError(`Could not resolve reference: ${i}`,{...o,cause:s})}function refs_split(s){return(s+\"\").split(\"#\")}function extractFromDoc(s,o){const i=Jl[s];if(i&&!Wo.isPromise(i))try{const s=extract(o,i);return Object.assign(Promise.resolve(s),{__value:s})}catch(s){return Promise.reject(s)}return getDoc(s).then((s=>extract(o,s)))}function getDoc(s){const o=Jl[s];return o?Wo.isPromise(o)?o:Promise.resolve(o):(Jl[s]=Yl.fetchJSON(s).then((o=>(Jl[s]=o,o))),Jl[s])}function extract(s,o){const i=jsonPointerToArray(s);if(i.length<1)return o;const a=Wo.getIn(o,i);if(void 0===a)throw new JSONRefError(`Could not resolve pointer: ${s} does not exist in document`,{pointer:s});return a}function jsonPointerToArray(s){if(\"string\"!=typeof s)throw new TypeError(\"Expected a string, got a \"+typeof s);return\"/\"===s[0]&&(s=s.substr(1)),\"\"===s?[]:s.split(\"/\").map(unescapeJsonPointerToken)}function unescapeJsonPointerToken(s){if(\"string\"!=typeof s)return s;return new URLSearchParams(`=${s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}`).get(\"\")}function escapeJsonPointerToken(s){return new URLSearchParams([[\"\",s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")]]).toString().slice(1)}const pointerBoundaryChar=s=>!s||\"/\"===s||\"#\"===s;function pointerIsAParent(s,o){if(pointerBoundaryChar(o))return!0;const i=s.charAt(o.length),a=o.slice(-1);return 0===s.indexOf(o)&&(!i||\"/\"===i||\"#\"===i)&&\"#\"!==a}const Ql={key:\"allOf\",plugin:(s,o,i,a,u)=>{if(u.meta&&u.meta.$$ref)return;const _=i.slice(0,-1);if(isFreelyNamed(_))return;if(!Array.isArray(s)){const s=new TypeError(\"allOf must be an array\");return s.fullPath=i,s}let w=!1,x=u.value;if(_.forEach((s=>{x&&(x=x[s])})),x={...x},0===Object.keys(x).length)return;delete x.allOf;const C=[];return C.push(a.replace(_,{})),s.forEach(((s,o)=>{if(!a.isObject(s)){if(w)return null;w=!0;const s=new TypeError(\"Elements in allOf must be objects\");return s.fullPath=i,C.push(s)}C.push(a.mergeDeep(_,s));const u=function generateAbsoluteRefPatches(s,o,{specmap:i,getBaseUrlForNodePath:a=s=>i.getContext([...o,...s]).baseDoc,targetKeys:u=[\"$ref\",\"$$ref\"]}={}){const _=[];return Rl(s).forEach((function callback(){if(u.includes(this.key)&&\"string\"==typeof this.node){const s=this.path,u=o.concat(this.path),w=absolutifyPointer(this.node,a(s));_.push(i.replace(u,w))}})),_}(s,i.slice(0,-1),{getBaseUrlForNodePath:s=>a.getContext([...i,o,...s]).baseDoc,specmap:a});C.push(...u)})),x.example&&C.push(a.remove([].concat(_,\"example\"))),C.push(a.mergeDeep(_,x)),x.$$ref||C.push(a.remove([].concat(_,\"$$ref\"))),C}},Zl={key:\"parameters\",plugin:(s,o,i,a)=>{if(Array.isArray(s)&&s.length){const o=Object.assign([],s),u=i.slice(0,-1),_={...Wo.getIn(a.spec,u)};for(let u=0;u<s.length;u+=1){const w=s[u];try{o[u].default=a.parameterMacro(_,w)}catch(s){const o=new Error(s);return o.fullPath=i,o}}return Wo.replace(i,o)}return Wo.replace(i,s)}},eu={key:\"properties\",plugin:(s,o,i,a)=>{const u={...s};for(const o in s)try{u[o].default=a.modelPropertyMacro(u[o])}catch(s){const o=new Error(s);return o.fullPath=i,o}return Wo.replace(i,u)}};class ContextTree{constructor(s){this.root=context_tree_createNode(s||{})}set(s,o){const i=this.getParent(s,!0);if(!i)return void context_tree_updateNode(this.root,o,null);const a=s[s.length-1],{children:u}=i;u[a]?context_tree_updateNode(u[a],o,i):u[a]=context_tree_createNode(o,i)}get(s){if((s=s||[]).length<1)return this.root.value;let o,i,a=this.root;for(let u=0;u<s.length&&(i=s[u],o=a.children,o[i]);u+=1)a=o[i];return a&&a.protoValue}getParent(s,o){return!s||s.length<1?null:s.length<2?this.root:s.slice(0,-1).reduce(((s,i)=>{if(!s)return s;const{children:a}=s;return!a[i]&&o&&(a[i]=context_tree_createNode(null,s)),a[i]}),this.root)}}function context_tree_createNode(s,o){return context_tree_updateNode({children:{}},s,o)}function context_tree_updateNode(s,o,i){return s.value=o||{},s.protoValue=i?{...i.protoValue,...s.value}:s.value,Object.keys(s.children).forEach((o=>{const i=s.children[o];s.children[o]=context_tree_updateNode(i,i.value,s)})),s}const specmap_noop=()=>{};class SpecMap{static getPluginName(s){return s.pluginName}static getPatchesOfType(s,o){return s.filter(o)}constructor(s){Object.assign(this,{spec:\"\",debugLevel:\"info\",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ContextTree,showDebug:!1,allPatches:[],pluginProp:\"specMap\",libMethods:Object.assign(Object.create(this),Wo,{getInstance:()=>this}),allowMetaPatches:!1},s),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(Wo.isFunction),this.patches.push(Wo.add([],this.spec)),this.patches.push(Wo.context([],this.context)),this.updatePatches(this.patches)}debug(s,...o){this.debugLevel===s&&console.log(...o)}verbose(s,...o){\"verbose\"===this.debugLevel&&console.log(`[${s}]   `,...o)}wrapPlugin(s,o){const{pathDiscriminator:i}=this;let a,u=null;return s[this.pluginProp]?(u=s,a=s[this.pluginProp]):Wo.isFunction(s)?a=s:Wo.isObject(s)&&(a=function createKeyBasedPlugin(s){const isSubPath=(s,o)=>!Array.isArray(s)||s.every(((s,i)=>s===o[i]));return function*generator(o,a){const u={};for(const[s,i]of o.filter(Wo.isAdditiveMutation).entries()){if(!(s<Bl))return;yield*traverse(i.value,i.path,i)}function*traverse(o,_,w){if(Wo.isObject(o)){const x=_.length-1,C=_[x],j=_.indexOf(\"properties\"),L=\"properties\"===C&&x===j,B=a.allowMetaPatches&&u[o.$$ref];for(const x of Object.keys(o)){const C=o[x],j=_.concat(x),$=Wo.isObject(C),V=o.$$ref;if(B||$&&(a.allowMetaPatches&&V&&isSubPath(i,j)&&(u[V]=!0),yield*traverse(C,j,w)),!L&&x===s.key){const o=isSubPath(i,_);i&&!o||(yield s.plugin(C,x,j,a,w))}}}else s.key===_[_.length-1]&&(yield s.plugin(o,s.key,_,a))}}}(s)),Object.assign(a.bind(u),{pluginName:s.name||o,isGenerator:Wo.isGenerator(a)})}nextPlugin(){return this.wrappedPlugins.find((s=>this.getMutationsForPlugin(s).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((s=>s.value)))}getPluginHistory(s){const o=this.constructor.getPluginName(s);return this.pluginHistory[o]||[]}getPluginRunCount(s){return this.getPluginHistory(s).length}getPluginHistoryTip(s){const o=this.getPluginHistory(s);return o&&o[o.length-1]||{}}getPluginMutationIndex(s){const o=this.getPluginHistoryTip(s).mutationIndex;return\"number\"!=typeof o?-1:o}updatePluginHistory(s,o){const i=this.constructor.getPluginName(s);this.pluginHistory[i]=this.pluginHistory[i]||[],this.pluginHistory[i].push(o)}updatePatches(s){Wo.normalizeArray(s).forEach((s=>{if(s instanceof Error)this.errors.push(s);else try{if(!Wo.isObject(s))return void this.debug(\"updatePatches\",\"Got a non-object patch\",s);if(this.showDebug&&this.allPatches.push(s),Wo.isPromise(s.value))return this.promisedPatches.push(s),void this.promisedPatchThen(s);if(Wo.isContextPatch(s))return void this.setContext(s.path,s.value);Wo.isMutation(s)&&this.updateMutations(s)}catch(s){console.error(s),this.errors.push(s)}}))}updateMutations(s){\"object\"==typeof s.value&&!Array.isArray(s.value)&&this.allowMetaPatches&&(s.value={...s.value});const o=Wo.applyPatch(this.state,s,{allowMetaPatches:this.allowMetaPatches});o&&(this.mutations.push(s),this.state=o)}removePromisedPatch(s){const o=this.promisedPatches.indexOf(s);o<0?this.debug(\"Tried to remove a promisedPatch that isn't there!\"):this.promisedPatches.splice(o,1)}promisedPatchThen(s){return s.value=s.value.then((o=>{const i={...s,value:o};this.removePromisedPatch(s),this.updatePatches(i)})).catch((o=>{this.removePromisedPatch(s),this.updatePatches(o)})),s.value}getMutations(s,o){return s=s||0,\"number\"!=typeof o&&(o=this.mutations.length),this.mutations.slice(s,o)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(s){const o=this.getPluginMutationIndex(s);return this.getMutations(o+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(s){return Wo.getIn(this.state,s)}_getContext(s){return this.contextTree.get(s)}setContext(s,o){return this.contextTree.set(s,o)}_hasRun(s){return this.getPluginRunCount(this.getCurrentPlugin())>(s||0)}dispatch(){const s=this,o=this.nextPlugin();if(!o){const s=this.nextPromisedPatch();if(s)return s.then((()=>this.dispatch())).catch((()=>this.dispatch()));const o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),Promise.resolve(o)}if(s.pluginCount=s.pluginCount||new WeakMap,s.pluginCount.set(o,(s.pluginCount.get(o)||0)+1),s.pluginCount[o]>100)return Promise.resolve({spec:s.state,errors:s.errors.concat(new Error(\"We've reached a hard limit of 100 plugin runs\"))});if(o!==this.currentPlugin&&this.promisedPatches.length){const s=this.promisedPatches.map((s=>s.value));return Promise.all(s.map((s=>s.then(specmap_noop,specmap_noop)))).then((()=>this.dispatch()))}return function executePlugin(){s.currentPlugin=o;const i=s.getCurrentMutations(),a=s.mutations.length-1;try{if(o.isGenerator)for(const a of o(i,s.getLib()))updatePatches(a);else{updatePatches(o(i,s.getLib()))}}catch(s){console.error(s),updatePatches([Object.assign(Object.create(s),{plugin:o})])}finally{s.updatePluginHistory(o,{mutationIndex:a})}return s.dispatch()}();function updatePatches(i){i&&(i=Wo.fullyNormalizeArray(i),s.updatePatches(i,o))}}}const tu={refs:Xl,allOf:Ql,parameters:Zl,properties:eu};function makeFetchJSON(s,o={}){const{requestInterceptor:i,responseInterceptor:a}=o,u=s.withCredentials?\"include\":\"same-origin\";return o=>s({url:o,loadSpec:!0,requestInterceptor:i,responseInterceptor:a,headers:{Accept:Dl},credentials:u}).then((s=>s.body))}function isFile(s,o){return o||\"undefined\"==typeof navigator||(o=navigator),o&&\"ReactNative\"===o.product?!(!s||\"object\"!=typeof s||\"string\"!=typeof s.uri):\"undefined\"!=typeof File&&s instanceof File||(\"undefined\"!=typeof Blob&&s instanceof Blob||(!!ArrayBuffer.isView(s)||null!==s&&\"object\"==typeof s&&\"function\"==typeof s.pipe))}function isArrayOfFile(s,o){return Array.isArray(s)&&s.some((s=>isFile(s,o)))}class FileWithData extends File{constructor(s,o=\"\",i={}){super([s],o,i),this.data=s}valueOf(){return this.data}toString(){return this.valueOf()}}const isRfc3986Reserved=s=>\":/?#[]@!$&'()*+,;=\".indexOf(s)>-1,isRfc3986Unreserved=s=>/^[a-z0-9\\-._~]+$/i.test(s);function encodeCharacters(s,o=\"reserved\"){return[...s].map((s=>{if(isRfc3986Unreserved(s))return s;if(isRfc3986Reserved(s)&&\"unsafe\"===o)return s;const i=new TextEncoder;return Array.from(i.encode(s)).map((s=>`0${s.toString(16).toUpperCase()}`.slice(-2))).map((s=>`%${s}`)).join(\"\")})).join(\"\")}function stylize(s){const{value:o}=s;return Array.isArray(o)?function encodeArray({key:s,value:o,style:i,explode:a,escape:u}){if(\"simple\"===i)return o.map((s=>valueEncoder(s,u))).join(\",\");if(\"label\"===i)return`.${o.map((s=>valueEncoder(s,u))).join(\".\")}`;if(\"matrix\"===i)return o.map((s=>valueEncoder(s,u))).reduce(((o,i)=>!o||a?`${o||\"\"};${s}=${i}`:`${o},${i}`),\"\");if(\"form\"===i){const i=a?`&${s}=`:\",\";return o.map((s=>valueEncoder(s,u))).join(i)}if(\"spaceDelimited\"===i){const i=a?`${s}=`:\"\";return o.map((s=>valueEncoder(s,u))).join(` ${i}`)}if(\"pipeDelimited\"===i){const i=a?`${s}=`:\"\";return o.map((s=>valueEncoder(s,u))).join(`|${i}`)}return}(s):\"object\"==typeof o?function encodeObject({key:s,value:o,style:i,explode:a,escape:u}){const _=Object.keys(o);if(\"simple\"===i)return _.reduce(((s,i)=>{const _=valueEncoder(o[i],u);return`${s?`${s},`:\"\"}${i}${a?\"=\":\",\"}${_}`}),\"\");if(\"label\"===i)return _.reduce(((s,i)=>{const _=valueEncoder(o[i],u);return`${s?`${s}.`:\".\"}${i}${a?\"=\":\".\"}${_}`}),\"\");if(\"matrix\"===i&&a)return _.reduce(((s,i)=>`${s?`${s};`:\";\"}${i}=${valueEncoder(o[i],u)}`),\"\");if(\"matrix\"===i)return _.reduce(((i,a)=>{const _=valueEncoder(o[a],u);return`${i?`${i},`:`;${s}=`}${a},${_}`}),\"\");if(\"form\"===i)return _.reduce(((s,i)=>{const _=valueEncoder(o[i],u);return`${s?`${s}${a?\"&\":\",\"}`:\"\"}${i}${a?\"=\":\",\"}${_}`}),\"\");return}(s):function encodePrimitive({key:s,value:o,style:i,escape:a}){if(\"simple\"===i)return valueEncoder(o,a);if(\"label\"===i)return`.${valueEncoder(o,a)}`;if(\"matrix\"===i)return`;${s}=${valueEncoder(o,a)}`;if(\"form\"===i)return valueEncoder(o,a);if(\"deepObject\"===i)return valueEncoder(o,a);return}(s)}function valueEncoder(s,o=!1){return Array.isArray(s)||null!==s&&\"object\"==typeof s?s=JSON.stringify(s):\"number\"!=typeof s&&\"boolean\"!=typeof s||(s=String(s)),o&&\"string\"==typeof s&&s.length>0?encodeCharacters(s,o):null!=s?s:\"\"}const ru={form:\",\",spaceDelimited:\"%20\",pipeDelimited:\"|\"},nu={csv:\",\",ssv:\"%20\",tsv:\"%09\",pipes:\"|\"};function formatKeyValue(s,o,i=!1){const{collectionFormat:a,allowEmptyValue:u,serializationOption:_,encoding:w}=o,x=\"object\"!=typeof o||Array.isArray(o)?o:o.value,C=i?s=>s.toString():s=>encodeURIComponent(s),j=C(s);if(void 0===x&&u)return[[j,\"\"]];if(isFile(x)||isArrayOfFile(x))return[[j,x]];if(_)return formatKeyValueBySerializationOption(s,x,i,_);if(w){if([typeof w.style,typeof w.explode,typeof w.allowReserved].some((s=>\"undefined\"!==s))){const{style:o,explode:a,allowReserved:u}=w;return formatKeyValueBySerializationOption(s,x,i,{style:o,explode:a,allowReserved:u})}if(\"string\"==typeof w.contentType){if(w.contentType.startsWith(\"application/json\")){const s=C(\"string\"==typeof x?x:JSON.stringify(x));return[[j,new FileWithData(s,\"blob\",{type:w.contentType})]]}const s=C(String(x));return[[j,new FileWithData(s,\"blob\",{type:w.contentType})]]}return\"object\"!=typeof x?[[j,C(x)]]:Array.isArray(x)&&x.every((s=>\"object\"!=typeof s))?[[j,x.map(C).join(\",\")]]:[[j,C(JSON.stringify(x))]]}return\"object\"!=typeof x?[[j,C(x)]]:Array.isArray(x)?\"multi\"===a?[[j,x.map(C)]]:[[j,x.map(C).join(nu[a||\"csv\"])]]:[[j,\"\"]]}function formatKeyValueBySerializationOption(s,o,i,a){const u=a.style||\"form\",_=void 0===a.explode?\"form\"===u:a.explode,w=!i&&(a&&a.allowReserved?\"unsafe\":\"reserved\"),encodeFn=s=>valueEncoder(s,w),x=i?s=>s:s=>encodeFn(s);return\"object\"!=typeof o?[[x(s),encodeFn(o)]]:Array.isArray(o)?_?[[x(s),o.map(encodeFn)]]:[[x(s),o.map(encodeFn).join(ru[u])]]:\"deepObject\"===u?Object.keys(o).map((i=>[x(`${s}[${i}]`),encodeFn(o[i])])):_?Object.keys(o).map((s=>[x(s),encodeFn(o[s])])):[[x(s),Object.keys(o).map((s=>[`${x(s)},${encodeFn(o[s])}`])).join(\",\")]]}function encodeFormOrQuery(s){return((s,{encode:o=!0}={})=>{const buildNestedParams=(s,o,i)=>(Array.isArray(i)?i.reduce(((i,a)=>buildNestedParams(s,o,a)),s):i instanceof Date?s.append(o,i.toISOString()):\"object\"==typeof i?Object.entries(i).reduce(((i,[a,u])=>buildNestedParams(s,`${o}[${a}]`,u)),s):s.append(o,i),s),i=Object.entries(s).reduce(((s,[o,i])=>buildNestedParams(s,o,i)),new URLSearchParams),a=String(i);return o?a:decodeURIComponent(a)})(Object.keys(s).reduce(((o,i)=>{for(const[a,u]of formatKeyValue(i,s[i]))o[a]=u instanceof FileWithData?u.valueOf():u;return o}),{}),{encode:!1})}function serializeRequest(s={}){const{url:o=\"\",query:i,form:a}=s;if(a){const o=Object.keys(a).some((s=>{const{value:o}=a[s];return isFile(o)||isArrayOfFile(o)})),i=s.headers[\"content-type\"]||s.headers[\"Content-Type\"];if(o||/multipart\\/form-data/i.test(i)){const o=function request_buildFormData(s){return Object.entries(s).reduce(((s,[o,i])=>{for(const[a,u]of formatKeyValue(o,i,!0))if(Array.isArray(u))for(const o of u)if(ArrayBuffer.isView(o)){const i=new Blob([o]);s.append(a,i)}else s.append(a,o);else if(ArrayBuffer.isView(u)){const o=new Blob([u]);s.append(a,o)}else s.append(a,u);return s}),new FormData)}(s.form);s.formdata=o,s.body=o}else s.body=encodeFormOrQuery(a);delete s.form}if(i){const[a,u]=o.split(\"?\");let _=\"\";if(u){const s=new URLSearchParams(u);Object.keys(i).forEach((o=>s.delete(o))),_=String(s)}const w=((...s)=>{const o=s.filter((s=>s)).join(\"&\");return o?`?${o}`:\"\"})(_,encodeFormOrQuery(i));s.url=a+w,delete s.query}return s}function serializeHeaders(s={}){return\"function\"!=typeof s.entries?{}:Array.from(s.entries()).reduce(((s,[o,i])=>(s[o]=function serializeHeaderValue(s){return s.includes(\", \")?s.split(\", \"):s}(i),s)),{})}function serializeResponse(s,o,{loadSpec:i=!1}={}){const a={ok:s.ok,url:s.url||o,status:s.status,statusText:s.statusText,headers:serializeHeaders(s.headers)},u=a.headers[\"content-type\"],_=i||((s=\"\")=>/(json|xml|yaml|text)\\b/.test(s))(u);return(_?s.text:s.blob||s.buffer).call(s).then((s=>{if(a.text=s,a.data=s,_)try{const o=function parseBody(s,o){return o&&(0===o.indexOf(\"application/json\")||o.indexOf(\"+json\")>0)?JSON.parse(s):fn.load(s)}(s,u);a.body=o,a.obj=o}catch(s){a.parseError=s}return a}))}async function http_http(s,o={}){\"object\"==typeof s&&(s=(o=s).url),o.headers=o.headers||{},(o=serializeRequest(o)).headers&&Object.keys(o.headers).forEach((s=>{const i=o.headers[s];\"string\"==typeof i&&(o.headers[s]=i.replace(/\\n+/g,\" \"))})),o.requestInterceptor&&(o=await o.requestInterceptor(o)||o);const i=o.headers[\"content-type\"]||o.headers[\"Content-Type\"];let a;/multipart\\/form-data/i.test(i)&&(delete o.headers[\"content-type\"],delete o.headers[\"Content-Type\"]);try{a=await(o.userFetch||fetch)(o.url,o),a=await serializeResponse(a,s,o),o.responseInterceptor&&(a=await o.responseInterceptor(a)||a)}catch(s){if(!a)throw s;const o=new Error(a.statusText||`response status is ${a.status}`);throw o.status=a.status,o.statusCode=a.status,o.responseError=s,o}if(!a.ok){const s=new Error(a.statusText||`response status is ${a.status}`);throw s.status=a.status,s.statusCode=a.status,s.response=a,s}return a}const options_retrievalURI=s=>{var o,i;const{baseDoc:a,url:u}=s,_=null!==(o=null!=a?a:u)&&void 0!==o?o:\"\";return\"string\"==typeof(null===(i=globalThis.document)||void 0===i?void 0:i.baseURI)?String(new URL(_,globalThis.document.baseURI)):_},options_httpClient=s=>{const{fetch:o,http:i}=s;return o||i||http_http};async function resolveGenericStrategy(s){const{spec:o,mode:i,allowMetaPatches:a=!0,pathDiscriminator:u,modelPropertyMacro:_,parameterMacro:w,requestInterceptor:x,responseInterceptor:C,skipNormalization:j=!1,useCircularStructures:L,strategies:B}=s,$=options_retrievalURI(s),V=options_httpClient(s),U=B.find((s=>s.match(o)));return async function doResolve(s){$&&(tu.refs.docCache[$]=s);tu.refs.fetchJSON=makeFetchJSON(V,{requestInterceptor:x,responseInterceptor:C});const o=[tu.refs];\"function\"==typeof w&&o.push(tu.parameters);\"function\"==typeof _&&o.push(tu.properties);\"strict\"!==i&&o.push(tu.allOf);const B=await function mapSpec(s){return new SpecMap(s).dispatch()}({spec:s,context:{baseDoc:$},plugins:o,allowMetaPatches:a,pathDiscriminator:u,parameterMacro:w,modelPropertyMacro:_,useCircularStructures:L});j||(B.spec=U.normalize(B.spec));return B}(o)}const su=_curry2((function and(s,o){return s&&o}));const ou=_curry2((function both(s,o){return _isFunction(s)?function _both(){return s.apply(this,arguments)&&o.apply(this,arguments)}:hc(su)(s,o)}));const iu=na(null);const au=dc(iu);function isOfTypeObject_typeof(s){return isOfTypeObject_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},isOfTypeObject_typeof(s)}const cu=function isOfTypeObject(s){return\"object\"===isOfTypeObject_typeof(s)};const lu=$a(1,ou(au,cu));var uu=pipe(ra,Ic(\"Object\")),pu=pipe(ga,na(ga(Object))),hu=Qo(ou(Mc,pu),[\"constructor\"]),du=$a(1,(function(s){if(!lu(s)||!uu(s))return!1;var o=Object.getPrototypeOf(s);return!!iu(o)||hu(o)}));const fu=du,replace_special_chars_with_underscore=s=>s.replace(/\\W/gi,\"_\");function opId(s,o,i=\"\",{v2OperationIdCompatibilityMode:a}={}){if(!s||\"object\"!=typeof s)return null;return(s.operationId||\"\").replace(/\\s/g,\"\").length?replace_special_chars_with_underscore(s.operationId):function idFromPathMethod(s,o,{v2OperationIdCompatibilityMode:i}={}){if(i){let i=`${o.toLowerCase()}_${s}`.replace(/[\\s!@#$%^&*()_+=[{\\]};:<>|./?,\\\\'\"\"-]/g,\"_\");return i=i||`${s.substring(1)}_${o}`,i.replace(/((_){2,})/g,\"_\").replace(/^(_)*/g,\"\").replace(/([_])*$/g,\"\")}return`${o.toLowerCase()}${replace_special_chars_with_underscore(s)}`}(o,i,{v2OperationIdCompatibilityMode:a})}function normalize_normalize(s){const{spec:o}=s,{paths:i}=o,a={};if(!i||o.$$normalized)return s;for(const s in i){const u=i[s];if(null==u||![\"object\",\"function\"].includes(typeof u))continue;const _=u.parameters;for(const i in u){const w=u[i];if(null==w||![\"object\",\"function\"].includes(typeof w))continue;const x=opId(w,s,i);if(x){a[x]?a[x].push(w):a[x]=[w];const s=a[x];if(s.length>1)s.forEach(((s,o)=>{s.__originalOperationId=s.__originalOperationId||s.operationId,s.operationId=`${x}${o+1}`}));else if(void 0!==w.operationId){const o=s[0];o.__originalOperationId=o.__originalOperationId||w.operationId,o.operationId=x}}if(\"parameters\"!==i){const s=[],i={};for(const a in o)\"produces\"!==a&&\"consumes\"!==a&&\"security\"!==a||(i[a]=o[a],s.push(i));if(_&&(i.parameters=_,s.push(i)),s.length)for(const o of s)for(const s in o)if(Array.isArray(w[s])){if(\"parameters\"===s)for(const i of o[s]){w[s].some((s=>!(!fu(s)&&!fu(i))&&(s===i||[\"name\",\"$ref\",\"$$ref\"].some((o=>\"string\"==typeof s[o]&&\"string\"==typeof i[o]&&s[o]===i[o])))))||w[s].push(i)}}else w[s]=o[s]}}}return o.$$normalized=!0,s}const mu={name:\"generic\",match:()=>!0,normalize(s){const{spec:o}=normalize_normalize({spec:s});return o},resolve:async s=>resolveGenericStrategy(s)},gu=mu;const isOpenAPI30=s=>{try{const{openapi:o}=s;return\"string\"==typeof o&&/^3\\.0\\.(?:[1-9]\\d*|0)$/.test(o)}catch{return!1}},isOpenAPI31=s=>{try{const{openapi:o}=s;return\"string\"==typeof o&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(o)}catch{return!1}},isOpenAPI3=s=>isOpenAPI30(s)||isOpenAPI31(s),yu={name:\"openapi-2\",match:s=>(s=>{try{const{swagger:o}=s;return\"2.0\"===o}catch{return!1}})(s),normalize(s){const{spec:o}=normalize_normalize({spec:s});return o},resolve:async s=>async function resolveOpenAPI2Strategy(s){return resolveGenericStrategy(s)}(s)},vu=yu;const bu={name:\"openapi-3-0\",match:s=>isOpenAPI30(s),normalize(s){const{spec:o}=normalize_normalize({spec:s});return o},resolve:async s=>async function resolveOpenAPI30Strategy(s){return resolveGenericStrategy(s)}(s)},_u=bu;var Su=__webpack_require__(34035);function _reduced(s){return s&&s[\"@@transducer/reduced\"]?s:{\"@@transducer/value\":s,\"@@transducer/reduced\":!0}}var Eu=function(){function XAll(s,o){this.xf=o,this.f=s,this.all=!0}return XAll.prototype[\"@@transducer/init\"]=_xfBase_init,XAll.prototype[\"@@transducer/result\"]=function(s){return this.all&&(s=this.xf[\"@@transducer/step\"](s,!0)),this.xf[\"@@transducer/result\"](s)},XAll.prototype[\"@@transducer/step\"]=function(s,o){return this.f(o)||(this.all=!1,s=_reduced(this.xf[\"@@transducer/step\"](s,!1))),s},XAll}();function _xall(s){return function(o){return new Eu(s,o)}}var wu=_curry2(_dispatchable([\"all\"],_xall,(function all(s,o){for(var i=0;i<o.length;){if(!s(o[i]))return!1;i+=1}return!0})));const xu=wu;class Annotation extends Su.Om{constructor(s,o,i){super(s,o,i),this.element=\"annotation\"}get code(){return this.attributes.get(\"code\")}set code(s){this.attributes.set(\"code\",s)}}const ku=Annotation;class Comment extends Su.Om{constructor(s,o,i){super(s,o,i),this.element=\"comment\"}}const Ou=Comment;class ParseResult extends Su.wE{constructor(s,o,i){super(s,o,i),this.element=\"parseResult\"}get api(){return this.children.filter((s=>s.classes.contains(\"api\"))).first}get results(){return this.children.filter((s=>s.classes.contains(\"result\")))}get result(){return this.results.first}get annotations(){return this.children.filter((s=>\"annotation\"===s.element))}get warnings(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"warning\")))}get errors(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"error\")))}get isEmpty(){return this.children.reject((s=>\"annotation\"===s.element)).isEmpty}replaceResult(s){const{result:o}=this;if(bc(o))return!1;const i=this.content.findIndex((s=>s===o));return-1!==i&&(this.content[i]=s,!0)}}const Cu=ParseResult;class SourceMap extends Su.wE{constructor(s,o,i){super(s,o,i),this.element=\"sourceMap\"}get positionStart(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(0)}get positionEnd(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(1)}set position(s){if(void 0===s)return;const o=new Su.wE([s.start.row,s.start.column,s.start.char]),i=new Su.wE([s.end.row,s.end.column,s.end.char]);o.classes.push(\"position\"),i.classes.push(\"position\"),this.push(o).push(i)}}const Au=SourceMap,hasMethod=(s,o)=>\"object\"==typeof o&&null!==o&&s in o&&\"function\"==typeof o[s],hasBasicElementProps=s=>\"object\"==typeof s&&null!=s&&\"_storedElement\"in s&&\"string\"==typeof s._storedElement&&\"_content\"in s,primitiveEq=(s,o)=>\"object\"==typeof o&&null!==o&&\"primitive\"in o&&(\"function\"==typeof o.primitive&&o.primitive()===s),hasClass=(s,o)=>\"object\"==typeof o&&null!==o&&\"classes\"in o&&(Array.isArray(o.classes)||o.classes instanceof Su.wE)&&o.classes.includes(s),isElementType=(s,o)=>\"object\"==typeof o&&null!==o&&\"element\"in o&&o.element===s,helpers=s=>s({hasMethod,hasBasicElementProps,primitiveEq,isElementType,hasClass}),ju=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.Hg||s(i)&&o(void 0,i))),Iu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.Om||s(i)&&o(\"string\",i))),Pu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.kT||s(i)&&o(\"number\",i))),Tu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.Os||s(i)&&o(\"null\",i))),Nu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.bd||s(i)&&o(\"boolean\",i))),Mu=helpers((({hasBasicElementProps:s,primitiveEq:o,hasMethod:i})=>a=>a instanceof Su.Sh||s(a)&&o(\"object\",a)&&i(\"keys\",a)&&i(\"values\",a)&&i(\"items\",a))),Ru=helpers((({hasBasicElementProps:s,primitiveEq:o,hasMethod:i})=>a=>a instanceof Su.wE&&!(a instanceof Su.Sh)||s(a)&&o(\"array\",a)&&i(\"push\",a)&&i(\"unshift\",a)&&i(\"map\",a)&&i(\"reduce\",a))),Du=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Su.Pr||s(a)&&o(\"member\",a)&&i(void 0,a))),Lu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Su.Ft||s(a)&&o(\"link\",a)&&i(void 0,a))),Fu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Su.sI||s(a)&&o(\"ref\",a)&&i(void 0,a))),Bu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof ku||s(a)&&o(\"annotation\",a)&&i(\"array\",a))),$u=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ou||s(a)&&o(\"comment\",a)&&i(\"string\",a))),qu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Cu||s(a)&&o(\"parseResult\",a)&&i(\"array\",a))),Vu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Au||s(a)&&o(\"sourceMap\",a)&&i(\"array\",a))),isPrimitiveElement=s=>isElementType(\"object\",s)||isElementType(\"array\",s)||isElementType(\"boolean\",s)||isElementType(\"number\",s)||isElementType(\"string\",s)||isElementType(\"null\",s)||isElementType(\"member\",s),hasElementSourceMap=s=>Vu(s.meta.get(\"sourceMap\")),includesSymbols=(s,o)=>{if(0===s.length)return!0;const i=o.attributes.get(\"symbols\");return!!Ru(i)&&xu(sc(i.toValue()),s)},includesClasses=(s,o)=>0===s.length||xu(sc(o.classes.toValue()),s);const es_T=function(){return!0};const es_F=function(){return!1},getVisitFn=(s,o,i)=>{const a=s[o];if(null!=a){if(!i&&\"function\"==typeof a)return a;const s=i?a.leave:a.enter;if(\"function\"==typeof s)return s}else{const a=i?s.leave:s.enter;if(null!=a){if(\"function\"==typeof a)return a;const s=a[o];if(\"function\"==typeof s)return s}}return null},Uu={},getNodeType=s=>null==s?void 0:s.type,isNode=s=>\"string\"==typeof getNodeType(s),cloneNode=s=>Object.create(Object.getPrototypeOf(s),Object.getOwnPropertyDescriptors(s)),mergeAll=(s,{visitFnGetter:o=getVisitFn,nodeTypeGetter:i=getNodeType,breakSymbol:a=Uu,deleteNodeSymbol:u=null,skipVisitingNodeSymbol:_=!1,exposeEdits:w=!1}={})=>{const x=Symbol(\"skip\"),C=new Array(s.length).fill(x);return{enter(j,L,B,$,V,U){let z=j,Y=!1;const Z={...U,replaceWith(s,o){U.replaceWith(s,o),z=s}};for(let j=0;j<s.length;j+=1)if(C[j]===x){const x=o(s[j],i(z),!1);if(\"function\"==typeof x){const o=x.call(s[j],z,L,B,$,V,Z);if(\"function\"==typeof(null==o?void 0:o.then))throw new Go(\"Async visitor not supported in sync mode\",{visitor:s[j],visitFn:x});if(o===_)C[j]=z;else if(o===a)C[j]=a;else{if(o===u)return o;if(void 0!==o){if(!w)return o;z=o,Y=!0}}}}return Y?z:void 0},leave(u,w,j,L,B,$){let V=u;const U={...$,replaceWith(s,o){$.replaceWith(s,o),V=s}};for(let u=0;u<s.length;u+=1)if(C[u]===x){const x=o(s[u],i(V),!0);if(\"function\"==typeof x){const o=x.call(s[u],V,w,j,L,B,U);if(\"function\"==typeof(null==o?void 0:o.then))throw new Go(\"Async visitor not supported in sync mode\",{visitor:s[u],visitFn:x});if(o===a)C[u]=a;else if(void 0!==o&&o!==_)return o}}else C[u]===V&&(C[u]=x)}}};mergeAll[Symbol.for(\"nodejs.util.promisify.custom\")]=(s,{visitFnGetter:o=getVisitFn,nodeTypeGetter:i=getNodeType,breakSymbol:a=Uu,deleteNodeSymbol:u=null,skipVisitingNodeSymbol:_=!1,exposeEdits:w=!1}={})=>{const x=Symbol(\"skip\"),C=new Array(s.length).fill(x);return{async enter(j,L,B,$,V,U){let z=j,Y=!1;const Z={...U,replaceWith(s,o){U.replaceWith(s,o),z=s}};for(let j=0;j<s.length;j+=1)if(C[j]===x){const x=o(s[j],i(z),!1);if(\"function\"==typeof x){const o=await x.call(s[j],z,L,B,$,V,Z);if(o===_)C[j]=z;else if(o===a)C[j]=a;else{if(o===u)return o;if(void 0!==o){if(!w)return o;z=o,Y=!0}}}}return Y?z:void 0},async leave(u,w,j,L,B,$){let V=u;const U={...$,replaceWith(s,o){$.replaceWith(s,o),V=s}};for(let u=0;u<s.length;u+=1)if(C[u]===x){const x=o(s[u],i(V),!0);if(\"function\"==typeof x){const o=await x.call(s[u],V,w,j,L,B,U);if(o===a)C[u]=a;else if(void 0!==o&&o!==_)return o}}else C[u]===V&&(C[u]=x)}}};const visit=(s,o,{keyMap:i=null,state:a={},breakSymbol:u=Uu,deleteNodeSymbol:_=null,skipVisitingNodeSymbol:w=!1,visitFnGetter:x=getVisitFn,nodeTypeGetter:C=getNodeType,nodePredicate:j=isNode,nodeCloneFn:L=cloneNode,detectCycles:B=!0}={})=>{const $=i||{};let V,U,z=Array.isArray(s),Y=[s],Z=-1,ee=[],ie=s;const ae=[],ce=[];do{Z+=1;const s=Z===Y.length;let i;const de=s&&0!==ee.length;if(s){if(i=0===ce.length?void 0:ae.pop(),ie=U,U=ce.pop(),de)if(z){ie=ie.slice();let s=0;for(const[o,i]of ee){const a=o-s;i===_?(ie.splice(a,1),s+=1):ie[a]=i}}else{ie=L(ie);for(const[s,o]of ee)ie[s]=o}Z=V.index,Y=V.keys,ee=V.edits,z=V.inArray,V=V.prev}else if(U!==_&&void 0!==U){if(i=z?Z:Y[Z],ie=U[i],ie===_||void 0===ie)continue;ae.push(i)}let fe;if(!Array.isArray(ie)){var le;if(!j(ie))throw new Go(`Invalid AST Node:  ${String(ie)}`,{node:ie});if(B&&ce.includes(ie)){ae.pop();continue}const _=x(o,C(ie),s);if(_){for(const[s,i]of Object.entries(a))o[s]=i;const u={replaceWith(o,a){\"function\"==typeof a?a(o,ie,i,U,ae,ce):U&&(U[i]=o),s||(ie=o)}};fe=_.call(o,ie,i,U,ae,ce,u)}if(\"function\"==typeof(null===(le=fe)||void 0===le?void 0:le.then))throw new Go(\"Async visitor not supported in sync mode\",{visitor:o,visitFn:_});if(fe===u)break;if(fe===w){if(!s){ae.pop();continue}}else if(void 0!==fe&&(ee.push([i,fe]),!s)){if(!j(fe)){ae.pop();continue}ie=fe}}var pe;if(void 0===fe&&de&&ee.push([i,ie]),!s)V={inArray:z,index:Z,keys:Y,edits:ee,prev:V},z=Array.isArray(ie),Y=z?ie:null!==(pe=$[C(ie)])&&void 0!==pe?pe:[],Z=-1,ee=[],U!==_&&void 0!==U&&ce.push(U),U=ie}while(void 0!==V);return 0!==ee.length?ee[ee.length-1][1]:s};visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,o,{keyMap:i=null,state:a={},breakSymbol:u=Uu,deleteNodeSymbol:_=null,skipVisitingNodeSymbol:w=!1,visitFnGetter:x=getVisitFn,nodeTypeGetter:C=getNodeType,nodePredicate:j=isNode,nodeCloneFn:L=cloneNode,detectCycles:B=!0}={})=>{const $=i||{};let V,U,z=Array.isArray(s),Y=[s],Z=-1,ee=[],ie=s;const ae=[],ce=[];do{Z+=1;const s=Z===Y.length;let i;const pe=s&&0!==ee.length;if(s){if(i=0===ce.length?void 0:ae.pop(),ie=U,U=ce.pop(),pe)if(z){ie=ie.slice();let s=0;for(const[o,i]of ee){const a=o-s;i===_?(ie.splice(a,1),s+=1):ie[a]=i}}else{ie=L(ie);for(const[s,o]of ee)ie[s]=o}Z=V.index,Y=V.keys,ee=V.edits,z=V.inArray,V=V.prev}else if(U!==_&&void 0!==U){if(i=z?Z:Y[Z],ie=U[i],ie===_||void 0===ie)continue;ae.push(i)}let de;if(!Array.isArray(ie)){if(!j(ie))throw new Go(`Invalid AST Node: ${String(ie)}`,{node:ie});if(B&&ce.includes(ie)){ae.pop();continue}const _=x(o,C(ie),s);if(_){for(const[s,i]of Object.entries(a))o[s]=i;const u={replaceWith(o,a){\"function\"==typeof a?a(o,ie,i,U,ae,ce):U&&(U[i]=o),s||(ie=o)}};de=await _.call(o,ie,i,U,ae,ce,u)}if(de===u)break;if(de===w){if(!s){ae.pop();continue}}else if(void 0!==de&&(ee.push([i,de]),!s)){if(!j(de)){ae.pop();continue}ie=de}}var le;if(void 0===de&&pe&&ee.push([i,ie]),!s)V={inArray:z,index:Z,keys:Y,edits:ee,prev:V},z=Array.isArray(ie),Y=z?ie:null!==(le=$[C(ie)])&&void 0!==le?le:[],Z=-1,ee=[],U!==_&&void 0!==U&&ce.push(U),U=ie}while(void 0!==V);return 0!==ee.length?ee[ee.length-1][1]:s};const zu=class CloneError extends Go{value;constructor(s,o){super(s,o),void 0!==o&&(this.value=o.value)}};const Wu=class DeepCloneError extends zu{};const Ju=class ShallowCloneError extends zu{},cloneDeep=(s,o={})=>{const{visited:i=new WeakMap}=o,a={...o,visited:i};if(i.has(s))return i.get(s);if(s instanceof Su.KeyValuePair){const{key:o,value:u}=s,_=ju(o)?cloneDeep(o,a):o,w=ju(u)?cloneDeep(u,a):u,x=new Su.KeyValuePair(_,w);return i.set(s,x),x}if(s instanceof Su.ot){const mapper=s=>cloneDeep(s,a),o=[...s].map(mapper),u=new Su.ot(o);return i.set(s,u),u}if(s instanceof Su.G6){const mapper=s=>cloneDeep(s,a),o=[...s].map(mapper),u=new Su.G6(o);return i.set(s,u),u}if(ju(s)){const o=cloneShallow(s);if(i.set(s,o),s.content)if(ju(s.content))o.content=cloneDeep(s.content,a);else if(s.content instanceof Su.KeyValuePair)o.content=cloneDeep(s.content,a);else if(Array.isArray(s.content)){const mapper=s=>cloneDeep(s,a);o.content=s.content.map(mapper)}else o.content=s.content;else o.content=s.content;return o}throw new Wu(\"Value provided to cloneDeep function couldn't be cloned\",{value:s})};cloneDeep.safe=s=>{try{return cloneDeep(s)}catch{return s}};const cloneShallowKeyValuePair=s=>{const{key:o,value:i}=s;return new Su.KeyValuePair(o,i)},cloneShallowElement=s=>{const o=new s.constructor;if(o.element=s.element,s.meta.length>0&&(o._meta=cloneDeep(s.meta)),s.attributes.length>0&&(o._attributes=cloneDeep(s.attributes)),ju(s.content)){const i=s.content;o.content=cloneShallowElement(i)}else Array.isArray(s.content)?o.content=[...s.content]:s.content instanceof Su.KeyValuePair?o.content=cloneShallowKeyValuePair(s.content):o.content=s.content;return o},cloneShallow=s=>{if(s instanceof Su.KeyValuePair)return cloneShallowKeyValuePair(s);if(s instanceof Su.ot)return(s=>{const o=[...s];return new Su.ot(o)})(s);if(s instanceof Su.G6)return(s=>{const o=[...s];return new Su.G6(o)})(s);if(ju(s))return cloneShallowElement(s);throw new Ju(\"Value provided to cloneShallow function couldn't be cloned\",{value:s})};cloneShallow.safe=s=>{try{return cloneShallow(s)}catch{return s}};const visitor_getNodeType=s=>Mu(s)?\"ObjectElement\":Ru(s)?\"ArrayElement\":Du(s)?\"MemberElement\":Iu(s)?\"StringElement\":Nu(s)?\"BooleanElement\":Pu(s)?\"NumberElement\":Tu(s)?\"NullElement\":Lu(s)?\"LinkElement\":Fu(s)?\"RefElement\":void 0,visitor_cloneNode=s=>ju(s)?cloneShallow(s):cloneNode(s),Hu=pipe(visitor_getNodeType,Jc),Ku={ObjectElement:[\"content\"],ArrayElement:[\"content\"],MemberElement:[\"key\",\"value\"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:[\"content\"],SourceMap:[\"content\"]};class PredicateVisitor{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:s=es_F,returnOnTrue:o,returnOnFalse:i}={}){this.result=[],this.predicate=s,this.returnOnTrue=o,this.returnOnFalse=i}enter(s){return this.predicate(s)?(this.result.push(s),this.returnOnTrue):this.returnOnFalse}}const visitor_visit=(s,o,{keyMap:i=Ku,...a}={})=>visit(s,o,{keyMap:i,nodeTypeGetter:visitor_getNodeType,nodePredicate:Hu,nodeCloneFn:visitor_cloneNode,...a});visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,o,{keyMap:i=Ku,...a}={})=>visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,o,{keyMap:i,nodeTypeGetter:visitor_getNodeType,nodePredicate:Hu,nodeCloneFn:visitor_cloneNode,...a});const nodeTypeGetter=s=>\"string\"==typeof(null==s?void 0:s.type)?s.type:visitor_getNodeType(s),Gu={EphemeralObject:[\"content\"],EphemeralArray:[\"content\"],...Ku},value_visitor_visit=(s,o,{keyMap:i=Gu,...a}={})=>visitor_visit(s,o,{keyMap:i,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),...a});value_visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,{keyMap:o=Gu,...i}={})=>visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,visitor,{keyMap:o,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),...i});const Yu=class EphemeralArray{type=\"EphemeralArray\";content=[];reference=void 0;constructor(s){this.content=s,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const Xu=class EphemeralObject{type=\"EphemeralObject\";content=[];reference=void 0;constructor(s){this.content=s,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class Visitor{ObjectElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const o=new Xu(s.content);return this.references.set(s,o),o}};EphemeralObject={leave:s=>s.toObject()};MemberElement={enter:s=>[s.key,s.value]};ArrayElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const o=new Yu(s.content);return this.references.set(s,o),o}};EphemeralArray={leave:s=>s.toArray()};references=new WeakMap;BooleanElement(s){return s.toValue()}NumberElement(s){return s.toValue()}StringElement(s){return s.toValue()}NullElement(){return null}RefElement(s,...o){var i;const a=o[3];return\"EphemeralObject\"===(null===(i=a[a.length-1])||void 0===i?void 0:i.type)?Symbol.for(\"delete-node\"):String(s.toValue())}LinkElement(s){return Iu(s.href)?s.href.toValue():\"\"}}const serializers_value=s=>ju(s)?Iu(s)||Pu(s)||Nu(s)||Tu(s)?s.toValue():value_visitor_visit(s,new Visitor):s;const Qu=_curry3((function mergeWithKey(s,o,i){var a,u={};for(a in i=i||{},o=o||{})_has(a,o)&&(u[a]=_has(a,i)?s(a,o[a],i[a]):o[a]);for(a in i)_has(a,i)&&!_has(a,u)&&(u[a]=i[a]);return u}));const Zu=_curry3((function mergeDeepWithKey(s,o,i){return Qu((function(o,i,a){return _isObject(i)&&_isObject(a)?mergeDeepWithKey(s,i,a):s(o,i,a)}),o,i)}));const ep=_curry2((function mergeDeepRight(s,o){return Zu((function(s,o,i){return i}),s,o)}));const tp=_curry2(_path);const rp=ja(0,-1);const np=_curry2((function apply(s,o){return s.apply(this,o)}));const sp=dc(Mc);var op=_curry1((function empty(s){return null!=s&&\"function\"==typeof s[\"fantasy-land/empty\"]?s[\"fantasy-land/empty\"]():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor[\"fantasy-land/empty\"]?s.constructor[\"fantasy-land/empty\"]():null!=s&&\"function\"==typeof s.empty?s.empty():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor.empty?s.constructor.empty():ca(s)?[]:_isString(s)?\"\":_isObject(s)?{}:Ei(s)?function(){return arguments}():function _isTypedArray(s){var o=Object.prototype.toString.call(s);return\"[object Uint8ClampedArray]\"===o||\"[object Int8Array]\"===o||\"[object Uint8Array]\"===o||\"[object Int16Array]\"===o||\"[object Uint16Array]\"===o||\"[object Int32Array]\"===o||\"[object Uint32Array]\"===o||\"[object Float32Array]\"===o||\"[object Float64Array]\"===o||\"[object BigInt64Array]\"===o||\"[object BigUint64Array]\"===o}(s)?s.constructor.from(\"\"):void 0}));const ip=op;const cp=_curry1((function isEmpty(s){return null!=s&&na(s,ip(s))}));const lp=$a(1,Mc(Array.isArray)?Array.isArray:pipe(ra,Ic(\"Array\")));const up=ou(lp,cp);var pp=$a(3,(function(s,o,i){var a=tp(s,i),u=tp(rp(s),i);if(!sp(a)&&!up(s)){var _=Ea(a,u);return np(_,o)}}));const hp=pp;class Namespace extends Su.g${constructor(){super(),this.register(\"annotation\",ku),this.register(\"comment\",Ou),this.register(\"parseResult\",Cu),this.register(\"sourceMap\",Au)}}const dp=new Namespace,createNamespace=s=>{const o=new Namespace;return fu(s)&&o.use(s),o},fp=dp,toolbox=()=>({predicates:{...ie},namespace:fp}),mp={toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType,exposeEdits:!0}},dispatchPluginsSync=(s,o,i={})=>{if(0===o.length)return s;const a=ep(mp,i),{toolboxCreator:u,visitorOptions:_}=a,w=u(),x=o.map((s=>s(w))),C=mergeAll(x.map(La({},\"visitor\")),{..._});x.forEach(hp([\"pre\"],[]));const j=visitor_visit(s,C,_);return x.forEach(hp([\"post\"],[])),j};dispatchPluginsSync[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,o,i={})=>{if(0===o.length)return s;const a=ep(mp,i),{toolboxCreator:u,visitorOptions:_}=a,w=u(),x=o.map((s=>s(w))),C=mergeAll[Symbol.for(\"nodejs.util.promisify.custom\")],j=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],L=C(x.map(La({},\"visitor\")),{..._});await Promise.allSettled(x.map(hp([\"pre\"],[])));const B=await j(s,L,_);return await Promise.allSettled(x.map(hp([\"post\"],[]))),B};const refract=(s,{Type:o,plugins:i=[]})=>{const a=new o(s);return ju(s)&&(s.meta.length>0&&(a.meta=cloneDeep(s.meta)),s.attributes.length>0&&(a.attributes=cloneDeep(s.attributes))),dispatchPluginsSync(a,i,{toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType}})},createRefractor=s=>(o,i={})=>refract(o,{...i,Type:s});Su.Sh.refract=createRefractor(Su.Sh),Su.wE.refract=createRefractor(Su.wE),Su.Om.refract=createRefractor(Su.Om),Su.bd.refract=createRefractor(Su.bd),Su.Os.refract=createRefractor(Su.Os),Su.kT.refract=createRefractor(Su.kT),Su.Ft.refract=createRefractor(Su.Ft),Su.sI.refract=createRefractor(Su.sI),ku.refract=createRefractor(ku),Ou.refract=createRefractor(Ou),Cu.refract=createRefractor(Cu),Au.refract=createRefractor(Au);const computeEdges=(s,o=new WeakMap)=>(Du(s)?(o.set(s.key,s),computeEdges(s.key,o),o.set(s.value,s),computeEdges(s.value,o)):s.children.forEach((i=>{o.set(i,s),computeEdges(i,o)})),o);const gp=class Transcluder_Transcluder{element;edges;constructor({element:s}){this.element=s}transclude(s,o){var i;if(s===this.element)return o;if(s===o)return this.element;this.edges=null!==(i=this.edges)&&void 0!==i?i:computeEdges(this.element);const a=this.edges.get(s);return bc(a)?void 0:(Mu(a)?((s,o,i)=>{const a=i.get(s);Mu(a)&&(a.content=a.map(((u,_,w)=>w===s?(i.delete(s),i.set(o,a),o):w)))})(s,o,this.edges):Ru(a)?((s,o,i)=>{const a=i.get(s);Ru(a)&&(a.content=a.map((u=>u===s?(i.delete(s),i.set(o,a),o):u)))})(s,o,this.edges):Du(a)&&((s,o,i)=>{const a=i.get(s);Du(a)&&(a.key===s&&(a.key=o,i.delete(s),i.set(o,a)),a.value===s&&(a.value=o,i.delete(s),i.set(o,a)))})(s,o,this.edges),this.element)}},fromURIReference=s=>{const o=s.indexOf(\"#\");return(s=>{try{const o=s.startsWith(\"#\")?s.slice(1):s;return decodeURIComponent(o)}catch{return s}})(-1===o?\"#\":s.substring(o))},yp=function fnparser(){const s=Ep,o=Sp,i=this,a=\"parser.js: Parser(): \";i.ast=void 0,i.stats=void 0,i.trace=void 0,i.callbacks=[];let u,_,w,x,C,j,L,B=0,$=0,V=0,U=0,z=0,Y=new function systemData(){this.state=s.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=s.ACTIVE,this.phraseLength=0}};i.parse=(Z,ee,ie,ae)=>{const ce=`${a}parse(): `;B=0,$=0,V=0,U=0,z=0,u=void 0,_=void 0,w=void 0,x=void 0,Y.refresh(),C=void 0,j=void 0,L=void 0,x=o.stringToChars(ie),u=Z.rules,_=Z.udts;const le=ee.toLowerCase();let pe;for(const s in u)if(u.hasOwnProperty(s)&&le===u[s].lower){pe=u[s].index;break}if(void 0===pe)throw new Error(`${ce}start rule name '${startRule}' not recognized`);(()=>{const s=`${a}initializeCallbacks(): `;let o,w;for(C=[],j=[],o=0;o<u.length;o+=1)C[o]=void 0;for(o=0;o<_.length;o+=1)j[o]=void 0;const x=[];for(o=0;o<u.length;o+=1)x.push(u[o].lower);for(o=0;o<_.length;o+=1)x.push(_[o].lower);for(const a in i.callbacks)if(i.callbacks.hasOwnProperty(a)){if(o=x.indexOf(a.toLowerCase()),o<0)throw new Error(`${s}syntax callback '${a}' not a rule or udt name`);if(w=i.callbacks[a]?i.callbacks[a]:void 0,\"function\"!=typeof w&&void 0!==w)throw new Error(`${s}syntax callback[${a}] must be function reference or falsy)`);o<u.length?C[o]=w:j[o-u.length]=w}})(),i.trace&&i.trace.init(u,_,x),i.stats&&i.stats.init(u,_),i.ast&&i.ast.init(u,_,x),L=ae,w=[{type:s.RNM,index:pe}],opExecute(0,0),w=void 0;let de=!1;switch(Y.state){case s.ACTIVE:throw new Error(`${ce}final state should never be 'ACTIVE'`);case s.NOMATCH:de=!1;break;case s.EMPTY:case s.MATCH:de=Y.phraseLength===x.length;break;default:throw new Error(\"unrecognized state\")}return{success:de,state:Y.state,stateName:s.idName(Y.state),length:x.length,matched:Y.phraseLength,maxMatched:z,maxTreeDepth:V,nodeHits:U}};const validateRnmCallbackResult=(o,i,u,_)=>{if(i.phraseLength>u){let s=`${a}opRNM(${o.name}): callback function error: `;throw s+=`sysData.phraseLength: ${i.phraseLength}`,s+=` must be <= remaining chars: ${u}`,new Error(s)}switch(i.state){case s.ACTIVE:if(!_)throw new Error(`${a}opRNM(${o.name}): callback function return error. ACTIVE state not allowed.`);break;case s.EMPTY:i.phraseLength=0;break;case s.MATCH:0===i.phraseLength&&(i.state=s.EMPTY);break;case s.NOMATCH:i.phraseLength=0;break;default:throw new Error(`${a}opRNM(${o.name}): callback function return error. Unrecognized return state: ${i.state}`)}},opUDT=(o,C)=>{let $,V,U;const z=w[o],Z=_[z.index];Y.UdtIndex=Z.index,B||(U=i.ast&&i.ast.udtDefined(z.index),U&&(V=u.length+z.index,$=i.ast.getLength(),i.ast.down(V,Z.name)));const ee=x.length-C;j[z.index](Y,x,C,L),((o,i,u)=>{if(i.phraseLength>u){let s=`${a}opUDT(${o.name}): callback function error: `;throw s+=`sysData.phraseLength: ${i.phraseLength}`,s+=` must be <= remaining chars: ${u}`,new Error(s)}switch(i.state){case s.ACTIVE:throw new Error(`${a}opUDT(${o.name}) ACTIVE state return not allowed.`);case s.EMPTY:if(!o.empty)throw new Error(`${a}opUDT(${o.name}) may not return EMPTY.`);i.phraseLength=0;break;case s.MATCH:if(0===i.phraseLength){if(!o.empty)throw new Error(`${a}opUDT(${o.name}) may not return EMPTY.`);i.state=s.EMPTY}break;case s.NOMATCH:i.phraseLength=0;break;default:throw new Error(`${a}opUDT(${o.name}): callback function return error. Unrecognized return state: ${i.state}`)}})(Z,Y,ee),B||U&&(Y.state===s.NOMATCH?i.ast.setLength($):i.ast.up(V,Z.name,C,Y.phraseLength))},opExecute=(o,_)=>{const j=`${a}opExecute(): `,Z=w[o];switch(U+=1,$>V&&(V=$),$+=1,Y.refresh(),i.trace&&i.trace.down(Z,_),Z.type){case s.ALT:((o,i)=>{const a=w[o];for(let o=0;o<a.children.length&&(opExecute(a.children[o],i),Y.state===s.NOMATCH);o+=1);})(o,_);break;case s.CAT:((o,a)=>{let u,_,x,C;const j=w[o];i.ast&&(_=i.ast.getLength()),u=!0,x=a,C=0;for(let o=0;o<j.children.length;o+=1){if(opExecute(j.children[o],x),Y.state===s.NOMATCH){u=!1;break}x+=Y.phraseLength,C+=Y.phraseLength}u?(Y.state=0===C?s.EMPTY:s.MATCH,Y.phraseLength=C):(Y.state=s.NOMATCH,Y.phraseLength=0,i.ast&&i.ast.setLength(_))})(o,_);break;case s.REP:((o,a)=>{let u,_,C,j;const L=w[o];if(0===L.max)return Y.state=s.EMPTY,void(Y.phraseLength=0);for(_=a,C=0,j=0,i.ast&&(u=i.ast.getLength());!(_>=x.length)&&(opExecute(o+1,_),Y.state!==s.NOMATCH)&&Y.state!==s.EMPTY&&(j+=1,C+=Y.phraseLength,_+=Y.phraseLength,j!==L.max););Y.state===s.EMPTY||j>=L.min?(Y.state=0===C?s.EMPTY:s.MATCH,Y.phraseLength=C):(Y.state=s.NOMATCH,Y.phraseLength=0,i.ast&&i.ast.setLength(u))})(o,_);break;case s.RNM:((o,a)=>{let _,j,$;const V=w[o],U=u[V.index],z=C[U.index];if(B||(j=i.ast&&i.ast.ruleDefined(V.index),j&&(_=i.ast.getLength(),i.ast.down(V.index,u[V.index].name))),z){const o=x.length-a;z(Y,x,a,L),validateRnmCallbackResult(U,Y,o,!0),Y.state===s.ACTIVE&&($=w,w=U.opcodes,opExecute(0,a),w=$,z(Y,x,a,L),validateRnmCallbackResult(U,Y,o,!1))}else $=w,w=U.opcodes,opExecute(0,a,Y),w=$;B||j&&(Y.state===s.NOMATCH?i.ast.setLength(_):i.ast.up(V.index,U.name,a,Y.phraseLength))})(o,_);break;case s.TRG:((o,i)=>{const a=w[o];Y.state=s.NOMATCH,i<x.length&&a.min<=x[i]&&x[i]<=a.max&&(Y.state=s.MATCH,Y.phraseLength=1)})(o,_);break;case s.TBS:((o,i)=>{const a=w[o],u=a.string.length;if(Y.state=s.NOMATCH,i+u<=x.length){for(let s=0;s<u;s+=1)if(x[i+s]!==a.string[s])return;Y.state=s.MATCH,Y.phraseLength=u}})(o,_);break;case s.TLS:((o,i)=>{let a;const u=w[o];Y.state=s.NOMATCH;const _=u.string.length;if(0!==_){if(i+_<=x.length){for(let s=0;s<_;s+=1)if(a=x[i+s],a>=65&&a<=90&&(a+=32),a!==u.string[s])return;Y.state=s.MATCH,Y.phraseLength=_}}else Y.state=s.EMPTY})(o,_);break;case s.UDT:opUDT(o,_);break;case s.AND:((o,i)=>{switch(B+=1,opExecute(o+1,i),B-=1,Y.phraseLength=0,Y.state){case s.EMPTY:case s.MATCH:Y.state=s.EMPTY;break;case s.NOMATCH:Y.state=s.NOMATCH;break;default:throw new Error(`opAND: invalid state ${Y.state}`)}})(o,_);break;case s.NOT:((o,i)=>{switch(B+=1,opExecute(o+1,i),B-=1,Y.phraseLength=0,Y.state){case s.EMPTY:case s.MATCH:Y.state=s.NOMATCH;break;case s.NOMATCH:Y.state=s.EMPTY;break;default:throw new Error(`opNOT: invalid state ${Y.state}`)}})(o,_);break;default:throw new Error(`${j}unrecognized operator`)}B||_+Y.phraseLength>z&&(z=_+Y.phraseLength),i.stats&&i.stats.collect(Z,Y),i.trace&&i.trace.up(Z,Y.state,_,Y.phraseLength),$-=1}},vp=function fnast(){const s=Ep,o=Sp,i=this;let a,u,_,w=0;const x=[],C=[],j=[];function indent(s){let o=\"\";for(;s-- >0;)o+=\" \";return o}i.callbacks=[],i.init=(s,o,L)=>{let B;C.length=0,j.length=0,w=0,a=s,u=o,_=L;const $=[];for(B=0;B<a.length;B+=1)$.push(a[B].lower);for(B=0;B<u.length;B+=1)$.push(u[B].lower);for(w=a.length+u.length,B=0;B<w;B+=1)x[B]=void 0;for(const s in i.callbacks)if(i.callbacks.hasOwnProperty(s)){const o=s.toLowerCase();if(B=$.indexOf(o),B<0)throw new Error(`parser.js: Ast()): init: node '${s}' not a rule or udt name`);x[B]=i.callbacks[s]}},i.ruleDefined=s=>!!x[s],i.udtDefined=s=>!!x[a.length+s],i.down=(o,i)=>{const a=j.length;return C.push(a),j.push({name:i,thisIndex:a,thatIndex:void 0,state:s.SEM_PRE,callbackIndex:o,phraseIndex:void 0,phraseLength:void 0,stack:C.length}),a},i.up=(o,i,a,u)=>{const _=j.length,w=C.pop();return j.push({name:i,thisIndex:_,thatIndex:w,state:s.SEM_POST,callbackIndex:o,phraseIndex:a,phraseLength:u,stack:C.length}),j[w].thatIndex=_,j[w].phraseIndex=a,j[w].phraseLength=u,_},i.translate=o=>{let i,a;for(let u=0;u<j.length;u+=1)a=j[u],i=x[a.callbackIndex],i&&(a.state===s.SEM_PRE?i(s.SEM_PRE,_,a.phraseIndex,a.phraseLength,o):i&&i(s.SEM_POST,_,a.phraseIndex,a.phraseLength,o))},i.setLength=s=>{j.length=s,C.length=s>0?j[s-1].stack:0},i.getLength=()=>j.length,i.toXml=()=>{let i=\"\",a=0;return i+='<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n',i+=`<root nodes=\"${j.length/2}\" characters=\"${_.length}\">\\n`,i+=\"\\x3c!-- input string --\\x3e\\n\",i+=indent(a+2),i+=o.charsToString(_),i+=\"\\n\",j.forEach((u=>{u.state===s.SEM_PRE?(a+=1,i+=indent(a),i+=`<node name=\"${u.name}\" index=\"${u.phraseIndex}\" length=\"${u.phraseLength}\">\\n`,i+=indent(a+2),i+=o.charsToString(_,u.phraseIndex,u.phraseLength),i+=\"\\n\"):(i+=indent(a),i+=`</node>\\x3c!-- name=\"${u.name}\" --\\x3e\\n`,a-=1)})),i+=\"</root>\\n\",i}},bp=function fntrace(){const s=Ep,o=Sp,i=\"parser.js: Trace(): \";let a,u,_,w=\"\",x=0;const C=this,indent=s=>{let o=\"\",i=0;if(s>=0)for(;s--;)i+=1,5===i?(o+=\"|\",i=0):o+=\".\";return o};C.init=(s,o,i)=>{u=s,_=o,a=i};const opName=a=>{let w;switch(a.type){case s.ALT:w=\"ALT\";break;case s.CAT:w=\"CAT\";break;case s.REP:w=a.max===1/0?`REP(${a.min},inf)`:`REP(${a.min},${a.max})`;break;case s.RNM:w=`RNM(${u[a.index].name})`;break;case s.TRG:w=`TRG(${a.min},${a.max})`;break;case s.TBS:w=a.string.length>6?`TBS(${o.charsToString(a.string,0,3)}...)`:`TBS(${o.charsToString(a.string,0,6)})`;break;case s.TLS:w=a.string.length>6?`TLS(${o.charsToString(a.string,0,3)}...)`:`TLS(${o.charsToString(a.string,0,6)})`;break;case s.UDT:w=`UDT(${_[a.index].name})`;break;case s.AND:w=\"AND\";break;case s.NOT:w=\"NOT\";break;default:throw new Error(`${i}Trace: opName: unrecognized opcode`)}return w};C.down=(s,i)=>{const u=indent(x),_=Math.min(100,a.length-i);let C=o.charsToString(a,i,_);_<a.length-i&&(C+=\"...\"),C=`${u}|-|[${opName(s)}]${C}\\n`,w+=C,x+=1},C.up=(u,_,C,j)=>{const L=`${i}trace.up: `;x-=1;const B=indent(x);let $,V,U;switch(_){case s.EMPTY:U=\"|E|\",V=\"''\";break;case s.MATCH:U=\"|M|\",$=Math.min(100,j),V=$<j?`'${o.charsToString(a,C,$)}...'`:`'${o.charsToString(a,C,$)}'`;break;case s.NOMATCH:U=\"|N|\",V=\"\";break;default:throw new Error(`${L} unrecognized state`)}V=`${B}${U}[${opName(u)}]${V}\\n`,w+=V},C.displayTrace=()=>w},_p=function fnstats(){const s=Ep;let o,i,a;const u=[],_=[],w=[];this.init=(s,a)=>{o=s,i=a,clear()},this.collect=(o,i)=>{incStat(a,i.state,i.phraseLength),incStat(u[o.type],i.state,i.phraseLength),o.type===s.RNM&&incStat(_[o.index],i.state,i.phraseLength),o.type===s.UDT&&incStat(w[o.index],i.state,i.phraseLength)},this.displayStats=()=>{let o=\"\";const i={match:0,empty:0,nomatch:0,total:0},displayRow=(s,o,a,u,_)=>{i.match+=o,i.empty+=a,i.nomatch+=u,i.total+=_;return`${s} | ${normalize(o)} | ${normalize(a)} | ${normalize(u)} | ${normalize(_)} |\\n`};return o+=\"          OPERATOR STATS\\n\",o+=\"      |   MATCH |   EMPTY | NOMATCH |   TOTAL |\\n\",o+=displayRow(\"  ALT\",u[s.ALT].match,u[s.ALT].empty,u[s.ALT].nomatch,u[s.ALT].total),o+=displayRow(\"  CAT\",u[s.CAT].match,u[s.CAT].empty,u[s.CAT].nomatch,u[s.CAT].total),o+=displayRow(\"  REP\",u[s.REP].match,u[s.REP].empty,u[s.REP].nomatch,u[s.REP].total),o+=displayRow(\"  RNM\",u[s.RNM].match,u[s.RNM].empty,u[s.RNM].nomatch,u[s.RNM].total),o+=displayRow(\"  TRG\",u[s.TRG].match,u[s.TRG].empty,u[s.TRG].nomatch,u[s.TRG].total),o+=displayRow(\"  TBS\",u[s.TBS].match,u[s.TBS].empty,u[s.TBS].nomatch,u[s.TBS].total),o+=displayRow(\"  TLS\",u[s.TLS].match,u[s.TLS].empty,u[s.TLS].nomatch,u[s.TLS].total),o+=displayRow(\"  UDT\",u[s.UDT].match,u[s.UDT].empty,u[s.UDT].nomatch,u[s.UDT].total),o+=displayRow(\"  AND\",u[s.AND].match,u[s.AND].empty,u[s.AND].nomatch,u[s.AND].total),o+=displayRow(\"  NOT\",u[s.NOT].match,u[s.NOT].empty,u[s.NOT].nomatch,u[s.NOT].total),o+=displayRow(\"TOTAL\",i.match,i.empty,i.nomatch,i.total),o},this.displayHits=s=>{let o=\"\";const displayRow=(s,o,i,u,_)=>{a.match+=s,a.empty+=o,a.nomatch+=i,a.total+=u;return`| ${normalize(s)} | ${normalize(o)} | ${normalize(i)} | ${normalize(u)} | ${_}\\n`};\"string\"==typeof s&&\"a\"===s.toLowerCase()[0]?(_.sort(sortAlpha),w.sort(sortAlpha),o+=\"    RULES/UDTS ALPHABETICALLY\\n\"):\"string\"==typeof s&&\"i\"===s.toLowerCase()[0]?(_.sort(sortIndex),w.sort(sortIndex),o+=\"    RULES/UDTS BY INDEX\\n\"):(_.sort(sortHits),w.sort(sortHits),o+=\"    RULES/UDTS BY HIT COUNT\\n\"),o+=\"|   MATCH |   EMPTY | NOMATCH |   TOTAL | NAME\\n\";for(let s=0;s<_.length;s+=1){let i=_[s];i.total&&(o+=displayRow(i.match,i.empty,i.nomatch,i.total,i.name))}for(let s=0;s<w.length;s+=1){let i=w[s];i.total&&(o+=displayRow(i.match,i.empty,i.nomatch,i.total,i.name))}return o};const normalize=s=>s<10?`      ${s}`:s<100?`     ${s}`:s<1e3?`    ${s}`:s<1e4?`   ${s}`:s<1e5?`  ${s}`:s<1e6?` ${s}`:`${s}`,sortAlpha=(s,o)=>s.lower<o.lower?-1:s.lower>o.lower?1:0,sortHits=(s,o)=>s.total<o.total?1:s.total>o.total?-1:sortAlpha(s,o),sortIndex=(s,o)=>s.index<o.index?-1:s.index>o.index?1:0,x=function fnempty(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},clear=()=>{u.length=0,a=new x,u[s.ALT]=new x,u[s.CAT]=new x,u[s.REP]=new x,u[s.RNM]=new x,u[s.TRG]=new x,u[s.TBS]=new x,u[s.TLS]=new x,u[s.UDT]=new x,u[s.AND]=new x,u[s.NOT]=new x,_.length=0;for(let s=0;s<o.length;s+=1)_.push({empty:0,match:0,nomatch:0,total:0,name:o[s].name,lower:o[s].lower,index:o[s].index});if(i.length>0){w.length=0;for(let s=0;s<i.length;s+=1)w.push({empty:0,match:0,nomatch:0,total:0,name:i[s].name,lower:i[s].lower,index:i[s].index})}},incStat=(o,i)=>{switch(o.total+=1,i){case s.EMPTY:o.empty+=1;break;case s.MATCH:o.match+=1;break;case s.NOMATCH:o.nomatch+=1;break;default:throw new Error(`parser.js: Stats(): collect(): incStat(): unrecognized state: ${i}`)}}},Sp={stringToChars:s=>[...s].map((s=>s.codePointAt(0))),charsToString:(s,o,i)=>{let a=s;for(;!(void 0===o||o<0);){if(void 0===i){a=s.slice(o);break}if(i<=0)return\"\";a=s.slice(o,o+i);break}return String.fromCodePoint(...a)}},Ep={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:s=>{switch(s){case Ep.ALT:return\"ALT\";case Ep.CAT:return\"CAT\";case Ep.REP:return\"REP\";case Ep.RNM:return\"RNM\";case Ep.TRG:return\"TRG\";case Ep.TBS:return\"TBS\";case Ep.TLS:return\"TLS\";case Ep.UDT:return\"UDT\";case Ep.AND:return\"AND\";case Ep.NOT:return\"NOT\";case Ep.ACTIVE:return\"ACTIVE\";case Ep.EMPTY:return\"EMPTY\";case Ep.MATCH:return\"MATCH\";case Ep.NOMATCH:return\"NOMATCH\";case Ep.SEM_PRE:return\"SEM_PRE\";case Ep.SEM_POST:return\"SEM_POST\";case Ep.SEM_OK:return\"SEM_OK\";default:return\"UNRECOGNIZED STATE\"}}};function grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"json-pointer\",lower:\"json-pointer\",index:0,isBkr:!1},this.rules[1]={name:\"reference-token\",lower:\"reference-token\",index:1,isBkr:!1},this.rules[2]={name:\"unescaped\",lower:\"unescaped\",index:2,isBkr:!1},this.rules[3]={name:\"escaped\",lower:\"escaped\",index:3,isBkr:!1},this.rules[4]={name:\"array-location\",lower:\"array-location\",index:4,isBkr:!1},this.rules[5]={name:\"array-index\",lower:\"array-index\",index:5,isBkr:!1},this.rules[6]={name:\"array-dash\",lower:\"array-dash\",index:6,isBkr:!1},this.rules[7]={name:\"slash\",lower:\"slash\",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function toString(){let s=\"\";return s+=\"; JavaScript Object Notation (JSON) Pointer ABNF syntax\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6901\\n\",s+=\"json-pointer    = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\\n\",s+=\"reference-token = *( unescaped / escaped )\\n\",s+=\"unescaped       = %x00-2E / %x30-7D / %x7F-10FFFF\\n\",s+=\"                ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\\n\",s+='escaped         = \"~\" ( \"0\" / \"1\" )\\n',s+=\"                ; representing '~' and '/', respectively\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6901#section-4\\n\",s+=\"array-location  = array-index / array-dash\\n\",s+=\"array-index     = %x30 / ( %x31-39 *(%x30-39) )\\n\",s+='                ; \"0\", or digits without a leading \"0\"\\n',s+='array-dash      = \"-\"\\n',s+=\"\\n\",s+=\"; Surrogate named rules\\n\",s+='slash           = \"/\"\\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\\n; https://datatracker.ietf.org/doc/html/rfc6901\\njson-pointer    = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\\nreference-token = *( unescaped / escaped )\\nunescaped       = %x00-2E / %x30-7D / %x7F-10FFFF\\n                ; %x2F (\\'/\\') and %x7E (\\'~\\') are excluded from \\'unescaped\\'\\nescaped         = \"~\" ( \"0\" / \"1\" )\\n                ; representing \\'~\\' and \\'/\\', respectively\\n\\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\\narray-location  = array-index / array-dash\\narray-index     = %x30 / ( %x31-39 *(%x30-39) )\\n                ; \"0\", or digits without a leading \"0\"\\narray-dash      = \"-\"\\n\\n; Surrogate named rules\\nslash           = \"/\"\\n'}}class JSONPointerError extends Error{constructor(s,o=void 0){if(super(s,o),this.name=this.constructor.name,\"string\"==typeof s&&(this.message=s),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack,null!=o&&\"object\"==typeof o&&Object.prototype.hasOwnProperty.call(o,\"cause\")&&!(\"cause\"in this)){const{cause:s}=o;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}if(null!=o&&\"object\"==typeof o){const{cause:s,...i}=o;Object.assign(this,i)}}}const wp=JSONPointerError;const xp=class JSONPointerParseError extends wp{},callbacks_cst=s=>(o,i,a,u,_)=>{if(\"object\"!=typeof _||null===_||Array.isArray(_))throw new xp(\"parser's user data must be an object\");if(o===Ep.SEM_PRE){const o={type:s,text:Sp.charsToString(i,a,u),start:a,length:u,children:[]};if(_.stack.length>0){_.stack[_.stack.length-1].children.push(o)}else _.root=o;_.stack.push(o)}o===Ep.SEM_POST&&_.stack.pop()};const kp=class CSTTranslator_CSTTranslator extends vp{constructor(){super(),this.callbacks[\"json-pointer\"]=callbacks_cst(\"json-pointer\"),this.callbacks[\"reference-token\"]=callbacks_cst(\"reference-token\"),this.callbacks.slash=callbacks_cst(\"text\")}getTree(){const s={stack:[],root:null};return this.translate(s),delete s.stack,s}},es_unescape=s=>{if(\"string\"!=typeof s)throw new TypeError(\"Reference token must be a string\");return s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")};const Op=class ASTTranslator extends kp{getTree(){const{root:s}=super.getTree();return s.children.filter((({type:s})=>\"reference-token\"===s)).map((({text:s})=>es_unescape(s)))}};const Cp=class Expectations extends Array{toString(){return this.map((s=>`\"${String(s)}\"`)).join(\", \")}};const Ap=class Trace extends bp{inferExpectations(){const s=this.displayTrace().split(\"\\n\"),o=new Set;let i=-1;for(let a=0;a<s.length;a++){const u=s[a];if(u.includes(\"M|\")){const s=u.match(/]'(.*)'$/);s&&s[1]&&(i=a)}if(a>i){const s=u.match(/N\\|\\[TLS\\(([^)]+)\\)]/);s&&o.add(s[1])}}return new Cp(...o)}},jp=new grammar,es_parse=(s,{translator:o=new Op,stats:i=!1,trace:a=!1}={})=>{if(\"string\"!=typeof s)throw new TypeError(\"JSON Pointer must be a string\");try{const u=new yp;o&&(u.ast=o),i&&(u.stats=new _p),a&&(u.trace=new Ap);const _=u.parse(jp,\"json-pointer\",s);return{result:_,tree:_.success&&o?u.ast.getTree():void 0,stats:u.stats,trace:u.trace}}catch(o){throw new xp(\"Unexpected error during JSON Pointer parsing\",{cause:o,jsonPointer:s})}};new grammar,new yp,new grammar,new yp;const Ip=new grammar,Pp=new yp,array_index=s=>{if(\"string\"!=typeof s)return!1;try{return Pp.parse(Ip,\"array-index\",s).success}catch{return!1}},Tp=new grammar,Np=new yp,array_dash=s=>{if(\"string\"!=typeof s)return!1;try{return Np.parse(Tp,\"array-dash\",s).success}catch{return!1}},es_escape=s=>{if(\"string\"!=typeof s&&\"number\"!=typeof s)throw new TypeError(\"Reference token must be a string or number\");return String(s).replace(/~/g,\"~0\").replace(/\\//g,\"~1\")};const Mp=class JSONPointerCompileError extends wp{},es_compile=s=>{if(!Array.isArray(s))throw new TypeError(\"Reference tokens must be a list of strings or numbers\");try{return 0===s.length?\"\":`/${s.map((s=>{if(\"string\"!=typeof s&&\"number\"!=typeof s)throw new TypeError(\"Reference token must be a string or number\");return es_escape(String(s))})).join(\"/\")}`}catch(o){throw new Mp(\"Unexpected error during JSON Pointer compilation\",{cause:o,referenceTokens:s})}};const Rp=class TraceBuilder{#e;#t;#r;constructor(s,o={}){this.#e=s,this.#e.steps=[],this.#e.failed=!1,this.#e.failedAt=-1,this.#e.message=`JSON Pointer \"${o.jsonPointer}\" was successfully evaluated against the provided value`,this.#e.context={...o,realm:o.realm.name},this.#t=[],this.#r=o.realm}step({referenceToken:s,input:o,output:i,success:a=!0,reason:u}){const _=this.#t.length;this.#t.push(s);const w={referenceToken:s,referenceTokenPosition:_,input:o,inputType:this.#r.isObject(o)?\"object\":this.#r.isArray(o)?\"array\":\"unrecognized\",output:i,success:a};u&&(w.reason=u),this.#e.steps.push(w),a||(this.#e.failed=!0,this.#e.failedAt=_,this.#e.message=u)}};const Dp=class EvaluationRealm{name=\"\";isArray(s){throw new wp(\"Realm.isArray(node) must be implemented in a subclass\")}isObject(s){throw new wp(\"Realm.isObject(node) must be implemented in a subclass\")}sizeOf(s){throw new wp(\"Realm.sizeOf(node) must be implemented in a subclass\")}has(s,o){throw new wp(\"Realm.has(node) must be implemented in a subclass\")}evaluate(s,o){throw new wp(\"Realm.evaluate(node) must be implemented in a subclass\")}};const Lp=class JSONPointerEvaluateError extends wp{};const Fp=class JSONPointerIndexError extends Lp{};const Bp=class JSONEvaluationRealm extends Dp{name=\"json\";isArray(s){return Array.isArray(s)}isObject(s){return\"object\"==typeof s&&null!==s&&!this.isArray(s)}sizeOf(s){return this.isArray(s)?s.length:this.isObject(s)?Object.keys(s).length:0}has(s,o){if(this.isArray(s)){const i=Number(o),a=i>>>0;if(i!==a)throw new Fp(`Invalid array index \"${o}\": index must be an unsinged 32-bit integer`,{referenceToken:o,currentValue:s,realm:this.name});return a<this.sizeOf(s)&&Object.prototype.hasOwnProperty.call(s,i)}return!!this.isObject(s)&&Object.prototype.hasOwnProperty.call(s,o)}evaluate(s,o){return this.isArray(s)?s[Number(o)]:s[o]}};const $p=class JSONPointerTypeError extends Lp{};const qp=class JSONPointerKeyError extends Lp{},es_evaluate=(s,o,{strictArrays:i=!0,strictObjects:a=!0,realm:u=new Bp,trace:_=!0}={})=>{const{result:w,tree:x,trace:C}=es_parse(o,{trace:!!_}),j=\"object\"==typeof _&&null!==_?new Rp(_,{jsonPointer:o,referenceTokens:x,strictArrays:i,strictObjects:a,realm:u,value:s}):null;try{let _;if(!w.success){let i=`Invalid JSON Pointer: \"${o}\". Syntax error at position ${w.maxMatched}`;throw i+=C?`, expected ${C.inferExpectations()}`:\"\",new Lp(i,{jsonPointer:o,currentValue:s,realm:u.name})}return x.reduce(((s,w,C)=>{if(u.isArray(s)){if(array_dash(w)){if(i)throw new Fp(`Invalid array index \"-\" at position ${C} in \"${o}\". The \"-\" token always refers to a nonexistent element during evaluation`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});return _=u.evaluate(s,String(u.sizeOf(s))),null==j||j.step({referenceToken:w,input:s,output:_}),_}if(!array_index(w))throw new Fp(`Invalid array index \"${w}\" at position ${C} in \"${o}\": index MUST be \"0\", or digits without a leading \"0\"`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});const a=Number(w);if(!Number.isSafeInteger(a))throw new Fp(`Invalid array index \"${w}\" at position ${C} in \"${o}\": index must be a safe integer`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});if(!u.has(s,w)&&i)throw new Fp(`Invalid array index \"${w}\" at position ${C} in \"${o}\": index not found in array`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});return _=u.evaluate(s,w),null==j||j.step({referenceToken:w,input:s,output:_}),_}if(u.isObject(s)){if(!u.has(s,w)&&a)throw new qp(`Invalid object key \"${w}\" at position ${C} in \"${o}\": key not found in object`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});return _=u.evaluate(s,w),null==j||j.step({referenceToken:w,input:s,output:_}),_}throw new $p(`Invalid reference token \"${w}\" at position ${C} in \"${o}\": cannot be applied to a non-object/non-array value`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name})}),s)}catch(s){if(null==j||j.step({referenceToken:s.referenceToken,input:s.currentValue,success:!1,reason:s.message}),s instanceof Lp)throw s;throw new Lp(\"Unexpected error during JSON Pointer evaluation\",{cause:s,jsonPointer:o,referenceTokens:x})}};const Vp=class ApiDOMEvaluationRealm extends Dp{name=\"apidom\";isArray(s){return Ru(s)}isObject(s){return Mu(s)}sizeOf(s){return this.isArray(s)||this.isObject(s)?s.length:0}has(s,o){if(this.isArray(s)){const i=Number(o),a=i>>>0;if(i!==a)throw new Fp(`Invalid array index \"${o}\": index must be an unsinged 32-bit integer`,{referenceToken:o,currentValue:s,realm:this.name});return a<this.sizeOf(s)}if(this.isObject(s)){const i=s.keys(),a=new Set(i);if(i.length!==a.size)throw new qp(`Object key \"${o}\" is not unique — JSON Pointer requires unique member names`,{referenceToken:o,currentValue:s,realm:this.name});return s.hasKey(o)}return!1}evaluate(s,o){return this.isArray(s)?s.get(Number(o)):s.get(o)}},apidom_evaluate=(s,o,i={})=>es_evaluate(s,o,{...i,realm:new Vp});class Callback extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"callback\"}}const Up=Callback;class Components extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"components\"}get schemas(){return this.get(\"schemas\")}set schemas(s){this.set(\"schemas\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get requestBodies(){return this.get(\"requestBodies\")}set requestBodies(s){this.set(\"requestBodies\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get securitySchemes(){return this.get(\"securitySchemes\")}set securitySchemes(s){this.set(\"securitySchemes\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}}const zp=Components;class Contact extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"contact\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get email(){return this.get(\"email\")}set email(s){this.set(\"email\",s)}}const Wp=Contact;class Discriminator extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"discriminator\"}get propertyName(){return this.get(\"propertyName\")}set propertyName(s){this.set(\"propertyName\",s)}get mapping(){return this.get(\"mapping\")}set mapping(s){this.set(\"mapping\",s)}}const Jp=Discriminator;class Encoding extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"encoding\"}get contentType(){return this.get(\"contentType\")}set contentType(s){this.set(\"contentType\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowedReserved(){return this.get(\"allowedReserved\")}set allowedReserved(s){this.set(\"allowedReserved\",s)}}const Hp=Encoding;class Example extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"example\"}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get value(){return this.get(\"value\")}set value(s){this.set(\"value\",s)}get externalValue(){return this.get(\"externalValue\")}set externalValue(s){this.set(\"externalValue\",s)}}const Kp=Example;class ExternalDocumentation extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"externalDocumentation\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Gp=ExternalDocumentation;class Header extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"header\"}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new Su.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new Su.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Header.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const Yp=Header;class Info extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"info\",this.classes.push(\"info\")}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get termsOfService(){return this.get(\"termsOfService\")}set termsOfService(s){this.set(\"termsOfService\",s)}get contact(){return this.get(\"contact\")}set contact(s){this.set(\"contact\",s)}get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get version(){return this.get(\"version\")}set version(s){this.set(\"version\",s)}}const Xp=Info;class License extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"license\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Qp=License;class Link extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"link\"}get operationRef(){return this.get(\"operationRef\")}set operationRef(s){this.set(\"operationRef\",s)}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get operation(){var s,o;return Iu(this.operationRef)?null===(s=this.operationRef)||void 0===s?void 0:s.meta.get(\"operation\"):Iu(this.operationId)?null===(o=this.operationId)||void 0===o?void 0:o.meta.get(\"operation\"):void 0}set operation(s){this.set(\"operation\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get server(){return this.get(\"server\")}set server(s){this.set(\"server\",s)}}const Zp=Link;class MediaType extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"mediaType\"}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get encoding(){return this.get(\"encoding\")}set encoding(s){this.set(\"encoding\",s)}}const th=MediaType;class OAuthFlow extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"oAuthFlow\"}get authorizationUrl(){return this.get(\"authorizationUrl\")}set authorizationUrl(s){this.set(\"authorizationUrl\",s)}get tokenUrl(){return this.get(\"tokenUrl\")}set tokenUrl(s){this.set(\"tokenUrl\",s)}get refreshUrl(){return this.get(\"refreshUrl\")}set refreshUrl(s){this.set(\"refreshUrl\",s)}get scopes(){return this.get(\"scopes\")}set scopes(s){this.set(\"scopes\",s)}}const rh=OAuthFlow;class OAuthFlows extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"oAuthFlows\"}get implicit(){return this.get(\"implicit\")}set implicit(s){this.set(\"implicit\",s)}get password(){return this.get(\"password\")}set password(s){this.set(\"password\",s)}get clientCredentials(){return this.get(\"clientCredentials\")}set clientCredentials(s){this.set(\"clientCredentials\",s)}get authorizationCode(){return this.get(\"authorizationCode\")}set authorizationCode(s){this.set(\"authorizationCode\",s)}}const uh=OAuthFlows;class Openapi extends Su.Om{constructor(s,o,i){super(s,o,i),this.element=\"openapi\",this.classes.push(\"spec-version\"),this.classes.push(\"version\")}}const dh=Openapi;class OpenApi3_0 extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"openApi3_0\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const fh=OpenApi3_0;class Operation extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"operation\"}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}set externalDocs(s){this.set(\"externalDocs\",s)}get externalDocs(){return this.get(\"externalDocs\")}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new Su.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get servers(){return this.get(\"severs\")}set servers(s){this.set(\"servers\",s)}}const vh=Operation;class Parameter extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"parameter\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new Su.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new Su.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Parameter.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const _h=Parameter;class PathItem extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"pathItem\"}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}}const wh=PathItem;class Paths extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"paths\"}}const Oh=Paths;class Reference extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"reference\",this.classes.push(\"openapi-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const jh=Reference;class RequestBody extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"requestBody\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new Su.bd(!1)}set required(s){this.set(\"required\",s)}}const Ih=RequestBody;class Response_Response extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"response\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}}const Ph=Response_Response;class Responses extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"responses\"}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}}const Rh=Responses;const Dh=class UnsupportedOperationError extends Ko{};class JSONSchema extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchemaDraft4\"}get idProp(){return this.get(\"id\")}set idProp(s){this.set(\"id\",s)}get $schema(){return this.get(\"$schema\")}set $schema(s){this.set(\"$schema\",s)}get multipleOf(){return this.get(\"multipleOf\")}set multipleOf(s){this.set(\"multipleOf\",s)}get maximum(){return this.get(\"maximum\")}set maximum(s){this.set(\"maximum\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get minimum(){return this.get(\"minimum\")}set minimum(s){this.set(\"minimum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get maxLength(){return this.get(\"maxLength\")}set maxLength(s){this.set(\"maxLength\",s)}get minLength(){return this.get(\"minLength\")}set minLength(s){this.set(\"minLength\",s)}get pattern(){return this.get(\"pattern\")}set pattern(s){this.set(\"pattern\",s)}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get maxItems(){return this.get(\"maxItems\")}set maxItems(s){this.set(\"maxItems\",s)}get minItems(){return this.get(\"minItems\")}set minItems(s){this.set(\"minItems\",s)}get uniqueItems(){return this.get(\"uniqueItems\")}set uniqueItems(s){this.set(\"uniqueItems\",s)}get maxProperties(){return this.get(\"maxProperties\")}set maxProperties(s){this.set(\"maxProperties\",s)}get minProperties(){return this.get(\"minProperties\")}set minProperties(s){this.set(\"minProperties\",s)}get required(){return this.get(\"required\")}set required(s){this.set(\"required\",s)}get properties(){return this.get(\"properties\")}set properties(s){this.set(\"properties\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){return this.get(\"patternProperties\")}set patternProperties(s){this.set(\"patternProperties\",s)}get dependencies(){return this.get(\"dependencies\")}set dependencies(s){this.set(\"dependencies\",s)}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get allOf(){return this.get(\"allOf\")}set allOf(s){this.set(\"allOf\",s)}get anyOf(){return this.get(\"anyOf\")}set anyOf(s){this.set(\"anyOf\",s)}get oneOf(){return this.get(\"oneOf\")}set oneOf(s){this.set(\"oneOf\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){return this.get(\"definitions\")}set definitions(s){this.set(\"definitions\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get format(){return this.get(\"format\")}set format(s){this.set(\"format\",s)}get base(){return this.get(\"base\")}set base(s){this.set(\"base\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get media(){return this.get(\"media\")}set media(s){this.set(\"media\",s)}get readOnly(){return this.get(\"readOnly\")}set readOnly(s){this.set(\"readOnly\",s)}}const Lh=JSONSchema;class JSONReference extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"JSONReference\",this.classes.push(\"json-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const Fh=JSONReference;class Media extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"media\"}get binaryEncoding(){return this.get(\"binaryEncoding\")}set binaryEncoding(s){this.set(\"binaryEncoding\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}}const Jh=Media;class LinkDescription extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"linkDescription\"}get href(){return this.get(\"href\")}set href(s){this.set(\"href\",s)}get rel(){return this.get(\"rel\")}set rel(s){this.set(\"rel\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get mediaType(){return this.get(\"mediaType\")}set mediaType(s){this.set(\"mediaType\",s)}get method(){return this.get(\"method\")}set method(s){this.set(\"method\",s)}get encType(){return this.get(\"encType\")}set encType(s){this.set(\"encType\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}}const Hh=LinkDescription;const Kh=_curry2((function mapObjIndexed(s,o){return _arrayReduce((function(i,a){return i[a]=s(o[a],a,o),i}),{},ea(o))}));const Gh=_curry1((function isNil(s){return null==s}));var Qh=_curry2((function hasPath(s,o){if(0===s.length||Gh(o))return!1;for(var i=o,a=0;a<s.length;){if(Gh(i)||!_has(s[a],i))return!1;i=i[s[a]],a+=1}return!0}));const td=Qh;var sd=_curry2((function has(s,o){return td([s],o)}));const id=sd;const cd=_curry3((function propSatisfies(s,o,i){return s(Da(o,i))}));var ld=function(){function XDropWhile(s,o){this.xf=o,this.f=s}return XDropWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropWhile.prototype[\"@@transducer/result\"]=_xfBase_result,XDropWhile.prototype[\"@@transducer/step\"]=function(s,o){if(this.f){if(this.f(o))return s;this.f=null}return this.xf[\"@@transducer/step\"](s,o)},XDropWhile}();function _xdropWhile(s){return function(o){return new ld(s,o)}}const ud=_curry2(_dispatchable([\"dropWhile\"],_xdropWhile,(function dropWhile(s,o){for(var i=0,a=o.length;i<a&&s(o[i]);)i+=1;return ja(i,1/0,o)})));const dd=za((function(s,o){return pipe(Ha(\"\"),ud(sc(s)),rc(\"\"))(o)})),dereference=(s,o)=>{const i=Na(s,o);return Kh((s=>{if(fu(s)&&id(\"$ref\",s)&&cd(Jc,\"$ref\",s)){const o=tp([\"$ref\"],s),a=dd(\"#/\",o);return tp(a.split(\"/\"),i)}return fu(s)?dereference(s,i):s}),s)},emptyElement=s=>{const o=s.meta.length>0?cloneDeep(s.meta):void 0,i=s.attributes.length>0?cloneDeep(s.attributes):void 0;return new s.constructor(void 0,o,i)},cloneUnlessOtherwiseSpecified=(s,o)=>o.clone&&o.isMergeableElement(s)?deepmerge(emptyElement(s),s,o):s,md={clone:!0,isMergeableElement:s=>Mu(s)||Ru(s),arrayElementMerge:(s,o,i)=>s.concat(o)[\"fantasy-land/map\"]((s=>cloneUnlessOtherwiseSpecified(s,i))),objectElementMerge:(s,o,i)=>{const a=Mu(s)?emptyElement(s):emptyElement(o);return Mu(s)&&s.forEach(((s,o,u)=>{const _=cloneShallow(u);_.value=cloneUnlessOtherwiseSpecified(s,i),a.content.push(_)})),o.forEach(((o,u,_)=>{const w=serializers_value(u);let x;if(Mu(s)&&s.hasKey(w)&&i.isMergeableElement(o)){const a=s.get(w);x=cloneShallow(_),x.value=((s,o)=>{if(\"function\"!=typeof o.customMerge)return deepmerge;const i=o.customMerge(s,o);return\"function\"==typeof i?i:deepmerge})(u,i)(a,o,i)}else x=cloneShallow(_),x.value=cloneUnlessOtherwiseSpecified(o,i);a.remove(w),a.content.push(x)})),a},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},deepmerge=(s,o,i)=>{var a,u,_;const w={...md,...i};w.isMergeableElement=null!==(a=w.isMergeableElement)&&void 0!==a?a:md.isMergeableElement,w.arrayElementMerge=null!==(u=w.arrayElementMerge)&&void 0!==u?u:md.arrayElementMerge,w.objectElementMerge=null!==(_=w.objectElementMerge)&&void 0!==_?_:md.objectElementMerge;const x=Ru(o);if(!(x===Ru(s)))return cloneUnlessOtherwiseSpecified(o,w);const C=x&&\"function\"==typeof w.arrayElementMerge?w.arrayElementMerge(s,o,w):w.objectElementMerge(s,o,w);return C.meta=(s=>\"function\"!=typeof s.customMetaMerge?s=>cloneDeep(s):s.customMetaMerge)(w)(s.meta,o.meta),C.attributes=(s=>\"function\"!=typeof s.customAttributesMerge?s=>cloneDeep(s):s.customAttributesMerge)(w)(s.attributes,o.attributes),C};deepmerge.all=(s,o)=>{if(!Array.isArray(s))throw new TypeError(\"First argument of deepmerge should be an array.\");return 0===s.length?new Su.Sh:s.reduce(((s,i)=>deepmerge(s,i,o)),emptyElement(s[0]))};const yd=deepmerge;const vd=class Visitor_Visitor{element;constructor(s){Object.assign(this,s)}copyMetaAndAttributes(s,o){(s.meta.length>0||o.meta.length>0)&&(o.meta=yd(o.meta,s.meta),hasElementSourceMap(s)&&o.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(o.attributes=yd(o.attributes,s.attributes))}};const _d=class FallbackVisitor extends vd{enter(s){return this.element=cloneDeep(s),Uu}},copyProps=(s,o,i=[])=>{const a=Object.getOwnPropertyDescriptors(o);for(let s of i)delete a[s];Object.defineProperties(s,a)},protoChain=(s,o=[s])=>{const i=Object.getPrototypeOf(s);return null===i?o:protoChain(i,[...o,i])},hardMixProtos=(s,o,i=[])=>{var a;const u=null!==(a=((...s)=>{if(0===s.length)return;let o;const i=s.map((s=>protoChain(s)));for(;i.every((s=>s.length>0));){const s=i.map((s=>s.pop())),a=s[0];if(!s.every((s=>s===a)))break;o=a}return o})(...s))&&void 0!==a?a:Object.prototype,_=Object.create(u),w=protoChain(u);for(let o of s){let s=protoChain(o);for(let o=s.length-1;o>=0;o--){let a=s[o];-1===w.indexOf(a)&&(copyProps(_,a,[\"constructor\",...i]),w.push(a))}}return _.constructor=o,_},unique=s=>s.filter(((o,i)=>s.indexOf(o)==i)),getIngredientWithProp=(s,o)=>{const i=o.map((s=>protoChain(s)));let a=0,u=!0;for(;u;){u=!1;for(let _=o.length-1;_>=0;_--){const o=i[_][a];if(null!=o&&(u=!0,null!=Object.getOwnPropertyDescriptor(o,s)))return i[_][0]}a++}},proxyMix=(s,o=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>o,setPrototypeOf(){throw Error(\"Cannot set prototype of Proxies created by ts-mixer\")},getOwnPropertyDescriptor:(o,i)=>Object.getOwnPropertyDescriptor(getIngredientWithProp(i,s)||{},i),defineProperty(){throw new Error(\"Cannot define new properties on Proxies created by ts-mixer\")},has:(i,a)=>void 0!==getIngredientWithProp(a,s)||void 0!==o[a],get:(i,a)=>(getIngredientWithProp(a,s)||o)[a],set(o,i,a){const u=getIngredientWithProp(i,s);if(void 0===u)throw new Error(\"Cannot set new properties on Proxies created by ts-mixer\");return u[i]=a,!0},deleteProperty(){throw new Error(\"Cannot delete properties on Proxies created by ts-mixer\")},ownKeys:()=>s.map(Object.getOwnPropertyNames).reduce(((s,o)=>o.concat(s.filter((s=>o.indexOf(s)<0)))))}),Sd=null,Ed=\"copy\",wd=\"copy\",xd=\"deep\",kd=new WeakMap,getMixinsForClass=s=>kd.get(s),mergeObjectsOfDecorators=(s,o)=>{var i,a;const u=unique([...Object.getOwnPropertyNames(s),...Object.getOwnPropertyNames(o)]),_={};for(let w of u)_[w]=unique([...null!==(i=null==s?void 0:s[w])&&void 0!==i?i:[],...null!==(a=null==o?void 0:o[w])&&void 0!==a?a:[]]);return _},mergePropertyAndMethodDecorators=(s,o)=>{var i,a,u,_;return{property:mergeObjectsOfDecorators(null!==(i=null==s?void 0:s.property)&&void 0!==i?i:{},null!==(a=null==o?void 0:o.property)&&void 0!==a?a:{}),method:mergeObjectsOfDecorators(null!==(u=null==s?void 0:s.method)&&void 0!==u?u:{},null!==(_=null==o?void 0:o.method)&&void 0!==_?_:{})}},mergeDecorators=(s,o)=>{var i,a,u,_,w,x;return{class:unique([...null!==(i=null==s?void 0:s.class)&&void 0!==i?i:[],...null!==(a=null==o?void 0:o.class)&&void 0!==a?a:[]]),static:mergePropertyAndMethodDecorators(null!==(u=null==s?void 0:s.static)&&void 0!==u?u:{},null!==(_=null==o?void 0:o.static)&&void 0!==_?_:{}),instance:mergePropertyAndMethodDecorators(null!==(w=null==s?void 0:s.instance)&&void 0!==w?w:{},null!==(x=null==o?void 0:o.instance)&&void 0!==x?x:{})}},Od=new Map,deepDecoratorSearch=(...s)=>{const o=((...s)=>{var o;const i=new Set,a=new Set([...s]);for(;a.size>0;)for(let s of a){const u=protoChain(s.prototype).map((s=>s.constructor)),_=[...u,...null!==(o=getMixinsForClass(s))&&void 0!==o?o:[]].filter((s=>!i.has(s)));for(let s of _)a.add(s);i.add(s),a.delete(s)}return[...i]})(...s).map((s=>Od.get(s))).filter((s=>!!s));return 0==o.length?{}:1==o.length?o[0]:o.reduce(((s,o)=>mergeDecorators(s,o)))},getDecoratorsForClass=s=>{let o=Od.get(s);return o||(o={},Od.set(s,o)),o};function Mixin(...s){var o,i,a;const u=s.map((s=>s.prototype)),_=Sd;if(null!==_){const s=u.map((s=>s[_])).filter((s=>\"function\"==typeof s)),combinedInitFunction=function(...o){for(let i of s)i.apply(this,o)},o={[_]:combinedInitFunction};u.push(o)}function MixedClass(...o){for(const i of s)copyProps(this,new i(...o));null!==_&&\"function\"==typeof this[_]&&this[_].apply(this,o)}var w,x;MixedClass.prototype=\"copy\"===wd?hardMixProtos(u,MixedClass):(w=u,x=MixedClass,proxyMix([...w,{constructor:x}])),Object.setPrototypeOf(MixedClass,\"copy\"===Ed?hardMixProtos(s,null,[\"prototype\"]):proxyMix(s,Function.prototype));let C=MixedClass;if(\"none\"!==xd){const u=\"deep\"===xd?deepDecoratorSearch(...s):((...s)=>{const o=s.map((s=>getDecoratorsForClass(s)));return 0===o.length?{}:1===o.length?o[0]:o.reduce(((s,o)=>mergeDecorators(s,o)))})(...s);for(let s of null!==(o=null==u?void 0:u.class)&&void 0!==o?o:[]){const o=s(C);o&&(C=o)}applyPropAndMethodDecorators(null!==(i=null==u?void 0:u.static)&&void 0!==i?i:{},C),applyPropAndMethodDecorators(null!==(a=null==u?void 0:u.instance)&&void 0!==a?a:{},C.prototype)}var j,L;return j=C,L=s,kd.set(j,L),C}const applyPropAndMethodDecorators=(s,o)=>{const i=s.property,a=s.method;if(i)for(let s in i)for(let a of i[s])a(o,s);if(a)for(let s in a)for(let i of a[s])i(o,s,Object.getOwnPropertyDescriptor(o,s))};const Cd=_curry1((function allPass(s){return $a(Ca(Ec,0,Oc(\"length\",s)),(function(){for(var o=0,i=s.length;o<i;){if(!s[o].apply(this,arguments))return!1;o+=1}return!0}))}));const Ad=_curry1((function isNotEmpty(s){return!cp(s)}));const Id=_curry2((function or(s,o){return s||o}));var Td=dc($a(1,ou(au,_curry2((function either(s,o){return _isFunction(s)?function _either(){return s.apply(this,arguments)||o.apply(this,arguments)}:hc(Id)(s,o)}))(cu,Mc))));const Nd=Cd([Jc,Td,Ad]);const Md=_curry2((function pick(s,o){for(var i={},a=0;a<s.length;)s[a]in o&&(i[s[a]]=o[s[a]]),a+=1;return i}));const Rd=class SpecificationVisitor extends vd{specObj;passingOptionsNames=[\"specObj\",\"parent\"];constructor({specObj:s,...o}){super({...o}),this.specObj=s}retrievePassingOptions(){return Md(this.passingOptionsNames,this)}retrieveFixedFields(s){const o=tp([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof o&&null!==o?Object.keys(o):[]}retrieveVisitor(s){return Qo(Mc,[\"visitors\",...s],this.specObj)?tp([\"visitors\",...s],this.specObj):tp([\"visitors\",...s,\"$visitor\"],this.specObj)}retrieveVisitorInstance(s,o={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...i,...o})}toRefractedElement(s,o,i={}){const a=this.retrieveVisitorInstance(s,i);return a instanceof _d&&(null==a?void 0:a.constructor)===_d?cloneDeep(o):(visitor_visit(o,a,i),a.element)}};const Dd=class FixedFieldsVisitor extends Rd{specPath;ignoredFields;constructor({specPath:s,ignoredFields:o,...i}){super({...i}),this.specPath=s,this.ignoredFields=o||[]}ObjectElement(s){const o=this.specPath(s),i=this.retrieveFixedFields(o);return s.forEach(((s,a,u)=>{if(Iu(a)&&i.includes(serializers_value(a))&&!this.ignoredFields.includes(serializers_value(a))){const i=this.toRefractedElement([...o,\"fixedFields\",serializers_value(a)],s),_=new Su.Pr(cloneDeep(a),i);this.copyMetaAndAttributes(u,_),_.classes.push(\"fixed-field\"),this.element.content.push(_)}else this.ignoredFields.includes(serializers_value(a))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Uu}};const Ld=class ParentSchemaAwareVisitor{parent;constructor({parent:s}){this.parent=s}},Fd=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Lh||s(a)&&o(\"JSONSchemaDraft4\",a)&&i(\"object\",a))),Bd=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Fh||s(a)&&o(\"JSONReference\",a)&&i(\"object\",a))),$d=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Jh||s(a)&&o(\"media\",a)&&i(\"object\",a))),Vd=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Hh||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a)));class JSONSchemaVisitor extends(Mixin(Dd,Ld,_d)){constructor(s){super(s),this.element=new Lh,this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}get defaultDialectIdentifier(){return\"http://json-schema.org/draft-04/schema#\"}ObjectElement(s){return this.handleDialectIdentifier(s),this.handleSchemaIdentifier(s),this.parent=this.element,Dd.prototype.ObjectElement.call(this,s)}handleDialectIdentifier(s){if(bc(this.parent)&&!Iu(s.get(\"$schema\")))this.element.setMetaProperty(\"inheritedDialectIdentifier\",this.defaultDialectIdentifier);else if(Fd(this.parent)&&!Iu(s.get(\"$schema\"))){const s=Na(serializers_value(this.parent.meta.get(\"inheritedDialectIdentifier\")),serializers_value(this.parent.$schema));this.element.setMetaProperty(\"inheritedDialectIdentifier\",s)}}handleSchemaIdentifier(s,o=\"id\"){const i=void 0!==this.parent?cloneDeep(this.parent.getMetaProperty(\"ancestorsSchemaIdentifiers\",[])):new Su.wE,a=serializers_value(s.get(o));Nd(a)&&i.push(a),this.element.setMetaProperty(\"ancestorsSchemaIdentifiers\",i)}}const Ud=JSONSchemaVisitor,isJSONReferenceLikeElement=s=>Mu(s)&&s.hasKey(\"$ref\");class ItemsVisitor extends(Mixin(Rd,Ld,_d)){ObjectElement(s){const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"];return this.element=this.toRefractedElement(o,s),Uu}ArrayElement(s){return this.element=new Su.wE,this.element.classes.push(\"json-schema-items\"),s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Wd=ItemsVisitor;const Jd=class RequiredVisitor extends _d{ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-required\"),o}};const Hd=class PatternedFieldsVisitor extends Rd{specPath;ignoredFields;fieldPatternPredicate=es_F;constructor({specPath:s,ignoredFields:o,fieldPatternPredicate:i,...a}){super({...a}),this.specPath=s,this.ignoredFields=o||[],\"function\"==typeof i&&(this.fieldPatternPredicate=i)}ObjectElement(s){return s.forEach(((s,o,i)=>{if(!this.ignoredFields.includes(serializers_value(o))&&this.fieldPatternPredicate(serializers_value(o))){const a=this.specPath(s),u=this.toRefractedElement(a,s),_=new Su.Pr(cloneDeep(o),u);this.copyMetaAndAttributes(i,_),_.classes.push(\"patterned-field\"),this.element.content.push(_)}else this.ignoredFields.includes(serializers_value(o))||this.element.content.push(cloneDeep(i))})),this.copyMetaAndAttributes(s,this.element),Uu}};const Kd=class MapVisitor extends Hd{constructor(s){super(s),this.fieldPatternPredicate=Nd}};class PropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-properties\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const Gd=PropertiesVisitor;class PatternPropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-patternProperties\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const Yd=PatternPropertiesVisitor;class DependenciesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-dependencies\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const Xd=DependenciesVisitor;const Qd=class EnumVisitor extends _d{ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-enum\"),o}};const Zd=class TypeVisitor extends _d{StringElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-type\"),o}ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-type\"),o}};class AllOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-allOf\")}ArrayElement(s){return s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const ef=AllOfVisitor;class AnyOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-anyOf\")}ArrayElement(s){return s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const rf=AnyOfVisitor;class OneOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-oneOf\")}ArrayElement(s){return s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const of=OneOfVisitor;class DefinitionsVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-definitions\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const af=DefinitionsVisitor;class LinksVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-links\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"LinkDescription\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const cf=LinksVisitor;class JSONReferenceVisitor extends(Mixin(Dd,_d)){constructor(s){super(s),this.element=new Fh,this.specPath=fc([\"document\",\"objects\",\"JSONReference\"])}ObjectElement(s){const o=Dd.prototype.ObjectElement.call(this,s);return Iu(this.element.$ref)&&this.element.classes.push(\"reference-element\"),o}}const lf=JSONReferenceVisitor;const uf=class $RefVisitor extends _d{StringElement(s){const o=this.enter(s);return this.element.classes.push(\"reference-value\"),o}};const hf=_curry3((function ifElse(s,o,i){return $a(Math.max(s.length,o.length,i.length),(function _ifElse(){return s.apply(this,arguments)?o.apply(this,arguments):i.apply(this,arguments)}))}));const df=_curry1((function comparator(s){return function(o,i){return s(o,i)?-1:s(i,o)?1:0}}));var mf=_curry2((function sort(s,o){return Array.prototype.slice.call(o,0).sort(s)}));const gf=mf;var yf=_curry1((function(s){return _nth(0,s)}));const bf=yf;const _f=_curry1(_reduced);const Sf=dc(Gh);const xf=ou(lp,Ad);function _toConsumableArray(s){return function _arrayWithoutHoles(s){if(Array.isArray(s))return _arrayLikeToArray(s)}(s)||function _iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function _unsupportedIterableToArray(s,o){if(s){if(\"string\"==typeof s)return _arrayLikeToArray(s,o);var i={}.toString.call(s).slice(8,-1);return\"Object\"===i&&s.constructor&&(i=s.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(s):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(s,o):void 0}}(s)||function _nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function _arrayLikeToArray(s,o){(null==o||o>s.length)&&(o=s.length);for(var i=0,a=Array(o);i<o;i++)a[i]=s[i];return a}var kf=pipe(gf(df((function(s,o){return s.length>o.length}))),bf,Da(\"length\")),Of=za((function(s,o,i){var a=i.apply(void 0,_toConsumableArray(s));return Sf(a)?_f(a):o}));const Cf=hf(xf,(function dispatchImpl(s){var o=kf(s);return $a(o,(function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Ca(Of(i),void 0,s)}))}),gc);const jf=class AlternatingVisitor extends Rd{alternator;constructor({alternator:s,...o}){super({...o}),this.alternator=s}enter(s){const o=this.alternator.map((({predicate:s,specPath:o})=>hf(s,fc(o),gc))),i=Cf(o)(s);return this.element=this.toRefractedElement(i,s),Uu}};const Pf=class SchemaOrReferenceVisitor extends jf{constructor(s){super(s),this.alternator=[{predicate:isJSONReferenceLikeElement,specPath:[\"document\",\"objects\",\"JSONReference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"JSONSchema\"]}]}};class MediaVisitor extends(Mixin(Dd,_d)){constructor(s){super(s),this.element=new Jh,this.specPath=fc([\"document\",\"objects\",\"Media\"])}}const Tf=MediaVisitor;class LinkDescriptionVisitor extends(Mixin(Dd,_d)){constructor(s){super(s),this.element=new Hh,this.specPath=fc([\"document\",\"objects\",\"LinkDescription\"])}}const Nf=LinkDescriptionVisitor,Rf={visitors:{value:_d,JSONSchemaOrJSONReferenceVisitor:Pf,document:{objects:{JSONSchema:{$visitor:Ud,fixedFields:{id:{$ref:\"#/visitors/value\"},$schema:{$ref:\"#/visitors/value\"},multipleOf:{$ref:\"#/visitors/value\"},maximum:{$ref:\"#/visitors/value\"},exclusiveMaximum:{$ref:\"#/visitors/value\"},minimum:{$ref:\"#/visitors/value\"},exclusiveMinimum:{$ref:\"#/visitors/value\"},maxLength:{$ref:\"#/visitors/value\"},minLength:{$ref:\"#/visitors/value\"},pattern:{$ref:\"#/visitors/value\"},additionalItems:Pf,items:Wd,maxItems:{$ref:\"#/visitors/value\"},minItems:{$ref:\"#/visitors/value\"},uniqueItems:{$ref:\"#/visitors/value\"},maxProperties:{$ref:\"#/visitors/value\"},minProperties:{$ref:\"#/visitors/value\"},required:Jd,properties:Gd,additionalProperties:Pf,patternProperties:Yd,dependencies:Xd,enum:Qd,type:Zd,allOf:ef,anyOf:rf,oneOf:of,not:Pf,definitions:af,title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},format:{$ref:\"#/visitors/value\"},base:{$ref:\"#/visitors/value\"},links:cf,media:{$ref:\"#/visitors/document/objects/Media\"},readOnly:{$ref:\"#/visitors/value\"}}},JSONReference:{$visitor:lf,fixedFields:{$ref:uf}},Media:{$visitor:Tf,fixedFields:{binaryEncoding:{$ref:\"#/visitors/value\"},type:{$ref:\"#/visitors/value\"}}},LinkDescription:{$visitor:Nf,fixedFields:{href:{$ref:\"#/visitors/value\"},rel:{$ref:\"#/visitors/value\"},title:{$ref:\"#/visitors/value\"},targetSchema:Pf,mediaType:{$ref:\"#/visitors/value\"},method:{$ref:\"#/visitors/value\"},encType:{$ref:\"#/visitors/value\"},schema:Pf}}}}}},traversal_visitor_getNodeType=s=>{if(ju(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},Df={JSONSchemaDraft4Element:[\"content\"],JSONReferenceElement:[\"content\"],MediaElement:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},Ff={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchemaDraft4\",Lh),o.register(\"jSONReference\",Fh),o.register(\"media\",Jh),o.register(\"linkDescription\",Hh),o}},Vf=Ff,refractor_toolbox=()=>{const s=createNamespace(Vf);return{predicates:{...ae,isStringElement:Iu},namespace:s}},refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=Rf}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:refractor_toolbox,visitorOptions:{keyMap:Df,nodeTypeGetter:traversal_visitor_getNodeType}})},refractor_createRefractor=s=>(o,i={})=>refractor_refract(o,{specPath:s,...i});Lh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),Fh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONReference\",\"$visitor\"]),Jh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Media\",\"$visitor\"]),Hh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const Wf=class Schema_Schema extends Lh{constructor(s,o,i){super(s,o,i),this.element=\"schema\",this.classes.push(\"json-schema-draft-4\")}get idProp(){throw new Dh(\"idProp getter in Schema class is not not supported.\")}set idProp(s){throw new Dh(\"idProp setter in Schema class is not not supported.\")}get $schema(){throw new Dh(\"$schema getter in Schema class is not not supported.\")}set $schema(s){throw new Dh(\"$schema setter in Schema class is not not supported.\")}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){throw new Dh(\"patternProperties getter in Schema class is not not supported.\")}set patternProperties(s){throw new Dh(\"patternProperties setter in Schema class is not not supported.\")}get dependencies(){throw new Dh(\"dependencies getter in Schema class is not not supported.\")}set dependencies(s){throw new Dh(\"dependencies setter in Schema class is not not supported.\")}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){throw new Dh(\"definitions getter in Schema class is not not supported.\")}set definitions(s){throw new Dh(\"definitions setter in Schema class is not not supported.\")}get base(){throw new Dh(\"base getter in Schema class is not not supported.\")}set base(s){throw new Dh(\"base setter in Schema class is not not supported.\")}get links(){throw new Dh(\"links getter in Schema class is not not supported.\")}set links(s){throw new Dh(\"links setter in Schema class is not not supported.\")}get media(){throw new Dh(\"media getter in Schema class is not not supported.\")}set media(s){throw new Dh(\"media setter in Schema class is not not supported.\")}get nullable(){return this.get(\"nullable\")}set nullable(s){this.set(\"nullable\",s)}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}};class SecurityRequirement extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"securityRequirement\"}}const Jf=SecurityRequirement;class SecurityScheme extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"securityScheme\"}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get scheme(){return this.get(\"scheme\")}set scheme(s){this.set(\"scheme\",s)}get bearerFormat(){return this.get(\"bearerFormat\")}set bearerFormat(s){this.set(\"bearerFormat\",s)}get flows(){return this.get(\"flows\")}set flows(s){this.set(\"flows\",s)}get openIdConnectUrl(){return this.get(\"openIdConnectUrl\")}set openIdConnectUrl(s){this.set(\"openIdConnectUrl\",s)}}const Hf=SecurityScheme;class Server extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"server\"}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get variables(){return this.get(\"variables\")}set variables(s){this.set(\"variables\",s)}}const Gf=Server;class ServerVariable extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"serverVariable\"}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}}const Xf=ServerVariable;class Tag extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"tag\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const Qf=Tag;class Xml extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"xml\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get namespace(){return this.get(\"namespace\")}set namespace(s){this.set(\"namespace\",s)}get prefix(){return this.get(\"prefix\")}set prefix(s){this.set(\"prefix\",s)}get attribute(){return this.get(\"attribute\")}set attribute(s){this.set(\"attribute\",s)}get wrapped(){return this.get(\"wrapped\")}set wrapped(s){this.set(\"wrapped\",s)}}const em=Xml;const tm=class visitors_Visitor_Visitor{element;constructor(s={}){Object.assign(this,s)}copyMetaAndAttributes(s,o){(s.meta.length>0||o.meta.length>0)&&(o.meta=yd(o.meta,s.meta),hasElementSourceMap(s)&&o.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(o.attributes=yd(o.attributes,s.attributes))}};const rm=class FallbackVisitor_FallbackVisitor extends tm{enter(s){return this.element=cloneDeep(s),Uu}};const nm=class SpecificationVisitor_SpecificationVisitor extends tm{specObj;passingOptionsNames=[\"specObj\",\"openApiGenericElement\",\"openApiSemanticElement\"];openApiGenericElement;openApiSemanticElement;constructor({specObj:s,passingOptionsNames:o,openApiGenericElement:i,openApiSemanticElement:a,...u}){super({...u}),this.specObj=s,this.openApiGenericElement=i,this.openApiSemanticElement=a,Array.isArray(o)&&(this.passingOptionsNames=o)}retrievePassingOptions(){return Md(this.passingOptionsNames,this)}retrieveFixedFields(s){const o=tp([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof o&&null!==o?Object.keys(o):[]}retrieveVisitor(s){return Qo(Mc,[\"visitors\",...s],this.specObj)?tp([\"visitors\",...s],this.specObj):tp([\"visitors\",...s,\"$visitor\"],this.specObj)}retrieveVisitorInstance(s,o={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...i,...o})}toRefractedElement(s,o,i={}){const a=this.retrieveVisitorInstance(s,i);return a instanceof rm&&(null==a?void 0:a.constructor)===rm?cloneDeep(o):(visitor_visit(o,a,i),a.element)}};var sm=function(){function XTake(s,o){this.xf=o,this.n=s,this.i=0}return XTake.prototype[\"@@transducer/init\"]=_xfBase_init,XTake.prototype[\"@@transducer/result\"]=_xfBase_result,XTake.prototype[\"@@transducer/step\"]=function(s,o){this.i+=1;var i=0===this.n?s:this.xf[\"@@transducer/step\"](s,o);return this.n>=0&&this.i>=this.n?_reduced(i):i},XTake}();function _xtake(s){return function(o){return new sm(s,o)}}const om=_curry2(_dispatchable([\"take\"],_xtake,(function take(s,o){return ja(0,s<0?1/0:s,o)})));var im=_curry2((function(s,o){return na(om(s.length,o),s)}));const am=im,isReferenceLikeElement=s=>Mu(s)&&s.hasKey(\"$ref\"),cm=Mu,lm=Mu,isOpenApiExtension=s=>Iu(s.key)&&am(\"x-\",serializers_value(s.key));const um=class FixedFieldsVisitor_FixedFieldsVisitor extends nm{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:o,canSupportSpecificationExtensions:i,specificationExtensionPredicate:a,...u}){super({...u}),this.specPath=s,this.ignoredFields=o||[],\"boolean\"==typeof i&&(this.canSupportSpecificationExtensions=i),\"function\"==typeof a&&(this.specificationExtensionPredicate=a)}ObjectElement(s){const o=this.specPath(s),i=this.retrieveFixedFields(o);return s.forEach(((s,a,u)=>{if(Iu(a)&&i.includes(serializers_value(a))&&!this.ignoredFields.includes(serializers_value(a))){const i=this.toRefractedElement([...o,\"fixedFields\",serializers_value(a)],s),_=new Su.Pr(cloneDeep(a),i);this.copyMetaAndAttributes(u,_),_.classes.push(\"fixed-field\"),this.element.content.push(_)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(u)){const s=this.toRefractedElement([\"document\",\"extension\"],u);this.element.content.push(s)}else this.ignoredFields.includes(serializers_value(a))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Uu}};class OpenApi3_0Visitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new fh,this.specPath=fc([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){return um.prototype.ObjectElement.call(this,s)}}const pm=OpenApi3_0Visitor;class OpenapiVisitor extends(Mixin(nm,rm)){StringElement(s){const o=new dh(serializers_value(s));return this.copyMetaAndAttributes(s,o),this.element=o,Uu}}const hm=OpenapiVisitor;const dm=class SpecificationExtensionVisitor extends nm{MemberElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"specification-extension\"),Uu}};class InfoVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Xp,this.specPath=fc([\"document\",\"objects\",\"Info\"]),this.canSupportSpecificationExtensions=!0}}const fm=InfoVisitor;const mm=class VersionVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"api-version\"),this.element.classes.push(\"version\"),o}};class ContactVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Wp,this.specPath=fc([\"document\",\"objects\",\"Contact\"]),this.canSupportSpecificationExtensions=!0}}const gm=ContactVisitor;class LicenseVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Qp,this.specPath=fc([\"document\",\"objects\",\"License\"]),this.canSupportSpecificationExtensions=!0}}const ym=LicenseVisitor;class LinkVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Zp,this.specPath=fc([\"document\",\"objects\",\"Link\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return(Iu(this.element.operationId)||Iu(this.element.operationRef))&&this.element.classes.push(\"reference-element\"),o}}const vm=LinkVisitor;const bm=class OperationRefVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};const _m=class OperationIdVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};const Sm=class PatternedFieldsVisitor_PatternedFieldsVisitor extends nm{specPath;ignoredFields;fieldPatternPredicate=es_F;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:o,fieldPatternPredicate:i,canSupportSpecificationExtensions:a,specificationExtensionPredicate:u,..._}){super({..._}),this.specPath=s,this.ignoredFields=o||[],\"function\"==typeof i&&(this.fieldPatternPredicate=i),\"boolean\"==typeof a&&(this.canSupportSpecificationExtensions=a),\"function\"==typeof u&&(this.specificationExtensionPredicate=u)}ObjectElement(s){return s.forEach(((s,o,i)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(i)){const s=this.toRefractedElement([\"document\",\"extension\"],i);this.element.content.push(s)}else if(!this.ignoredFields.includes(serializers_value(o))&&this.fieldPatternPredicate(serializers_value(o))){const a=this.specPath(s),u=this.toRefractedElement(a,s),_=new Su.Pr(cloneDeep(o),u);this.copyMetaAndAttributes(i,_),_.classes.push(\"patterned-field\"),this.element.content.push(_)}else this.ignoredFields.includes(serializers_value(o))||this.element.content.push(cloneDeep(i))})),this.copyMetaAndAttributes(s,this.element),Uu}};const Em=class MapVisitor_MapVisitor extends Sm{constructor(s){super(s),this.fieldPatternPredicate=Nd}};class LinkParameters extends Su.Sh{static primaryClass=\"link-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(LinkParameters.primaryClass)}}const wm=LinkParameters;class ParametersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new wm,this.specPath=fc([\"value\"])}}const xm=ParametersVisitor;class ServerVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Gf,this.specPath=fc([\"document\",\"objects\",\"Server\"]),this.canSupportSpecificationExtensions=!0}}const km=ServerVisitor;const Om=class UrlVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"server-url\"),o}};class Servers extends Su.wE{static primaryClass=\"servers\";constructor(s,o,i){super(s,o,i),this.classes.push(Servers.primaryClass)}}const Cm=Servers;class ServersVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Cm}ArrayElement(s){return s.forEach((s=>{const o=cm(s)?[\"document\",\"objects\",\"Server\"]:[\"value\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Am=ServersVisitor;class ServerVariableVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Xf,this.specPath=fc([\"document\",\"objects\",\"ServerVariable\"]),this.canSupportSpecificationExtensions=!0}}const jm=ServerVariableVisitor;class ServerVariables extends Su.Sh{static primaryClass=\"server-variables\";constructor(s,o,i){super(s,o,i),this.classes.push(ServerVariables.primaryClass)}}const Im=ServerVariables;class VariablesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Im,this.specPath=fc([\"document\",\"objects\",\"ServerVariable\"])}}const Pm=VariablesVisitor;class MediaTypeVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new th,this.specPath=fc([\"document\",\"objects\",\"MediaType\"]),this.canSupportSpecificationExtensions=!0}}const Tm=MediaTypeVisitor;const Nm=class AlternatingVisitor_AlternatingVisitor extends nm{alternator;constructor({alternator:s,...o}){super({...o}),this.alternator=s||[]}enter(s){const o=this.alternator.map((({predicate:s,specPath:o})=>hf(s,fc(o),gc))),i=Cf(o)(s);return this.element=this.toRefractedElement(i,s),Uu}},Mm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Up||s(a)&&o(\"callback\",a)&&i(\"object\",a))),Rm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof zp||s(a)&&o(\"components\",a)&&i(\"object\",a))),Dm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Wp||s(a)&&o(\"contact\",a)&&i(\"object\",a))),Lm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Kp||s(a)&&o(\"example\",a)&&i(\"object\",a))),Fm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Gp||s(a)&&o(\"externalDocumentation\",a)&&i(\"object\",a))),Bm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Yp||s(a)&&o(\"header\",a)&&i(\"object\",a))),$m=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Xp||s(a)&&o(\"info\",a)&&i(\"object\",a))),qm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Qp||s(a)&&o(\"license\",a)&&i(\"object\",a))),Vm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Zp||s(a)&&o(\"link\",a)&&i(\"object\",a))),Um=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof dh||s(a)&&o(\"openapi\",a)&&i(\"string\",a))),zm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i,hasClass:a})=>u=>u instanceof fh||s(u)&&o(\"openApi3_0\",u)&&i(\"object\",u)&&a(\"api\",u))),Wm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof vh||s(a)&&o(\"operation\",a)&&i(\"object\",a))),Jm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof _h||s(a)&&o(\"parameter\",a)&&i(\"object\",a))),Hm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof wh||s(a)&&o(\"pathItem\",a)&&i(\"object\",a))),Km=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Oh||s(a)&&o(\"paths\",a)&&i(\"object\",a))),Gm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof jh||s(a)&&o(\"reference\",a)&&i(\"object\",a))),Ym=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ih||s(a)&&o(\"requestBody\",a)&&i(\"object\",a))),Xm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ph||s(a)&&o(\"response\",a)&&i(\"object\",a))),Qm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Rh||s(a)&&o(\"responses\",a)&&i(\"object\",a))),Zm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Wf||s(a)&&o(\"schema\",a)&&i(\"object\",a))),isBooleanJsonSchemaElement=s=>Nu(s)&&s.classes.includes(\"boolean-json-schema\"),eg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Jf||s(a)&&o(\"securityRequirement\",a)&&i(\"object\",a))),rg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Hf||s(a)&&o(\"securityScheme\",a)&&i(\"object\",a))),ng=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Gf||s(a)&&o(\"server\",a)&&i(\"object\",a))),sg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Xf||s(a)&&o(\"serverVariable\",a)&&i(\"object\",a))),og=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof th||s(a)&&o(\"mediaType\",a)&&i(\"object\",a))),lg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i,hasClass:a})=>u=>u instanceof Cm||s(u)&&o(\"array\",u)&&i(\"array\",u)&&a(\"servers\",u)));class SchemaVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}}const pg=SchemaVisitor;class ExamplesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"examples\"),this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"],this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),o}}const fg=ExamplesVisitor;class MediaTypeExamples extends Su.Sh{static primaryClass=\"media-type-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(MediaTypeExamples.primaryClass),this.classes.push(\"examples\")}}const mg=MediaTypeExamples;const gg=class ExamplesVisitor_ExamplesVisitor extends fg{constructor(s){super(s),this.element=new mg}};class MediaTypeEncoding extends Su.Sh{static primaryClass=\"media-type-encoding\";constructor(s,o,i){super(s,o,i),this.classes.push(MediaTypeEncoding.primaryClass)}}const yg=MediaTypeEncoding;class EncodingVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new yg,this.specPath=fc([\"document\",\"objects\",\"Encoding\"])}}const _g=EncodingVisitor;class SecurityRequirementVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Jf,this.specPath=fc([\"value\"])}}const xg=SecurityRequirementVisitor;class Security extends Su.wE{static primaryClass=\"security\";constructor(s,o,i){super(s,o,i),this.classes.push(Security.primaryClass)}}const kg=Security;class SecurityVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new kg}ArrayElement(s){return s.forEach((s=>{if(Mu(s)){const o=this.toRefractedElement([\"document\",\"objects\",\"SecurityRequirement\"],s);this.element.push(o)}else this.element.push(cloneDeep(s))})),this.copyMetaAndAttributes(s,this.element),Uu}}const qg=SecurityVisitor;class ComponentsVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new zp,this.specPath=fc([\"document\",\"objects\",\"Components\"]),this.canSupportSpecificationExtensions=!0}}const Vg=ComponentsVisitor;class TagVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Qf,this.specPath=fc([\"document\",\"objects\",\"Tag\"]),this.canSupportSpecificationExtensions=!0}}const Ug=TagVisitor;class ReferenceVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new jh,this.specPath=fc([\"document\",\"objects\",\"Reference\"]),this.canSupportSpecificationExtensions=!1}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Iu(this.element.$ref)&&this.element.classes.push(\"reference-element\"),o}}const zg=ReferenceVisitor;const Wg=class $RefVisitor_$RefVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class ParameterVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new _h,this.specPath=fc([\"document\",\"objects\",\"Parameter\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.contentProp)&&this.element.contentProp.filter(og).forEach(((s,o)=>{s.setMetaProperty(\"media-type\",serializers_value(o))})),o}}const Kg=ParameterVisitor;class SchemaVisitor_SchemaVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}}const Yg=SchemaVisitor_SchemaVisitor;class HeaderVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Yp,this.specPath=fc([\"document\",\"objects\",\"Header\"]),this.canSupportSpecificationExtensions=!0}}const Xg=HeaderVisitor;class header_SchemaVisitor_SchemaVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}}const Zg=header_SchemaVisitor_SchemaVisitor;class HeaderExamples extends Su.Sh{static primaryClass=\"header-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(HeaderExamples.primaryClass),this.classes.push(\"examples\")}}const ey=HeaderExamples;const ty=class header_ExamplesVisitor_ExamplesVisitor extends fg{constructor(s){super(s),this.element=new ey}};class ContentVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"content\"),this.specPath=fc([\"document\",\"objects\",\"MediaType\"])}}const ry=ContentVisitor;class HeaderContent extends Su.Sh{static primaryClass=\"header-content\";constructor(s,o,i){super(s,o,i),this.classes.push(HeaderContent.primaryClass),this.classes.push(\"content\")}}const ny=HeaderContent;const sy=class ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new ny}};class schema_SchemaVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Wf,this.specPath=fc([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0}}const oy=schema_SchemaVisitor,iy=Rf.visitors.document.objects.JSONSchema.fixedFields.allOf;const ay=class AllOfVisitor_AllOfVisitor extends iy{ArrayElement(s){const o=iy.prototype.ArrayElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},cy=Rf.visitors.document.objects.JSONSchema.fixedFields.anyOf;const ly=class AnyOfVisitor_AnyOfVisitor extends cy{ArrayElement(s){const o=cy.prototype.ArrayElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},uy=Rf.visitors.document.objects.JSONSchema.fixedFields.oneOf;const py=class OneOfVisitor_OneOfVisitor extends uy{ArrayElement(s){const o=uy.prototype.ArrayElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},hy=Rf.visitors.document.objects.JSONSchema.fixedFields.items;const dy=class ItemsVisitor_ItemsVisitor extends hy{ObjectElement(s){const o=hy.prototype.ObjectElement.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}ArrayElement(s){return this.enter(s)}},fy=Rf.visitors.document.objects.JSONSchema.fixedFields.properties;const my=class PropertiesVisitor_PropertiesVisitor extends fy{ObjectElement(s){const o=fy.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},gy=Rf.visitors.document.objects.JSONSchema.fixedFields.type;const yy=class TypeVisitor_TypeVisitor extends gy{ArrayElement(s){return this.enter(s)}},vy=Rf.visitors.JSONSchemaOrJSONReferenceVisitor;const by=class SchemaOrReferenceVisitor_SchemaOrReferenceVisitor extends vy{ObjectElement(s){const o=vy.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}};class DiscriminatorVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Jp,this.specPath=fc([\"document\",\"objects\",\"Discriminator\"]),this.canSupportSpecificationExtensions=!1}}const _y=DiscriminatorVisitor;class DiscriminatorMapping extends Su.Sh{static primaryClass=\"discriminator-mapping\";constructor(s,o,i){super(s,o,i),this.classes.push(DiscriminatorMapping.primaryClass)}}const Sy=DiscriminatorMapping;class MappingVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Sy,this.specPath=fc([\"value\"])}}const Ey=MappingVisitor;class XmlVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new em,this.specPath=fc([\"document\",\"objects\",\"XML\"]),this.canSupportSpecificationExtensions=!0}}const wy=XmlVisitor;class ParameterExamples extends Su.Sh{static primaryClass=\"parameter-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(ParameterExamples.primaryClass),this.classes.push(\"examples\")}}const xy=ParameterExamples;const ky=class parameter_ExamplesVisitor_ExamplesVisitor extends fg{constructor(s){super(s),this.element=new xy}};class ParameterContent extends Su.Sh{static primaryClass=\"parameter-content\";constructor(s,o,i){super(s,o,i),this.classes.push(ParameterContent.primaryClass),this.classes.push(\"content\")}}const Oy=ParameterContent;const Cy=class parameter_ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new Oy}};class ComponentsSchemas extends Su.Sh{static primaryClass=\"components-schemas\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsSchemas.primaryClass)}}const Ay=ComponentsSchemas;class SchemasVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Ay,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Schema\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}}const jy=SchemasVisitor;class ComponentsResponses extends Su.Sh{static primaryClass=\"components-responses\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsResponses.primaryClass)}}const Iy=ComponentsResponses;class ResponsesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Iy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Xm).forEach(((s,o)=>{s.setMetaProperty(\"http-status-code\",serializers_value(o))})),o}}const Py=ResponsesVisitor;class ComponentsParameters extends Su.Sh{static primaryClass=\"components-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsParameters.primaryClass),this.classes.push(\"parameters\")}}const Ty=ComponentsParameters;class ParametersVisitor_ParametersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Ty,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"parameter\")})),o}}const Ny=ParametersVisitor_ParametersVisitor;class ComponentsExamples extends Su.Sh{static primaryClass=\"components-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsExamples.primaryClass),this.classes.push(\"examples\")}}const My=ComponentsExamples;class components_ExamplesVisitor_ExamplesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new My,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),o}}const Ry=components_ExamplesVisitor_ExamplesVisitor;class ComponentsRequestBodies extends Su.Sh{static primaryClass=\"components-request-bodies\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsRequestBodies.primaryClass)}}const Dy=ComponentsRequestBodies;class RequestBodiesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Dy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"RequestBody\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"requestBody\")})),o}}const Ly=RequestBodiesVisitor;class ComponentsHeaders extends Su.Sh{static primaryClass=\"components-headers\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsHeaders.primaryClass)}}const Fy=ComponentsHeaders;class HeadersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Fy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.filter(Bm).forEach(((s,o)=>{s.setMetaProperty(\"header-name\",serializers_value(o))})),o}}const By=HeadersVisitor;class ComponentsSecuritySchemes extends Su.Sh{static primaryClass=\"components-security-schemes\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsSecuritySchemes.primaryClass)}}const $y=ComponentsSecuritySchemes;class SecuritySchemesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new $y,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"SecurityScheme\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"securityScheme\")})),o}}const qy=SecuritySchemesVisitor;class ComponentsLinks extends Su.Sh{static primaryClass=\"components-links\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsLinks.primaryClass)}}const Vy=ComponentsLinks;class LinksVisitor_LinksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Vy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),o}}const Uy=LinksVisitor_LinksVisitor;class ComponentsCallbacks extends Su.Sh{static primaryClass=\"components-callbacks\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsCallbacks.primaryClass)}}const zy=ComponentsCallbacks;class CallbacksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new zy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),o}}const Wy=CallbacksVisitor;class ExampleVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Kp,this.specPath=fc([\"document\",\"objects\",\"Example\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Iu(this.element.externalValue)&&this.element.classes.push(\"reference-element\"),o}}const Jy=ExampleVisitor;const Hy=class ExternalValueVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class ExternalDocumentationVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Gp,this.specPath=fc([\"document\",\"objects\",\"ExternalDocumentation\"]),this.canSupportSpecificationExtensions=!0}}const Ky=ExternalDocumentationVisitor;class encoding_EncodingVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Hp,this.specPath=fc([\"document\",\"objects\",\"Encoding\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.headers)&&this.element.headers.filter(Bm).forEach(((s,o)=>{s.setMetaProperty(\"header-name\",serializers_value(o))})),o}}const Gy=encoding_EncodingVisitor;class EncodingHeaders extends Su.Sh{static primaryClass=\"encoding-headers\";constructor(s,o,i){super(s,o,i),this.classes.push(EncodingHeaders.primaryClass)}}const Yy=EncodingHeaders;class HeadersVisitor_HeadersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Yy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,o)=>{if(!Bm(s))return;const i=serializers_value(o);s.setMetaProperty(\"headerName\",i)})),o}}const Xy=HeadersVisitor_HeadersVisitor;class PathsVisitor extends(Mixin(Sm,rm)){constructor(s){super(s),this.element=new Oh,this.specPath=fc([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=es_T}ObjectElement(s){const o=Sm.prototype.ObjectElement.call(this,s);return this.element.filter(Hm).forEach(((s,o)=>{o.classes.push(\"openapi-path-template\"),o.classes.push(\"path-template\"),s.setMetaProperty(\"path\",cloneDeep(o))})),o}}const Qy=PathsVisitor;class RequestBodyVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Ih,this.specPath=fc([\"document\",\"objects\",\"RequestBody\"])}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.contentProp)&&this.element.contentProp.filter(og).forEach(((s,o)=>{s.setMetaProperty(\"media-type\",serializers_value(o))})),o}}const Zy=RequestBodyVisitor;class RequestBodyContent extends Su.Sh{static primaryClass=\"request-body-content\";constructor(s,o,i){super(s,o,i),this.classes.push(RequestBodyContent.primaryClass),this.classes.push(\"content\")}}const ev=RequestBodyContent;const tv=class request_body_ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new ev}};class CallbackVisitor extends(Mixin(Sm,rm)){constructor(s){super(s),this.element=new Up,this.specPath=fc([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=s=>/{(?<expression>[^}]{1,2083})}/.test(String(s))}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Hm).forEach(((s,o)=>{s.setMetaProperty(\"runtime-expression\",serializers_value(o))})),o}}const rv=CallbackVisitor;class ResponseVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Ph,this.specPath=fc([\"document\",\"objects\",\"Response\"])}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.contentProp)&&this.element.contentProp.filter(og).forEach(((s,o)=>{s.setMetaProperty(\"media-type\",serializers_value(o))})),Mu(this.element.headers)&&this.element.headers.filter(Bm).forEach(((s,o)=>{s.setMetaProperty(\"header-name\",serializers_value(o))})),o}}const nv=ResponseVisitor;class ResponseHeaders extends Su.Sh{static primaryClass=\"response-headers\";constructor(s,o,i){super(s,o,i),this.classes.push(ResponseHeaders.primaryClass)}}const sv=ResponseHeaders;class response_HeadersVisitor_HeadersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new sv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,o)=>{if(!Bm(s))return;const i=serializers_value(o);s.setMetaProperty(\"header-name\",i)})),o}}const ov=response_HeadersVisitor_HeadersVisitor;class ResponseContent extends Su.Sh{static primaryClass=\"response-content\";constructor(s,o,i){super(s,o,i),this.classes.push(ResponseContent.primaryClass),this.classes.push(\"content\")}}const iv=ResponseContent;const av=class response_ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new iv}};class ResponseLinks extends Su.Sh{static primaryClass=\"response-links\";constructor(s,o,i){super(s,o,i),this.classes.push(ResponseLinks.primaryClass)}}const cv=ResponseLinks;class response_LinksVisitor_LinksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new cv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),o}}const lv=response_LinksVisitor_LinksVisitor;function _isNumber(s){return\"[object Number]\"===Object.prototype.toString.call(s)}var uv=_curry2((function range(s,o){if(!_isNumber(s)||!_isNumber(o))throw new TypeError(\"Both arguments to range must be numbers\");for(var i=Array(s<o?o-s:0),a=s<0?o+Math.abs(s):o-s,u=0;u<a;)i[u]=u+s,u+=1;return i}));const pv=uv;function hasOrAdd(s,o,i){var a,u=typeof s;switch(u){case\"string\":case\"number\":return 0===s&&1/s==-1/0?!!i._items[\"-0\"]||(o&&(i._items[\"-0\"]=!0),!1):null!==i._nativeSet?o?(a=i._nativeSet.size,i._nativeSet.add(s),i._nativeSet.size===a):i._nativeSet.has(s):u in i._items?s in i._items[u]||(o&&(i._items[u][s]=!0),!1):(o&&(i._items[u]={},i._items[u][s]=!0),!1);case\"boolean\":if(u in i._items){var _=s?1:0;return!!i._items[u][_]||(o&&(i._items[u][_]=!0),!1)}return o&&(i._items[u]=s?[!1,!0]:[!0,!1]),!1;case\"function\":return null!==i._nativeSet?o?(a=i._nativeSet.size,i._nativeSet.add(s),i._nativeSet.size===a):i._nativeSet.has(s):u in i._items?!!_includes(s,i._items[u])||(o&&i._items[u].push(s),!1):(o&&(i._items[u]=[s]),!1);case\"undefined\":return!!i._items[u]||(o&&(i._items[u]=!0),!1);case\"object\":if(null===s)return!!i._items.null||(o&&(i._items.null=!0),!1);default:return(u=Object.prototype.toString.call(s))in i._items?!!_includes(s,i._items[u])||(o&&i._items[u].push(s),!1):(o&&(i._items[u]=[s]),!1)}}const hv=function(){function _Set(){this._nativeSet=\"function\"==typeof Set?new Set:null,this._items={}}return _Set.prototype.add=function(s){return!hasOrAdd(s,!0,this)},_Set.prototype.has=function(s){return hasOrAdd(s,!1,this)},_Set}();var dv=_curry2((function difference(s,o){for(var i=[],a=0,u=s.length,_=o.length,w=new hv,x=0;x<_;x+=1)w.add(o[x]);for(;a<u;)w.add(s[a])&&(i[i.length]=s[a]),a+=1;return i}));const fv=dv;class MixedFieldsVisitor extends(Mixin(um,Sm)){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:s,specPathPatternedFields:o,...i}){super({...i}),this.specPathFixedFields=s,this.specPathPatternedFields=o}ObjectElement(s){const{specPath:o,ignoredFields:i}=this;try{this.specPath=this.specPathFixedFields;const o=this.retrieveFixedFields(this.specPath(s));this.ignoredFields=[...i,...fv(s.keys(),o)],um.prototype.ObjectElement.call(this,s),this.specPath=this.specPathPatternedFields,this.ignoredFields=o,Sm.prototype.ObjectElement.call(this,s)}catch(s){throw this.specPath=o,s}return Uu}}const mv=MixedFieldsVisitor;class responses_ResponsesVisitor extends(Mixin(mv,rm)){constructor(s){super(s),this.element=new Rh,this.specPathFixedFields=fc([\"document\",\"objects\",\"Responses\"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"],this.fieldPatternPredicate=s=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${pv(100,600).join(\"|\")})$`).test(String(s))}ObjectElement(s){const o=mv.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Xm).forEach(((s,o)=>{const i=cloneDeep(o);this.fieldPatternPredicate(serializers_value(i))&&s.setMetaProperty(\"http-status-code\",i)})),o}}const gv=responses_ResponsesVisitor;class DefaultVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Response\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)?this.element.setMetaProperty(\"referenced-element\",\"response\"):Xm(this.element)&&this.element.setMetaProperty(\"http-status-code\",\"default\"),o}}const yv=DefaultVisitor;class OperationVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new vh,this.specPath=fc([\"document\",\"objects\",\"Operation\"])}}const vv=OperationVisitor;class OperationTags extends Su.wE{static primaryClass=\"operation-tags\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationTags.primaryClass)}}const bv=OperationTags;const _v=class TagsVisitor extends rm{constructor(s){super(s),this.element=new bv}ArrayElement(s){return this.element=this.element.concat(cloneDeep(s)),Uu}};class OperationParameters extends Su.wE{static primaryClass=\"operation-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationParameters.primaryClass),this.classes.push(\"parameters\")}}const Sv=OperationParameters;class open_api_3_0_ParametersVisitor_ParametersVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"parameters\")}ArrayElement(s){return s.forEach((s=>{const o=isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"],i=this.toRefractedElement(o,s);Gm(i)&&i.setMetaProperty(\"referenced-element\",\"parameter\"),this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Ev=open_api_3_0_ParametersVisitor_ParametersVisitor;const wv=class operation_ParametersVisitor_ParametersVisitor extends Ev{constructor(s){super(s),this.element=new Sv}};const xv=class RequestBodyVisitor_RequestBodyVisitor extends Nm{constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"RequestBody\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"requestBody\"),o}};class OperationCallbacks extends Su.Sh{static primaryClass=\"operation-callbacks\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationCallbacks.primaryClass)}}const kv=OperationCallbacks;class CallbacksVisitor_CallbacksVisitor extends(Mixin(Em,rm)){specPath;constructor(s){super(s),this.element=new kv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),o}}const Ov=CallbacksVisitor_CallbacksVisitor;class OperationSecurity extends Su.wE{static primaryClass=\"operation-security\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationSecurity.primaryClass),this.classes.push(\"security\")}}const Cv=OperationSecurity;class SecurityVisitor_SecurityVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Cv}ArrayElement(s){return s.forEach((s=>{const o=Mu(s)?[\"document\",\"objects\",\"SecurityRequirement\"]:[\"value\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Av=SecurityVisitor_SecurityVisitor;class OperationServers extends Su.wE{static primaryClass=\"operation-servers\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationServers.primaryClass),this.classes.push(\"servers\")}}const jv=OperationServers;const Iv=class ServersVisitor_ServersVisitor extends Am{constructor(s){super(s),this.element=new jv}};class PathItemVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new wh,this.specPath=fc([\"document\",\"objects\",\"PathItem\"])}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return this.element.filter(Wm).forEach(((s,o)=>{const i=cloneDeep(o);i.content=serializers_value(i).toUpperCase(),s.setMetaProperty(\"http-method\",i)})),Iu(this.element.$ref)&&this.element.classes.push(\"reference-element\"),o}}const Pv=PathItemVisitor;const Tv=class path_item_$RefVisitor_$RefVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class PathItemServers extends Su.wE{static primaryClass=\"path-item-servers\";constructor(s,o,i){super(s,o,i),this.classes.push(PathItemServers.primaryClass),this.classes.push(\"servers\")}}const Nv=PathItemServers;const Mv=class path_item_ServersVisitor_ServersVisitor extends Am{constructor(s){super(s),this.element=new Nv}};class PathItemParameters extends Su.wE{static primaryClass=\"path-item-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(PathItemParameters.primaryClass),this.classes.push(\"parameters\")}}const Rv=PathItemParameters;const Dv=class path_item_ParametersVisitor_ParametersVisitor extends Ev{constructor(s){super(s),this.element=new Rv}};class SecuritySchemeVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Hf,this.specPath=fc([\"document\",\"objects\",\"SecurityScheme\"]),this.canSupportSpecificationExtensions=!0}}const Lv=SecuritySchemeVisitor;class OAuthFlowsVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new uh,this.specPath=fc([\"document\",\"objects\",\"OAuthFlows\"]),this.canSupportSpecificationExtensions=!0}}const Fv=OAuthFlowsVisitor;class OAuthFlowVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new rh,this.specPath=fc([\"document\",\"objects\",\"OAuthFlow\"]),this.canSupportSpecificationExtensions=!0}}const Bv=OAuthFlowVisitor;class OAuthFlowScopes extends Su.Sh{static primaryClass=\"oauth-flow-scopes\";constructor(s,o,i){super(s,o,i),this.classes.push(OAuthFlowScopes.primaryClass)}}const $v=OAuthFlowScopes;class ScopesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new $v,this.specPath=fc([\"value\"])}}const qv=ScopesVisitor;class Tags extends Su.wE{static primaryClass=\"tags\";constructor(s,o,i){super(s,o,i),this.classes.push(Tags.primaryClass)}}const Vv=Tags;class TagsVisitor_TagsVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Vv}ArrayElement(s){return s.forEach((s=>{const o=lm(s)?[\"document\",\"objects\",\"Tag\"]:[\"value\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Uv=TagsVisitor_TagsVisitor,{fixedFields:zv}=Rf.visitors.document.objects.JSONSchema,Wv={visitors:{value:rm,document:{objects:{OpenApi:{$visitor:pm,fixedFields:{openapi:hm,info:{$ref:\"#/visitors/document/objects/Info\"},servers:Am,paths:{$ref:\"#/visitors/document/objects/Paths\"},components:{$ref:\"#/visitors/document/objects/Components\"},security:qg,tags:Uv,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:fm,fixedFields:{title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},termsOfService:{$ref:\"#/visitors/value\"},contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:mm}},Contact:{$visitor:gm,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"},email:{$ref:\"#/visitors/value\"}}},License:{$visitor:ym,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Server:{$visitor:km,fixedFields:{url:Om,description:{$ref:\"#/visitors/value\"},variables:Pm}},ServerVariable:{$visitor:jm,fixedFields:{enum:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},Components:{$visitor:Vg,fixedFields:{schemas:jy,responses:Py,parameters:Ny,examples:Ry,requestBodies:Ly,headers:By,securitySchemes:qy,links:Uy,callbacks:Wy}},Paths:{$visitor:Qy},PathItem:{$visitor:Pv,fixedFields:{$ref:Tv,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:Mv,parameters:Dv}},Operation:{$visitor:vv,fixedFields:{tags:_v,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:{$ref:\"#/visitors/value\"},parameters:wv,requestBody:xv,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:Ov,deprecated:{$ref:\"#/visitors/value\"},security:Av,servers:Iv}},ExternalDocumentation:{$visitor:Ky,fixedFields:{description:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Parameter:{$visitor:Kg,fixedFields:{name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:Yg,example:{$ref:\"#/visitors/value\"},examples:ky,content:Cy}},RequestBody:{$visitor:Zy,fixedFields:{description:{$ref:\"#/visitors/value\"},content:tv,required:{$ref:\"#/visitors/value\"}}},MediaType:{$visitor:Tm,fixedFields:{schema:pg,example:{$ref:\"#/visitors/value\"},examples:gg,encoding:_g}},Encoding:{$visitor:Gy,fixedFields:{contentType:{$ref:\"#/visitors/value\"},headers:Xy,style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"}}},Responses:{$visitor:gv,fixedFields:{default:yv}},Response:{$visitor:nv,fixedFields:{description:{$ref:\"#/visitors/value\"},headers:ov,content:av,links:lv}},Callback:{$visitor:rv},Example:{$visitor:Jy,fixedFields:{summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},value:{$ref:\"#/visitors/value\"},externalValue:Hy}},Link:{$visitor:vm,fixedFields:{operationRef:bm,operationId:_m,parameters:xm,requestBody:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:Xg,fixedFields:{description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:Zg,example:{$ref:\"#/visitors/value\"},examples:ty,content:sy}},Tag:{$visitor:Ug,fixedFields:{name:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:zg,fixedFields:{$ref:Wg}},JSONSchema:{$ref:\"#/visitors/document/objects/Schema\"},JSONReference:{$ref:\"#/visitors/document/objects/Reference\"},Schema:{$visitor:oy,fixedFields:{title:zv.title,multipleOf:zv.multipleOf,maximum:zv.maximum,exclusiveMaximum:zv.exclusiveMaximum,minimum:zv.minimum,exclusiveMinimum:zv.exclusiveMinimum,maxLength:zv.maxLength,minLength:zv.minLength,pattern:zv.pattern,maxItems:zv.maxItems,minItems:zv.minItems,uniqueItems:zv.uniqueItems,maxProperties:zv.maxProperties,minProperties:zv.minProperties,required:zv.required,enum:zv.enum,type:yy,allOf:ay,anyOf:ly,oneOf:py,not:by,items:dy,properties:my,additionalProperties:by,description:zv.description,format:zv.format,default:zv.default,nullable:{$ref:\"#/visitors/value\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},writeOnly:{$ref:\"#/visitors/value\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:_y,fixedFields:{propertyName:{$ref:\"#/visitors/value\"},mapping:Ey}},XML:{$visitor:wy,fixedFields:{name:{$ref:\"#/visitors/value\"},namespace:{$ref:\"#/visitors/value\"},prefix:{$ref:\"#/visitors/value\"},attribute:{$ref:\"#/visitors/value\"},wrapped:{$ref:\"#/visitors/value\"}}},SecurityScheme:{$visitor:Lv,fixedFields:{type:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},scheme:{$ref:\"#/visitors/value\"},bearerFormat:{$ref:\"#/visitors/value\"},flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:{$ref:\"#/visitors/value\"}}},OAuthFlows:{$visitor:Fv,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:Bv,fixedFields:{authorizationUrl:{$ref:\"#/visitors/value\"},tokenUrl:{$ref:\"#/visitors/value\"},refreshUrl:{$ref:\"#/visitors/value\"},scopes:qv}},SecurityRequirement:{$visitor:xg}},extension:{$visitor:dm}}}},src_traversal_visitor_getNodeType=s=>{if(ju(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},Jv={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_0Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...Ku},Hv={namespace:s=>{const{base:o}=s;return o.register(\"callback\",Up),o.register(\"components\",zp),o.register(\"contact\",Wp),o.register(\"discriminator\",Jp),o.register(\"encoding\",Hp),o.register(\"example\",Kp),o.register(\"externalDocumentation\",Gp),o.register(\"header\",Yp),o.register(\"info\",Xp),o.register(\"license\",Qp),o.register(\"link\",Zp),o.register(\"mediaType\",th),o.register(\"oAuthFlow\",rh),o.register(\"oAuthFlows\",uh),o.register(\"openapi\",dh),o.register(\"openApi3_0\",fh),o.register(\"operation\",vh),o.register(\"parameter\",_h),o.register(\"pathItem\",wh),o.register(\"paths\",Oh),o.register(\"reference\",jh),o.register(\"requestBody\",Ih),o.register(\"response\",Ph),o.register(\"responses\",Rh),o.register(\"schema\",Wf),o.register(\"securityRequirement\",Jf),o.register(\"securityScheme\",Hf),o.register(\"server\",Gf),o.register(\"serverVariable\",Xf),o.register(\"tag\",Qf),o.register(\"xml\",em),o}},Kv=Hv,src_refractor_toolbox=()=>{const s=createNamespace(Kv);return{predicates:{...ce,isElement:ju,isStringElement:Iu,isArrayElement:Ru,isObjectElement:Mu,isMemberElement:Du,includesClasses,hasElementSourceMap},namespace:s}},src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:i=[]}={})=>{const a=(0,Su.e)(s),u=dereference(Wv),_=new(tp(o,u))({specObj:u});return visitor_visit(a,_),dispatchPluginsSync(_.element,i,{toolboxCreator:src_refractor_toolbox,visitorOptions:{keyMap:Jv,nodeTypeGetter:src_traversal_visitor_getNodeType}})},src_refractor_createRefractor=s=>(o,i={})=>src_refractor_refract(o,{specPath:s,...i});Up.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),zp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Wp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),Kp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),Jp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),Hp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),Gp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),Yp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),Xp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),Qp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),Zp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),th.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),rh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),uh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),dh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),fh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),vh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),_h.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),wh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),Oh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),jh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),Ih.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),Ph.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),Rh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),Wf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),Jf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),Hf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),Gf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),Xf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),Qf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),em.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const Gv=class Callback_Callback extends Up{};const Yv=class Components_Components extends zp{get pathItems(){return this.get(\"pathItems\")}set pathItems(s){this.set(\"pathItems\",s)}};const Xv=class Contact_Contact extends Wp{};const Qv=class Discriminator_Discriminator extends Jp{};const Zv=class Encoding_Encoding extends Hp{};const eb=class Example_Example extends Kp{};const tb=class ExternalDocumentation_ExternalDocumentation extends Gp{};const nb=class Header_Header extends Yp{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const pb=class Info_Info extends Xp{get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}};class JsonSchemaDialect extends Su.Om{static default=new JsonSchemaDialect(\"https://spec.openapis.org/oas/3.1/dialect/base\");constructor(s,o,i){super(s,o,i),this.element=\"jsonSchemaDialect\"}}const mb=JsonSchemaDialect;const yb=class License_License extends Qp{get identifier(){return this.get(\"identifier\")}set identifier(s){this.set(\"identifier\",s)}};const _b=class Link_Link extends Zp{};const Sb=class MediaType_MediaType extends th{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const wb=class OAuthFlow_OAuthFlow extends rh{};const Ob=class OAuthFlows_OAuthFlows extends uh{};const Ab=class Openapi_Openapi extends dh{};class OpenApi3_1 extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"openApi3_1\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get jsonSchemaDialect(){return this.get(\"jsonSchemaDialect\")}set jsonSchemaDialect(s){this.set(\"jsonSchemaDialect\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get webhooks(){return this.get(\"webhooks\")}set webhooks(s){this.set(\"webhooks\",s)}}const Ib=OpenApi3_1;const Pb=class Operation_Operation extends vh{get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}};const Mb=class Parameter_Parameter extends _h{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const Rb=class PathItem_PathItem extends wh{get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}};const Lb=class Paths_Paths extends Oh{};class Reference_Reference extends jh{}Object.defineProperty(Reference_Reference.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0}),Object.defineProperty(Reference_Reference.prototype,\"summary\",{get(){return this.get(\"summary\")},set(s){this.set(\"summary\",s)},enumerable:!0});const qb=Reference_Reference;const zb=class RequestBody_RequestBody extends Ih{};const Qb=class elements_Response_Response extends Ph{};const e_=class Responses_Responses extends Rh{};const t_=class JSONSchema_JSONSchema extends Lh{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchemaDraft6\"}get idProp(){throw new Dh(\"id keyword from Core vocabulary has been renamed to $id.\")}set idProp(s){throw new Dh(\"id keyword from Core vocabulary has been renamed to $id.\")}get $id(){return this.get(\"$id\")}set $id(s){this.set(\"$id\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get containsProp(){return this.get(\"contains\")}set containsProp(s){this.set(\"contains\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get propertyNames(){return this.get(\"propertyNames\")}set propertyNames(s){this.set(\"propertyNames\",s)}get const(){return this.get(\"const\")}set const(s){this.set(\"const\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}};const r_=class LinkDescription_LinkDescription extends Hh{get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get schema(){throw new Dh(\"schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.\")}set schema(s){throw new Dh(\"schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.\")}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}get method(){throw new Dh(\"method keyword from Hyper-Schema vocabulary has been removed.\")}set method(s){throw new Dh(\"method keyword from Hyper-Schema vocabulary has been removed.\")}get encType(){throw new Dh(\"encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.\")}set encType(s){throw new Dh(\"encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.\")}get submissionEncType(){return this.get(\"submissionEncType\")}set submissionEncType(s){this.set(\"submissionEncType\",s)}};var n_=_curry3((function assocPath(s,o,i){if(0===s.length)return o;var a=s[0];if(s.length>1){var u=!Gh(i)&&_has(a,i)&&\"object\"==typeof i[a]?i[a]:Xo(s[1])?[]:{};o=assocPath(Array.prototype.slice.call(s,1),o,u)}return function _assoc(s,o,i){if(Xo(s)&&ca(i)){var a=[].concat(i);return a[s]=o,a}var u={};for(var _ in i)u[_]=i[_];return u[s]=o,u}(a,o,i)}));const s_=n_;var o_=_curry3((function remove(s,o,i){var a=Array.prototype.slice.call(i,0);return a.splice(s,o),a}));const i_=o_;var a_=_curry3((function assoc(s,o,i){return s_([s],o,i)}));const c_=a_;var l_=_curry2((function dissocPath(s,o){if(null==o)return o;switch(s.length){case 0:return o;case 1:return function _dissoc(s,o){if(null==o)return o;if(Xo(s)&&ca(o))return i_(s,1,o);var i={};for(var a in o)i[a]=o[a];return delete i[s],i}(s[0],o);default:var i=s[0],a=Array.prototype.slice.call(s,1);return null==o[i]?function _shallowCloneObject(s,o){if(Xo(s)&&ca(o))return[].concat(o);var i={};for(var a in o)i[a]=o[a];return i}(i,o):c_(i,dissocPath(a,o[i]),o)}}));const u_=l_;const p_=class json_schema_JSONSchemaVisitor extends Ud{constructor(s){super(s),this.element=new t_}get defaultDialectIdentifier(){return\"http://json-schema.org/draft-06/schema#\"}BooleanElement(s){const o=this.enter(s);return this.element.classes.push(\"boolean-json-schema\"),o}handleSchemaIdentifier(s,o=\"$id\"){return super.handleSchemaIdentifier(s,o)}};const h_=class json_schema_ItemsVisitor_ItemsVisitor extends Wd{BooleanElement(s){return this.element=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s),Uu}};const d_=class json_schema_ExamplesVisitor_ExamplesVisitor extends _d{ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-examples\"),o}};const f_=class link_description_LinkDescriptionVisitor extends Nf{constructor(s){super(s),this.element=new r_}},m_=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],p_),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"id\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$id\"],Rf.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contains\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"items\"],h_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"propertyNames\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"const\"],Rf.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"examples\"],d_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],f_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"hrefSchema\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"schema\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionSchema\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"method\"]),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"encType\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionEncType\"],Rf.visitors.value))(Rf),g_={JSONSchemaDraft6Element:[\"content\"],JSONReferenceElement:[\"content\"],MediaElement:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},y_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof t_||s(a)&&o(\"JSONSchemaDraft6\",a)&&i(\"object\",a))),v_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof r_||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),b_={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchemaDraft6\",t_),o.register(\"jSONReference\",Fh),o.register(\"media\",Jh),o.register(\"linkDescription\",r_),o}},S_=b_,apidom_ns_json_schema_draft_6_src_refractor_toolbox=()=>{const s=createNamespace(S_);return{predicates:{...le,isStringElement:Iu},namespace:s}},apidom_ns_json_schema_draft_6_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=m_}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_draft_6_src_refractor_toolbox,visitorOptions:{keyMap:g_,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_draft_6_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_draft_6_src_refractor_refract(o,{specPath:s,...i});t_.refract=apidom_ns_json_schema_draft_6_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),r_.refract=apidom_ns_json_schema_draft_6_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const E_=class elements_JSONSchema_JSONSchema extends t_{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchemaDraft7\"}get $comment(){return this.get(\"$comment\")}set $comment(s){this.set(\"$comment\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get if(){return this.get(\"if\")}set if(s){this.set(\"if\",s)}get then(){return this.get(\"then\")}set then(s){this.set(\"then\",s)}get else(){return this.get(\"else\")}set else(s){this.set(\"else\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get contentEncoding(){return this.get(\"contentEncoding\")}set contentEncoding(s){this.set(\"contentEncoding\",s)}get contentMediaType(){return this.get(\"contentMediaType\")}set contentMediaType(s){this.set(\"contentMediaType\",s)}get media(){throw new Dh('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as \"contentMediaType\" / \"contentEncoding\"')}set media(s){throw new Dh('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as \"contentMediaType\" / \"contentEncoding\"')}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}};const w_=class elements_LinkDescription_LinkDescription extends r_{get anchor(){return this.get(\"anchor\")}set anchor(s){this.set(\"anchor\",s)}get anchorPointer(){return this.get(\"anchorPointer\")}set anchorPointer(s){this.set(\"anchorPointer\",s)}get templatePointers(){return this.get(\"templatePointers\")}set templatePointers(s){this.set(\"templatePointers\",s)}get templateRequired(){return this.get(\"templateRequired\")}set templateRequired(s){this.set(\"templateRequired\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get mediaType(){throw new Dh(\"mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.\")}set mediaType(s){throw new Dh(\"mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.\")}get targetMediaType(){return this.get(\"targetMediaType\")}set targetMediaType(s){this.set(\"targetMediaType\",s)}get targetHints(){return this.get(\"targetHints\")}set targetHints(s){this.set(\"targetHints\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get $comment(){return this.get(\"$comment\")}set $comment(s){this.set(\"$comment\",s)}get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get headerSchema(){return this.get(\"headerSchema\")}set headerSchema(s){this.set(\"headerSchema\",s)}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}get submissionEncType(){throw new Dh(\"submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.\")}set submissionEncType(s){throw new Dh(\"submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.\")}get submissionMediaType(){return this.get(\"submissionMediaType\")}set submissionMediaType(s){this.set(\"submissionMediaType\",s)}};const x_=class visitors_json_schema_JSONSchemaVisitor extends p_{constructor(s){super(s),this.element=new E_}get defaultDialectIdentifier(){return\"http://json-schema.org/draft-07/schema#\"}};const k_=class json_schema_link_description_LinkDescriptionVisitor extends f_{constructor(s){super(s),this.element=new w_}},O_=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],x_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$comment\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"if\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"then\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"else\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"media\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentEncoding\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentMediaType\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"writeOnly\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],k_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"anchor\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"anchorPointer\"],m_.visitors.value),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"mediaType\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetMediaType\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetHints\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"description\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"$comment\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"headerSchema\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionEncType\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionMediaType\"],m_.visitors.value))(m_),C_={JSONSchemaDraft7Element:[\"content\"],JSONReferenceElement:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},A_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof E_||s(a)&&o(\"JSONSchemaDraft7\",a)&&i(\"object\",a))),j_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof w_||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),I_={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchemaDraft7\",E_),o.register(\"jSONReference\",Fh),o.register(\"linkDescription\",w_),o}},P_=I_,apidom_ns_json_schema_draft_7_src_refractor_toolbox=()=>{const s=createNamespace(P_);return{predicates:{...pe,isStringElement:Iu},namespace:s}},apidom_ns_json_schema_draft_7_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=O_}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_draft_7_src_refractor_toolbox,visitorOptions:{keyMap:C_,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_draft_7_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_draft_7_src_refractor_refract(o,{specPath:s,...i});E_.refract=apidom_ns_json_schema_draft_7_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),w_.refract=apidom_ns_json_schema_draft_7_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const T_=class src_elements_JSONSchema_JSONSchema extends E_{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchema201909\"}get $vocabulary(){return this.get(\"$vocabulary\")}set $vocabulary(s){this.set(\"$vocabulary\",s)}get $anchor(){return this.get(\"$anchor\")}set $anchor(s){this.set(\"$anchor\",s)}get $recursiveAnchor(){return this.get(\"$recursiveAnchor\")}set $recursiveAnchor(s){this.set(\"$recursiveAnchor\",s)}get $recursiveRef(){return this.get(\"$recursiveRef\")}set $recursiveRef(s){this.set(\"$recursiveRef\",s)}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get $defs(){return this.get(\"$defs\")}set $defs(s){this.set(\"$defs\",s)}get definitions(){throw new Dh(\"definitions keyword from Validation vocabulary has been renamed to $defs.\")}set definitions(s){throw new Dh(\"definitions keyword from Validation vocabulary has been renamed to $defs.\")}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get if(){return this.get(\"if\")}set if(s){this.set(\"if\",s)}get then(){return this.get(\"then\")}set then(s){this.set(\"then\",s)}get else(){return this.get(\"else\")}set else(s){this.set(\"else\",s)}get dependentSchemas(){return this.get(\"dependentSchemas\")}set dependentSchemas(s){this.set(\"dependentSchemas\",s)}get dependencies(){throw new Dh(\"dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.\")}set dependencies(s){throw new Dh(\"dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.\")}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get containsProp(){return this.get(\"contains\")}set containsProp(s){this.set(\"contains\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get propertyNames(){return this.get(\"propertyNames\")}set propertyNames(s){this.set(\"propertyNames\",s)}get unevaluatedItems(){return this.get(\"unevaluatedItems\")}set unevaluatedItems(s){this.set(\"unevaluatedItems\",s)}get unevaluatedProperties(){return this.get(\"unevaluatedProperties\")}set unevaluatedProperties(s){this.set(\"unevaluatedProperties\",s)}get maxContains(){return this.get(\"maxContains\")}set maxContains(s){this.set(\"maxContains\",s)}get minContains(){return this.get(\"minContains\")}set minContains(s){this.set(\"minContains\",s)}get dependentRequired(){return this.get(\"dependentRequired\")}set dependentRequired(s){this.set(\"dependentRequired\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}get contentSchema(){return this.get(\"contentSchema\")}set contentSchema(s){this.set(\"contentSchema\",s)}};const N_=class src_elements_LinkDescription_LinkDescription extends w_{get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get headerSchema(){return this.get(\"headerSchema\")}set headerSchema(s){this.set(\"headerSchema\",s)}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}};const M_=class refractor_visitors_json_schema_JSONSchemaVisitor extends x_{constructor(s){super(s),this.element=new T_}get defaultDialectIdentifier(){return\"https://json-schema.org/draft/2019-09/schema\"}ObjectElement(s){this.handleDialectIdentifier(s),this.handleSchemaIdentifier(s),this.parent=this.element;const o=Dd.prototype.ObjectElement.call(this,s);return Iu(this.element.$ref)&&(this.element.classes.push(\"reference-element\"),this.element.setMetaProperty(\"referenced-element\",\"schema\")),o}};const R_=class $vocabularyVisitor extends _d{ObjectElement(s){const o=super.enter(s);return this.element.classes.push(\"json-schema-$vocabulary\"),o}};const D_=class $refVisitor extends _d{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class $defsVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-$defs\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const L_=$defsVisitor;class json_schema_AllOfVisitor_AllOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-allOf\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const F_=json_schema_AllOfVisitor_AllOfVisitor;class json_schema_AnyOfVisitor_AnyOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-anyOf\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const B_=json_schema_AnyOfVisitor_AnyOfVisitor;class json_schema_OneOfVisitor_OneOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-oneOf\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const $_=json_schema_OneOfVisitor_OneOfVisitor;class DependentSchemasVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-dependentSchemas\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const q_=DependentSchemasVisitor;class visitors_json_schema_ItemsVisitor_ItemsVisitor extends(Mixin(Rd,Ld,_d)){ObjectElement(s){return this.element=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s),Uu}ArrayElement(s){return this.element=new Su.wE,this.element.classes.push(\"json-schema-items\"),s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}BooleanElement(s){return this.element=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s),Uu}}const V_=visitors_json_schema_ItemsVisitor_ItemsVisitor;class json_schema_PropertiesVisitor_PropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-properties\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const U_=json_schema_PropertiesVisitor_PropertiesVisitor;class PatternPropertiesVisitor_PatternPropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-patternProperties\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const z_=PatternPropertiesVisitor_PatternPropertiesVisitor;const W_=class DependentRequiredVisitor extends _d{ObjectElement(s){const o=super.enter(s);return this.element.classes.push(\"json-schema-dependentRequired\"),o}};const J_=class visitors_json_schema_link_description_LinkDescriptionVisitor extends k_{constructor(s){super(s),this.element=new N_}},H_=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$vocabulary\"],R_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$anchor\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveAnchor\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveRef\"],O_.visitors.value),u_([\"visitors\",\"document\",\"objects\",\"JSONReference\",\"$visitor\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$ref\"],D_),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"definitions\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$defs\"],L_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"allOf\"],F_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"anyOf\"],B_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"oneOf\"],$_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"not\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"if\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"then\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"else\"],M_),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"dependencies\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"dependentSchemas\"],q_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"items\"],V_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contains\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"properties\"],U_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"patternProperties\"],z_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalProperties\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalItems\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"propertyNames\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedItems\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedProperties\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"maxContains\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"minContains\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"dependentRequired\"],W_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"deprecated\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],J_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"hrefSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"headerSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionSchema\"],M_))(O_),K_={JSONSchema201909Element:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},G_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof T_||s(a)&&o(\"JSONSchema201909\",a)&&i(\"object\",a))),Y_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof N_||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),X_={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchema201909\",T_),o.register(\"linkDescription\",N_),o}},Q_=X_,apidom_ns_json_schema_2019_09_src_refractor_toolbox=()=>{const s=createNamespace(Q_);return{predicates:{...de,isStringElement:Iu},namespace:s}},apidom_ns_json_schema_2019_09_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=H_}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_2019_09_src_refractor_toolbox,visitorOptions:{keyMap:K_,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_2019_09_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_2019_09_src_refractor_refract(o,{specPath:s,...i});T_.refract=apidom_ns_json_schema_2019_09_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),N_.refract=apidom_ns_json_schema_2019_09_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const Z_=class apidom_ns_json_schema_2020_12_src_elements_JSONSchema_JSONSchema extends T_{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchema202012\"}get $dynamicAnchor(){return this.get(\"$dynamicAnchor\")}set $dynamicAnchor(s){this.set(\"$dynamicAnchor\",s)}get $recursiveAnchor(){throw new Dh(\"$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.\")}set $recursiveAnchor(s){throw new Dh(\"$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.\")}get $dynamicRef(){return this.get(\"$dynamicRef\")}set $dynamicRef(s){this.set(\"$dynamicRef\",s)}get $recursiveRef(){throw new Dh(\"$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.\")}set $recursiveRef(s){throw new Dh(\"$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.\")}get prefixItems(){return this.get(\"prefixItems\")}set prefixItems(s){this.set(\"prefixItems\",s)}};const eS=class apidom_ns_json_schema_2020_12_src_elements_LinkDescription_LinkDescription extends N_{get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get headerSchema(){return this.get(\"headerSchema\")}set headerSchema(s){this.set(\"headerSchema\",s)}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}};const tS=class src_refractor_visitors_json_schema_JSONSchemaVisitor extends M_{constructor(s){super(s),this.element=new Z_}get defaultDialectIdentifier(){return\"https://json-schema.org/draft/2020-12/schema\"}};class PrefixItemsVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-prefixItems\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const rS=PrefixItemsVisitor;const nS=class refractor_visitors_json_schema_link_description_LinkDescriptionVisitor extends J_{constructor(s){super(s),this.element=new eS}},sS=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],tS),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveAnchor\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$dynamicAnchor\"],H_.visitors.value),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveRef\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$dynamicRef\"],H_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"not\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"if\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"then\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"else\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"prefixItems\"],rS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"items\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contains\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalProperties\"],tS),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalItems\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"propertyNames\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedItems\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedProperties\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],nS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"hrefSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"headerSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionSchema\"],tS))(H_),oS={JSONSchema202012Element:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},iS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Z_||s(a)&&o(\"JSONSchema202012\",a)&&i(\"object\",a))),aS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof eS||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),cS={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchema202012\",Z_),o.register(\"linkDescription\",eS),o}},lS=cS,apidom_ns_json_schema_2020_12_src_refractor_toolbox=()=>{const s=createNamespace(lS);return{predicates:{...fe,isStringElement:Iu},namespace:s}},apidom_ns_json_schema_2020_12_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=sS}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_2020_12_src_refractor_toolbox,visitorOptions:{keyMap:oS,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_2020_12_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_2020_12_src_refractor_refract(o,{specPath:s,...i});Z_.refract=apidom_ns_json_schema_2020_12_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),eS.refract=apidom_ns_json_schema_2020_12_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const uS=class elements_Schema_Schema extends Z_{constructor(s,o,i){super(s,o,i),this.element=\"schema\"}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}};const pS=class SecurityRequirement_SecurityRequirement extends Jf{};const hS=class SecurityScheme_SecurityScheme extends Hf{};const dS=class Server_Server extends Gf{};const fS=class ServerVariable_ServerVariable extends Xf{};const mS=class Tag_Tag extends Qf{};const gS=class Xml_Xml extends em{};class OpenApi3_1Visitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Ib,this.specPath=fc([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(s){return this.openApiGenericElement=s,um.prototype.ObjectElement.call(this,s)}}const yS=OpenApi3_1Visitor,vS=Wv.visitors.document.objects.Info.$visitor;const bS=class info_InfoVisitor extends vS{constructor(s){super(s),this.element=new pb}},_S=Wv.visitors.document.objects.Contact.$visitor;const SS=class contact_ContactVisitor extends _S{constructor(s){super(s),this.element=new Xv}},ES=Wv.visitors.document.objects.License.$visitor;const wS=class license_LicenseVisitor extends ES{constructor(s){super(s),this.element=new yb}},xS=Wv.visitors.document.objects.Link.$visitor;const kS=class link_LinkVisitor extends xS{constructor(s){super(s),this.element=new _b}};class JsonSchemaDialectVisitor extends(Mixin(nm,rm)){StringElement(s){const o=new mb(serializers_value(s));return this.copyMetaAndAttributes(s,o),this.element=o,Uu}}const OS=JsonSchemaDialectVisitor,CS=Wv.visitors.document.objects.Server.$visitor;const AS=class server_ServerVisitor extends CS{constructor(s){super(s),this.element=new dS}},jS=Wv.visitors.document.objects.ServerVariable.$visitor;const IS=class server_variable_ServerVariableVisitor extends jS{constructor(s){super(s),this.element=new fS}},PS=Wv.visitors.document.objects.MediaType.$visitor;const TS=class media_type_MediaTypeVisitor extends PS{constructor(s){super(s),this.element=new Sb}},NS=Wv.visitors.document.objects.SecurityRequirement.$visitor;const MS=class security_requirement_SecurityRequirementVisitor extends NS{constructor(s){super(s),this.element=new pS}},RS=Wv.visitors.document.objects.Components.$visitor;const DS=class components_ComponentsVisitor extends RS{constructor(s){super(s),this.element=new Yv}},LS=Wv.visitors.document.objects.Tag.$visitor;const FS=class tag_TagVisitor extends LS{constructor(s){super(s),this.element=new mS}},BS=Wv.visitors.document.objects.Reference.$visitor;const $S=class reference_ReferenceVisitor extends BS{constructor(s){super(s),this.element=new qb}},qS=Wv.visitors.document.objects.Parameter.$visitor;const VS=class parameter_ParameterVisitor extends qS{constructor(s){super(s),this.element=new Mb}},US=Wv.visitors.document.objects.Header.$visitor;const zS=class header_HeaderVisitor extends US{constructor(s){super(s),this.element=new nb}},WS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Gv||s(a)&&o(\"callback\",a)&&i(\"object\",a))),JS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Yv||s(a)&&o(\"components\",a)&&i(\"object\",a))),HS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Xv||s(a)&&o(\"contact\",a)&&i(\"object\",a))),KS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof eb||s(a)&&o(\"example\",a)&&i(\"object\",a))),GS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof tb||s(a)&&o(\"externalDocumentation\",a)&&i(\"object\",a))),YS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof nb||s(a)&&o(\"header\",a)&&i(\"object\",a))),XS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof pb||s(a)&&o(\"info\",a)&&i(\"object\",a))),QS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof mb||s(a)&&o(\"jsonSchemaDialect\",a)&&i(\"string\",a))),ZS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof yb||s(a)&&o(\"license\",a)&&i(\"object\",a))),eE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof _b||s(a)&&o(\"link\",a)&&i(\"object\",a))),tE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ab||s(a)&&o(\"openapi\",a)&&i(\"string\",a))),rE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i,hasClass:a})=>u=>u instanceof Ib||s(u)&&o(\"openApi3_1\",u)&&i(\"object\",u)&&a(\"api\",u))),nE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Pb||s(a)&&o(\"operation\",a)&&i(\"object\",a))),sE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Mb||s(a)&&o(\"parameter\",a)&&i(\"object\",a))),oE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Rb||s(a)&&o(\"pathItem\",a)&&i(\"object\",a))),isPathItemElementExternal=s=>{if(!oE(s))return!1;if(!Iu(s.$ref))return!1;const o=serializers_value(s.$ref);return\"string\"==typeof o&&o.length>0&&!o.startsWith(\"#\")},iE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Lb||s(a)&&o(\"paths\",a)&&i(\"object\",a))),aE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof qb||s(a)&&o(\"reference\",a)&&i(\"object\",a))),isReferenceElementExternal=s=>{if(!aE(s))return!1;if(!Iu(s.$ref))return!1;const o=serializers_value(s.$ref);return\"string\"==typeof o&&o.length>0&&!o.startsWith(\"#\")},cE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof zb||s(a)&&o(\"requestBody\",a)&&i(\"object\",a))),lE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Qb||s(a)&&o(\"response\",a)&&i(\"object\",a))),uE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof e_||s(a)&&o(\"responses\",a)&&i(\"object\",a))),pE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof uS||s(a)&&o(\"schema\",a)&&i(\"object\",a))),predicates_isBooleanJsonSchemaElement=s=>Nu(s)&&s.classes.includes(\"boolean-json-schema\"),hE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof pS||s(a)&&o(\"securityRequirement\",a)&&i(\"object\",a))),dE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof hS||s(a)&&o(\"securityScheme\",a)&&i(\"object\",a))),fE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof dS||s(a)&&o(\"server\",a)&&i(\"object\",a))),mE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof fS||s(a)&&o(\"serverVariable\",a)&&i(\"object\",a))),gE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Sb||s(a)&&o(\"mediaType\",a)&&i(\"object\",a)));class open_api_3_1_schema_SchemaVisitor extends(Mixin(um,Ld,rm)){constructor(s){super(s),this.element=new uS,this.specPath=fc([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=mb.default,this.passingOptionsNames.push(\"parent\")}ObjectElement(s){this.handleDialectIdentifier(s),this.handleSchemaIdentifier(s),this.parent=this.element;const o=um.prototype.ObjectElement.call(this,s);return Iu(this.element.$ref)&&(this.element.classes.push(\"reference-element\"),this.element.setMetaProperty(\"referenced-element\",\"schema\")),o}BooleanElement(s){return tS.prototype.BooleanElement.call(this,s)}get defaultDialectIdentifier(){let s;return s=void 0!==this.openApiSemanticElement&&QS(this.openApiSemanticElement.jsonSchemaDialect)?serializers_value(this.openApiSemanticElement.jsonSchemaDialect):void 0!==this.openApiGenericElement&&Iu(this.openApiGenericElement.get(\"jsonSchemaDialect\"))?serializers_value(this.openApiGenericElement.get(\"jsonSchemaDialect\")):serializers_value(this.jsonSchemaDefaultDialect),s}handleDialectIdentifier(s){return tS.prototype.handleDialectIdentifier.call(this,s)}handleSchemaIdentifier(s){return tS.prototype.handleSchemaIdentifier.call(this,s)}}const yE=open_api_3_1_schema_SchemaVisitor;const vE=class $defsVisitor_$defsVisitor extends L_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const bE=class schema_AllOfVisitor_AllOfVisitor extends F_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const _E=class schema_AnyOfVisitor_AnyOfVisitor extends B_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const SE=class schema_OneOfVisitor_OneOfVisitor extends $_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const EE=class DependentSchemasVisitor_DependentSchemasVisitor extends q_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const wE=class PrefixItemsVisitor_PrefixItemsVisitor extends rS{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const xE=class schema_PropertiesVisitor_PropertiesVisitor extends U_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const kE=class schema_PatternPropertiesVisitor_PatternPropertiesVisitor extends z_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}},OE=Wv.visitors.document.objects.Discriminator.$visitor;const CE=class distriminator_DiscriminatorVisitor extends OE{constructor(s){super(s),this.element=new Qv,this.canSupportSpecificationExtensions=!0}},AE=Wv.visitors.document.objects.XML.$visitor;const jE=class xml_XmlVisitor extends AE{constructor(s){super(s),this.element=new gS}};class SchemasVisitor_SchemasVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Ay,this.specPath=fc([\"document\",\"objects\",\"Schema\"])}}const IE=SchemasVisitor_SchemasVisitor;class ComponentsPathItems extends Su.Sh{static primaryClass=\"components-path-items\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsPathItems.primaryClass)}}const PE=ComponentsPathItems;class PathItemsVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new PE,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(aE).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),o}}const TE=PathItemsVisitor,NE=Wv.visitors.document.objects.Example.$visitor;const ME=class example_ExampleVisitor extends NE{constructor(s){super(s),this.element=new eb}},RE=Wv.visitors.document.objects.ExternalDocumentation.$visitor;const DE=class external_documentation_ExternalDocumentationVisitor extends RE{constructor(s){super(s),this.element=new tb}},LE=Wv.visitors.document.objects.Encoding.$visitor;const FE=class open_api_3_1_encoding_EncodingVisitor extends LE{constructor(s){super(s),this.element=new Zv}},BE=Wv.visitors.document.objects.Paths.$visitor;const $E=class paths_PathsVisitor extends BE{constructor(s){super(s),this.element=new Lb}},qE=Wv.visitors.document.objects.RequestBody.$visitor;const VE=class request_body_RequestBodyVisitor extends qE{constructor(s){super(s),this.element=new zb}},UE=Wv.visitors.document.objects.Callback.$visitor;const zE=class callback_CallbackVisitor extends UE{constructor(s){super(s),this.element=new Gv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const o=UE.prototype.ObjectElement.call(this,s);return this.element.filter(aE).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),o}},WE=Wv.visitors.document.objects.Response.$visitor;const JE=class response_ResponseVisitor extends WE{constructor(s){super(s),this.element=new Qb}},HE=Wv.visitors.document.objects.Responses.$visitor;const KE=class open_api_3_1_responses_ResponsesVisitor extends HE{constructor(s){super(s),this.element=new e_}},GE=Wv.visitors.document.objects.Operation.$visitor;const YE=class operation_OperationVisitor extends GE{constructor(s){super(s),this.element=new Pb}},XE=Wv.visitors.document.objects.PathItem.$visitor;const QE=class path_item_PathItemVisitor extends XE{constructor(s){super(s),this.element=new Rb}},ZE=Wv.visitors.document.objects.SecurityScheme.$visitor;const ew=class security_scheme_SecuritySchemeVisitor extends ZE{constructor(s){super(s),this.element=new hS}},tw=Wv.visitors.document.objects.OAuthFlows.$visitor;const rw=class oauth_flows_OAuthFlowsVisitor extends tw{constructor(s){super(s),this.element=new Ob}},nw=Wv.visitors.document.objects.OAuthFlow.$visitor;const sw=class oauth_flow_OAuthFlowVisitor extends nw{constructor(s){super(s),this.element=new wb}};class Webhooks extends Su.Sh{static primaryClass=\"webhooks\";constructor(s,o,i){super(s,o,i),this.classes.push(Webhooks.primaryClass)}}const ow=Webhooks;class WebhooksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new ow,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(aE).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),this.element.filter(oE).forEach(((s,o)=>{s.setMetaProperty(\"webhook-name\",serializers_value(o))})),o}}const iw=WebhooksVisitor,{JSONSchema:aw,LinkDescription:cw}=sS.visitors.document.objects,lw={visitors:{value:Wv.visitors.value,document:{objects:{OpenApi:{$visitor:yS,fixedFields:{openapi:Wv.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:\"#/visitors/document/objects/Info\"},jsonSchemaDialect:OS,servers:Wv.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:\"#/visitors/document/objects/Paths\"},webhooks:iw,components:{$ref:\"#/visitors/document/objects/Components\"},security:Wv.visitors.document.objects.OpenApi.fixedFields.security,tags:Wv.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:bS,fixedFields:{title:Wv.visitors.document.objects.Info.fixedFields.title,description:Wv.visitors.document.objects.Info.fixedFields.description,summary:{$ref:\"#/visitors/value\"},termsOfService:Wv.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:Wv.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:SS,fixedFields:{name:Wv.visitors.document.objects.Contact.fixedFields.name,url:Wv.visitors.document.objects.Contact.fixedFields.url,email:Wv.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:wS,fixedFields:{name:Wv.visitors.document.objects.License.fixedFields.name,identifier:{$ref:\"#/visitors/value\"},url:Wv.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:AS,fixedFields:{url:Wv.visitors.document.objects.Server.fixedFields.url,description:Wv.visitors.document.objects.Server.fixedFields.description,variables:Wv.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:IS,fixedFields:{enum:Wv.visitors.document.objects.ServerVariable.fixedFields.enum,default:Wv.visitors.document.objects.ServerVariable.fixedFields.default,description:Wv.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:DS,fixedFields:{schemas:IE,responses:Wv.visitors.document.objects.Components.fixedFields.responses,parameters:Wv.visitors.document.objects.Components.fixedFields.parameters,examples:Wv.visitors.document.objects.Components.fixedFields.examples,requestBodies:Wv.visitors.document.objects.Components.fixedFields.requestBodies,headers:Wv.visitors.document.objects.Components.fixedFields.headers,securitySchemes:Wv.visitors.document.objects.Components.fixedFields.securitySchemes,links:Wv.visitors.document.objects.Components.fixedFields.links,callbacks:Wv.visitors.document.objects.Components.fixedFields.callbacks,pathItems:TE}},Paths:{$visitor:$E},PathItem:{$visitor:QE,fixedFields:{$ref:Wv.visitors.document.objects.PathItem.fixedFields.$ref,summary:Wv.visitors.document.objects.PathItem.fixedFields.summary,description:Wv.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:Wv.visitors.document.objects.PathItem.fixedFields.servers,parameters:Wv.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:YE,fixedFields:{tags:Wv.visitors.document.objects.Operation.fixedFields.tags,summary:Wv.visitors.document.objects.Operation.fixedFields.summary,description:Wv.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:Wv.visitors.document.objects.Operation.fixedFields.operationId,parameters:Wv.visitors.document.objects.Operation.fixedFields.parameters,requestBody:Wv.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:Wv.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:Wv.visitors.document.objects.Operation.fixedFields.deprecated,security:Wv.visitors.document.objects.Operation.fixedFields.security,servers:Wv.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:DE,fixedFields:{description:Wv.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:Wv.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:VS,fixedFields:{name:Wv.visitors.document.objects.Parameter.fixedFields.name,in:Wv.visitors.document.objects.Parameter.fixedFields.in,description:Wv.visitors.document.objects.Parameter.fixedFields.description,required:Wv.visitors.document.objects.Parameter.fixedFields.required,deprecated:Wv.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:Wv.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:Wv.visitors.document.objects.Parameter.fixedFields.style,explode:Wv.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:Wv.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:Wv.visitors.document.objects.Parameter.fixedFields.example,examples:Wv.visitors.document.objects.Parameter.fixedFields.examples,content:Wv.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:VE,fixedFields:{description:Wv.visitors.document.objects.RequestBody.fixedFields.description,content:Wv.visitors.document.objects.RequestBody.fixedFields.content,required:Wv.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:TS,fixedFields:{schema:{$ref:\"#/visitors/document/objects/Schema\"},example:Wv.visitors.document.objects.MediaType.fixedFields.example,examples:Wv.visitors.document.objects.MediaType.fixedFields.examples,encoding:Wv.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:FE,fixedFields:{contentType:Wv.visitors.document.objects.Encoding.fixedFields.contentType,headers:Wv.visitors.document.objects.Encoding.fixedFields.headers,style:Wv.visitors.document.objects.Encoding.fixedFields.style,explode:Wv.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:Wv.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:KE,fixedFields:{default:Wv.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:JE,fixedFields:{description:Wv.visitors.document.objects.Response.fixedFields.description,headers:Wv.visitors.document.objects.Response.fixedFields.headers,content:Wv.visitors.document.objects.Response.fixedFields.content,links:Wv.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:zE},Example:{$visitor:ME,fixedFields:{summary:Wv.visitors.document.objects.Example.fixedFields.summary,description:Wv.visitors.document.objects.Example.fixedFields.description,value:Wv.visitors.document.objects.Example.fixedFields.value,externalValue:Wv.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:kS,fixedFields:{operationRef:Wv.visitors.document.objects.Link.fixedFields.operationRef,operationId:Wv.visitors.document.objects.Link.fixedFields.operationId,parameters:Wv.visitors.document.objects.Link.fixedFields.parameters,requestBody:Wv.visitors.document.objects.Link.fixedFields.requestBody,description:Wv.visitors.document.objects.Link.fixedFields.description,server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:zS,fixedFields:{description:Wv.visitors.document.objects.Header.fixedFields.description,required:Wv.visitors.document.objects.Header.fixedFields.required,deprecated:Wv.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:Wv.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:Wv.visitors.document.objects.Header.fixedFields.style,explode:Wv.visitors.document.objects.Header.fixedFields.explode,allowReserved:Wv.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:Wv.visitors.document.objects.Header.fixedFields.example,examples:Wv.visitors.document.objects.Header.fixedFields.examples,content:Wv.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:FS,fixedFields:{name:Wv.visitors.document.objects.Tag.fixedFields.name,description:Wv.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:$S,fixedFields:{$ref:Wv.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},JSONSchema:{$ref:\"#/visitors/document/objects/Schema\"},LinkDescription:{...cw},Schema:{$visitor:yE,fixedFields:{...aw.fixedFields,$defs:vE,allOf:bE,anyOf:_E,oneOf:SE,not:{$ref:\"#/visitors/document/objects/Schema\"},if:{$ref:\"#/visitors/document/objects/Schema\"},then:{$ref:\"#/visitors/document/objects/Schema\"},else:{$ref:\"#/visitors/document/objects/Schema\"},dependentSchemas:EE,prefixItems:wE,items:{$ref:\"#/visitors/document/objects/Schema\"},contains:{$ref:\"#/visitors/document/objects/Schema\"},properties:xE,patternProperties:kE,additionalProperties:{$ref:\"#/visitors/document/objects/Schema\"},propertyNames:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedItems:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedProperties:{$ref:\"#/visitors/document/objects/Schema\"},contentSchema:{$ref:\"#/visitors/document/objects/Schema\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:CE,fixedFields:{propertyName:Wv.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:Wv.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:jE,fixedFields:{name:Wv.visitors.document.objects.XML.fixedFields.name,namespace:Wv.visitors.document.objects.XML.fixedFields.namespace,prefix:Wv.visitors.document.objects.XML.fixedFields.prefix,attribute:Wv.visitors.document.objects.XML.fixedFields.attribute,wrapped:Wv.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:ew,fixedFields:{type:Wv.visitors.document.objects.SecurityScheme.fixedFields.type,description:Wv.visitors.document.objects.SecurityScheme.fixedFields.description,name:Wv.visitors.document.objects.SecurityScheme.fixedFields.name,in:Wv.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:Wv.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:Wv.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:Wv.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:rw,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:sw,fixedFields:{authorizationUrl:Wv.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:Wv.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:Wv.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:Wv.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:MS}},extension:{$visitor:Wv.visitors.document.extension.$visitor}}}},apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType=s=>{if(ju(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},uw={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_1Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...Ku},pw={namespace:s=>{const{base:o}=s;return o.register(\"callback\",Gv),o.register(\"components\",Yv),o.register(\"contact\",Xv),o.register(\"discriminator\",Qv),o.register(\"encoding\",Zv),o.register(\"example\",eb),o.register(\"externalDocumentation\",tb),o.register(\"header\",nb),o.register(\"info\",pb),o.register(\"jsonSchemaDialect\",mb),o.register(\"license\",yb),o.register(\"link\",_b),o.register(\"mediaType\",Sb),o.register(\"oAuthFlow\",wb),o.register(\"oAuthFlows\",Ob),o.register(\"openapi\",Ab),o.register(\"openApi3_1\",Ib),o.register(\"operation\",Pb),o.register(\"parameter\",Mb),o.register(\"pathItem\",Rb),o.register(\"paths\",Lb),o.register(\"reference\",qb),o.register(\"requestBody\",zb),o.register(\"response\",Qb),o.register(\"responses\",e_),o.register(\"schema\",uS),o.register(\"securityRequirement\",pS),o.register(\"securityScheme\",hS),o.register(\"server\",dS),o.register(\"serverVariable\",fS),o.register(\"tag\",mS),o.register(\"xml\",gS),o}},hw=pw,ancestorLineageToJSONPointer=s=>{const o=s.reduce(((o,i,a)=>{if(Du(i)){const s=String(serializers_value(i.key));o.push(s)}else if(Ru(s[a-2])){const u=String(s[a-2].content.indexOf(i));o.push(u)}return o}),[]);return es_compile(o)},apidom_ns_openapi_3_1_src_refractor_toolbox=()=>{const s=createNamespace(hw);return{predicates:{...ye,isElement:ju,isStringElement:Iu,isArrayElement:Ru,isObjectElement:Mu,isMemberElement:Du,isServersElement:lg,includesClasses,hasElementSourceMap},ancestorLineageToJSONPointer,namespace:s}},apidom_ns_openapi_3_1_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:i=[]}={})=>{const a=(0,Su.e)(s),u=dereference(lw),_=new(tp(o,u))({specObj:u});return visitor_visit(a,_),dispatchPluginsSync(_.element,i,{toolboxCreator:apidom_ns_openapi_3_1_src_refractor_toolbox,visitorOptions:{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}})},apidom_ns_openapi_3_1_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_openapi_3_1_src_refractor_refract(o,{specPath:s,...i});Gv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),Yv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Xv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),eb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),Qv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),Zv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),tb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),nb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),pb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),mb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"jsonSchemaDialect\"]),yb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),_b.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),Sb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),wb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),Ob.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),Ab.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),Ib.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),Pb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),Mb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),Rb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),Lb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),qb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),zb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),Qb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),e_.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),uS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),pS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),hS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),dS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),fS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),mS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),gS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const dw=class NotImplementedError extends Dh{};const fw=class MediaTypes extends Array{unknownMediaType=\"application/octet-stream\";filterByFormat(){throw new dw(\"filterByFormat method in MediaTypes class is not yet implemented.\")}findBy(){throw new dw(\"findBy method in MediaTypes class is not yet implemented.\")}latest(){throw new dw(\"latest method in MediaTypes class is not yet implemented.\")}};class OpenAPIMediaTypes extends fw{filterByFormat(s=\"generic\"){const o=\"generic\"===s?\"openapi;version\":s;return this.filter((s=>s.includes(o)))}findBy(s=\"3.1.0\",o=\"generic\"){const i=\"generic\"===o?`vnd.oai.openapi;version=${s}`:`vnd.oai.openapi+${o};version=${s}`;return this.find((s=>s.includes(i)))||this.unknownMediaType}latest(s=\"generic\"){return Ba(this.filterByFormat(s))}}const mw=new OpenAPIMediaTypes(\"application/vnd.oai.openapi;version=3.1.0\",\"application/vnd.oai.openapi+json;version=3.1.0\",\"application/vnd.oai.openapi+yaml;version=3.1.0\");const gw=class src_Reference_Reference{uri;depth;value;refSet;errors;constructor({uri:s,depth:o=0,refSet:i,value:a}){this.uri=s,this.value=a,this.depth=o,this.refSet=i,this.errors=[]}};const yw=class ReferenceSet{rootRef;refs;circular;constructor({refs:s=[],circular:o=!1}={}){this.refs=[],this.circular=o,s.forEach(this.add.bind(this))}get size(){return this.refs.length}add(s){return this.has(s)||(this.refs.push(s),this.rootRef=void 0===this.rootRef?s:this.rootRef,s.refSet=this),this}merge(s){for(const o of s.values())this.add(o);return this}has(s){const o=Jc(s)?s:s.uri;return _c(this.find((s=>s.uri===o)))}find(s){return this.refs.find(s)}*values(){yield*this.refs}clean(){this.refs.forEach((s=>{s.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}};function _identity(s){return s}const vw=_curry1(_identity),bw={parse:{mediaType:\"text/plain\",parsers:[],parserOpts:{}},resolve:{baseURI:\"\",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:\"ignore\",circularReplacer:vw,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}};const _w=_curry2((function lens(s,o){return function(i){return function(a){return cc((function(s){return o(s,a)}),i(s(a)))}}}));var Identity=function(s){return{value:s,map:function(o){return Identity(o(s))}}},Sw=_curry3((function over(s,o,i){return s((function(s){return Identity(o(s))}))(i).value}));const Ew=Sw;const ww=na(\"\"),xw=_w(tp([\"resolve\",\"baseURI\"]),s_([\"resolve\",\"baseURI\"])),baseURIDefault=s=>ww(s)?url_cwd():s,util_merge=(s,o)=>{const i=ep(s,o);return Ew(xw,baseURIDefault,i)};const kw=class File_File{uri;mediaType;data;parseResult;constructor({uri:s,mediaType:o=\"text/plain\",data:i,parseResult:a}){this.uri=s,this.mediaType=o,this.data=i,this.parseResult=a}get extension(){return Jc(this.uri)?(s=>{const o=s.lastIndexOf(\".\");return o>=0?s.substring(o).toLowerCase():\"\"})(this.uri):\"\"}toString(){if(\"string\"==typeof this.data)return this.data;if(this.data instanceof ArrayBuffer||[\"ArrayBuffer\"].includes(ra(this.data))||ArrayBuffer.isView(this.data)){return new TextDecoder(\"utf-8\").decode(this.data)}return String(this.data)}};const Ow=class PluginError extends Ko{plugin;constructor(s,o){super(s,{cause:o.cause}),this.plugin=o.plugin}},plugins_filter=async(s,o,i)=>{const a=await Promise.all(i.map(hp([s],o)));return i.filter(((s,o)=>a[o]))},run=async(s,o,i)=>{let a;for(const u of i)try{const i=await u[s].call(u,...o);return{plugin:u,result:i}}catch(s){a=new Ow(\"Error while running plugin\",{cause:s,plugin:u})}return Promise.reject(a)};const Cw=class DereferenceError extends Ko{};const Aw=class UnmatchedDereferenceStrategyError extends Cw{},dereferenceApiDOM=async(s,o)=>{let i=s,a=!1;if(!qu(s)){const o=cloneShallow(s);o.classes.push(\"result\"),i=new Cu([o]),a=!0}const u=new kw({uri:o.resolve.baseURI,parseResult:i,mediaType:o.parse.mediaType}),_=await plugins_filter(\"canDereference\",[u,o],o.dereference.strategies);if(cp(_))throw new Aw(u.uri);try{const{result:s}=await run(\"dereference\",[u,o],_);return a?s.get(0):s}catch(s){throw new Cw(`Error while dereferencing file \"${u.uri}\"`,{cause:s})}};const jw=class ParseError extends Ko{};const Iw=class ParserError extends jw{};const Pw=class Parser_Parser{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:s,allowEmpty:o=!0,sourceMap:i=!1,fileExtensions:a=[],mediaTypes:u=[]}){this.name=s,this.allowEmpty=o,this.sourceMap=i,this.fileExtensions=a,this.mediaTypes=u}};const Tw=class BinaryParser extends Pw{constructor(s){super({...null!=s?s:{},name:\"binary\"})}canParse(s){return 0===this.fileExtensions.length||this.fileExtensions.includes(s.extension)}parse(s){try{const o=unescape(encodeURIComponent(s.toString())),i=btoa(o),a=new Cu;if(0!==i.length){const s=new Su.Om(i);s.classes.push(\"result\"),a.push(s)}return a}catch(o){throw new Iw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Nw=class ResolveStrategy{name;constructor({name:s}){this.name=s}};const Mw=class OpenAPI3_1ResolveStrategy extends Nw{constructor(s){super({...null!=s?s:{},name:\"openapi-3-1\"})}canResolve(s,o){const i=o.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));return void 0!==i&&i.canDereference(s,o)}async resolve(s,o){const i=o.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));if(void 0===i)throw new Aw('\"openapi-3-1\" dereference strategy is not available.');const a=new yw,u=util_merge(o,{resolve:{internal:!1},dereference:{refSet:a}});return await i.dereference(s,u),a}};const Rw=class Resolver{name;constructor({name:s}){this.name=s}};const Dw=class HTTPResolver extends Rw{timeout;redirects;withCredentials;constructor(s){const{name:o=\"http-resolver\",timeout:i=5e3,redirects:a=5,withCredentials:u=!1}=null!=s?s:{};super({name:o}),this.timeout=i,this.redirects=a,this.withCredentials=u}canRead(s){return isHttpUrl(s.uri)}};const Lw=class ResolveError extends Ko{};const Fw=class ResolverError extends Lw{},{AbortController:Bw,AbortSignal:$w}=globalThis;void 0===globalThis.AbortController&&(globalThis.AbortController=Bw),void 0===globalThis.AbortSignal&&(globalThis.AbortSignal=$w);const qw=class HTTPResolverSwaggerClient extends Dw{swaggerHTTPClient=http_http;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:s=http_http,swaggerHTTPClientConfig:o={},...i}={}){super({...i,name:\"http-swagger-client\"}),this.swaggerHTTPClient=s,this.swaggerHTTPClientConfig=o}getHttpClient(){return this.swaggerHTTPClient}async read(s){const o=this.getHttpClient(),i=new AbortController,{signal:a}=i,u=setTimeout((()=>{i.abort()}),this.timeout),_=this.getHttpClient().withCredentials||this.withCredentials?\"include\":\"same-origin\",w=0===this.redirects?\"error\":\"follow\",x=this.redirects>0?this.redirects:void 0;try{return(await o({url:s.uri,signal:a,userFetch:async(s,o)=>{let i=await fetch(s,o);try{i.headers.delete(\"Content-Type\")}catch{i=new Response(i.body,{...i,headers:new Headers(i.headers)}),i.headers.delete(\"Content-Type\")}return i},credentials:_,redirect:w,follow:x,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(o){throw new Fw(`Error downloading \"${s.uri}\"`,{cause:o})}finally{clearTimeout(u)}}},transformers_from=(s,o=fp)=>{if(Jc(s))try{return o.fromRefract(JSON.parse(s))}catch{}return fu(s)&&id(\"element\",s)?o.fromRefract(s):o.toElement(s)};const Vw=class JSONParser extends Pw{constructor(s={}){super({name:\"json-swagger-client\",mediaTypes:[\"application/json\"],...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{return JSON.parse(s.toString()),!0}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Iw(\"json-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();if(this.allowEmpty&&\"\"===i.trim())return o;try{const s=transformers_from(JSON.parse(i));return s.classes.push(\"result\"),o.push(s),o}catch(o){throw new Iw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Uw=class YAMLParser extends Pw{constructor(s={}){super({name:\"yaml-1-2-swagger-client\",mediaTypes:[\"text/yaml\",\"application/yaml\"],...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{return fn.load(s.toString(),{schema:rn}),!0}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Iw(\"yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();try{const s=fn.load(i,{schema:rn});if(this.allowEmpty&&void 0===s)return o;const a=transformers_from(s);return a.classes.push(\"result\"),o.push(a),o}catch(o){throw new Iw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const zw=class OpenAPIJSON3_1Parser extends Pw{detectionRegExp=/\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\"/;constructor(s={}){super({name:\"openapi-json-3-1-swagger-client\",mediaTypes:new OpenAPIMediaTypes(...mw.filterByFormat(\"generic\"),...mw.filterByFormat(\"json\")),...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{const o=s.toString();return JSON.parse(o),this.detectionRegExp.test(o)}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Iw(\"openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();if(this.allowEmpty&&\"\"===i.trim())return o;try{const s=JSON.parse(i),a=Ib.refract(s,this.refractorOpts);return a.classes.push(\"result\"),o.push(a),o}catch(o){throw new Iw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Ww=class OpenAPIYAML31Parser extends Pw{detectionRegExp=/(?<YAML>^([\"']?)openapi\\2\\s*:\\s*([\"']?)(?<version_yaml>3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?<JSON>\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\")/m;constructor(s={}){super({name:\"openapi-yaml-3-1-swagger-client\",mediaTypes:new OpenAPIMediaTypes(...mw.filterByFormat(\"generic\"),...mw.filterByFormat(\"yaml\")),...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{const o=s.toString();return fn.load(o),this.detectionRegExp.test(o)}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Iw(\"openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();try{const s=fn.load(i,{schema:rn});if(this.allowEmpty&&void 0===s)return o;const a=Ib.refract(s,this.refractorOpts);return a.classes.push(\"result\"),o.push(a),o}catch(o){throw new Iw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Jw=_curry3((function propEq(s,o,i){return na(s,Da(o,i))}));const Hw=class DereferenceStrategy{name;constructor({name:s}){this.name=s}};const Kw=_curry2((function none(s,o){return xu(_complement(s),o)}));var Gw=__webpack_require__(8068);const Yw=class ElementIdentityError extends Go{value;constructor(s,o){super(s,o),void 0!==o&&(this.value=o.value)}};class IdentityManager{uuid;identityMap;constructor({length:s=6}={}){this.uuid=new Gw({length:s}),this.identityMap=new WeakMap}identify(s){if(!ju(s))throw new Yw(\"Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.\",{value:s});if(s.meta.hasKey(\"id\")&&Iu(s.meta.get(\"id\"))&&!s.meta.get(\"id\").equals(\"\"))return s.id;if(this.identityMap.has(s))return this.identityMap.get(s);const o=new Su.Om(this.generateId());return this.identityMap.set(s,o),o}forget(s){return!!this.identityMap.has(s)&&(this.identityMap.delete(s),!0)}generateId(){return this.uuid.randomUUID()}}new IdentityManager;const Xw=_curry3((function pathOr(s,o,i){return Na(s,_path(o,i))})),traversal_find=(s,o)=>{const i=new PredicateVisitor({predicate:s,returnOnTrue:Uu});return visitor_visit(o,i),Xw(void 0,[0],i.result)};const Qw=class JsonSchema$anchorError extends Ko{};const Zw=class EvaluationJsonSchema$anchorError extends Qw{};const ex=class InvalidJsonSchema$anchorError extends Qw{constructor(s){super(`Invalid JSON Schema $anchor \"${s}\".`)}},isAnchor=s=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(s),uriToAnchor=s=>{const o=getHash(s);return dd(\"#\",o)},$anchor_evaluate=(s,o)=>{const i=(s=>{if(!isAnchor(s))throw new ex(s);return s})(s),a=traversal_find((s=>pE(s)&&serializers_value(s.$anchor)===i),o);if(bc(a))throw new Zw(`Evaluation failed on token: \"${i}\"`);return a},traversal_filter=(s,o)=>{const i=new PredicateVisitor({predicate:s});return visitor_visit(o,i),new Su.G6(i.result)};const tx=class JsonSchemaUriError extends Ko{};const rx=class EvaluationJsonSchemaUriError extends tx{},resolveSchema$refField=(s,o)=>{if(void 0===o.$ref)return;const i=getHash(serializers_value(o.$ref)),a=serializers_value(o.meta.get(\"ancestorsSchemaIdentifiers\")),u=Ca(((s,o)=>resolve(s,sanitize(stripHash(o)))),s,[...a,serializers_value(o.$ref)]);return`${u}${\"#\"===i?\"\":i}`},refractToSchemaElement=s=>{if(refractToSchemaElement.cache.has(s))return refractToSchemaElement.cache.get(s);const o=uS.refract(s);return refractToSchemaElement.cache.set(s,o),o};refractToSchemaElement.cache=new WeakMap;const maybeRefractToSchemaElement=s=>isPrimitiveElement(s)?refractToSchemaElement(s):s,uri_evaluate=(s,o)=>{const{cache:i}=uri_evaluate,a=stripHash(s),isSchemaElementWith$id=s=>pE(s)&&void 0!==s.$id;if(!i.has(o)){const s=traversal_filter(isSchemaElementWith$id,o);i.set(o,Array.from(s))}const u=i.get(o).find((s=>{const o=((s,o)=>{if(void 0===o.$id)return;const i=serializers_value(o.meta.get(\"ancestorsSchemaIdentifiers\"));return Ca(((s,o)=>resolve(s,sanitize(stripHash(o)))),s,i)})(a,s);return o===a}));if(bc(u))throw new rx(`Evaluation failed on URI: \"${s}\"`);return isAnchor(uriToAnchor(s))?$anchor_evaluate(uriToAnchor(s),u):apidom_evaluate(u,fromURIReference(s))};uri_evaluate.cache=new WeakMap;const nx=class MaximumDereferenceDepthError extends Cw{};const sx=class MaximumResolveDepthError extends Lw{};const ox=class UnmatchedResolverError extends Fw{},apidom_reference_src_parse=async(s,o)=>{const i=new kw({uri:sanitize(stripHash(s)),mediaType:o.parse.mediaType}),a=await(async(s,o)=>{const i=o.resolve.resolvers.map((s=>{const i=Object.create(s);return Object.assign(i,o.resolve.resolverOpts)})),a=await plugins_filter(\"canRead\",[s,o],i);if(cp(a))throw new ox(s.uri);try{const{result:o}=await run(\"read\",[s],a);return o}catch(o){throw new Lw(`Error while reading file \"${s.uri}\"`,{cause:o})}})(i,o);return(async(s,o)=>{const i=o.parse.parsers.map((s=>{const i=Object.create(s);return Object.assign(i,o.parse.parserOpts)})),a=await plugins_filter(\"canParse\",[s,o],i);if(cp(a))throw new ox(s.uri);try{const{plugin:i,result:u}=await run(\"parse\",[s,o],a);return!i.allowEmpty&&u.isEmpty?Promise.reject(new jw(`Error while parsing file \"${s.uri}\". File is empty.`)):u}catch(o){throw new jw(`Error while parsing file \"${s.uri}\"`,{cause:o})}})(new kw({...i,data:a}),o)};class AncestorLineage extends Array{includesCycle(s){return this.filter((o=>o.has(s))).length>1}includes(s,o){return s instanceof Set?super.includes(s,o):this.some((o=>o.has(s)))}findItem(s){for(const o of this)for(const i of o)if(ju(i)&&s(i))return i}}const ix=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],ax=new IdentityManager,mutationReplacer=(s,o,i,a)=>{Du(a)?a.value=s:Array.isArray(a)&&(a[i]=s)};class OpenAPI3_1DereferenceVisitor{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:s,namespace:o,options:i,indirections:a=[],ancestors:u=new AncestorLineage,refractCache:_=new Map}){this.indirections=a,this.namespace=o,this.reference=s,this.options=i,this.ancestors=new AncestorLineage(...u),this.refractCache=_}toBaseURI(s){return resolve(this.reference.uri,sanitize(stripHash(s)))}async toReference(s){if(this.reference.depth>=this.options.resolve.maxDepth)throw new sx(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file \"${this.reference.uri}\"`);const o=this.toBaseURI(s),{refSet:i}=this.reference;if(i.has(o))return i.find(Jw(o,\"uri\"));const a=await apidom_reference_src_parse(unsanitize(o),{...this.options,parse:{...this.options.parse,mediaType:\"text/plain\"}}),u=new gw({uri:o,value:cloneDeep(a),depth:this.reference.depth+1});if(i.add(u),this.options.dereference.immutable){const s=new gw({uri:`immutable://${o}`,value:a,depth:this.reference.depth+1});i.add(s)}return u}toAncestorLineage(s){const o=new Set(s.filter(ju));return[new AncestorLineage(...this.ancestors,o),o]}async ReferenceElement(s,o,i,a,u,_){if(this.indirections.includes(s))return!1;const[w,x]=this.toAncestorLineage([...u,i]),C=this.toBaseURI(serializers_value(s.$ref)),j=stripHash(this.reference.uri)===C,L=!j;if(!this.options.resolve.internal&&j)return!1;if(!this.options.resolve.external&&L)return!1;const B=await this.toReference(serializers_value(s.$ref)),$=resolve(C,serializers_value(s.$ref));this.indirections.push(s);const V=fromURIReference($);let U=apidom_evaluate(B.value.result,V);if(U.id=ax.identify(U),isPrimitiveElement(U)){const o=serializers_value(s.meta.get(\"referenced-element\")),i=`${o}-${serializers_value(ax.identify(U))}`;if(this.refractCache.has(i))U=this.refractCache.get(i);else if(isReferenceLikeElement(U))U=qb.refract(U),U.setMetaProperty(\"referenced-element\",o),this.refractCache.set(i,U);else{U=this.namespace.getElementClass(o).refract(U),this.refractCache.set(i,U)}}if(s===U)throw new Ko(\"Recursive Reference Object detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(w.includes(U)){if(B.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var z,Y;const o=new Su.sI(U.id,{type:\"reference\",uri:B.uri,$ref:serializers_value(s.$ref)}),a=(null!==(z=null===(Y=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===Y?void 0:Y.circularReplacer)&&void 0!==z?z:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,mutationReplacer),!i&&a}}const Z=stripHash(B.refSet.rootRef.uri)!==B.uri,ee=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((L||Z||aE(U)||ee)&&!w.includesCycle(U)){x.add(s);const o=new OpenAPI3_1DereferenceVisitor({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});U=await ix(U,o,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),x.delete(s)}this.indirections.pop();const ie=cloneShallow(U);return ie.setMetaProperty(\"id\",ax.generateId()),ie.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),ie.setMetaProperty(\"ref-origin\",B.uri),ie.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),Mu(U)&&Mu(ie)&&(s.hasKey(\"description\")&&\"description\"in U&&(ie.remove(\"description\"),ie.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in U&&(ie.remove(\"summary\"),ie.set(\"summary\",s.get(\"summary\")))),_.replaceWith(ie,mutationReplacer),!i&&ie}async PathItemElement(s,o,i,a,u,_){if(!Iu(s.$ref))return;if(this.indirections.includes(s))return!1;const[w,x]=this.toAncestorLineage([...u,i]),C=this.toBaseURI(serializers_value(s.$ref)),j=stripHash(this.reference.uri)===C,L=!j;if(!this.options.resolve.internal&&j)return;if(!this.options.resolve.external&&L)return;const B=await this.toReference(serializers_value(s.$ref)),$=resolve(C,serializers_value(s.$ref));this.indirections.push(s);const V=fromURIReference($);let U=apidom_evaluate(B.value.result,V);if(U.id=ax.identify(U),isPrimitiveElement(U)){const s=`path-item-${serializers_value(ax.identify(U))}`;this.refractCache.has(s)?U=this.refractCache.get(s):(U=Rb.refract(U),this.refractCache.set(s,U))}if(s===U)throw new Ko(\"Recursive Path Item Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(w.includes(U)){if(B.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var z,Y;const o=new Su.sI(U.id,{type:\"path-item\",uri:B.uri,$ref:serializers_value(s.$ref)}),a=(null!==(z=null===(Y=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===Y?void 0:Y.circularReplacer)&&void 0!==z?z:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,mutationReplacer),!i&&a}}const Z=stripHash(B.refSet.rootRef.uri)!==B.uri,ee=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((L||Z||oE(U)&&Iu(U.$ref)||ee)&&!w.includesCycle(U)){x.add(s);const o=new OpenAPI3_1DereferenceVisitor({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});U=await ix(U,o,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),x.delete(s)}if(this.indirections.pop(),oE(U)){const o=new Rb([...U.content],cloneDeep(U.meta),cloneDeep(U.attributes));o.setMetaProperty(\"id\",ax.generateId()),s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",B.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),U=o}return _.replaceWith(U,mutationReplacer),i?void 0:U}async LinkElement(s,o,i,a,u,_){if(!Iu(s.operationRef)&&!Iu(s.operationId))return;if(Iu(s.operationRef)&&Iu(s.operationId))throw new Ko(\"LinkElement operationRef and operationId fields are mutually exclusive.\");let w;if(Iu(s.operationRef)){var x;const o=fromURIReference(serializers_value(s.operationRef)),a=this.toBaseURI(serializers_value(s.operationRef)),u=stripHash(this.reference.uri)===a,C=!u;if(!this.options.resolve.internal&&u)return;if(!this.options.resolve.external&&C)return;const j=await this.toReference(serializers_value(s.operationRef));if(w=apidom_evaluate(j.value.result,o),isPrimitiveElement(w)){const s=`operation-${serializers_value(ax.identify(w))}`;this.refractCache.has(s)?w=this.refractCache.get(s):(w=Pb.refract(w),this.refractCache.set(s,w))}w=cloneShallow(w),w.setMetaProperty(\"ref-origin\",j.uri);const L=cloneShallow(s);return null===(x=L.operationRef)||void 0===x||x.meta.set(\"operation\",w),_.replaceWith(L,mutationReplacer),i?void 0:L}if(Iu(s.operationId)){var C;const o=serializers_value(s.operationId),a=await this.toReference(unsanitize(this.reference.uri));if(w=traversal_find((s=>nE(s)&&ju(s.operationId)&&s.operationId.equals(o)),a.value.result),bc(w))throw new Ko(`OperationElement(operationId=${o}) not found.`);const u=cloneShallow(s);return null===(C=u.operationId)||void 0===C||C.meta.set(\"operation\",w),_.replaceWith(u,mutationReplacer),i?void 0:u}}async ExampleElement(s,o,i,a,u,_){if(!Iu(s.externalValue))return;if(s.hasKey(\"value\")&&Iu(s.externalValue))throw new Ko(\"ExampleElement value and externalValue fields are mutually exclusive.\");const w=this.toBaseURI(serializers_value(s.externalValue)),x=stripHash(this.reference.uri)===w,C=!x;if(!this.options.resolve.internal&&x)return;if(!this.options.resolve.external&&C)return;const j=await this.toReference(serializers_value(s.externalValue)),L=cloneShallow(j.value.result);L.setMetaProperty(\"ref-origin\",j.uri);const B=cloneShallow(s);return B.value=L,_.replaceWith(B,mutationReplacer),i?void 0:B}async SchemaElement(s,o,i,a,u,_){if(!Iu(s.$ref))return;if(this.indirections.includes(s))return!1;const[w,x]=this.toAncestorLineage([...u,i]);let C=await this.toReference(unsanitize(this.reference.uri)),{uri:j}=C;const L=resolveSchema$refField(j,s),B=stripHash(L),$=new kw({uri:B}),V=Kw((s=>s.canRead($)),this.options.resolve.resolvers),U=!V;let z,Y=stripHash(this.reference.uri)===L,Z=!Y;this.indirections.push(s);try{if(V||U){j=this.toBaseURI(L);const s=L,o=maybeRefractToSchemaElement(C.value.result);if(z=uri_evaluate(s,o),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z),!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return}else{if(j=this.toBaseURI(L),Y=stripHash(this.reference.uri)===j,Z=!Y,!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return;C=await this.toReference(unsanitize(L));const s=fromURIReference(L),o=maybeRefractToSchemaElement(C.value.result);z=apidom_evaluate(o,s),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z)}}catch(s){if(!(U&&s instanceof rx))throw s;if(isAnchor(uriToAnchor(L))){if(Y=stripHash(this.reference.uri)===j,Z=!Y,!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return;C=await this.toReference(unsanitize(L));const s=uriToAnchor(L),o=maybeRefractToSchemaElement(C.value.result);z=$anchor_evaluate(s,o),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z)}else{if(j=this.toBaseURI(L),Y=stripHash(this.reference.uri)===j,Z=!Y,!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return;C=await this.toReference(unsanitize(L));const s=fromURIReference(L),o=maybeRefractToSchemaElement(C.value.result);z=apidom_evaluate(o,s),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z)}}if(s===z)throw new Ko(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(w.includes(z)){if(C.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var ee,ie;const o=new Su.sI(z.id,{type:\"json-schema\",uri:C.uri,$ref:serializers_value(s.$ref)}),a=(null!==(ee=null===(ie=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ie?void 0:ie.circularReplacer)&&void 0!==ee?ee:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,mutationReplacer),!i&&a}}const ae=stripHash(C.refSet.rootRef.uri)!==C.uri,ce=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((Z||ae||pE(z)&&Iu(z.$ref)||ce)&&!w.includesCycle(z)){x.add(s);const o=new OpenAPI3_1DereferenceVisitor({reference:C,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});z=await ix(z,o,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),x.delete(s)}if(this.indirections.pop(),predicates_isBooleanJsonSchemaElement(z)){const o=cloneDeep(z);return o.setMetaProperty(\"id\",ax.generateId()),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",C.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),_.replaceWith(o,mutationReplacer),!i&&o}if(pE(z)){const o=new uS([...z.content],cloneDeep(z.meta),cloneDeep(z.attributes));o.setMetaProperty(\"id\",ax.generateId()),s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",C.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),z=o}return _.replaceWith(z,mutationReplacer),i?void 0:z}}const cx=OpenAPI3_1DereferenceVisitor,lx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")];const ux=class OpenAPI3_1DereferenceStrategy extends Hw{constructor(s){super({...null!=s?s:{},name:\"openapi-3-1\"})}canDereference(s){var o;return\"text/plain\"!==s.mediaType?mw.includes(s.mediaType):rE(null===(o=s.parseResult)||void 0===o?void 0:o.result)}async dereference(s,o){var i;const a=createNamespace(hw),u=null!==(i=o.dereference.refSet)&&void 0!==i?i:new yw,_=new yw;let w,x=u;u.has(s.uri)?w=u.find(Jw(s.uri,\"uri\")):(w=new gw({uri:s.uri,value:s.parseResult}),u.add(w)),o.dereference.immutable&&(u.refs.map((s=>new gw({...s,value:cloneDeep(s.value)}))).forEach((s=>_.add(s))),w=_.find((o=>o.uri===s.uri)),x=_);const C=new cx({reference:w,namespace:a,options:o}),j=await lx(x.rootRef.value,C,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType});return o.dereference.immutable&&_.refs.filter((s=>s.uri.startsWith(\"immutable://\"))).map((s=>new gw({...s,uri:s.uri.replace(/^immutable:\\/\\//,\"\")}))).forEach((s=>u.add(s))),null===o.dereference.refSet&&u.clean(),_.clean(),j}},to_path=s=>{const o=(s=>s.slice(2))(s);return o.reduce(((s,i,a)=>{if(Du(i)){const o=String(serializers_value(i.key));s.push(o)}else if(Ru(o[a-2])){const u=o[a-2].content.indexOf(i);s.push(u)}return s}),[])};const px=class ModelPropertyMacroVisitor{modelPropertyMacro;options;SchemaElement={leave:(s,o,i,a,u)=>{void 0!==s.properties&&Mu(s.properties)&&s.properties.forEach((o=>{if(Mu(o))try{const s=this.modelPropertyMacro(serializers_value(o));o.set(\"default\",s)}catch(o){var a,_;const w=new Error(o,{cause:o});w.fullPath=[...to_path([...u,i,s]),\"properties\"],null===(a=this.options.dereference.dereferenceOpts)||void 0===a||null===(a=a.errors)||void 0===a||null===(_=a.push)||void 0===_||_.call(a,w)}}))}};constructor({modelPropertyMacro:s,options:o}){this.modelPropertyMacro=s,this.options=o}};var hx=function(){function XUniqWith(s,o){this.xf=o,this.pred=s,this.items=[]}return XUniqWith.prototype[\"@@transducer/init\"]=_xfBase_init,XUniqWith.prototype[\"@@transducer/result\"]=_xfBase_result,XUniqWith.prototype[\"@@transducer/step\"]=function(s,o){return _includesWith(this.pred,o,this.items)?s:(this.items.push(o),this.xf[\"@@transducer/step\"](s,o))},XUniqWith}();function _xuniqWith(s){return function(o){return new hx(s,o)}}var dx=_curry2(_dispatchable([],_xuniqWith,(function(s,o){for(var i,a=0,u=o.length,_=[];a<u;)_includesWith(s,i=o[a],_)||(_[_.length]=i),a+=1;return _})));const fx=dx;const mx=class all_of_AllOfVisitor{options;SchemaElement={leave(s,o,i,a,u){if(void 0===s.allOf)return;if(!Ru(s.allOf)){var _,w;const o=new TypeError(\"allOf must be an array\");return o.fullPath=[...to_path([...u,i,s]),\"allOf\"],void(null===(_=this.options.dereference.dereferenceOpts)||void 0===_||null===(_=_.errors)||void 0===_||null===(w=_.push)||void 0===w||w.call(_,o))}if(s.allOf.isEmpty)return void s.remove(\"allOf\");if(!s.allOf.content.every(pE)){var x,C;const o=new TypeError(\"Elements in allOf must be objects\");return o.fullPath=[...to_path([...u,i,s]),\"allOf\"],void(null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(C=x.push)||void 0===C||C.call(x,o))}for(;s.hasKey(\"allOf\");){const{allOf:o}=s;s.remove(\"allOf\");const i=yd.all([...o.content,s],{customMerge:s=>\"enum\"===serializers_value(s)?(s,o)=>{if(includesClasses([\"json-schema-enum\"],s)&&includesClasses([\"json-schema-enum\"],o)){const areElementsEqual=(s,o)=>!(Ru(s)||Ru(o)||Mu(s)||Mu(o))&&s.equals(serializers_value(o)),i=cloneShallow(s);return i.content=fx(areElementsEqual)([...s.content,...o.content]),i}return yd(s,o)}:yd});if(s.hasKey(\"$$ref\")||i.remove(\"$$ref\"),s.hasKey(\"example\")){const o=i.getMember(\"example\");o&&(o.value=s.get(\"example\"))}if(s.hasKey(\"examples\")){const o=i.getMember(\"examples\");o&&(o.value=s.get(\"examples\"))}s.content=i.content}}};constructor({options:s}){this.options=s}};const gx=class ParameterMacroVisitor{parameterMacro;options;#n;OperationElement={enter:s=>{this.#n=s},leave:()=>{this.#n=void 0}};ParameterElement={leave:(s,o,i,a,u)=>{const _=this.#n?serializers_value(this.#n):null,w=serializers_value(s);try{const o=this.parameterMacro(_,w);s.set(\"default\",o)}catch(s){var x,C;const o=new Error(s,{cause:s});o.fullPath=to_path([...u,i]),null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(C=x.push)||void 0===C||C.call(x,o)}}};constructor({parameterMacro:s,options:o}){this.parameterMacro=s,this.options=o}},get_root_cause=s=>{if(null==s.cause)return s;let{cause:o}=s;for(;null!=o.cause;)o=o.cause;return o};const yx=class SchemaRefError extends Go{},{wrapError:vx}=Xl,bx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],_x=new IdentityManager,dereference_mutationReplacer=(s,o,i,a)=>{Du(a)?a.value=s:Array.isArray(a)&&(a[i]=s)};class OpenAPI3_1SwaggerClientDereferenceVisitor extends cx{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:s=!0,useCircularStructures:o=!1,basePath:i=null,...a}){super(a),this.allowMetaPatches=s,this.useCircularStructures=o,this.basePath=i}async ReferenceElement(s,o,i,a,u,_){try{if(this.indirections.includes(s))return!1;const[o,a]=this.toAncestorLineage([...u,i]),j=this.toBaseURI(serializers_value(s.$ref)),L=stripHash(this.reference.uri)===j,B=!L;if(!this.options.resolve.internal&&L)return!1;if(!this.options.resolve.external&&B)return!1;const $=await this.toReference(serializers_value(s.$ref)),V=resolve(j,serializers_value(s.$ref));this.indirections.push(s);const U=fromURIReference(V);let z=apidom_evaluate($.value.result,U);if(z.id=_x.identify(z),isPrimitiveElement(z)){const o=serializers_value(s.meta.get(\"referenced-element\")),i=`${o}-${serializers_value(_x.identify(z))}`;if(this.refractCache.has(i))z=this.refractCache.get(i);else if(isReferenceLikeElement(z))z=qb.refract(z),z.setMetaProperty(\"referenced-element\",o),this.refractCache.set(i,z);else{z=this.namespace.getElementClass(o).refract(z),this.refractCache.set(i,z)}}if(s===z)throw new Ko(\"Recursive Reference Object detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(o.includes(z)){if($.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var w,x;const o=new Su.sI(z.id,{type:\"reference\",uri:$.uri,$ref:serializers_value(s.$ref),baseURI:V,referencingElement:s}),a=(null!==(w=null===(x=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===x?void 0:x.circularReplacer)&&void 0!==w?w:this.options.dereference.circularReplacer)(o);return _.replaceWith(o,dereference_mutationReplacer),!i&&a}}const Y=stripHash($.refSet.rootRef.uri)!==$.uri,Z=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((B||Y||aE(z)||Z)&&!o.includesCycle(z)){var C;a.add(s);const _=new OpenAPI3_1SwaggerClientDereferenceVisitor({reference:$,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(C=this.basePath)&&void 0!==C?C:[...to_path([...u,i,s]),\"$ref\"]});z=await bx(z,_,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),a.delete(s)}this.indirections.pop();const ee=cloneShallow(z);if(ee.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),ee.setMetaProperty(\"ref-origin\",$.uri),ee.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),Mu(z)&&(s.hasKey(\"description\")&&\"description\"in z&&(ee.remove(\"description\"),ee.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in z&&(ee.remove(\"summary\"),ee.set(\"summary\",s.get(\"summary\")))),this.allowMetaPatches&&Mu(ee)&&!ee.hasKey(\"$$ref\")){const s=resolve(j,V);ee.set(\"$$ref\",s)}return _.replaceWith(ee,dereference_mutationReplacer),!i&&ee}catch(o){var j,L,B;const a=get_root_cause(o),_=vx(a,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:fromURIReference(serializers_value(s.$ref)),fullPath:null!==(j=this.basePath)&&void 0!==j?j:[...to_path([...u,i,s]),\"$ref\"]});return void(null===(L=this.options.dereference.dereferenceOpts)||void 0===L||null===(L=L.errors)||void 0===L||null===(B=L.push)||void 0===B||B.call(L,_))}}async PathItemElement(s,o,i,a,u,_){try{if(!Iu(s.$ref))return;if(this.indirections.includes(s))return!1;if(includesClasses([\"cycle\"],s.$ref))return!1;const[o,a]=this.toAncestorLineage([...u,i]),j=this.toBaseURI(serializers_value(s.$ref)),L=stripHash(this.reference.uri)===j,B=!L;if(!this.options.resolve.internal&&L)return;if(!this.options.resolve.external&&B)return;const $=await this.toReference(serializers_value(s.$ref)),V=resolve(j,serializers_value(s.$ref));this.indirections.push(s);const U=fromURIReference(V);let z=apidom_evaluate($.value.result,U);if(z.id=_x.identify(z),isPrimitiveElement(z)){const s=`path-item-${serializers_value(_x.identify(z))}`;this.refractCache.has(s)?z=this.refractCache.get(s):(z=Rb.refract(z),this.refractCache.set(s,z))}if(s===z)throw new Ko(\"Recursive Path Item Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(o.includes(z)){if($.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var w,x;const o=new Su.sI(z.id,{type:\"path-item\",uri:$.uri,$ref:serializers_value(s.$ref),baseURI:V,referencingElement:s}),a=(null!==(w=null===(x=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===x?void 0:x.circularReplacer)&&void 0!==w?w:this.options.dereference.circularReplacer)(o);return _.replaceWith(o,dereference_mutationReplacer),!i&&a}}const Y=stripHash($.refSet.rootRef.uri)!==$.uri,Z=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((B||Y||oE(z)&&Iu(z.$ref)||Z)&&!o.includesCycle(z)){var C;a.add(s);const _=new OpenAPI3_1SwaggerClientDereferenceVisitor({reference:$,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:o,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(C=this.basePath)&&void 0!==C?C:[...to_path([...u,i,s]),\"$ref\"]});z=await bx(z,_,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),a.delete(s)}if(this.indirections.pop(),oE(z)){const o=new Rb([...z.content],cloneDeep(z.meta),cloneDeep(z.attributes));if(s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",$.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),this.allowMetaPatches&&void 0===o.get(\"$$ref\")){const s=resolve(j,V);o.set(\"$$ref\",s)}z=o}return _.replaceWith(z,dereference_mutationReplacer),i?void 0:z}catch(o){var j,L,B;const a=get_root_cause(o),_=vx(a,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:fromURIReference(serializers_value(s.$ref)),fullPath:null!==(j=this.basePath)&&void 0!==j?j:[...to_path([...u,i,s]),\"$ref\"]});return void(null===(L=this.options.dereference.dereferenceOpts)||void 0===L||null===(L=L.errors)||void 0===L||null===(B=L.push)||void 0===B||B.call(L,_))}}async SchemaElement(s,o,i,a,u,_){try{if(!Iu(s.$ref))return;if(this.indirections.includes(s))return!1;const[o,a]=this.toAncestorLineage([...u,i]);let j=await this.toReference(unsanitize(this.reference.uri)),{uri:L}=j;const B=resolveSchema$refField(L,s),$=stripHash(B),V=new kw({uri:$}),U=!this.options.resolve.resolvers.some((s=>s.canRead(V))),z=!U;let Y,Z=stripHash(this.reference.uri)===B,ee=!Z;this.indirections.push(s);try{if(U||z){L=this.toBaseURI(B);const s=B,o=maybeRefractToSchemaElement(j.value.result);if(Y=uri_evaluate(s,o),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y),!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return}else{if(L=this.toBaseURI(B),Z=stripHash(this.reference.uri)===L,ee=!Z,!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return;j=await this.toReference(unsanitize(B));const s=fromURIReference(B),o=maybeRefractToSchemaElement(j.value.result);Y=apidom_evaluate(o,s),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y)}}catch(s){if(!(z&&s instanceof rx))throw s;if(isAnchor(uriToAnchor(B))){if(Z=stripHash(this.reference.uri)===L,ee=!Z,!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return;j=await this.toReference(unsanitize(B));const s=uriToAnchor(B),o=maybeRefractToSchemaElement(j.value.result);Y=$anchor_evaluate(s,o),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y)}else{if(L=this.toBaseURI(serializers_value(B)),Z=stripHash(this.reference.uri)===L,ee=!Z,!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return;j=await this.toReference(unsanitize(B));const s=fromURIReference(B),o=maybeRefractToSchemaElement(j.value.result);Y=apidom_evaluate(o,s),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y)}}if(s===Y)throw new Ko(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(o.includes(Y)){if(j.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var w,x;const o=new Su.sI(Y.id,{type:\"json-schema\",uri:j.uri,$ref:serializers_value(s.$ref),baseURI:resolve(L,B),referencingElement:s}),a=(null!==(w=null===(x=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===x?void 0:x.circularReplacer)&&void 0!==w?w:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,dereference_mutationReplacer),!i&&a}}const ie=stripHash(j.refSet.rootRef.uri)!==j.uri,ae=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((ee||ie||pE(Y)&&Iu(Y.$ref)||ae)&&!o.includesCycle(Y)){var C;a.add(s);const _=new OpenAPI3_1SwaggerClientDereferenceVisitor({reference:j,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:o,basePath:null!==(C=this.basePath)&&void 0!==C?C:[...to_path([...u,i,s]),\"$ref\"]});Y=await bx(Y,_,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),a.delete(s)}if(this.indirections.pop(),predicates_isBooleanJsonSchemaElement(Y)){const o=cloneDeep(Y);return o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",j.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),_.replaceWith(o,dereference_mutationReplacer),!i&&o}if(pE(Y)){const o=new uS([...Y.content],cloneDeep(Y.meta),cloneDeep(Y.attributes));if(s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",j.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),this.allowMetaPatches&&void 0===o.get(\"$$ref\")){const s=resolve(L,B);o.set(\"$$ref\",s)}Y=o}return _.replaceWith(Y,dereference_mutationReplacer),i?void 0:Y}catch(o){var j,L,B;const a=get_root_cause(o),_=new yx(`Could not resolve reference: ${a.message}`,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),fullPath:null!==(j=this.basePath)&&void 0!==j?j:[...to_path([...u,i,s]),\"$ref\"],cause:a});return void(null===(L=this.options.dereference.dereferenceOpts)||void 0===L||null===(L=L.errors)||void 0===L||null===(B=L.push)||void 0===B||B.call(L,_))}}async LinkElement(){}async ExampleElement(s,o,i,a,u,_){try{return await super.ExampleElement(s,o,i,a,u,_)}catch(o){var w,x,C;const a=get_root_cause(o),_=vx(a,{baseDoc:this.reference.uri,externalValue:serializers_value(s.externalValue),fullPath:null!==(w=this.basePath)&&void 0!==w?w:[...to_path([...u,i,s]),\"externalValue\"]});return void(null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(C=x.push)||void 0===C||C.call(x,_))}}}const Sx=OpenAPI3_1SwaggerClientDereferenceVisitor,Ex=mergeAll[Symbol.for(\"nodejs.util.promisify.custom\")];const wx=class RootVisitor{constructor({parameterMacro:s,modelPropertyMacro:o,mode:i,options:a,...u}){const _=[];_.push(new Sx({...u,options:a})),\"function\"==typeof o&&_.push(new px({modelPropertyMacro:o,options:a})),\"strict\"!==i&&_.push(new mx({options:a})),\"function\"==typeof s&&_.push(new gx({parameterMacro:s,options:a}));const w=Ex(_,{nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType});Object.assign(this,w)}},xx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")];const kx=class OpenAPI3_1SwaggerClientDereferenceStrategy extends ux{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:s=!1,parameterMacro:o=null,modelPropertyMacro:i=null,mode:a=\"non-strict\",ancestors:u=[],..._}={}){super({..._}),this.name=\"openapi-3-1-swagger-client\",this.allowMetaPatches=s,this.parameterMacro=o,this.modelPropertyMacro=i,this.mode=a,this.ancestors=[...u]}async dereference(s,o){var i;const a=createNamespace(hw),u=null!==(i=o.dereference.refSet)&&void 0!==i?i:new yw,_=new yw;let w,x=u;u.has(s.uri)?w=u.find((o=>o.uri===s.uri)):(w=new gw({uri:s.uri,value:s.parseResult}),u.add(w)),o.dereference.immutable&&(u.refs.map((s=>new gw({...s,value:cloneDeep(s.value)}))).forEach((s=>_.add(s))),w=_.find((o=>o.uri===s.uri)),x=_);const C=new wx({reference:w,namespace:a,options:o,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),j=await xx(x.rootRef.value,C,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType});return o.dereference.immutable&&_.refs.filter((s=>s.uri.startsWith(\"immutable://\"))).map((s=>new gw({...s,uri:s.uri.replace(/^immutable:\\/\\//,\"\")}))).forEach((s=>u.add(s))),null===o.dereference.refSet&&u.clean(),_.clean(),j}},circularReplacer=s=>{const o=serializers_value(s.meta.get(\"baseURI\")),i=s.meta.get(\"referencingElement\");return new Su.Sh({$ref:o},cloneDeep(i.meta),cloneDeep(i.attributes))},resolveOpenAPI31Strategy=async s=>{const{spec:o,timeout:i,redirects:a,requestInterceptor:u,responseInterceptor:_,pathDiscriminator:w=[],allowMetaPatches:x=!1,useCircularStructures:C=!1,skipNormalization:j=!1,parameterMacro:L=null,modelPropertyMacro:B=null,mode:$=\"non-strict\",strategies:V}=s;try{const{cache:U}=resolveOpenAPI31Strategy,z=V.find((s=>s.match(o))),Y=isHttpUrl(url_cwd())?url_cwd():Ll,Z=options_retrievalURI(s),ee=resolve(Y,Z);let ie;U.has(o)?ie=U.get(o):(ie=Ib.refract(o),ie.classes.push(\"result\"),U.set(o,ie));const ae=new Cu([ie]),ce=es_compile(w),le=\"\"===ce?\"\":`#${ce}`,pe=apidom_evaluate(ie,ce),de=new gw({uri:ee,value:ae}),fe=new yw({refs:[de]});\"\"!==ce&&(fe.rootRef=void 0);const ye=[new Set([pe])],be=[],_e=await(async(s,o={})=>{const i=util_merge(bw,o);return dereferenceApiDOM(s,i)})(pe,{resolve:{baseURI:`${ee}${le}`,resolvers:[new qw({timeout:i||1e4,redirects:a||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:u,responseInterceptor:_}},strategies:[new Mw]},parse:{mediaType:mw.latest(),parsers:[new zw({allowEmpty:!1,sourceMap:!1}),new Ww({allowEmpty:!1,sourceMap:!1}),new Vw({allowEmpty:!1,sourceMap:!1}),new Uw({allowEmpty:!1,sourceMap:!1}),new Tw({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new kx({allowMetaPatches:x,useCircularStructures:C,parameterMacro:L,modelPropertyMacro:B,mode:$,ancestors:ye})],refSet:fe,dereferenceOpts:{errors:be},immutable:!1,circular:C?\"ignore\":\"replace\",circularReplacer:C?bw.dereference.circularReplacer:circularReplacer}}),Se=((s,o,i)=>new gp({element:i}).transclude(s,o))(pe,_e,ie),we=j?Se:z.normalize(Se);return{spec:serializers_value(we),errors:be}}catch(s){if(s instanceof Lp)return{spec:o,errors:[]};throw s}};resolveOpenAPI31Strategy.cache=new WeakMap;const Ox=resolveOpenAPI31Strategy;function _clone(s,o,i){if(i||(i=new Cx),function _isPrimitive(s){var o=typeof s;return null==s||\"object\"!=o&&\"function\"!=o}(s))return s;var a=function copy(a){var u=i.get(s);if(u)return u;for(var _ in i.set(s,a),s)Object.prototype.hasOwnProperty.call(s,_)&&(a[_]=o?_clone(s[_],!0,i):s[_]);return a};switch(ra(s)){case\"Object\":return a(Object.create(Object.getPrototypeOf(s)));case\"Array\":return a(Array(s.length));case\"Date\":return new Date(s.valueOf());case\"RegExp\":return _cloneRegExp(s);case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"BigInt64Array\":case\"BigUint64Array\":return s.slice();default:return s}}var Cx=function(){function _ObjectMap(){this.map={},this.length=0}return _ObjectMap.prototype.set=function(s,o){var i=this.hash(s),a=this.map[i];a||(this.map[i]=a=[]),a.push([s,o]),this.length+=1},_ObjectMap.prototype.hash=function(s){var o=[];for(var i in s)o.push(Object.prototype.toString.call(s[i]));return o.join()},_ObjectMap.prototype.get=function(s){if(this.length<=180)for(var o in this.map)for(var i=this.map[o],a=0;a<i.length;a+=1){if((_=i[a])[0]===s)return _[1]}else{var u=this.hash(s);if(i=this.map[u])for(a=0;a<i.length;a+=1){var _;if((_=i[a])[0]===s)return _[1]}}},_ObjectMap}(),Ax=function(){function XReduceBy(s,o,i,a){this.valueFn=s,this.valueAcc=o,this.keyFn=i,this.xf=a,this.inputs={}}return XReduceBy.prototype[\"@@transducer/init\"]=_xfBase_init,XReduceBy.prototype[\"@@transducer/result\"]=function(s){var o;for(o in this.inputs)if(_has(o,this.inputs)&&(s=this.xf[\"@@transducer/step\"](s,this.inputs[o]))[\"@@transducer/reduced\"]){s=s[\"@@transducer/value\"];break}return this.inputs=null,this.xf[\"@@transducer/result\"](s)},XReduceBy.prototype[\"@@transducer/step\"]=function(s,o){var i=this.keyFn(o);return this.inputs[i]=this.inputs[i]||[i,_clone(this.valueAcc,!1)],this.inputs[i][1]=this.valueFn(this.inputs[i][1],o),s},XReduceBy}();function _xreduceBy(s,o,i){return function(a){return new Ax(s,o,i,a)}}var jx=_curryN(4,[],_dispatchable([],_xreduceBy,(function reduceBy(s,o,i,a){var u=_xwrap((function(a,u){var _=i(u),w=s(_has(_,a)?a[_]:_clone(o,!1),u);return w&&w[\"@@transducer/reduced\"]?_reduced(a):(a[_]=w,a)}));return wa(u,{},a)})));const Ix=_curry2(_checkForMethod(\"groupBy\",jx((function(s,o){return s.push(o),s}),[])));const Px=class NormalizeStorage{internalStore;constructor(s,o,i){this.storageElement=s,this.storageField=o,this.storageSubField=i}get store(){if(!this.internalStore){let s=this.storageElement.get(this.storageField);Mu(s)||(s=new Su.Sh,this.storageElement.set(this.storageField,s));let o=s.get(this.storageSubField);Ru(o)||(o=new Su.wE,s.set(this.storageSubField,o)),this.internalStore=o}return this.internalStore}append(s){this.includes(s)||this.store.push(s)}includes(s){return this.store.includes(s)}},removeSpaces=s=>s.replace(/\\s/g,\"\"),normalize_operation_ids_replaceSpecialCharsWithUnderscore=s=>s.replace(/\\W/gi,\"_\"),normalizeOperationId=(s,o,i)=>{const a=removeSpaces(s);return a.length>0?normalize_operation_ids_replaceSpecialCharsWithUnderscore(a):((s,o)=>`${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(o.toLowerCase()))}${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(s))}`)(o,i)},normalize_operation_ids=({storageField:s=\"x-normalized\",operationIdNormalizer:o=normalizeOperationId}={})=>i=>{const{predicates:a,ancestorLineageToJSONPointer:u,namespace:_}=i,w=[],x=[],C=[];let j;return{visitor:{OpenApi3_1Element:{enter(o){j=new Px(o,s,\"operation-ids\")},leave(){const s=Ix((s=>serializers_value(s.operationId)),x);Object.entries(s).forEach((([s,o])=>{Array.isArray(o)&&(o.length<=1||o.forEach(((o,i)=>{const a=`${s}${i+1}`;o.operationId=new _.elements.String(a)})))})),C.forEach((s=>{if(void 0===s.operationId)return;const o=String(serializers_value(s.operationId)),i=x.find((s=>serializers_value(s.meta.get(\"originalOperationId\"))===o));void 0!==i&&(s.operationId=cloneDeep.safe(i.operationId),s.meta.set(\"originalOperationId\",o),s.set(\"__originalOperationId\",o))})),x.length=0,C.length=0,j=void 0}},PathItemElement:{enter(s){const o=Na(\"path\",serializers_value(s.meta.get(\"path\")));w.push(o)},leave(){w.pop()}},OperationElement:{enter(s,i,a,C,L){if(void 0===s.operationId)return;const B=u([...L,a,s]);if(j.includes(B))return;const $=String(serializers_value(s.operationId)),V=Ba(w),U=Na(\"method\",serializers_value(s.meta.get(\"http-method\"))),z=o($,V,U);$!==z&&(s.operationId=new _.elements.String(z),s.set(\"__originalOperationId\",$),s.meta.set(\"originalOperationId\",$),x.push(s),j.append(B))}},LinkElement:{leave(s){a.isLinkElement(s)&&void 0!==s.operationId&&C.push(s)}}}}},normalize_parameters=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o,parameterEquals=(s,o)=>!!i.isParameterElement(s)&&(!!i.isParameterElement(o)&&(!!i.isStringElement(s.name)&&(!!i.isStringElement(s.in)&&(!!i.isStringElement(o.name)&&(!!i.isStringElement(o.in)&&(serializers_value(s.name)===serializers_value(o.name)&&serializers_value(s.in)===serializers_value(o.in))))))),u=[];let _;return{visitor:{OpenApi3_1Element:{enter(o){_=new Px(o,s,\"parameters\")},leave(){_=void 0}},PathItemElement:{enter(s,o,a,_,w){if(w.some(i.isComponentsElement))return;const{parameters:x}=s;i.isArrayElement(x)?u.push([...x.content]):u.push([])},leave(){u.pop()}},OperationElement:{leave(s,o,i,w,x){const C=Ba(u);if(!Array.isArray(C)||0===C.length)return;const j=a([...x,i,s]);if(_.includes(j))return;const L=Xw([],[\"parameters\",\"content\"],s),B=fx(parameterEquals,[...L,...C]);s.parameters=new Sv(B),_.append(j)}}}}},normalize_security_requirements=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o;let u,_;return{visitor:{OpenApi3_1Element:{enter(o){_=new Px(o,s,\"security-requirements\"),i.isArrayElement(o.security)&&(u=o.security)},leave(){_=void 0,u=void 0}},OperationElement:{leave(s,o,w,x,C){if(C.some(i.isComponentsElement))return;const j=a([...C,w,s]);if(_.includes(j))return;var L;void 0===s.security&&void 0!==u&&(s.security=new Cv(null===(L=u)||void 0===L?void 0:L.content),_.append(j))}}}}},normalize_parameter_examples=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o;let u;return{visitor:{OpenApi3_1Element:{enter(o){u=new Px(o,s,\"parameter-examples\")},leave(){u=void 0}},ParameterElement:{leave(s,o,_,w,x){var C,j;if(x.some(i.isComponentsElement))return;if(void 0===s.schema||!i.isSchemaElement(s.schema))return;if(void 0===(null===(C=s.schema)||void 0===C?void 0:C.example)&&void 0===(null===(j=s.schema)||void 0===j?void 0:j.examples))return;const L=a([...x,_,s]);if(!u.includes(L)){if(void 0!==s.examples&&i.isObjectElement(s.examples)){const o=s.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==s.schema.examples&&(s.schema.set(\"examples\",o),u.append(L)),void(void 0!==s.schema.example&&(s.schema.set(\"example\",o[0]),u.append(L)))}void 0!==s.example&&(void 0!==s.schema.examples&&(s.schema.set(\"examples\",[cloneDeep(s.example)]),u.append(L)),void 0!==s.schema.example&&(s.schema.set(\"example\",cloneDeep(s.example)),u.append(L)))}}}}}},normalize_header_examples=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o;let u;return{visitor:{OpenApi3_1Element:{enter(o){u=new Px(o,s,\"header-examples\")},leave(){u=void 0}},HeaderElement:{leave(s,o,_,w,x){var C,j;if(x.some(i.isComponentsElement))return;if(void 0===s.schema||!i.isSchemaElement(s.schema))return;if(void 0===(null===(C=s.schema)||void 0===C?void 0:C.example)&&void 0===(null===(j=s.schema)||void 0===j?void 0:j.examples))return;const L=a([...x,_,s]);if(!u.includes(L)){if(void 0!==s.examples&&i.isObjectElement(s.examples)){const o=s.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==s.schema.examples&&(s.schema.set(\"examples\",o),u.append(L)),void(void 0!==s.schema.example&&(s.schema.set(\"example\",o[0]),u.append(L)))}void 0!==s.example&&(void 0!==s.schema.examples&&(s.schema.set(\"examples\",[cloneDeep(s.example)]),u.append(L)),void 0!==s.schema.example&&(s.schema.set(\"example\",cloneDeep(s.example)),u.append(L)))}}}}}},openapi_3_1_apidom_normalize=s=>{if(!Mu(s))return s;const o=[normalize_operation_ids({operationIdNormalizer:(s,o,i)=>opId({operationId:s},o,i,{v2OperationIdCompatibilityMode:!1})}),normalize_parameters(),normalize_security_requirements(),normalize_parameter_examples(),normalize_header_examples()];return dispatchPluginsSync(s,o,{toolboxCreator:apidom_ns_openapi_3_1_src_refractor_toolbox,visitorOptions:{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}})},Tx={name:\"openapi-3-1-apidom\",match:s=>isOpenAPI31(s),normalize(s){if(!ju(s)&&fu(s)&&!s.$$normalized){const i=(o=openapi_3_1_apidom_normalize,s=>{const i=Ib.refract(s);i.classes.push(\"result\");const a=o(i),u=serializers_value(a);return Ox.cache.set(u,a),serializers_value(a)})(s);return i.$$normalized=!0,i}var o;return ju(s)?openapi_3_1_apidom_normalize(s):s},resolve:async s=>Ox(s)},Nx=Tx,makeResolve=s=>async o=>(async s=>{const{spec:o,requestInterceptor:i,responseInterceptor:a}=s,u=options_retrievalURI(s),_=options_httpClient(s),w=o||await makeFetchJSON(_,{requestInterceptor:i,responseInterceptor:a})(u),x={...s,spec:w};return s.strategies.find((s=>s.match(w))).resolve(x)})({...s,...o}),Mx=makeResolve({strategies:[_u,vu,gu]});const server_url_template=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"server-url-template\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},callbacks_server_variable=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"server-variable\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},server_variable_name=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"server-variable-name\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},callbacks_literals=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"literals\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},Rx=new function server_url_templating_grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"server-url-template\",lower:\"server-url-template\",index:0,isBkr:!1},this.rules[1]={name:\"server-variable\",lower:\"server-variable\",index:1,isBkr:!1},this.rules[2]={name:\"server-variable-name\",lower:\"server-variable-name\",index:2,isBkr:!1},this.rules[3]={name:\"literals\",lower:\"literals\",index:3,isBkr:!1},this.rules[4]={name:\"DIGIT\",lower:\"digit\",index:4,isBkr:!1},this.rules[5]={name:\"HEXDIG\",lower:\"hexdig\",index:5,isBkr:!1},this.rules[6]={name:\"pct-encoded\",lower:\"pct-encoded\",index:6,isBkr:!1},this.rules[7]={name:\"ucschar\",lower:\"ucschar\",index:7,isBkr:!1},this.rules[8]={name:\"iprivate\",lower:\"iprivate\",index:8,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4]},this.rules[2].opcodes[2]={type:5,min:0,max:122},this.rules[2].opcodes[3]={type:6,string:[124]},this.rules[2].opcodes[4]={type:5,min:126,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:5,min:38,max:59},this.rules[3].opcodes[5]={type:6,string:[61]},this.rules[3].opcodes[6]={type:5,min:63,max:91},this.rules[3].opcodes[7]={type:6,string:[93]},this.rules[3].opcodes[8]={type:6,string:[95]},this.rules[3].opcodes[9]={type:5,min:97,max:122},this.rules[3].opcodes[10]={type:6,string:[126]},this.rules[3].opcodes[11]={type:4,index:7},this.rules[3].opcodes[12]={type:4,index:8},this.rules[3].opcodes[13]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:5,min:48,max:57},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[5].opcodes[1]={type:4,index:4},this.rules[5].opcodes[2]={type:7,string:[97]},this.rules[5].opcodes[3]={type:7,string:[98]},this.rules[5].opcodes[4]={type:7,string:[99]},this.rules[5].opcodes[5]={type:7,string:[100]},this.rules[5].opcodes[6]={type:7,string:[101]},this.rules[5].opcodes[7]={type:7,string:[102]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,3]},this.rules[6].opcodes[1]={type:7,string:[37]},this.rules[6].opcodes[2]={type:4,index:5},this.rules[6].opcodes[3]={type:4,index:5},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[7].opcodes[1]={type:5,min:160,max:55295},this.rules[7].opcodes[2]={type:5,min:63744,max:64975},this.rules[7].opcodes[3]={type:5,min:65008,max:65519},this.rules[7].opcodes[4]={type:5,min:65536,max:131069},this.rules[7].opcodes[5]={type:5,min:131072,max:196605},this.rules[7].opcodes[6]={type:5,min:196608,max:262141},this.rules[7].opcodes[7]={type:5,min:262144,max:327677},this.rules[7].opcodes[8]={type:5,min:327680,max:393213},this.rules[7].opcodes[9]={type:5,min:393216,max:458749},this.rules[7].opcodes[10]={type:5,min:458752,max:524285},this.rules[7].opcodes[11]={type:5,min:524288,max:589821},this.rules[7].opcodes[12]={type:5,min:589824,max:655357},this.rules[7].opcodes[13]={type:5,min:655360,max:720893},this.rules[7].opcodes[14]={type:5,min:720896,max:786429},this.rules[7].opcodes[15]={type:5,min:786432,max:851965},this.rules[7].opcodes[16]={type:5,min:851968,max:917501},this.rules[7].opcodes[17]={type:5,min:921600,max:983037},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:57344,max:63743},this.rules[8].opcodes[2]={type:5,min:983040,max:1048573},this.rules[8].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function toString(){let s=\"\";return s+=\"; OpenAPI Server URL templating ABNF syntax\\n\",s+=\"server-url-template    = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\\n\",s+='server-variable        = \"{\" server-variable-name \"}\"\\n',s+=\"server-variable-name   = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\",s+=\"\\n\",s+=\"; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\\n\",s+=\"; https://www.rfc-editor.org/errata/eid6937\\n\",s+=\"literals               = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\\n\",s+=\"                       / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\\n\",s+=\"                       / pct-encoded)\\n\",s+=\"                            ; any Unicode character except: CTL, SP,\\n\",s+='                            ;  DQUOTE, \"%\" (aside from pct-encoded),\\n',s+='                            ;  \"<\", \">\", \"\\\\\", \"^\", \"`\", \"{\", \"|\", \"}\"\\n',s+=\"\\n\",s+=\"; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\\n\",s+=\"DIGIT          =  %x30-39             ; 0-9\\n\",s+='HEXDIG         =  DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\" ; case-insensitive\\n',s+=\"\\n\",s+='pct-encoded    =  \"%\" HEXDIG HEXDIG\\n',s+=\"\\n\",s+=\"ucschar        =  %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\\n\",s+=\"               /  %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\\n\",s+=\"               /  %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\\n\",s+=\"               /  %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\\n\",s+=\"               /  %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\\n\",s+=\"               /  %xD0000-DFFFD / %xE1000-EFFFD\\n\",s+=\"\\n\",s+=\"iprivate       =  %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\\n\",'; OpenAPI Server URL templating ABNF syntax\\nserver-url-template    = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\\nserver-variable        = \"{\" server-variable-name \"}\"\\nserver-variable-name   = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\\n; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\\n; https://www.rfc-editor.org/errata/eid6937\\nliterals               = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\\n                       / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\\n                       / pct-encoded)\\n                            ; any Unicode character except: CTL, SP,\\n                            ;  DQUOTE, \"%\" (aside from pct-encoded),\\n                            ;  \"<\", \">\", \"\\\\\", \"^\", \"`\", \"{\", \"|\", \"}\"\\n\\n; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\\nDIGIT          =  %x30-39             ; 0-9\\nHEXDIG         =  DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\" ; case-insensitive\\n\\npct-encoded    =  \"%\" HEXDIG HEXDIG\\n\\nucschar        =  %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\\n               /  %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\\n               /  %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\\n               /  %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\\n               /  %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\\n               /  %xD0000-DFFFD / %xE1000-EFFFD\\n\\niprivate       =  %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\\n'}},openapi_server_url_templating_es_parse=s=>{const o=new yp;o.ast=new vp,o.ast.callbacks[\"server-url-template\"]=server_url_template,o.ast.callbacks[\"server-variable\"]=callbacks_server_variable,o.ast.callbacks[\"server-variable-name\"]=server_variable_name,o.ast.callbacks.literals=callbacks_literals;return{result:o.parse(Rx,\"server-url-template\",s),ast:o.ast}},openapi_server_url_templating_es_test=(s,{strict:o=!1}={})=>{try{const i=openapi_server_url_templating_es_parse(s);if(!i.result.success)return!1;const a=[];i.ast.translate(a);const u=a.some((([s])=>\"server-variable\"===s));if(!o&&!u)try{return new URL(s,\"https://vladimirgorej.com\"),!0}catch{return!1}return!o||u}catch{return!1}},encodeServerVariable=s=>(s=>{try{return\"string\"==typeof s&&decodeURIComponent(s)!==s}catch{return!1}})(s)?s:encodeURIComponent(s).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\"),Dx=[\"literals\",\"server-variable-name\"],es_substitute=(s,o,i={})=>{const a={...{encoder:encodeServerVariable},...i},u=openapi_server_url_templating_es_parse(s);if(!u.result.success)return s;const _=[];u.ast.translate(_);const w=_.filter((([s])=>Dx.includes(s))).map((([s,i])=>\"server-variable-name\"===s?Object.hasOwn(o,i)?a.encoder(o[i],i):`{${i}}`:i));return w.join(\"\")};function path_templating_grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"path-template\",lower:\"path-template\",index:0,isBkr:!1},this.rules[1]={name:\"path-segment\",lower:\"path-segment\",index:1,isBkr:!1},this.rules[2]={name:\"slash\",lower:\"slash\",index:2,isBkr:!1},this.rules[3]={name:\"path-literal\",lower:\"path-literal\",index:3,isBkr:!1},this.rules[4]={name:\"template-expression\",lower:\"template-expression\",index:4,isBkr:!1},this.rules[5]={name:\"template-expression-param-name\",lower:\"template-expression-param-name\",index:5,isBkr:!1},this.rules[6]={name:\"pchar\",lower:\"pchar\",index:6,isBkr:!1},this.rules[7]={name:\"unreserved\",lower:\"unreserved\",index:7,isBkr:!1},this.rules[8]={name:\"pct-encoded\",lower:\"pct-encoded\",index:8,isBkr:!1},this.rules[9]={name:\"sub-delims\",lower:\"sub-delims\",index:9,isBkr:!1},this.rules[10]={name:\"ALPHA\",lower:\"alpha\",index:10,isBkr:!1},this.rules[11]={name:\"DIGIT\",lower:\"digit\",index:11,isBkr:!1},this.rules[12]={name:\"HEXDIG\",lower:\"hexdig\",index:12,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:2},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:1},this.rules[0].opcodes[5]={type:4,index:2},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:1,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:4},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:7,string:[47]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:2,children:[1,2,3]},this.rules[4].opcodes[1]={type:7,string:[123]},this.rules[4].opcodes[2]={type:4,index:5},this.rules[4].opcodes[3]={type:7,string:[125]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:3,min:1,max:1/0},this.rules[5].opcodes[1]={type:1,children:[2,3,4]},this.rules[5].opcodes[2]={type:5,min:0,max:122},this.rules[5].opcodes[3]={type:6,string:[124]},this.rules[5].opcodes[4]={type:5,min:126,max:1114111},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[6].opcodes[4]={type:7,string:[58]},this.rules[6].opcodes[5]={type:7,string:[64]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[7].opcodes[1]={type:4,index:10},this.rules[7].opcodes[2]={type:4,index:11},this.rules[7].opcodes[3]={type:7,string:[45]},this.rules[7].opcodes[4]={type:7,string:[46]},this.rules[7].opcodes[5]={type:7,string:[95]},this.rules[7].opcodes[6]={type:7,string:[126]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:2,children:[1,2,3]},this.rules[8].opcodes[1]={type:7,string:[37]},this.rules[8].opcodes[2]={type:4,index:12},this.rules[8].opcodes[3]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2]},this.rules[10].opcodes[1]={type:5,min:65,max:90},this.rules[10].opcodes[2]={type:5,min:97,max:122},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:5,min:48,max:57},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[12].opcodes[1]={type:4,index:11},this.rules[12].opcodes[2]={type:7,string:[97]},this.rules[12].opcodes[3]={type:7,string:[98]},this.rules[12].opcodes[4]={type:7,string:[99]},this.rules[12].opcodes[5]={type:7,string:[100]},this.rules[12].opcodes[6]={type:7,string:[101]},this.rules[12].opcodes[7]={type:7,string:[102]},this.toString=function toString(){let s=\"\";return s+=\"; OpenAPI Path Templating ABNF syntax\\n\",s+=\"; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\n\",s+=\"path-template                  = slash *( path-segment slash ) [ path-segment ]\\n\",s+=\"path-segment                   = 1*( path-literal / template-expression )\\n\",s+='slash                          = \"/\"\\n',s+=\"path-literal                   = 1*pchar\\n\",s+='template-expression            = \"{\" template-expression-param-name \"}\"\\n',s+=\"template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\n\",s+='pchar               = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\\n',s+='unreserved          = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\\n',s+=\"                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\\n\",s+='pct-encoded         = \"%\" HEXDIG HEXDIG\\n',s+=\"                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\\n\",s+='sub-delims          = \"!\" / \"$\" / \"&\" / \"\\'\" / \"(\" / \")\"\\n',s+='                    / \"*\" / \"+\" / \",\" / \";\" / \"=\"\\n',s+=\"                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\n\",s+=\"ALPHA               = %x41-5A / %x61-7A   ; A-Z / a-z\\n\",s+=\"DIGIT               = %x30-39            ; 0-9\\n\",s+='HEXDIG              = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\\n','; OpenAPI Path Templating ABNF syntax\\n; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\npath-template                  = slash *( path-segment slash ) [ path-segment ]\\npath-segment                   = 1*( path-literal / template-expression )\\nslash                          = \"/\"\\npath-literal                   = 1*pchar\\ntemplate-expression            = \"{\" template-expression-param-name \"}\"\\ntemplate-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\\n; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\npchar               = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\\nunreserved          = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\\n                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\\npct-encoded         = \"%\" HEXDIG HEXDIG\\n                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\\nsub-delims          = \"!\" / \"$\" / \"&\" / \"\\'\" / \"(\" / \")\"\\n                    / \"*\" / \"+\" / \",\" / \";\" / \"=\"\\n                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\\n\\n; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\nALPHA               = %x41-5A / %x61-7A   ; A-Z / a-z\\nDIGIT               = %x30-39            ; 0-9\\nHEXDIG              = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\\n'}}const callbacks_slash=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"slash\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),path_template=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"path-template\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},path_literal=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"path-literal\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),template_expression=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"template-expression\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),template_expression_param_name=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"template-expression-param-name\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),Lx=new path_templating_grammar,openapi_path_templating_es_parse=s=>{const o=new yp;o.ast=new vp,o.ast.callbacks[\"path-template\"]=path_template,o.ast.callbacks.slash=callbacks_slash,o.ast.callbacks[\"path-literal\"]=path_literal,o.ast.callbacks[\"template-expression\"]=template_expression,o.ast.callbacks[\"template-expression-param-name\"]=template_expression_param_name;return{result:o.parse(Lx,\"path-template\",s),ast:o.ast}},encodePathComponent=s=>(s=>{try{return\"string\"==typeof s&&decodeURIComponent(s)!==s}catch{return!1}})(s)?s:encodeURIComponent(s).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\"),Fx=[\"slash\",\"path-literal\",\"template-expression-param-name\"],es_resolve=(s,o,i={})=>{const a={...{encoder:encodePathComponent},...i},u=openapi_path_templating_es_parse(s);if(!u.result.success)return s;const _=[];u.ast.translate(_);const w=_.filter((([s])=>Fx.includes(s))).map((([s,i])=>\"template-expression-param-name\"===s?Object.prototype.hasOwnProperty.call(o,i)?a.encoder(o[i],i):`{${i}}`:i));return w.join(\"\")},Bx=(new path_templating_grammar,new yp,{body:function bodyBuilder({req:s,value:o}){void 0!==o&&(s.body=o)},header:function headerBuilder({req:s,parameter:o,value:i}){s.headers=s.headers||{},void 0!==i&&(s.headers[o.name]=i)},query:function queryBuilder({req:s,value:o,parameter:i}){s.query=s.query||{},!1===o&&\"boolean\"===i.type&&(o=\"false\");0===o&&[\"number\",\"integer\"].indexOf(i.type)>-1&&(o=\"0\");if(o)s.query[i.name]={collectionFormat:i.collectionFormat,value:o};else if(i.allowEmptyValue&&void 0!==o){const o=i.name;s.query[o]=s.query[o]||{},s.query[o].allowEmptyValue=!0}},path:function pathBuilder({req:s,value:o,parameter:i,baseURL:a}){if(void 0!==o){const u=s.url.replace(a,\"\"),_=es_resolve(u,{[i.name]:o});s.url=a+_}},formData:function formDataBuilder({req:s,value:o,parameter:i}){!1===o&&\"boolean\"===i.type&&(o=\"false\");0===o&&[\"number\",\"integer\"].indexOf(i.type)>-1&&(o=\"0\");if(o)s.form=s.form||{},s.form[i.name]={collectionFormat:i.collectionFormat,value:o};else if(i.allowEmptyValue&&void 0!==o){s.form=s.form||{};const o=i.name;s.form[o]=s.form[o]||{},s.form[o].allowEmptyValue=!0}}});function serialize(s,o){return o.includes(\"application/json\")?\"string\"==typeof s?s:(Array.isArray(s)&&(s=s.map((s=>{try{return JSON.parse(s)}catch(o){return s}}))),JSON.stringify(s)):String(s)}function grammar_grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"lenient-cookie-string\",lower:\"lenient-cookie-string\",index:0,isBkr:!1},this.rules[1]={name:\"lenient-cookie-entry\",lower:\"lenient-cookie-entry\",index:1,isBkr:!1},this.rules[2]={name:\"lenient-cookie-pair\",lower:\"lenient-cookie-pair\",index:2,isBkr:!1},this.rules[3]={name:\"lenient-cookie-pair-invalid\",lower:\"lenient-cookie-pair-invalid\",index:3,isBkr:!1},this.rules[4]={name:\"lenient-cookie-name\",lower:\"lenient-cookie-name\",index:4,isBkr:!1},this.rules[5]={name:\"lenient-cookie-value\",lower:\"lenient-cookie-value\",index:5,isBkr:!1},this.rules[6]={name:\"lenient-quoted-value\",lower:\"lenient-quoted-value\",index:6,isBkr:!1},this.rules[7]={name:\"lenient-quoted-char\",lower:\"lenient-quoted-char\",index:7,isBkr:!1},this.rules[8]={name:\"lenient-cookie-octet\",lower:\"lenient-cookie-octet\",index:8,isBkr:!1},this.rules[9]={name:\"cookie-string\",lower:\"cookie-string\",index:9,isBkr:!1},this.rules[10]={name:\"cookie-pair\",lower:\"cookie-pair\",index:10,isBkr:!1},this.rules[11]={name:\"cookie-name\",lower:\"cookie-name\",index:11,isBkr:!1},this.rules[12]={name:\"cookie-value\",lower:\"cookie-value\",index:12,isBkr:!1},this.rules[13]={name:\"cookie-octet\",lower:\"cookie-octet\",index:13,isBkr:!1},this.rules[14]={name:\"OWS\",lower:\"ows\",index:14,isBkr:!1},this.rules[15]={name:\"token\",lower:\"token\",index:15,isBkr:!1},this.rules[16]={name:\"tchar\",lower:\"tchar\",index:16,isBkr:!1},this.rules[17]={name:\"CHAR\",lower:\"char\",index:17,isBkr:!1},this.rules[18]={name:\"CTL\",lower:\"ctl\",index:18,isBkr:!1},this.rules[19]={name:\"separators\",lower:\"separators\",index:19,isBkr:!1},this.rules[20]={name:\"SP\",lower:\"sp\",index:20,isBkr:!1},this.rules[21]={name:\"HT\",lower:\"ht\",index:21,isBkr:!1},this.rules[22]={name:\"ALPHA\",lower:\"alpha\",index:22,isBkr:!1},this.rules[23]={name:\"DIGIT\",lower:\"digit\",index:23,isBkr:!1},this.rules[24]={name:\"DQUOTE\",lower:\"dquote\",index:24,isBkr:!1},this.rules[25]={name:\"WSP\",lower:\"wsp\",index:25,isBkr:!1},this.rules[26]={name:\"HTAB\",lower:\"htab\",index:26,isBkr:!1},this.rules[27]={name:\"CRLF\",lower:\"crlf\",index:27,isBkr:!1},this.rules[28]={name:\"CR\",lower:\"cr\",index:28,isBkr:!1},this.rules[29]={name:\"LF\",lower:\"lf\",index:29,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5,6]},this.rules[0].opcodes[4]={type:7,string:[59]},this.rules[0].opcodes[5]={type:4,index:14},this.rules[0].opcodes[6]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:1,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4,5,6,7]},this.rules[2].opcodes[1]={type:4,index:14},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:7,string:[61]},this.rules[2].opcodes[5]={type:4,index:14},this.rules[2].opcodes[6]={type:4,index:5},this.rules[2].opcodes[7]={type:4,index:14},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,4]},this.rules[3].opcodes[1]={type:4,index:14},this.rules[3].opcodes[2]={type:3,min:1,max:1/0},this.rules[3].opcodes[3]={type:4,index:16},this.rules[3].opcodes[4]={type:4,index:14},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4]},this.rules[4].opcodes[2]={type:5,min:33,max:58},this.rules[4].opcodes[3]={type:6,string:[60]},this.rules[4].opcodes[4]={type:5,min:62,max:126},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,6]},this.rules[5].opcodes[1]={type:2,children:[2,3]},this.rules[5].opcodes[2]={type:4,index:6},this.rules[5].opcodes[3]={type:3,min:0,max:1},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:4,index:8},this.rules[5].opcodes[6]={type:3,min:0,max:1/0},this.rules[5].opcodes[7]={type:4,index:8},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,4]},this.rules[6].opcodes[1]={type:4,index:24},this.rules[6].opcodes[2]={type:3,min:0,max:1/0},this.rules[6].opcodes[3]={type:4,index:7},this.rules[6].opcodes[4]={type:4,index:24},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:5,min:32,max:33},this.rules[7].opcodes[2]={type:5,min:35,max:126},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:33,max:43},this.rules[8].opcodes[2]={type:5,min:45,max:58},this.rules[8].opcodes[3]={type:5,min:60,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:2,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:10},this.rules[9].opcodes[2]={type:3,min:0,max:1/0},this.rules[9].opcodes[3]={type:2,children:[4,5,6]},this.rules[9].opcodes[4]={type:7,string:[59]},this.rules[9].opcodes[5]={type:4,index:20},this.rules[9].opcodes[6]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:2,children:[1,2,3]},this.rules[10].opcodes[1]={type:4,index:11},this.rules[10].opcodes[2]={type:7,string:[61]},this.rules[10].opcodes[3]={type:4,index:12},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:4,index:15},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,6]},this.rules[12].opcodes[1]={type:2,children:[2,3,5]},this.rules[12].opcodes[2]={type:4,index:24},this.rules[12].opcodes[3]={type:3,min:0,max:1/0},this.rules[12].opcodes[4]={type:4,index:13},this.rules[12].opcodes[5]={type:4,index:24},this.rules[12].opcodes[6]={type:3,min:0,max:1/0},this.rules[12].opcodes[7]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[13].opcodes[1]={type:6,string:[33]},this.rules[13].opcodes[2]={type:5,min:35,max:43},this.rules[13].opcodes[3]={type:5,min:45,max:58},this.rules[13].opcodes[4]={type:5,min:60,max:91},this.rules[13].opcodes[5]={type:5,min:93,max:126},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:3,min:0,max:1/0},this.rules[14].opcodes[1]={type:2,children:[2,4]},this.rules[14].opcodes[2]={type:3,min:0,max:1},this.rules[14].opcodes[3]={type:4,index:27},this.rules[14].opcodes[4]={type:4,index:25},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:3,min:1,max:1/0},this.rules[15].opcodes[1]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[16].opcodes[1]={type:7,string:[33]},this.rules[16].opcodes[2]={type:7,string:[35]},this.rules[16].opcodes[3]={type:7,string:[36]},this.rules[16].opcodes[4]={type:7,string:[37]},this.rules[16].opcodes[5]={type:7,string:[38]},this.rules[16].opcodes[6]={type:7,string:[39]},this.rules[16].opcodes[7]={type:7,string:[42]},this.rules[16].opcodes[8]={type:7,string:[43]},this.rules[16].opcodes[9]={type:7,string:[45]},this.rules[16].opcodes[10]={type:7,string:[46]},this.rules[16].opcodes[11]={type:7,string:[94]},this.rules[16].opcodes[12]={type:7,string:[95]},this.rules[16].opcodes[13]={type:7,string:[96]},this.rules[16].opcodes[14]={type:7,string:[124]},this.rules[16].opcodes[15]={type:7,string:[126]},this.rules[16].opcodes[16]={type:4,index:23},this.rules[16].opcodes[17]={type:4,index:22},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:1,max:127},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2]},this.rules[18].opcodes[1]={type:5,min:0,max:31},this.rules[18].opcodes[2]={type:6,string:[127]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},this.rules[19].opcodes[1]={type:7,string:[40]},this.rules[19].opcodes[2]={type:7,string:[41]},this.rules[19].opcodes[3]={type:7,string:[60]},this.rules[19].opcodes[4]={type:7,string:[62]},this.rules[19].opcodes[5]={type:7,string:[64]},this.rules[19].opcodes[6]={type:7,string:[44]},this.rules[19].opcodes[7]={type:7,string:[59]},this.rules[19].opcodes[8]={type:7,string:[58]},this.rules[19].opcodes[9]={type:7,string:[92]},this.rules[19].opcodes[10]={type:6,string:[34]},this.rules[19].opcodes[11]={type:7,string:[47]},this.rules[19].opcodes[12]={type:7,string:[91]},this.rules[19].opcodes[13]={type:7,string:[93]},this.rules[19].opcodes[14]={type:7,string:[63]},this.rules[19].opcodes[15]={type:7,string:[61]},this.rules[19].opcodes[16]={type:7,string:[123]},this.rules[19].opcodes[17]={type:7,string:[125]},this.rules[19].opcodes[18]={type:4,index:20},this.rules[19].opcodes[19]={type:4,index:21},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:6,string:[32]},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:6,string:[9]},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:1,children:[1,2]},this.rules[22].opcodes[1]={type:5,min:65,max:90},this.rules[22].opcodes[2]={type:5,min:97,max:122},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:5,min:48,max:57},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:6,string:[34]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:1,children:[1,2]},this.rules[25].opcodes[1]={type:4,index:20},this.rules[25].opcodes[2]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:6,string:[9]},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:4,index:28},this.rules[27].opcodes[2]={type:4,index:29},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:6,string:[13]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:6,string:[10]},this.toString=function toString(){let s=\"\";return s+=\"; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\n\",s+='lenient-cookie-string        = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\\n',s+=\"lenient-cookie-entry         = lenient-cookie-pair / lenient-cookie-pair-invalid\\n\",s+='lenient-cookie-pair          = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\\n',s+='lenient-cookie-pair-invalid  = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\\n',s+='lenient-cookie-name          = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\\n',s+=\"lenient-cookie-value         = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\\n\",s+=\"lenient-quoted-value         = DQUOTE *( lenient-quoted-char ) DQUOTE\\n\",s+=\"lenient-quoted-char          = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\\n\",s+=\"lenient-cookie-octet         = %x21-2B / %x2D-3A / %x3C-7E\\n\",s+=\"                             ; Allow all printable characters except CTLs, semicolon and SP\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\n\",s+='cookie-string     = cookie-pair *( \";\" SP cookie-pair )\\n',s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\\n\",s+=\"; https://www.rfc-editor.org/errata/eid5518\\n\",s+='cookie-pair       = cookie-name \"=\" cookie-value\\n',s+=\"cookie-name       = token\\n\",s+=\"cookie-value      = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\\n\",s+=\"                  ; https://www.rfc-editor.org/errata/eid8242\\n\",s+=\"cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\\n\",s+=\"                       ; US-ASCII characters excluding CTLs,\\n\",s+=\"                       ; whitespace, DQUOTE, comma, semicolon,\\n\",s+=\"                       ; and backslash\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\\n\",s+='OWS            = *( [ CRLF ] WSP ) ; \"optional\" whitespace\\n',s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\\n\",s+=\"token          = 1*(tchar)\\n\",s+='tchar          = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"\\'\" / \"*\"\\n',s+='                 / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\\n',s+=\"                 / DIGIT / ALPHA\\n\",s+=\"                 ; any VCHAR, except delimiters\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\\n\",s+=\"CHAR           = %x01-7F ; any US-ASCII character (octets 0 - 127)\\n\",s+=\"CTL            = %x00-1F / %x7F ; any US-ASCII control character\\n\",s+='separators     = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\\n',s+=\"SP             = %x20 ; US-ASCII SP, space (32)\\n\",s+=\"HT             = %x09 ; US-ASCII HT, horizontal-tab (9)\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\n\",s+=\"ALPHA          =  %x41-5A / %x61-7A ; A-Z / a-z\\n\",s+=\"DIGIT          =  %x30-39 ; 0-9\\n\",s+='DQUOTE         =  %x22 ; \" (Double Quote)\\n',s+=\"WSP            =  SP / HTAB ; white space\\n\",s+=\"HTAB           =  %x09 ; horizontal tab\\n\",s+=\"CRLF           =  CR LF ; Internet standard newline\\n\",s+=\"CR             =  %x0D ; carriage return\\n\",s+=\"LF             =  %x0A ; linefeed\\n\",'; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\nlenient-cookie-string        = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\\nlenient-cookie-entry         = lenient-cookie-pair / lenient-cookie-pair-invalid\\nlenient-cookie-pair          = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\\nlenient-cookie-pair-invalid  = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\\nlenient-cookie-name          = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\\nlenient-cookie-value         = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\\nlenient-quoted-value         = DQUOTE *( lenient-quoted-char ) DQUOTE\\nlenient-quoted-char          = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\\nlenient-cookie-octet         = %x21-2B / %x2D-3A / %x3C-7E\\n                             ; Allow all printable characters except CTLs, semicolon and SP\\n\\n; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\ncookie-string     = cookie-pair *( \";\" SP cookie-pair )\\n\\n; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\\n; https://www.rfc-editor.org/errata/eid5518\\ncookie-pair       = cookie-name \"=\" cookie-value\\ncookie-name       = token\\ncookie-value      = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\\n                  ; https://www.rfc-editor.org/errata/eid8242\\ncookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\\n                       ; US-ASCII characters excluding CTLs,\\n                       ; whitespace, DQUOTE, comma, semicolon,\\n                       ; and backslash\\n\\n; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\\nOWS            = *( [ CRLF ] WSP ) ; \"optional\" whitespace\\n\\n; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\\ntoken          = 1*(tchar)\\ntchar          = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"\\'\" / \"*\"\\n                 / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\\n                 / DIGIT / ALPHA\\n                 ; any VCHAR, except delimiters\\n\\n; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\\nCHAR           = %x01-7F ; any US-ASCII character (octets 0 - 127)\\nCTL            = %x00-1F / %x7F ; any US-ASCII control character\\nseparators     = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\\nSP             = %x20 ; US-ASCII SP, space (32)\\nHT             = %x09 ; US-ASCII HT, horizontal-tab (9)\\n\\n; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\nALPHA          =  %x41-5A / %x61-7A ; A-Z / a-z\\nDIGIT          =  %x30-39 ; 0-9\\nDQUOTE         =  %x22 ; \" (Double Quote)\\nWSP            =  SP / HTAB ; white space\\nHTAB           =  %x09 ; horizontal tab\\nCRLF           =  CR LF ; Internet standard newline\\nCR             =  %x0D ; carriage return\\nLF             =  %x0A ; linefeed\\n'}}new grammar_grammar;const utils_percentEncodeChar=s=>{if(\"string\"!=typeof s||1!==[...s].length)throw new TypeError(\"Input must be a single character string.\");const o=s.codePointAt(0);return o<=127?`%${o.toString(16).toUpperCase().padStart(2,\"0\")}`:encodeURIComponent(s)},utils_isQuoted=s=>s.length>=2&&s.startsWith('\"')&&s.endsWith('\"'),utils_unquote=s=>utils_isQuoted(s)?s.slice(1,-1):s,utils_quote=s=>`\"${s}\"`,utils_identity=s=>s,$x=new yp,qx=new grammar_grammar,test_cookie_value=(s,{strict:o=!0,quoted:i=null}={})=>{try{const a=o?\"cookie-value\":\"lenient-cookie-value\",u=$x.parse(qx,a,s);return\"boolean\"==typeof i?u.success&&i===utils_isQuoted(s):u.success}catch{return!1}},base64_browser=s=>{const o=(new TextEncoder).encode(s).reduce(((s,o)=>s+String.fromCharCode(o)),\"\");return btoa(o)},cookie_value_strict_base64=(s,o=base64_browser)=>{const i=String(s);if(test_cookie_value(i))return i;const a=utils_isQuoted(i),u=o(a?utils_unquote(i):i);return a?utils_quote(u):u},base64url_browser=s=>(s=>s.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=+$/g,\"\"))(base64_browser(s)),cookie_value_strict_base64url=s=>cookie_value_strict_base64(s,base64url_browser),Vx=new yp,Ux=new grammar_grammar,test_cookie_name=(s,{strict:o=!0}={})=>{try{const i=o?\"cookie-name\":\"lenient-cookie-name\";return Vx.parse(Ux,i,s).success}catch{return!1}},cookie_name_strict=s=>{if(!test_cookie_name(s))throw new TypeError(`Invalid cookie name: ${s}`)},cookie_value_strict=s=>{if(!test_cookie_value(s))throw new TypeError(`Invalid cookie value: ${s}`)},zx={encoders:{name:utils_identity,value:cookie_value_strict_base64url},validators:{name:cookie_name_strict,value:cookie_value_strict}},set_cookie_serialize=(s,o,i={})=>{const a={...zx,...i,encoders:{...zx.encoders,...i.encoders},validators:{...zx.validators,...i.validators}},u=a.encoders.name(s),_=a.encoders.value(o);return a.validators.name(u),a.validators.value(_),`${u}=${_}`},cookie_serialize=(s,o={})=>(Array.isArray(s)?s:\"object\"==typeof s&&null!==s?Object.entries(s):[]).map((([s,i])=>set_cookie_serialize(s,i,o))).join(\"; \"),Wx=new yp,Jx=new grammar_grammar,cookie_value_strict_percent=s=>{const o=String(s);if(test_cookie_value(o))return o;const i=utils_isQuoted(o),a=i?utils_unquote(o):o;let u=\"\";for(const s of a)u+=Wx.parse(Jx,\"cookie-octet\",s).success?s:utils_percentEncodeChar(s);return i?utils_quote(u):u},Hx=(new yp,new grammar_grammar,s=>{if(!test_cookie_name(s,{strict:!1}))throw new TypeError(`Invalid cookie name: ${s}`)}),valuePercentEncoder=s=>cookie_value_strict_percent(s).replace(/[=&]/gu,(s=>\"=\"===s?\"%3D\":\"%26\")),helpers_cookie_serialize=(s,o={})=>cookie_serialize(s,ep({encoders:{name:utils_identity,value:valuePercentEncoder},validators:{name:Hx,value:cookie_value_strict}},o));function parameter_builders_path({req:s,value:o,parameter:i,baseURL:a}){const{name:u,style:_,explode:w,content:x}=i;if(void 0===o)return;const C=s.url.replace(a,\"\");let j;if(x){const s=Object.keys(x)[0];j=es_resolve(C,{[u]:o},{encoder:o=>encodeCharacters(serialize(o,s))})}else j=es_resolve(C,{[u]:o},{encoder:s=>stylize({key:i.name,value:s,style:_||\"simple\",explode:null!=w&&w,escape:\"reserved\"})});s.url=a+j}function query({req:s,value:o,parameter:i}){if(s.query=s.query||{},void 0!==o&&i.content){const a=serialize(o,Object.keys(i.content)[0]);if(a)s.query[i.name]=a;else if(i.allowEmptyValue){const o=i.name;s.query[o]=s.query[o]||{},s.query[o].allowEmptyValue=!0}}else if(!1===o&&(o=\"false\"),0===o&&(o=\"0\"),o){const{style:a,explode:u,allowReserved:_}=i;s.query[i.name]={value:o,serializationOption:{style:a,explode:u,allowReserved:_}}}else if(i.allowEmptyValue&&void 0!==o){const o=i.name;s.query[o]=s.query[o]||{},s.query[o].allowEmptyValue=!0}}const Kx=[\"accept\",\"authorization\",\"content-type\"];function parameter_builders_header({req:s,parameter:o,value:i}){if(s.headers=s.headers||{},!(Kx.indexOf(o.name.toLowerCase())>-1))if(void 0!==i&&o.content){const a=Object.keys(o.content)[0];s.headers[o.name]=serialize(i,a)}else void 0===i||Array.isArray(i)&&0===i.length||(s.headers[o.name]=stylize({key:o.name,value:i,style:o.style||\"simple\",explode:void 0!==o.explode&&o.explode,escape:!1}))}function cookie({req:s,parameter:o,value:i}){const{name:a}=o;if(s.headers=s.headers||{},void 0!==i&&o.content){const u=serialize(i,Object.keys(o.content)[0]);s.headers.Cookie=helpers_cookie_serialize({[a]:u})}else if(void 0!==i&&(!Array.isArray(i)||0!==i.length)){var u;const _=stylize({key:o.name,value:i,escape:!1,style:o.style||\"form\",explode:null!==(u=o.explode)&&void 0!==u&&u}),w=Array.isArray(i)&&o.explode?`${a}=${_}`:_;s.headers.Cookie=helpers_cookie_serialize({[a]:w})}}const Gx=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:window,{btoa:Yx}=Gx,Xx=Yx;function buildRequest(s,o){const{operation:i,requestBody:a,securities:u,spec:_,attachContentTypeForEmptyPayload:w}=s;let{requestContentType:x}=s;o=function applySecurities({request:s,securities:o={},operation:i={},spec:a}){var u;const _={...s},{authorized:w={}}=o,x=i.security||a.security||[],C=w&&!!Object.keys(w).length,j=(null==a||null===(u=a.components)||void 0===u?void 0:u.securitySchemes)||{};if(_.headers=_.headers||{},_.query=_.query||{},!Object.keys(o).length||!C||!x||Array.isArray(i.security)&&!i.security.length)return s;return x.forEach((s=>{Object.keys(s).forEach((s=>{const o=w[s],i=j[s];if(!o)return;const a=o.value||o,{type:u}=i;if(o)if(\"apiKey\"===u)\"query\"===i.in&&(_.query[i.name]=a),\"header\"===i.in&&(_.headers[i.name]=a),\"cookie\"===i.in&&(_.cookies[i.name]=a);else if(\"http\"===u){if(/^basic$/i.test(i.scheme)){const s=a.username||\"\",o=a.password||\"\",i=Xx(`${s}:${o}`);_.headers.Authorization=`Basic ${i}`}/^bearer$/i.test(i.scheme)&&(_.headers.Authorization=`Bearer ${a}`)}else if(\"oauth2\"===u||\"openIdConnect\"===u){const s=o.token||{},a=s[i[\"x-tokenName\"]||\"access_token\"];let u=s.token_type;u&&\"bearer\"!==u.toLowerCase()||(u=\"Bearer\"),_.headers.Authorization=`${u} ${a}`}}))})),_}({request:o,securities:u,operation:i,spec:_});const C=i.requestBody||{},j=Object.keys(C.content||{}),L=x&&j.indexOf(x)>-1;if(a||w){if(x&&L)o.headers[\"Content-Type\"]=x;else if(!x){const s=j[0];s&&(o.headers[\"Content-Type\"]=s,x=s)}}else x&&L&&(o.headers[\"Content-Type\"]=x);if(!s.responseContentType&&i.responses){const s=Object.entries(i.responses).filter((([s,o])=>{const i=parseInt(s,10);return i>=200&&i<300&&fu(o.content)})).reduce(((s,[,o])=>s.concat(Object.keys(o.content))),[]);s.length>0&&(o.headers.accept=s.join(\", \"))}if(a)if(x){if(j.indexOf(x)>-1)if(\"application/x-www-form-urlencoded\"===x||\"multipart/form-data\"===x)if(\"object\"==typeof a){var B,$;const s=null!==(B=null===($=C.content[x])||void 0===$?void 0:$.encoding)&&void 0!==B?B:{};o.form={},Object.keys(a).forEach((i=>{let u;try{u=JSON.parse(a[i])}catch{u=a[i]}o.form[i]={value:u,encoding:s[i]||{}}}))}else if(\"string\"==typeof a){var V,U;const s=null!==(V=null===(U=C.content[x])||void 0===U?void 0:U.encoding)&&void 0!==V?V:{};try{o.form={};const i=JSON.parse(a);Object.entries(i).forEach((([i,a])=>{o.form[i]={value:a,encoding:s[i]||{}}}))}catch{o.form=a}}else o.form=a;else o.body=a}else o.body=a;return o}function build_request_buildRequest(s,o){const{spec:i,operation:a,securities:u,requestContentType:_,responseContentType:w,attachContentTypeForEmptyPayload:x}=s;if(o=function build_request_applySecurities({request:s,securities:o={},operation:i={},spec:a}){const u={...s},{authorized:_={},specSecurity:w=[]}=o,x=i.security||w,C=_&&!!Object.keys(_).length,j=a.securityDefinitions;if(u.headers=u.headers||{},u.query=u.query||{},!Object.keys(o).length||!C||!x||Array.isArray(i.security)&&!i.security.length)return s;return x.forEach((s=>{Object.keys(s).forEach((s=>{const o=_[s];if(!o)return;const{token:i}=o,a=o.value||o,w=j[s],{type:x}=w,C=w[\"x-tokenName\"]||\"access_token\",L=i&&i[C];let B=i&&i.token_type;if(o)if(\"apiKey\"===x){const s=\"query\"===w.in?\"query\":\"headers\";u[s]=u[s]||{},u[s][w.name]=a}else if(\"basic\"===x)if(a.header)u.headers.authorization=a.header;else{const s=a.username||\"\",o=a.password||\"\";a.base64=Xx(`${s}:${o}`),u.headers.authorization=`Basic ${a.base64}`}else\"oauth2\"===x&&L&&(B=B&&\"bearer\"!==B.toLowerCase()?B:\"Bearer\",u.headers.authorization=`${B} ${L}`)}))})),u}({request:o,securities:u,operation:a,spec:i}),o.body||o.form||x)_?o.headers[\"Content-Type\"]=_:Array.isArray(a.consumes)?[o.headers[\"Content-Type\"]]=a.consumes:Array.isArray(i.consumes)?[o.headers[\"Content-Type\"]]=i.consumes:a.parameters&&a.parameters.filter((s=>\"file\"===s.type)).length?o.headers[\"Content-Type\"]=\"multipart/form-data\":a.parameters&&a.parameters.filter((s=>\"formData\"===s.in)).length&&(o.headers[\"Content-Type\"]=\"application/x-www-form-urlencoded\");else if(_){const s=a.parameters&&a.parameters.filter((s=>\"body\"===s.in)).length>0,i=a.parameters&&a.parameters.filter((s=>\"formData\"===s.in)).length>0;(s||i)&&(o.headers[\"Content-Type\"]=_)}return!w&&Array.isArray(a.produces)&&a.produces.length>0&&(o.headers.accept=a.produces.join(\", \")),o}function idFromPathMethodLegacy(s,o){return`${o.toLowerCase()}-${s}`}const arrayOrEmpty=s=>Array.isArray(s)?s:[],findObjectOrArraySchema=(s,{recurse:o=!0,depth:i=1}={})=>{if(fu(s)){if(\"object\"===s.type||\"array\"===s.type||Array.isArray(s.type)&&(s.type.includes(\"object\")||s.type.includes(\"array\")))return s;if(!(i>Bl)&&o){const a=Array.isArray(s.oneOf)?s.oneOf.find((s=>findObjectOrArraySchema(s,{recurse:o,depth:i+1}))):void 0;if(a)return a;const u=Array.isArray(s.anyOf)?s.anyOf.find((s=>findObjectOrArraySchema(s,{recurse:o,depth:i+1}))):void 0;if(u)return u}}},parseJsonObjectOrArray=({value:s,silentFail:o=!1})=>{try{const i=JSON.parse(s);if(fu(i)||Array.isArray(i))return i;if(!o)throw new Error(\"Expected JSON serialized object or array\")}catch{if(!o)throw new Error(\"Could not parse parameter value string as JSON Object or JSON Array\")}return s},parseURIReference=s=>{try{return new URL(s)}catch{const o=new URL(s,Ll),i=String(s).startsWith(\"/\")?o.pathname:o.pathname.substring(1);return{hash:o.hash,host:\"\",hostname:\"\",href:\"\",origin:\"\",password:\"\",pathname:i,port:\"\",protocol:\"\",search:o.search,searchParams:o.searchParams}}};class OperationNotFoundError extends Go{}const Qx={buildRequest:execute_buildRequest};function execute_execute({http:s,fetch:o,spec:i,operationId:a,pathName:u,method:_,parameters:w,securities:x,...C}){const j=s||o||http_http;u&&_&&!a&&(a=idFromPathMethodLegacy(u,_));const L=Qx.buildRequest({spec:i,operationId:a,parameters:w,securities:x,http:j,...C});return L.body&&(fu(L.body)||Array.isArray(L.body))&&(L.body=JSON.stringify(L.body)),j(L)}function execute_buildRequest(s){const{spec:o,operationId:i,responseContentType:a,scheme:u,requestInterceptor:_,responseInterceptor:w,contextUrl:x,userFetch:C,server:j,serverVariables:L,http:B,signal:$,serverVariableEncoder:V}=s;let{parameters:U,parameterBuilders:z,baseURL:Y}=s;const Z=isOpenAPI3(o);z||(z=Z?be:Bx);let ee={url:\"\",credentials:B&&B.withCredentials?\"include\":\"same-origin\",headers:{},cookies:{}};$&&(ee.signal=$),_&&(ee.requestInterceptor=_),w&&(ee.responseInterceptor=w),C&&(ee.userFetch=C);const ie=function getOperationRaw(s,o){return s&&s.paths?function findOperation(s,o){return function eachOperation(s,o,i){if(!s||\"object\"!=typeof s||!s.paths||\"object\"!=typeof s.paths)return null;const{paths:a}=s;for(const u in a)for(const _ in a[u]){if(\"PARAMETERS\"===_.toUpperCase())continue;const w=a[u][_];if(!w||\"object\"!=typeof w)continue;const x={spec:s,pathName:u,method:_.toUpperCase(),operation:w},C=o(x);if(i&&C)return x}}(s,o,!0)||null}(s,(({pathName:s,method:i,operation:a})=>{if(!a||\"object\"!=typeof a)return!1;const u=a.operationId;return[opId(a,s,i),idFromPathMethodLegacy(s,i),u].some((s=>s&&s===o))})):null}(o,i);if(!ie)throw new OperationNotFoundError(`Operation ${i} not found`);const{operation:ae={},method:ce,pathName:le}=ie;if(Y=null!=Y?Y:function baseUrl(s){const o=isOpenAPI3(s.spec);return o?function oas3BaseUrl({spec:s,pathName:o,method:i,server:a,contextUrl:u,serverVariables:_={},serverVariableEncoder:w}){var x,C;let j,L=[],B=\"\";const $=null==s||null===(x=s.paths)||void 0===x||null===(x=x[o])||void 0===x||null===(x=x[(i||\"\").toLowerCase()])||void 0===x?void 0:x.servers,V=null==s||null===(C=s.paths)||void 0===C||null===(C=C[o])||void 0===C?void 0:C.servers,U=null==s?void 0:s.servers;L=isNonEmptyServerList($)?$:isNonEmptyServerList(V)?V:isNonEmptyServerList(U)?U:[Fl],a&&(j=L.find((s=>s.url===a)),j&&(B=a));B||([j]=L,B=j.url);if(openapi_server_url_templating_es_test(B,{strict:!0})){const s=Object.entries({...j.variables}).reduce(((s,[o,i])=>(s[o]=i.default,s)),{});B=es_substitute(B,{...s,..._},{encoder:\"function\"==typeof w?w:vw})}return function buildOas3UrlWithContext(s=\"\",o=\"\"){const i=parseURIReference(s&&o?resolve(o,s):s),a=parseURIReference(o),u=stripNonAlpha(i.protocol)||stripNonAlpha(a.protocol),_=i.host||a.host,w=i.pathname;let x;x=u&&_?`${u}://${_+w}`:w;return\"/\"===x[x.length-1]?x.slice(0,-1):x}(B,u)}(s):function swagger2BaseUrl({spec:s,scheme:o,contextUrl:i=\"\"}){const a=parseURIReference(i),u=Array.isArray(s.schemes)?s.schemes[0]:null,_=o||u||stripNonAlpha(a.protocol)||\"http\",w=s.host||a.host||\"\",x=s.basePath||\"\";let C;C=_&&w?`${_}://${w+x}`:x;return\"/\"===C[C.length-1]?C.slice(0,-1):C}(s)}({spec:o,scheme:u,contextUrl:x,server:j,serverVariables:L,pathName:le,method:ce,serverVariableEncoder:V}),ee.url+=Y,!i)return delete ee.cookies,ee;ee.url+=le,ee.method=`${ce}`.toUpperCase(),U=U||{};const pe=o.paths[le]||{};a&&(ee.headers.accept=a);const de=(s=>{const o={};s.forEach((s=>{o[s.in]||(o[s.in]={}),o[s.in][s.name]=s}));const i=[];return Object.keys(o).forEach((s=>{Object.keys(o[s]).forEach((a=>{i.push(o[s][a])}))})),i})([].concat(arrayOrEmpty(ae.parameters)).concat(arrayOrEmpty(pe.parameters)));de.forEach((s=>{const i=z[s.in];let a;if(\"body\"===s.in&&s.schema&&s.schema.properties&&(a=U),a=s&&s.name&&U[s.name],void 0===a?a=s&&s.name&&U[`${s.in}.${s.name}`]:((s,o)=>o.filter((o=>o.name===s)))(s.name,de).length>1&&console.warn(`Parameter '${s.name}' is ambiguous because the defined spec has more than one parameter with the name: '${s.name}' and the passed-in parameter values did not define an 'in' value.`),null!==a){if(void 0!==s.default&&void 0===a&&(a=s.default),void 0===a&&s.required&&!s.allowEmptyValue)throw new Error(`Required parameter ${s.name} is not provided`);Z&&\"string\"==typeof a&&(id(\"type\",s.schema)&&\"string\"==typeof s.schema.type&&findObjectOrArraySchema(s.schema,{recurse:!1})?a=parseJsonObjectOrArray({value:a,silentFail:!1}):(id(\"type\",s.schema)&&Array.isArray(s.schema.type)&&findObjectOrArraySchema(s.schema,{recurse:!1})||!id(\"type\",s.schema)&&findObjectOrArraySchema(s.schema,{recurse:!0}))&&(a=parseJsonObjectOrArray({value:a,silentFail:!0}))),i&&i({req:ee,parameter:s,value:a,operation:ae,spec:o,baseURL:Y})}}));const fe={...s,operation:ae};if(ee=Z?buildRequest(fe,ee):build_request_buildRequest(fe,ee),ee.cookies&&Object.keys(ee.cookies).length>0){const s=helpers_cookie_serialize(ee.cookies);Nd(ee.headers.Cookie)?ee.headers.Cookie+=`; ${s}`:ee.headers.Cookie=s}return ee.cookies&&delete ee.cookies,serializeRequest(ee)}const stripNonAlpha=s=>s?s.replace(/\\W/g,\"\"):null;const isNonEmptyServerList=s=>Array.isArray(s)&&s.length>0;const makeResolveSubtree=s=>async(o,i,a={})=>(async(s,o,i={})=>{const{returnEntireTree:a,baseDoc:u,requestInterceptor:_,responseInterceptor:w,parameterMacro:x,modelPropertyMacro:C,useCircularStructures:j,strategies:L}=i,B={spec:s,pathDiscriminator:o,baseDoc:u,requestInterceptor:_,responseInterceptor:w,parameterMacro:x,modelPropertyMacro:C,useCircularStructures:j,strategies:L},$=L.find((o=>o.match(s))).normalize(s),V=await Mx({spec:$,...B,allowMetaPatches:!0,skipNormalization:!isOpenAPI31(s)});return!a&&Array.isArray(o)&&o.length&&(V.spec=o.reduce(((s,o)=>null==s?void 0:s[o]),V.spec)||null),V})(o,i,{...s,...a}),Zx=(makeResolveSubtree({strategies:[_u,vu,gu]}),(s,o)=>(...i)=>{s(...i);const a=o.getConfigs().withCredentials;o.fn.fetch.withCredentials=a});function swagger_client({configs:s,getConfigs:o}){return{fn:{fetch:(i=http_http,a=s.preFetch,u=s.postFetch,u=u||(s=>s),a=a||(s=>s),s=>(\"string\"==typeof s&&(s={url:s}),s=serializeRequest(s),s=a(s),u(i(s)))),buildRequest:execute_buildRequest,execute:execute_execute,resolve:makeResolve({strategies:[Nx,_u,vu,gu]}),resolveSubtree:async(s,i,a={})=>{const u=o(),_={modelPropertyMacro:u.modelPropertyMacro,parameterMacro:u.parameterMacro,requestInterceptor:u.requestInterceptor,responseInterceptor:u.responseInterceptor,strategies:[Nx,_u,vu,gu]};return makeResolveSubtree(_)(s,i,a)},serializeRes:serializeResponse,opId},statePlugins:{configs:{wrapActions:{loaded:Zx}}}};var i,a,u}function util(){return{fn:{shallowEqualKeys,sanitizeUrl}}}var tk=__webpack_require__(40961),rk=(__webpack_require__(78418),Re.version.startsWith(\"19\")),nk=Symbol.for(rk?\"react.transitional.element\":\"react.element\"),sk=Symbol.for(\"react.portal\"),ok=Symbol.for(\"react.fragment\"),lk=Symbol.for(\"react.strict_mode\"),uk=Symbol.for(\"react.profiler\"),pk=Symbol.for(\"react.consumer\"),fk=Symbol.for(\"react.context\"),mk=Symbol.for(\"react.forward_ref\"),yk=Symbol.for(\"react.suspense\"),vk=Symbol.for(\"react.suspense_list\"),_k=Symbol.for(\"react.memo\"),wk=Symbol.for(\"react.lazy\"),xk=mk,Ak=_k;function typeOf(s){if(\"object\"==typeof s&&null!==s){const{$$typeof:o}=s;switch(o){case nk:switch(s=s.type){case ok:case uk:case lk:case yk:case vk:return s;default:switch(s=s&&s.$$typeof){case fk:case mk:case wk:case _k:case pk:return s;default:return o}}case sk:return o}}}function pureFinalPropsSelectorFactory(s,o,i,a,{areStatesEqual:u,areOwnPropsEqual:_,areStatePropsEqual:w}){let x,C,j,L,B,$=!1;function handleSubsequentCalls($,V){const U=!_(V,C),z=!u($,x,V,C);return x=$,C=V,U&&z?function handleNewPropsAndNewState(){return j=s(x,C),o.dependsOnOwnProps&&(L=o(a,C)),B=i(j,L,C),B}():U?function handleNewProps(){return s.dependsOnOwnProps&&(j=s(x,C)),o.dependsOnOwnProps&&(L=o(a,C)),B=i(j,L,C),B}():z?function handleNewState(){const o=s(x,C),a=!w(o,j);return j=o,a&&(B=i(j,L,C)),B}():B}return function pureFinalPropsSelector(u,_){return $?handleSubsequentCalls(u,_):function handleFirstCall(u,_){return x=u,C=_,j=s(x,C),L=o(a,C),B=i(j,L,C),$=!0,B}(u,_)}}function wrapMapToPropsConstant(s){return function initConstantSelector(o){const i=s(o);function constantSelector(){return i}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(s){return s.dependsOnOwnProps?Boolean(s.dependsOnOwnProps):1!==s.length}function wrapMapToPropsFunc(s,o){return function initProxySelector(o,{displayName:i}){const a=function mapToPropsProxy(s,o){return a.dependsOnOwnProps?a.mapToProps(s,o):a.mapToProps(s,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function detectFactoryAndVerify(o,i){a.mapToProps=s,a.dependsOnOwnProps=getDependsOnOwnProps(s);let u=a(o,i);return\"function\"==typeof u&&(a.mapToProps=u,a.dependsOnOwnProps=getDependsOnOwnProps(u),u=a(o,i)),u},a}}function createInvalidArgFactory(s,o){return(i,a)=>{throw new Error(`Invalid value of type ${typeof s} for ${o} argument when connecting component ${a.wrappedComponentName}.`)}}function defaultMergeProps(s,o,i){return{...i,...s,...o}}function defaultNoopBatch(s){s()}var Bk={notify(){},get:()=>[]};function createSubscription(s,o){let i,a=Bk,u=0,_=!1;function handleChangeWrapper(){w.onStateChange&&w.onStateChange()}function trySubscribe(){u++,i||(i=o?o.addNestedSub(handleChangeWrapper):s.subscribe(handleChangeWrapper),a=function createListenerCollection(){let s=null,o=null;return{clear(){s=null,o=null},notify(){defaultNoopBatch((()=>{let o=s;for(;o;)o.callback(),o=o.next}))},get(){const o=[];let i=s;for(;i;)o.push(i),i=i.next;return o},subscribe(i){let a=!0;const u=o={callback:i,next:null,prev:o};return u.prev?u.prev.next=u:s=u,function unsubscribe(){a&&null!==s&&(a=!1,u.next?u.next.prev=u.prev:o=u.prev,u.prev?u.prev.next=u.next:s=u.next)}}}}())}function tryUnsubscribe(){u--,i&&0===u&&(i(),i=void 0,a.clear(),a=Bk)}const w={addNestedSub:function addNestedSub(s){trySubscribe();const o=a.subscribe(s);let i=!1;return()=>{i||(i=!0,o(),tryUnsubscribe())}},notifyNestedSubs:function notifyNestedSubs(){a.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return _},trySubscribe:function trySubscribeSelf(){_||(_=!0,trySubscribe())},tryUnsubscribe:function tryUnsubscribeSelf(){_&&(_=!1,tryUnsubscribe())},getListeners:()=>a};return w}var qk=(()=>!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Vk=(()=>\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product)(),zk=(()=>qk||Vk?Re.useLayoutEffect:Re.useEffect)();function is(s,o){return s===o?0!==s||0!==o||1/s==1/o:s!=s&&o!=o}function shallowEqual(s,o){if(is(s,o))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof o||null===o)return!1;const i=Object.keys(s),a=Object.keys(o);if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++)if(!Object.prototype.hasOwnProperty.call(o,i[a])||!is(s[i[a]],o[i[a]]))return!1;return!0}var eO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nO={[xk]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Ak]:rO};function getStatics(s){return function isMemo(s){return typeOf(s)===_k}(s)?rO:nO[s.$$typeof]||eO}var sO=Object.defineProperty,oO=Object.getOwnPropertyNames,iO=Object.getOwnPropertySymbols,aO=Object.getOwnPropertyDescriptor,cO=Object.getPrototypeOf,lO=Object.prototype;function hoistNonReactStatics(s,o){if(\"string\"!=typeof o){if(lO){const i=cO(o);i&&i!==lO&&hoistNonReactStatics(s,i)}let i=oO(o);iO&&(i=i.concat(iO(o)));const a=getStatics(s),u=getStatics(o);for(let _=0;_<i.length;++_){const w=i[_];if(!(tO[w]||u&&u[w]||a&&a[w])){const i=aO(o,w);try{sO(s,w,i)}catch(s){}}}}return s}var uO=Symbol.for(\"react-redux-context\"),pO=\"undefined\"!=typeof globalThis?globalThis:{};function getContext(){if(!Re.createContext)return{};const s=pO[uO]??=new Map;let o=s.get(Re.createContext);return o||(o=Re.createContext(null),s.set(Re.createContext,o)),o}var hO=getContext(),dO=[null,null];function captureWrapperProps(s,o,i,a,u,_){s.current=a,i.current=!1,u.current&&(u.current=null,_())}function strictEqual(s,o){return s===o}var fO=function connect(s,o,i,{pure:a,areStatesEqual:u=strictEqual,areOwnPropsEqual:_=shallowEqual,areStatePropsEqual:w=shallowEqual,areMergedPropsEqual:x=shallowEqual,forwardRef:C=!1,context:j=hO}={}){const L=j,B=function mapStateToPropsFactory(s){return s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapStateToProps\"):wrapMapToPropsConstant((()=>({})))}(s),$=function mapDispatchToPropsFactory(s){return s&&\"object\"==typeof s?wrapMapToPropsConstant((o=>function react_redux_bindActionCreators(s,o){const i={};for(const a in s){const u=s[a];\"function\"==typeof u&&(i[a]=(...s)=>o(u(...s)))}return i}(s,o))):s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapDispatchToProps\"):wrapMapToPropsConstant((s=>({dispatch:s})))}(o),V=function mergePropsFactory(s){return s?\"function\"==typeof s?function wrapMergePropsFunc(s){return function initMergePropsProxy(o,{displayName:i,areMergedPropsEqual:a}){let u,_=!1;return function mergePropsProxy(o,i,w){const x=s(o,i,w);return _?a(x,u)||(u=x):(_=!0,u=x),u}}}(s):createInvalidArgFactory(s,\"mergeProps\"):()=>defaultMergeProps}(i),U=Boolean(s);return s=>{const o=s.displayName||s.name||\"Component\",i=`Connect(${o})`,a={shouldHandleStateChanges:U,displayName:i,wrappedComponentName:o,WrappedComponent:s,initMapStateToProps:B,initMapDispatchToProps:$,initMergeProps:V,areStatesEqual:u,areStatePropsEqual:w,areOwnPropsEqual:_,areMergedPropsEqual:x};function ConnectFunction(o){const[i,u,_]=Re.useMemo((()=>{const{reactReduxForwardedRef:s,...i}=o;return[o.context,s,i]}),[o]),w=Re.useMemo((()=>L),[i,L]),x=Re.useContext(w),C=Boolean(o.store)&&Boolean(o.store.getState)&&Boolean(o.store.dispatch),j=Boolean(x)&&Boolean(x.store);const B=C?o.store:x.store,$=j?x.getServerState:B.getState,V=Re.useMemo((()=>function finalPropsSelectorFactory(s,{initMapStateToProps:o,initMapDispatchToProps:i,initMergeProps:a,...u}){return pureFinalPropsSelectorFactory(o(s,u),i(s,u),a(s,u),s,u)}(B.dispatch,a)),[B]),[z,Y]=Re.useMemo((()=>{if(!U)return dO;const s=createSubscription(B,C?void 0:x.subscription),o=s.notifyNestedSubs.bind(s);return[s,o]}),[B,C,x]),Z=Re.useMemo((()=>C?x:{...x,subscription:z}),[C,x,z]),ee=Re.useRef(void 0),ie=Re.useRef(_),ae=Re.useRef(void 0),ce=Re.useRef(!1),le=Re.useRef(!1),pe=Re.useRef(void 0);zk((()=>(le.current=!0,()=>{le.current=!1})),[]);const de=Re.useMemo((()=>()=>ae.current&&_===ie.current?ae.current:V(B.getState(),_)),[B,_]),fe=Re.useMemo((()=>s=>z?function subscribeUpdates(s,o,i,a,u,_,w,x,C,j,L){if(!s)return()=>{};let B=!1,$=null;const checkForUpdates=()=>{if(B||!x.current)return;const s=o.getState();let i,V;try{i=a(s,u.current)}catch(s){V=s,$=s}V||($=null),i===_.current?w.current||j():(_.current=i,C.current=i,w.current=!0,L())};return i.onStateChange=checkForUpdates,i.trySubscribe(),checkForUpdates(),()=>{if(B=!0,i.tryUnsubscribe(),i.onStateChange=null,$)throw $}}(U,B,z,V,ie,ee,ce,le,ae,Y,s):()=>{}),[z]);let ye;!function useIsomorphicLayoutEffectWithArgs(s,o,i){zk((()=>s(...o)),i)}(captureWrapperProps,[ie,ee,ce,_,ae,Y]);try{ye=Re.useSyncExternalStore(fe,de,$?()=>V($(),_):de)}catch(s){throw pe.current&&(s.message+=`\\nThe error may be correlated with this previous error:\\n${pe.current.stack}\\n\\n`),s}zk((()=>{pe.current=void 0,ae.current=void 0,ee.current=ye}));const be=Re.useMemo((()=>Re.createElement(s,{...ye,ref:u})),[u,s,ye]);return Re.useMemo((()=>U?Re.createElement(w.Provider,{value:Z},be):be),[w,be,Z])}const j=Re.memo(ConnectFunction);if(j.WrappedComponent=s,j.displayName=ConnectFunction.displayName=i,C){const o=Re.forwardRef((function forwardConnectRef(s,o){return Re.createElement(j,{...s,reactReduxForwardedRef:o})}));return o.displayName=i,o.WrappedComponent=s,hoistNonReactStatics(o,s)}return hoistNonReactStatics(j,s)}};var mO=function Provider(s){const{children:o,context:i,serverState:a,store:u}=s,_=Re.useMemo((()=>{const s=createSubscription(u);return{store:u,subscription:s,getServerState:a?()=>a:void 0}}),[u,a]),w=Re.useMemo((()=>u.getState()),[u]);zk((()=>{const{subscription:s}=_;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),w!==u.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}}),[_,w]);const x=i||hO;return Re.createElement(x.Provider,{value:_},o)};var gO=__webpack_require__(83488),yO=__webpack_require__.n(gO);const withSystem=s=>o=>{const{fn:i}=s();class WithSystem extends Re.Component{render(){return Re.createElement(o,Mn()({},s(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${i.getDisplayName(o)})`,WithSystem},withRoot=(s,o)=>i=>{const{fn:a}=s();class WithRoot extends Re.Component{render(){return Re.createElement(mO,{store:o},Re.createElement(i,Mn()({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${a.getDisplayName(i)})`,WithRoot},withConnect=(s,o,i)=>compose(i?withRoot(s,i):yO(),fO(((i,a)=>{const u={...a,...s()},_=o.prototype?.mapStateToProps||(s=>({state:s}));return _(i,u)})),withSystem(s))(o),handleProps=(s,o,i,a)=>{for(const u in o){const _=o[u];\"function\"==typeof _&&_(i[u],a[u],s())}},withMappedContainer=(s,o,i)=>(o,a)=>{const{fn:u}=s(),_=i(o,\"root\");class WithMappedContainer extends Re.Component{constructor(o,i){super(o,i),handleProps(s,a,o,{})}UNSAFE_componentWillReceiveProps(o){handleProps(s,a,o,this.props)}render(){const s=Gt()(this.props,a?Object.keys(a):[]);return Re.createElement(_,s)}}return WithMappedContainer.displayName=`WithMappedContainer(${u.getDisplayName(_)})`,WithMappedContainer},render=(s,o,i,a)=>u=>{const _=i(s,o,a)(\"App\",\"root\"),{createRoot:w}=tk;w(u).render(Re.createElement(_,null))},getComponent=(s,o,i)=>(a,u,_={})=>{if(\"string\"!=typeof a)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof a);const w=i(a);return w?u?\"root\"===u?withConnect(s,w,o()):withConnect(s,w):w:(_.failSilently||s().log.warn(\"Could not find component:\",a),null)},getDisplayName=s=>s.displayName||s.name||\"Component\",view=({getComponents:s,getStore:o,getSystem:i})=>{const a=(u=getComponent(i,o,s),It(u,((...s)=>JSON.stringify(s))));var u;const _=(s=>utils_memoizeN(s,((...s)=>s)))(withMappedContainer(i,0,a));return{rootInjects:{getComponent:a,makeMappedContainer:_,render:render(i,o,getComponent,s)},fn:{getDisplayName}}},view_legacy=({React:s,getSystem:o,getStore:i,getComponents:a})=>{const u={},_=parseInt(s?.version,10);return _>=16&&_<18&&(u.render=((s,o,i,a)=>u=>{const _=i(s,o,a)(\"App\",\"root\");tk.render(Re.createElement(_,null),u)})(o,i,getComponent,a)),{rootInjects:u}};function downloadUrlPlugin(s){let{fn:o}=s;const i={download:s=>({errActions:i,specSelectors:a,specActions:u,getConfigs:_})=>{let{fetch:w}=o;const x=_();function next(o){if(o instanceof Error||o.status>=400)return u.updateLoadingStatus(\"failed\"),i.newThrownErr(Object.assign(new Error((o.message||o.statusText)+\" \"+s),{source:\"fetch\"})),void(!o.status&&o instanceof Error&&function checkPossibleFailReasons(){try{let o;if(\"URL\"in lt?o=new URL(s):(o=document.createElement(\"a\"),o.href=s),\"https:\"!==o.protocol&&\"https:\"===lt.location.protocol){const s=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${o.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void i.newThrownErr(s)}if(o.origin!==lt.location.origin){const s=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${o.origin}) does not match the page (${lt.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});i.newThrownErr(s)}}catch(s){return}}());u.updateLoadingStatus(\"success\"),u.updateSpec(o.text),a.url()!==s&&u.updateUrl(s)}s=s||a.url(),u.updateLoadingStatus(\"loading\"),i.clear({source:\"fetch\"}),w({url:s,loadSpec:!0,requestInterceptor:x.requestInterceptor||(s=>s),responseInterceptor:x.responseInterceptor||(s=>s),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:s=>{let o=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===o.indexOf(s)&&console.error(`Error: ${s} is not one of ${JSON.stringify(o)}`),{type:\"spec_update_loading_status\",payload:s}}};let a={loadingStatus:Vt((s=>s||(0,ze.Map)()),(s=>s.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:i,reducers:{spec_update_loading_status:(s,o)=>\"string\"==typeof o.payload?s.set(\"loadingStatus\",o.payload):s},selectors:a}}}}function arrayLikeToArray_arrayLikeToArray(s,o){(null==o||o>s.length)&&(o=s.length);for(var i=0,a=Array(o);i<o;i++)a[i]=s[i];return a}function toConsumableArray_toConsumableArray(s){return function arrayWithoutHoles_arrayWithoutHoles(s){if(Array.isArray(s))return arrayLikeToArray_arrayLikeToArray(s)}(s)||function iterableToArray_iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function unsupportedIterableToArray_unsupportedIterableToArray(s,o){if(s){if(\"string\"==typeof s)return arrayLikeToArray_arrayLikeToArray(s,o);var i={}.toString.call(s).slice(8,-1);return\"Object\"===i&&s.constructor&&(i=s.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(s):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?arrayLikeToArray_arrayLikeToArray(s,o):void 0}}(s)||function nonIterableSpread_nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function typeof_typeof(s){return typeof_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},typeof_typeof(s)}function toPropertyKey(s){var o=function toPrimitive(s,o){if(\"object\"!=typeof_typeof(s)||!s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||\"default\");if(\"object\"!=typeof_typeof(a))return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===o?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof_typeof(o)?o:o+\"\"}function defineProperty_defineProperty(s,o,i){return(o=toPropertyKey(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}function extends_extends(){return extends_extends=Object.assign?Object.assign.bind():function(s){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},extends_extends.apply(null,arguments)}function create_element_ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?create_element_ownKeys(Object(i),!0).forEach((function(o){defineProperty_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):create_element_ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var vO={};function createStyleObject(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return function getClassNameCombinations(s){if(0===s.length||1===s.length)return s;var o=s.join(\".\");return vO[o]||(vO[o]=function powerSetPermutations(s){var o=s.length;return 0===o||1===o?s:2===o?[s[0],s[1],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0])]:3===o?[s[0],s[1],s[2],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:o>=4?[s[0],s[1],s[2],s[3],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3]),\"\".concat(s[3],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:void 0}(s)),vO[o]}(s.filter((function(s){return\"token\"!==s}))).reduce((function(s,o){return _objectSpread(_objectSpread({},s),i[o])}),o)}function createClassNameString(s){return s.join(\" \")}function createElement(s){var o=s.node,i=s.stylesheet,a=s.style,u=void 0===a?{}:a,_=s.useInlineStyles,w=s.key,x=o.properties,C=o.type,j=o.tagName,L=o.value;if(\"text\"===C)return L;if(j){var B,$=function createChildren(s,o){var i=0;return function(a){return i+=1,a.map((function(a,u){return createElement({node:a,stylesheet:s,useInlineStyles:o,key:\"code-segment-\".concat(i,\"-\").concat(u)})}))}}(i,_);if(_){var V=Object.keys(i).reduce((function(s,o){return o.split(\".\").forEach((function(o){s.includes(o)||s.push(o)})),s}),[]),U=x.className&&x.className.includes(\"token\")?[\"token\"]:[],z=x.className&&U.concat(x.className.filter((function(s){return!V.includes(s)})));B=_objectSpread(_objectSpread({},x),{},{className:createClassNameString(z)||void 0,style:createStyleObject(x.className,Object.assign({},x.style,u),i)})}else B=_objectSpread(_objectSpread({},x),{},{className:createClassNameString(x.className)});var Y=$(o.children);return Re.createElement(j,extends_extends({key:w},B),Y)}}var bO=[\"language\",\"children\",\"style\",\"customStyle\",\"codeTagProps\",\"useInlineStyles\",\"showLineNumbers\",\"showInlineLineNumbers\",\"startingLineNumber\",\"lineNumberContainerStyle\",\"lineNumberStyle\",\"wrapLines\",\"wrapLongLines\",\"lineProps\",\"renderer\",\"PreTag\",\"CodeTag\",\"code\",\"astGenerator\"];function highlight_ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function highlight_objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?highlight_ownKeys(Object(i),!0).forEach((function(o){defineProperty_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):highlight_ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var _O=/\\n/g;function AllLineNumbers(s){var o=s.codeString,i=s.codeStyle,a=s.containerStyle,u=void 0===a?{float:\"left\",paddingRight:\"10px\"}:a,_=s.numberStyle,w=void 0===_?{}:_,x=s.startingLineNumber;return Re.createElement(\"code\",{style:Object.assign({},i,u)},function getAllLineNumbers(s){var o=s.lines,i=s.startingLineNumber,a=s.style;return o.map((function(s,o){var u=o+i;return Re.createElement(\"span\",{key:\"line-\".concat(o),className:\"react-syntax-highlighter-line-number\",style:\"function\"==typeof a?a(u):a},\"\".concat(u,\"\\n\"))}))}({lines:o.replace(/\\n$/,\"\").split(\"\\n\"),style:w,startingLineNumber:x}))}function getInlineLineNumber(s,o){return{type:\"element\",tagName:\"span\",properties:{key:\"line-number--\".concat(s),className:[\"comment\",\"linenumber\",\"react-syntax-highlighter-line-number\"],style:o},children:[{type:\"text\",value:s}]}}function assembleLineNumberStyles(s,o,i){var a,u={display:\"inline-block\",minWidth:(a=i,\"\".concat(a.toString().length,\".25em\")),paddingRight:\"1em\",textAlign:\"right\",userSelect:\"none\"},_=\"function\"==typeof s?s(o):s;return highlight_objectSpread(highlight_objectSpread({},u),_)}function createLineElement(s){var o=s.children,i=s.lineNumber,a=s.lineNumberStyle,u=s.largestLineNumber,_=s.showInlineLineNumbers,w=s.lineProps,x=void 0===w?{}:w,C=s.className,j=void 0===C?[]:C,L=s.showLineNumbers,B=s.wrapLongLines,$=s.wrapLines,V=void 0!==$&&$?highlight_objectSpread({},\"function\"==typeof x?x(i):x):{};if(V.className=V.className?[].concat(toConsumableArray_toConsumableArray(V.className.trim().split(/\\s+/)),toConsumableArray_toConsumableArray(j)):j,i&&_){var U=assembleLineNumberStyles(a,i,u);o.unshift(getInlineLineNumber(i,U))}return B&L&&(V.style=highlight_objectSpread({display:\"flex\"},V.style)),{type:\"element\",tagName:\"span\",properties:V,children:o}}function flattenCodeTree(s){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=0;a<s.length;a++){var u=s[a];if(\"text\"===u.type)i.push(createLineElement({children:[u],className:toConsumableArray_toConsumableArray(new Set(o))}));else if(u.children){var _=o.concat(u.properties.className);flattenCodeTree(u.children,_).forEach((function(s){return i.push(s)}))}}return i}function processLines(s,o,i,a,u,_,w,x,C){var j,L=flattenCodeTree(s.value),B=[],$=-1,V=0;function createLine(s,_){var j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return o||j.length>0?function createWrappedLine(s,_){return createLineElement({children:s,lineNumber:_,lineNumberStyle:x,largestLineNumber:w,showInlineLineNumbers:u,lineProps:i,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:a,wrapLongLines:C,wrapLines:o})}(s,_,j):function createUnwrappedLine(s,o){if(a&&o&&u){var i=assembleLineNumberStyles(x,o,w);s.unshift(getInlineLineNumber(o,i))}return s}(s,_)}for(var U=function _loop(){var s=L[V],o=s.children[0].value,i=function getNewLines(s){return s.match(_O)}(o);if(i){var u=o.split(\"\\n\");u.forEach((function(o,i){var w=a&&B.length+_,x={type:\"text\",value:\"\".concat(o,\"\\n\")};if(0===i){var C=createLine(L.slice($+1,V).concat(createLineElement({children:[x],className:s.properties.className})),w);B.push(C)}else if(i===u.length-1){var j=L[V+1]&&L[V+1].children&&L[V+1].children[0],U={type:\"text\",value:\"\".concat(o)};if(j){var z=createLineElement({children:[U],className:s.properties.className});L.splice(V+1,0,z)}else{var Y=createLine([U],w,s.properties.className);B.push(Y)}}else{var Z=createLine([x],w,s.properties.className);B.push(Z)}})),$=V}V++};V<L.length;)U();if($!==L.length-1){var z=L.slice($+1,L.length);if(z&&z.length){var Y=createLine(z,a&&B.length+_);B.push(Y)}}return o?B:(j=[]).concat.apply(j,B)}function defaultRenderer(s){var o=s.rows,i=s.stylesheet,a=s.useInlineStyles;return o.map((function(s,o){return createElement({node:s,stylesheet:i,useInlineStyles:a,key:\"code-segement\".concat(o)})}))}function isHighlightJs(s){return s&&void 0!==s.highlightAuto}var SO=__webpack_require__(43768),EO=function highlight(s,o){return function SyntaxHighlighter(i){var a=i.language,u=i.children,_=i.style,w=void 0===_?o:_,x=i.customStyle,C=void 0===x?{}:x,j=i.codeTagProps,L=void 0===j?{className:a?\"language-\".concat(a):void 0,style:highlight_objectSpread(highlight_objectSpread({},w['code[class*=\"language-\"]']),w['code[class*=\"language-'.concat(a,'\"]')])}:j,B=i.useInlineStyles,$=void 0===B||B,V=i.showLineNumbers,U=void 0!==V&&V,z=i.showInlineLineNumbers,Y=void 0===z||z,Z=i.startingLineNumber,ee=void 0===Z?1:Z,ie=i.lineNumberContainerStyle,ae=i.lineNumberStyle,ce=void 0===ae?{}:ae,le=i.wrapLines,pe=i.wrapLongLines,de=void 0!==pe&&pe,fe=i.lineProps,ye=void 0===fe?{}:fe,be=i.renderer,_e=i.PreTag,Se=void 0===_e?\"pre\":_e,we=i.CodeTag,xe=void 0===we?\"code\":we,Pe=i.code,Te=void 0===Pe?(Array.isArray(u)?u[0]:u)||\"\":Pe,$e=i.astGenerator,qe=function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=function _objectWithoutPropertiesLoose(s,o){if(null==s)return{};var i={};for(var a in s)if({}.hasOwnProperty.call(s,a)){if(-1!==o.indexOf(a))continue;i[a]=s[a]}return i}(s,o);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(a=0;a<_.length;a++)i=_[a],-1===o.indexOf(i)&&{}.propertyIsEnumerable.call(s,i)&&(u[i]=s[i])}return u}(i,bO);$e=$e||s;var ze=U?Re.createElement(AllLineNumbers,{containerStyle:ie,codeStyle:L.style||{},numberStyle:ce,startingLineNumber:ee,codeString:Te}):null,We=w.hljs||w['pre[class*=\"language-\"]']||{backgroundColor:\"#fff\"},He=isHighlightJs($e)?\"hljs\":\"prismjs\",Ye=$?Object.assign({},qe,{style:Object.assign({},We,C)}):Object.assign({},qe,{className:qe.className?\"\".concat(He,\" \").concat(qe.className):He,style:Object.assign({},C)});if(L.style=highlight_objectSpread(de?{whiteSpace:\"pre-wrap\"}:{whiteSpace:\"pre\"},L.style),!$e)return Re.createElement(Se,Ye,ze,Re.createElement(xe,L,Te));(void 0===le&&be||de)&&(le=!0),be=be||defaultRenderer;var Xe=[{type:\"text\",value:Te}],Qe=function getCodeTree(s){var o=s.astGenerator,i=s.language,a=s.code,u=s.defaultCodeValue;if(isHighlightJs(o)){var _=function(s,o){return-1!==s.listLanguages().indexOf(o)}(o,i);return\"text\"===i?{value:u,language:\"text\"}:_?o.highlight(i,a):o.highlightAuto(a)}try{return i&&\"text\"!==i?{value:o.highlight(a,i)}:{value:u}}catch(s){return{value:u}}}({astGenerator:$e,language:a,code:Te,defaultCodeValue:Xe});null===Qe.language&&(Qe.value=Xe);var et=Qe.value.length;1===et&&\"text\"===Qe.value[0].type&&(et=Qe.value[0].value.split(\"\\n\").length);var tt=processLines(Qe,le,ye,U,Y,ee,et+ee,ce,de);return Re.createElement(Se,Ye,Re.createElement(xe,L,!Y&&ze,be({rows:tt,stylesheet:w,useInlineStyles:$})))}}(SO,{});EO.registerLanguage=SO.registerLanguage;const wO=EO;var xO=__webpack_require__(95089);const kO=__webpack_require__.n(xO)();var OO=__webpack_require__(65772);const CO=__webpack_require__.n(OO)();var AO=__webpack_require__(17285);const jO=__webpack_require__.n(AO)();var IO=__webpack_require__(35344);const PO=__webpack_require__.n(IO)();var TO=__webpack_require__(17533);const NO=__webpack_require__.n(TO)();var MO=__webpack_require__(73402);const RO=__webpack_require__.n(MO)();var DO=__webpack_require__(26571);const LO=__webpack_require__.n(DO)(),after_load=()=>{wO.registerLanguage(\"json\",CO),wO.registerLanguage(\"js\",kO),wO.registerLanguage(\"xml\",jO),wO.registerLanguage(\"yaml\",NO),wO.registerLanguage(\"http\",RO),wO.registerLanguage(\"bash\",PO),wO.registerLanguage(\"powershell\",LO),wO.registerLanguage(\"javascript\",kO)},FO={hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#333\",color:\"white\"},\"hljs-name\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-code\":{fontStyle:\"italic\",color:\"#888\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-tag\":{color:\"#62c8f3\"},\"hljs-variable\":{color:\"#ade5fc\"},\"hljs-template-variable\":{color:\"#ade5fc\"},\"hljs-selector-id\":{color:\"#ade5fc\"},\"hljs-selector-class\":{color:\"#ade5fc\"},\"hljs-string\":{color:\"#a2fca2\"},\"hljs-bullet\":{color:\"#d36363\"},\"hljs-type\":{color:\"#ffa\"},\"hljs-title\":{color:\"#ffa\"},\"hljs-section\":{color:\"#ffa\"},\"hljs-attribute\":{color:\"#ffa\"},\"hljs-quote\":{color:\"#ffa\"},\"hljs-built_in\":{color:\"#ffa\"},\"hljs-builtin-name\":{color:\"#ffa\"},\"hljs-number\":{color:\"#d36363\"},\"hljs-symbol\":{color:\"#d36363\"},\"hljs-keyword\":{color:\"#fcc28c\"},\"hljs-selector-tag\":{color:\"#fcc28c\"},\"hljs-literal\":{color:\"#fcc28c\"},\"hljs-comment\":{color:\"#888\"},\"hljs-deletion\":{color:\"#333\",backgroundColor:\"#fc9b9b\"},\"hljs-regexp\":{color:\"#c6b4f0\"},\"hljs-link\":{color:\"#c6b4f0\"},\"hljs-meta\":{color:\"#fc9b9b\"},\"hljs-addition\":{backgroundColor:\"#a2fca2\",color:\"#333\"}},BO={agate:FO,arta:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#222\",color:\"#aaa\"},\"hljs-subst\":{color:\"#aaa\"},\"hljs-section\":{color:\"#fff\",fontWeight:\"bold\"},\"hljs-comment\":{color:\"#444\"},\"hljs-quote\":{color:\"#444\"},\"hljs-meta\":{color:\"#444\"},\"hljs-string\":{color:\"#ffcc33\"},\"hljs-symbol\":{color:\"#ffcc33\"},\"hljs-bullet\":{color:\"#ffcc33\"},\"hljs-regexp\":{color:\"#ffcc33\"},\"hljs-number\":{color:\"#00cc66\"},\"hljs-addition\":{color:\"#00cc66\"},\"hljs-built_in\":{color:\"#32aaee\"},\"hljs-builtin-name\":{color:\"#32aaee\"},\"hljs-literal\":{color:\"#32aaee\"},\"hljs-type\":{color:\"#32aaee\"},\"hljs-template-variable\":{color:\"#32aaee\"},\"hljs-attribute\":{color:\"#32aaee\"},\"hljs-link\":{color:\"#32aaee\"},\"hljs-keyword\":{color:\"#6644aa\"},\"hljs-selector-tag\":{color:\"#6644aa\"},\"hljs-name\":{color:\"#6644aa\"},\"hljs-selector-id\":{color:\"#6644aa\"},\"hljs-selector-class\":{color:\"#6644aa\"},\"hljs-title\":{color:\"#bb1166\"},\"hljs-variable\":{color:\"#bb1166\"},\"hljs-deletion\":{color:\"#bb1166\"},\"hljs-template-tag\":{color:\"#bb1166\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-emphasis\":{fontStyle:\"italic\"}},monokai:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#272822\",color:\"#ddd\"},\"hljs-tag\":{color:\"#f92672\"},\"hljs-keyword\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-strong\":{color:\"#f92672\"},\"hljs-name\":{color:\"#f92672\"},\"hljs-code\":{color:\"#66d9ef\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-attribute\":{color:\"#bf79db\"},\"hljs-symbol\":{color:\"#bf79db\"},\"hljs-regexp\":{color:\"#bf79db\"},\"hljs-link\":{color:\"#bf79db\"},\"hljs-string\":{color:\"#a6e22e\"},\"hljs-bullet\":{color:\"#a6e22e\"},\"hljs-subst\":{color:\"#a6e22e\"},\"hljs-title\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-section\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-emphasis\":{color:\"#a6e22e\"},\"hljs-type\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#a6e22e\"},\"hljs-builtin-name\":{color:\"#a6e22e\"},\"hljs-selector-attr\":{color:\"#a6e22e\"},\"hljs-selector-pseudo\":{color:\"#a6e22e\"},\"hljs-addition\":{color:\"#a6e22e\"},\"hljs-variable\":{color:\"#a6e22e\"},\"hljs-template-tag\":{color:\"#a6e22e\"},\"hljs-template-variable\":{color:\"#a6e22e\"},\"hljs-comment\":{color:\"#75715e\"},\"hljs-quote\":{color:\"#75715e\"},\"hljs-deletion\":{color:\"#75715e\"},\"hljs-meta\":{color:\"#75715e\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-selector-id\":{fontWeight:\"bold\"}},nord:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#2E3440\",color:\"#D8DEE9\"},\"hljs-subst\":{color:\"#D8DEE9\"},\"hljs-selector-tag\":{color:\"#81A1C1\"},\"hljs-selector-id\":{color:\"#8FBCBB\",fontWeight:\"bold\"},\"hljs-selector-class\":{color:\"#8FBCBB\"},\"hljs-selector-attr\":{color:\"#8FBCBB\"},\"hljs-selector-pseudo\":{color:\"#88C0D0\"},\"hljs-addition\":{backgroundColor:\"rgba(163, 190, 140, 0.5)\"},\"hljs-deletion\":{backgroundColor:\"rgba(191, 97, 106, 0.5)\"},\"hljs-built_in\":{color:\"#8FBCBB\"},\"hljs-type\":{color:\"#8FBCBB\"},\"hljs-class\":{color:\"#8FBCBB\"},\"hljs-function\":{color:\"#88C0D0\"},\"hljs-function > .hljs-title\":{color:\"#88C0D0\"},\"hljs-keyword\":{color:\"#81A1C1\"},\"hljs-literal\":{color:\"#81A1C1\"},\"hljs-symbol\":{color:\"#81A1C1\"},\"hljs-number\":{color:\"#B48EAD\"},\"hljs-regexp\":{color:\"#EBCB8B\"},\"hljs-string\":{color:\"#A3BE8C\"},\"hljs-title\":{color:\"#8FBCBB\"},\"hljs-params\":{color:\"#D8DEE9\"},\"hljs-bullet\":{color:\"#81A1C1\"},\"hljs-code\":{color:\"#8FBCBB\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-formula\":{color:\"#8FBCBB\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-link:hover\":{textDecoration:\"underline\"},\"hljs-quote\":{color:\"#4C566A\"},\"hljs-comment\":{color:\"#4C566A\"},\"hljs-doctag\":{color:\"#8FBCBB\"},\"hljs-meta\":{color:\"#5E81AC\"},\"hljs-meta-keyword\":{color:\"#5E81AC\"},\"hljs-meta-string\":{color:\"#A3BE8C\"},\"hljs-attr\":{color:\"#8FBCBB\"},\"hljs-attribute\":{color:\"#D8DEE9\"},\"hljs-builtin-name\":{color:\"#81A1C1\"},\"hljs-name\":{color:\"#81A1C1\"},\"hljs-section\":{color:\"#88C0D0\"},\"hljs-tag\":{color:\"#81A1C1\"},\"hljs-variable\":{color:\"#D8DEE9\"},\"hljs-template-variable\":{color:\"#D8DEE9\"},\"hljs-template-tag\":{color:\"#5E81AC\"},\"abnf .hljs-attribute\":{color:\"#88C0D0\"},\"abnf .hljs-symbol\":{color:\"#EBCB8B\"},\"apache .hljs-attribute\":{color:\"#88C0D0\"},\"apache .hljs-section\":{color:\"#81A1C1\"},\"arduino .hljs-built_in\":{color:\"#88C0D0\"},\"aspectj .hljs-meta\":{color:\"#D08770\"},\"aspectj > .hljs-title\":{color:\"#88C0D0\"},\"bnf .hljs-attribute\":{color:\"#8FBCBB\"},\"clojure .hljs-name\":{color:\"#88C0D0\"},\"clojure .hljs-symbol\":{color:\"#EBCB8B\"},\"coq .hljs-built_in\":{color:\"#88C0D0\"},\"cpp .hljs-meta-string\":{color:\"#8FBCBB\"},\"css .hljs-built_in\":{color:\"#88C0D0\"},\"css .hljs-keyword\":{color:\"#D08770\"},\"diff .hljs-meta\":{color:\"#8FBCBB\"},\"ebnf .hljs-attribute\":{color:\"#8FBCBB\"},\"glsl .hljs-built_in\":{color:\"#88C0D0\"},\"groovy .hljs-meta:not(:first-child)\":{color:\"#D08770\"},\"haxe .hljs-meta\":{color:\"#D08770\"},\"java .hljs-meta\":{color:\"#D08770\"},\"ldif .hljs-attribute\":{color:\"#8FBCBB\"},\"lisp .hljs-name\":{color:\"#88C0D0\"},\"lua .hljs-built_in\":{color:\"#88C0D0\"},\"moonscript .hljs-built_in\":{color:\"#88C0D0\"},\"nginx .hljs-attribute\":{color:\"#88C0D0\"},\"nginx .hljs-section\":{color:\"#5E81AC\"},\"pf .hljs-built_in\":{color:\"#88C0D0\"},\"processing .hljs-built_in\":{color:\"#88C0D0\"},\"scss .hljs-keyword\":{color:\"#81A1C1\"},\"stylus .hljs-keyword\":{color:\"#81A1C1\"},\"swift .hljs-meta\":{color:\"#D08770\"},\"vim .hljs-built_in\":{color:\"#88C0D0\",fontStyle:\"italic\"},\"yaml .hljs-meta\":{color:\"#D08770\"}},obsidian:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#282b2e\",color:\"#e0e2e4\"},\"hljs-keyword\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-id\":{color:\"#93c763\"},\"hljs-number\":{color:\"#ffcd22\"},\"hljs-attribute\":{color:\"#668bb0\"},\"hljs-code\":{color:\"white\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-section\":{color:\"white\",fontWeight:\"bold\"},\"hljs-regexp\":{color:\"#d39745\"},\"hljs-link\":{color:\"#d39745\"},\"hljs-meta\":{color:\"#557182\"},\"hljs-tag\":{color:\"#8cbbad\"},\"hljs-name\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-bullet\":{color:\"#8cbbad\"},\"hljs-subst\":{color:\"#8cbbad\"},\"hljs-emphasis\":{color:\"#8cbbad\"},\"hljs-type\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#8cbbad\"},\"hljs-selector-attr\":{color:\"#8cbbad\"},\"hljs-selector-pseudo\":{color:\"#8cbbad\"},\"hljs-addition\":{color:\"#8cbbad\"},\"hljs-variable\":{color:\"#8cbbad\"},\"hljs-template-tag\":{color:\"#8cbbad\"},\"hljs-template-variable\":{color:\"#8cbbad\"},\"hljs-string\":{color:\"#ec7600\"},\"hljs-symbol\":{color:\"#ec7600\"},\"hljs-comment\":{color:\"#818e96\"},\"hljs-quote\":{color:\"#818e96\"},\"hljs-deletion\":{color:\"#818e96\"},\"hljs-selector-class\":{color:\"#A082BD\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-title\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"}},\"tomorrow-night\":{\"hljs-comment\":{color:\"#969896\"},\"hljs-quote\":{color:\"#969896\"},\"hljs-variable\":{color:\"#cc6666\"},\"hljs-template-variable\":{color:\"#cc6666\"},\"hljs-tag\":{color:\"#cc6666\"},\"hljs-name\":{color:\"#cc6666\"},\"hljs-selector-id\":{color:\"#cc6666\"},\"hljs-selector-class\":{color:\"#cc6666\"},\"hljs-regexp\":{color:\"#cc6666\"},\"hljs-deletion\":{color:\"#cc6666\"},\"hljs-number\":{color:\"#de935f\"},\"hljs-built_in\":{color:\"#de935f\"},\"hljs-builtin-name\":{color:\"#de935f\"},\"hljs-literal\":{color:\"#de935f\"},\"hljs-type\":{color:\"#de935f\"},\"hljs-params\":{color:\"#de935f\"},\"hljs-meta\":{color:\"#de935f\"},\"hljs-link\":{color:\"#de935f\"},\"hljs-attribute\":{color:\"#f0c674\"},\"hljs-string\":{color:\"#b5bd68\"},\"hljs-symbol\":{color:\"#b5bd68\"},\"hljs-bullet\":{color:\"#b5bd68\"},\"hljs-addition\":{color:\"#b5bd68\"},\"hljs-title\":{color:\"#81a2be\"},\"hljs-section\":{color:\"#81a2be\"},\"hljs-keyword\":{color:\"#b294bb\"},\"hljs-selector-tag\":{color:\"#b294bb\"},hljs:{display:\"block\",overflowX:\"auto\",background:\"#1d1f21\",color:\"#c5c8c6\",padding:\"0.5em\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}},idea:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",color:\"#000\",background:\"#fff\"},\"hljs-subst\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-title\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-comment\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-quote\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-meta\":{color:\"#808000\"},\"hljs-tag\":{background:\"#efefef\"},\"hljs-section\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-name\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-literal\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-keyword\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-tag\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-type\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-id\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-class\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-attribute\":{fontWeight:\"bold\",color:\"#0000ff\"},\"hljs-number\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-regexp\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-link\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-string\":{color:\"#008000\",fontWeight:\"bold\"},\"hljs-symbol\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-bullet\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-formula\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-doctag\":{textDecoration:\"underline\"},\"hljs-variable\":{color:\"#660e7a\"},\"hljs-template-variable\":{color:\"#660e7a\"},\"hljs-addition\":{background:\"#baeeba\"},\"hljs-deletion\":{background:\"#ffc8bd\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}}},$O=FO,components_SyntaxHighlighter=({language:s,className:o=\"\",getConfigs:i,syntaxHighlighting:a={},children:u=\"\"})=>{const _=i().syntaxHighlight.theme,{styles:w,defaultStyle:x}=a,C=w?.[_]??x;return Re.createElement(wO,{language:s,className:o,style:C},u)};var qO=__webpack_require__(5419),VO=__webpack_require__.n(qO);const components_HighlightCode=({fileName:s=\"response.txt\",className:o,downloadable:i,getComponent:a,canCopy:u,language:_,children:w})=>{const x=(0,Re.useRef)(null),C=a(\"SyntaxHighlighter\",!0),handlePreventYScrollingBeyondElement=s=>{const{target:o,deltaY:i}=s,{scrollHeight:a,offsetHeight:u,scrollTop:_}=o;a>u&&(0===_&&i<0||u+_>=a&&i>0)&&s.preventDefault()};return(0,Re.useEffect)((()=>{const s=Array.from(x.current.childNodes).filter((s=>!!s.nodeType&&s.classList.contains(\"microlight\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[w,o,_]),Re.createElement(\"div\",{className:\"highlight-code\",ref:x},u&&Re.createElement(\"div\",{className:\"copy-to-clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:w},Re.createElement(\"button\",null))),i?Re.createElement(\"button\",{className:\"download-contents\",onClick:()=>{VO()(w,s)}},\"Download\"):null,Re.createElement(C,{language:_,className:Jn()(o,\"microlight\"),renderPlainText:({children:s,PlainTextViewer:i})=>Re.createElement(i,{className:o},s)},w))},components_PlainTextViewer=({className:s=\"\",children:o})=>Re.createElement(\"pre\",{className:Jn()(\"microlight\",s)},o),wrap_components_SyntaxHighlighter=(s,o)=>({renderPlainText:i,children:a,...u})=>{const _=o.getConfigs().syntaxHighlight.activated,w=o.getComponent(\"PlainTextViewer\");return _||\"function\"!=typeof i?_?Re.createElement(s,u,a):Re.createElement(w,null,a):i({children:a,PlainTextViewer:w})},SyntaxHighlightingPlugin1=()=>({afterLoad:after_load,rootInjects:{syntaxHighlighting:{styles:BO,defaultStyle:$O}},components:{SyntaxHighlighter:components_SyntaxHighlighter,HighlightCode:components_HighlightCode,PlainTextViewer:components_PlainTextViewer}}),SyntaxHighlightingPlugin2=()=>({wrapComponents:{SyntaxHighlighter:wrap_components_SyntaxHighlighter}}),syntax_highlighting=()=>[SyntaxHighlightingPlugin1,SyntaxHighlightingPlugin2],versions_after_load=()=>{const{GIT_DIRTY:s,GIT_COMMIT:o,PACKAGE_VERSION:i,BUILD_TIME:a}={PACKAGE_VERSION:\"5.24.2\",GIT_COMMIT:\"gf714aff1\",GIT_DIRTY:!0,BUILD_TIME:\"Mon, 16 Jun 2025 12:49:08 GMT\"};lt.versions=lt.versions||{},lt.versions.swaggerUI={version:i,gitRevision:o,gitDirty:s,buildTimestamp:a}},versions=()=>({afterLoad:versions_after_load});var UO=__webpack_require__(47248),zO=__webpack_require__.n(UO);const WO=console.error,withErrorBoundary=s=>o=>{const{getComponent:i,fn:a}=s(),u=i(\"ErrorBoundary\"),_=a.getDisplayName(o);class WithErrorBoundary extends Re.Component{render(){return Re.createElement(u,{targetName:_,getComponent:i,fn:a},Re.createElement(o,Mn()({},this.props,this.context)))}}var w;return WithErrorBoundary.displayName=`WithErrorBoundary(${_})`,(w=o).prototype&&w.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=o.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:s})=>Re.createElement(\"div\",{className:\"fallback\"},\"😱 \",Re.createElement(\"i\",null,\"Could not render \",\"t\"===s?\"this component\":s,\", see the console.\"));class ErrorBoundary extends Re.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:WO},children:null};static getDerivedStateFromError(s){return{hasError:!0,error:s}}constructor(...s){super(...s),this.state={hasError:!1,error:null}}componentDidCatch(s,o){this.props.fn.componentDidCatch(s,o)}render(){const{getComponent:s,targetName:o,children:i}=this.props;if(this.state.hasError){const i=s(\"Fallback\");return Re.createElement(i,{name:o})}return i}}const JO=ErrorBoundary,safe_render=({componentList:s=[],fullOverride:o=!1}={})=>({getSystem:i})=>{const a=o?s:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...s],u=zO()(a,Array(a.length).fill(((s,{fn:o})=>o.withErrorBoundary(s))));return{fn:{componentDidCatch:WO,withErrorBoundary:withErrorBoundary(i)},components:{ErrorBoundary:JO,Fallback:fallback},wrapComponents:u}};class App extends Re.Component{getLayout(){const{getComponent:s,layoutSelectors:o}=this.props,i=o.current(),a=s(i,!0);return a||(()=>Re.createElement(\"h1\",null,' No layout defined for \"',i,'\" '))}render(){const s=this.getLayout();return Re.createElement(s,null)}}const HO=App;class AuthorizationPopup extends Re.Component{close=()=>{let{authActions:s}=this.props;s.showDefinitions(!1)};render(){let{authSelectors:s,authActions:o,getComponent:i,errSelectors:a,specSelectors:u,fn:{AST:_={}}}=this.props,w=s.shownDefinitions();const x=i(\"auths\"),C=i(\"CloseIcon\");return Re.createElement(\"div\",{className:\"dialog-ux\"},Re.createElement(\"div\",{className:\"backdrop-ux\"}),Re.createElement(\"div\",{className:\"modal-ux\"},Re.createElement(\"div\",{className:\"modal-dialog-ux\"},Re.createElement(\"div\",{className:\"modal-ux-inner\"},Re.createElement(\"div\",{className:\"modal-ux-header\"},Re.createElement(\"h3\",null,\"Available authorizations\"),Re.createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},Re.createElement(C,null))),Re.createElement(\"div\",{className:\"modal-ux-content\"},w.valueSeq().map(((w,C)=>Re.createElement(x,{key:C,AST:_,definitions:w,getComponent:i,errSelectors:a,authSelectors:s,authActions:o,specSelectors:u}))))))))}}class AuthorizeBtn extends Re.Component{render(){let{isAuthorized:s,showPopup:o,onClick:i,getComponent:a}=this.props;const u=a(\"authorizationPopup\",!0),_=a(\"LockAuthIcon\",!0),w=a(\"UnlockAuthIcon\",!0);return Re.createElement(\"div\",{className:\"auth-wrapper\"},Re.createElement(\"button\",{className:s?\"btn authorize locked\":\"btn authorize unlocked\",onClick:i},Re.createElement(\"span\",null,\"Authorize\"),s?Re.createElement(_,null):Re.createElement(w,null)),o&&Re.createElement(u,null))}}class AuthorizeBtnContainer extends Re.Component{render(){const{authActions:s,authSelectors:o,specSelectors:i,getComponent:a}=this.props,u=i.securityDefinitions(),_=o.definitionsToAuthorize(),w=a(\"authorizeBtn\");return u?Re.createElement(w,{onClick:()=>s.showDefinitions(_),isAuthorized:!!o.authorized().size,showPopup:!!o.shownDefinitions(),getComponent:a}):null}}class AuthorizeOperationBtn extends Re.Component{onClick=s=>{s.stopPropagation();let{onClick:o}=this.props;o&&o()};render(){let{isAuthorized:s,getComponent:o}=this.props;const i=o(\"LockAuthOperationIcon\",!0),a=o(\"UnlockAuthOperationIcon\",!0);return Re.createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":s?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},s?Re.createElement(i,{className:\"locked\"}):Re.createElement(a,{className:\"unlocked\"}))}}class Auths extends Re.Component{constructor(s,o){super(s,o),this.state={}}onAuthChange=s=>{let{name:o}=s;this.setState({[o]:s})};submitAuth=s=>{s.preventDefault();let{authActions:o}=this.props;o.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:o,definitions:i}=this.props,a=i.map(((s,o)=>o)).toArray();this.setState(a.reduce(((s,o)=>(s[o]=\"\",s)),{})),o.logoutWithPersistOption(a)};close=s=>{s.preventDefault();let{authActions:o}=this.props;o.showDefinitions(!1)};render(){let{definitions:s,getComponent:o,authSelectors:i,errSelectors:a}=this.props;const u=o(\"AuthItem\"),_=o(\"oauth2\",!0),w=o(\"Button\");let x=i.authorized(),C=s.filter(((s,o)=>!!x.get(o))),j=s.filter((s=>\"oauth2\"!==s.get(\"type\"))),L=s.filter((s=>\"oauth2\"===s.get(\"type\")));return Re.createElement(\"div\",{className:\"auth-container\"},!!j.size&&Re.createElement(\"form\",{onSubmit:this.submitAuth},j.map(((s,_)=>Re.createElement(u,{key:_,schema:s,name:_,getComponent:o,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a,authSelectors:i}))).toArray(),Re.createElement(\"div\",{className:\"auth-btn-wrapper\"},j.size===C.size?Re.createElement(w,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):Re.createElement(w,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),Re.createElement(w,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),L&&L.size?Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"scope-def\"},Re.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),Re.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(_,{authorized:x,schema:s,name:o})))).toArray()):null)}}class auth_item_Auths extends Re.Component{render(){let{schema:s,name:o,getComponent:i,onAuthChange:a,authorized:u,errSelectors:_,authSelectors:w}=this.props;const x=i(\"apiKeyAuth\"),C=i(\"basicAuth\");let j;const L=s.get(\"type\");switch(L){case\"apiKey\":j=Re.createElement(x,{key:o,schema:s,name:o,errSelectors:_,authorized:u,getComponent:i,onChange:a,authSelectors:w});break;case\"basic\":j=Re.createElement(C,{key:o,schema:s,name:o,errSelectors:_,authorized:u,getComponent:i,onChange:a,authSelectors:w});break;default:j=Re.createElement(\"div\",{key:o},\"Unknown security definition type \",L)}return Re.createElement(\"div\",{key:`${o}-jump`},j)}}class AuthError extends Re.Component{render(){let{error:s}=this.props,o=s.get(\"level\"),i=s.get(\"message\"),a=s.get(\"source\");return Re.createElement(\"div\",{className:\"errors\"},Re.createElement(\"b\",null,a,\" \",o),Re.createElement(\"span\",null,i))}}class ApiKeyAuth extends Re.Component{constructor(s,o){super(s,o);let{name:i,schema:a}=this.props,u=this.getValue();this.state={name:i,schema:a,value:u}}getValue(){let{name:s,authorized:o}=this.props;return o&&o.getIn([s,\"value\"])}onChange=s=>{let{onChange:o}=this.props,i=s.target.value,a=Object.assign({},this.state,{value:i});this.setState(a),o(a)};render(){let{schema:s,getComponent:o,errSelectors:i,name:a,authSelectors:u}=this.props;const _=o(\"Input\"),w=o(\"Row\"),x=o(\"Col\"),C=o(\"authError\"),j=o(\"Markdown\",!0),L=o(\"JumpToPath\",!0),B=u.selectAuthPath(a);let $=this.getValue(),V=i.allErrors().filter((s=>s.get(\"authId\")===a));return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,Re.createElement(\"code\",null,a||s.get(\"name\")),\" (apiKey)\",Re.createElement(L,{path:B})),$&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(j,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"p\",null,\"Name: \",Re.createElement(\"code\",null,s.get(\"name\")))),Re.createElement(w,null,Re.createElement(\"p\",null,\"In: \",Re.createElement(\"code\",null,s.get(\"in\")))),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),$?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),V.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o}))))}}class BasicAuth extends Re.Component{constructor(s,o){super(s,o);let{schema:i,name:a}=this.props,u=this.getValue().username;this.state={name:a,schema:i,value:u?{username:u}:{}}}getValue(){let{authorized:s,name:o}=this.props;return s&&s.getIn([o,\"value\"])||{}}onChange=s=>{let{onChange:o}=this.props,{value:i,name:a}=s.target,u=this.state.value;u[a]=i,this.setState({value:u}),o(this.state)};render(){let{schema:s,getComponent:o,name:i,errSelectors:a,authSelectors:u}=this.props;const _=o(\"Input\"),w=o(\"Row\"),x=o(\"Col\"),C=o(\"authError\"),j=o(\"JumpToPath\",!0),L=o(\"Markdown\",!0),B=u.selectAuthPath(i);let $=this.getValue().username,V=a.allErrors().filter((s=>s.get(\"authId\")===i));return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,\"Basic authorization\",Re.createElement(j,{path:B})),$&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(L,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),$?Re.createElement(\"code\",null,\" \",$,\" \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),$?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),V.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o}))))}}function example_Example(s){const{example:o,showValue:i,getComponent:a}=s,u=a(\"Markdown\",!0),_=a(\"HighlightCode\",!0);return o&&ze.Map.isMap(o)?Re.createElement(\"div\",{className:\"example\"},o.get(\"description\")?Re.createElement(\"section\",{className:\"example__section\"},Re.createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),Re.createElement(\"p\",null,Re.createElement(u,{source:o.get(\"description\")}))):null,i&&o.has(\"value\")?Re.createElement(\"section\",{className:\"example__section\"},Re.createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),Re.createElement(_,null,stringify(o.get(\"value\")))):null):null}class ExamplesSelect extends Re.PureComponent{static defaultProps={examples:(0,ze.Map)({}),onSelect:(...s)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...s),currentExampleKey:null,showLabels:!0};_onSelect=(s,{isSyntheticChange:o=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(s,{isSyntheticChange:o})};_onDomSelect=s=>{if(\"function\"==typeof this.props.onSelect){const o=s.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(o,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:s,currentExampleKey:o}=this.props,i=s.get(o),a=s.keySeq().first(),u=s.get(a);return i||u||(0,ze.Map)({})};componentDidMount(){const{onSelect:s,examples:o}=this.props;if(\"function\"==typeof s){const s=o.first(),i=o.keyOf(s);this._onSelect(i,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(s){const{currentExampleKey:o,examples:i}=s;if(i!==this.props.examples&&!i.has(o)){const s=i.first(),o=i.keyOf(s);this._onSelect(o,{isSyntheticChange:!0})}}render(){const{examples:s,currentExampleKey:o,isValueModified:i,isModifiedValueAvailable:a,showLabels:u}=this.props;return Re.createElement(\"div\",{className:\"examples-select\"},u?Re.createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,Re.createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:a&&i?\"__MODIFIED__VALUE__\":o||\"\"},a?Re.createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,s.map(((s,o)=>Re.createElement(\"option\",{key:o,value:o},ze.Map.isMap(s)&&s.get(\"summary\")||o))).valueSeq()))}}const stringifyUnlessList=s=>ze.List.isList(s)?s:stringify(s);class ExamplesSelectValueRetainer extends Re.PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,ze.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...s),updateValue:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...s)};constructor(s){super(s);const o=this._getCurrentExampleValue();this.state={[s.currentNamespace]:(0,ze.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:o,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==o})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:s}=this.props;return(this.state[s]||(0,ze.Map)()).toObject()};_setStateForCurrentNamespace=s=>{const{currentNamespace:o}=this.props;return this._setStateForNamespace(o,s)};_setStateForNamespace=(s,o)=>{const i=(this.state[s]||(0,ze.Map)()).mergeDeep(o);return this.setState({[s]:i})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:s}=this.props;return this._getCurrentExampleValue()===s};_getValueForExample=(s,o)=>{const{examples:i}=o||this.props;return stringifyUnlessList((i||(0,ze.Map)({})).getIn([s,\"value\"]))};_getCurrentExampleValue=s=>{const{currentKey:o}=s||this.props;return this._getValueForExample(o,s||this.props)};_onExamplesSelect=(s,{isSyntheticChange:o}={},...i)=>{const{onSelect:a,updateValue:u,currentUserInputValue:_,userHasEditedBody:w}=this.props,{lastUserEditedValue:x}=this._getStateForCurrentNamespace(),C=this._getValueForExample(s);if(\"__MODIFIED__VALUE__\"===s)return u(stringifyUnlessList(x)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof a&&a(s,{isSyntheticChange:o},...i),this._setStateForCurrentNamespace({lastDownstreamValue:C,isModifiedValueSelected:o&&w||!!_&&_!==C}),o||\"function\"==typeof u&&u(stringifyUnlessList(C))};UNSAFE_componentWillReceiveProps(s){const{currentUserInputValue:o,examples:i,onSelect:a,userHasEditedBody:u}=s,{lastUserEditedValue:_,lastDownstreamValue:w}=this._getStateForCurrentNamespace(),x=this._getValueForExample(s.currentKey,s),C=i.filter((s=>ze.Map.isMap(s)&&(s.get(\"value\")===o||stringify(s.get(\"value\"))===o)));if(C.size){let o;o=C.has(s.currentKey)?s.currentKey:C.keySeq().first(),a(o,{isSyntheticChange:!0})}else o!==this.props.currentUserInputValue&&o!==_&&o!==w&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(s.currentNamespace,{lastUserEditedValue:s.currentUserInputValue,isModifiedValueSelected:u||o!==x}))}render(){const{currentUserInputValue:s,examples:o,currentKey:i,getComponent:a,userHasEditedBody:u}=this.props,{lastDownstreamValue:_,lastUserEditedValue:w,isModifiedValueSelected:x}=this._getStateForCurrentNamespace(),C=a(\"ExamplesSelect\");return Re.createElement(C,{examples:o,currentExampleKey:i,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!w&&w!==_,isValueModified:void 0!==s&&x&&s!==this._getCurrentExampleValue()||u})}}function oauth2_authorize_authorize({auth:s,authActions:o,errActions:i,configs:a,authConfigs:u={},currentServer:_}){let{schema:w,scopes:x,name:C,clientId:j}=s,L=w.get(\"flow\"),B=[];switch(L){case\"password\":return void o.authorizePassword(s);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void o.authorizeApplication(s);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":B.push(\"response_type=code\");break;case\"implicit\":B.push(\"response_type=token\")}\"string\"==typeof j&&B.push(\"client_id=\"+encodeURIComponent(j));let $=a.oauth2RedirectUrl;if(void 0===$)return void i.newAuthErr({authId:C,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});B.push(\"redirect_uri=\"+encodeURIComponent($));let V=[];if(Array.isArray(x)?V=x:We().List.isList(x)&&(V=x.toArray()),V.length>0){let s=u.scopeSeparator||\" \";B.push(\"scope=\"+encodeURIComponent(V.join(s)))}let U=utils_btoa(new Date);if(B.push(\"state=\"+encodeURIComponent(U)),void 0!==u.realm&&B.push(\"realm=\"+encodeURIComponent(u.realm)),(\"authorizationCode\"===L||\"authorization_code\"===L||\"accessCode\"===L)&&u.usePkceWithAuthorizationCodeGrant){const o=function generateCodeVerifier(){return b64toB64UrlEncoded(xt()(32).toString(\"base64\"))}(),i=function createCodeChallenge(s){return b64toB64UrlEncoded(Ot()(\"sha256\").update(s).digest(\"base64\"))}(o);B.push(\"code_challenge=\"+i),B.push(\"code_challenge_method=S256\"),s.codeVerifier=o}let{additionalQueryStringParams:z}=u;for(let s in z)void 0!==z[s]&&B.push([s,z[s]].map(encodeURIComponent).join(\"=\"));const Y=w.get(\"authorizationUrl\");let Z;Z=_?Nt()(sanitizeUrl(Y),_,!0).toString():sanitizeUrl(Y);let ee,ie=[Z,B.join(\"&\")].join(\"string\"!=typeof Y||Y.includes(\"?\")?\"&\":\"?\");ee=\"implicit\"===L?o.preAuthorizeImplicit:u.useBasicAuthenticationWithAccessCodeGrant?o.authorizeAccessCodeWithBasicAuthentication:o.authorizeAccessCodeWithFormParams,o.authPopup(ie,{auth:s,state:U,redirectUrl:$,callback:ee,errCb:i.newAuthErr})}class Oauth2 extends Re.Component{constructor(s,o){super(s,o);let{name:i,schema:a,authorized:u,authSelectors:_}=this.props,w=u&&u.get(i),x=_.getConfigs()||{},C=w&&w.get(\"username\")||\"\",j=w&&w.get(\"clientId\")||x.clientId||\"\",L=w&&w.get(\"clientSecret\")||x.clientSecret||\"\",B=w&&w.get(\"passwordType\")||\"basic\",$=w&&w.get(\"scopes\")||x.scopes||[];\"string\"==typeof $&&($=$.split(x.scopeSeparator||\" \")),this.state={appName:x.appName,name:i,schema:a,scopes:$,clientId:j,clientSecret:L,username:C,password:\"\",passwordType:B}}close=s=>{s.preventDefault();let{authActions:o}=this.props;o.showDefinitions(!1)};authorize=()=>{let{authActions:s,errActions:o,getConfigs:i,authSelectors:a,oas3Selectors:u}=this.props,_=i(),w=a.getConfigs();o.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:u.serverEffectiveValue(u.selectedServer()),authActions:s,errActions:o,configs:_,authConfigs:w})};onScopeChange=s=>{let{target:o}=s,{checked:i}=o,a=o.dataset.value;if(i&&-1===this.state.scopes.indexOf(a)){let s=this.state.scopes.concat([a]);this.setState({scopes:s})}else!i&&this.state.scopes.indexOf(a)>-1&&this.setState({scopes:this.state.scopes.filter((s=>s!==a))})};onInputChange=s=>{let{target:{dataset:{name:o},value:i}}=s,a={[o]:i};this.setState(a)};selectScopes=s=>{s.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=s=>{s.preventDefault();let{authActions:o,errActions:i,name:a}=this.props;i.clear({authId:a,type:\"auth\",source:\"auth\"}),o.logoutWithPersistOption([a])};render(){let{schema:s,getComponent:o,authSelectors:i,errSelectors:a,name:u,specSelectors:_}=this.props;const w=o(\"Input\"),x=o(\"Row\"),C=o(\"Col\"),j=o(\"Button\"),L=o(\"authError\"),B=o(\"JumpToPath\",!0),$=o(\"Markdown\",!0),V=o(\"InitializedInput\"),{isOAS3:U}=_;let z=U()?s.get(\"openIdConnectUrl\"):null;const Y=\"implicit\",Z=\"password\",ee=U()?z?\"authorization_code\":\"authorizationCode\":\"accessCode\",ie=U()?z?\"client_credentials\":\"clientCredentials\":\"application\",ae=i.selectAuthPath(u);let ce=!!(i.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,le=s.get(\"flow\"),pe=le===ee&&ce?le+\" with PKCE\":le,de=s.get(\"allowedScopes\")||s.get(\"scopes\"),fe=!!i.authorized().get(u),ye=a.allErrors().filter((s=>s.get(\"authId\")===u)),be=!ye.filter((s=>\"validation\"===s.get(\"source\"))).size,_e=s.get(\"description\");return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,u,\" (OAuth2, \",pe,\") \",Re.createElement(B,{path:ae})),this.state.appName?Re.createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,_e&&Re.createElement($,{source:s.get(\"description\")}),fe&&Re.createElement(\"h6\",null,\"Authorized\"),z&&Re.createElement(\"p\",null,\"OpenID Connect URL: \",Re.createElement(\"code\",null,z)),(le===Y||le===ee)&&Re.createElement(\"p\",null,\"Authorization URL: \",Re.createElement(\"code\",null,s.get(\"authorizationUrl\"))),(le===Z||le===ee||le===ie)&&Re.createElement(\"p\",null,\"Token URL:\",Re.createElement(\"code\",null,\" \",s.get(\"tokenUrl\"))),Re.createElement(\"p\",{className:\"flow\"},\"Flow: \",Re.createElement(\"code\",null,pe)),le!==Z?null:Re.createElement(x,null,Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),fe?Re.createElement(\"code\",null,\" \",this.state.username,\" \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),fe?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),fe?Re.createElement(\"code\",null,\" \",this.state.passwordType,\" \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},Re.createElement(\"option\",{value:\"basic\"},\"Authorization header\"),Re.createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(le===ie||le===Y||le===ee||le===Z)&&(!fe||fe&&this.state.clientId)&&Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:`client_id_${le}`},\"client_id:\"),fe?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(V,{id:`client_id_${le}`,type:\"text\",required:le===Z,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(le===ie||le===ee||le===Z)&&Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:`client_secret_${le}`},\"client_secret:\"),fe?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(V,{id:`client_secret_${le}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!fe&&de&&de.size?Re.createElement(\"div\",{className:\"scopes\"},Re.createElement(\"h2\",null,\"Scopes:\",Re.createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),Re.createElement(\"a\",{onClick:this.selectScopes},\"select none\")),de.map(((s,o)=>Re.createElement(x,{key:o},Re.createElement(\"div\",{className:\"checkbox\"},Re.createElement(w,{\"data-value\":o,id:`${o}-${le}-checkbox-${this.state.name}`,disabled:fe,checked:this.state.scopes.includes(o),type:\"checkbox\",onChange:this.onScopeChange}),Re.createElement(\"label\",{htmlFor:`${o}-${le}-checkbox-${this.state.name}`},Re.createElement(\"span\",{className:\"item\"}),Re.createElement(\"div\",{className:\"text\"},Re.createElement(\"p\",{className:\"name\"},o),Re.createElement(\"p\",{className:\"description\"},s))))))).toArray()):null,ye.valueSeq().map(((s,o)=>Re.createElement(L,{error:s,key:o}))),Re.createElement(\"div\",{className:\"auth-btn-wrapper\"},be&&(fe?Re.createElement(j,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):Re.createElement(j,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),Re.createElement(j,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends Re.Component{onClick=()=>{let{specActions:s,path:o,method:i}=this.props;s.clearResponse(o,i),s.clearRequest(o,i)};render(){return Re.createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const live_response_Headers=({headers:s})=>Re.createElement(\"div\",null,Re.createElement(\"h5\",null,\"Response headers\"),Re.createElement(\"pre\",{className:\"microlight\"},s)),Duration=({duration:s})=>Re.createElement(\"div\",null,Re.createElement(\"h5\",null,\"Request duration\"),Re.createElement(\"pre\",{className:\"microlight\"},s,\" ms\"));class LiveResponse extends Re.Component{shouldComponentUpdate(s){return this.props.response!==s.response||this.props.path!==s.path||this.props.method!==s.method||this.props.displayRequestDuration!==s.displayRequestDuration}render(){const{response:s,getComponent:o,getConfigs:i,displayRequestDuration:a,specSelectors:u,path:_,method:w}=this.props,{showMutatedRequest:x,requestSnippetsEnabled:C}=i(),j=x?u.mutatedRequestFor(_,w):u.requestFor(_,w),L=s.get(\"status\"),B=j.get(\"url\"),$=s.get(\"headers\").toJS(),V=s.get(\"notDocumented\"),U=s.get(\"error\"),z=s.get(\"text\"),Y=s.get(\"duration\"),Z=Object.keys($),ee=$[\"content-type\"]||$[\"Content-Type\"],ie=o(\"responseBody\"),ae=Z.map((s=>{var o=Array.isArray($[s])?$[s].join():$[s];return Re.createElement(\"span\",{className:\"headerline\",key:s},\" \",s,\": \",o,\" \")})),ce=0!==ae.length,le=o(\"Markdown\",!0),pe=o(\"RequestSnippets\",!0),de=o(\"curl\",!0);return Re.createElement(\"div\",null,j&&C?Re.createElement(pe,{request:j}):Re.createElement(de,{request:j}),B&&Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"request-url\"},Re.createElement(\"h4\",null,\"Request URL\"),Re.createElement(\"pre\",{className:\"microlight\"},B))),Re.createElement(\"h4\",null,\"Server response\"),Re.createElement(\"table\",{className:\"responses-table live-responses-table\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",{className:\"responses-header\"},Re.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),Re.createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),Re.createElement(\"tbody\",null,Re.createElement(\"tr\",{className:\"response\"},Re.createElement(\"td\",{className:\"response-col_status\"},L,V?Re.createElement(\"div\",{className:\"response-undocumented\"},Re.createElement(\"i\",null,\" Undocumented \")):null),Re.createElement(\"td\",{className:\"response-col_description\"},U?Re.createElement(le,{source:`${\"\"!==s.get(\"name\")?`${s.get(\"name\")}: `:\"\"}${s.get(\"message\")}`}):null,z?Re.createElement(ie,{content:z,contentType:ee,url:B,headers:$,getConfigs:i,getComponent:o}):null,ce?Re.createElement(live_response_Headers,{headers:ae}):null,a&&Y?Re.createElement(Duration,{duration:Y}):null)))))}}class OnlineValidatorBadge extends Re.Component{constructor(s,o){super(s,o);let{getConfigs:i}=s,{validatorUrl:a}=i();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===a?\"https://validator.swagger.io/validator\":a}}getDefinitionUrl=()=>{let{specSelectors:s}=this.props;return new(Nt())(s.url(),lt.location).toString()};UNSAFE_componentWillReceiveProps(s){let{getConfigs:o}=s,{validatorUrl:i}=o();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===i?\"https://validator.swagger.io/validator\":i})}render(){let{getConfigs:s}=this.props,{spec:o}=s(),i=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof o&&Object.keys(o).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?Re.createElement(\"span\",{className:\"float-right\"},Re.createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${i}/debug?url=${encodeURIComponent(this.state.url)}`},Re.createElement(ValidatorImage,{src:`${i}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends Re.Component{constructor(s){super(s),this.state={loaded:!1,error:!1}}componentDidMount(){const s=new Image;s.onload=()=>{this.setState({loaded:!0})},s.onerror=()=>{this.setState({error:!0})},s.src=this.props.src}UNSAFE_componentWillReceiveProps(s){if(s.src!==this.props.src){const o=new Image;o.onload=()=>{this.setState({loaded:!0})},o.onerror=()=>{this.setState({error:!0})},o.src=s.src}}render(){return this.state.error?Re.createElement(\"img\",{alt:\"Error\"}):this.state.loaded?Re.createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends Re.Component{render(){let{specSelectors:s}=this.props;const o=s.taggedOperations();return 0===o.size?Re.createElement(\"h3\",null,\" No operations defined in spec!\"):Re.createElement(\"div\",null,o.map(this.renderOperationTag).toArray(),o.size<1?Re.createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(s,o)=>{const{specSelectors:i,getComponent:a,oas3Selectors:u,layoutSelectors:_,layoutActions:w,getConfigs:x}=this.props,C=i.validOperationMethods(),j=a(\"OperationContainer\",!0),L=a(\"OperationTag\"),B=s.get(\"operations\");return Re.createElement(L,{key:\"operation-\"+o,tagObj:s,tag:o,oas3Selectors:u,layoutSelectors:_,layoutActions:w,getConfigs:x,getComponent:a,specUrl:i.url()},Re.createElement(\"div\",{className:\"operation-tag-content\"},B.map((s=>{const i=s.get(\"path\"),a=s.get(\"method\"),u=We().List([\"paths\",i,a]);return-1===C.indexOf(a)?null:Re.createElement(j,{key:`${i}-${a}`,specPath:u,op:s,path:i,method:a,tag:o})})).toArray()))}}class OperationTag extends Re.Component{static defaultProps={tagObj:We().fromJS({}),tag:\"\"};render(){const{tagObj:s,tag:o,children:i,oas3Selectors:a,layoutSelectors:u,layoutActions:_,getConfigs:w,getComponent:x,specUrl:C}=this.props;let{docExpansion:j,deepLinking:L}=w();const B=x(\"Collapse\"),$=x(\"Markdown\",!0),V=x(\"DeepLink\"),U=x(\"Link\"),z=x(\"ArrowUpIcon\"),Y=x(\"ArrowDownIcon\");let Z,ee=s.getIn([\"tagDetails\",\"description\"],null),ie=s.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),ae=s.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);Z=isFunc(a)&&isFunc(a.selectedServer)?safeBuildUrl(ae,C,{selectedServer:a.selectedServer()}):ae;let ce=[\"operations-tag\",o],le=u.isShown(ce,\"full\"===j||\"list\"===j);return Re.createElement(\"div\",{className:le?\"opblock-tag-section is-open\":\"opblock-tag-section\"},Re.createElement(\"h3\",{onClick:()=>_.show(ce,!le),className:ee?\"opblock-tag\":\"opblock-tag no-desc\",id:ce.map((s=>escapeDeepLinkPath(s))).join(\"-\"),\"data-tag\":o,\"data-is-open\":le},Re.createElement(V,{enabled:L,isShown:le,path:createDeepLinkPath(o),text:o}),ee?Re.createElement(\"small\",null,Re.createElement($,{source:ee})):Re.createElement(\"small\",null),Z?Re.createElement(\"div\",{className:\"info__externaldocs\"},Re.createElement(\"small\",null,Re.createElement(U,{href:sanitizeUrl(Z),onClick:s=>s.stopPropagation(),target:\"_blank\"},ie||Z))):null,Re.createElement(\"button\",{\"aria-expanded\":le,className:\"expand-operation\",title:le?\"Collapse operation\":\"Expand operation\",onClick:()=>_.show(ce,!le)},le?Re.createElement(z,{className:\"arrow\"}):Re.createElement(Y,{className:\"arrow\"}))),Re.createElement(B,{isOpened:le},i))}}class operation_Operation extends Re.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,ze.List)(),summary:\"\"};render(){let{specPath:s,response:o,request:i,toggleShown:a,onTryoutClick:u,onResetClick:_,onCancelClick:w,onExecute:x,fn:C,getComponent:j,getConfigs:L,specActions:B,specSelectors:$,authActions:V,authSelectors:U,oas3Actions:z,oas3Selectors:Y}=this.props,Z=this.props.operation,{deprecated:ee,isShown:ie,path:ae,method:ce,op:le,tag:pe,operationId:de,allowTryItOut:fe,displayRequestDuration:ye,tryItOutEnabled:be,executeInProgress:_e}=Z.toJS(),{description:Se,externalDocs:we,schemes:xe}=le;const Pe=we?safeBuildUrl(we.url,$.url(),{selectedServer:Y.selectedServer()}):\"\";let Te=Z.getIn([\"op\"]),$e=Te.get(\"responses\"),qe=function getList(s,o){if(!We().Iterable.isIterable(s))return We().List();let i=s.getIn(Array.isArray(o)?o:[o]);return We().List.isList(i)?i:We().List()}(Te,[\"parameters\"]),ze=$.operationScheme(ae,ce),He=[\"operations\",pe,de],Ye=getExtensions(Te);const Xe=j(\"responses\"),Qe=j(\"parameters\"),et=j(\"execute\"),tt=j(\"clear\"),rt=j(\"Collapse\"),nt=j(\"Markdown\",!0),st=j(\"schemes\"),ot=j(\"OperationServers\"),it=j(\"OperationExt\"),at=j(\"OperationSummary\"),ct=j(\"Link\"),{showExtensions:lt}=L();if($e&&o&&o.size>0){let s=!$e.get(String(o.get(\"status\")))&&!$e.get(\"default\");o=o.set(\"notDocumented\",s)}let ut=[ae,ce];const pt=$.validationErrors([ae,ce]);return Re.createElement(\"div\",{className:ee?\"opblock opblock-deprecated\":ie?`opblock opblock-${ce} is-open`:`opblock opblock-${ce}`,id:escapeDeepLinkPath(He.join(\"-\"))},Re.createElement(at,{operationProps:Z,isShown:ie,toggleShown:a,getComponent:j,authActions:V,authSelectors:U,specPath:s}),Re.createElement(rt,{isOpened:ie},Re.createElement(\"div\",{className:\"opblock-body\"},Te&&Te.size||null===Te?null:Re.createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),ee&&Re.createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),Se&&Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(\"div\",{className:\"opblock-description\"},Re.createElement(nt,{source:Se}))),Pe?Re.createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},Re.createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),Re.createElement(\"div\",{className:\"opblock-external-docs\"},we.description&&Re.createElement(\"span\",{className:\"opblock-external-docs__description\"},Re.createElement(nt,{source:we.description})),Re.createElement(ct,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl(Pe)},Pe))):null,Te&&Te.size?Re.createElement(Qe,{parameters:qe,specPath:s.push(\"parameters\"),operation:Te,onChangeKey:ut,onTryoutClick:u,onResetClick:_,onCancelClick:w,tryItOutEnabled:be,allowTryItOut:fe,fn:C,getComponent:j,specActions:B,specSelectors:$,pathMethod:[ae,ce],getConfigs:L,oas3Actions:z,oas3Selectors:Y}):null,be?Re.createElement(ot,{getComponent:j,path:ae,method:ce,operationServers:Te.get(\"servers\"),pathServers:$.paths().getIn([ae,\"servers\"]),getSelectedServer:Y.selectedServer,setSelectedServer:z.setSelectedServer,setServerVariableValue:z.setServerVariableValue,getServerVariable:Y.serverVariableValue,getEffectiveServerValue:Y.serverEffectiveValue}):null,be&&fe&&xe&&xe.size?Re.createElement(\"div\",{className:\"opblock-schemes\"},Re.createElement(st,{schemes:xe,path:ae,method:ce,specActions:B,currentScheme:ze})):null,!be||!fe||pt.length<=0?null:Re.createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",Re.createElement(\"ul\",null,pt.map(((s,o)=>Re.createElement(\"li\",{key:o},\" \",s,\" \"))))),Re.createElement(\"div\",{className:be&&o&&fe?\"btn-group\":\"execute-wrapper\"},be&&fe?Re.createElement(et,{operation:Te,specActions:B,specSelectors:$,oas3Selectors:Y,oas3Actions:z,path:ae,method:ce,onExecute:x,disabled:_e}):null,be&&o&&fe?Re.createElement(tt,{specActions:B,path:ae,method:ce}):null),_e?Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"div\",{className:\"loading\"})):null,$e?Re.createElement(Xe,{responses:$e,request:i,tryItOutResponse:o,getComponent:j,getConfigs:L,specSelectors:$,oas3Actions:z,oas3Selectors:Y,specActions:B,produces:$.producesOptionsFor([ae,ce]),producesValue:$.currentProducesFor([ae,ce]),specPath:s.push(\"responses\"),path:ae,method:ce,displayRequestDuration:ye,fn:C}):null,lt&&Ye.size?Re.createElement(it,{extensions:Ye,getComponent:j}):null)))}}class OperationContainer extends Re.PureComponent{constructor(s,o){super(s,o);const{tryItOutEnabled:i}=s.getConfigs();this.state={tryItOutEnabled:i,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(s,o){const{op:i,layoutSelectors:a,getConfigs:u}=o,{docExpansion:_,deepLinking:w,displayOperationId:x,displayRequestDuration:C,supportedSubmitMethods:j}=u(),L=a.showSummary(),B=i.getIn([\"operation\",\"__originalOperationId\"])||i.getIn([\"operation\",\"operationId\"])||opId(i.get(\"operation\"),o.path,o.method)||i.get(\"id\"),$=[\"operations\",o.tag,B],V=j.indexOf(o.method)>=0&&(void 0===o.allowTryItOut?o.specSelectors.allowTryItOutFor(o.path,o.method):o.allowTryItOut),U=i.getIn([\"operation\",\"security\"])||o.specSelectors.security();return{operationId:B,isDeepLinkingEnabled:w,showSummary:L,displayOperationId:x,displayRequestDuration:C,allowTryItOut:V,security:U,isAuthorized:o.authSelectors.isAuthorized(U),isShown:a.isShown($,\"full\"===_),jumpToKey:`paths.${o.path}.${o.method}`,response:o.specSelectors.responseFor(o.path,o.method),request:o.specSelectors.requestFor(o.path,o.method)}}componentDidMount(){const{isShown:s}=this.props,o=this.getResolvedSubtree();s&&void 0===o&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(s){const{response:o,isShown:i}=s,a=this.getResolvedSubtree();o!==this.props.response&&this.setState({executeInProgress:!1}),i&&void 0===a&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:s,tag:o,operationId:i,isShown:a}=this.props;const u=this.getResolvedSubtree();a||void 0!==u||this.requestResolvedSubtree(),s.show([\"operations\",o,i],!a)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=s=>{const o=this.props.oas3Selectors.selectDefaultRequestBodyValue(...s);this.props.oas3Actions.setRequestBodyValue({value:o,pathMethod:s})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:s,path:o,method:i,specPath:a}=this.props;return a?s.specResolvedSubtree(a.toJS()):s.specResolvedSubtree([\"paths\",o,i])};requestResolvedSubtree=()=>{const{specActions:s,path:o,method:i,specPath:a}=this.props;return a?s.requestResolvedSubtree(a.toJS()):s.requestResolvedSubtree([\"paths\",o,i])};render(){let{op:s,tag:o,path:i,method:a,security:u,isAuthorized:_,operationId:w,showSummary:x,isShown:C,jumpToKey:j,allowTryItOut:L,response:B,request:$,displayOperationId:V,displayRequestDuration:U,isDeepLinkingEnabled:z,specPath:Y,specSelectors:Z,specActions:ee,getComponent:ie,getConfigs:ae,layoutSelectors:ce,layoutActions:le,authActions:pe,authSelectors:de,oas3Actions:fe,oas3Selectors:ye,fn:be}=this.props;const _e=ie(\"operation\"),Se=this.getResolvedSubtree()||(0,ze.Map)(),we=(0,ze.fromJS)({op:Se,tag:o,path:i,summary:s.getIn([\"operation\",\"summary\"])||\"\",deprecated:Se.get(\"deprecated\")||s.getIn([\"operation\",\"deprecated\"])||!1,method:a,security:u,isAuthorized:_,operationId:w,originalOperationId:Se.getIn([\"operation\",\"__originalOperationId\"]),showSummary:x,isShown:C,jumpToKey:j,allowTryItOut:L,request:$,displayOperationId:V,displayRequestDuration:U,isDeepLinkingEnabled:z,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return Re.createElement(_e,{operation:we,response:B,request:$,isShown:C,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:Y,specActions:ee,specSelectors:Z,oas3Actions:fe,oas3Selectors:ye,layoutActions:le,layoutSelectors:ce,authActions:pe,authSelectors:de,getComponent:ie,getConfigs:ae,fn:be})}}var KO=__webpack_require__(13222),GO=__webpack_require__.n(KO);class OperationSummary extends Re.PureComponent{static defaultProps={operationProps:null,specPath:(0,ze.List)(),summary:\"\"};render(){let{isShown:s,toggleShown:o,getComponent:i,authActions:a,authSelectors:u,operationProps:_,specPath:w}=this.props,{summary:x,isAuthorized:C,method:j,op:L,showSummary:B,path:$,operationId:V,originalOperationId:U,displayOperationId:z}=_.toJS(),{summary:Y}=L,Z=_.get(\"security\");const ee=i(\"authorizeOperationBtn\",!0),ie=i(\"OperationSummaryMethod\"),ae=i(\"OperationSummaryPath\"),ce=i(\"JumpToPath\",!0),le=i(\"CopyToClipboardBtn\",!0),pe=i(\"ArrowUpIcon\"),de=i(\"ArrowDownIcon\"),fe=Z&&!!Z.count(),ye=fe&&1===Z.size&&Z.first().isEmpty(),be=!fe||ye;return Re.createElement(\"div\",{className:`opblock-summary opblock-summary-${j}`},Re.createElement(\"button\",{\"aria-expanded\":s,className:\"opblock-summary-control\",onClick:o},Re.createElement(ie,{method:j}),Re.createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},Re.createElement(ae,{getComponent:i,operationProps:_,specPath:w}),B?Re.createElement(\"div\",{className:\"opblock-summary-description\"},GO()(Y||x)):null),z&&(U||V)?Re.createElement(\"span\",{className:\"opblock-summary-operation-id\"},U||V):null),Re.createElement(le,{textToCopy:`${w.get(1)}`}),be?null:Re.createElement(ee,{isAuthorized:C,onClick:()=>{const s=u.definitionsForRequirements(Z);a.showDefinitions(s)}}),Re.createElement(ce,{path:w}),Re.createElement(\"button\",{\"aria-label\":`${j} ${$.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":s,tabIndex:\"-1\",onClick:o},s?Re.createElement(pe,{className:\"arrow\"}):Re.createElement(de,{className:\"arrow\"})))}}class OperationSummaryMethod extends Re.PureComponent{static defaultProps={operationProps:null};render(){let{method:s}=this.props;return Re.createElement(\"span\",{className:\"opblock-summary-method\"},s.toUpperCase())}}class OperationSummaryPath extends Re.PureComponent{render(){let{getComponent:s,operationProps:o}=this.props,{deprecated:i,isShown:a,path:u,tag:_,operationId:w,isDeepLinkingEnabled:x}=o.toJS();const C=u.split(/(?=\\/)/g);for(let s=1;s<C.length;s+=2)C.splice(s,0,Re.createElement(\"wbr\",{key:s}));const j=s(\"DeepLink\");return Re.createElement(\"span\",{className:i?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":u},Re.createElement(j,{enabled:x,isShown:a,path:createDeepLinkPath(`${_}/${w}`),text:C}))}}const operation_extensions=({extensions:s,getComponent:o})=>{let i=o(\"OperationExtRow\");return Re.createElement(\"div\",{className:\"opblock-section\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"h4\",null,\"Extensions\")),Re.createElement(\"div\",{className:\"table-container\"},Re.createElement(\"table\",null,Re.createElement(\"thead\",null,Re.createElement(\"tr\",null,Re.createElement(\"td\",{className:\"col_header\"},\"Field\"),Re.createElement(\"td\",{className:\"col_header\"},\"Value\"))),Re.createElement(\"tbody\",null,s.entrySeq().map((([s,o])=>Re.createElement(i,{key:`${s}-${o}`,xKey:s,xVal:o})))))))},operation_extension_row=({xKey:s,xVal:o})=>{const i=o?o.toJS?o.toJS():o:null;return Re.createElement(\"tr\",null,Re.createElement(\"td\",null,s),Re.createElement(\"td\",null,JSON.stringify(i)))};function createHtmlReadyId(s,o=\"_\"){return s.replace(/[^\\w-]/g,o)}class responses_Responses extends Re.Component{static defaultProps={tryItOutResponse:null,produces:(0,ze.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);onResponseContentTypeChange=({controlsAcceptHeader:s,value:o})=>{const{oas3Actions:i,path:a,method:u}=this.props;s&&i.setResponseContentType({value:o,path:a,method:u})};render(){let{responses:s,tryItOutResponse:o,getComponent:i,getConfigs:a,specSelectors:u,fn:_,producesValue:w,displayRequestDuration:x,specPath:C,path:j,method:L,oas3Selectors:B,oas3Actions:$}=this.props,V=function defaultStatusCode(s){let o=s.keySeq();return o.contains(jt)?jt:o.filter((s=>\"2\"===(s+\"\")[0])).sort().first()}(s);const U=i(\"contentType\"),z=i(\"liveResponse\"),Y=i(\"response\");let Z=this.props.produces&&this.props.produces.size?this.props.produces:responses_Responses.defaultProps.produces;const ee=u.isOAS3()?function getAcceptControllingResponse(s){if(!We().OrderedMap.isOrderedMap(s))return null;if(!s.size)return null;const o=s.find(((s,o)=>o.startsWith(\"2\")&&Object.keys(s.get(\"content\")||{}).length>0)),i=s.get(\"default\")||We().OrderedMap(),a=(i.get(\"content\")||We().OrderedMap()).keySeq().toJS().length?i:null;return o||a}(s):null,ie=createHtmlReadyId(`${L}${j}_responses`),ae=`${ie}_select`;return Re.createElement(\"div\",{className:\"responses-wrapper\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"h4\",null,\"Responses\"),u.isOAS3()?null:Re.createElement(\"label\",{htmlFor:ae},Re.createElement(\"span\",null,\"Response content type\"),Re.createElement(U,{value:w,ariaControls:ie,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:Z,controlId:ae,onChange:this.onChangeProducesWrapper}))),Re.createElement(\"div\",{className:\"responses-inner\"},o?Re.createElement(\"div\",null,Re.createElement(z,{response:o,getComponent:i,getConfigs:a,specSelectors:u,path:this.props.path,method:this.props.method,displayRequestDuration:x}),Re.createElement(\"h4\",null,\"Responses\")):null,Re.createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:ie,role:\"region\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",{className:\"responses-header\"},Re.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),Re.createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),u.isOAS3()?Re.createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),Re.createElement(\"tbody\",null,s.entrySeq().map((([s,x])=>{let U=o&&o.get(\"status\")==s?\"response_current\":\"\";return Re.createElement(Y,{key:s,path:j,method:L,specPath:C.push(s),isDefault:V===s,fn:_,className:U,code:s,response:x,specSelectors:u,controlsAcceptHeader:x===ee,onContentTypeChange:this.onResponseContentTypeChange,contentType:w,getConfigs:a,activeExamplesKey:B.activeExamplesMember(j,L,\"responses\",s),oas3Actions:$,getComponent:i})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(s){const o=function canJsonParse(s){try{return!!JSON.parse(s)}catch(s){return null}}(s);return o?\"json\":null}class response_Response extends Re.Component{constructor(s,o){super(s,o),this.state={responseContentType:\"\"}}static defaultProps={response:(0,ze.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=s=>{const{onContentTypeChange:o,controlsAcceptHeader:i}=this.props;this.setState({responseContentType:s}),o({value:s,controlsAcceptHeader:i})};getTargetExamplesKey=()=>{const{response:s,contentType:o,activeExamplesKey:i}=this.props,a=this.state.responseContentType||o,u=s.getIn([\"content\",a],(0,ze.Map)({})).get(\"examples\",null).keySeq().first();return i||u};render(){let{path:s,method:o,code:i,response:a,className:u,specPath:_,fn:w,getComponent:x,getConfigs:C,specSelectors:j,contentType:L,controlsAcceptHeader:B,oas3Actions:$}=this.props,{inferSchema:V,getSampleSchema:U}=w,z=j.isOAS3();const{showExtensions:Y}=C();let Z=Y?getExtensions(a):null,ee=a.get(\"headers\"),ie=a.get(\"links\");const ae=x(\"ResponseExtension\"),ce=x(\"headers\"),le=x(\"HighlightCode\",!0),pe=x(\"modelExample\"),de=x(\"Markdown\",!0),fe=x(\"operationLink\"),ye=x(\"contentType\"),be=x(\"ExamplesSelect\"),_e=x(\"Example\");var Se,we;const xe=this.state.responseContentType||L,Pe=a.getIn([\"content\",xe],(0,ze.Map)({})),Te=Pe.get(\"examples\",null);if(z){const s=Pe.get(\"schema\");Se=s?V(s.toJS()):null,we=s?(0,ze.List)([\"content\",this.state.responseContentType,\"schema\"]):_}else Se=a.get(\"schema\"),we=a.has(\"schema\")?_.push(\"schema\"):_;let $e,qe,We=!1,He={includeReadOnly:!0};if(z)if(qe=Pe.get(\"schema\")?.toJS(),ze.Map.isMap(Te)&&!Te.isEmpty()){const s=this.getTargetExamplesKey(),getMediaTypeExample=s=>ze.Map.isMap(s)?s.get(\"value\"):void 0;$e=getMediaTypeExample(Te.get(s,(0,ze.Map)({}))),void 0===$e&&($e=getMediaTypeExample(Te.values().next().value)),We=!0}else void 0!==Pe.get(\"example\")&&($e=Pe.get(\"example\"),We=!0);else{qe=Se,He={...He,includeWriteOnly:!0};const s=a.getIn([\"examples\",xe]);s&&($e=s,We=!0)}const Ye=((s,o)=>{if(null==s)return null;const i=getKnownSyntaxHighlighterLanguage(s)?\"json\":null;return Re.createElement(\"div\",null,Re.createElement(o,{className:\"example\",language:i},stringify(s)))})(U(qe,xe,He,We?$e:void 0),le);return Re.createElement(\"tr\",{className:\"response \"+(u||\"\"),\"data-code\":i},Re.createElement(\"td\",{className:\"response-col_status\"},i),Re.createElement(\"td\",{className:\"response-col_description\"},Re.createElement(\"div\",{className:\"response-col_description__inner\"},Re.createElement(de,{source:a.get(\"description\")})),Y&&Z.size?Z.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,xKey:s,xVal:o}))):null,z&&a.get(\"content\")?Re.createElement(\"section\",{className:\"response-controls\"},Re.createElement(\"div\",{className:Jn()(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":B})},Re.createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),Re.createElement(ye,{value:this.state.responseContentType,contentTypes:a.get(\"content\")?a.get(\"content\").keySeq():(0,ze.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),B?Re.createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",Re.createElement(\"code\",null,\"Accept\"),\" header.\"):null),ze.Map.isMap(Te)&&!Te.isEmpty()?Re.createElement(\"div\",{className:\"response-control-examples\"},Re.createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),Re.createElement(be,{examples:Te,currentExampleKey:this.getTargetExamplesKey(),onSelect:a=>$.setActiveExamplesMember({name:a,pathMethod:[s,o],contextType:\"responses\",contextName:i}),showLabels:!1})):null):null,Ye||Se?Re.createElement(pe,{specPath:we,getComponent:x,getConfigs:C,specSelectors:j,schema:fromJSOrdered(Se),example:Ye,includeReadOnly:!0}):null,z&&Te?Re.createElement(_e,{example:Te.get(this.getTargetExamplesKey(),(0,ze.Map)({})),getComponent:x,getConfigs:C,omitValue:!0}):null,ee?Re.createElement(ce,{headers:ee,getComponent:x}):null),z?Re.createElement(\"td\",{className:\"response-col_links\"},ie?ie.toSeq().entrySeq().map((([s,o])=>Re.createElement(fe,{key:s,name:s,link:o,getComponent:x}))):Re.createElement(\"i\",null,\"No links\")):null)}}const response_extension=({xKey:s,xVal:o})=>Re.createElement(\"div\",{className:\"response__extension\"},s,\": \",String(o));var YO=__webpack_require__(26657),XO=__webpack_require__.n(YO),QO=__webpack_require__(80218),ZO=__webpack_require__.n(QO);class ResponseBody extends Re.PureComponent{state={parsedContent:null};updateParsedContent=s=>{const{content:o}=this.props;if(s!==o)if(o&&o instanceof Blob){var i=new FileReader;i.onload=()=>{this.setState({parsedContent:i.result})},i.readAsText(o)}else this.setState({parsedContent:o.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(s){this.updateParsedContent(s.content)}render(){let{content:s,contentType:o,url:i,headers:a={},getComponent:u}=this.props;const{parsedContent:_}=this.state,w=u(\"HighlightCode\",!0),x=\"response_\"+(new Date).getTime();let C,j;if(i=i||\"\",(/^application\\/octet-stream/i.test(o)||a[\"Content-Disposition\"]&&/attachment/i.test(a[\"Content-Disposition\"])||a[\"content-disposition\"]&&/attachment/i.test(a[\"content-disposition\"])||a[\"Content-Description\"]&&/File Transfer/i.test(a[\"Content-Description\"])||a[\"content-description\"]&&/File Transfer/i.test(a[\"content-description\"]))&&(s.size>0||s.length>0))if(\"Blob\"in window){let u=o||\"text/html\",_=s instanceof Blob?s:new Blob([s],{type:u}),w=window.URL.createObjectURL(_),x=[u,i.substr(i.lastIndexOf(\"/\")+1),w].join(\":\"),C=a[\"content-disposition\"]||a[\"Content-Disposition\"];if(void 0!==C){let s=function extractFileNameFromContentDispositionHeader(s){let o;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((i=>(o=i.exec(s),null!==o))),null!==o&&o.length>1)try{return decodeURIComponent(o[1])}catch(s){console.error(s)}return null}(C);null!==s&&(x=s)}j=lt.navigator&&lt.navigator.msSaveOrOpenBlob?Re.createElement(\"div\",null,Re.createElement(\"a\",{href:w,onClick:()=>lt.navigator.msSaveOrOpenBlob(_,x)},\"Download file\")):Re.createElement(\"div\",null,Re.createElement(\"a\",{href:w,download:x},\"Download file\"))}else j=Re.createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(o)){let o=null;getKnownSyntaxHighlighterLanguage(s)&&(o=\"json\");try{C=JSON.stringify(JSON.parse(s),null,\"  \")}catch(o){C=\"can't parse JSON.  Raw result:\\n\\n\"+s}j=Re.createElement(w,{language:o,downloadable:!0,fileName:`${x}.json`,canCopy:!0},C)}else/xml/i.test(o)?(C=XO()(s,{textNodesOnSameLine:!0,indentor:\"  \"}),j=Re.createElement(w,{downloadable:!0,fileName:`${x}.xml`,canCopy:!0},C)):j=\"text/html\"===ZO()(o)||/text\\/plain/.test(o)?Re.createElement(w,{downloadable:!0,fileName:`${x}.html`,canCopy:!0},s):\"text/csv\"===ZO()(o)||/text\\/csv/.test(o)?Re.createElement(w,{downloadable:!0,fileName:`${x}.csv`,canCopy:!0},s):/^image\\//i.test(o)?o.includes(\"svg\")?Re.createElement(\"div\",null,\" \",s,\" \"):Re.createElement(\"img\",{src:window.URL.createObjectURL(s)}):/^audio\\//i.test(o)?Re.createElement(\"pre\",{className:\"microlight\"},Re.createElement(\"audio\",{controls:!0,key:i},Re.createElement(\"source\",{src:i,type:o}))):\"string\"==typeof s?Re.createElement(w,{downloadable:!0,fileName:`${x}.txt`,canCopy:!0},s):s.size>0?_?Re.createElement(\"div\",null,Re.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),Re.createElement(w,{downloadable:!0,fileName:`${x}.txt`,canCopy:!0},_)):Re.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return j?Re.createElement(\"div\",null,Re.createElement(\"h5\",null,\"Response body\"),j):null}}class Parameters extends Re.Component{constructor(s){super(s),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(s,o,i)=>{let{specActions:{changeParamByIdentity:a},onChangeKey:u}=this.props;a(u,s,o,i)};onChangeConsumesWrapper=s=>{let{specActions:{changeConsumesValue:o},onChangeKey:i}=this.props;o(i,s)};toggleTab=s=>\"parameters\"===s?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===s?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:s,pathMethod:o})=>{let{specActions:i,oas3Selectors:a,oas3Actions:u}=this.props;const _=a.hasUserEditedBody(...o),w=a.shouldRetainRequestBodyValue(...o);u.setRequestContentType({value:s,pathMethod:o}),u.initRequestBodyValidateError({pathMethod:o}),_||(w||u.setRequestBodyValue({value:void 0,pathMethod:o}),i.clearResponse(...o),i.clearRequest(...o),i.clearValidateParams(o))};render(){let{onTryoutClick:s,onResetClick:o,parameters:i,allowTryItOut:a,tryItOutEnabled:u,specPath:_,fn:w,getComponent:x,getConfigs:C,specSelectors:j,specActions:L,pathMethod:B,oas3Actions:$,oas3Selectors:V,operation:U}=this.props;const z=x(\"parameterRow\"),Y=x(\"TryItOutButton\"),Z=x(\"contentType\"),ee=x(\"Callbacks\",!0),ie=x(\"RequestBody\",!0),ae=u&&a,ce=j.isOAS3(),le=`${createHtmlReadyId(`${B[1]}${B[0]}_requests`)}_select`,pe=U.get(\"requestBody\"),de=Object.values(i.reduce(((s,o)=>{if(ze.Map.isMap(o)){const i=o.get(\"in\");s[i]??=[],s[i].push(o)}return s}),{})).reduce(((s,o)=>s.concat(o)),[]);return Re.createElement(\"div\",{className:\"opblock-section\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},ce?Re.createElement(\"div\",{className:\"tab-header\"},Re.createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},Re.createElement(\"h4\",{className:\"opblock-title\"},Re.createElement(\"span\",null,\"Parameters\"))),U.get(\"callbacks\")?Re.createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},Re.createElement(\"h4\",{className:\"opblock-title\"},Re.createElement(\"span\",null,\"Callbacks\"))):null):Re.createElement(\"div\",{className:\"tab-header\"},Re.createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),a?Re.createElement(Y,{isOAS3:j.isOAS3(),hasUserEditedBody:V.hasUserEditedBody(...B),enabled:u,onCancelClick:this.props.onCancelClick,onTryoutClick:s,onResetClick:()=>o(B)}):null),this.state.parametersVisible?Re.createElement(\"div\",{className:\"parameters-container\"},de.length?Re.createElement(\"div\",{className:\"table-container\"},Re.createElement(\"table\",{className:\"parameters\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",null,Re.createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),Re.createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),Re.createElement(\"tbody\",null,de.map(((s,o)=>Re.createElement(z,{fn:w,specPath:_.push(o.toString()),getComponent:x,getConfigs:C,rawParam:s,param:j.parameterWithMetaByIdentity(B,s),key:`${s.get(\"in\")}.${s.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:j,specActions:L,oas3Actions:$,oas3Selectors:V,pathMethod:B,isExecute:ae})))))):Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?Re.createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},Re.createElement(ee,{callbacks:(0,ze.Map)(U.get(\"callbacks\")),specPath:_.slice(0,-1).push(\"callbacks\")})):null,ce&&pe&&this.state.parametersVisible&&Re.createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"h4\",{className:`opblock-title parameter__name ${pe.get(\"required\")&&\"required\"}`},\"Request body\"),Re.createElement(\"label\",{id:le},Re.createElement(Z,{value:V.requestContentType(...B),contentTypes:pe.get(\"content\",(0,ze.List)()).keySeq(),onChange:s=>{this.onChangeMediaType({value:s,pathMethod:B})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:le}))),Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(ie,{setRetainRequestBodyValueFlag:s=>$.setRetainRequestBodyValueFlag({value:s,pathMethod:B}),userHasEditedBody:V.hasUserEditedBody(...B),specPath:_.slice(0,-1).push(\"requestBody\"),requestBody:pe,requestBodyValue:V.requestBodyValue(...B),requestBodyInclusionSetting:V.requestBodyInclusionSetting(...B),requestBodyErrors:V.requestBodyErrors(...B),isExecute:ae,getConfigs:C,activeExamplesKey:V.activeExamplesMember(...B,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(s,o)=>{if(o){const i=V.requestBodyValue(...B),a=ze.Map.isMap(i)?i:(0,ze.Map)();return $.setRequestBodyValue({pathMethod:B,value:a.setIn(o,s)})}$.setRequestBodyValue({value:s,pathMethod:B})},onChangeIncludeEmpty:(s,o)=>{$.setRequestBodyInclusion({pathMethod:B,value:o,name:s})},contentType:V.requestContentType(...B)}))))}}const parameter_extension=({xKey:s,xVal:o})=>Re.createElement(\"div\",{className:\"parameter__extension\"},s,\": \",String(o)),eC={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends Re.Component{static defaultProps=eC;componentDidMount(){const{isIncludedOptions:s,onChange:o}=this.props,{shouldDispatchInit:i,defaultValue:a}=s;i&&o(a)}onCheckboxChange=s=>{const{onChange:o}=this.props;o(s.target.checked)};render(){let{isIncluded:s,isDisabled:o}=this.props;return Re.createElement(\"div\",null,Re.createElement(\"label\",{htmlFor:\"include_empty_value\",className:Jn()(\"parameter__empty_value_toggle\",{disabled:o})},Re.createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:o,checked:!o&&s,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends Re.Component{constructor(s,o){super(s,o),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(s){let o,{specSelectors:i,pathMethod:a,rawParam:u}=s,_=i.isOAS3(),w=i.parameterWithMetaByIdentity(a,u)||new ze.Map;if(w=w.isEmpty()?u:w,_){let{schema:s}=getParameterSchema(w,{isOAS3:_});o=s?s.get(\"enum\"):void 0}else o=w?w.get(\"enum\"):void 0;let x,C=w?w.get(\"value\"):void 0;void 0!==C?x=C:u.get(\"required\")&&o&&o.size&&(x=o.first()),void 0!==x&&x!==C&&this.onChangeWrapper(function numberToString(s){return\"number\"==typeof s?s.toString():s}(x)),this.setDefaultValue()}onChangeWrapper=(s,o=!1)=>{let i,{onChange:a,rawParam:u}=this.props;return i=\"\"===s||s&&0===s.size?null:s,a(u,i,o)};_onExampleSelect=s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=s=>{let{specActions:o,param:i,pathMethod:a}=this.props;const u=i.get(\"name\"),_=i.get(\"in\");return o.updateEmptyParamInclusion(a,u,_,s)};setDefaultValue=()=>{let{specSelectors:s,pathMethod:o,rawParam:i,oas3Selectors:a,fn:u}=this.props;const _=s.parameterWithMetaByIdentity(o,i)||(0,ze.Map)();let{schema:w}=getParameterSchema(_,{isOAS3:s.isOAS3()});const x=_.get(\"content\",(0,ze.Map)()).keySeq().first(),C=w?u.getSampleSchema(w.toJS(),x,{includeWriteOnly:!0}):null;if(_&&void 0===_.get(\"value\")&&\"body\"!==_.get(\"in\")){let i;if(s.isSwagger2())i=void 0!==_.get(\"x-example\")?_.get(\"x-example\"):void 0!==_.getIn([\"schema\",\"example\"])?_.getIn([\"schema\",\"example\"]):w&&w.getIn([\"default\"]);else if(s.isOAS3()){w=this.composeJsonSchema(w);const s=a.activeExamplesMember(...o,\"parameters\",this.getParamKey());i=void 0!==_.getIn([\"examples\",s,\"value\"])?_.getIn([\"examples\",s,\"value\"]):void 0!==_.getIn([\"content\",x,\"example\"])?_.getIn([\"content\",x,\"example\"]):void 0!==_.get(\"example\")?_.get(\"example\"):void 0!==(w&&w.get(\"example\"))?w&&w.get(\"example\"):void 0!==(w&&w.get(\"default\"))?w&&w.get(\"default\"):_.get(\"default\")}void 0===i||ze.List.isList(i)||(i=stringify(i));const j=u.getSchemaObjectType(w),L=u.getSchemaObjectType(w?.get(\"items\"));void 0!==i?this.onChangeWrapper(i):\"object\"===j&&C&&!_.get(\"examples\")?this.onChangeWrapper(ze.List.isList(C)?C:stringify(C)):\"array\"===j&&\"object\"===L&&C&&!_.get(\"examples\")&&this.onChangeWrapper(ze.List.isList(C)?C:(0,ze.List)(JSON.parse(C)))}};getParamKey(){const{param:s}=this.props;return s?`${s.get(\"name\")}-${s.get(\"in\")}`:null}composeJsonSchema(s){const{fn:o}=this.props,i=s.get(\"oneOf\")?.get(0)?.toJS(),a=s.get(\"anyOf\")?.get(0)?.toJS();return(0,ze.fromJS)(o.mergeJsonSchema(s.toJS(),i??a??{}))}render(){let{param:s,rawParam:o,getComponent:i,getConfigs:a,isExecute:u,fn:_,onChangeConsumes:w,specSelectors:x,pathMethod:C,specPath:j,oas3Selectors:L}=this.props,B=x.isOAS3();const{showExtensions:$,showCommonExtensions:V}=a();if(s||(s=o),!o)return null;const U=i(\"JsonSchemaForm\"),z=i(\"ParamBody\");let Y=s.get(\"in\"),Z=\"body\"!==Y?null:Re.createElement(z,{getComponent:i,getConfigs:a,fn:_,param:s,consumes:x.consumesOptionsFor(C),consumesValue:x.contentTypeValues(C).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:w,isExecute:u,specSelectors:x,pathMethod:C});const ee=i(\"modelExample\"),ie=i(\"Markdown\",!0),ae=i(\"ParameterExt\"),ce=i(\"ParameterIncludeEmpty\"),le=i(\"ExamplesSelectValueRetainer\"),pe=i(\"Example\");let{schema:de}=getParameterSchema(s,{isOAS3:B}),fe=x.parameterWithMetaByIdentity(C,o)||(0,ze.Map)();B&&(de=this.composeJsonSchema(de));let ye=de?de.get(\"format\"):null,be=\"formData\"===Y,_e=\"FormData\"in lt,Se=s.get(\"required\");const we=_.getSchemaObjectType(de),xe=_.getSchemaObjectType(de?.get(\"items\")),Pe=_.getSchemaObjectTypeLabel(de),Te=!Z&&\"object\"===we,$e=!Z&&\"object\"===xe;let qe,We,He,Ye,Xe=fe?fe.get(\"value\"):\"\",Qe=V?getCommonExtensions(de):null,et=$?getExtensions(s):null,tt=!1;void 0!==s&&de&&(qe=de.get(\"items\")),void 0!==qe?(We=qe.get(\"enum\"),He=qe.get(\"default\")):de&&(We=de.get(\"enum\")),We&&We.size&&We.size>0&&(tt=!0),void 0!==s&&(de&&(He=de.get(\"default\")),void 0===He&&(He=s.get(\"default\")),Ye=s.get(\"example\"),void 0===Ye&&(Ye=s.get(\"x-example\")));const rt=Z?null:Re.createElement(U,{fn:_,getComponent:i,value:Xe,required:Se,disabled:!u,description:s.get(\"name\"),onChange:this.onChangeWrapper,errors:fe.get(\"errors\"),schema:de});return Re.createElement(\"tr\",{\"data-param-name\":s.get(\"name\"),\"data-param-in\":s.get(\"in\")},Re.createElement(\"td\",{className:\"parameters-col_name\"},Re.createElement(\"div\",{className:Se?\"parameter__name required\":\"parameter__name\"},s.get(\"name\"),Se?Re.createElement(\"span\",null,\" *\"):null),Re.createElement(\"div\",{className:\"parameter__type\"},Pe,ye&&Re.createElement(\"span\",{className:\"prop-format\"},\"($\",ye,\")\")),Re.createElement(\"div\",{className:\"parameter__deprecated\"},B&&s.get(\"deprecated\")?\"deprecated\":null),Re.createElement(\"div\",{className:\"parameter__in\"},\"(\",s.get(\"in\"),\")\")),Re.createElement(\"td\",{className:\"parameters-col_description\"},s.get(\"description\")?Re.createElement(ie,{source:s.get(\"description\")}):null,!Z&&u||!tt?null:Re.createElement(ie,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+We.map((function(s){return s})).toArray().map(String).join(\", \")}),!Z&&u||void 0===He?null:Re.createElement(ie,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+He}),!Z&&u||void 0===Ye?null:Re.createElement(ie,{source:\"<i>Example</i> : \"+Ye}),be&&!_e&&Re.createElement(\"div\",null,\"Error: your browser does not support FormData\"),B&&s.get(\"examples\")?Re.createElement(\"section\",{className:\"parameter-controls\"},Re.createElement(le,{examples:s.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:i,defaultToFirstExample:!0,currentKey:L.activeExamplesMember(...C,\"parameters\",this.getParamKey()),currentUserInputValue:Xe})):null,Te||$e?Re.createElement(ee,{getComponent:i,specPath:j.push(\"schema\"),getConfigs:a,isExecute:u,specSelectors:x,schema:de,example:rt}):rt,Z&&de?Re.createElement(ee,{getComponent:i,specPath:j.push(\"schema\"),getConfigs:a,isExecute:u,specSelectors:x,schema:de,example:Z,includeWriteOnly:!0}):null,!Z&&u&&s.get(\"allowEmptyValue\")?Re.createElement(ce,{onChange:this.onChangeIncludeEmpty,isIncluded:x.parameterInclusionSettingFor(C,s.get(\"name\"),s.get(\"in\")),isDisabled:!isEmptyValue(Xe)}):null,B&&s.get(\"examples\")?Re.createElement(pe,{example:s.getIn([\"examples\",L.activeExamplesMember(...C,\"parameters\",this.getParamKey())]),getComponent:i,getConfigs:a}):null,V&&Qe.size?Qe.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,xKey:s,xVal:o}))):null,$&&et.size?et.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,xKey:s,xVal:o}))):null))}}class Execute extends Re.Component{handleValidateParameters=()=>{let{specSelectors:s,specActions:o,path:i,method:a}=this.props;return o.validateParams([i,a]),s.validateBeforeExecute([i,a])};handleValidateRequestBody=()=>{let{path:s,method:o,specSelectors:i,oas3Selectors:a,oas3Actions:u}=this.props,_={missingBodyValue:!1,missingRequiredKeys:[]};u.clearRequestBodyValidateError({path:s,method:o});let w=i.getOAS3RequiredRequestBodyContentType([s,o]),x=a.requestBodyValue(s,o),C=a.validateBeforeExecute([s,o]),j=a.requestContentType(s,o);if(!C)return _.missingBodyValue=!0,u.setRequestBodyValidateError({path:s,method:o,validationErrors:_}),!1;if(!w)return!0;let L=a.validateShallowRequired({oas3RequiredRequestBodyContentType:w,oas3RequestContentType:j,oas3RequestBodyValue:x});return!L||L.length<1||(L.forEach((s=>{_.missingRequiredKeys.push(s)})),u.setRequestBodyValidateError({path:s,method:o,validationErrors:_}),!1)};handleValidationResultPass=()=>{let{specActions:s,operation:o,path:i,method:a}=this.props;this.props.onExecute&&this.props.onExecute(),s.execute({operation:o,path:i,method:a})};handleValidationResultFail=()=>{let{specActions:s,path:o,method:i}=this.props;s.clearValidateParams([o,i]),setTimeout((()=>{s.validateParams([o,i])}),40)};handleValidationResult=s=>{s?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let s=this.handleValidateParameters(),o=this.handleValidateRequestBody(),i=s&&o;this.handleValidationResult(i)};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);render(){const{disabled:s}=this.props;return Re.createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:s},\"Execute\")}}class headers_Headers extends Re.Component{render(){let{headers:s,getComponent:o}=this.props;const i=o(\"Property\"),a=o(\"Markdown\",!0);return s&&s.size?Re.createElement(\"div\",{className:\"headers-wrapper\"},Re.createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),Re.createElement(\"table\",{className:\"headers\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",{className:\"header-row\"},Re.createElement(\"th\",{className:\"header-col\"},\"Name\"),Re.createElement(\"th\",{className:\"header-col\"},\"Description\"),Re.createElement(\"th\",{className:\"header-col\"},\"Type\"))),Re.createElement(\"tbody\",null,s.entrySeq().map((([s,o])=>{if(!We().Map.isMap(o))return null;const u=o.get(\"description\"),_=o.getIn([\"schema\"])?o.getIn([\"schema\",\"type\"]):o.getIn([\"type\"]),w=o.getIn([\"schema\",\"example\"]);return Re.createElement(\"tr\",{key:s},Re.createElement(\"td\",{className:\"header-col\"},s),Re.createElement(\"td\",{className:\"header-col\"},u?Re.createElement(a,{source:u}):null),Re.createElement(\"td\",{className:\"header-col\"},_,\" \",w?Re.createElement(i,{propKey:\"Example\",propVal:w,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends Re.Component{render(){let{editorActions:s,errSelectors:o,layoutSelectors:i,layoutActions:a,getComponent:u}=this.props;const _=u(\"Collapse\");if(s&&s.jumpToLine)var w=s.jumpToLine;let x=o.allErrors().filter((s=>\"thrown\"===s.get(\"type\")||\"error\"===s.get(\"level\")));if(!x||x.count()<1)return null;let C=i.isShown([\"errorPane\"],!0),j=x.sortBy((s=>s.get(\"line\")));return Re.createElement(\"pre\",{className:\"errors-wrapper\"},Re.createElement(\"hgroup\",{className:\"error\"},Re.createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),Re.createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>a.show([\"errorPane\"],!C)},C?\"Hide\":\"Show\")),Re.createElement(_,{isOpened:C,animated:!0},Re.createElement(\"div\",{className:\"errors\"},j.map(((s,o)=>{let i=s.get(\"type\");return\"thrown\"===i||\"auth\"===i?Re.createElement(ThrownErrorItem,{key:o,error:s.get(\"error\")||s,jumpToLine:w}):\"spec\"===i?Re.createElement(SpecErrorItem,{key:o,error:s,jumpToLine:w}):void 0})))))}}const ThrownErrorItem=({error:s,jumpToLine:o})=>{if(!s)return null;let i=s.get(\"line\");return Re.createElement(\"div\",{className:\"error-wrapper\"},s?Re.createElement(\"div\",null,Re.createElement(\"h4\",null,s.get(\"source\")&&s.get(\"level\")?toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"):\"\",s.get(\"path\")?Re.createElement(\"small\",null,\" at \",s.get(\"path\")):null),Re.createElement(\"span\",{className:\"message thrown\"},s.get(\"message\")),Re.createElement(\"div\",{className:\"error-line\"},i&&o?Re.createElement(\"a\",{onClick:o.bind(null,i)},\"Jump to line \",i):null)):null)},SpecErrorItem=({error:s,jumpToLine:o=null})=>{let i=null;return s.get(\"path\")?i=ze.List.isList(s.get(\"path\"))?Re.createElement(\"small\",null,\"at \",s.get(\"path\").join(\".\")):Re.createElement(\"small\",null,\"at \",s.get(\"path\")):s.get(\"line\")&&!o&&(i=Re.createElement(\"small\",null,\"on line \",s.get(\"line\"))),Re.createElement(\"div\",{className:\"error-wrapper\"},s?Re.createElement(\"div\",null,Re.createElement(\"h4\",null,toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"),\" \",i),Re.createElement(\"span\",{className:\"message\"},s.get(\"message\")),Re.createElement(\"div\",{className:\"error-line\"},o?Re.createElement(\"a\",{onClick:o.bind(null,s.get(\"line\"))},\"Jump to line \",s.get(\"line\")):null)):null)};function toTitleCase(s){return(s||\"\").split(\" \").map((s=>s[0].toUpperCase()+s.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends Re.Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,ze.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(s){s.contentTypes&&s.contentTypes.size&&(s.contentTypes.includes(s.value)||s.onChange(s.contentTypes.first()))}onChangeWrapper=s=>this.props.onChange(s.target.value);render(){let{ariaControls:s,ariaLabel:o,className:i,contentTypes:a,controlId:u,value:_}=this.props;return a&&a.size?Re.createElement(\"div\",{className:\"content-type-wrapper \"+(i||\"\")},Re.createElement(\"select\",{\"aria-controls\":s,\"aria-label\":o,className:\"content-type\",id:u,onChange:this.onChangeWrapper,value:_||\"\"},a.map((s=>Re.createElement(\"option\",{key:s,value:s},s))).toArray())):null}}function xclass(...s){return s.filter((s=>!!s)).join(\" \").trim()}class Container extends Re.Component{render(){let{fullscreen:s,full:o,...i}=this.props;if(s)return Re.createElement(\"section\",i);let a=\"swagger-container\"+(o?\"-full\":\"\");return Re.createElement(\"section\",Mn()({},i,{className:xclass(i.className,a)}))}}const tC={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends Re.Component{render(){const{hide:s,keepContents:o,mobile:i,tablet:a,desktop:u,large:_,...w}=this.props;if(s&&!o)return Re.createElement(\"span\",null);let x=[];for(let s in tC){if(!Object.prototype.hasOwnProperty.call(tC,s))continue;let o=tC[s];if(s in this.props){let i=this.props[s];if(i<1){x.push(\"none\"+o);continue}x.push(\"block\"+o),x.push(\"col-\"+i+o)}}s&&x.push(\"hidden\");let C=xclass(w.className,...x);return Re.createElement(\"section\",Mn()({},w,{className:C}))}}class Row extends Re.Component{render(){return Re.createElement(\"div\",Mn()({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends Re.Component{static defaultProps={className:\"\"};render(){return Re.createElement(\"button\",Mn()({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=s=>Re.createElement(\"textarea\",s),Input=s=>Re.createElement(\"input\",s);class Select extends Re.Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(s,o){let i;super(s,o),i=s.value?s.value:s.multiple?[\"\"]:\"\",this.state={value:i}}onChange=s=>{let o,{onChange:i,multiple:a}=this.props,u=[].slice.call(s.target.options);o=a?u.filter((function(s){return s.selected})).map((function(s){return s.value})):s.target.value,this.setState({value:o}),i&&i(o)};UNSAFE_componentWillReceiveProps(s){s.value!==this.props.value&&this.setState({value:s.value})}render(){let{allowedValues:s,multiple:o,allowEmptyValue:i,disabled:a}=this.props,u=this.state.value?.toJS?.()||this.state.value;return Re.createElement(\"select\",{className:this.props.className,multiple:o,value:u,onChange:this.onChange,disabled:a},i?Re.createElement(\"option\",{value:\"\"},\"--\"):null,s.map((function(s,o){return Re.createElement(\"option\",{key:o,value:String(s)},String(s))})))}}class layout_utils_Link extends Re.Component{render(){return Re.createElement(\"a\",Mn()({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:s})=>Re.createElement(\"div\",{className:\"no-margin\"},\" \",s,\" \");class Collapse extends Re.Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?Re.createElement(NoMargin,null,this.props.children):Re.createElement(\"noscript\",null)}render(){let{animated:s,isOpened:o,children:i}=this.props;return s?(i=o?i:null,Re.createElement(NoMargin,null,i)):this.renderNotAnimated()}}class Overview extends Re.Component{constructor(...s){super(...s),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(s,o){this.props.layoutActions.show(s,o)}showOp(s,o){let{layoutActions:i}=this.props;i.show(s,o)}render(){let{specSelectors:s,layoutSelectors:o,layoutActions:i,getComponent:a}=this.props,u=s.taggedOperations();const _=a(\"Collapse\");return Re.createElement(\"div\",null,Re.createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),u.map(((s,a)=>{let u=s.get(\"operations\"),w=[\"overview-tags\",a],x=o.isShown(w,!0);return Re.createElement(\"div\",{key:\"overview-\"+a},Re.createElement(\"h4\",{onClick:()=>i.show(w,!x),className:\"link overview-tag\"},\" \",x?\"-\":\"+\",a),Re.createElement(_,{isOpened:x,animated:!0},u.map((s=>{let{path:a,method:u,id:_}=s.toObject(),w=\"operations\",x=_,C=o.isShown([w,x]);return Re.createElement(OperationLink,{key:_,path:a,method:u,id:a+\"-\"+u,shown:C,showOpId:x,showOpIdPrefix:w,href:`#operation-${x}`,onClick:i.show})})).toArray()))})).toArray(),u.size<1&&Re.createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends Re.Component{constructor(s){super(s),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:s,showOpIdPrefix:o,onClick:i,shown:a}=this.props;i([o,s],!a)}render(){let{id:s,method:o,shown:i,href:a}=this.props;return Re.createElement(layout_utils_Link,{href:a,onClick:this.onClick,className:\"block opblock-link \"+(i?\"shown\":\"\")},Re.createElement(\"div\",null,Re.createElement(\"small\",{className:`bold-label-${o}`},o.toUpperCase()),Re.createElement(\"span\",{className:\"bold-label\"},s)))}}class InitializedInput extends Re.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:s,defaultValue:o,initialValue:i,...a}=this.props;return Re.createElement(\"input\",Mn()({},a,{ref:s=>this.inputRef=s}))}}class InfoBasePath extends Re.Component{render(){const{host:s,basePath:o}=this.props;return Re.createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",s,o,\" ]\")}}class InfoUrl extends Re.PureComponent{render(){const{url:s,getComponent:o}=this.props,i=o(\"Link\");return Re.createElement(i,{target:\"_blank\",href:sanitizeUrl(s)},Re.createElement(\"span\",{className:\"url\"},\" \",s))}}class info_Info extends Re.Component{render(){const{info:s,url:o,host:i,basePath:a,getComponent:u,externalDocs:_,selectedServer:w,url:x}=this.props,C=s.get(\"version\"),j=s.get(\"description\"),L=s.get(\"title\"),B=safeBuildUrl(s.get(\"termsOfService\"),x,{selectedServer:w}),$=s.get(\"contact\"),V=s.get(\"license\"),U=safeBuildUrl(_&&_.get(\"url\"),x,{selectedServer:w}),z=_&&_.get(\"description\"),Y=u(\"Markdown\",!0),Z=u(\"Link\"),ee=u(\"VersionStamp\"),ie=u(\"OpenAPIVersion\"),ae=u(\"InfoUrl\"),ce=u(\"InfoBasePath\"),le=u(\"License\"),pe=u(\"Contact\");return Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"hgroup\",{className:\"main\"},Re.createElement(\"h2\",{className:\"title\"},L,Re.createElement(\"span\",null,C&&Re.createElement(ee,{version:C}),Re.createElement(ie,{oasVersion:\"2.0\"}))),i||a?Re.createElement(ce,{host:i,basePath:a}):null,o&&Re.createElement(ae,{getComponent:u,url:o})),Re.createElement(\"div\",{className:\"description\"},Re.createElement(Y,{source:j})),B&&Re.createElement(\"div\",{className:\"info__tos\"},Re.createElement(Z,{target:\"_blank\",href:sanitizeUrl(B)},\"Terms of service\")),$?.size>0&&Re.createElement(pe,{getComponent:u,data:$,selectedServer:w,url:o}),V?.size>0&&Re.createElement(le,{getComponent:u,license:V,selectedServer:w,url:o}),U?Re.createElement(Z,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(U)},z||U):null)}}const rC=info_Info;class InfoContainer extends Re.Component{render(){const{specSelectors:s,getComponent:o,oas3Selectors:i}=this.props,a=s.info(),u=s.url(),_=s.basePath(),w=s.host(),x=s.externalDocs(),C=i.selectedServer(),j=o(\"info\");return Re.createElement(\"div\",null,a&&a.count()?Re.createElement(j,{info:a,url:u,host:w,basePath:_,externalDocs:x,getComponent:o,selectedServer:C}):null)}}class contact_Contact extends Re.Component{render(){const{data:s,getComponent:o,selectedServer:i,url:a}=this.props,u=s.get(\"name\",\"the developer\"),_=safeBuildUrl(s.get(\"url\"),a,{selectedServer:i}),w=s.get(\"email\"),x=o(\"Link\");return Re.createElement(\"div\",{className:\"info__contact\"},_&&Re.createElement(\"div\",null,Re.createElement(x,{href:sanitizeUrl(_),target:\"_blank\"},u,\" - Website\")),w&&Re.createElement(x,{href:sanitizeUrl(`mailto:${w}`)},_?`Send email to ${u}`:`Contact ${u}`))}}const nC=contact_Contact;class license_License extends Re.Component{render(){const{license:s,getComponent:o,selectedServer:i,url:a}=this.props,u=s.get(\"name\",\"License\"),_=safeBuildUrl(s.get(\"url\"),a,{selectedServer:i}),w=o(\"Link\");return Re.createElement(\"div\",{className:\"info__license\"},_?Re.createElement(\"div\",{className:\"info__license__url\"},Re.createElement(w,{target:\"_blank\",href:sanitizeUrl(_)},u)):Re.createElement(\"span\",null,u))}}const sC=license_License;class JumpToPath extends Re.Component{render(){return null}}class CopyToClipboardBtn extends Re.Component{render(){let{getComponent:s}=this.props;const o=s(\"CopyIcon\");return Re.createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:this.props.textToCopy},Re.createElement(o,null)))}}class Footer extends Re.Component{render(){return Re.createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends Re.Component{onFilterChange=s=>{const{target:{value:o}}=s;this.props.layoutActions.updateFilter(o)};render(){const{specSelectors:s,layoutSelectors:o,getComponent:i}=this.props,a=i(\"Col\"),u=\"loading\"===s.loadingStatus(),_=\"failed\"===s.loadingStatus(),w=o.currentFilter(),x=[\"operation-filter-input\"];return _&&x.push(\"failed\"),u&&x.push(\"loading\"),Re.createElement(\"div\",null,!1===w?null:Re.createElement(\"div\",{className:\"filter-container\"},Re.createElement(a,{className:\"filter wrapper\",mobile:12},Re.createElement(\"input\",{className:x.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:\"string\"==typeof w?w:\"\",disabled:u}))))}}const oC=Function.prototype;class ParamBody extends Re.PureComponent{static defaultProp={consumes:(0,ze.fromJS)([\"application/json\"]),param:(0,ze.fromJS)({}),onChange:oC,onChangeConsumes:oC};constructor(s,o){super(s,o),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(s){this.updateValues.call(this,s)}updateValues=s=>{let{param:o,isExecute:i,consumesValue:a=\"\"}=s,u=/xml/i.test(a),_=/json/i.test(a),w=u?o.get(\"value_xml\"):o.get(\"value\");if(void 0!==w){let s=!w&&_?\"{}\":w;this.setState({value:s}),this.onChange(s,{isXml:u,isEditBox:i})}else u?this.onChange(this.sample(\"xml\"),{isXml:u,isEditBox:i}):this.onChange(this.sample(),{isEditBox:i})};sample=s=>{let{param:o,fn:i}=this.props,a=i.inferSchema(o.toJS());return i.getSampleSchema(a,s,{includeWriteOnly:!0})};onChange=(s,{isEditBox:o,isXml:i})=>{this.setState({value:s,isEditBox:o}),this._onChange(s,i)};_onChange=(s,o)=>{(this.props.onChange||oC)(s,o)};handleOnChange=s=>{const{consumesValue:o}=this.props,i=/xml/i.test(o),a=s.target.value;this.onChange(a,{isXml:i,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((s=>({isEditBox:!s.isEditBox})));render(){let{onChangeConsumes:s,param:o,isExecute:i,specSelectors:a,pathMethod:u,getComponent:_}=this.props;const w=_(\"Button\"),x=_(\"TextArea\"),C=_(\"HighlightCode\",!0),j=_(\"contentType\");let L=(a?a.parameterWithMetaByIdentity(u,o):o).get(\"errors\",(0,ze.List)()),B=a.contentTypeValues(u).get(\"requestContentType\"),$=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:V,isEditBox:U}=this.state,z=null;getKnownSyntaxHighlighterLanguage(V)&&(z=\"json\");const Y=`${createHtmlReadyId(`${u[1]}${u[0]}_parameters`)}_select`;return Re.createElement(\"div\",{className:\"body-param\",\"data-param-name\":o.get(\"name\"),\"data-param-in\":o.get(\"in\")},U&&i?Re.createElement(x,{className:\"body-param__text\"+(L.count()?\" invalid\":\"\"),value:V,onChange:this.handleOnChange}):V&&Re.createElement(C,{className:\"body-param__example\",language:z},V),Re.createElement(\"div\",{className:\"body-param-options\"},i?Re.createElement(\"div\",{className:\"body-param-edit\"},Re.createElement(w,{className:U?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},U?\"Cancel\":\"Edit\")):null,Re.createElement(\"label\",{htmlFor:Y},Re.createElement(\"span\",null,\"Parameter content type\"),Re.createElement(j,{value:B,contentTypes:$,onChange:s,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:Y}))))}}class Curl extends Re.Component{render(){const{request:s,getComponent:o}=this.props,i=requestSnippetGenerator_curl_bash(s),a=o(\"SyntaxHighlighter\",!0);return Re.createElement(\"div\",{className:\"curl-command\"},Re.createElement(\"h4\",null,\"Curl\"),Re.createElement(\"div\",{className:\"copy-to-clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:i},Re.createElement(\"button\",null))),Re.createElement(\"div\",null,Re.createElement(a,{language:\"bash\",className:\"curl microlight\",renderPlainText:({children:s,PlainTextViewer:o})=>Re.createElement(o,{className:\"curl\"},s)},i)))}}const property=({propKey:s,propVal:o,propClass:i})=>Re.createElement(\"span\",{className:i},Re.createElement(\"br\",null),s,\": \",String(o));class TryItOutButton extends Re.Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:s,onCancelClick:o,onResetClick:i,enabled:a,hasUserEditedBody:u,isOAS3:_}=this.props,w=_&&u;return Re.createElement(\"div\",{className:w?\"try-out btn-group\":\"try-out\"},a?Re.createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:o},\"Cancel\"):Re.createElement(\"button\",{className:\"btn try-out__btn\",onClick:s},\"Try it out \"),w&&Re.createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:i},\"Reset\"))}}class VersionPragmaFilter extends Re.PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:s,isSwagger2:o,isOAS3:i,alsoShow:a}=this.props;return s?Re.createElement(\"div\",null,this.props.children):o&&i?Re.createElement(\"div\",{className:\"version-pragma\"},a,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,Re.createElement(\"code\",null,\"swagger\"),\" and \",Re.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),Re.createElement(\"p\",null,\"Supported version fields are \",Re.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",Re.createElement(\"code\",null,\"openapi: 3.0.4\"),\").\")))):o||i?Re.createElement(\"div\",null,this.props.children):Re.createElement(\"div\",{className:\"version-pragma\"},a,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),Re.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",Re.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",Re.createElement(\"code\",null,\"openapi: 3.0.4\"),\").\"))))}}const version_stamp=({version:s})=>Re.createElement(\"small\",null,Re.createElement(\"pre\",{className:\"version\"},\" \",s,\" \")),openapi_version=({oasVersion:s})=>Re.createElement(\"small\",{className:\"version-stamp\"},Re.createElement(\"pre\",{className:\"version\"},\"OAS \",s)),deep_link=({enabled:s,path:o,text:i})=>Re.createElement(\"a\",{className:\"nostyle\",onClick:s?s=>s.preventDefault():null,href:s?`#/${o}`:null},Re.createElement(\"span\",null,i)),svg_assets=()=>Re.createElement(\"div\",null,Re.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},Re.createElement(\"defs\",null,Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},Re.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},Re.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},Re.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},Re.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},Re.createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},Re.createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},Re.createElement(\"g\",{transform:\"translate(2, -1)\"},Re.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))))));var iC;function decodeEntity(s){return(iC=iC||document.createElement(\"textarea\")).innerHTML=\"&\"+s+\";\",iC.value}var aC=Object.prototype.hasOwnProperty;function index_browser_has(s,o){return!!s&&aC.call(s,o)}function index_browser_assign(s){return[].slice.call(arguments,1).forEach((function(o){if(o){if(\"object\"!=typeof o)throw new TypeError(o+\"must be object\");Object.keys(o).forEach((function(i){s[i]=o[i]}))}})),s}var cC=/\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;function unescapeMd(s){return s.indexOf(\"\\\\\")<0?s:s.replace(cC,\"$1\")}function isValidEntityCode(s){return!(s>=55296&&s<=57343)&&(!(s>=64976&&s<=65007)&&(!!(65535&~s&&65534!=(65535&s))&&(!(s>=0&&s<=8)&&(11!==s&&(!(s>=14&&s<=31)&&(!(s>=127&&s<=159)&&!(s>1114111)))))))}function fromCodePoint(s){if(s>65535){var o=55296+((s-=65536)>>10),i=56320+(1023&s);return String.fromCharCode(o,i)}return String.fromCharCode(s)}var lC=/&([a-z#][a-z0-9]{1,31});/gi,uC=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function replaceEntityPattern(s,o){var i=0,a=decodeEntity(o);return o!==a?a:35===o.charCodeAt(0)&&uC.test(o)&&isValidEntityCode(i=\"x\"===o[1].toLowerCase()?parseInt(o.slice(2),16):parseInt(o.slice(1),10))?fromCodePoint(i):s}function replaceEntities(s){return s.indexOf(\"&\")<0?s:s.replace(lC,replaceEntityPattern)}var pC=/[&<>\"]/,hC=/[&<>\"]/g,dC={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\"};function replaceUnsafeChar(s){return dC[s]}function escapeHtml(s){return pC.test(s)?s.replace(hC,replaceUnsafeChar):s}var fC={};function nextToken(s,o){return++o>=s.length-2?o:\"paragraph_open\"===s[o].type&&s[o].tight&&\"inline\"===s[o+1].type&&0===s[o+1].content.length&&\"paragraph_close\"===s[o+2].type&&s[o+2].tight?nextToken(s,o+2):o}fC.blockquote_open=function(){return\"<blockquote>\\n\"},fC.blockquote_close=function(s,o){return\"</blockquote>\"+mC(s,o)},fC.code=function(s,o){return s[o].block?\"<pre><code>\"+escapeHtml(s[o].content)+\"</code></pre>\"+mC(s,o):\"<code>\"+escapeHtml(s[o].content)+\"</code>\"},fC.fence=function(s,o,i,a,u){var _,w,x=s[o],C=\"\",j=i.langPrefix;if(x.params){if(w=(_=x.params.split(/\\s+/g)).join(\" \"),index_browser_has(u.rules.fence_custom,_[0]))return u.rules.fence_custom[_[0]](s,o,i,a,u);C=' class=\"'+j+escapeHtml(replaceEntities(unescapeMd(w)))+'\"'}return\"<pre><code\"+C+\">\"+(i.highlight&&i.highlight.apply(i.highlight,[x.content].concat(_))||escapeHtml(x.content))+\"</code></pre>\"+mC(s,o)},fC.fence_custom={},fC.heading_open=function(s,o){return\"<h\"+s[o].hLevel+\">\"},fC.heading_close=function(s,o){return\"</h\"+s[o].hLevel+\">\\n\"},fC.hr=function(s,o,i){return(i.xhtmlOut?\"<hr />\":\"<hr>\")+mC(s,o)},fC.bullet_list_open=function(){return\"<ul>\\n\"},fC.bullet_list_close=function(s,o){return\"</ul>\"+mC(s,o)},fC.list_item_open=function(){return\"<li>\"},fC.list_item_close=function(){return\"</li>\\n\"},fC.ordered_list_open=function(s,o){var i=s[o];return\"<ol\"+(i.order>1?' start=\"'+i.order+'\"':\"\")+\">\\n\"},fC.ordered_list_close=function(s,o){return\"</ol>\"+mC(s,o)},fC.paragraph_open=function(s,o){return s[o].tight?\"\":\"<p>\"},fC.paragraph_close=function(s,o){var i=!(s[o].tight&&o&&\"inline\"===s[o-1].type&&!s[o-1].content);return(s[o].tight?\"\":\"</p>\")+(i?mC(s,o):\"\")},fC.link_open=function(s,o,i){var a=s[o].title?' title=\"'+escapeHtml(replaceEntities(s[o].title))+'\"':\"\",u=i.linkTarget?' target=\"'+i.linkTarget+'\"':\"\";return'<a href=\"'+escapeHtml(s[o].href)+'\"'+a+u+\">\"},fC.link_close=function(){return\"</a>\"},fC.image=function(s,o,i){var a=' src=\"'+escapeHtml(s[o].src)+'\"',u=s[o].title?' title=\"'+escapeHtml(replaceEntities(s[o].title))+'\"':\"\";return\"<img\"+a+(' alt=\"'+(s[o].alt?escapeHtml(replaceEntities(unescapeMd(s[o].alt))):\"\")+'\"')+u+(i.xhtmlOut?\" /\":\"\")+\">\"},fC.table_open=function(){return\"<table>\\n\"},fC.table_close=function(){return\"</table>\\n\"},fC.thead_open=function(){return\"<thead>\\n\"},fC.thead_close=function(){return\"</thead>\\n\"},fC.tbody_open=function(){return\"<tbody>\\n\"},fC.tbody_close=function(){return\"</tbody>\\n\"},fC.tr_open=function(){return\"<tr>\"},fC.tr_close=function(){return\"</tr>\\n\"},fC.th_open=function(s,o){var i=s[o];return\"<th\"+(i.align?' style=\"text-align:'+i.align+'\"':\"\")+\">\"},fC.th_close=function(){return\"</th>\"},fC.td_open=function(s,o){var i=s[o];return\"<td\"+(i.align?' style=\"text-align:'+i.align+'\"':\"\")+\">\"},fC.td_close=function(){return\"</td>\"},fC.strong_open=function(){return\"<strong>\"},fC.strong_close=function(){return\"</strong>\"},fC.em_open=function(){return\"<em>\"},fC.em_close=function(){return\"</em>\"},fC.del_open=function(){return\"<del>\"},fC.del_close=function(){return\"</del>\"},fC.ins_open=function(){return\"<ins>\"},fC.ins_close=function(){return\"</ins>\"},fC.mark_open=function(){return\"<mark>\"},fC.mark_close=function(){return\"</mark>\"},fC.sub=function(s,o){return\"<sub>\"+escapeHtml(s[o].content)+\"</sub>\"},fC.sup=function(s,o){return\"<sup>\"+escapeHtml(s[o].content)+\"</sup>\"},fC.hardbreak=function(s,o,i){return i.xhtmlOut?\"<br />\\n\":\"<br>\\n\"},fC.softbreak=function(s,o,i){return i.breaks?i.xhtmlOut?\"<br />\\n\":\"<br>\\n\":\"\\n\"},fC.text=function(s,o){return escapeHtml(s[o].content)},fC.htmlblock=function(s,o){return s[o].content},fC.htmltag=function(s,o){return s[o].content},fC.abbr_open=function(s,o){return'<abbr title=\"'+escapeHtml(replaceEntities(s[o].title))+'\">'},fC.abbr_close=function(){return\"</abbr>\"},fC.footnote_ref=function(s,o){var i=Number(s[o].id+1).toString(),a=\"fnref\"+i;return s[o].subId>0&&(a+=\":\"+s[o].subId),'<sup class=\"footnote-ref\"><a href=\"#fn'+i+'\" id=\"'+a+'\">['+i+\"]</a></sup>\"},fC.footnote_block_open=function(s,o,i){return(i.xhtmlOut?'<hr class=\"footnotes-sep\" />\\n':'<hr class=\"footnotes-sep\">\\n')+'<section class=\"footnotes\">\\n<ol class=\"footnotes-list\">\\n'},fC.footnote_block_close=function(){return\"</ol>\\n</section>\\n\"},fC.footnote_open=function(s,o){return'<li id=\"fn'+Number(s[o].id+1).toString()+'\"  class=\"footnote-item\">'},fC.footnote_close=function(){return\"</li>\\n\"},fC.footnote_anchor=function(s,o){var i=\"fnref\"+Number(s[o].id+1).toString();return s[o].subId>0&&(i+=\":\"+s[o].subId),' <a href=\"#'+i+'\" class=\"footnote-backref\">↩</a>'},fC.dl_open=function(){return\"<dl>\\n\"},fC.dt_open=function(){return\"<dt>\"},fC.dd_open=function(){return\"<dd>\"},fC.dl_close=function(){return\"</dl>\\n\"},fC.dt_close=function(){return\"</dt>\\n\"},fC.dd_close=function(){return\"</dd>\\n\"};var mC=fC.getBreak=function getBreak(s,o){return(o=nextToken(s,o))<s.length&&\"list_item_close\"===s[o].type?\"\":\"\\n\"};function Renderer(){this.rules=index_browser_assign({},fC),this.getBreak=fC.getBreak}function Ruler(){this.__rules__=[],this.__cache__=null}function StateInline(s,o,i,a,u){this.src=s,this.env=a,this.options=i,this.parser=o,this.tokens=u,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=\"\",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent=\"\",this.labelUnmatchedScopes=0}function parseLinkLabel(s,o){var i,a,u,_=-1,w=s.posMax,x=s.pos,C=s.isInLabel;if(s.isInLabel)return-1;if(s.labelUnmatchedScopes)return s.labelUnmatchedScopes--,-1;for(s.pos=o+1,s.isInLabel=!0,i=1;s.pos<w;){if(91===(u=s.src.charCodeAt(s.pos)))i++;else if(93===u&&0===--i){a=!0;break}s.parser.skipToken(s)}return a?(_=s.pos,s.labelUnmatchedScopes=0):s.labelUnmatchedScopes=i-1,s.pos=x,s.isInLabel=C,_}function parseAbbr(s,o,i,a){var u,_,w,x,C,j;if(42!==s.charCodeAt(0))return-1;if(91!==s.charCodeAt(1))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((_=parseLinkLabel(u=new StateInline(s,o,i,a,[]),1))<0||58!==s.charCodeAt(_+1))return-1;for(x=u.posMax,w=_+2;w<x&&10!==u.src.charCodeAt(w);w++);return C=s.slice(2,_),0===(j=s.slice(_+2,w).trim()).length?-1:(a.abbreviations||(a.abbreviations={}),void 0===a.abbreviations[\":\"+C]&&(a.abbreviations[\":\"+C]=j),w)}function normalizeLink(s){var o=replaceEntities(s);try{o=decodeURI(o)}catch(s){}return encodeURI(o)}function parseLinkDestination(s,o){var i,a,u,_=o,w=s.posMax;if(60===s.src.charCodeAt(o)){for(o++;o<w;){if(10===(i=s.src.charCodeAt(o)))return!1;if(62===i)return u=normalizeLink(unescapeMd(s.src.slice(_+1,o))),!!s.parser.validateLink(u)&&(s.pos=o+1,s.linkContent=u,!0);92===i&&o+1<w?o+=2:o++}return!1}for(a=0;o<w&&32!==(i=s.src.charCodeAt(o))&&!(i<32||127===i);)if(92===i&&o+1<w)o+=2;else{if(40===i&&++a>1)break;if(41===i&&--a<0)break;o++}return _!==o&&(u=unescapeMd(s.src.slice(_,o)),!!s.parser.validateLink(u)&&(s.linkContent=u,s.pos=o,!0))}function parseLinkTitle(s,o){var i,a=o,u=s.posMax,_=s.src.charCodeAt(o);if(34!==_&&39!==_&&40!==_)return!1;for(o++,40===_&&(_=41);o<u;){if((i=s.src.charCodeAt(o))===_)return s.pos=o+1,s.linkContent=unescapeMd(s.src.slice(a+1,o)),!0;92===i&&o+1<u?o+=2:o++}return!1}function normalizeReference(s){return s.trim().replace(/\\s+/g,\" \").toUpperCase()}function parseReference(s,o,i,a){var u,_,w,x,C,j,L,B,$;if(91!==s.charCodeAt(0))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((_=parseLinkLabel(u=new StateInline(s,o,i,a,[]),0))<0||58!==s.charCodeAt(_+1))return-1;for(x=u.posMax,w=_+2;w<x&&(32===(C=u.src.charCodeAt(w))||10===C);w++);if(!parseLinkDestination(u,w))return-1;for(L=u.linkContent,j=w=u.pos,w+=1;w<x&&(32===(C=u.src.charCodeAt(w))||10===C);w++);for(w<x&&j!==w&&parseLinkTitle(u,w)?(B=u.linkContent,w=u.pos):(B=\"\",w=j);w<x&&32===u.src.charCodeAt(w);)w++;return w<x&&10!==u.src.charCodeAt(w)?-1:($=normalizeReference(s.slice(1,_)),void 0===a.references[$]&&(a.references[$]={title:B,href:L}),w)}Renderer.prototype.renderInline=function(s,o,i){for(var a=this.rules,u=s.length,_=0,w=\"\";u--;)w+=a[s[_].type](s,_++,o,i,this);return w},Renderer.prototype.render=function(s,o,i){for(var a=this.rules,u=s.length,_=-1,w=\"\";++_<u;)\"inline\"===s[_].type?w+=this.renderInline(s[_].children,o,i):w+=a[s[_].type](s,_,o,i,this);return w},Ruler.prototype.__find__=function(s){for(var o=this.__rules__.length,i=-1;o--;)if(this.__rules__[++i].name===s)return i;return-1},Ruler.prototype.__compile__=function(){var s=this,o=[\"\"];s.__rules__.forEach((function(s){s.enabled&&s.alt.forEach((function(s){o.indexOf(s)<0&&o.push(s)}))})),s.__cache__={},o.forEach((function(o){s.__cache__[o]=[],s.__rules__.forEach((function(i){i.enabled&&(o&&i.alt.indexOf(o)<0||s.__cache__[o].push(i.fn))}))}))},Ruler.prototype.at=function(s,o,i){var a=this.__find__(s),u=i||{};if(-1===a)throw new Error(\"Parser rule not found: \"+s);this.__rules__[a].fn=o,this.__rules__[a].alt=u.alt||[],this.__cache__=null},Ruler.prototype.before=function(s,o,i,a){var u=this.__find__(s),_=a||{};if(-1===u)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(u,0,{name:o,enabled:!0,fn:i,alt:_.alt||[]}),this.__cache__=null},Ruler.prototype.after=function(s,o,i,a){var u=this.__find__(s),_=a||{};if(-1===u)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(u+1,0,{name:o,enabled:!0,fn:i,alt:_.alt||[]}),this.__cache__=null},Ruler.prototype.push=function(s,o,i){var a=i||{};this.__rules__.push({name:s,enabled:!0,fn:o,alt:a.alt||[]}),this.__cache__=null},Ruler.prototype.enable=function(s,o){s=Array.isArray(s)?s:[s],o&&this.__rules__.forEach((function(s){s.enabled=!1})),s.forEach((function(s){var o=this.__find__(s);if(o<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[o].enabled=!0}),this),this.__cache__=null},Ruler.prototype.disable=function(s){(s=Array.isArray(s)?s:[s]).forEach((function(s){var o=this.__find__(s);if(o<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[o].enabled=!1}),this),this.__cache__=null},Ruler.prototype.getRules=function(s){return null===this.__cache__&&this.__compile__(),this.__cache__[s]||[]},StateInline.prototype.pushPending=function(){this.tokens.push({type:\"text\",content:this.pending,level:this.pendingLevel}),this.pending=\"\"},StateInline.prototype.push=function(s){this.pending&&this.pushPending(),this.tokens.push(s),this.pendingLevel=this.level},StateInline.prototype.cacheSet=function(s,o){for(var i=this.cache.length;i<=s;i++)this.cache.push(0);this.cache[s]=o},StateInline.prototype.cacheGet=function(s){return s<this.cache.length?this.cache[s]:0};var gC=\" \\n()[]'\\\".,!?-\";function regEscape(s){return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,\"\\\\$1\")}var yC=/\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/,vC=/\\((c|tm|r|p)\\)/gi,bC={c:\"©\",r:\"®\",p:\"§\",tm:\"™\"};function replaceScopedAbbr(s){return s.indexOf(\"(\")<0?s:s.replace(vC,(function(s,o){return bC[o.toLowerCase()]}))}var _C=/['\"]/,SC=/['\"]/g,EC=/[-\\s()\\[\\]]/;function isLetter(s,o){return!(o<0||o>=s.length)&&!EC.test(s[o])}function replaceAt(s,o,i){return s.substr(0,o)+i+s.substr(o+1)}var wC=[[\"block\",function block(s){s.inlineMode?s.tokens.push({type:\"inline\",content:s.src.replace(/\\n/g,\" \").trim(),level:0,lines:[0,1],children:[]}):s.block.parse(s.src,s.options,s.env,s.tokens)}],[\"abbr\",function abbr(s){var o,i,a,u,_=s.tokens;if(!s.inlineMode)for(o=1,i=_.length-1;o<i;o++)if(\"paragraph_open\"===_[o-1].type&&\"inline\"===_[o].type&&\"paragraph_close\"===_[o+1].type){for(a=_[o].content;a.length&&!((u=parseAbbr(a,s.inline,s.options,s.env))<0);)a=a.slice(u).trim();_[o].content=a,a.length||(_[o-1].tight=!0,_[o+1].tight=!0)}}],[\"references\",function references(s){var o,i,a,u,_=s.tokens;if(s.env.references=s.env.references||{},!s.inlineMode)for(o=1,i=_.length-1;o<i;o++)if(\"inline\"===_[o].type&&\"paragraph_open\"===_[o-1].type&&\"paragraph_close\"===_[o+1].type){for(a=_[o].content;a.length&&!((u=parseReference(a,s.inline,s.options,s.env))<0);)a=a.slice(u).trim();_[o].content=a,a.length||(_[o-1].tight=!0,_[o+1].tight=!0)}}],[\"inline\",function inline(s){var o,i,a,u=s.tokens;for(i=0,a=u.length;i<a;i++)\"inline\"===(o=u[i]).type&&s.inline.parse(o.content,s.options,s.env,o.children)}],[\"footnote_tail\",function footnote_block(s){var o,i,a,u,_,w,x,C,j,L=0,B=!1,$={};if(s.env.footnotes&&(s.tokens=s.tokens.filter((function(s){return\"footnote_reference_open\"===s.type?(B=!0,C=[],j=s.label,!1):\"footnote_reference_close\"===s.type?(B=!1,$[\":\"+j]=C,!1):(B&&C.push(s),!B)})),s.env.footnotes.list)){for(w=s.env.footnotes.list,s.tokens.push({type:\"footnote_block_open\",level:L++}),o=0,i=w.length;o<i;o++){for(s.tokens.push({type:\"footnote_open\",id:o,level:L++}),w[o].tokens?((x=[]).push({type:\"paragraph_open\",tight:!1,level:L++}),x.push({type:\"inline\",content:\"\",level:L,children:w[o].tokens}),x.push({type:\"paragraph_close\",tight:!1,level:--L})):w[o].label&&(x=$[\":\"+w[o].label]),s.tokens=s.tokens.concat(x),_=\"paragraph_close\"===s.tokens[s.tokens.length-1].type?s.tokens.pop():null,u=w[o].count>0?w[o].count:1,a=0;a<u;a++)s.tokens.push({type:\"footnote_anchor\",id:o,subId:a,level:L});_&&s.tokens.push(_),s.tokens.push({type:\"footnote_close\",level:--L})}s.tokens.push({type:\"footnote_block_close\",level:--L})}}],[\"abbr2\",function abbr2(s){var o,i,a,u,_,w,x,C,j,L,B,$,V=s.tokens;if(s.env.abbreviations)for(s.env.abbrRegExp||($=\"(^|[\"+gC.split(\"\").map(regEscape).join(\"\")+\"])(\"+Object.keys(s.env.abbreviations).map((function(s){return s.substr(1)})).sort((function(s,o){return o.length-s.length})).map(regEscape).join(\"|\")+\")($|[\"+gC.split(\"\").map(regEscape).join(\"\")+\"])\",s.env.abbrRegExp=new RegExp($,\"g\")),L=s.env.abbrRegExp,i=0,a=V.length;i<a;i++)if(\"inline\"===V[i].type)for(o=(u=V[i].children).length-1;o>=0;o--)if(\"text\"===(_=u[o]).type){for(C=0,w=_.content,L.lastIndex=0,j=_.level,x=[];B=L.exec(w);)L.lastIndex>C&&x.push({type:\"text\",content:w.slice(C,B.index+B[1].length),level:j}),x.push({type:\"abbr_open\",title:s.env.abbreviations[\":\"+B[2]],level:j++}),x.push({type:\"text\",content:B[2],level:j}),x.push({type:\"abbr_close\",level:--j}),C=L.lastIndex-B[3].length;x.length&&(C<w.length&&x.push({type:\"text\",content:w.slice(C),level:j}),V[i].children=u=[].concat(u.slice(0,o),x,u.slice(o+1)))}}],[\"replacements\",function index_browser_replace(s){var o,i,a,u,_;if(s.options.typographer)for(_=s.tokens.length-1;_>=0;_--)if(\"inline\"===s.tokens[_].type)for(o=(u=s.tokens[_].children).length-1;o>=0;o--)\"text\"===(i=u[o]).type&&(a=replaceScopedAbbr(a=i.content),yC.test(a)&&(a=a.replace(/\\+-/g,\"±\").replace(/\\.{2,}/g,\"…\").replace(/([?!])…/g,\"$1..\").replace(/([?!]){4,}/g,\"$1$1$1\").replace(/,{2,}/g,\",\").replace(/(^|[^-])---([^-]|$)/gm,\"$1—$2\").replace(/(^|\\s)--(\\s|$)/gm,\"$1–$2\").replace(/(^|[^-\\s])--([^-\\s]|$)/gm,\"$1–$2\")),i.content=a)}],[\"smartquotes\",function smartquotes(s){var o,i,a,u,_,w,x,C,j,L,B,$,V,U,z,Y,Z;if(s.options.typographer)for(Z=[],z=s.tokens.length-1;z>=0;z--)if(\"inline\"===s.tokens[z].type)for(Y=s.tokens[z].children,Z.length=0,o=0;o<Y.length;o++)if(\"text\"===(i=Y[o]).type&&!_C.test(i.text)){for(x=Y[o].level,V=Z.length-1;V>=0&&!(Z[V].level<=x);V--);Z.length=V+1,_=0,w=(a=i.content).length;e:for(;_<w&&(SC.lastIndex=_,u=SC.exec(a));)if(C=!isLetter(a,u.index-1),_=u.index+1,U=\"'\"===u[0],(j=!isLetter(a,_))||C){if(B=!j,$=!C)for(V=Z.length-1;V>=0&&(L=Z[V],!(Z[V].level<x));V--)if(L.single===U&&Z[V].level===x){L=Z[V],U?(Y[L.token].content=replaceAt(Y[L.token].content,L.pos,s.options.quotes[2]),i.content=replaceAt(i.content,u.index,s.options.quotes[3])):(Y[L.token].content=replaceAt(Y[L.token].content,L.pos,s.options.quotes[0]),i.content=replaceAt(i.content,u.index,s.options.quotes[1])),Z.length=V;continue e}B?Z.push({token:o,pos:u.index,single:U,level:x}):$&&U&&(i.content=replaceAt(i.content,u.index,\"’\"))}else U&&(i.content=replaceAt(i.content,u.index,\"’\"))}}]];function Core(){this.options={},this.ruler=new Ruler;for(var s=0;s<wC.length;s++)this.ruler.push(wC[s][0],wC[s][1])}function StateBlock(s,o,i,a,u){var _,w,x,C,j,L,B;for(this.src=s,this.parser=o,this.options=i,this.env=a,this.tokens=u,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType=\"root\",this.ddIndent=-1,this.level=0,this.result=\"\",L=0,B=!1,x=C=L=0,j=(w=this.src).length;C<j;C++){if(_=w.charCodeAt(C),!B){if(32===_){L++;continue}B=!0}10!==_&&C!==j-1||(10!==_&&C++,this.bMarks.push(x),this.eMarks.push(C),this.tShift.push(L),B=!1,L=0,x=C+1)}this.bMarks.push(w.length),this.eMarks.push(w.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}function skipBulletListMarker(s,o){var i,a,u;return(a=s.bMarks[o]+s.tShift[o])>=(u=s.eMarks[o])||42!==(i=s.src.charCodeAt(a++))&&45!==i&&43!==i||a<u&&32!==s.src.charCodeAt(a)?-1:a}function skipOrderedListMarker(s,o){var i,a=s.bMarks[o]+s.tShift[o],u=s.eMarks[o];if(a+1>=u)return-1;if((i=s.src.charCodeAt(a++))<48||i>57)return-1;for(;;){if(a>=u)return-1;if(!((i=s.src.charCodeAt(a++))>=48&&i<=57)){if(41===i||46===i)break;return-1}}return a<u&&32!==s.src.charCodeAt(a)?-1:a}Core.prototype.process=function(s){var o,i,a;for(o=0,i=(a=this.ruler.getRules(\"\")).length;o<i;o++)a[o](s)},StateBlock.prototype.isEmpty=function isEmpty(s){return this.bMarks[s]+this.tShift[s]>=this.eMarks[s]},StateBlock.prototype.skipEmptyLines=function skipEmptyLines(s){for(var o=this.lineMax;s<o&&!(this.bMarks[s]+this.tShift[s]<this.eMarks[s]);s++);return s},StateBlock.prototype.skipSpaces=function skipSpaces(s){for(var o=this.src.length;s<o&&32===this.src.charCodeAt(s);s++);return s},StateBlock.prototype.skipChars=function skipChars(s,o){for(var i=this.src.length;s<i&&this.src.charCodeAt(s)===o;s++);return s},StateBlock.prototype.skipCharsBack=function skipCharsBack(s,o,i){if(s<=i)return s;for(;s>i;)if(o!==this.src.charCodeAt(--s))return s+1;return s},StateBlock.prototype.getLines=function getLines(s,o,i,a){var u,_,w,x,C,j=s;if(s>=o)return\"\";if(j+1===o)return _=this.bMarks[j]+Math.min(this.tShift[j],i),w=a?this.eMarks[j]+1:this.eMarks[j],this.src.slice(_,w);for(x=new Array(o-s),u=0;j<o;j++,u++)(C=this.tShift[j])>i&&(C=i),C<0&&(C=0),_=this.bMarks[j]+C,w=j+1<o||a?this.eMarks[j]+1:this.eMarks[j],x[u]=this.src.slice(_,w);return x.join(\"\")};var xC={};[\"article\",\"aside\",\"button\",\"blockquote\",\"body\",\"canvas\",\"caption\",\"col\",\"colgroup\",\"dd\",\"div\",\"dl\",\"dt\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"header\",\"hgroup\",\"hr\",\"iframe\",\"li\",\"map\",\"object\",\"ol\",\"output\",\"p\",\"pre\",\"progress\",\"script\",\"section\",\"style\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"tr\",\"thead\",\"ul\",\"video\"].forEach((function(s){xC[s]=!0}));var kC=/^<([a-zA-Z]{1,15})[\\s\\/>]/,OC=/^<\\/([a-zA-Z]{1,15})[\\s>]/;function index_browser_getLine(s,o){var i=s.bMarks[o]+s.blkIndent,a=s.eMarks[o];return s.src.substr(i,a-i)}function skipMarker(s,o){var i,a,u=s.bMarks[o]+s.tShift[o],_=s.eMarks[o];return u>=_||126!==(a=s.src.charCodeAt(u++))&&58!==a||u===(i=s.skipSpaces(u))||i>=_?-1:i}var CC=[[\"code\",function code(s,o,i){var a,u;if(s.tShift[o]-s.blkIndent<4)return!1;for(u=a=o+1;a<i;)if(s.isEmpty(a))a++;else{if(!(s.tShift[a]-s.blkIndent>=4))break;u=++a}return s.line=a,s.tokens.push({type:\"code\",content:s.getLines(o,u,4+s.blkIndent,!0),block:!0,lines:[o,s.line],level:s.level}),!0}],[\"fences\",function fences(s,o,i,a){var u,_,w,x,C,j=!1,L=s.bMarks[o]+s.tShift[o],B=s.eMarks[o];if(L+3>B)return!1;if(126!==(u=s.src.charCodeAt(L))&&96!==u)return!1;if(C=L,(_=(L=s.skipChars(L,u))-C)<3)return!1;if((w=s.src.slice(L,B).trim()).indexOf(\"`\")>=0)return!1;if(a)return!0;for(x=o;!(++x>=i)&&!((L=C=s.bMarks[x]+s.tShift[x])<(B=s.eMarks[x])&&s.tShift[x]<s.blkIndent);)if(s.src.charCodeAt(L)===u&&!(s.tShift[x]-s.blkIndent>=4||(L=s.skipChars(L,u))-C<_||(L=s.skipSpaces(L))<B)){j=!0;break}return _=s.tShift[o],s.line=x+(j?1:0),s.tokens.push({type:\"fence\",params:w,content:s.getLines(o+1,x,_,!0),lines:[o,s.line],level:s.level}),!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"blockquote\",function blockquote(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U,z=s.bMarks[o]+s.tShift[o],Y=s.eMarks[o];if(z>Y)return!1;if(62!==s.src.charCodeAt(z++))return!1;if(s.level>=s.options.maxNesting)return!1;if(a)return!0;for(32===s.src.charCodeAt(z)&&z++,C=s.blkIndent,s.blkIndent=0,x=[s.bMarks[o]],s.bMarks[o]=z,_=(z=z<Y?s.skipSpaces(z):z)>=Y,w=[s.tShift[o]],s.tShift[o]=z-s.bMarks[o],B=s.parser.ruler.getRules(\"blockquote\"),u=o+1;u<i&&!((z=s.bMarks[u]+s.tShift[u])>=(Y=s.eMarks[u]));u++)if(62!==s.src.charCodeAt(z++)){if(_)break;for(U=!1,$=0,V=B.length;$<V;$++)if(B[$](s,u,i,!0)){U=!0;break}if(U)break;x.push(s.bMarks[u]),w.push(s.tShift[u]),s.tShift[u]=-1337}else 32===s.src.charCodeAt(z)&&z++,x.push(s.bMarks[u]),s.bMarks[u]=z,_=(z=z<Y?s.skipSpaces(z):z)>=Y,w.push(s.tShift[u]),s.tShift[u]=z-s.bMarks[u];for(j=s.parentType,s.parentType=\"blockquote\",s.tokens.push({type:\"blockquote_open\",lines:L=[o,0],level:s.level++}),s.parser.tokenize(s,o,u),s.tokens.push({type:\"blockquote_close\",level:--s.level}),s.parentType=j,L[1]=s.line,$=0;$<w.length;$++)s.bMarks[$+o]=x[$],s.tShift[$+o]=w[$];return s.blkIndent=C,!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"hr\",function hr(s,o,i,a){var u,_,w,x=s.bMarks[o],C=s.eMarks[o];if((x+=s.tShift[o])>C)return!1;if(42!==(u=s.src.charCodeAt(x++))&&45!==u&&95!==u)return!1;for(_=1;x<C;){if((w=s.src.charCodeAt(x++))!==u&&32!==w)return!1;w===u&&_++}return!(_<3)&&(a||(s.line=o+1,s.tokens.push({type:\"hr\",lines:[o,s.line],level:s.level})),!0)},[\"paragraph\",\"blockquote\",\"list\"]],[\"list\",function index_browser_list(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U,z,Y,Z,ee,ie,ae,ce,le,pe,de,fe=!0;if((B=skipOrderedListMarker(s,o))>=0)z=!0;else{if(!((B=skipBulletListMarker(s,o))>=0))return!1;z=!1}if(s.level>=s.options.maxNesting)return!1;if(U=s.src.charCodeAt(B-1),a)return!0;for(Z=s.tokens.length,z?(L=s.bMarks[o]+s.tShift[o],V=Number(s.src.substr(L,B-L-1)),s.tokens.push({type:\"ordered_list_open\",order:V,lines:ie=[o,0],level:s.level++})):s.tokens.push({type:\"bullet_list_open\",lines:ie=[o,0],level:s.level++}),u=o,ee=!1,ce=s.parser.ruler.getRules(\"list\");!(!(u<i)||(($=(Y=s.skipSpaces(B))>=s.eMarks[u]?1:Y-B)>4&&($=1),$<1&&($=1),_=B-s.bMarks[u]+$,s.tokens.push({type:\"list_item_open\",lines:ae=[o,0],level:s.level++}),x=s.blkIndent,C=s.tight,w=s.tShift[o],j=s.parentType,s.tShift[o]=Y-s.bMarks[o],s.blkIndent=_,s.tight=!0,s.parentType=\"list\",s.parser.tokenize(s,o,i,!0),s.tight&&!ee||(fe=!1),ee=s.line-o>1&&s.isEmpty(s.line-1),s.blkIndent=x,s.tShift[o]=w,s.tight=C,s.parentType=j,s.tokens.push({type:\"list_item_close\",level:--s.level}),u=o=s.line,ae[1]=u,Y=s.bMarks[o],u>=i)||s.isEmpty(u)||s.tShift[u]<s.blkIndent);){for(de=!1,le=0,pe=ce.length;le<pe;le++)if(ce[le](s,u,i,!0)){de=!0;break}if(de)break;if(z){if((B=skipOrderedListMarker(s,u))<0)break}else if((B=skipBulletListMarker(s,u))<0)break;if(U!==s.src.charCodeAt(B-1))break}return s.tokens.push({type:z?\"ordered_list_close\":\"bullet_list_close\",level:--s.level}),ie[1]=u,s.line=u,fe&&function markTightParagraphs(s,o){var i,a,u=s.level+2;for(i=o+2,a=s.tokens.length-2;i<a;i++)s.tokens[i].level===u&&\"paragraph_open\"===s.tokens[i].type&&(s.tokens[i+2].tight=!0,s.tokens[i].tight=!0,i+=2)}(s,Z),!0},[\"paragraph\",\"blockquote\"]],[\"footnote\",function footnote(s,o,i,a){var u,_,w,x,C,j=s.bMarks[o]+s.tShift[o],L=s.eMarks[o];if(j+4>L)return!1;if(91!==s.src.charCodeAt(j))return!1;if(94!==s.src.charCodeAt(j+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(x=j+2;x<L;x++){if(32===s.src.charCodeAt(x))return!1;if(93===s.src.charCodeAt(x))break}return x!==j+2&&(!(x+1>=L||58!==s.src.charCodeAt(++x))&&(a||(x++,s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.refs||(s.env.footnotes.refs={}),C=s.src.slice(j+2,x-2),s.env.footnotes.refs[\":\"+C]=-1,s.tokens.push({type:\"footnote_reference_open\",label:C,level:s.level++}),u=s.bMarks[o],_=s.tShift[o],w=s.parentType,s.tShift[o]=s.skipSpaces(x)-x,s.bMarks[o]=x,s.blkIndent+=4,s.parentType=\"footnote\",s.tShift[o]<s.blkIndent&&(s.tShift[o]+=s.blkIndent,s.bMarks[o]-=s.blkIndent),s.parser.tokenize(s,o,i,!0),s.parentType=w,s.blkIndent-=4,s.tShift[o]=_,s.bMarks[o]=u,s.tokens.push({type:\"footnote_reference_close\",level:--s.level})),!0))},[\"paragraph\"]],[\"heading\",function heading(s,o,i,a){var u,_,w,x=s.bMarks[o]+s.tShift[o],C=s.eMarks[o];if(x>=C)return!1;if(35!==(u=s.src.charCodeAt(x))||x>=C)return!1;for(_=1,u=s.src.charCodeAt(++x);35===u&&x<C&&_<=6;)_++,u=s.src.charCodeAt(++x);return!(_>6||x<C&&32!==u)&&(a||(C=s.skipCharsBack(C,32,x),(w=s.skipCharsBack(C,35,x))>x&&32===s.src.charCodeAt(w-1)&&(C=w),s.line=o+1,s.tokens.push({type:\"heading_open\",hLevel:_,lines:[o,s.line],level:s.level}),x<C&&s.tokens.push({type:\"inline\",content:s.src.slice(x,C).trim(),level:s.level+1,lines:[o,s.line],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:_,level:s.level})),!0)},[\"paragraph\",\"blockquote\"]],[\"lheading\",function lheading(s,o,i){var a,u,_,w=o+1;return!(w>=i)&&(!(s.tShift[w]<s.blkIndent)&&(!(s.tShift[w]-s.blkIndent>3)&&(!((u=s.bMarks[w]+s.tShift[w])>=(_=s.eMarks[w]))&&((45===(a=s.src.charCodeAt(u))||61===a)&&(u=s.skipChars(u,a),!((u=s.skipSpaces(u))<_)&&(u=s.bMarks[o]+s.tShift[o],s.line=w+1,s.tokens.push({type:\"heading_open\",hLevel:61===a?1:2,lines:[o,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:s.src.slice(u,s.eMarks[o]).trim(),level:s.level+1,lines:[o,s.line-1],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:61===a?1:2,level:s.level}),!0))))))}],[\"htmlblock\",function htmlblock(s,o,i,a){var u,_,w,x=s.bMarks[o],C=s.eMarks[o],j=s.tShift[o];if(x+=j,!s.options.html)return!1;if(j>3||x+2>=C)return!1;if(60!==s.src.charCodeAt(x))return!1;if(33===(u=s.src.charCodeAt(x+1))||63===u){if(a)return!0}else{if(47!==u&&!function isLetter$1(s){var o=32|s;return o>=97&&o<=122}(u))return!1;if(47===u){if(!(_=s.src.slice(x,C).match(OC)))return!1}else if(!(_=s.src.slice(x,C).match(kC)))return!1;if(!0!==xC[_[1].toLowerCase()])return!1;if(a)return!0}for(w=o+1;w<s.lineMax&&!s.isEmpty(w);)w++;return s.line=w,s.tokens.push({type:\"htmlblock\",level:s.level,lines:[o,s.line],content:s.getLines(o,w,0,!0)}),!0},[\"paragraph\",\"blockquote\"]],[\"table\",function table(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U;if(o+2>i)return!1;if(C=o+1,s.tShift[C]<s.blkIndent)return!1;if((w=s.bMarks[C]+s.tShift[C])>=s.eMarks[C])return!1;if(124!==(u=s.src.charCodeAt(w))&&45!==u&&58!==u)return!1;if(_=index_browser_getLine(s,o+1),!/^[-:| ]+$/.test(_))return!1;if((j=_.split(\"|\"))<=2)return!1;for(B=[],x=0;x<j.length;x++){if(!($=j[x].trim())){if(0===x||x===j.length-1)continue;return!1}if(!/^:?-+:?$/.test($))return!1;58===$.charCodeAt($.length-1)?B.push(58===$.charCodeAt(0)?\"center\":\"right\"):58===$.charCodeAt(0)?B.push(\"left\"):B.push(\"\")}if(-1===(_=index_browser_getLine(s,o).trim()).indexOf(\"|\"))return!1;if(j=_.replace(/^\\||\\|$/g,\"\").split(\"|\"),B.length!==j.length)return!1;if(a)return!0;for(s.tokens.push({type:\"table_open\",lines:V=[o,0],level:s.level++}),s.tokens.push({type:\"thead_open\",lines:[o,o+1],level:s.level++}),s.tokens.push({type:\"tr_open\",lines:[o,o+1],level:s.level++}),x=0;x<j.length;x++)s.tokens.push({type:\"th_open\",align:B[x],lines:[o,o+1],level:s.level++}),s.tokens.push({type:\"inline\",content:j[x].trim(),lines:[o,o+1],level:s.level,children:[]}),s.tokens.push({type:\"th_close\",level:--s.level});for(s.tokens.push({type:\"tr_close\",level:--s.level}),s.tokens.push({type:\"thead_close\",level:--s.level}),s.tokens.push({type:\"tbody_open\",lines:U=[o+2,0],level:s.level++}),C=o+2;C<i&&!(s.tShift[C]<s.blkIndent)&&-1!==(_=index_browser_getLine(s,C).trim()).indexOf(\"|\");C++){for(j=_.replace(/^\\||\\|$/g,\"\").split(\"|\"),s.tokens.push({type:\"tr_open\",level:s.level++}),x=0;x<j.length;x++)s.tokens.push({type:\"td_open\",align:B[x],level:s.level++}),L=j[x].substring(124===j[x].charCodeAt(0)?1:0,124===j[x].charCodeAt(j[x].length-1)?j[x].length-1:j[x].length).trim(),s.tokens.push({type:\"inline\",content:L,level:s.level,children:[]}),s.tokens.push({type:\"td_close\",level:--s.level});s.tokens.push({type:\"tr_close\",level:--s.level})}return s.tokens.push({type:\"tbody_close\",level:--s.level}),s.tokens.push({type:\"table_close\",level:--s.level}),V[1]=U[1]=C,s.line=C,!0},[\"paragraph\"]],[\"deflist\",function deflist(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U,z,Y,Z;if(a)return!(s.ddIndent<0)&&skipMarker(s,o)>=0;if(L=o+1,s.isEmpty(L)&&++L>i)return!1;if(s.tShift[L]<s.blkIndent)return!1;if((u=skipMarker(s,L))<0)return!1;if(s.level>=s.options.maxNesting)return!1;j=s.tokens.length,s.tokens.push({type:\"dl_open\",lines:C=[o,0],level:s.level++}),w=o,_=L;e:for(;;){for(Z=!0,Y=!1,s.tokens.push({type:\"dt_open\",lines:[w,w],level:s.level++}),s.tokens.push({type:\"inline\",content:s.getLines(w,w+1,s.blkIndent,!1).trim(),level:s.level+1,lines:[w,w],children:[]}),s.tokens.push({type:\"dt_close\",level:--s.level});;){if(s.tokens.push({type:\"dd_open\",lines:x=[L,0],level:s.level++}),z=s.tight,$=s.ddIndent,B=s.blkIndent,U=s.tShift[_],V=s.parentType,s.blkIndent=s.ddIndent=s.tShift[_]+2,s.tShift[_]=u-s.bMarks[_],s.tight=!0,s.parentType=\"deflist\",s.parser.tokenize(s,_,i,!0),s.tight&&!Y||(Z=!1),Y=s.line-_>1&&s.isEmpty(s.line-1),s.tShift[_]=U,s.tight=z,s.parentType=V,s.blkIndent=B,s.ddIndent=$,s.tokens.push({type:\"dd_close\",level:--s.level}),x[1]=L=s.line,L>=i)break e;if(s.tShift[L]<s.blkIndent)break e;if((u=skipMarker(s,L))<0)break;_=L}if(L>=i)break;if(w=L,s.isEmpty(w))break;if(s.tShift[w]<s.blkIndent)break;if((_=w+1)>=i)break;if(s.isEmpty(_)&&_++,_>=i)break;if(s.tShift[_]<s.blkIndent)break;if((u=skipMarker(s,_))<0)break}return s.tokens.push({type:\"dl_close\",level:--s.level}),C[1]=L,s.line=L,Z&&function markTightParagraphs$1(s,o){var i,a,u=s.level+2;for(i=o+2,a=s.tokens.length-2;i<a;i++)s.tokens[i].level===u&&\"paragraph_open\"===s.tokens[i].type&&(s.tokens[i+2].tight=!0,s.tokens[i].tight=!0,i+=2)}(s,j),!0},[\"paragraph\"]],[\"paragraph\",function paragraph(s,o){var i,a,u,_,w,x,C=o+1;if(C<(i=s.lineMax)&&!s.isEmpty(C))for(x=s.parser.ruler.getRules(\"paragraph\");C<i&&!s.isEmpty(C);C++)if(!(s.tShift[C]-s.blkIndent>3)){for(u=!1,_=0,w=x.length;_<w;_++)if(x[_](s,C,i,!0)){u=!0;break}if(u)break}return a=s.getLines(o,C,s.blkIndent,!1).trim(),s.line=C,a.length&&(s.tokens.push({type:\"paragraph_open\",tight:!1,lines:[o,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:a,level:s.level+1,lines:[o,s.line],children:[]}),s.tokens.push({type:\"paragraph_close\",tight:!1,level:s.level})),!0}]];function ParserBlock(){this.ruler=new Ruler;for(var s=0;s<CC.length;s++)this.ruler.push(CC[s][0],CC[s][1],{alt:(CC[s][2]||[]).slice()})}ParserBlock.prototype.tokenize=function(s,o,i){for(var a,u=this.ruler.getRules(\"\"),_=u.length,w=o,x=!1;w<i&&(s.line=w=s.skipEmptyLines(w),!(w>=i))&&!(s.tShift[w]<s.blkIndent);){for(a=0;a<_&&!u[a](s,w,i,!1);a++);if(s.tight=!x,s.isEmpty(s.line-1)&&(x=!0),(w=s.line)<i&&s.isEmpty(w)){if(x=!0,++w<i&&\"list\"===s.parentType&&s.isEmpty(w))break;s.line=w}}};var AC=/[\\n\\t]/g,jC=/\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g,IC=/\\u00a0/g;function isTerminatorChar(s){switch(s){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}ParserBlock.prototype.parse=function(s,o,i,a){var u,_=0,w=0;if(!s)return[];(s=(s=s.replace(IC,\" \")).replace(jC,\"\\n\")).indexOf(\"\\t\")>=0&&(s=s.replace(AC,(function(o,i){var a;return 10===s.charCodeAt(i)?(_=i+1,w=0,o):(a=\"    \".slice((i-_-w)%4),w=i-_+1,a)}))),u=new StateBlock(s,this,o,i,a),this.tokenize(u,u.line,u.lineMax)};for(var PC=[],TC=0;TC<256;TC++)PC.push(0);function isAlphaNum(s){return s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122}function scanDelims(s,o){var i,a,u,_=o,w=!0,x=!0,C=s.posMax,j=s.src.charCodeAt(o);for(i=o>0?s.src.charCodeAt(o-1):-1;_<C&&s.src.charCodeAt(_)===j;)_++;return _>=C&&(w=!1),(u=_-o)>=4?w=x=!1:(32!==(a=_<C?s.src.charCodeAt(_):-1)&&10!==a||(w=!1),32!==i&&10!==i||(x=!1),95===j&&(isAlphaNum(i)&&(w=!1),isAlphaNum(a)&&(x=!1))),{can_open:w,can_close:x,delims:u}}\"\\\\!\\\"#$%&'()*+,./:;<=>?@[]^_`{|}~-\".split(\"\").forEach((function(s){PC[s.charCodeAt(0)]=1}));var NC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var MC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var RC=[\"coap\",\"doi\",\"javascript\",\"aaa\",\"aaas\",\"about\",\"acap\",\"cap\",\"cid\",\"crid\",\"data\",\"dav\",\"dict\",\"dns\",\"file\",\"ftp\",\"geo\",\"go\",\"gopher\",\"h323\",\"http\",\"https\",\"iax\",\"icap\",\"im\",\"imap\",\"info\",\"ipp\",\"iris\",\"iris.beep\",\"iris.xpc\",\"iris.xpcs\",\"iris.lwz\",\"ldap\",\"mailto\",\"mid\",\"msrp\",\"msrps\",\"mtqp\",\"mupdate\",\"news\",\"nfs\",\"ni\",\"nih\",\"nntp\",\"opaquelocktoken\",\"pop\",\"pres\",\"rtsp\",\"service\",\"session\",\"shttp\",\"sieve\",\"sip\",\"sips\",\"sms\",\"snmp\",\"soap.beep\",\"soap.beeps\",\"tag\",\"tel\",\"telnet\",\"tftp\",\"thismessage\",\"tn3270\",\"tip\",\"tv\",\"urn\",\"vemmi\",\"ws\",\"wss\",\"xcon\",\"xcon-userid\",\"xmlrpc.beep\",\"xmlrpc.beeps\",\"xmpp\",\"z39.50r\",\"z39.50s\",\"adiumxtra\",\"afp\",\"afs\",\"aim\",\"apt\",\"attachment\",\"aw\",\"beshare\",\"bitcoin\",\"bolo\",\"callto\",\"chrome\",\"chrome-extension\",\"com-eventbrite-attendee\",\"content\",\"cvs\",\"dlna-playsingle\",\"dlna-playcontainer\",\"dtn\",\"dvb\",\"ed2k\",\"facetime\",\"feed\",\"finger\",\"fish\",\"gg\",\"git\",\"gizmoproject\",\"gtalk\",\"hcp\",\"icon\",\"ipn\",\"irc\",\"irc6\",\"ircs\",\"itms\",\"jar\",\"jms\",\"keyparc\",\"lastfm\",\"ldaps\",\"magnet\",\"maps\",\"market\",\"message\",\"mms\",\"ms-help\",\"msnim\",\"mumble\",\"mvn\",\"notes\",\"oid\",\"palm\",\"paparazzi\",\"platform\",\"proxy\",\"psyc\",\"query\",\"res\",\"resource\",\"rmi\",\"rsync\",\"rtmp\",\"secondlife\",\"sftp\",\"sgn\",\"skype\",\"smb\",\"soldat\",\"spotify\",\"ssh\",\"steam\",\"svn\",\"teamspeak\",\"things\",\"udp\",\"unreal\",\"ut2004\",\"ventrilo\",\"view-source\",\"webcal\",\"wtai\",\"wyciwyg\",\"xfire\",\"xri\",\"ymsgr\"],DC=/^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,LC=/^<([a-zA-Z.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;function replace$1(s,o){return s=s.source,o=o||\"\",function self(i,a){return i?(a=a.source||a,s=s.replace(i,a),self):new RegExp(s,o)}}var FC=replace$1(/(?:unquoted|single_quoted|double_quoted)/)(\"unquoted\",/[^\"'=<>`\\x00-\\x20]+/)(\"single_quoted\",/'[^']*'/)(\"double_quoted\",/\"[^\"]*\"/)(),BC=replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)(\"attr_name\",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)(\"attr_value\",FC)(),$C=replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)(\"attribute\",BC)(),qC=replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)(\"open_tag\",$C)(\"close_tag\",/<\\/[A-Za-z][A-Za-z0-9]*\\s*>/)(\"comment\",/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/)(\"processing\",/<[?].*?[?]>/)(\"declaration\",/<![A-Z]+\\s+[^>]*>/)(\"cdata\",/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/)();var VC=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,UC=/^&([a-z][a-z0-9]{1,31});/i;var zC=[[\"text\",function index_browser_text(s,o){for(var i=s.pos;i<s.posMax&&!isTerminatorChar(s.src.charCodeAt(i));)i++;return i!==s.pos&&(o||(s.pending+=s.src.slice(s.pos,i)),s.pos=i,!0)}],[\"newline\",function newline(s,o){var i,a,u=s.pos;if(10!==s.src.charCodeAt(u))return!1;if(i=s.pending.length-1,a=s.posMax,!o)if(i>=0&&32===s.pending.charCodeAt(i))if(i>=1&&32===s.pending.charCodeAt(i-1)){for(var _=i-2;_>=0;_--)if(32!==s.pending.charCodeAt(_)){s.pending=s.pending.substring(0,_+1);break}s.push({type:\"hardbreak\",level:s.level})}else s.pending=s.pending.slice(0,-1),s.push({type:\"softbreak\",level:s.level});else s.push({type:\"softbreak\",level:s.level});for(u++;u<a&&32===s.src.charCodeAt(u);)u++;return s.pos=u,!0}],[\"escape\",function index_browser_escape(s,o){var i,a=s.pos,u=s.posMax;if(92!==s.src.charCodeAt(a))return!1;if(++a<u){if((i=s.src.charCodeAt(a))<256&&0!==PC[i])return o||(s.pending+=s.src[a]),s.pos+=2,!0;if(10===i){for(o||s.push({type:\"hardbreak\",level:s.level}),a++;a<u&&32===s.src.charCodeAt(a);)a++;return s.pos=a,!0}}return o||(s.pending+=\"\\\\\"),s.pos++,!0}],[\"backticks\",function backticks(s,o){var i,a,u,_,w,x=s.pos;if(96!==s.src.charCodeAt(x))return!1;for(i=x,x++,a=s.posMax;x<a&&96===s.src.charCodeAt(x);)x++;for(u=s.src.slice(i,x),_=w=x;-1!==(_=s.src.indexOf(\"`\",w));){for(w=_+1;w<a&&96===s.src.charCodeAt(w);)w++;if(w-_===u.length)return o||s.push({type:\"code\",content:s.src.slice(x,_).replace(/[ \\n]+/g,\" \").trim(),block:!1,level:s.level}),s.pos=w,!0}return o||(s.pending+=u),s.pos+=u.length,!0}],[\"del\",function del(s,o){var i,a,u,_,w,x=s.posMax,C=s.pos;if(126!==s.src.charCodeAt(C))return!1;if(o)return!1;if(C+4>=x)return!1;if(126!==s.src.charCodeAt(C+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(_=C>0?s.src.charCodeAt(C-1):-1,w=s.src.charCodeAt(C+2),126===_)return!1;if(126===w)return!1;if(32===w||10===w)return!1;for(a=C+2;a<x&&126===s.src.charCodeAt(a);)a++;if(a>C+3)return s.pos+=a-C,o||(s.pending+=s.src.slice(C,a)),!0;for(s.pos=C+2,u=1;s.pos+1<x;){if(126===s.src.charCodeAt(s.pos)&&126===s.src.charCodeAt(s.pos+1)&&(_=s.src.charCodeAt(s.pos-1),126!==(w=s.pos+2<x?s.src.charCodeAt(s.pos+2):-1)&&126!==_&&(32!==_&&10!==_?u--:32!==w&&10!==w&&u++,u<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=C+2,o||(s.push({type:\"del_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"del_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=x,!0):(s.pos=C,!1)}],[\"ins\",function ins(s,o){var i,a,u,_,w,x=s.posMax,C=s.pos;if(43!==s.src.charCodeAt(C))return!1;if(o)return!1;if(C+4>=x)return!1;if(43!==s.src.charCodeAt(C+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(_=C>0?s.src.charCodeAt(C-1):-1,w=s.src.charCodeAt(C+2),43===_)return!1;if(43===w)return!1;if(32===w||10===w)return!1;for(a=C+2;a<x&&43===s.src.charCodeAt(a);)a++;if(a!==C+2)return s.pos+=a-C,o||(s.pending+=s.src.slice(C,a)),!0;for(s.pos=C+2,u=1;s.pos+1<x;){if(43===s.src.charCodeAt(s.pos)&&43===s.src.charCodeAt(s.pos+1)&&(_=s.src.charCodeAt(s.pos-1),43!==(w=s.pos+2<x?s.src.charCodeAt(s.pos+2):-1)&&43!==_&&(32!==_&&10!==_?u--:32!==w&&10!==w&&u++,u<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=C+2,o||(s.push({type:\"ins_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"ins_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=x,!0):(s.pos=C,!1)}],[\"mark\",function mark(s,o){var i,a,u,_,w,x=s.posMax,C=s.pos;if(61!==s.src.charCodeAt(C))return!1;if(o)return!1;if(C+4>=x)return!1;if(61!==s.src.charCodeAt(C+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(_=C>0?s.src.charCodeAt(C-1):-1,w=s.src.charCodeAt(C+2),61===_)return!1;if(61===w)return!1;if(32===w||10===w)return!1;for(a=C+2;a<x&&61===s.src.charCodeAt(a);)a++;if(a!==C+2)return s.pos+=a-C,o||(s.pending+=s.src.slice(C,a)),!0;for(s.pos=C+2,u=1;s.pos+1<x;){if(61===s.src.charCodeAt(s.pos)&&61===s.src.charCodeAt(s.pos+1)&&(_=s.src.charCodeAt(s.pos-1),61!==(w=s.pos+2<x?s.src.charCodeAt(s.pos+2):-1)&&61!==_&&(32!==_&&10!==_?u--:32!==w&&10!==w&&u++,u<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=C+2,o||(s.push({type:\"mark_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"mark_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=x,!0):(s.pos=C,!1)}],[\"emphasis\",function emphasis(s,o){var i,a,u,_,w,x,C,j=s.posMax,L=s.pos,B=s.src.charCodeAt(L);if(95!==B&&42!==B)return!1;if(o)return!1;if(i=(C=scanDelims(s,L)).delims,!C.can_open)return s.pos+=i,o||(s.pending+=s.src.slice(L,s.pos)),!0;if(s.level>=s.options.maxNesting)return!1;for(s.pos=L+i,x=[i];s.pos<j;)if(s.src.charCodeAt(s.pos)!==B)s.parser.skipToken(s);else{if(a=(C=scanDelims(s,s.pos)).delims,C.can_close){for(_=x.pop(),w=a;_!==w;){if(w<_){x.push(_-w);break}if(w-=_,0===x.length)break;s.pos+=_,_=x.pop()}if(0===x.length){i=_,u=!0;break}s.pos+=a;continue}C.can_open&&x.push(a),s.pos+=a}return u?(s.posMax=s.pos,s.pos=L+i,o||(2!==i&&3!==i||s.push({type:\"strong_open\",level:s.level++}),1!==i&&3!==i||s.push({type:\"em_open\",level:s.level++}),s.parser.tokenize(s),1!==i&&3!==i||s.push({type:\"em_close\",level:--s.level}),2!==i&&3!==i||s.push({type:\"strong_close\",level:--s.level})),s.pos=s.posMax+i,s.posMax=j,!0):(s.pos=L,!1)}],[\"sub\",function sub(s,o){var i,a,u=s.posMax,_=s.pos;if(126!==s.src.charCodeAt(_))return!1;if(o)return!1;if(_+2>=u)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=_+1;s.pos<u;){if(126===s.src.charCodeAt(s.pos)){i=!0;break}s.parser.skipToken(s)}return i&&_+1!==s.pos?(a=s.src.slice(_+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=_,!1):(s.posMax=s.pos,s.pos=_+1,o||s.push({type:\"sub\",level:s.level,content:a.replace(NC,\"$1\")}),s.pos=s.posMax+1,s.posMax=u,!0):(s.pos=_,!1)}],[\"sup\",function sup(s,o){var i,a,u=s.posMax,_=s.pos;if(94!==s.src.charCodeAt(_))return!1;if(o)return!1;if(_+2>=u)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=_+1;s.pos<u;){if(94===s.src.charCodeAt(s.pos)){i=!0;break}s.parser.skipToken(s)}return i&&_+1!==s.pos?(a=s.src.slice(_+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=_,!1):(s.posMax=s.pos,s.pos=_+1,o||s.push({type:\"sup\",level:s.level,content:a.replace(MC,\"$1\")}),s.pos=s.posMax+1,s.posMax=u,!0):(s.pos=_,!1)}],[\"links\",function links(s,o){var i,a,u,_,w,x,C,j,L=!1,B=s.pos,$=s.posMax,V=s.pos,U=s.src.charCodeAt(V);if(33===U&&(L=!0,U=s.src.charCodeAt(++V)),91!==U)return!1;if(s.level>=s.options.maxNesting)return!1;if(i=V+1,(a=parseLinkLabel(s,V))<0)return!1;if((x=a+1)<$&&40===s.src.charCodeAt(x)){for(x++;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);if(x>=$)return!1;for(V=x,parseLinkDestination(s,x)?(_=s.linkContent,x=s.pos):_=\"\",V=x;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);if(x<$&&V!==x&&parseLinkTitle(s,x))for(w=s.linkContent,x=s.pos;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);else w=\"\";if(x>=$||41!==s.src.charCodeAt(x))return s.pos=B,!1;x++}else{if(s.linkLevel>0)return!1;for(;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);if(x<$&&91===s.src.charCodeAt(x)&&(V=x+1,(x=parseLinkLabel(s,x))>=0?u=s.src.slice(V,x++):x=V-1),u||(void 0===u&&(x=a+1),u=s.src.slice(i,a)),!(C=s.env.references[normalizeReference(u)]))return s.pos=B,!1;_=C.href,w=C.title}return o||(s.pos=i,s.posMax=a,L?s.push({type:\"image\",src:_,title:w,alt:s.src.substr(i,a-i),level:s.level}):(s.push({type:\"link_open\",href:_,title:w,level:s.level++}),s.linkLevel++,s.parser.tokenize(s),s.linkLevel--,s.push({type:\"link_close\",level:--s.level}))),s.pos=x,s.posMax=$,!0}],[\"footnote_inline\",function footnote_inline(s,o){var i,a,u,_,w=s.posMax,x=s.pos;return!(x+2>=w)&&(94===s.src.charCodeAt(x)&&(91===s.src.charCodeAt(x+1)&&(!(s.level>=s.options.maxNesting)&&(i=x+2,!((a=parseLinkLabel(s,x+1))<0)&&(o||(s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.list||(s.env.footnotes.list=[]),u=s.env.footnotes.list.length,s.pos=i,s.posMax=a,s.push({type:\"footnote_ref\",id:u,level:s.level}),s.linkLevel++,_=s.tokens.length,s.parser.tokenize(s),s.env.footnotes.list[u]={tokens:s.tokens.splice(_)},s.linkLevel--),s.pos=a+1,s.posMax=w,!0)))))}],[\"footnote_ref\",function footnote_ref(s,o){var i,a,u,_,w=s.posMax,x=s.pos;if(x+3>w)return!1;if(!s.env.footnotes||!s.env.footnotes.refs)return!1;if(91!==s.src.charCodeAt(x))return!1;if(94!==s.src.charCodeAt(x+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(a=x+2;a<w;a++){if(32===s.src.charCodeAt(a))return!1;if(10===s.src.charCodeAt(a))return!1;if(93===s.src.charCodeAt(a))break}return a!==x+2&&(!(a>=w)&&(a++,i=s.src.slice(x+2,a-1),void 0!==s.env.footnotes.refs[\":\"+i]&&(o||(s.env.footnotes.list||(s.env.footnotes.list=[]),s.env.footnotes.refs[\":\"+i]<0?(u=s.env.footnotes.list.length,s.env.footnotes.list[u]={label:i,count:0},s.env.footnotes.refs[\":\"+i]=u):u=s.env.footnotes.refs[\":\"+i],_=s.env.footnotes.list[u].count,s.env.footnotes.list[u].count++,s.push({type:\"footnote_ref\",id:u,subId:_,level:s.level})),s.pos=a,s.posMax=w,!0)))}],[\"autolink\",function autolink(s,o){var i,a,u,_,w,x=s.pos;return 60===s.src.charCodeAt(x)&&(!((i=s.src.slice(x)).indexOf(\">\")<0)&&((a=i.match(LC))?!(RC.indexOf(a[1].toLowerCase())<0)&&(w=normalizeLink(_=a[0].slice(1,-1)),!!s.parser.validateLink(_)&&(o||(s.push({type:\"link_open\",href:w,level:s.level}),s.push({type:\"text\",content:_,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=a[0].length,!0)):!!(u=i.match(DC))&&(w=normalizeLink(\"mailto:\"+(_=u[0].slice(1,-1))),!!s.parser.validateLink(w)&&(o||(s.push({type:\"link_open\",href:w,level:s.level}),s.push({type:\"text\",content:_,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=u[0].length,!0))))}],[\"htmltag\",function htmltag(s,o){var i,a,u,_=s.pos;return!!s.options.html&&(u=s.posMax,!(60!==s.src.charCodeAt(_)||_+2>=u)&&(!(33!==(i=s.src.charCodeAt(_+1))&&63!==i&&47!==i&&!function isLetter$2(s){var o=32|s;return o>=97&&o<=122}(i))&&(!!(a=s.src.slice(_).match(qC))&&(o||s.push({type:\"htmltag\",content:s.src.slice(_,_+a[0].length),level:s.level}),s.pos+=a[0].length,!0))))}],[\"entity\",function entity(s,o){var i,a,u=s.pos,_=s.posMax;if(38!==s.src.charCodeAt(u))return!1;if(u+1<_)if(35===s.src.charCodeAt(u+1)){if(a=s.src.slice(u).match(VC))return o||(i=\"x\"===a[1][0].toLowerCase()?parseInt(a[1].slice(1),16):parseInt(a[1],10),s.pending+=isValidEntityCode(i)?fromCodePoint(i):fromCodePoint(65533)),s.pos+=a[0].length,!0}else if(a=s.src.slice(u).match(UC)){var w=decodeEntity(a[1]);if(a[1]!==w)return o||(s.pending+=w),s.pos+=a[0].length,!0}return o||(s.pending+=\"&\"),s.pos++,!0}]];function ParserInline(){this.ruler=new Ruler;for(var s=0;s<zC.length;s++)this.ruler.push(zC[s][0],zC[s][1]);this.validateLink=validateLink}function validateLink(s){var o=s.trim().toLowerCase();return-1===(o=replaceEntities(o)).indexOf(\":\")||-1===[\"vbscript\",\"javascript\",\"file\",\"data\"].indexOf(o.split(\":\")[0])}ParserInline.prototype.skipToken=function(s){var o,i,a=this.ruler.getRules(\"\"),u=a.length,_=s.pos;if((i=s.cacheGet(_))>0)s.pos=i;else{for(o=0;o<u;o++)if(a[o](s,!0))return void s.cacheSet(_,s.pos);s.pos++,s.cacheSet(_,s.pos)}},ParserInline.prototype.tokenize=function(s){for(var o,i,a=this.ruler.getRules(\"\"),u=a.length,_=s.posMax;s.pos<_;){for(i=0;i<u&&!(o=a[i](s,!1));i++);if(o){if(s.pos>=_)break}else s.pending+=s.src[s.pos++]}s.pending&&s.pushPending()},ParserInline.prototype.parse=function(s,o,i,a){var u=new StateInline(s,this,o,i,a);this.tokenize(u)};var WC={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"replacements\",\"smartquotes\",\"references\",\"abbr2\",\"footnote_tail\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"footnote\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\",\"table\"]},inline:{rules:[\"autolink\",\"backticks\",\"del\",\"emphasis\",\"entity\",\"escape\",\"footnote_ref\",\"htmltag\",\"links\",\"newline\",\"text\"]}}},full:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"abbr2\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\"]},inline:{rules:[\"autolink\",\"backticks\",\"emphasis\",\"entity\",\"escape\",\"htmltag\",\"links\",\"newline\",\"text\"]}}}};function StateCore(s,o,i){this.src=o,this.env=i,this.options=s.options,this.tokens=[],this.inlineMode=!1,this.inline=s.inline,this.block=s.block,this.renderer=s.renderer,this.typographer=s.typographer}function Remarkable(s,o){\"string\"!=typeof s&&(o=s,s=\"default\"),o&&null!=o.linkify&&console.warn(\"linkify option is removed. Use linkify plugin instead:\\n\\nimport Remarkable from 'remarkable';\\nimport linkify from 'remarkable/linkify';\\nnew Remarkable().use(linkify)\\n\"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new Core,this.renderer=new Renderer,this.ruler=new Ruler,this.options={},this.configure(WC[s]),this.set(o||{})}Remarkable.prototype.set=function(s){index_browser_assign(this.options,s)},Remarkable.prototype.configure=function(s){var o=this;if(!s)throw new Error(\"Wrong `remarkable` preset, check name/content\");s.options&&o.set(s.options),s.components&&Object.keys(s.components).forEach((function(i){s.components[i].rules&&o[i].ruler.enable(s.components[i].rules,!0)}))},Remarkable.prototype.use=function(s,o){return s(this,o),this},Remarkable.prototype.parse=function(s,o){var i=new StateCore(this,s,o);return this.core.process(i),i.tokens},Remarkable.prototype.render=function(s,o){return o=o||{},this.renderer.render(this.parse(s,o),this.options,o)},Remarkable.prototype.parseInline=function(s,o){var i=new StateCore(this,s,o);return i.inlineMode=!0,this.core.process(i),i.tokens},Remarkable.prototype.renderInline=function(s,o){return o=o||{},this.renderer.render(this.parseInline(s,o),this.options,o)};function indexOf(s,o){if(Array.prototype.indexOf)return s.indexOf(o);for(var i=0,a=s.length;i<a;i++)if(s[i]===o)return i;return-1}function utils_remove(s,o){for(var i=s.length-1;i>=0;i--)!0===o(s[i])&&s.splice(i,1)}function throwUnhandledCaseError(s){throw new Error(\"Unhandled case for value: '\".concat(s,\"'\"))}var JC=function(){function HtmlTag(s){void 0===s&&(s={}),this.tagName=\"\",this.attrs={},this.innerHTML=\"\",this.whitespaceRegex=/\\s+/,this.tagName=s.tagName||\"\",this.attrs=s.attrs||{},this.innerHTML=s.innerHtml||s.innerHTML||\"\"}return HtmlTag.prototype.setTagName=function(s){return this.tagName=s,this},HtmlTag.prototype.getTagName=function(){return this.tagName||\"\"},HtmlTag.prototype.setAttr=function(s,o){return this.getAttrs()[s]=o,this},HtmlTag.prototype.getAttr=function(s){return this.getAttrs()[s]},HtmlTag.prototype.setAttrs=function(s){return Object.assign(this.getAttrs(),s),this},HtmlTag.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},HtmlTag.prototype.setClass=function(s){return this.setAttr(\"class\",s)},HtmlTag.prototype.addClass=function(s){for(var o,i=this.getClass(),a=this.whitespaceRegex,u=i?i.split(a):[],_=s.split(a);o=_.shift();)-1===indexOf(u,o)&&u.push(o);return this.getAttrs().class=u.join(\" \"),this},HtmlTag.prototype.removeClass=function(s){for(var o,i=this.getClass(),a=this.whitespaceRegex,u=i?i.split(a):[],_=s.split(a);u.length&&(o=_.shift());){var w=indexOf(u,o);-1!==w&&u.splice(w,1)}return this.getAttrs().class=u.join(\" \"),this},HtmlTag.prototype.getClass=function(){return this.getAttrs().class||\"\"},HtmlTag.prototype.hasClass=function(s){return-1!==(\" \"+this.getClass()+\" \").indexOf(\" \"+s+\" \")},HtmlTag.prototype.setInnerHTML=function(s){return this.innerHTML=s,this},HtmlTag.prototype.setInnerHtml=function(s){return this.setInnerHTML(s)},HtmlTag.prototype.getInnerHTML=function(){return this.innerHTML||\"\"},HtmlTag.prototype.getInnerHtml=function(){return this.getInnerHTML()},HtmlTag.prototype.toAnchorString=function(){var s=this.getTagName(),o=this.buildAttrsStr();return[\"<\",s,o=o?\" \"+o:\"\",\">\",this.getInnerHtml(),\"</\",s,\">\"].join(\"\")},HtmlTag.prototype.buildAttrsStr=function(){if(!this.attrs)return\"\";var s=this.getAttrs(),o=[];for(var i in s)s.hasOwnProperty(i)&&o.push(i+'=\"'+s[i]+'\"');return o.join(\" \")},HtmlTag}();var HC=function(){function AnchorTagBuilder(s){void 0===s&&(s={}),this.newWindow=!1,this.truncate={},this.className=\"\",this.newWindow=s.newWindow||!1,this.truncate=s.truncate||{},this.className=s.className||\"\"}return AnchorTagBuilder.prototype.build=function(s){return new JC({tagName:\"a\",attrs:this.createAttrs(s),innerHtml:this.processAnchorText(s.getAnchorText())})},AnchorTagBuilder.prototype.createAttrs=function(s){var o={href:s.getAnchorHref()},i=this.createCssClass(s);return i&&(o.class=i),this.newWindow&&(o.target=\"_blank\",o.rel=\"noopener noreferrer\"),this.truncate&&this.truncate.length&&this.truncate.length<s.getAnchorText().length&&(o.title=s.getAnchorHref()),o},AnchorTagBuilder.prototype.createCssClass=function(s){var o=this.className;if(o){for(var i=[o],a=s.getCssClassSuffixes(),u=0,_=a.length;u<_;u++)i.push(o+\"-\"+a[u]);return i.join(\" \")}return\"\"},AnchorTagBuilder.prototype.processAnchorText=function(s){return s=this.doTruncate(s)},AnchorTagBuilder.prototype.doTruncate=function(s){var o=this.truncate;if(!o||!o.length)return s;var i=o.length,a=o.location;return\"smart\"===a?function truncateSmart(s,o,i){var a,u;null==i?(i=\"&hellip;\",u=3,a=8):(u=i.length,a=i.length);var buildUrl=function(s){var o=\"\";return s.scheme&&s.host&&(o+=s.scheme+\"://\"),s.host&&(o+=s.host),s.path&&(o+=\"/\"+s.path),s.query&&(o+=\"?\"+s.query),s.fragment&&(o+=\"#\"+s.fragment),o},buildSegment=function(s,o){var a=o/2,u=Math.ceil(a),_=-1*Math.floor(a),w=\"\";return _<0&&(w=s.substr(_)),s.substr(0,u)+i+w};if(s.length<=o)return s;var _=o-u,w=function(s){var o={},i=s,a=i.match(/^([a-z]+):\\/\\//i);return a&&(o.scheme=a[1],i=i.substr(a[0].length)),(a=i.match(/^(.*?)(?=(\\?|#|\\/|$))/i))&&(o.host=a[1],i=i.substr(a[0].length)),(a=i.match(/^\\/(.*?)(?=(\\?|#|$))/i))&&(o.path=a[1],i=i.substr(a[0].length)),(a=i.match(/^\\?(.*?)(?=(#|$))/i))&&(o.query=a[1],i=i.substr(a[0].length)),(a=i.match(/^#(.*?)$/i))&&(o.fragment=a[1]),o}(s);if(w.query){var x=w.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);x&&(w.query=w.query.substr(0,x[1].length),s=buildUrl(w))}if(s.length<=o)return s;if(w.host&&(w.host=w.host.replace(/^www\\./,\"\"),s=buildUrl(w)),s.length<=o)return s;var C=\"\";if(w.host&&(C+=w.host),C.length>=_)return w.host.length==o?(w.host.substr(0,o-u)+i).substr(0,_+a):buildSegment(C,_).substr(0,_+a);var j=\"\";if(w.path&&(j+=\"/\"+w.path),w.query&&(j+=\"?\"+w.query),j){if((C+j).length>=_)return(C+j).length==o?(C+j).substr(0,o):(C+buildSegment(j,_-C.length)).substr(0,_+a);C+=j}if(w.fragment){var L=\"#\"+w.fragment;if((C+L).length>=_)return(C+L).length==o?(C+L).substr(0,o):(C+buildSegment(L,_-C.length)).substr(0,_+a);C+=L}if(w.scheme&&w.host){var B=w.scheme+\"://\";if((C+B).length<_)return(B+C).substr(0,o)}if(C.length<=o)return C;var $=\"\";return _>0&&($=C.substr(-1*Math.floor(_/2))),(C.substr(0,Math.ceil(_/2))+i+$).substr(0,_+a)}(s,i):\"middle\"===a?function truncateMiddle(s,o,i){if(s.length<=o)return s;var a,u;null==i?(i=\"&hellip;\",a=8,u=3):(a=i.length,u=i.length);var _=o-u,w=\"\";return _>0&&(w=s.substr(-1*Math.floor(_/2))),(s.substr(0,Math.ceil(_/2))+i+w).substr(0,_+a)}(s,i):function truncateEnd(s,o,i){return function ellipsis(s,o,i){var a;return s.length>o&&(null==i?(i=\"&hellip;\",a=3):a=i.length,s=s.substring(0,o-a)+i),s}(s,o,i)}(s,i)},AnchorTagBuilder}(),KC=function(){function Match(s){this.__jsduckDummyDocProp=null,this.matchedText=\"\",this.offset=0,this.tagBuilder=s.tagBuilder,this.matchedText=s.matchedText,this.offset=s.offset}return Match.prototype.getMatchedText=function(){return this.matchedText},Match.prototype.setOffset=function(s){this.offset=s},Match.prototype.getOffset=function(){return this.offset},Match.prototype.getCssClassSuffixes=function(){return[this.getType()]},Match.prototype.buildTag=function(){return this.tagBuilder.build(this)},Match}(),extendStatics=function(s,o){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(s[i]=o[i])},extendStatics(s,o)};function tslib_es6_extends(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Class extends value \"+String(o)+\" is not a constructor or null\");function __(){this.constructor=s}extendStatics(s,o),s.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}var __assign=function(){return __assign=Object.assign||function __assign(s){for(var o,i=1,a=arguments.length;i<a;i++)for(var u in o=arguments[i])Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u]);return s},__assign.apply(this,arguments)};Object.create;Object.create;\"function\"==typeof SuppressedError&&SuppressedError;var GC,YC=function(s){function EmailMatch(o){var i=s.call(this,o)||this;return i.email=\"\",i.email=o.email,i}return tslib_es6_extends(EmailMatch,s),EmailMatch.prototype.getType=function(){return\"email\"},EmailMatch.prototype.getEmail=function(){return this.email},EmailMatch.prototype.getAnchorHref=function(){return\"mailto:\"+this.email},EmailMatch.prototype.getAnchorText=function(){return this.email},EmailMatch}(KC),XC=function(s){function HashtagMatch(o){var i=s.call(this,o)||this;return i.serviceName=\"\",i.hashtag=\"\",i.serviceName=o.serviceName,i.hashtag=o.hashtag,i}return tslib_es6_extends(HashtagMatch,s),HashtagMatch.prototype.getType=function(){return\"hashtag\"},HashtagMatch.prototype.getServiceName=function(){return this.serviceName},HashtagMatch.prototype.getHashtag=function(){return this.hashtag},HashtagMatch.prototype.getAnchorHref=function(){var s=this.serviceName,o=this.hashtag;switch(s){case\"twitter\":return\"https://twitter.com/hashtag/\"+o;case\"facebook\":return\"https://www.facebook.com/hashtag/\"+o;case\"instagram\":return\"https://instagram.com/explore/tags/\"+o;case\"tiktok\":return\"https://www.tiktok.com/tag/\"+o;default:throw new Error(\"Unknown service name to point hashtag to: \"+s)}},HashtagMatch.prototype.getAnchorText=function(){return\"#\"+this.hashtag},HashtagMatch}(KC),QC=function(s){function MentionMatch(o){var i=s.call(this,o)||this;return i.serviceName=\"twitter\",i.mention=\"\",i.mention=o.mention,i.serviceName=o.serviceName,i}return tslib_es6_extends(MentionMatch,s),MentionMatch.prototype.getType=function(){return\"mention\"},MentionMatch.prototype.getMention=function(){return this.mention},MentionMatch.prototype.getServiceName=function(){return this.serviceName},MentionMatch.prototype.getAnchorHref=function(){switch(this.serviceName){case\"twitter\":return\"https://twitter.com/\"+this.mention;case\"instagram\":return\"https://instagram.com/\"+this.mention;case\"soundcloud\":return\"https://soundcloud.com/\"+this.mention;case\"tiktok\":return\"https://www.tiktok.com/@\"+this.mention;default:throw new Error(\"Unknown service name to point mention to: \"+this.serviceName)}},MentionMatch.prototype.getAnchorText=function(){return\"@\"+this.mention},MentionMatch.prototype.getCssClassSuffixes=function(){var o=s.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&o.push(i),o},MentionMatch}(KC),ZC=function(s){function PhoneMatch(o){var i=s.call(this,o)||this;return i.number=\"\",i.plusSign=!1,i.number=o.number,i.plusSign=o.plusSign,i}return tslib_es6_extends(PhoneMatch,s),PhoneMatch.prototype.getType=function(){return\"phone\"},PhoneMatch.prototype.getPhoneNumber=function(){return this.number},PhoneMatch.prototype.getNumber=function(){return this.getPhoneNumber()},PhoneMatch.prototype.getAnchorHref=function(){return\"tel:\"+(this.plusSign?\"+\":\"\")+this.number},PhoneMatch.prototype.getAnchorText=function(){return this.matchedText},PhoneMatch}(KC),eA=function(s){function UrlMatch(o){var i=s.call(this,o)||this;return i.url=\"\",i.urlMatchType=\"scheme\",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\\/\\/)?/i,i.wwwPrefixRegex=/^(https?:\\/\\/)?(www\\.)?/i,i.protocolRelativeRegex=/^\\/\\//,i.protocolPrepended=!1,i.urlMatchType=o.urlMatchType,i.url=o.url,i.protocolUrlMatch=o.protocolUrlMatch,i.protocolRelativeMatch=o.protocolRelativeMatch,i.stripPrefix=o.stripPrefix,i.stripTrailingSlash=o.stripTrailingSlash,i.decodePercentEncoding=o.decodePercentEncoding,i}return tslib_es6_extends(UrlMatch,s),UrlMatch.prototype.getType=function(){return\"url\"},UrlMatch.prototype.getUrlMatchType=function(){return this.urlMatchType},UrlMatch.prototype.getUrl=function(){var s=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(s=this.url=\"http://\"+s,this.protocolPrepended=!0),s},UrlMatch.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,\"&\")},UrlMatch.prototype.getAnchorText=function(){var s=this.getMatchedText();return this.protocolRelativeMatch&&(s=this.stripProtocolRelativePrefix(s)),this.stripPrefix.scheme&&(s=this.stripSchemePrefix(s)),this.stripPrefix.www&&(s=this.stripWwwPrefix(s)),this.stripTrailingSlash&&(s=this.removeTrailingSlash(s)),this.decodePercentEncoding&&(s=this.removePercentEncoding(s)),s},UrlMatch.prototype.stripSchemePrefix=function(s){return s.replace(this.schemePrefixRegex,\"\")},UrlMatch.prototype.stripWwwPrefix=function(s){return s.replace(this.wwwPrefixRegex,\"$1\")},UrlMatch.prototype.stripProtocolRelativePrefix=function(s){return s.replace(this.protocolRelativeRegex,\"\")},UrlMatch.prototype.removeTrailingSlash=function(s){return\"/\"===s.charAt(s.length-1)&&(s=s.slice(0,-1)),s},UrlMatch.prototype.removePercentEncoding=function(s){var o=s.replace(/%22/gi,\"&quot;\").replace(/%26/gi,\"&amp;\").replace(/%27/gi,\"&#39;\").replace(/%3C/gi,\"&lt;\").replace(/%3E/gi,\"&gt;\");try{return decodeURIComponent(o)}catch(s){return o}},UrlMatch}(KC),tA=function tA(s){this.__jsduckDummyDocProp=null,this.tagBuilder=s.tagBuilder},rA=/[A-Za-z]/,nA=/[\\d]/,sA=/[\\D]/,oA=/\\s/,iA=/['\"]/,aA=/[\\x00-\\x1F\\x7F]/,cA=/A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source,lA=cA+/\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source+/\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source,uA=/0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source,pA=lA+uA,hA=lA+uA,dA=new RegExp(\"[\".concat(hA,\"]\")),fA=\"(?:[\"+uA+\"]{1,3}\\\\.){3}[\"+uA+\"]{1,3}\",mA=\"[\"+hA+\"](?:[\"+hA+\"\\\\-_]{0,61}[\"+hA+\"])?\",getDomainLabelStr=function(s){return\"(?=(\"+mA+\"))\\\\\"+s},getDomainNameStr=function(s){return\"(?:\"+getDomainLabelStr(s)+\"(?:\\\\.\"+getDomainLabelStr(s+1)+\"){0,126}|\"+fA+\")\"},gA=(new RegExp(\"[\"+hA+\".\\\\-]*[\"+hA+\"\\\\-]\"),dA),yA=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,vA=new RegExp(\"[\".concat(hA,\"!#$%&'*+/=?^_`{|}~-]\")),bA=new RegExp(\"^\".concat(yA.source,\"$\")),_A=function(s){function EmailMatcher(){var o=null!==s&&s.apply(this,arguments)||this;return o.localPartCharRegex=vA,o.strictTldRegex=bA,o}return tslib_es6_extends(EmailMatcher,s),EmailMatcher.prototype.parseMatches=function(s){for(var o=this.tagBuilder,i=this.localPartCharRegex,a=this.strictTldRegex,u=[],_=s.length,w=new SA,x={m:\"a\",a:\"i\",i:\"l\",l:\"t\",t:\"o\",o:\":\"},C=0,j=0,L=w;C<_;){var B=s.charAt(C);switch(j){case 0:stateNonEmailAddress(B);break;case 1:stateMailTo(s.charAt(C-1),B);break;case 2:stateLocalPart(B);break;case 3:stateLocalPartDot(B);break;case 4:stateAtSign(B);break;case 5:stateDomainChar(B);break;case 6:stateDomainHyphen(B);break;case 7:stateDomainDot(B);break;default:throwUnhandledCaseError(j)}C++}return captureMatchIfValidAndReset(),u;function stateNonEmailAddress(s){\"m\"===s?beginEmailMatch(1):i.test(s)&&beginEmailMatch()}function stateMailTo(s,o){\":\"===s?i.test(o)?(j=2,L=new SA(__assign(__assign({},L),{hasMailtoPrefix:!0}))):resetToNonEmailMatchState():x[s]===o||(i.test(o)?j=2:\".\"===o?j=3:\"@\"===o?j=4:resetToNonEmailMatchState())}function stateLocalPart(s){\".\"===s?j=3:\"@\"===s?j=4:i.test(s)||resetToNonEmailMatchState()}function stateLocalPartDot(s){\".\"===s||\"@\"===s?resetToNonEmailMatchState():i.test(s)?j=2:resetToNonEmailMatchState()}function stateAtSign(s){gA.test(s)?j=5:resetToNonEmailMatchState()}function stateDomainChar(s){\".\"===s?j=7:\"-\"===s?j=6:gA.test(s)||captureMatchIfValidAndReset()}function stateDomainHyphen(s){\"-\"===s||\".\"===s?captureMatchIfValidAndReset():gA.test(s)?j=5:captureMatchIfValidAndReset()}function stateDomainDot(s){\".\"===s||\"-\"===s?captureMatchIfValidAndReset():gA.test(s)?(j=5,L=new SA(__assign(__assign({},L),{hasDomainDot:!0}))):captureMatchIfValidAndReset()}function beginEmailMatch(s){void 0===s&&(s=2),j=s,L=new SA({idx:C})}function resetToNonEmailMatchState(){j=0,L=w}function captureMatchIfValidAndReset(){if(L.hasDomainDot){var i=s.slice(L.idx,C);/[-.]$/.test(i)&&(i=i.slice(0,-1));var _=L.hasMailtoPrefix?i.slice(7):i;(function doesEmailHaveValidTld(s){var o=s.split(\".\").pop()||\"\",i=o.toLowerCase();return a.test(i)})(_)&&u.push(new YC({tagBuilder:o,matchedText:i,offset:L.idx,email:_}))}resetToNonEmailMatchState()}},EmailMatcher}(tA),SA=function SA(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.hasMailtoPrefix=!!s.hasMailtoPrefix,this.hasDomainDot=!!s.hasDomainDot},EA=function(){function UrlMatchValidator(){}return UrlMatchValidator.isValid=function(s,o){return!(o&&!this.isValidUriScheme(o)||this.urlMatchDoesNotHaveProtocolOrDot(s,o)||this.urlMatchDoesNotHaveAtLeastOneWordChar(s,o)&&!this.isValidIpAddress(s)||this.containsMultipleDots(s))},UrlMatchValidator.isValidIpAddress=function(s){var o=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==s.match(o)},UrlMatchValidator.containsMultipleDots=function(s){var o=s;return this.hasFullProtocolRegex.test(s)&&(o=s.split(\"://\")[1]),o.split(\"/\")[0].indexOf(\"..\")>-1},UrlMatchValidator.isValidUriScheme=function(s){var o=s.match(this.uriSchemeRegex),i=o&&o[0].toLowerCase();return\"javascript:\"!==i&&\"vbscript:\"!==i},UrlMatchValidator.urlMatchDoesNotHaveProtocolOrDot=function(s,o){return!(!s||o&&this.hasFullProtocolRegex.test(o)||-1!==s.indexOf(\".\"))},UrlMatchValidator.urlMatchDoesNotHaveAtLeastOneWordChar=function(s,o){return!(!s||!o)&&(!this.hasFullProtocolRegex.test(o)&&!this.hasWordCharAfterProtocolRegex.test(s))},UrlMatchValidator.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\\/\\//,UrlMatchValidator.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,UrlMatchValidator.hasWordCharAfterProtocolRegex=new RegExp(\":[^\\\\s]*?[\"+cA+\"]\"),UrlMatchValidator.ipRegex=/[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?(:[0-9]*)?\\/?$/,UrlMatchValidator}(),wA=(GC=new RegExp(\"[/?#](?:[\"+hA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}?!:,.;^✓]*[\"+hA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}✓])?\"),new RegExp([\"(?:\",\"(\",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\\/\\/)(?!\\d+\\/?)(?:\\/\\/)?)/.source,getDomainNameStr(2),\")\",\"|\",\"(\",\"(//)?\",/(?:www\\.)/.source,getDomainNameStr(6),\")\",\"|\",\"(\",\"(//)?\",getDomainNameStr(10)+\"\\\\.\",yA.source,\"(?![-\"+pA+\"])\",\")\",\")\",\"(?::[0-9]+)?\",\"(?:\"+GC.source+\")?\"].join(\"\"),\"gi\")),xA=new RegExp(\"[\"+hA+\"]\"),kA=function(s){function UrlMatcher(o){var i=s.call(this,o)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=wA,i.wordCharRegExp=xA,i.stripPrefix=o.stripPrefix,i.stripTrailingSlash=o.stripTrailingSlash,i.decodePercentEncoding=o.decodePercentEncoding,i}return tslib_es6_extends(UrlMatcher,s),UrlMatcher.prototype.parseMatches=function(s){for(var o,i=this.matcherRegex,a=this.stripPrefix,u=this.stripTrailingSlash,_=this.decodePercentEncoding,w=this.tagBuilder,x=[],_loop_1=function(){var i=o[0],j=o[1],L=o[4],B=o[5],$=o[9],V=o.index,U=B||$,z=s.charAt(V-1);if(!EA.isValid(i,j))return\"continue\";if(V>0&&\"@\"===z)return\"continue\";if(V>0&&U&&C.wordCharRegExp.test(z))return\"continue\";if(/\\?$/.test(i)&&(i=i.substr(0,i.length-1)),C.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var Y=C.matchHasInvalidCharAfterTld(i,j);Y>-1&&(i=i.substr(0,Y))}var Z=[\"http://\",\"https://\"].find((function(s){return!!j&&-1!==j.indexOf(s)}));if(Z){var ee=i.indexOf(Z);i=i.substr(ee),j=j.substr(ee),V+=ee}var ie=j?\"scheme\":L?\"www\":\"tld\",ae=!!j;x.push(new eA({tagBuilder:w,matchedText:i,offset:V,urlMatchType:ie,url:i,protocolUrlMatch:ae,protocolRelativeMatch:!!U,stripPrefix:a,stripTrailingSlash:u,decodePercentEncoding:_}))},C=this;null!==(o=i.exec(s));)_loop_1();return x},UrlMatcher.prototype.matchHasUnbalancedClosingParen=function(s){var o,i=s.charAt(s.length-1);if(\")\"===i)o=\"(\";else if(\"]\"===i)o=\"[\";else{if(\"}\"!==i)return!1;o=\"{\"}for(var a=0,u=0,_=s.length-1;u<_;u++){var w=s.charAt(u);w===o?a++:w===i&&(a=Math.max(a-1,0))}return 0===a},UrlMatcher.prototype.matchHasInvalidCharAfterTld=function(s,o){if(!s)return-1;var i=0;o&&(i=s.indexOf(\":\"),s=s.slice(i));var a=new RegExp(\"^((.?//)?[-.\"+hA+\"]*[-\"+hA+\"]\\\\.[-\"+hA+\"]+)\").exec(s);return null===a?-1:(i+=a[1].length,s=s.slice(a[1].length),/^[^-.A-Za-z0-9:\\/?#]/.test(s)?i:-1)},UrlMatcher}(tA),OA=new RegExp(\"[_\".concat(hA,\"]\")),CA=function(s){function HashtagMatcher(o){var i=s.call(this,o)||this;return i.serviceName=\"twitter\",i.serviceName=o.serviceName,i}return tslib_es6_extends(HashtagMatcher,s),HashtagMatcher.prototype.parseMatches=function(s){for(var o=this.tagBuilder,i=this.serviceName,a=[],u=s.length,_=0,w=-1,x=0;_<u;){var C=s.charAt(_);switch(x){case 0:stateNone(C);break;case 1:stateNonHashtagWordChar(C);break;case 2:stateHashtagHashChar(C);break;case 3:stateHashtagTextChar(C);break;default:throwUnhandledCaseError(x)}_++}return captureMatchIfValid(),a;function stateNone(s){\"#\"===s?(x=2,w=_):dA.test(s)&&(x=1)}function stateNonHashtagWordChar(s){dA.test(s)||(x=0)}function stateHashtagHashChar(s){x=OA.test(s)?3:dA.test(s)?1:0}function stateHashtagTextChar(s){OA.test(s)||(captureMatchIfValid(),w=-1,x=dA.test(s)?1:0)}function captureMatchIfValid(){if(w>-1&&_-w<=140){var u=s.slice(w,_),x=new XC({tagBuilder:o,matchedText:u,offset:w,serviceName:i,hashtag:u.slice(1)});a.push(x)}}},HashtagMatcher}(tA),AA=[\"twitter\",\"facebook\",\"instagram\",\"tiktok\"],jA=new RegExp(\"\".concat(/(?:(?:(?:(\\+)?\\d{1,3}[-\\040.]?)?\\(?\\d{3}\\)?[-\\040.]?\\d{3}[-\\040.]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\\040.]?(?:\\d[-\\040.]?){6,12}\\d+))([,;]+[0-9]+#?)*/.source,\"|\").concat(/(0([1-9]{1}-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/.source),\"g\"),IA=function(s){function PhoneMatcher(){var o=null!==s&&s.apply(this,arguments)||this;return o.matcherRegex=jA,o}return tslib_es6_extends(PhoneMatcher,s),PhoneMatcher.prototype.parseMatches=function(s){for(var o,i=this.matcherRegex,a=this.tagBuilder,u=[];null!==(o=i.exec(s));){var _=o[0],w=_.replace(/[^0-9,;#]/g,\"\"),x=!(!o[1]&&!o[2]),C=0==o.index?\"\":s.substr(o.index-1,1),j=s.substr(o.index+_.length,1),L=!C.match(/\\d/)&&!j.match(/\\d/);this.testMatch(o[3])&&this.testMatch(_)&&L&&u.push(new ZC({tagBuilder:a,matchedText:_,offset:o.index,number:w,plusSign:x}))}return u},PhoneMatcher.prototype.testMatch=function(s){return sA.test(s)},PhoneMatcher}(tA),PA=new RegExp(\"@[_\".concat(hA,\"]{1,50}(?![_\").concat(hA,\"])\"),\"g\"),TA=new RegExp(\"@[_.\".concat(hA,\"]{1,30}(?![_\").concat(hA,\"])\"),\"g\"),NA=new RegExp(\"@[-_.\".concat(hA,\"]{1,50}(?![-_\").concat(hA,\"])\"),\"g\"),MA=new RegExp(\"@[_.\".concat(hA,\"]{1,23}[_\").concat(hA,\"](?![_\").concat(hA,\"])\"),\"g\"),RA=new RegExp(\"[^\"+hA+\"]\"),DA=function(s){function MentionMatcher(o){var i=s.call(this,o)||this;return i.serviceName=\"twitter\",i.matcherRegexes={twitter:PA,instagram:TA,soundcloud:NA,tiktok:MA},i.nonWordCharRegex=RA,i.serviceName=o.serviceName,i}return tslib_es6_extends(MentionMatcher,s),MentionMatcher.prototype.parseMatches=function(s){var o,i=this.serviceName,a=this.matcherRegexes[this.serviceName],u=this.nonWordCharRegex,_=this.tagBuilder,w=[];if(!a)return w;for(;null!==(o=a.exec(s));){var x=o.index,C=s.charAt(x-1);if(0===x||u.test(C)){var j=o[0].replace(/\\.+$/g,\"\"),L=j.slice(1);w.push(new QC({tagBuilder:_,matchedText:j,offset:x,serviceName:i,mention:L}))}}return w},MentionMatcher}(tA);function parseHtml(s,o){for(var i=o.onOpenTag,a=o.onCloseTag,u=o.onText,_=o.onComment,w=o.onDoctype,x=new LA,C=0,j=s.length,L=0,B=0,$=x;C<j;){var V=s.charAt(C);switch(L){case 0:stateData(V);break;case 1:stateTagOpen(V);break;case 2:stateEndTagOpen(V);break;case 3:stateTagName(V);break;case 4:stateBeforeAttributeName(V);break;case 5:stateAttributeName(V);break;case 6:stateAfterAttributeName(V);break;case 7:stateBeforeAttributeValue(V);break;case 8:stateAttributeValueDoubleQuoted(V);break;case 9:stateAttributeValueSingleQuoted(V);break;case 10:stateAttributeValueUnquoted(V);break;case 11:stateAfterAttributeValueQuoted(V);break;case 12:stateSelfClosingStartTag(V);break;case 13:stateMarkupDeclarationOpen(V);break;case 14:stateCommentStart(V);break;case 15:stateCommentStartDash(V);break;case 16:stateComment(V);break;case 17:stateCommentEndDash(V);break;case 18:stateCommentEnd(V);break;case 19:stateCommentEndBang(V);break;case 20:stateDoctype(V);break;default:throwUnhandledCaseError(L)}C++}function stateData(s){\"<\"===s&&startNewTag()}function stateTagOpen(s){\"!\"===s?L=13:\"/\"===s?(L=2,$=new LA(__assign(__assign({},$),{isClosing:!0}))):\"<\"===s?startNewTag():rA.test(s)?(L=3,$=new LA(__assign(__assign({},$),{isOpening:!0}))):(L=0,$=x)}function stateTagName(s){oA.test(s)?($=new LA(__assign(__assign({},$),{name:captureTagName()})),L=4):\"<\"===s?startNewTag():\"/\"===s?($=new LA(__assign(__assign({},$),{name:captureTagName()})),L=12):\">\"===s?($=new LA(__assign(__assign({},$),{name:captureTagName()})),emitTagAndPreviousTextNode()):rA.test(s)||nA.test(s)||\":\"===s||resetToDataState()}function stateEndTagOpen(s){\">\"===s?resetToDataState():rA.test(s)?L=3:resetToDataState()}function stateBeforeAttributeName(s){oA.test(s)||(\"/\"===s?L=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():\"=\"===s||iA.test(s)||aA.test(s)?resetToDataState():L=5)}function stateAttributeName(s){oA.test(s)?L=6:\"/\"===s?L=12:\"=\"===s?L=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():iA.test(s)&&resetToDataState()}function stateAfterAttributeName(s){oA.test(s)||(\"/\"===s?L=12:\"=\"===s?L=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():iA.test(s)?resetToDataState():L=5)}function stateBeforeAttributeValue(s){oA.test(s)||('\"'===s?L=8:\"'\"===s?L=9:/[>=`]/.test(s)?resetToDataState():\"<\"===s?startNewTag():L=10)}function stateAttributeValueDoubleQuoted(s){'\"'===s&&(L=11)}function stateAttributeValueSingleQuoted(s){\"'\"===s&&(L=11)}function stateAttributeValueUnquoted(s){oA.test(s)?L=4:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function stateAfterAttributeValueQuoted(s){oA.test(s)?L=4:\"/\"===s?L=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():(L=4,function reconsumeCurrentCharacter(){C--}())}function stateSelfClosingStartTag(s){\">\"===s?($=new LA(__assign(__assign({},$),{isClosing:!0})),emitTagAndPreviousTextNode()):L=4}function stateMarkupDeclarationOpen(o){\"--\"===s.substr(C,2)?(C+=2,$=new LA(__assign(__assign({},$),{type:\"comment\"})),L=14):\"DOCTYPE\"===s.substr(C,7).toUpperCase()?(C+=7,$=new LA(__assign(__assign({},$),{type:\"doctype\"})),L=20):resetToDataState()}function stateCommentStart(s){\"-\"===s?L=15:\">\"===s?resetToDataState():L=16}function stateCommentStartDash(s){\"-\"===s?L=18:\">\"===s?resetToDataState():L=16}function stateComment(s){\"-\"===s&&(L=17)}function stateCommentEndDash(s){L=\"-\"===s?18:16}function stateCommentEnd(s){\">\"===s?emitTagAndPreviousTextNode():\"!\"===s?L=19:\"-\"===s||(L=16)}function stateCommentEndBang(s){\"-\"===s?L=17:\">\"===s?emitTagAndPreviousTextNode():L=16}function stateDoctype(s){\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function resetToDataState(){L=0,$=x}function startNewTag(){L=1,$=new LA({idx:C})}function emitTagAndPreviousTextNode(){var o=s.slice(B,$.idx);o&&u(o,B),\"comment\"===$.type?_($.idx):\"doctype\"===$.type?w($.idx):($.isOpening&&i($.name,$.idx),$.isClosing&&a($.name,$.idx)),resetToDataState(),B=C+1}function captureTagName(){var o=$.idx+($.isClosing?2:1);return s.slice(o,C).toLowerCase()}B<C&&function emitText(){var o=s.slice(B,C);u(o,B),B=C+1}()}var LA=function LA(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.type=s.type||\"tag\",this.name=s.name||\"\",this.isOpening=!!s.isOpening,this.isClosing=!!s.isClosing},FA=function(){function Autolinker(s){void 0===s&&(s={}),this.version=Autolinker.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:\"end\"},this.className=\"\",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(s.urls),this.email=\"boolean\"==typeof s.email?s.email:this.email,this.phone=\"boolean\"==typeof s.phone?s.phone:this.phone,this.hashtag=s.hashtag||this.hashtag,this.mention=s.mention||this.mention,this.newWindow=\"boolean\"==typeof s.newWindow?s.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(s.stripPrefix),this.stripTrailingSlash=\"boolean\"==typeof s.stripTrailingSlash?s.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=\"boolean\"==typeof s.decodePercentEncoding?s.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=s.sanitizeHtml||!1;var o=this.mention;if(!1!==o&&-1===[\"twitter\",\"instagram\",\"soundcloud\",\"tiktok\"].indexOf(o))throw new Error(\"invalid `mention` cfg '\".concat(o,\"' - see docs\"));var i=this.hashtag;if(!1!==i&&-1===AA.indexOf(i))throw new Error(\"invalid `hashtag` cfg '\".concat(i,\"' - see docs\"));this.truncate=this.normalizeTruncateCfg(s.truncate),this.className=s.className||this.className,this.replaceFn=s.replaceFn||this.replaceFn,this.context=s.context||this}return Autolinker.link=function(s,o){return new Autolinker(o).link(s)},Autolinker.parse=function(s,o){return new Autolinker(o).parse(s)},Autolinker.prototype.normalizeUrlsCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{schemeMatches:s,wwwMatches:s,tldMatches:s}:{schemeMatches:\"boolean\"!=typeof s.schemeMatches||s.schemeMatches,wwwMatches:\"boolean\"!=typeof s.wwwMatches||s.wwwMatches,tldMatches:\"boolean\"!=typeof s.tldMatches||s.tldMatches}},Autolinker.prototype.normalizeStripPrefixCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{scheme:s,www:s}:{scheme:\"boolean\"!=typeof s.scheme||s.scheme,www:\"boolean\"!=typeof s.www||s.www}},Autolinker.prototype.normalizeTruncateCfg=function(s){return\"number\"==typeof s?{length:s,location:\"end\"}:function defaults(s,o){for(var i in o)o.hasOwnProperty(i)&&void 0===s[i]&&(s[i]=o[i]);return s}(s||{},{length:Number.POSITIVE_INFINITY,location:\"end\"})},Autolinker.prototype.parse=function(s){var o=this,i=[\"a\",\"style\",\"script\"],a=0,u=[];return parseHtml(s,{onOpenTag:function(s){i.indexOf(s)>=0&&a++},onText:function(s,i){if(0===a){var _=function splitAndCapture(s,o){if(!o.global)throw new Error(\"`splitRegex` must have the 'g' flag set\");for(var i,a=[],u=0;i=o.exec(s);)a.push(s.substring(u,i.index)),a.push(i[0]),u=i.index+i[0].length;return a.push(s.substring(u)),a}(s,/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),w=i;_.forEach((function(s,i){if(i%2==0){var a=o.parseText(s,w);u.push.apply(u,a)}w+=s.length}))}},onCloseTag:function(s){i.indexOf(s)>=0&&(a=Math.max(a-1,0))},onComment:function(s){},onDoctype:function(s){}}),u=this.compactMatches(u),u=this.removeUnwantedMatches(u)},Autolinker.prototype.compactMatches=function(s){s.sort((function(s,o){return s.getOffset()-o.getOffset()}));for(var o=0;o<s.length-1;){var i=s[o],a=i.getOffset(),u=i.getMatchedText().length,_=a+u;if(o+1<s.length){if(s[o+1].getOffset()===a){var w=s[o+1].getMatchedText().length>u?o:o+1;s.splice(w,1);continue}if(s[o+1].getOffset()<_){s.splice(o+1,1);continue}}o++}return s},Autolinker.prototype.removeUnwantedMatches=function(s){return this.hashtag||utils_remove(s,(function(s){return\"hashtag\"===s.getType()})),this.email||utils_remove(s,(function(s){return\"email\"===s.getType()})),this.phone||utils_remove(s,(function(s){return\"phone\"===s.getType()})),this.mention||utils_remove(s,(function(s){return\"mention\"===s.getType()})),this.urls.schemeMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"scheme\"===s.getUrlMatchType()})),this.urls.wwwMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"www\"===s.getUrlMatchType()})),this.urls.tldMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"tld\"===s.getUrlMatchType()})),s},Autolinker.prototype.parseText=function(s,o){void 0===o&&(o=0),o=o||0;for(var i=this.getMatchers(),a=[],u=0,_=i.length;u<_;u++){for(var w=i[u].parseMatches(s),x=0,C=w.length;x<C;x++)w[x].setOffset(o+w[x].getOffset());a.push.apply(a,w)}return a},Autolinker.prototype.link=function(s){if(!s)return\"\";this.sanitizeHtml&&(s=s.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));for(var o=this.parse(s),i=[],a=0,u=0,_=o.length;u<_;u++){var w=o[u];i.push(s.substring(a,w.getOffset())),i.push(this.createMatchReturnVal(w)),a=w.getOffset()+w.getMatchedText().length}return i.push(s.substring(a)),i.join(\"\")},Autolinker.prototype.createMatchReturnVal=function(s){var o;return this.replaceFn&&(o=this.replaceFn.call(this.context,s)),\"string\"==typeof o?o:!1===o?s.getMatchedText():o instanceof JC?o.toAnchorString():s.buildTag().toAnchorString()},Autolinker.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var s=this.getTagBuilder(),o=[new CA({tagBuilder:s,serviceName:this.hashtag}),new _A({tagBuilder:s}),new IA({tagBuilder:s}),new DA({tagBuilder:s,serviceName:this.mention}),new kA({tagBuilder:s,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=o},Autolinker.prototype.getTagBuilder=function(){var s=this.tagBuilder;return s||(s=this.tagBuilder=new HC({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),s},Autolinker.version=\"3.16.2\",Autolinker.AnchorTagBuilder=HC,Autolinker.HtmlTag=JC,Autolinker.matcher={Email:_A,Hashtag:CA,Matcher:tA,Mention:DA,Phone:IA,Url:kA},Autolinker.match={Email:YC,Hashtag:XC,Match:KC,Mention:QC,Phone:ZC,Url:eA},Autolinker}();const BA=FA;var $A=/www|@|\\:\\/\\//;function isLinkOpen(s){return/^<a[>\\s]/i.test(s)}function isLinkClose(s){return/^<\\/a\\s*>/i.test(s)}function createLinkifier(){var s=[],o=new BA({stripPrefix:!1,url:!0,email:!0,replaceFn:function(o){switch(o.getType()){case\"url\":s.push({text:o.matchedText,url:o.getUrl()});break;case\"email\":s.push({text:o.matchedText,url:\"mailto:\"+o.getEmail().replace(/^mailto:/i,\"\")})}return!1}});return{links:s,autolinker:o}}function parseTokens(s){var o,i,a,u,_,w,x,C,j,L,B,$,V,U=s.tokens,z=null;for(i=0,a=U.length;i<a;i++)if(\"inline\"===U[i].type)for(B=0,o=(u=U[i].children).length-1;o>=0;o--)if(\"link_close\"!==(_=u[o]).type){if(\"htmltag\"===_.type&&(isLinkOpen(_.content)&&B>0&&B--,isLinkClose(_.content)&&B++),!(B>0)&&\"text\"===_.type&&$A.test(_.content)){if(z||($=(z=createLinkifier()).links,V=z.autolinker),w=_.content,$.length=0,V.link(w),!$.length)continue;for(x=[],L=_.level,C=0;C<$.length;C++)s.inline.validateLink($[C].url)&&((j=w.indexOf($[C].text))&&x.push({type:\"text\",content:w.slice(0,j),level:L}),x.push({type:\"link_open\",href:$[C].url,title:\"\",level:L++}),x.push({type:\"text\",content:$[C].text,level:L}),x.push({type:\"link_close\",level:--L}),w=w.slice(j+$[C].text.length));w.length&&x.push({type:\"text\",content:w,level:L}),U[i].children=u=[].concat(u.slice(0,o),x,u.slice(o+1))}}else for(o--;u[o].level!==_.level&&\"link_open\"!==u[o].type;)o--}function linkify(s){s.core.ruler.push(\"linkify\",parseTokens)}const{entries:qA,setPrototypeOf:VA,isFrozen:UA,getPrototypeOf:zA,getOwnPropertyDescriptor:WA}=Object;let{freeze:JA,seal:HA,create:KA}=Object,{apply:GA,construct:YA}=\"undefined\"!=typeof Reflect&&Reflect;JA||(JA=function freeze(s){return s}),HA||(HA=function seal(s){return s}),GA||(GA=function apply(s,o,i){return s.apply(o,i)}),YA||(YA=function construct(s,o){return new s(...o)});const XA=unapply(Array.prototype.forEach),QA=unapply(Array.prototype.lastIndexOf),ZA=unapply(Array.prototype.pop),ej=unapply(Array.prototype.push),fj=unapply(Array.prototype.splice),mj=unapply(String.prototype.toLowerCase),_j=unapply(String.prototype.toString),Cj=unapply(String.prototype.match),Aj=unapply(String.prototype.replace),Nj=unapply(String.prototype.indexOf),Bj=unapply(String.prototype.trim),$j=unapply(Object.prototype.hasOwnProperty),zj=unapply(RegExp.prototype.test),Jj=function unconstruct(s){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return YA(s,i)}}(TypeError);function unapply(s){return function(o){for(var i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return GA(s,o,a)}}function addToSet(s,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:mj;VA&&VA(s,null);let a=o.length;for(;a--;){let u=o[a];if(\"string\"==typeof u){const s=i(u);s!==u&&(UA(o)||(o[a]=s),u=s)}s[u]=!0}return s}function purify_es_cleanArray(s){for(let o=0;o<s.length;o++){$j(s,o)||(s[o]=null)}return s}function clone(s){const o=KA(null);for(const[i,a]of qA(s)){$j(s,i)&&(Array.isArray(a)?o[i]=purify_es_cleanArray(a):a&&\"object\"==typeof a&&a.constructor===Object?o[i]=clone(a):o[i]=a)}return o}function lookupGetter(s,o){for(;null!==s;){const i=WA(s,o);if(i){if(i.get)return unapply(i.get);if(\"function\"==typeof i.value)return unapply(i.value)}s=zA(s)}return function fallbackValue(){return null}}const Kj=JA([\"a\",\"abbr\",\"acronym\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"bdi\",\"bdo\",\"big\",\"blink\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"center\",\"cite\",\"code\",\"col\",\"colgroup\",\"content\",\"data\",\"datalist\",\"dd\",\"decorator\",\"del\",\"details\",\"dfn\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"element\",\"em\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meter\",\"nav\",\"nobr\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"section\",\"select\",\"shadow\",\"small\",\"source\",\"spacer\",\"span\",\"strike\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]),Gj=JA([\"svg\",\"a\",\"altglyph\",\"altglyphdef\",\"altglyphitem\",\"animatecolor\",\"animatemotion\",\"animatetransform\",\"circle\",\"clippath\",\"defs\",\"desc\",\"ellipse\",\"filter\",\"font\",\"g\",\"glyph\",\"glyphref\",\"hkern\",\"image\",\"line\",\"lineargradient\",\"marker\",\"mask\",\"metadata\",\"mpath\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialgradient\",\"rect\",\"stop\",\"style\",\"switch\",\"symbol\",\"text\",\"textpath\",\"title\",\"tref\",\"tspan\",\"view\",\"vkern\"]),Xj=JA([\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feDropShadow\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\"]),eI=JA([\"animate\",\"color-profile\",\"cursor\",\"discard\",\"font-face\",\"font-face-format\",\"font-face-name\",\"font-face-src\",\"font-face-uri\",\"foreignobject\",\"hatch\",\"hatchpath\",\"mesh\",\"meshgradient\",\"meshpatch\",\"meshrow\",\"missing-glyph\",\"script\",\"set\",\"solidcolor\",\"unknown\",\"use\"]),tI=JA([\"math\",\"menclose\",\"merror\",\"mfenced\",\"mfrac\",\"mglyph\",\"mi\",\"mlabeledtr\",\"mmultiscripts\",\"mn\",\"mo\",\"mover\",\"mpadded\",\"mphantom\",\"mroot\",\"mrow\",\"ms\",\"mspace\",\"msqrt\",\"mstyle\",\"msub\",\"msup\",\"msubsup\",\"mtable\",\"mtd\",\"mtext\",\"mtr\",\"munder\",\"munderover\",\"mprescripts\"]),rI=JA([\"maction\",\"maligngroup\",\"malignmark\",\"mlongdiv\",\"mscarries\",\"mscarry\",\"msgroup\",\"mstack\",\"msline\",\"msrow\",\"semantics\",\"annotation\",\"annotation-xml\",\"mprescripts\",\"none\"]),nI=JA([\"#text\"]),sI=JA([\"accept\",\"action\",\"align\",\"alt\",\"autocapitalize\",\"autocomplete\",\"autopictureinpicture\",\"autoplay\",\"background\",\"bgcolor\",\"border\",\"capture\",\"cellpadding\",\"cellspacing\",\"checked\",\"cite\",\"class\",\"clear\",\"color\",\"cols\",\"colspan\",\"controls\",\"controlslist\",\"coords\",\"crossorigin\",\"datetime\",\"decoding\",\"default\",\"dir\",\"disabled\",\"disablepictureinpicture\",\"disableremoteplayback\",\"download\",\"draggable\",\"enctype\",\"enterkeyhint\",\"face\",\"for\",\"headers\",\"height\",\"hidden\",\"high\",\"href\",\"hreflang\",\"id\",\"inputmode\",\"integrity\",\"ismap\",\"kind\",\"label\",\"lang\",\"list\",\"loading\",\"loop\",\"low\",\"max\",\"maxlength\",\"media\",\"method\",\"min\",\"minlength\",\"multiple\",\"muted\",\"name\",\"nonce\",\"noshade\",\"novalidate\",\"nowrap\",\"open\",\"optimum\",\"pattern\",\"placeholder\",\"playsinline\",\"popover\",\"popovertarget\",\"popovertargetaction\",\"poster\",\"preload\",\"pubdate\",\"radiogroup\",\"readonly\",\"rel\",\"required\",\"rev\",\"reversed\",\"role\",\"rows\",\"rowspan\",\"spellcheck\",\"scope\",\"selected\",\"shape\",\"size\",\"sizes\",\"span\",\"srclang\",\"start\",\"src\",\"srcset\",\"step\",\"style\",\"summary\",\"tabindex\",\"title\",\"translate\",\"type\",\"usemap\",\"valign\",\"value\",\"width\",\"wrap\",\"xmlns\",\"slot\"]),oI=JA([\"accent-height\",\"accumulate\",\"additive\",\"alignment-baseline\",\"amplitude\",\"ascent\",\"attributename\",\"attributetype\",\"azimuth\",\"basefrequency\",\"baseline-shift\",\"begin\",\"bias\",\"by\",\"class\",\"clip\",\"clippathunits\",\"clip-path\",\"clip-rule\",\"color\",\"color-interpolation\",\"color-interpolation-filters\",\"color-profile\",\"color-rendering\",\"cx\",\"cy\",\"d\",\"dx\",\"dy\",\"diffuseconstant\",\"direction\",\"display\",\"divisor\",\"dur\",\"edgemode\",\"elevation\",\"end\",\"exponent\",\"fill\",\"fill-opacity\",\"fill-rule\",\"filter\",\"filterunits\",\"flood-color\",\"flood-opacity\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"fx\",\"fy\",\"g1\",\"g2\",\"glyph-name\",\"glyphref\",\"gradientunits\",\"gradienttransform\",\"height\",\"href\",\"id\",\"image-rendering\",\"in\",\"in2\",\"intercept\",\"k\",\"k1\",\"k2\",\"k3\",\"k4\",\"kerning\",\"keypoints\",\"keysplines\",\"keytimes\",\"lang\",\"lengthadjust\",\"letter-spacing\",\"kernelmatrix\",\"kernelunitlength\",\"lighting-color\",\"local\",\"marker-end\",\"marker-mid\",\"marker-start\",\"markerheight\",\"markerunits\",\"markerwidth\",\"maskcontentunits\",\"maskunits\",\"max\",\"mask\",\"media\",\"method\",\"mode\",\"min\",\"name\",\"numoctaves\",\"offset\",\"operator\",\"opacity\",\"order\",\"orient\",\"orientation\",\"origin\",\"overflow\",\"paint-order\",\"path\",\"pathlength\",\"patterncontentunits\",\"patterntransform\",\"patternunits\",\"points\",\"preservealpha\",\"preserveaspectratio\",\"primitiveunits\",\"r\",\"rx\",\"ry\",\"radius\",\"refx\",\"refy\",\"repeatcount\",\"repeatdur\",\"restart\",\"result\",\"rotate\",\"scale\",\"seed\",\"shape-rendering\",\"slope\",\"specularconstant\",\"specularexponent\",\"spreadmethod\",\"startoffset\",\"stddeviation\",\"stitchtiles\",\"stop-color\",\"stop-opacity\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke\",\"stroke-width\",\"style\",\"surfacescale\",\"systemlanguage\",\"tabindex\",\"tablevalues\",\"targetx\",\"targety\",\"transform\",\"transform-origin\",\"text-anchor\",\"text-decoration\",\"text-rendering\",\"textlength\",\"type\",\"u1\",\"u2\",\"unicode\",\"values\",\"viewbox\",\"visibility\",\"version\",\"vert-adv-y\",\"vert-origin-x\",\"vert-origin-y\",\"width\",\"word-spacing\",\"wrap\",\"writing-mode\",\"xchannelselector\",\"ychannelselector\",\"x\",\"x1\",\"x2\",\"xmlns\",\"y\",\"y1\",\"y2\",\"z\",\"zoomandpan\"]),iI=JA([\"accent\",\"accentunder\",\"align\",\"bevelled\",\"close\",\"columnsalign\",\"columnlines\",\"columnspan\",\"denomalign\",\"depth\",\"dir\",\"display\",\"displaystyle\",\"encoding\",\"fence\",\"frame\",\"height\",\"href\",\"id\",\"largeop\",\"length\",\"linethickness\",\"lspace\",\"lquote\",\"mathbackground\",\"mathcolor\",\"mathsize\",\"mathvariant\",\"maxsize\",\"minsize\",\"movablelimits\",\"notation\",\"numalign\",\"open\",\"rowalign\",\"rowlines\",\"rowspacing\",\"rowspan\",\"rspace\",\"rquote\",\"scriptlevel\",\"scriptminsize\",\"scriptsizemultiplier\",\"selection\",\"separator\",\"separators\",\"stretchy\",\"subscriptshift\",\"supscriptshift\",\"symmetric\",\"voffset\",\"width\",\"xmlns\"]),aI=JA([\"xlink:href\",\"xml:id\",\"xlink:title\",\"xml:space\",\"xmlns:xlink\"]),cI=HA(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),lI=HA(/<%[\\w\\W]*|[\\w\\W]*%>/gm),uI=HA(/\\$\\{[\\w\\W]*/gm),pI=HA(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),hI=HA(/^aria-[\\-\\w]+$/),dI=HA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),fI=HA(/^(?:\\w+script|data):/i),mI=HA(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),gI=HA(/^html$/i),yI=HA(/^[a-z][.\\w]*(-[.\\w]+)+$/i);var vI=Object.freeze({__proto__:null,ARIA_ATTR:hI,ATTR_WHITESPACE:mI,CUSTOM_ELEMENT:yI,DATA_ATTR:pI,DOCTYPE_NAME:gI,ERB_EXPR:lI,IS_ALLOWED_URI:dI,IS_SCRIPT_OR_DATA:fI,MUSTACHE_EXPR:cI,TMPLIT_EXPR:uI});const bI=1,_I=3,SI=7,EI=8,wI=9,xI=function getGlobal(){return\"undefined\"==typeof window?null:window};var kI=function createDOMPurify(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xI();const DOMPurify=s=>createDOMPurify(s);if(DOMPurify.version=\"3.2.4\",DOMPurify.removed=[],!s||!s.document||s.document.nodeType!==wI||!s.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:o}=s;const i=o,a=i.currentScript,{DocumentFragment:u,HTMLTemplateElement:_,Node:w,Element:x,NodeFilter:C,NamedNodeMap:j=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:L,DOMParser:B,trustedTypes:$}=s,V=x.prototype,U=lookupGetter(V,\"cloneNode\"),z=lookupGetter(V,\"remove\"),Y=lookupGetter(V,\"nextSibling\"),Z=lookupGetter(V,\"childNodes\"),ee=lookupGetter(V,\"parentNode\");if(\"function\"==typeof _){const s=o.createElement(\"template\");s.content&&s.content.ownerDocument&&(o=s.content.ownerDocument)}let ie,ae=\"\";const{implementation:ce,createNodeIterator:le,createDocumentFragment:pe,getElementsByTagName:de}=o,{importNode:fe}=i;let ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported=\"function\"==typeof qA&&\"function\"==typeof ee&&ce&&void 0!==ce.createHTMLDocument;const{MUSTACHE_EXPR:be,ERB_EXPR:_e,TMPLIT_EXPR:Se,DATA_ATTR:we,ARIA_ATTR:xe,IS_SCRIPT_OR_DATA:Pe,ATTR_WHITESPACE:Te,CUSTOM_ELEMENT:Re}=vI;let{IS_ALLOWED_URI:$e}=vI,qe=null;const ze=addToSet({},[...Kj,...Gj,...Xj,...tI,...nI]);let We=null;const He=addToSet({},[...sI,...oI,...iI,...aI]);let Ye=Object.seal(KA(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Xe=null,Qe=null,et=!0,tt=!0,rt=!1,nt=!0,st=!1,ot=!0,it=!1,at=!1,ct=!1,lt=!1,ut=!1,pt=!1,ht=!0,dt=!1,mt=!0,gt=!1,yt={},vt=null;const bt=addToSet({},[\"annotation-xml\",\"audio\",\"colgroup\",\"desc\",\"foreignobject\",\"head\",\"iframe\",\"math\",\"mi\",\"mn\",\"mo\",\"ms\",\"mtext\",\"noembed\",\"noframes\",\"noscript\",\"plaintext\",\"script\",\"style\",\"svg\",\"template\",\"thead\",\"title\",\"video\",\"xmp\"]);let _t=null;const St=addToSet({},[\"audio\",\"video\",\"img\",\"source\",\"image\",\"track\"]);let Et=null;const wt=addToSet({},[\"alt\",\"class\",\"for\",\"id\",\"label\",\"name\",\"pattern\",\"placeholder\",\"role\",\"summary\",\"title\",\"value\",\"style\",\"xmlns\"]),xt=\"http://www.w3.org/1998/Math/MathML\",kt=\"http://www.w3.org/2000/svg\",Ot=\"http://www.w3.org/1999/xhtml\";let Ct=Ot,At=!1,jt=null;const It=addToSet({},[xt,kt,Ot],_j);let Pt=addToSet({},[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\"]),Tt=addToSet({},[\"annotation-xml\"]);const Nt=addToSet({},[\"title\",\"style\",\"font\",\"a\",\"script\"]);let Mt=null;const Rt=[\"application/xhtml+xml\",\"text/html\"];let Dt=null,Lt=null;const Ft=o.createElement(\"form\"),Bt=function isRegexOrFunction(s){return s instanceof RegExp||s instanceof Function},$t=function _parseConfig(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Lt||Lt!==s){if(s&&\"object\"==typeof s||(s={}),s=clone(s),Mt=-1===Rt.indexOf(s.PARSER_MEDIA_TYPE)?\"text/html\":s.PARSER_MEDIA_TYPE,Dt=\"application/xhtml+xml\"===Mt?_j:mj,qe=$j(s,\"ALLOWED_TAGS\")?addToSet({},s.ALLOWED_TAGS,Dt):ze,We=$j(s,\"ALLOWED_ATTR\")?addToSet({},s.ALLOWED_ATTR,Dt):He,jt=$j(s,\"ALLOWED_NAMESPACES\")?addToSet({},s.ALLOWED_NAMESPACES,_j):It,Et=$j(s,\"ADD_URI_SAFE_ATTR\")?addToSet(clone(wt),s.ADD_URI_SAFE_ATTR,Dt):wt,_t=$j(s,\"ADD_DATA_URI_TAGS\")?addToSet(clone(St),s.ADD_DATA_URI_TAGS,Dt):St,vt=$j(s,\"FORBID_CONTENTS\")?addToSet({},s.FORBID_CONTENTS,Dt):bt,Xe=$j(s,\"FORBID_TAGS\")?addToSet({},s.FORBID_TAGS,Dt):{},Qe=$j(s,\"FORBID_ATTR\")?addToSet({},s.FORBID_ATTR,Dt):{},yt=!!$j(s,\"USE_PROFILES\")&&s.USE_PROFILES,et=!1!==s.ALLOW_ARIA_ATTR,tt=!1!==s.ALLOW_DATA_ATTR,rt=s.ALLOW_UNKNOWN_PROTOCOLS||!1,nt=!1!==s.ALLOW_SELF_CLOSE_IN_ATTR,st=s.SAFE_FOR_TEMPLATES||!1,ot=!1!==s.SAFE_FOR_XML,it=s.WHOLE_DOCUMENT||!1,lt=s.RETURN_DOM||!1,ut=s.RETURN_DOM_FRAGMENT||!1,pt=s.RETURN_TRUSTED_TYPE||!1,ct=s.FORCE_BODY||!1,ht=!1!==s.SANITIZE_DOM,dt=s.SANITIZE_NAMED_PROPS||!1,mt=!1!==s.KEEP_CONTENT,gt=s.IN_PLACE||!1,$e=s.ALLOWED_URI_REGEXP||dI,Ct=s.NAMESPACE||Ot,Pt=s.MATHML_TEXT_INTEGRATION_POINTS||Pt,Tt=s.HTML_INTEGRATION_POINTS||Tt,Ye=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&Bt(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ye.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&Bt(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ye.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&\"boolean\"==typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ye.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),st&&(tt=!1),ut&&(lt=!0),yt&&(qe=addToSet({},nI),We=[],!0===yt.html&&(addToSet(qe,Kj),addToSet(We,sI)),!0===yt.svg&&(addToSet(qe,Gj),addToSet(We,oI),addToSet(We,aI)),!0===yt.svgFilters&&(addToSet(qe,Xj),addToSet(We,oI),addToSet(We,aI)),!0===yt.mathMl&&(addToSet(qe,tI),addToSet(We,iI),addToSet(We,aI))),s.ADD_TAGS&&(qe===ze&&(qe=clone(qe)),addToSet(qe,s.ADD_TAGS,Dt)),s.ADD_ATTR&&(We===He&&(We=clone(We)),addToSet(We,s.ADD_ATTR,Dt)),s.ADD_URI_SAFE_ATTR&&addToSet(Et,s.ADD_URI_SAFE_ATTR,Dt),s.FORBID_CONTENTS&&(vt===bt&&(vt=clone(vt)),addToSet(vt,s.FORBID_CONTENTS,Dt)),mt&&(qe[\"#text\"]=!0),it&&addToSet(qe,[\"html\",\"head\",\"body\"]),qe.table&&(addToSet(qe,[\"tbody\"]),delete Xe.tbody),s.TRUSTED_TYPES_POLICY){if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createHTML)throw Jj('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createScriptURL)throw Jj('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');ie=s.TRUSTED_TYPES_POLICY,ae=ie.createHTML(\"\")}else void 0===ie&&(ie=function _createTrustedTypesPolicy(s,o){if(\"object\"!=typeof s||\"function\"!=typeof s.createPolicy)return null;let i=null;const a=\"data-tt-policy-suffix\";o&&o.hasAttribute(a)&&(i=o.getAttribute(a));const u=\"dompurify\"+(i?\"#\"+i:\"\");try{return s.createPolicy(u,{createHTML:s=>s,createScriptURL:s=>s})}catch(s){return console.warn(\"TrustedTypes policy \"+u+\" could not be created.\"),null}}($,a)),null!==ie&&\"string\"==typeof ae&&(ae=ie.createHTML(\"\"));JA&&JA(s),Lt=s}},qt=addToSet({},[...Gj,...Xj,...eI]),Vt=addToSet({},[...tI,...rI]),Ut=function _forceRemove(s){ej(DOMPurify.removed,{element:s});try{ee(s).removeChild(s)}catch(o){z(s)}},zt=function _removeAttribute(s,o){try{ej(DOMPurify.removed,{attribute:o.getAttributeNode(s),from:o})}catch(s){ej(DOMPurify.removed,{attribute:null,from:o})}if(o.removeAttribute(s),\"is\"===s)if(lt||ut)try{Ut(o)}catch(s){}else try{o.setAttribute(s,\"\")}catch(s){}},Wt=function _initDocument(s){let i=null,a=null;if(ct)s=\"<remove></remove>\"+s;else{const o=Cj(s,/^[\\r\\n\\t ]+/);a=o&&o[0]}\"application/xhtml+xml\"===Mt&&Ct===Ot&&(s='<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>'+s+\"</body></html>\");const u=ie?ie.createHTML(s):s;if(Ct===Ot)try{i=(new B).parseFromString(u,Mt)}catch(s){}if(!i||!i.documentElement){i=ce.createDocument(Ct,\"template\",null);try{i.documentElement.innerHTML=At?ae:u}catch(s){}}const _=i.body||i.documentElement;return s&&a&&_.insertBefore(o.createTextNode(a),_.childNodes[0]||null),Ct===Ot?de.call(i,it?\"html\":\"body\")[0]:it?i.documentElement:_},Jt=function _createNodeIterator(s){return le.call(s.ownerDocument||s,s,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},Ht=function _isClobbered(s){return s instanceof L&&(\"string\"!=typeof s.nodeName||\"string\"!=typeof s.textContent||\"function\"!=typeof s.removeChild||!(s.attributes instanceof j)||\"function\"!=typeof s.removeAttribute||\"function\"!=typeof s.setAttribute||\"string\"!=typeof s.namespaceURI||\"function\"!=typeof s.insertBefore||\"function\"!=typeof s.hasChildNodes)},Kt=function _isNode(s){return\"function\"==typeof w&&s instanceof w};function _executeHooks(s,o,i){XA(s,(s=>{s.call(DOMPurify,o,i,Lt)}))}const Gt=function _sanitizeElements(s){let o=null;if(_executeHooks(ye.beforeSanitizeElements,s,null),Ht(s))return Ut(s),!0;const i=Dt(s.nodeName);if(_executeHooks(ye.uponSanitizeElement,s,{tagName:i,allowedTags:qe}),s.hasChildNodes()&&!Kt(s.firstElementChild)&&zj(/<[/\\w]/g,s.innerHTML)&&zj(/<[/\\w]/g,s.textContent))return Ut(s),!0;if(s.nodeType===SI)return Ut(s),!0;if(ot&&s.nodeType===EI&&zj(/<[/\\w]/g,s.data))return Ut(s),!0;if(!qe[i]||Xe[i]){if(!Xe[i]&&Xt(i)){if(Ye.tagNameCheck instanceof RegExp&&zj(Ye.tagNameCheck,i))return!1;if(Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(i))return!1}if(mt&&!vt[i]){const o=ee(s)||s.parentNode,i=Z(s)||s.childNodes;if(i&&o){for(let a=i.length-1;a>=0;--a){const u=U(i[a],!0);u.__removalCount=(s.__removalCount||0)+1,o.insertBefore(u,Y(s))}}}return Ut(s),!0}return s instanceof x&&!function _checkValidNamespace(s){let o=ee(s);o&&o.tagName||(o={namespaceURI:Ct,tagName:\"template\"});const i=mj(s.tagName),a=mj(o.tagName);return!!jt[s.namespaceURI]&&(s.namespaceURI===kt?o.namespaceURI===Ot?\"svg\"===i:o.namespaceURI===xt?\"svg\"===i&&(\"annotation-xml\"===a||Pt[a]):Boolean(qt[i]):s.namespaceURI===xt?o.namespaceURI===Ot?\"math\"===i:o.namespaceURI===kt?\"math\"===i&&Tt[a]:Boolean(Vt[i]):s.namespaceURI===Ot?!(o.namespaceURI===kt&&!Tt[a])&&!(o.namespaceURI===xt&&!Pt[a])&&!Vt[i]&&(Nt[i]||!qt[i]):!(\"application/xhtml+xml\"!==Mt||!jt[s.namespaceURI]))}(s)?(Ut(s),!0):\"noscript\"!==i&&\"noembed\"!==i&&\"noframes\"!==i||!zj(/<\\/no(script|embed|frames)/i,s.innerHTML)?(st&&s.nodeType===_I&&(o=s.textContent,XA([be,_e,Se],(s=>{o=Aj(o,s,\" \")})),s.textContent!==o&&(ej(DOMPurify.removed,{element:s.cloneNode()}),s.textContent=o)),_executeHooks(ye.afterSanitizeElements,s,null),!1):(Ut(s),!0)},Yt=function _isValidAttribute(s,i,a){if(ht&&(\"id\"===i||\"name\"===i)&&(a in o||a in Ft))return!1;if(tt&&!Qe[i]&&zj(we,i));else if(et&&zj(xe,i));else if(!We[i]||Qe[i]){if(!(Xt(s)&&(Ye.tagNameCheck instanceof RegExp&&zj(Ye.tagNameCheck,s)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(s))&&(Ye.attributeNameCheck instanceof RegExp&&zj(Ye.attributeNameCheck,i)||Ye.attributeNameCheck instanceof Function&&Ye.attributeNameCheck(i))||\"is\"===i&&Ye.allowCustomizedBuiltInElements&&(Ye.tagNameCheck instanceof RegExp&&zj(Ye.tagNameCheck,a)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(a))))return!1}else if(Et[i]);else if(zj($e,Aj(a,Te,\"\")));else if(\"src\"!==i&&\"xlink:href\"!==i&&\"href\"!==i||\"script\"===s||0!==Nj(a,\"data:\")||!_t[s]){if(rt&&!zj(Pe,Aj(a,Te,\"\")));else if(a)return!1}else;return!0},Xt=function _isBasicCustomElement(s){return\"annotation-xml\"!==s&&Cj(s,Re)},Qt=function _sanitizeAttributes(s){_executeHooks(ye.beforeSanitizeAttributes,s,null);const{attributes:o}=s;if(!o||Ht(s))return;const i={attrName:\"\",attrValue:\"\",keepAttr:!0,allowedAttributes:We,forceKeepAttr:void 0};let a=o.length;for(;a--;){const u=o[a],{name:_,namespaceURI:w,value:x}=u,C=Dt(_);let j=\"value\"===_?x:Bj(x);if(i.attrName=C,i.attrValue=j,i.keepAttr=!0,i.forceKeepAttr=void 0,_executeHooks(ye.uponSanitizeAttribute,s,i),j=i.attrValue,!dt||\"id\"!==C&&\"name\"!==C||(zt(_,s),j=\"user-content-\"+j),ot&&zj(/((--!?|])>)|<\\/(style|title)/i,j)){zt(_,s);continue}if(i.forceKeepAttr)continue;if(zt(_,s),!i.keepAttr)continue;if(!nt&&zj(/\\/>/i,j)){zt(_,s);continue}st&&XA([be,_e,Se],(s=>{j=Aj(j,s,\" \")}));const L=Dt(s.nodeName);if(Yt(L,C,j)){if(ie&&\"object\"==typeof $&&\"function\"==typeof $.getAttributeType)if(w);else switch($.getAttributeType(L,C)){case\"TrustedHTML\":j=ie.createHTML(j);break;case\"TrustedScriptURL\":j=ie.createScriptURL(j)}try{w?s.setAttributeNS(w,_,j):s.setAttribute(_,j),Ht(s)?Ut(s):ZA(DOMPurify.removed)}catch(s){}}}_executeHooks(ye.afterSanitizeAttributes,s,null)},Zt=function _sanitizeShadowDOM(s){let o=null;const i=Jt(s);for(_executeHooks(ye.beforeSanitizeShadowDOM,s,null);o=i.nextNode();)_executeHooks(ye.uponSanitizeShadowNode,o,null),Gt(o),Qt(o),o.content instanceof u&&_sanitizeShadowDOM(o.content);_executeHooks(ye.afterSanitizeShadowDOM,s,null)};return DOMPurify.sanitize=function(s){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null,_=null,x=null,C=null;if(At=!s,At&&(s=\"\\x3c!--\\x3e\"),\"string\"!=typeof s&&!Kt(s)){if(\"function\"!=typeof s.toString)throw Jj(\"toString is not a function\");if(\"string\"!=typeof(s=s.toString()))throw Jj(\"dirty is not a string, aborting\")}if(!DOMPurify.isSupported)return s;if(at||$t(o),DOMPurify.removed=[],\"string\"==typeof s&&(gt=!1),gt){if(s.nodeName){const o=Dt(s.nodeName);if(!qe[o]||Xe[o])throw Jj(\"root node is forbidden and cannot be sanitized in-place\")}}else if(s instanceof w)a=Wt(\"\\x3c!----\\x3e\"),_=a.ownerDocument.importNode(s,!0),_.nodeType===bI&&\"BODY\"===_.nodeName||\"HTML\"===_.nodeName?a=_:a.appendChild(_);else{if(!lt&&!st&&!it&&-1===s.indexOf(\"<\"))return ie&&pt?ie.createHTML(s):s;if(a=Wt(s),!a)return lt?null:pt?ae:\"\"}a&&ct&&Ut(a.firstChild);const j=Jt(gt?s:a);for(;x=j.nextNode();)Gt(x),Qt(x),x.content instanceof u&&Zt(x.content);if(gt)return s;if(lt){if(ut)for(C=pe.call(a.ownerDocument);a.firstChild;)C.appendChild(a.firstChild);else C=a;return(We.shadowroot||We.shadowrootmode)&&(C=fe.call(i,C,!0)),C}let L=it?a.outerHTML:a.innerHTML;return it&&qe[\"!doctype\"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&zj(gI,a.ownerDocument.doctype.name)&&(L=\"<!DOCTYPE \"+a.ownerDocument.doctype.name+\">\\n\"+L),st&&XA([be,_e,Se],(s=>{L=Aj(L,s,\" \")})),ie&&pt?ie.createHTML(L):L},DOMPurify.setConfig=function(){$t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),at=!0},DOMPurify.clearConfig=function(){Lt=null,at=!1},DOMPurify.isValidAttribute=function(s,o,i){Lt||$t({});const a=Dt(s),u=Dt(o);return Yt(a,u,i)},DOMPurify.addHook=function(s,o){\"function\"==typeof o&&ej(ye[s],o)},DOMPurify.removeHook=function(s,o){if(void 0!==o){const i=QA(ye[s],o);return-1===i?void 0:fj(ye[s],i,1)[0]}return ZA(ye[s])},DOMPurify.removeHooks=function(s){ye[s]=[]},DOMPurify.removeAllHooks=function(){ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();kI.addHook&&kI.addHook(\"beforeSanitizeElements\",(function(s){return s.href&&s.setAttribute(\"rel\",\"noopener noreferrer\"),s}));const OI=function Markdown({source:s,className:o=\"\",getConfigs:i=()=>({useUnsafeMarkdown:!1})}){if(\"string\"!=typeof s)return null;const a=new Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(linkify);a.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:u}=i(),_=a.render(s),w=sanitizer(_,{useUnsafeMarkdown:u});return s&&_&&w?Re.createElement(\"div\",{className:Jn()(o,\"markdown\"),dangerouslySetInnerHTML:{__html:w}}):null};function sanitizer(s,{useUnsafeMarkdown:o=!1}={}){const i=o,a=o?[]:[\"style\",\"class\"];return o&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),kI.sanitize(s,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:i,FORBID_ATTR:a})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends Re.Component{render(){const{errSelectors:s,specSelectors:o,getComponent:i}=this.props,a=i(\"SvgAssets\"),u=i(\"InfoContainer\",!0),_=i(\"VersionPragmaFilter\"),w=i(\"operations\",!0),x=i(\"Models\",!0),C=i(\"Webhooks\",!0),j=i(\"Row\"),L=i(\"Col\"),B=i(\"errors\",!0),$=i(\"ServersContainer\",!0),V=i(\"SchemesContainer\",!0),U=i(\"AuthorizeBtnContainer\",!0),z=i(\"FilterContainer\",!0),Y=o.isSwagger2(),Z=o.isOAS3(),ee=o.isOAS31(),ie=!o.specStr(),ae=o.loadingStatus();let ce=null;if(\"loading\"===ae&&(ce=Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"div\",{className:\"loading\"})))),\"failed\"===ae&&(ce=Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),Re.createElement(B,null)))),\"failedConfig\"===ae){const o=s.lastError(),i=o?o.get(\"message\"):\"\";ce=Re.createElement(\"div\",{className:\"info failed-config\"},Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),Re.createElement(\"p\",null,i)))}if(!ce&&ie&&(ce=Re.createElement(\"h4\",null,\"No API definition provided.\")),ce)return Re.createElement(\"div\",{className:\"swagger-ui\"},Re.createElement(\"div\",{className:\"loading-container\"},ce));const le=o.servers(),pe=o.schemes(),de=le&&le.size,fe=pe&&pe.size,ye=!!o.securityDefinitions();return Re.createElement(\"div\",{className:\"swagger-ui\"},Re.createElement(a,null),Re.createElement(_,{isSwagger2:Y,isOAS3:Z,alsoShow:Re.createElement(B,null)},Re.createElement(B,null),Re.createElement(j,{className:\"information-container\"},Re.createElement(L,{mobile:12},Re.createElement(u,null))),de||fe||ye?Re.createElement(\"div\",{className:\"scheme-container\"},Re.createElement(L,{className:\"schemes wrapper\",mobile:12},de||fe?Re.createElement(\"div\",{className:\"schemes-server-container\"},de?Re.createElement($,null):null,fe?Re.createElement(V,null):null):null,ye?Re.createElement(U,null):null)):null,Re.createElement(z,null),Re.createElement(j,null,Re.createElement(L,{mobile:12,desktop:12},Re.createElement(w,null))),ee&&Re.createElement(j,{className:\"webhooks-container\"},Re.createElement(L,{mobile:12,desktop:12},Re.createElement(C,null))),Re.createElement(j,null,Re.createElement(L,{mobile:12,desktop:12},Re.createElement(x,null)))))}}const core_components=()=>({components:{App:HO,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:rC,InfoContainer,InfoUrl,InfoBasePath,Contact:nC,License:sC,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:operation_Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,responses:responses_Responses,response:response_Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,Property:property,TryItOutButton,Markdown:OI,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example:example_Example,ExamplesSelect,ExamplesSelectValueRetainer}}),form_components=()=>({components:{..._e}}),base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5,json_schema_5_samples,core_components,form_components,swagger_client,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,syntax_highlighting,versions,safe_render()],CI=(0,ze.Map)();function onlyOAS3(s){return(o,i)=>(...a)=>{if(i.getSystem().specSelectors.isOAS3()){const o=s(...a);return\"function\"==typeof o?o(i):o}return o(...a)}}const AI=onlyOAS3(xs()(null)),jI=onlyOAS3(((s,o)=>s=>s.getSystem().specSelectors.findSchema(o))),II=onlyOAS3((()=>s=>{const o=s.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return ze.Map.isMap(o)?o:CI})),PI=onlyOAS3((()=>s=>s.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),TI=onlyOAS3(Vt(Ns,(s=>s.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(s,o)=>(i,...a)=>o.specSelectors.isOAS3()?o.oas3Selectors.validOperationMethods():s(...a),NI=AI,MI=AI,RI=AI,DI=AI,LI=AI;const FI=function wrap_selectors_onlyOAS3(s){return(o,i)=>(...a)=>{if(i.getSystem().specSelectors.isOAS3()){let o=i.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return s(i,o,...a)}return o(...a)}}(Vt((s=>s),(({specSelectors:s})=>s.securityDefinitions()),((s,o)=>{let i=(0,ze.List)();return o?(o.entrySeq().forEach((([s,o])=>{const a=o?.get(\"type\");if(\"oauth2\"===a&&o.get(\"flows\").entrySeq().forEach((([a,u])=>{let _=(0,ze.fromJS)({flow:a,authorizationUrl:u.get(\"authorizationUrl\"),tokenUrl:u.get(\"tokenUrl\"),scopes:u.get(\"scopes\"),type:o.get(\"type\"),description:o.get(\"description\")});i=i.push(new ze.Map({[s]:_.filter((s=>void 0!==s))}))})),\"http\"!==a&&\"apiKey\"!==a||(i=i.push(new ze.Map({[s]:o}))),\"openIdConnect\"===a&&o.get(\"openIdConnectData\")){let a=o.get(\"openIdConnectData\");(a.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((u=>{let _=a.get(\"scopes_supported\")&&a.get(\"scopes_supported\").reduce(((s,o)=>s.set(o,\"\")),new ze.Map),w=(0,ze.fromJS)({flow:u,authorizationUrl:a.get(\"authorization_endpoint\"),tokenUrl:a.get(\"token_endpoint\"),scopes:_,type:\"oauth2\",openIdConnectUrl:o.get(\"openIdConnectUrl\")});i=i.push(new ze.Map({[s]:w.filter((s=>void 0!==s))}))}))}})),i):i})));function OAS3ComponentWrapFactory(s){return(o,i)=>a=>\"function\"==typeof i.specSelectors?.isOAS3?i.specSelectors.isOAS3()?Re.createElement(s,Mn()({},a,i,{Ori:o})):Re.createElement(o,a):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const BI=(0,ze.Map)(),selectors_isSwagger2=()=>s=>function isSwagger2(s){const o=s.get(\"swagger\");return\"string\"==typeof o&&\"2.0\"===o}(s.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>s=>function isOAS30(s){const o=s.get(\"openapi\");return\"string\"==typeof o&&/^3\\.0\\.(?:[1-9]\\d*|0)$/.test(o)}(s.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>s=>s.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(s){return(o,...i)=>a=>{if(a.specSelectors.isOAS3()){const u=s(o,...i);return\"function\"==typeof u?u(a):u}return null}}const $I=selectors_onlyOAS3((()=>s=>s.specSelectors.specJson().get(\"servers\",BI))),findSchema=(s,o)=>{const i=s.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",o],null),a=s.getIn([\"json\",\"components\",\"schemas\",o],null);return i||a||null},qI=selectors_onlyOAS3(((s,{callbacks:o,specPath:i})=>s=>{const a=s.specSelectors.validOperationMethods();return ze.Map.isMap(o)?o.reduce(((s,o,u)=>{if(!ze.Map.isMap(o))return s;const _=o.reduce(((s,o,_)=>{if(!ze.Map.isMap(o))return s;const w=o.entrySeq().filter((([s])=>a.includes(s))).map((([s,o])=>({operation:(0,ze.Map)({operation:o}),method:s,path:_,callbackName:u,specPath:i.concat([u,_,s])})));return s.concat(w)}),(0,ze.List)());return s.concat(_)}),(0,ze.List)()).groupBy((s=>s.callbackName)).map((s=>s.toArray())).toObject():{}})),callbacks=({callbacks:s,specPath:o,specSelectors:i,getComponent:a})=>{const u=i.callbacksOperations({callbacks:s,specPath:o}),_=Object.keys(u),w=a(\"OperationContainer\",!0);return 0===_.length?Re.createElement(\"span\",null,\"No callbacks\"):Re.createElement(\"div\",null,_.map((s=>Re.createElement(\"div\",{key:`${s}`},Re.createElement(\"h2\",null,s),u[s].map((o=>Re.createElement(w,{key:`${s}-${o.path}-${o.method}`,op:o.operation,tag:\"callbacks\",method:o.method,path:o.path,specPath:o.specPath,allowTryItOut:!1})))))))},getDefaultRequestBodyValue=(s,o,i,a)=>{const u=s.getIn([\"content\",o])??(0,ze.OrderedMap)(),_=u.get(\"schema\",(0,ze.OrderedMap)()).toJS(),w=void 0!==u.get(\"examples\"),x=u.get(\"example\"),C=w?u.getIn([\"examples\",i,\"value\"]):x;return stringify(a.getSampleSchema(_,o,{includeWriteOnly:!0},C))},components_request_body=({userHasEditedBody:s,requestBody:o,requestBodyValue:i,requestBodyInclusionSetting:a,requestBodyErrors:u,getComponent:_,getConfigs:w,specSelectors:x,fn:C,contentType:j,isExecute:L,specPath:B,onChange:$,onChangeIncludeEmpty:V,activeExamplesKey:U,updateActiveExamplesKey:z,setRetainRequestBodyValueFlag:Y})=>{const handleFile=s=>{$(s.target.files[0])},setIsIncludedOptions=s=>{let o={key:s,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===a.get(s,\"no value\")&&(o.shouldDispatchInit=!0),o},Z=_(\"Markdown\",!0),ee=_(\"modelExample\"),ie=_(\"RequestBodyEditor\"),ae=_(\"HighlightCode\",!0),ce=_(\"ExamplesSelectValueRetainer\"),le=_(\"Example\"),pe=_(\"ParameterIncludeEmpty\"),{showCommonExtensions:de}=w(),fe=o?.get(\"description\")??null,ye=o?.get(\"content\")??new ze.OrderedMap;j=j||ye.keySeq().first()||\"\";const be=ye.get(j)??(0,ze.OrderedMap)(),_e=be.get(\"schema\",(0,ze.OrderedMap)()),Se=be.get(\"examples\",null),we=Se?.map(((s,i)=>{const a=s?.get(\"value\",null);return a&&(s=s.set(\"value\",getDefaultRequestBodyValue(o,j,i,C),a)),s}));u=ze.List.isList(u)?u:(0,ze.List)();if(C.isFileUploadIntended(be?.get(\"schema\"),j)){const s=_(\"Input\");return L?Re.createElement(s,{type:\"file\",onChange:handleFile}):Re.createElement(\"i\",null,\"Example values are not available for \",Re.createElement(\"code\",null,j),\" media types.\")}if(!be.size)return null;if(C.hasSchemaType(be.get(\"schema\"),\"object\")&&(\"application/x-www-form-urlencoded\"===j||0===j.indexOf(\"multipart/\"))&&_e.get(\"properties\",(0,ze.OrderedMap)()).size>0){const s=_(\"JsonSchemaForm\"),o=_(\"ParameterExt\"),j=_e.get(\"properties\",(0,ze.OrderedMap)());return i=ze.Map.isMap(i)?i:(0,ze.OrderedMap)(),Re.createElement(\"div\",{className:\"table-container\"},fe&&Re.createElement(Z,{source:fe}),Re.createElement(\"table\",null,Re.createElement(\"tbody\",null,ze.Map.isMap(j)&&j.entrySeq().map((([j,U])=>{if(U.get(\"readOnly\"))return;const z=U.get(\"oneOf\")?.get(0)?.toJS(),Y=U.get(\"anyOf\")?.get(0)?.toJS();U=(0,ze.fromJS)(C.mergeJsonSchema(U.toJS(),z??Y??{}));let ie=de?getCommonExtensions(U):null;const ae=_e.get(\"required\",(0,ze.List)()).includes(j),ce=C.getSchemaObjectType(U),le=C.getSchemaObjectTypeLabel(U),fe=C.getSchemaObjectType(U?.get(\"items\")),ye=U.get(\"format\"),be=U.get(\"description\"),Se=i.getIn([j,\"value\"]),we=i.getIn([j,\"errors\"])||u,xe=a.get(j)||!1;let Pe=C.getSampleSchema(U,!1,{includeWriteOnly:!0});!1===Pe&&(Pe=\"false\"),0===Pe&&(Pe=\"0\"),\"string\"!=typeof Pe&&\"object\"===ce&&(Pe=stringify(Pe)),\"string\"==typeof Pe&&\"array\"===ce&&(Pe=JSON.parse(Pe));const Te=C.isFileUploadIntended(U),$e=Re.createElement(s,{fn:C,dispatchInitialValue:!Te,schema:U,description:j,getComponent:_,value:void 0===Se?Pe:Se,required:ae,errors:we,onChange:s=>{$(s,[j])}});return Re.createElement(\"tr\",{key:j,className:\"parameters\",\"data-property-name\":j},Re.createElement(\"td\",{className:\"parameters-col_name\"},Re.createElement(\"div\",{className:ae?\"parameter__name required\":\"parameter__name\"},j,ae?Re.createElement(\"span\",null,\" *\"):null),Re.createElement(\"div\",{className:\"parameter__type\"},le,ye&&Re.createElement(\"span\",{className:\"prop-format\"},\"($\",ye,\")\"),de&&ie.size?ie.entrySeq().map((([s,i])=>Re.createElement(o,{key:`${s}-${i}`,xKey:s,xVal:i}))):null),Re.createElement(\"div\",{className:\"parameter__deprecated\"},U.get(\"deprecated\")?\"deprecated\":null)),Re.createElement(\"td\",{className:\"parameters-col_description\"},Re.createElement(Z,{source:be}),L?Re.createElement(\"div\",null,\"object\"===ce||\"object\"===fe?Re.createElement(ee,{getComponent:_,specPath:B.push(\"schema\"),getConfigs:w,isExecute:L,specSelectors:x,schema:U,example:$e}):$e,ae?null:Re.createElement(pe,{onChange:s=>V(j,s),isIncluded:xe,isIncludedOptions:setIsIncludedOptions(j),isDisabled:Array.isArray(Se)?0!==Se.length:!isEmptyValue(Se)})):null))})))))}const xe=getDefaultRequestBodyValue(o,j,U,C);let Pe=null;getKnownSyntaxHighlighterLanguage(xe)&&(Pe=\"json\");const Te=L?Re.createElement(ie,{value:i,errors:u,defaultValue:xe,onChange:$,getComponent:_}):Re.createElement(ae,{className:\"body-param__example\",language:Pe},stringify(i)||xe);return Re.createElement(\"div\",null,fe&&Re.createElement(Z,{source:fe}),we?Re.createElement(ce,{userHasEditedBody:s,examples:we,currentKey:U,currentUserInputValue:i,onSelect:s=>{z(s)},updateValue:$,defaultToFirstExample:!0,getComponent:_,setRetainRequestBodyValueFlag:Y}):null,Re.createElement(ee,{getComponent:_,getConfigs:w,specSelectors:x,expandDepth:1,isExecute:L,schema:be.get(\"schema\"),specPath:B.push(\"content\",j),example:Te,includeWriteOnly:!0}),we?Re.createElement(le,{example:we.get(U),getComponent:_,getConfigs:w}):null)};class operation_link_OperationLink extends Re.Component{render(){const{link:s,name:o,getComponent:i}=this.props,a=i(\"Markdown\",!0);let u=s.get(\"operationId\")||s.get(\"operationRef\"),_=s.get(\"parameters\")&&s.get(\"parameters\").toJS(),w=s.get(\"description\");return Re.createElement(\"div\",{className:\"operation-link\"},Re.createElement(\"div\",{className:\"description\"},Re.createElement(\"b\",null,Re.createElement(\"code\",null,o)),w?Re.createElement(a,{source:w}):null),Re.createElement(\"pre\",null,\"Operation `\",u,\"`\",Re.createElement(\"br\",null),Re.createElement(\"br\",null),\"Parameters \",function padString(s,o){if(\"string\"!=typeof o)return\"\";return o.split(\"\\n\").map(((o,i)=>i>0?Array(s+1).join(\" \")+o:o)).join(\"\\n\")}(0,JSON.stringify(_,null,2))||\"{}\",Re.createElement(\"br\",null)))}}const VI=operation_link_OperationLink,components_servers=({servers:s,currentServer:o,setSelectedServer:i,setServerVariableValue:a,getServerVariable:u,getEffectiveServerValue:_})=>{const w=(s.find((s=>s.get(\"url\")===o))||(0,ze.OrderedMap)()).get(\"variables\")||(0,ze.OrderedMap)(),x=0!==w.size;(0,Re.useEffect)((()=>{o||i(s.first()?.get(\"url\"))}),[]),(0,Re.useEffect)((()=>{const u=s.find((s=>s.get(\"url\")===o));if(!u)return void i(s.first().get(\"url\"));(u.get(\"variables\")||(0,ze.OrderedMap)()).map(((s,i)=>{a({server:o,key:i,val:s.get(\"default\")||\"\"})}))}),[o,s]);const C=(0,Re.useCallback)((s=>{i(s.target.value)}),[i]),j=(0,Re.useCallback)((s=>{const i=s.target.getAttribute(\"data-variable\"),u=s.target.value;a({server:o,key:i,val:u})}),[a,o]);return Re.createElement(\"div\",{className:\"servers\"},Re.createElement(\"label\",{htmlFor:\"servers\"},Re.createElement(\"select\",{onChange:C,value:o,id:\"servers\"},s.valueSeq().map((s=>Re.createElement(\"option\",{value:s.get(\"url\"),key:s.get(\"url\")},s.get(\"url\"),s.get(\"description\")&&` - ${s.get(\"description\")}`))).toArray())),x&&Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",Re.createElement(\"code\",null,_(o))),Re.createElement(\"h4\",null,\"Server variables\"),Re.createElement(\"table\",null,Re.createElement(\"tbody\",null,w.entrySeq().map((([s,i])=>Re.createElement(\"tr\",{key:s},Re.createElement(\"td\",null,s),Re.createElement(\"td\",null,i.get(\"enum\")?Re.createElement(\"select\",{\"data-variable\":s,onChange:j},i.get(\"enum\").map((i=>Re.createElement(\"option\",{selected:i===u(o,s),key:i,value:i},i)))):Re.createElement(\"input\",{type:\"text\",value:u(o,s)||\"\",onChange:j,\"data-variable\":s})))))))))};class ServersContainer extends Re.Component{render(){const{specSelectors:s,oas3Selectors:o,oas3Actions:i,getComponent:a}=this.props,u=s.servers(),_=a(\"Servers\");return u&&u.size?Re.createElement(\"div\",null,Re.createElement(\"span\",{className:\"servers-title\"},\"Servers\"),Re.createElement(_,{servers:u,currentServer:o.selectedServer(),setSelectedServer:i.setSelectedServer,setServerVariableValue:i.setServerVariableValue,getServerVariable:o.serverVariableValue,getEffectiveServerValue:o.serverEffectiveValue})):null}}const UI=Function.prototype;class RequestBodyEditor extends Re.PureComponent{static defaultProps={onChange:UI,userHasEditedBody:!1};constructor(s,o){super(s,o),this.state={value:stringify(s.value)||s.defaultValue},s.onChange(s.value)}applyDefaultValue=s=>{const{onChange:o,defaultValue:i}=s||this.props;return this.setState({value:i}),o(i)};onChange=s=>{this.props.onChange(stringify(s))};onDomChange=s=>{const o=s.target.value;this.setState({value:o},(()=>this.onChange(o)))};UNSAFE_componentWillReceiveProps(s){this.props.value!==s.value&&s.value!==this.state.value&&this.setState({value:stringify(s.value)}),!s.value&&s.defaultValue&&this.state.value&&this.applyDefaultValue(s)}render(){let{getComponent:s,errors:o}=this.props,{value:i}=this.state,a=o.size>0;const u=s(\"TextArea\");return Re.createElement(\"div\",{className:\"body-param\"},Re.createElement(u,{className:Jn()(\"body-param__text\",{invalid:a}),title:o.size?o.join(\", \"):\"\",value:i,onChange:this.onDomChange}))}}class HttpAuth extends Re.Component{constructor(s,o){super(s,o);let{name:i,schema:a}=this.props,u=this.getValue();this.state={name:i,schema:a,value:u}}getValue(){let{name:s,authorized:o}=this.props;return o&&o.getIn([s,\"value\"])}onChange=s=>{let{onChange:o}=this.props,{value:i,name:a}=s.target,u=Object.assign({},this.state.value);a?u[a]=i:u=i,this.setState({value:u},(()=>o(this.state)))};render(){let{schema:s,getComponent:o,errSelectors:i,name:a,authSelectors:u}=this.props;const _=o(\"Input\"),w=o(\"Row\"),x=o(\"Col\"),C=o(\"authError\"),j=o(\"Markdown\",!0),L=o(\"JumpToPath\",!0),B=(s.get(\"scheme\")||\"\").toLowerCase(),$=u.selectAuthPath(a);let V=this.getValue(),U=i.allErrors().filter((s=>s.get(\"authId\")===a));if(\"basic\"===B){let o=V?V.get(\"username\"):null;return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,Re.createElement(\"code\",null,a),\"  (http, Basic)\",Re.createElement(L,{path:$})),o&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(j,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),o?Re.createElement(\"code\",null,\" \",o,\" \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),o?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),U.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o}))))}return\"bearer\"===B?Re.createElement(\"div\",null,Re.createElement(\"h4\",null,Re.createElement(\"code\",null,a),\"  (http, Bearer)\",Re.createElement(L,{path:$})),V&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(j,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),V?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),U.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o})))):Re.createElement(\"div\",null,Re.createElement(\"em\",null,Re.createElement(\"b\",null,a),\" HTTP authentication: unsupported scheme \",`'${B}'`))}}class operation_servers_OperationServers extends Re.Component{setSelectedServer=s=>{const{path:o,method:i}=this.props;return this.forceUpdate(),this.props.setSelectedServer(s,`${o}:${i}`)};setServerVariableValue=s=>{const{path:o,method:i}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...s,namespace:`${o}:${i}`})};getSelectedServer=()=>{const{path:s,method:o}=this.props;return this.props.getSelectedServer(`${s}:${o}`)};getServerVariable=(s,o)=>{const{path:i,method:a}=this.props;return this.props.getServerVariable({namespace:`${i}:${a}`,server:s},o)};getEffectiveServerValue=s=>{const{path:o,method:i}=this.props;return this.props.getEffectiveServerValue({server:s,namespace:`${o}:${i}`})};render(){const{operationServers:s,pathServers:o,getComponent:i}=this.props;if(!s&&!o)return null;const a=i(\"Servers\"),u=s||o,_=s?\"operation\":\"path\";return Re.createElement(\"div\",{className:\"opblock-section operation-servers\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"div\",{className:\"tab-header\"},Re.createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(\"h4\",{className:\"message\"},\"These \",_,\"-level options override the global server options.\"),Re.createElement(a,{servers:u,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const zI={Callbacks:callbacks,HttpAuth,RequestBody:components_request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers:operation_servers_OperationServers,operationLink:VI},WI=new Remarkable(\"commonmark\");WI.block.ruler.enable([\"table\"]),WI.set({linkTarget:\"_blank\"});const JI=OAS3ComponentWrapFactory((({source:s,className:o=\"\",getConfigs:i=()=>({useUnsafeMarkdown:!1})})=>{if(\"string\"!=typeof s)return null;if(s){const{useUnsafeMarkdown:a}=i(),u=sanitizer(WI.render(s),{useUnsafeMarkdown:a});let _;return\"string\"==typeof u&&(_=u.trim()),Re.createElement(\"div\",{dangerouslySetInnerHTML:{__html:_},className:Jn()(o,\"renderedMarkdown\")})}return null})),HI=OAS3ComponentWrapFactory((({Ori:s,...o})=>{const{schema:i,getComponent:a,errSelectors:u,authorized:_,onAuthChange:w,name:x,authSelectors:C}=o,j=a(\"HttpAuth\");return\"http\"===i.get(\"type\")?Re.createElement(j,{key:x,schema:i,name:x,errSelectors:u,authorized:_,getComponent:a,onChange:w,authSelectors:C}):Re.createElement(s,o)})),KI=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends Re.Component{render(){let{getConfigs:s,schema:o,Ori:i}=this.props,a=[\"model-box\"],u=null;return!0===o.get(\"deprecated\")&&(a.push(\"deprecated\"),u=Re.createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),Re.createElement(\"div\",{className:a.join(\" \")},u,Re.createElement(i,Mn()({},this.props,{getConfigs:s,depth:1,expandDepth:this.props.expandDepth||0})))}}const GI=OAS3ComponentWrapFactory(ModelComponent),YI=OAS3ComponentWrapFactory((({Ori:s,...o})=>{const{schema:i,getComponent:a,errors:u,onChange:_,fn:w}=o,x=w.isFileUploadIntended(i),C=a(\"Input\");return x?Re.createElement(C,{type:\"file\",className:u.length?\"invalid\":\"\",title:u.length?u:\"\",onChange:s=>{_(s.target.files[0])},disabled:s.isDisabled}):Re.createElement(s,o)})),XI={Markdown:JI,AuthItem:HI,OpenAPIVersion:function OAS30ComponentWrapFactory(s){return(o,i)=>a=>\"function\"==typeof i.specSelectors?.isOAS30?i.specSelectors.isOAS30()?Re.createElement(s,Mn()({},a,i,{Ori:o})):Re.createElement(o,a):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((s=>{const{Ori:o}=s;return Re.createElement(o,{oasVersion:\"3.0\"})})),JsonSchema_string:YI,model:GI,onlineValidatorBadge:KI},QI=\"oas3_set_servers\",ZI=\"oas3_set_request_body_value\",eP=\"oas3_set_request_body_retain_flag\",tP=\"oas3_set_request_body_inclusion\",rP=\"oas3_set_active_examples_member\",nP=\"oas3_set_request_content_type\",sP=\"oas3_set_response_content_type\",oP=\"oas3_set_server_variable_value\",iP=\"oas3_set_request_body_validate_error\",aP=\"oas3_clear_request_body_validate_error\",cP=\"oas3_clear_request_body_value\";function setSelectedServer(s,o){return{type:QI,payload:{selectedServerUrl:s,namespace:o}}}function setRequestBodyValue({value:s,pathMethod:o}){return{type:ZI,payload:{value:s,pathMethod:o}}}const setRetainRequestBodyValueFlag=({value:s,pathMethod:o})=>({type:eP,payload:{value:s,pathMethod:o}});function setRequestBodyInclusion({value:s,pathMethod:o,name:i}){return{type:tP,payload:{value:s,pathMethod:o,name:i}}}function setActiveExamplesMember({name:s,pathMethod:o,contextType:i,contextName:a}){return{type:rP,payload:{name:s,pathMethod:o,contextType:i,contextName:a}}}function setRequestContentType({value:s,pathMethod:o}){return{type:nP,payload:{value:s,pathMethod:o}}}function setResponseContentType({value:s,path:o,method:i}){return{type:sP,payload:{value:s,path:o,method:i}}}function setServerVariableValue({server:s,namespace:o,key:i,val:a}){return{type:oP,payload:{server:s,namespace:o,key:i,val:a}}}const setRequestBodyValidateError=({path:s,method:o,validationErrors:i})=>({type:iP,payload:{path:s,method:o,validationErrors:i}}),clearRequestBodyValidateError=({path:s,method:o})=>({type:aP,payload:{path:s,method:o}}),initRequestBodyValidateError=({pathMethod:s})=>({type:aP,payload:{path:s[0],method:s[1]}}),clearRequestBodyValue=({pathMethod:s})=>({type:cP,payload:{pathMethod:s}});var lP=__webpack_require__(60680),uP=__webpack_require__.n(lP);const oas3_selectors_onlyOAS3=s=>(o,...i)=>a=>{if(a.getSystem().specSelectors.isOAS3()){const u=s(o,...i);return\"function\"==typeof u?u(a):u}return null};const pP=oas3_selectors_onlyOAS3(((s,o)=>{const i=o?[o,\"selectedServer\"]:[\"selectedServer\"];return s.getIn(i)||\"\"})),hP=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"bodyValue\"])||null)),dP=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(s,o,i)=>s=>{const{oas3Selectors:a,specSelectors:u,fn:_}=s.getSystem();if(u.isOAS3()){const s=a.requestContentType(o,i);if(s)return getDefaultRequestBodyValue(u.specResolvedSubtree([\"paths\",o,i,\"requestBody\"]),s,a.activeExamplesMember(o,i,\"requestBody\",\"requestBody\"),_)}return null},fP=oas3_selectors_onlyOAS3(((s,o,i)=>s=>{const{oas3Selectors:a,specSelectors:u,fn:_}=s;let w=!1;const x=a.requestContentType(o,i);let C=a.requestBodyValue(o,i);const j=u.specResolvedSubtree([\"paths\",o,i,\"requestBody\"]);if(!j)return!1;if(ze.Map.isMap(C)&&(C=stringify(C.mapEntries((s=>ze.Map.isMap(s[1])?[s[0],s[1].get(\"value\")]:s)).toJS())),ze.List.isList(C)&&(C=stringify(C)),x){const s=getDefaultRequestBodyValue(j,x,a.activeExamplesMember(o,i,\"requestBody\",\"requestBody\"),_);w=!!C&&C!==s}return w})),mP=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"bodyInclusion\"])||(0,ze.Map)())),gP=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"errors\"])||null)),yP=oas3_selectors_onlyOAS3(((s,o,i,a,u)=>s.getIn([\"examples\",o,i,a,u,\"activeExample\"])||null)),vP=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"requestContentType\"])||null)),bP=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"responseContentType\"])||null)),_P=oas3_selectors_onlyOAS3(((s,o,i)=>{let a;if(\"string\"!=typeof o){const{server:s,namespace:u}=o;a=u?[u,\"serverVariableValues\",s,i]:[\"serverVariableValues\",s,i]}else{a=[\"serverVariableValues\",o,i]}return s.getIn(a)||null})),SP=oas3_selectors_onlyOAS3(((s,o)=>{let i;if(\"string\"!=typeof o){const{server:s,namespace:a}=o;i=a?[a,\"serverVariableValues\",s]:[\"serverVariableValues\",s]}else{i=[\"serverVariableValues\",o]}return s.getIn(i)||(0,ze.OrderedMap)()})),EP=oas3_selectors_onlyOAS3(((s,o)=>{var i,a;if(\"string\"!=typeof o){const{server:u,namespace:_}=o;a=u,i=_?s.getIn([_,\"serverVariableValues\",a]):s.getIn([\"serverVariableValues\",a])}else a=o,i=s.getIn([\"serverVariableValues\",a]);i=i||(0,ze.OrderedMap)();let u=a;return i.map(((s,o)=>{u=u.replace(new RegExp(`{${uP()(o)}}`,\"g\"),s)})),u})),wP=function validateRequestBodyIsRequired(s){return(...o)=>i=>{const a=i.getSystem().specSelectors.specJson();let u=[...o][1]||[];return!a.getIn([\"paths\",...u,\"requestBody\",\"required\"])||s(...o)}}(((s,o)=>((s,o)=>(o=o||[],!!s.getIn([\"requestData\",...o,\"bodyValue\"])))(s,o))),validateShallowRequired=(s,{oas3RequiredRequestBodyContentType:o,oas3RequestContentType:i,oas3RequestBodyValue:a})=>{let u=[];if(!ze.Map.isMap(a))return u;let _=[];return Object.keys(o.requestContentType).forEach((s=>{if(s===i){o.requestContentType[s].forEach((s=>{_.indexOf(s)<0&&_.push(s)}))}})),_.forEach((s=>{a.getIn([s,\"value\"])||u.push(s)})),u},xP=xs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]),kP={[QI]:(s,{payload:{selectedServerUrl:o,namespace:i}})=>{const a=i?[i,\"selectedServer\"]:[\"selectedServer\"];return s.setIn(a,o)},[ZI]:(s,{payload:{value:o,pathMethod:i}})=>{let[a,u]=i;if(!ze.Map.isMap(o))return s.setIn([\"requestData\",a,u,\"bodyValue\"],o);let _,w=s.getIn([\"requestData\",a,u,\"bodyValue\"])||(0,ze.Map)();ze.Map.isMap(w)||(w=(0,ze.Map)());const[...x]=o.keys();return x.forEach((s=>{let i=o.getIn([s]);w.has(s)&&ze.Map.isMap(i)||(_=w.setIn([s,\"value\"],i))})),s.setIn([\"requestData\",a,u,\"bodyValue\"],_)},[eP]:(s,{payload:{value:o,pathMethod:i}})=>{let[a,u]=i;return s.setIn([\"requestData\",a,u,\"retainBodyValue\"],o)},[tP]:(s,{payload:{value:o,pathMethod:i,name:a}})=>{let[u,_]=i;return s.setIn([\"requestData\",u,_,\"bodyInclusion\",a],o)},[rP]:(s,{payload:{name:o,pathMethod:i,contextType:a,contextName:u}})=>{let[_,w]=i;return s.setIn([\"examples\",_,w,a,u,\"activeExample\"],o)},[nP]:(s,{payload:{value:o,pathMethod:i}})=>{let[a,u]=i;return s.setIn([\"requestData\",a,u,\"requestContentType\"],o)},[sP]:(s,{payload:{value:o,path:i,method:a}})=>s.setIn([\"requestData\",i,a,\"responseContentType\"],o),[oP]:(s,{payload:{server:o,namespace:i,key:a,val:u}})=>{const _=i?[i,\"serverVariableValues\",o,a]:[\"serverVariableValues\",o,a];return s.setIn(_,u)},[iP]:(s,{payload:{path:o,method:i,validationErrors:a}})=>{let u=[];if(u.push(\"Required field is not provided\"),a.missingBodyValue)return s.setIn([\"requestData\",o,i,\"errors\"],(0,ze.fromJS)(u));if(a.missingRequiredKeys&&a.missingRequiredKeys.length>0){const{missingRequiredKeys:_}=a;return s.updateIn([\"requestData\",o,i,\"bodyValue\"],(0,ze.fromJS)({}),(s=>_.reduce(((s,o)=>s.setIn([o,\"errors\"],(0,ze.fromJS)(u))),s)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),s},[aP]:(s,{payload:{path:o,method:i}})=>{const a=s.getIn([\"requestData\",o,i,\"bodyValue\"]);if(!ze.Map.isMap(a))return s.setIn([\"requestData\",o,i,\"errors\"],(0,ze.fromJS)([]));const[...u]=a.keys();return u?s.updateIn([\"requestData\",o,i,\"bodyValue\"],(0,ze.fromJS)({}),(s=>u.reduce(((s,o)=>s.setIn([o,\"errors\"],(0,ze.fromJS)([]))),s))):s},[cP]:(s,{payload:{pathMethod:o}})=>{let[i,a]=o;const u=s.getIn([\"requestData\",i,a,\"bodyValue\"]);return u?ze.Map.isMap(u)?s.setIn([\"requestData\",i,a,\"bodyValue\"],(0,ze.Map)()):s.setIn([\"requestData\",i,a,\"bodyValue\"],\"\"):s}};function oas3({getSystem:s}){const o=(s=>(o,i=null)=>{const{getConfigs:a,fn:u}=s(),{fileUploadMediaTypes:_}=a();if(\"string\"==typeof i&&_.some((s=>i.startsWith(s))))return!0;const w=ze.Map.isMap(o);if(!w&&!as()(o))return!1;const x=w?o.get(\"format\"):o.format;return u.hasSchemaType(o,\"string\")&&[\"binary\",\"byte\"].includes(x)})(s);return{components:zI,wrapComponents:XI,statePlugins:{spec:{wrapSelectors:Se,selectors:xe},auth:{wrapSelectors:we},oas3:{actions:{...Pe},reducers:kP,selectors:{...Te}}},fn:{isFileUploadIntended:o,isFileUploadIntendedOAS30:o}}}const webhooks=({specSelectors:s,getComponent:o})=>{const i=s.selectWebhooksOperations(),a=Object.keys(i),u=o(\"OperationContainer\",!0);return 0===a.length?null:Re.createElement(\"div\",{className:\"webhooks\"},Re.createElement(\"h2\",null,\"Webhooks\"),a.map((s=>Re.createElement(\"div\",{key:`${s}-webhook`},i[s].map((o=>Re.createElement(u,{key:`${s}-${o.method}-webhook`,op:o.operation,tag:\"webhooks\",method:o.method,path:s,specPath:(0,ze.List)(o.specPath),allowTryItOut:!1})))))))},oas31_components_license=({getComponent:s,specSelectors:o})=>{const i=o.selectLicenseNameField(),a=o.selectLicenseUrl(),u=s(\"Link\");return Re.createElement(\"div\",{className:\"info__license\"},a?Re.createElement(\"div\",{className:\"info__license__url\"},Re.createElement(u,{target:\"_blank\",href:sanitizeUrl(a)},i)):Re.createElement(\"span\",null,i))},oas31_components_contact=({getComponent:s,specSelectors:o})=>{const i=o.selectContactNameField(),a=o.selectContactUrl(),u=o.selectContactEmailField(),_=s(\"Link\");return Re.createElement(\"div\",{className:\"info__contact\"},a&&Re.createElement(\"div\",null,Re.createElement(_,{href:sanitizeUrl(a),target:\"_blank\"},i,\" - Website\")),u&&Re.createElement(_,{href:sanitizeUrl(`mailto:${u}`)},a?`Send email to ${i}`:`Contact ${i}`))},oas31_components_info=({getComponent:s,specSelectors:o})=>{const i=o.version(),a=o.url(),u=o.basePath(),_=o.host(),w=o.selectInfoSummaryField(),x=o.selectInfoDescriptionField(),C=o.selectInfoTitleField(),j=o.selectInfoTermsOfServiceUrl(),L=o.selectExternalDocsUrl(),B=o.selectExternalDocsDescriptionField(),$=o.contact(),V=o.license(),U=s(\"Markdown\",!0),z=s(\"Link\"),Y=s(\"VersionStamp\"),Z=s(\"OpenAPIVersion\"),ee=s(\"InfoUrl\"),ie=s(\"InfoBasePath\"),ae=s(\"License\",!0),ce=s(\"Contact\",!0),le=s(\"JsonSchemaDialect\",!0);return Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"hgroup\",{className:\"main\"},Re.createElement(\"h2\",{className:\"title\"},C,Re.createElement(\"span\",null,i&&Re.createElement(Y,{version:i}),Re.createElement(Z,{oasVersion:\"3.1\"}))),(_||u)&&Re.createElement(ie,{host:_,basePath:u}),a&&Re.createElement(ee,{getComponent:s,url:a})),w&&Re.createElement(\"p\",{className:\"info__summary\"},w),Re.createElement(\"div\",{className:\"info__description description\"},Re.createElement(U,{source:x})),j&&Re.createElement(\"div\",{className:\"info__tos\"},Re.createElement(z,{target:\"_blank\",href:sanitizeUrl(j)},\"Terms of service\")),$.size>0&&Re.createElement(ce,null),V.size>0&&Re.createElement(ae,null),L&&Re.createElement(z,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(L)},B||L),Re.createElement(le,null))},json_schema_dialect=({getComponent:s,specSelectors:o})=>{const i=o.selectJsonSchemaDialectField(),a=o.selectJsonSchemaDialectDefault(),u=s(\"Link\");return Re.createElement(Re.Fragment,null,i&&i===a&&Re.createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",Re.createElement(u,{target:\"_blank\",href:sanitizeUrl(i)},i)),i&&i!==a&&Re.createElement(\"div\",{className:\"error-wrapper\"},Re.createElement(\"div\",{className:\"no-margin\"},Re.createElement(\"div\",{className:\"errors\"},Re.createElement(\"div\",{className:\"errors-wrapper\"},Re.createElement(\"h4\",{className:\"center\"},\"Warning\"),Re.createElement(\"p\",{className:\"message\"},Re.createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",Re.createElement(u,{target:\"_blank\",href:a},a),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))},version_pragma_filter=({bypass:s,isSwagger2:o,isOAS3:i,isOAS31:a,alsoShow:u,children:_})=>s?Re.createElement(\"div\",null,_):o&&(i||a)?Re.createElement(\"div\",{className:\"version-pragma\"},u,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,Re.createElement(\"code\",null,\"swagger\"),\" and \",Re.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),Re.createElement(\"p\",null,\"Supported version fields are \",Re.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",Re.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):o||i||a?Re.createElement(\"div\",null,_):Re.createElement(\"div\",{className:\"version-pragma\"},u,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),Re.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",Re.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",Re.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))),getModelName=s=>\"string\"==typeof s&&s.includes(\"#/components/schemas/\")?(s=>{const o=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(o)}catch{return o}})(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,OP=(0,Re.forwardRef)((({schema:s,getComponent:o,onToggle:i=()=>{},specPath:a},u)=>{const _=o(\"JSONSchema202012\"),w=getModelName(s.get(\"$$ref\")),x=(0,Re.useCallback)(((s,o)=>{i(w,o)}),[w,i]);return Re.createElement(_,{name:w,schema:s.toJS(),ref:u,onExpand:x,identifier:a.toJS().join(\"_\")})})),CP=OP,models=({specActions:s,specSelectors:o,layoutSelectors:i,layoutActions:a,getComponent:u,getConfigs:_,fn:w})=>{const x=o.selectSchemas(),C=Object.keys(x).length>0,j=[\"components\",\"schemas\"],{docExpansion:L,defaultModelsExpandDepth:B}=_(),$=B>0&&\"none\"!==L,V=i.isShown(j,$),U=u(\"Collapse\"),z=u(\"JSONSchema202012\"),Y=u(\"ArrowUpIcon\"),Z=u(\"ArrowDownIcon\"),{getTitle:ee}=w.jsonSchema202012.useFn();(0,Re.useEffect)((()=>{const i=V&&B>1,a=null!=o.specResolvedSubtree(j);i&&!a&&s.requestResolvedSubtree(j)}),[V,B]);const ie=(0,Re.useCallback)((()=>{a.show(j,!V)}),[V]),ae=(0,Re.useCallback)((s=>{null!==s&&a.readyToScroll(j,s)}),[]),handleJSONSchema202012Ref=s=>o=>{null!==o&&a.readyToScroll([...j,s],o)},handleJSONSchema202012Expand=i=>(a,u)=>{if(u){const a=[...j,i];null!=o.specResolvedSubtree(a)||s.requestResolvedSubtree([...j,i])}};return!C||B<0?null:Re.createElement(\"section\",{className:Jn()(\"models\",{\"is-open\":V}),ref:ae},Re.createElement(\"h4\",null,Re.createElement(\"button\",{\"aria-expanded\":V,className:\"models-control\",onClick:ie},Re.createElement(\"span\",null,\"Schemas\"),V?Re.createElement(Y,null):Re.createElement(Z,null))),Re.createElement(U,{isOpened:V},Object.entries(x).map((([s,o])=>{const i=ee(o,{lookup:\"basic\"})||s;return Re.createElement(z,{key:s,ref:handleJSONSchema202012Ref(s),schema:o,name:i,onExpand:handleJSONSchema202012Expand(s)})}))))},mutual_tls_auth=({schema:s,getComponent:o,name:i,authSelectors:a})=>{const u=o(\"JumpToPath\",!0),_=a.selectAuthPath(i);return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,i,\" (mutualTLS) \",Re.createElement(u,{path:_})),Re.createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),Re.createElement(\"p\",null,s.get(\"description\")))};class auths_Auths extends Re.Component{constructor(s,o){super(s,o),this.state={}}onAuthChange=s=>{let{name:o}=s;this.setState({[o]:s})};submitAuth=s=>{s.preventDefault();let{authActions:o}=this.props;o.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:o,definitions:i}=this.props,a=i.map(((s,o)=>o)).toArray();this.setState(a.reduce(((s,o)=>(s[o]=\"\",s)),{})),o.logoutWithPersistOption(a)};close=s=>{s.preventDefault();let{authActions:o}=this.props;o.showDefinitions(!1)};render(){let{definitions:s,getComponent:o,authSelectors:i,errSelectors:a}=this.props;const u=o(\"AuthItem\"),_=o(\"oauth2\",!0),w=o(\"Button\"),x=i.authorized(),C=s.filter(((s,o)=>!!x.get(o))),j=s.filter((s=>\"oauth2\"!==s.get(\"type\")&&\"mutualTLS\"!==s.get(\"type\"))),L=s.filter((s=>\"oauth2\"===s.get(\"type\"))),B=s.filter((s=>\"mutualTLS\"===s.get(\"type\")));return Re.createElement(\"div\",{className:\"auth-container\"},j.size>0&&Re.createElement(\"form\",{onSubmit:this.submitAuth},j.map(((s,_)=>Re.createElement(u,{key:_,schema:s,name:_,getComponent:o,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a,authSelectors:i}))).toArray(),Re.createElement(\"div\",{className:\"auth-btn-wrapper\"},j.size===C.size?Re.createElement(w,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):Re.createElement(w,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),Re.createElement(w,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),L.size>0?Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"scope-def\"},Re.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),Re.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(_,{authorized:x,schema:s,name:o})))).toArray()):null,B.size>0&&Re.createElement(\"div\",null,B.map(((s,_)=>Re.createElement(u,{key:_,schema:s,name:_,getComponent:o,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a,authSelectors:i}))).toArray()))}}const AP=auths_Auths,isOAS31=s=>{const o=s.get(\"openapi\");return\"string\"==typeof o&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(o)},fn_createOnlyOAS31Selector=s=>(o,...i)=>a=>{if(a.getSystem().specSelectors.isOAS31()){const u=s(o,...i);return\"function\"==typeof u?u(a):u}return null},createOnlyOAS31SelectorWrapper=s=>(o,i)=>(a,...u)=>{if(i.getSystem().specSelectors.isOAS31()){const _=s(a,...u);return\"function\"==typeof _?_(o,i):_}return o(...u)},fn_createSystemSelector=s=>(o,...i)=>a=>{const u=s(o,a,...i);return\"function\"==typeof u?u(a):u},createOnlyOAS31ComponentWrapper=s=>(o,i)=>a=>i.specSelectors.isOAS31()?Re.createElement(s,Mn()({},a,{originalComponent:o,getSystem:i.getSystem})):Re.createElement(o,a),wrapOAS31Fn=(s,o)=>{const{fn:i,specSelectors:a}=o;return Object.fromEntries(Object.entries(s).map((([s,o])=>{const u=i[s];return[s,(...s)=>a.isOAS31()?o(...s):\"function\"==typeof u?u(...s):void 0]})))},jP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const o=s().getComponent(\"OAS31License\",!0);return Re.createElement(o,null)})),IP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const o=s().getComponent(\"OAS31Contact\",!0);return Re.createElement(o,null)})),PP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const o=s().getComponent(\"OAS31Info\",!0);return Re.createElement(o,null)})),getProperties=(s,{includeReadOnly:o,includeWriteOnly:i})=>{if(!s?.properties)return{};const a=Object.entries(s.properties).filter((([,s])=>(!(!0===s?.readOnly)||o)&&(!(!0===s?.writeOnly)||i)));return Object.fromEntries(a)},makeGetSchemaKeywords=s=>{if(\"function\"!=typeof s)return null;const o=s();return()=>[...o,\"discriminator\",\"xml\",\"externalDocs\",\"example\",\"$$ref\"]},TP=createOnlyOAS31ComponentWrapper((({getSystem:s,...o})=>{const i=s(),{getComponent:a,fn:u,getConfigs:_}=i,w=_(),x=a(\"OAS31Model\"),C=a(\"withJSONSchema202012SystemContext\");return TP.ModelWithJSONSchemaContext??=C(x,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:w.defaultModelExpandDepth,includeReadOnly:o.includeReadOnly,includeWriteOnly:o.includeWriteOnly},fn:{getProperties:u.jsonSchema202012.getProperties,isExpandable:u.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(u.jsonSchema202012.getSchemaKeywords)}}),Re.createElement(TP.ModelWithJSONSchemaContext,o)})),NP=TP,MP=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const{getComponent:o,fn:i,getConfigs:a}=s(),u=a();if(MP.ModelsWithJSONSchemaContext)return Re.createElement(MP.ModelsWithJSONSchemaContext,null);const _=o(\"OAS31Models\",!0),w=o(\"withJSONSchema202012SystemContext\");return MP.ModelsWithJSONSchemaContext??=w(_,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:u.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},fn:{getProperties:i.jsonSchema202012.getProperties,isExpandable:i.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(i.jsonSchema202012.getSchemaKeywords)}}),Re.createElement(MP.ModelsWithJSONSchemaContext,null)}));MP.ModelsWithJSONSchemaContext=null;const RP=MP,wrap_components_version_pragma_filter=(s,o)=>s=>{const i=o.specSelectors.isOAS31(),a=o.getComponent(\"OAS31VersionPragmaFilter\");return Re.createElement(a,Mn()({isOAS31:i},s))},DP=createOnlyOAS31ComponentWrapper((({originalComponent:s,...o})=>{const{getComponent:i,schema:a,name:u}=o,_=i(\"MutualTLSAuth\",!0);return\"mutualTLS\"===a.get(\"type\")?Re.createElement(_,{schema:a,name:u}):Re.createElement(s,o)})),LP=DP,FP=createOnlyOAS31ComponentWrapper((({getSystem:s,...o})=>{const i=s().getComponent(\"OAS31Auths\",!0);return Re.createElement(i,o)})),BP=(0,ze.Map)(),$P=Vt(((s,o)=>o.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>s=>{const o=s.specSelectors.specJson().get(\"webhooks\");return ze.Map.isMap(o)?o:BP},qP=Vt([(s,o)=>o.specSelectors.webhooks(),(s,o)=>o.specSelectors.validOperationMethods(),(s,o)=>o.specSelectors.specResolvedSubtree([\"webhooks\"])],((s,o)=>s.reduce(((s,i,a)=>{if(!ze.Map.isMap(i))return s;const u=i.entrySeq().filter((([s])=>o.includes(s))).map((([s,o])=>({operation:(0,ze.Map)({operation:o}),method:s,path:a,specPath:[\"webhooks\",a,s]})));return s.concat(u)}),(0,ze.List)()).groupBy((s=>s.path)).map((s=>s.toArray())).toObject())),selectors_license=()=>s=>{const o=s.specSelectors.info().get(\"license\");return ze.Map.isMap(o)?o:BP},selectLicenseNameField=()=>s=>s.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>s=>s.specSelectors.license().get(\"url\"),VP=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectLicenseUrlField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectLicenseIdentifierField=()=>s=>s.specSelectors.license().get(\"identifier\"),selectors_contact=()=>s=>{const o=s.specSelectors.info().get(\"contact\");return ze.Map.isMap(o)?o:BP},selectContactNameField=()=>s=>s.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>s=>s.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>s=>s.specSelectors.contact().get(\"url\"),UP=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectContactUrlField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectInfoTitleField=()=>s=>s.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>s=>s.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>s=>s.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>s=>s.specSelectors.info().get(\"termsOfService\"),zP=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectInfoTermsOfServiceField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectExternalDocsDescriptionField=()=>s=>s.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>s=>s.specSelectors.externalDocs().get(\"url\"),WP=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectExternalDocsUrlField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectJsonSchemaDialectField=()=>s=>s.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",JP=Vt(((s,o)=>o.specSelectors.definitions()),((s,o)=>o.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((s,o)=>ze.Map.isMap(s)?ze.Map.isMap(o)?Object.entries(s.toJS()).reduce(((s,[i,a])=>{const u=o.get(i);return s[i]=u?.toJS()||a,s}),{}):s.toJS():{})),wrap_selectors_isOAS3=(s,o)=>(i,...a)=>o.specSelectors.isOAS31()||s(...a),HP=createOnlyOAS31SelectorWrapper((()=>(s,o)=>o.oas31Selectors.selectLicenseUrl())),KP=createOnlyOAS31SelectorWrapper((()=>(s,o)=>{const i=o.specSelectors.securityDefinitions();let a=s();return i?(i.entrySeq().forEach((([s,o])=>{const i=o?.get(\"type\");\"mutualTLS\"===i&&(a=a.push(new ze.Map({[s]:o})))})),a):a})),GP=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectLicenseUrlField(),(s,o)=>o.specSelectors.selectLicenseIdentifierField()],((s,o,i,a)=>i?safeBuildUrl(i,s,{selectedServer:o}):a?`https://spdx.org/licenses/${a}.html`:void 0)),keywords_Example=({schema:s,getSystem:o})=>{const{fn:i,getComponent:a}=o(),{hasKeyword:u}=i.jsonSchema202012.useFn(),_=a(\"JSONSchema202012JSONViewer\");return u(s,\"example\")?Re.createElement(_,{name:\"Example\",value:s.example,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"}):null},keywords_Xml=({schema:s,getSystem:o})=>{const i=s?.xml||{},{fn:a,getComponent:u,getConfigs:_}=o(),{showExtensions:w}=_(),{useComponent:x,useIsExpanded:C,usePath:j,useLevel:L}=a.jsonSchema202012,{path:B}=j(\"xml\"),{isExpanded:$,setExpanded:V,setCollapsed:U}=C(\"xml\"),[z,Y]=L(),Z=w?getExtensions(i):[],ee=!!(i.name||i.namespace||i.prefix||Z.length>0),ie=x(\"Accordion\"),ae=x(\"ExpandDeepButton\"),ce=u(\"OpenAPI31Extensions\"),le=u(\"JSONSchema202012PathContext\")(),pe=u(\"JSONSchema202012LevelContext\")(),de=(0,Re.useCallback)((()=>{$?U():V()}),[$,V,U]),fe=(0,Re.useCallback)(((s,o)=>{o?V({deep:!0}):U({deep:!0})}),[V,U]);return 0===Object.keys(i).length?null:Re.createElement(le.Provider,{value:B},Re.createElement(pe.Provider,{value:Y},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\",\"data-json-schema-level\":z},ee?Re.createElement(Re.Fragment,null,Re.createElement(ie,{expanded:$,onChange:de},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),Re.createElement(ae,{expanded:$,onClick:fe})):Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===i.attribute&&Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===i.wrapped&&Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&Re.createElement(Re.Fragment,null,i.name&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i.name))),i.namespace&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i.namespace))),i.prefix&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i.prefix)))),Z.length>0&&Re.createElement(ce,{openAPISpecObj:i,openAPIExtensions:Z,getSystem:o})))))},Discriminator_DiscriminatorMapping=({discriminator:s})=>{const o=s?.mapping||{};return 0===Object.keys(o).length?null:Object.entries(o).map((([s,o])=>Re.createElement(\"div\",{key:`${s}-${o}`,className:\"json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},s),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},o))))},keywords_Discriminator_Discriminator=({schema:s,getSystem:o})=>{const i=s?.discriminator||{},{fn:a,getComponent:u,getConfigs:_}=o(),{showExtensions:w}=_(),{useComponent:x,useIsExpanded:C,usePath:j,useLevel:L}=a.jsonSchema202012,B=\"discriminator\",{path:$}=j(B),{isExpanded:V,setExpanded:U,setCollapsed:z}=C(B),[Y,Z]=L(),ee=w?getExtensions(i):[],ie=!!(i.mapping||ee.length>0),ae=x(\"Accordion\"),ce=x(\"ExpandDeepButton\"),le=u(\"OpenAPI31Extensions\"),pe=u(\"JSONSchema202012PathContext\")(),de=u(\"JSONSchema202012LevelContext\")(),fe=(0,Re.useCallback)((()=>{V?z():U()}),[V,U,z]),ye=(0,Re.useCallback)(((s,o)=>{o?U({deep:!0}):z({deep:!0})}),[U,z]);return 0===Object.keys(i).length?null:Re.createElement(pe.Provider,{value:$},Re.createElement(de.Provider,{value:Z},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\",\"data-json-schema-level\":Y},ie?Re.createElement(Re.Fragment,null,Re.createElement(ae,{expanded:V,onChange:fe},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),Re.createElement(ce,{expanded:V,onClick:ye})):Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),i.propertyName&&Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},i.propertyName),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!V})},V&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(Discriminator_DiscriminatorMapping,{discriminator:i})),ee.length>0&&Re.createElement(le,{openAPISpecObj:i,openAPIExtensions:ee,getSystem:o})))))},keywords_OpenAPIExtensions=({openAPISpecObj:s,getSystem:o,openAPIExtensions:i})=>{const{fn:a}=o(),{useComponent:u}=a.jsonSchema202012,_=u(\"JSONViewer\");return i.map((o=>Re.createElement(_,{key:o,name:o,value:s[o],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))},keywords_ExternalDocs=({schema:s,getSystem:o})=>{const i=s?.externalDocs||{},{fn:a,getComponent:u,getConfigs:_}=o(),{showExtensions:w}=_(),{useComponent:x,useIsExpanded:C,usePath:j,useLevel:L}=a.jsonSchema202012,B=\"externalDocs\",{path:$}=j(B),{isExpanded:V,setExpanded:U,setCollapsed:z}=C(B),[Y,Z]=L(),ee=w?getExtensions(i):[],ie=!!(i.description||i.url||ee.length>0),ae=x(\"Accordion\"),ce=x(\"ExpandDeepButton\"),le=u(\"JSONSchema202012KeywordDescription\"),pe=u(\"Link\"),de=u(\"OpenAPI31Extensions\"),fe=u(\"JSONSchema202012PathContext\")(),ye=u(\"JSONSchema202012LevelContext\")(),be=(0,Re.useCallback)((()=>{V?z():U()}),[V,U,z]),_e=(0,Re.useCallback)(((s,o)=>{o?U({deep:!0}):z({deep:!0})}),[U,z]);return 0===Object.keys(i).length?null:Re.createElement(fe.Provider,{value:$},Re.createElement(ye.Provider,{value:Z},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\",\"data-json-schema-level\":Y},ie?Re.createElement(Re.Fragment,null,Re.createElement(ae,{expanded:V,onChange:be},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),Re.createElement(ce,{expanded:V,onClick:_e})):Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!V})},V&&Re.createElement(Re.Fragment,null,i.description&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(le,{schema:i,getSystem:o})),i.url&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},Re.createElement(pe,{target:\"_blank\",href:sanitizeUrl(i.url)},i.url))))),ee.length>0&&Re.createElement(de,{openAPISpecObj:i,openAPIExtensions:ee,getSystem:o})))))},keywords_Description=({schema:s,getSystem:o})=>{if(!s?.description)return null;const{getComponent:i}=o(),a=i(\"Markdown\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},Re.createElement(a,{source:s.description})))},YP=createOnlyOAS31ComponentWrapper(keywords_Description),XP=createOnlyOAS31ComponentWrapper((({schema:s,getSystem:o,originalComponent:i})=>{const{getComponent:a}=o(),u=a(\"JSONSchema202012KeywordDiscriminator\"),_=a(\"JSONSchema202012KeywordXml\"),w=a(\"JSONSchema202012KeywordExample\"),x=a(\"JSONSchema202012KeywordExternalDocs\");return Re.createElement(Re.Fragment,null,Re.createElement(i,{schema:s}),Re.createElement(u,{schema:s,getSystem:o}),Re.createElement(_,{schema:s,getSystem:o}),Re.createElement(x,{schema:s,getSystem:o}),Re.createElement(w,{schema:s,getSystem:o}))})),QP=XP,keywords_Properties=({schema:s,getSystem:o})=>{const{fn:i,getComponent:a}=o(),{useComponent:u,usePath:_}=i.jsonSchema202012,{getDependentRequired:w,getProperties:x}=i.jsonSchema202012.useFn(),C=i.jsonSchema202012.useConfig(),j=Array.isArray(s?.required)?s.required:[],{path:L}=_(\"properties\"),B=u(\"JSONSchema\"),$=a(\"JSONSchema202012PathContext\")(),V=x(s,C);return 0===Object.keys(V).length?null:Re.createElement($.Provider,{value:L},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},Re.createElement(\"ul\",null,Object.entries(V).map((([o,i])=>{const a=j.includes(o),u=w(o,s);return Re.createElement(\"li\",{key:o,className:Jn()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":a})},Re.createElement(B,{name:o,schema:i,dependentRequired:u}))})))))},ZP=createOnlyOAS31ComponentWrapper(keywords_Properties);const eT=function oas31_after_load_afterLoad({fn:s,getSystem:o}){if(s.jsonSchema202012){const i=((s,o)=>{const{fn:i}=o();if(\"function\"!=typeof s)return null;const{hasKeyword:a}=i.jsonSchema202012;return o=>s(o)||a(o,\"example\")||o?.xml||o?.discriminator||o?.externalDocs})(s.jsonSchema202012.isExpandable,o);Object.assign(this.fn.jsonSchema202012,{isExpandable:i,getProperties})}if(\"function\"==typeof s.sampleFromSchema&&s.jsonSchema202012){const i=wrapOAS31Fn({sampleFromSchema:s.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:s.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:s.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:s.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:s.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:s.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:s.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:s.jsonSchema202012.getXmlSampleSchema,getSampleSchema:s.jsonSchema202012.getSampleSchema,mergeJsonSchema:s.jsonSchema202012.mergeJsonSchema,getSchemaObjectTypeLabel:o=>s.jsonSchema202012.getType(immutableToJS(o)),getSchemaObjectType:o=>s.jsonSchema202012.foldType(immutableToJS(o)?.type)},o());Object.assign(this.fn,i)}const i=(s=>(o,i=null)=>{const{fn:a}=s();if(a.isFileUploadIntendedOAS30(o,i))return!0;const u=ze.Map.isMap(o);if(!u&&!as()(o))return!1;const _=u?o.get(\"contentMediaType\"):o.contentMediaType,w=u?o.get(\"contentEncoding\"):o.contentEncoding;return\"string\"==typeof _&&\"\"!==_||\"string\"==typeof w&&\"\"!==w})(o),{isFileUploadIntended:a}=wrapOAS31Fn({isFileUploadIntended:i},o());if(this.fn.isFileUploadIntended=a,this.fn.isFileUploadIntendedOAS31=i,s.jsonSchema202012){const{hasSchemaType:i}=wrapOAS31Fn({hasSchemaType:s.jsonSchema202012.hasSchemaType},o());this.fn.hasSchemaType=i}},oas31=({fn:s})=>{const o=s.createSystemSelector||fn_createSystemSelector,i=s.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:eT,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:oas31_components_license,OAS31Contact:oas31_components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:CP,OAS31Models:models,OAS31Auths:AP,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:keywords_Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs,OpenAPI31Extensions:keywords_OpenAPIExtensions},wrapComponents:{InfoContainer:PP,License:jP,Contact:IP,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:NP,Models:RP,AuthItem:LP,auths:FP,JSONSchema202012KeywordDescription:YP,JSONSchema202012KeywordExamples:QP,JSONSchema202012KeywordProperties:ZP},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:KP}},spec:{selectors:{isOAS31:o($P),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:i(selectLicenseIdentifierField),selectLicenseUrl:o(VP),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:o(UP),selectInfoTitleField,selectInfoSummaryField:i(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:o(zP),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:o(WP),webhooks:i(selectors_webhooks),selectWebhooksOperations:i(o(qP)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:o(JP)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:HP}},oas31:{selectors:{selectLicenseUrl:i(o(GP))}}}}},tT=es().object,rT=es().bool,nT=(es().oneOfType([tT,rT]),(0,Re.createContext)(null));nT.displayName=\"JSONSchemaContext\";const sT=(0,Re.createContext)(0);sT.displayName=\"JSONSchemaLevelContext\";const oT=(0,Re.createContext)(new Set),iT=(0,Re.createContext)([]);class JSONSchemaIsExpandedState{static Collapsed=\"collapsed\";static Expanded=\"expanded\";static DeeplyExpanded=\"deeply-expanded\"}const useConfig=()=>{const{config:s}=(0,Re.useContext)(nT);return s},useComponent=s=>{const{components:o}=(0,Re.useContext)(nT);return o[s]||null},useFn=(s=void 0)=>{const{fn:o}=(0,Re.useContext)(nT);return void 0!==s?o[s]:o},useJSONSchemaContextState=()=>{const[,s]=(0,Re.useState)(null),{state:o}=(0,Re.useContext)(nT);return{state:o,setState:i=>{i(o),s({})}}},useLevel=()=>{const s=(0,Re.useContext)(sT);return[s,s+1]},usePath=s=>{const o=(0,Re.useContext)(iT),{setState:i}=useJSONSchemaContextState(),a=\"string\"==typeof s?[...o,s]:o;return{path:a,pathMutator:(s,o={deep:!1})=>{const u=a.toString(),updateFn=o=>{o.paths[u]=s,s===JSONSchemaIsExpandedState.Collapsed&&Object.keys(o.paths).forEach((s=>{s.startsWith(u)&&o.paths[s]===JSONSchemaIsExpandedState.DeeplyExpanded&&(o.paths[s]=JSONSchemaIsExpandedState.Expanded)}))},updateDeepFn=o=>{Object.keys(o.paths).forEach((i=>{i.startsWith(u)&&(o.paths[i]=s)}))};o.deep?i(updateDeepFn):i(updateFn)}}},useIsExpanded=s=>{const[o]=useLevel(),{defaultExpandedLevels:i}=useConfig(),{path:a,pathMutator:u}=usePath(s),{path:_}=usePath(),{state:w}=useJSONSchemaContextState(),x=w.paths[a.toString()],C=w.paths[_.toString()]??w.paths[_.slice(0,-1).toString()],j=x??(i-o>0?JSONSchemaIsExpandedState.Expanded:JSONSchemaIsExpandedState.Collapsed),L=j!==JSONSchemaIsExpandedState.Collapsed;(0,Re.useEffect)((()=>{u(C===JSONSchemaIsExpandedState.DeeplyExpanded?JSONSchemaIsExpandedState.DeeplyExpanded:j)}),[C]);return{isExpanded:L,setExpanded:(0,Re.useCallback)(((s={deep:!1})=>{u(s.deep?JSONSchemaIsExpandedState.DeeplyExpanded:JSONSchemaIsExpandedState.Expanded)}),[]),setCollapsed:(0,Re.useCallback)(((s={deep:!1})=>{u(JSONSchemaIsExpandedState.Collapsed,s)}),[])}},useRenderedSchemas=(s=void 0)=>{if(void 0===s)return(0,Re.useContext)(oT);const o=(0,Re.useContext)(oT);return new Set([...o,s])},aT=(0,Re.forwardRef)((({schema:s,name:o=\"\",dependentRequired:i=[],onExpand:a=()=>{},identifier:u=\"\"},_)=>{const w=useFn(),x=u||s?.$id||o,{path:C}=usePath(x),{isExpanded:j,setExpanded:L,setCollapsed:B}=useIsExpanded(x),[$,V]=useLevel(),U=(()=>{const[s]=useLevel();return s>0})(),z=w.isExpandable(s)||i.length>0,Y=(s=>useRenderedSchemas().has(s))(s),Z=useRenderedSchemas(s),ee=w.stringifyConstraints(s),ie=useComponent(\"Accordion\"),ae=useComponent(\"Keyword$schema\"),ce=useComponent(\"Keyword$vocabulary\"),le=useComponent(\"Keyword$id\"),pe=useComponent(\"Keyword$anchor\"),de=useComponent(\"Keyword$dynamicAnchor\"),fe=useComponent(\"Keyword$ref\"),ye=useComponent(\"Keyword$dynamicRef\"),be=useComponent(\"Keyword$defs\"),_e=useComponent(\"Keyword$comment\"),Se=useComponent(\"KeywordAllOf\"),we=useComponent(\"KeywordAnyOf\"),xe=useComponent(\"KeywordOneOf\"),Pe=useComponent(\"KeywordNot\"),Te=useComponent(\"KeywordIf\"),$e=useComponent(\"KeywordThen\"),qe=useComponent(\"KeywordElse\"),ze=useComponent(\"KeywordDependentSchemas\"),We=useComponent(\"KeywordPrefixItems\"),He=useComponent(\"KeywordItems\"),Ye=useComponent(\"KeywordContains\"),Xe=useComponent(\"KeywordProperties\"),Qe=useComponent(\"KeywordPatternProperties\"),et=useComponent(\"KeywordAdditionalProperties\"),tt=useComponent(\"KeywordPropertyNames\"),rt=useComponent(\"KeywordUnevaluatedItems\"),nt=useComponent(\"KeywordUnevaluatedProperties\"),st=useComponent(\"KeywordType\"),ot=useComponent(\"KeywordEnum\"),it=useComponent(\"KeywordConst\"),at=useComponent(\"KeywordConstraint\"),ct=useComponent(\"KeywordDependentRequired\"),lt=useComponent(\"KeywordContentSchema\"),ut=useComponent(\"KeywordTitle\"),pt=useComponent(\"KeywordDescription\"),ht=useComponent(\"KeywordDefault\"),dt=useComponent(\"KeywordDeprecated\"),mt=useComponent(\"KeywordReadOnly\"),gt=useComponent(\"KeywordWriteOnly\"),yt=useComponent(\"KeywordExamples\"),vt=useComponent(\"ExtensionKeywords\"),bt=useComponent(\"ExpandDeepButton\"),_t=(0,Re.useCallback)(((s,o)=>{o?L():B(),a(s,o,!1)}),[a,L,B]),St=(0,Re.useCallback)(((s,o)=>{o?L({deep:!0}):B({deep:!0}),a(s,o,!0)}),[a,L,B]);return Re.createElement(iT.Provider,{value:C},Re.createElement(sT.Provider,{value:V},Re.createElement(oT.Provider,{value:Z},Re.createElement(\"article\",{ref:_,\"data-json-schema-level\":$,className:Jn()(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":U,\"json-schema-2020-12--circular\":Y})},Re.createElement(\"div\",{className:\"json-schema-2020-12-head\"},z&&!Y?Re.createElement(Re.Fragment,null,Re.createElement(ie,{expanded:j,onChange:_t},Re.createElement(ut,{title:o,schema:s})),Re.createElement(bt,{expanded:j,onClick:St})):Re.createElement(ut,{title:o,schema:s}),Re.createElement(dt,{schema:s}),Re.createElement(mt,{schema:s}),Re.createElement(gt,{schema:s}),Re.createElement(st,{schema:s,isCircular:Y}),ee.length>0&&ee.map((s=>Re.createElement(at,{key:`${s.scope}-${s.value}`,constraint:s})))),Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!j})},j&&Re.createElement(Re.Fragment,null,Re.createElement(pt,{schema:s}),!Y&&z&&Re.createElement(Re.Fragment,null,Re.createElement(Xe,{schema:s}),Re.createElement(Qe,{schema:s}),Re.createElement(et,{schema:s}),Re.createElement(nt,{schema:s}),Re.createElement(tt,{schema:s}),Re.createElement(Se,{schema:s}),Re.createElement(we,{schema:s}),Re.createElement(xe,{schema:s}),Re.createElement(Pe,{schema:s}),Re.createElement(Te,{schema:s}),Re.createElement($e,{schema:s}),Re.createElement(qe,{schema:s}),Re.createElement(ze,{schema:s}),Re.createElement(We,{schema:s}),Re.createElement(He,{schema:s}),Re.createElement(rt,{schema:s}),Re.createElement(Ye,{schema:s}),Re.createElement(lt,{schema:s})),Re.createElement(ot,{schema:s}),Re.createElement(it,{schema:s}),Re.createElement(ct,{schema:s,dependentRequired:i}),Re.createElement(ht,{schema:s}),Re.createElement(yt,{schema:s}),Re.createElement(ae,{schema:s}),Re.createElement(ce,{schema:s}),Re.createElement(le,{schema:s}),Re.createElement(pe,{schema:s}),Re.createElement(de,{schema:s}),Re.createElement(fe,{schema:s}),!Y&&z&&Re.createElement(be,{schema:s}),Re.createElement(ye,{schema:s}),Re.createElement(_e,{schema:s}),Re.createElement(vt,{schema:s})))))))})),cT=aT,keywords_$schema=({schema:s})=>s?.$schema?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$schema)):null,$vocabulary_$vocabulary=({schema:s})=>{const o=\"$vocabulary\",{path:i}=usePath(o),{isExpanded:a,setExpanded:u,setCollapsed:_}=useIsExpanded(o),w=useComponent(\"Accordion\"),x=(0,Re.useCallback)((()=>{a?_():u()}),[a,u,_]);return s?.$vocabulary?\"object\"!=typeof s.$vocabulary?null:Re.createElement(iT.Provider,{value:i},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},Re.createElement(w,{expanded:a,onChange:x},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",null,a&&Object.entries(s.$vocabulary).map((([s,o])=>Re.createElement(\"li\",{key:s,className:Jn()(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!o})},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s))))))):null},keywords_$id=({schema:s})=>s?.$id?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$id)):null,keywords_$anchor=({schema:s})=>s?.$anchor?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$anchor)):null,keywords_$dynamicAnchor=({schema:s})=>s?.$dynamicAnchor?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicAnchor)):null,keywords_$ref=({schema:s})=>s?.$ref?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$ref)):null,keywords_$dynamicRef=({schema:s})=>s?.$dynamicRef?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicRef)):null,keywords_$defs=({schema:s})=>{const o=s?.$defs||{},i=\"$defs\",{path:a}=usePath(i),{isExpanded:u,setExpanded:_,setCollapsed:w}=useIsExpanded(i),[x,C]=useLevel(),j=useComponent(\"Accordion\"),L=useComponent(\"ExpandDeepButton\"),B=useComponent(\"JSONSchema\"),$=(0,Re.useCallback)((()=>{u?w():_()}),[u,_,w]),V=(0,Re.useCallback)(((s,o)=>{o?_({deep:!0}):w({deep:!0})}),[_,w]);return 0===Object.keys(o).length?null:Re.createElement(iT.Provider,{value:a},Re.createElement(sT.Provider,{value:C},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\",\"data-json-schema-level\":x},Re.createElement(j,{expanded:u,onChange:$},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),Re.createElement(L,{expanded:u,onClick:V}),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&Re.createElement(Re.Fragment,null,Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(B,{name:s,schema:o})))))))))},keywords_$comment=({schema:s})=>s?.$comment?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$comment)):null,keywords_AllOf=({schema:s})=>{const o=s?.allOf||[],i=useFn(),a=\"allOf\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{allOf:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_AnyOf=({schema:s})=>{const o=s?.anyOf||[],i=useFn(),a=\"anyOf\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{anyOf:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_OneOf=({schema:s})=>{const o=s?.oneOf||[],i=useFn(),a=\"oneOf\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{oneOf:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_Not=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"not\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},Re.createElement(i,{name:a,schema:s.not,identifier:\"not\"}))},keywords_If=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"if\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},Re.createElement(i,{name:a,schema:s.if,identifier:\"if\"}))},keywords_Then=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"then\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},Re.createElement(i,{name:a,schema:s.then,identifier:\"then\"}))},keywords_Else=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"else\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},Re.createElement(i,{name:a,schema:s.else,identifier:\"else\"}))},keywords_DependentSchemas=({schema:s})=>{const o=s?.dependentSchemas||[],i=\"dependentSchemas\",{path:a}=usePath(i),{isExpanded:u,setExpanded:_,setCollapsed:w}=useIsExpanded(i),[x,C]=useLevel(),j=useComponent(\"Accordion\"),L=useComponent(\"ExpandDeepButton\"),B=useComponent(\"JSONSchema\"),$=(0,Re.useCallback)((()=>{u?w():_()}),[u,_,w]),V=(0,Re.useCallback)(((s,o)=>{o?_({deep:!0}):w({deep:!0})}),[_,w]);return\"object\"!=typeof o||0===Object.keys(o).length?null:Re.createElement(iT.Provider,{value:a},Re.createElement(sT.Provider,{value:C},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\",\"data-json-schema-level\":x},Re.createElement(j,{expanded:u,onChange:$},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),Re.createElement(L,{expanded:u,onClick:V}),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&Re.createElement(Re.Fragment,null,Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(B,{name:s,schema:o})))))))))},keywords_PrefixItems=({schema:s})=>{const o=s?.prefixItems||[],i=useFn(),a=\"prefixItems\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{prefixItems:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_Items=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"items\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},Re.createElement(i,{name:a,schema:s.items,identifier:\"items\"}))},keywords_Contains=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"contains\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},Re.createElement(i,{name:a,schema:s.contains,identifier:\"contains\"}))},keywords_Properties_Properties=({schema:s})=>{const o=useFn(),i=s?.properties||{},a=Array.isArray(s?.required)?s.required:[],u=useComponent(\"JSONSchema\"),{path:_}=usePath(\"properties\");return 0===Object.keys(i).length?null:Re.createElement(iT.Provider,{value:_},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},Re.createElement(\"ul\",null,Object.entries(i).map((([i,_])=>{const w=a.includes(i),x=o.getDependentRequired(i,s);return Re.createElement(\"li\",{key:i,className:Jn()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":w})},Re.createElement(u,{name:i,schema:_,dependentRequired:x}))})))))},PatternProperties_PatternProperties=({schema:s})=>{const o=s?.patternProperties||{},i=useComponent(\"JSONSchema\"),{path:a}=usePath(\"patternProperties\");return 0===Object.keys(o).length?null:Re.createElement(iT.Provider,{value:a},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},Re.createElement(\"ul\",null,Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(i,{name:s,schema:o})))))))},keywords_AdditionalProperties=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"additionalProperties\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===s.additionalProperties?Re.createElement(Re.Fragment,null,a,Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===s.additionalProperties?Re.createElement(Re.Fragment,null,a,Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):Re.createElement(i,{name:a,schema:s.additionalProperties,identifier:\"additionalProperties\"}))},keywords_PropertyNames=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\"),a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return o.hasKeyword(s,\"propertyNames\")?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},Re.createElement(i,{name:a,schema:s.propertyNames,identifier:\"propertyNames\"})):null},keywords_UnevaluatedItems=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"unevaluatedItems\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},Re.createElement(i,{name:a,schema:s.unevaluatedItems,identifier:\"unevaluatedItems\"}))},keywords_UnevaluatedProperties=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"unevaluatedProperties\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},Re.createElement(i,{name:a,schema:s.unevaluatedProperties,identifier:\"unevaluatedProperties\"}))},keywords_Type=({schema:s,isCircular:o=!1})=>{const i=useFn().getType(s),a=o?\" [circular]\":\"\";return Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${i}${a}`)},Enum_Enum=({schema:s})=>{const o=useComponent(\"JSONViewer\");return Array.isArray(s?.enum)?Re.createElement(o,{name:\"Enum\",value:s.enum,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"}):null},Const_Const=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONViewer\");return o.hasKeyword(s,\"const\")?Re.createElement(i,{name:\"Const\",value:s.const,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"}):null},fn_upperFirst=s=>\"string\"==typeof s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:s,makeGetTitle=s=>(o,{lookup:i=\"extended\"}={})=>{const a=s();if(null!=o?.title)return a.upperFirst(String(o.title));if(\"extended\"===i){if(null!=o?.$anchor)return a.upperFirst(String(o.$anchor));if(null!=o?.$id)return String(o.$id)}return\"\"},makeGetType=s=>{const getType=(o,i=new WeakSet)=>{const a=s();if(null==o)return\"any\";if(a.isBooleanJSONSchema(o))return o?\"any\":\"never\";if(\"object\"!=typeof o)return\"any\";if(i.has(o))return\"any\";i.add(o);const{type:u,prefixItems:_,items:w}=o,getArrayType=()=>{if(Array.isArray(_)){const s=_.map((s=>getType(s,i))),o=w?getType(w,i):\"any\";return`array<[${s.join(\", \")}], ${o}>`}if(w){return`array<${getType(w,i)}>`}return\"array<any>\"};if(o.not&&\"any\"===getType(o.not))return\"never\";const handleCombiningKeywords=(s,a)=>{if(Array.isArray(o[s])){return`(${o[s].map((s=>getType(s,i))).join(a)})`}return null},x=[Array.isArray(u)?u.map((s=>\"array\"===s?getArrayType():s)).join(\" | \"):\"array\"===u?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(u)?u:(()=>{if(Object.hasOwn(o,\"prefixItems\")||Object.hasOwn(o,\"items\")||Object.hasOwn(o,\"contains\"))return getArrayType();if(Object.hasOwn(o,\"properties\")||Object.hasOwn(o,\"additionalProperties\")||Object.hasOwn(o,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(o.format))return\"integer\";if([\"float\",\"double\"].includes(o.format))return\"number\";if(Object.hasOwn(o,\"minimum\")||Object.hasOwn(o,\"maximum\")||Object.hasOwn(o,\"exclusiveMinimum\")||Object.hasOwn(o,\"exclusiveMaximum\")||Object.hasOwn(o,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(o,\"pattern\")||Object.hasOwn(o,\"format\")||Object.hasOwn(o,\"minLength\")||Object.hasOwn(o,\"maxLength\")||Object.hasOwn(o,\"contentEncoding\")||Object.hasOwn(o,\"contentMediaType\"))return\"string\";if(void 0!==o.const){if(null===o.const)return\"null\";if(\"boolean\"==typeof o.const)return\"boolean\";if(\"number\"==typeof o.const)return Number.isInteger(o.const)?\"integer\":\"number\";if(\"string\"==typeof o.const)return\"string\";if(Array.isArray(o.const))return\"array<any>\";if(\"object\"==typeof o.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return i.delete(o),x||\"any\"};return getType},isBooleanJSONSchema=s=>\"boolean\"==typeof s,hasKeyword=(s,o)=>null!==s&&\"object\"==typeof s&&Object.hasOwn(s,o),fn_makeIsExpandable=s=>o=>{const i=s();return o?.$schema||o?.$vocabulary||o?.$id||o?.$anchor||o?.$dynamicAnchor||o?.$ref||o?.$dynamicRef||o?.$defs||o?.$comment||o?.allOf||o?.anyOf||o?.oneOf||i.hasKeyword(o,\"not\")||i.hasKeyword(o,\"if\")||i.hasKeyword(o,\"then\")||i.hasKeyword(o,\"else\")||o?.dependentSchemas||o?.prefixItems||i.hasKeyword(o,\"items\")||i.hasKeyword(o,\"contains\")||o?.properties||o?.patternProperties||i.hasKeyword(o,\"additionalProperties\")||i.hasKeyword(o,\"propertyNames\")||i.hasKeyword(o,\"unevaluatedItems\")||i.hasKeyword(o,\"unevaluatedProperties\")||o?.description||o?.enum||i.hasKeyword(o,\"const\")||i.hasKeyword(o,\"contentSchema\")||i.hasKeyword(o,\"default\")||o?.examples||i.getExtensionKeywords(o).length>0},fn_stringify=s=>null===s||[\"number\",\"bigint\",\"boolean\"].includes(typeof s)?String(s):Array.isArray(s)?`[${s.map(fn_stringify).join(\", \")}]`:JSON.stringify(s),stringifyConstraintRange=(s,o,i)=>{const a=\"number\"==typeof o,u=\"number\"==typeof i;return a&&u?o===i?`${o} ${s}`:`[${o}, ${i}] ${s}`:a?`≥ ${o} ${s}`:u?`≤ ${i} ${s}`:null},stringifyConstraints=s=>{const o=[],i=(s=>{if(\"number\"!=typeof s?.multipleOf)return null;if(s.multipleOf<=0)return null;if(1===s.multipleOf)return null;const{multipleOf:o}=s;if(Number.isInteger(o))return`multiple of ${o}`;const i=10**o.toString().split(\".\")[1].length;return`multiple of ${o*i}/${i}`})(s);null!==i&&o.push({scope:\"number\",value:i});const a=(s=>{const o=s?.minimum,i=s?.maximum,a=s?.exclusiveMinimum,u=s?.exclusiveMaximum,_=\"number\"==typeof o,w=\"number\"==typeof i,x=\"number\"==typeof a,C=\"number\"==typeof u,j=x&&(!_||o<a),L=C&&(!w||i>u);if((_||x)&&(w||C))return`${j?\"(\":\"[\"}${j?a:o}, ${L?u:i}${L?\")\":\"]\"}`;if(_||x)return`${j?\">\":\"≥\"} ${j?a:o}`;if(w||C)return`${L?\"<\":\"≤\"} ${L?u:i}`;return null})(s);null!==a&&o.push({scope:\"number\",value:a}),s?.format&&o.push({scope:\"string\",value:s.format});const u=stringifyConstraintRange(\"characters\",s?.minLength,s?.maxLength);null!==u&&o.push({scope:\"string\",value:u}),s?.pattern&&o.push({scope:\"string\",value:`matches ${s?.pattern}`}),s?.contentMediaType&&o.push({scope:\"string\",value:`media type: ${s.contentMediaType}`}),s?.contentEncoding&&o.push({scope:\"string\",value:`encoding: ${s.contentEncoding}`});const _=stringifyConstraintRange(s?.uniqueItems?\"unique items\":\"items\",s?.minItems,s?.maxItems);null!==_&&o.push({scope:\"array\",value:_}),s?.uniqueItems&&!_&&o.push({scope:\"array\",value:\"unique\"});const w=stringifyConstraintRange(\"contained items\",s?.minContains,s?.maxContains);null!==w&&o.push({scope:\"array\",value:w});const x=stringifyConstraintRange(\"properties\",s?.minProperties,s?.maxProperties);return null!==x&&o.push({scope:\"object\",value:x}),o},getDependentRequired=(s,o)=>o?.dependentRequired?Array.from(Object.entries(o.dependentRequired).reduce(((o,[i,a])=>Array.isArray(a)&&a.includes(s)?(o.add(i),o):o),new Set)):[],fn_isPlainObject=s=>\"object\"==typeof s&&null!==s&&!Array.isArray(s)&&(null===Object.getPrototypeOf(s)||Object.getPrototypeOf(s)===Object.prototype),getSchemaKeywords=()=>[\"$schema\",\"$vocabulary\",\"$id\",\"$anchor\",\"$dynamicAnchor\",\"$dynamicRef\",\"$ref\",\"$defs\",\"$comment\",\"allOf\",\"anyOf\",\"oneOf\",\"not\",\"if\",\"then\",\"else\",\"dependentSchemas\",\"prefixItems\",\"items\",\"contains\",\"properties\",\"patternProperties\",\"additionalProperties\",\"propertyNames\",\"unevaluatedItems\",\"unevaluatedProperties\",\"type\",\"enum\",\"const\",\"multipleOf\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"maxContains\",\"minContains\",\"maxProperties\",\"minProperties\",\"required\",\"dependentRequired\",\"title\",\"description\",\"default\",\"deprecated\",\"readOnly\",\"writeOnly\",\"examples\",\"format\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],makeGetExtensionKeywords=s=>o=>{const i=s().getSchemaKeywords();return fn_isPlainObject(o)?((s,o)=>{const i=new Set(o);return s.filter((s=>!i.has(s)))})(Object.keys(o),i):[]},fn_hasSchemaType=(s,o)=>{const i=ze.Map.isMap(s);if(!i&&!fn_isPlainObject(s))return!1;const hasType=s=>o===s||Array.isArray(o)&&o.includes(s),a=i?s.get(\"type\"):s.type;return ze.List.isList(a)||Array.isArray(a)?a.some((s=>hasType(s))):hasType(a)},Constraint=({constraint:s})=>fn_isPlainObject(s)&&\"string\"==typeof s.scope&&\"string\"==typeof s.value?Re.createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${s.scope}`},s.value):null,lT=Re.memo(Constraint),DependentRequired_DependentRequired=({dependentRequired:s})=>Array.isArray(s)&&0!==s.length?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),Re.createElement(\"ul\",null,s.map((s=>Re.createElement(\"li\",{key:s},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},s)))))):null,keywords_ContentSchema=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"contentSchema\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},Re.createElement(i,{name:a,schema:s.contentSchema,identifier:\"contentSchema\"}))},Title_Title=({title:s=\"\",schema:o})=>{const i=useFn(),a=s||i.getTitle(o);return a?Re.createElement(\"div\",{className:\"json-schema-2020-12__title\"},a):null},keywords_Description_Description=({schema:s})=>s?.description?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},s.description)):null,Default_Default=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONViewer\");return o.hasKeyword(s,\"default\")?Re.createElement(i,{name:\"Default\",value:s.default,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"}):null},keywords_Deprecated=({schema:s})=>!0!==s?.deprecated?null:Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\"),keywords_ReadOnly=({schema:s})=>!0!==s?.readOnly?null:Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\"),keywords_WriteOnly=({schema:s})=>!0!==s?.writeOnly?null:Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\"),keywords_Examples_Examples=({schema:s})=>{const o=s?.examples||[],i=useComponent(\"JSONViewer\");return Array.isArray(o)&&0!==o.length?Re.createElement(i,{name:\"Examples\",value:s.examples,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--examples\"}):null},ExtensionKeywords_ExtensionKeywords=({schema:s})=>{const o=useFn(),i=\"ExtensionKeywords\",{path:a}=usePath(i),{isExpanded:u,setExpanded:_,setCollapsed:w}=useIsExpanded(i),[x,C]=useLevel(),j=useComponent(\"Accordion\"),L=useComponent(\"ExpandDeepButton\"),B=useComponent(\"JSONViewer\"),{showExtensionKeywords:$}=useConfig(),V=o.getExtensionKeywords(s),U=(0,Re.useCallback)((()=>{u?w():_()}),[u,_,w]),z=(0,Re.useCallback)(((s,o)=>{o?_({deep:!0}):w({deep:!0})}),[_,w]);return $&&0!==V.length?Re.createElement(iT.Provider,{value:a},Re.createElement(sT.Provider,{value:C},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--extension-keywords\",\"data-json-schema-level\":x},Re.createElement(j,{expanded:u,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--extension\"},\"Extension Keywords\")),Re.createElement(L,{expanded:u,onClick:z}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&Re.createElement(Re.Fragment,null,V.map((o=>Re.createElement(B,{key:o,name:o,value:s[o],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))))))):null},JSONViewer=({name:s,value:o,className:i})=>{const a=useFn(),{path:u}=usePath(s),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(s),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||\"boolean\"==typeof o||\"symbol\"==typeof o||null==o,V=(s=>fn_isPlainObject(s)&&0===Object.keys(s).length)(o)||(s=>Array.isArray(s)&&0===s.length)(o),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return $?Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-json-viewer\",i)},Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},s),Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__value json-schema-2020-12-json-viewer__value--secondary\"},a.stringify(o))):V?Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-json-viewer\",i)},Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},s),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(o)?\"empty array\":\"empty object\")):Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-json-viewer\",i),\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},s)),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(o)?\"array\":\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-json-viewer__children\",{\"json-schema-2020-12-json-viewer__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,Array.isArray(o)?o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement(JSONViewer,{name:`#${o}`,value:s,className:i})))):Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(JSONViewer,{name:s,value:o,className:i})))))))))},uT=JSONViewer,Accordion_Accordion=({expanded:s=!1,children:o,onChange:i})=>{const a=useComponent(\"ChevronRightIcon\"),u=(0,Re.useCallback)((o=>{i(o,!s)}),[s,i]);return Re.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:u},Re.createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},o),Re.createElement(\"span\",{className:Jn()(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":s,\"json-schema-2020-12-accordion__icon--collapsed\":!s})},Re.createElement(a,null)))},ExpandDeepButton_ExpandDeepButton=({expanded:s,onClick:o})=>{const i=(0,Re.useCallback)((i=>{o(i,!s)}),[s,o]);return Re.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:i},s?\"Collapse all\":\"Expand all\")},icons_ChevronRight=()=>Re.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},Re.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"})),withJSONSchemaContext=(s,o={})=>{const i={components:{JSONSchema:cT,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:Const_Const,KeywordConstraint:lT,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:Default_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,KeywordExamples:keywords_Examples_Examples,ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONViewer:uT,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...o.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,showExtensionKeywords:!0,...o.config},fn:{upperFirst:fn_upperFirst,getTitle:makeGetTitle(useFn),getType:makeGetType(useFn),isBooleanJSONSchema,hasKeyword,isExpandable:fn_makeIsExpandable(useFn),stringify:fn_stringify,stringifyConstraints,getDependentRequired,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(useFn),...o.fn},state:{paths:{}}},HOC=o=>Re.createElement(nT.Provider,{value:i},Re.createElement(s,o));return HOC.contexts={JSONSchemaContext:nT},HOC.displayName=s.displayName,HOC},makeWithJSONSchemaSystemContext=({getSystem:s})=>(o,i={})=>{const{getComponent:a,getConfigs:u}=s(),_=u(),w=a(\"JSONSchema202012\"),x=a(\"JSONSchema202012Keyword$schema\"),C=a(\"JSONSchema202012Keyword$vocabulary\"),j=a(\"JSONSchema202012Keyword$id\"),L=a(\"JSONSchema202012Keyword$anchor\"),B=a(\"JSONSchema202012Keyword$dynamicAnchor\"),$=a(\"JSONSchema202012Keyword$ref\"),V=a(\"JSONSchema202012Keyword$dynamicRef\"),U=a(\"JSONSchema202012Keyword$defs\"),z=a(\"JSONSchema202012Keyword$comment\"),Y=a(\"JSONSchema202012KeywordAllOf\"),Z=a(\"JSONSchema202012KeywordAnyOf\"),ee=a(\"JSONSchema202012KeywordOneOf\"),ie=a(\"JSONSchema202012KeywordNot\"),ae=a(\"JSONSchema202012KeywordIf\"),ce=a(\"JSONSchema202012KeywordThen\"),le=a(\"JSONSchema202012KeywordElse\"),pe=a(\"JSONSchema202012KeywordDependentSchemas\"),de=a(\"JSONSchema202012KeywordPrefixItems\"),fe=a(\"JSONSchema202012KeywordItems\"),ye=a(\"JSONSchema202012KeywordContains\"),be=a(\"JSONSchema202012KeywordProperties\"),_e=a(\"JSONSchema202012KeywordPatternProperties\"),Se=a(\"JSONSchema202012KeywordAdditionalProperties\"),we=a(\"JSONSchema202012KeywordPropertyNames\"),xe=a(\"JSONSchema202012KeywordUnevaluatedItems\"),Pe=a(\"JSONSchema202012KeywordUnevaluatedProperties\"),Te=a(\"JSONSchema202012KeywordType\"),Re=a(\"JSONSchema202012KeywordEnum\"),$e=a(\"JSONSchema202012KeywordConst\"),qe=a(\"JSONSchema202012KeywordConstraint\"),ze=a(\"JSONSchema202012KeywordDependentRequired\"),We=a(\"JSONSchema202012KeywordContentSchema\"),He=a(\"JSONSchema202012KeywordTitle\"),Ye=a(\"JSONSchema202012KeywordDescription\"),Xe=a(\"JSONSchema202012KeywordDefault\"),Qe=a(\"JSONSchema202012KeywordDeprecated\"),et=a(\"JSONSchema202012KeywordReadOnly\"),tt=a(\"JSONSchema202012KeywordWriteOnly\"),rt=a(\"JSONSchema202012KeywordExamples\"),nt=a(\"JSONSchema202012ExtensionKeywords\"),st=a(\"JSONSchema202012JSONViewer\"),ot=a(\"JSONSchema202012Accordion\"),it=a(\"JSONSchema202012ExpandDeepButton\"),at=a(\"JSONSchema202012ChevronRightIcon\");return withJSONSchemaContext(o,{components:{JSONSchema:w,Keyword$schema:x,Keyword$vocabulary:C,Keyword$id:j,Keyword$anchor:L,Keyword$dynamicAnchor:B,Keyword$ref:$,Keyword$dynamicRef:V,Keyword$defs:U,Keyword$comment:z,KeywordAllOf:Y,KeywordAnyOf:Z,KeywordOneOf:ee,KeywordNot:ie,KeywordIf:ae,KeywordThen:ce,KeywordElse:le,KeywordDependentSchemas:pe,KeywordPrefixItems:de,KeywordItems:fe,KeywordContains:ye,KeywordProperties:be,KeywordPatternProperties:_e,KeywordAdditionalProperties:Se,KeywordPropertyNames:we,KeywordUnevaluatedItems:xe,KeywordUnevaluatedProperties:Pe,KeywordType:Te,KeywordEnum:Re,KeywordConst:$e,KeywordConstraint:qe,KeywordDependentRequired:ze,KeywordContentSchema:We,KeywordTitle:He,KeywordDescription:Ye,KeywordDefault:Xe,KeywordDeprecated:Qe,KeywordReadOnly:et,KeywordWriteOnly:tt,KeywordExamples:rt,ExtensionKeywords:nt,JSONViewer:st,Accordion:ot,ExpandDeepButton:it,ChevronRightIcon:at,...i.components},config:{showExtensionKeywords:_.showExtensions,...i.config},fn:{...i.fn}})},json_schema_2020_12=({getSystem:s,fn:o})=>{const fnAccessor=()=>({upperFirst:o.upperFirst,...o.jsonSchema202012});return{components:{JSONSchema202012:cT,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:Const_Const,JSONSchema202012KeywordConstraint:lT,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:Default_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012KeywordExamples:keywords_Examples_Examples,JSONSchema202012ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONSchema202012JSONViewer:uT,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,withJSONSchema202012SystemContext:makeWithJSONSchemaSystemContext(s()),JSONSchema202012PathContext:()=>iT,JSONSchema202012LevelContext:()=>sT},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{getTitle:makeGetTitle(fnAccessor),getType:makeGetType(fnAccessor),isExpandable:fn_makeIsExpandable(fnAccessor),isBooleanJSONSchema,hasKeyword,useFn,useConfig,useComponent,useIsExpanded,usePath,useLevel,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(fnAccessor),hasSchemaType:fn_hasSchemaType}}}},array=(s,{sample:o=[]}={})=>((s,o={})=>{const{minItems:i,maxItems:a,uniqueItems:u}=o,{contains:_,minContains:w,maxContains:x}=o;let C=[...s];if(null!=_&&\"object\"==typeof _){if(Number.isInteger(w)&&w>1){const s=C.at(0);for(let o=1;o<w;o+=1)C.unshift(s)}Number.isInteger(x)}if(Number.isInteger(a)&&a>0&&(C=s.slice(0,a)),Number.isInteger(i)&&i>0)for(let s=0;C.length<i;s+=1)C.push(C[s%C.length]);return!0===u&&(C=Array.from(new Set(C))),C})(o,s),object=()=>{throw new Error(\"Not implemented\")},bytes=s=>xt()(s),random_pick=s=>s.at(0),predicates_isBooleanJSONSchema=s=>\"boolean\"==typeof s,isJSONSchemaObject=s=>as()(s),isJSONSchema=s=>predicates_isBooleanJSONSchema(s)||isJSONSchemaObject(s);const pT=class Registry{data={};register(s,o){this.data[s]=o}unregister(s){void 0===s?this.data={}:delete this.data[s]}get(s){return this.data[s]}},int32=()=>0,int64=()=>0,generators_float=()=>.1,generators_double=()=>.1,email=()=>\"user@example.com\",idn_email=()=>\"실례@example.com\",hostname=()=>\"example.com\",idn_hostname=()=>\"실례.com\",ipv4=()=>\"198.51.100.42\",ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",uri=()=>\"https://example.com/\",uri_reference=()=>\"path/index.html\",iri=()=>\"https://실례.com/\",iri_reference=()=>\"path/실례.html\",uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\",generators_json_pointer=()=>\"/a/b/c\",relative_json_pointer=()=>\"1/0\",date_time=()=>(new Date).toISOString(),date=()=>(new Date).toISOString().substring(0,10),time=()=>(new Date).toISOString().substring(11),duration=()=>\"P3D\",generators_password=()=>\"********\",regex=()=>\"^[a-z]+$\";const hT=new class FormatRegistry extends pT{#s={int32,int64,float:generators_float,double:generators_double,email,\"idn-email\":idn_email,hostname,\"idn-hostname\":idn_hostname,ipv4,ipv6,uri,\"uri-reference\":uri_reference,iri,\"iri-reference\":iri_reference,uuid,\"uri-template\":uri_template,\"json-pointer\":generators_json_pointer,\"relative-json-pointer\":relative_json_pointer,\"date-time\":date_time,date,time,duration,password:generators_password,regex};data={...this.#s};get defaults(){return{...this.#s}}},formatAPI=(s,o)=>\"function\"==typeof o?hT.register(s,o):null===o?hT.unregister(s):hT.get(s);formatAPI.getDefaults=()=>hT.defaults;const dT=formatAPI;var fT=__webpack_require__(48287).Buffer;const _7bit=s=>fT.from(s).toString(\"ascii\");var mT=__webpack_require__(48287).Buffer;const _8bit=s=>mT.from(s).toString(\"utf8\");var gT=__webpack_require__(48287).Buffer;const encoders_binary=s=>gT.from(s).toString(\"binary\"),quoted_printable=s=>{let o=\"\";for(let i=0;i<s.length;i++){const a=s.charCodeAt(i);if(61===a)o+=\"=3D\";else if(a>=33&&a<=60||a>=62&&a<=126||9===a||32===a)o+=s.charAt(i);else if(13===a||10===a)o+=\"\\r\\n\";else if(a>126){const a=unescape(encodeURIComponent(s.charAt(i)));for(let s=0;s<a.length;s++)o+=\"=\"+(\"0\"+a.charCodeAt(s).toString(16)).slice(-2).toUpperCase()}else o+=\"=\"+(\"0\"+a.toString(16)).slice(-2).toUpperCase()}return o};var yT=__webpack_require__(48287).Buffer;const base16=s=>yT.from(s).toString(\"hex\");var vT=__webpack_require__(48287).Buffer;const base32=s=>{const o=vT.from(s).toString(\"utf8\"),i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let a=0,u=\"\",_=0,w=0;for(let s=0;s<o.length;s++)for(_=_<<8|o.charCodeAt(s),w+=8;w>=5;)u+=i.charAt(_>>>w-5&31),w-=5;w>0&&(u+=i.charAt(_<<5-w&31),a=(8-8*o.length%5)%5);for(let s=0;s<a;s++)u+=\"=\";return u};var bT=__webpack_require__(48287).Buffer;const base64=s=>bT.from(s).toString(\"base64\");var _T=__webpack_require__(48287).Buffer;const base64url=s=>_T.from(s).toString(\"base64url\");const ST=new class EncoderRegistry extends pT{#s={\"7bit\":_7bit,\"8bit\":_8bit,binary:encoders_binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#s};get defaults(){return{...this.#s}}},encoderAPI=(s,o)=>\"function\"==typeof o?ST.register(s,o):null===o?ST.unregister(s):ST.get(s);encoderAPI.getDefaults=()=>ST.defaults;const ET=encoderAPI,wT={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"},xT={\"image/*\":()=>bytes(25).toString(\"binary\")},kT={\"audio/*\":()=>bytes(25).toString(\"binary\")},OT={\"video/*\":()=>bytes(25).toString(\"binary\")},CT={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const AT=new class MediaTypeRegistry extends pT{#s={...wT,...xT,...kT,...OT,...CT};data={...this.#s};get defaults(){return{...this.#s}}},mediaTypeAPI=(s,o)=>{if(\"function\"==typeof o)return AT.register(s,o);if(null===o)return AT.unregister(s);const i=s.split(\";\").at(0),a=`${i.split(\"/\").at(0)}/*`;return AT.get(s)||AT.get(i)||AT.get(a)};mediaTypeAPI.getDefaults=()=>AT.defaults;const jT=mediaTypeAPI,applyStringConstraints=(s,o={})=>{const{maxLength:i,minLength:a}=o;let u=s;if(Number.isInteger(i)&&i>0&&(u=u.slice(0,i)),Number.isInteger(a)&&a>0){let s=0;for(;u.length<a;)u+=u[s++%u.length]}return u},types_string=(s,{sample:o}={})=>{const{contentEncoding:i,contentMediaType:a,contentSchema:u}=s,{pattern:_,format:w}=s,x=ET(i)||yO();let C;return C=\"string\"==typeof _?applyStringConstraints((s=>{try{const o=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,i=s.replace(o,\"100\"),a=new(ps())(i);return a.max=100,a.gen()}catch{return\"string\"}})(_),s):\"string\"==typeof w?(s=>{const{format:o}=s,i=dT(o);return\"function\"==typeof i?i(s):\"string\"})(s):isJSONSchema(u)&&\"string\"==typeof a&&void 0!==o?Array.isArray(o)||\"object\"==typeof o?JSON.stringify(o):applyStringConstraints(String(o),s):\"string\"==typeof a?(s=>{const{contentMediaType:o}=s,i=jT(o);return\"function\"==typeof i?i(s):\"string\"})(s):applyStringConstraints(\"string\",s),x(C)},applyNumberConstraints=(s,o={})=>{const{minimum:i,maximum:a,exclusiveMinimum:u,exclusiveMaximum:_}=o,{multipleOf:w}=o,x=Number.isInteger(s)?1:Number.EPSILON;let C=\"number\"==typeof i?i:null,j=\"number\"==typeof a?a:null,L=s;if(\"number\"==typeof u&&(C=null!==C?Math.max(C,u+x):u+x),\"number\"==typeof _&&(j=null!==j?Math.min(j,_-x):_-x),L=C>j&&s||C||j||L,\"number\"==typeof w&&w>0){const s=L%w;L=0===s?L:L+w-s}return L},types_number=s=>{const{format:o}=s;let i;return i=\"string\"==typeof o?(s=>{const{format:o}=s,i=dT(o);return\"function\"==typeof i?i(s):0})(s):0,applyNumberConstraints(i,s)},types_integer=s=>{const{format:o}=s;let i;return i=\"string\"==typeof o?(s=>{const{format:o}=s,i=dT(o);if(\"function\"==typeof i)return i(s);switch(o){case\"int32\":return int32();case\"int64\":return int64()}return 0})(s):0,applyNumberConstraints(i,s)},types_boolean=s=>\"boolean\"!=typeof s.default||s.default,IT=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(s,o)=>\"string\"==typeof o&&Object.hasOwn(s,o)?s[o]:()=>`Unknown Type: ${o}`}),PT=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=s=>{if(!isJSONSchemaObject(s))return!1;const{examples:o,example:i,default:a}=s;return!!(Array.isArray(o)&&o.length>=1)||(void 0!==a||void 0!==i)},extractExample=s=>{if(!isJSONSchemaObject(s))return null;const{examples:o,example:i,default:a}=s;return Array.isArray(o)&&o.length>=1?o.at(0):void 0!==a?a:void 0!==i?i:void 0},TT={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};TT.number=TT.integer;const NT=\"string\",inferTypeFromValue=s=>void 0===s?null:null===s?\"null\":Array.isArray(s)?\"array\":Number.isInteger(s)?\"integer\":typeof s,foldType=s=>{if(Array.isArray(s)&&s.length>=1){if(s.includes(\"array\"))return\"array\";if(s.includes(\"object\"))return\"object\";{const o=s.filter((s=>\"null\"!==s)),i=random_pick(o.length>0?o:s);if(PT.includes(i))return i}}return PT.includes(s)?s:null},inferType=(s,o=new WeakSet)=>{if(!isJSONSchemaObject(s))return NT;if(o.has(s))return NT;o.add(s);let{type:i,const:a}=s;if(i=foldType(i),\"string\"!=typeof i){const o=Object.keys(TT);e:for(let a=0;a<o.length;a+=1){const u=o[a],_=TT[u];for(let o=0;o<_.length;o+=1){const a=_[o];if(Object.hasOwn(s,a)){i=u;break e}}}}if(\"string\"!=typeof i&&void 0!==a){const s=inferTypeFromValue(a);i=\"string\"==typeof s?s:i}if(\"string\"!=typeof i){const combineTypes=i=>{if(Array.isArray(s[i])){const a=s[i].map((s=>inferType(s,o)));return foldType(a)}return null},a=combineTypes(\"allOf\"),u=combineTypes(\"anyOf\"),_=combineTypes(\"oneOf\"),w=s.not?inferType(s.not,o):null;(a||u||_||w)&&(i=foldType([a,u,_,w].filter(Boolean)))}if(\"string\"!=typeof i&&hasExample(s)){const o=extractExample(s),a=inferTypeFromValue(o);i=\"string\"==typeof a?a:i}return o.delete(s),i||NT},type_getType=s=>inferType(s),typeCast=s=>predicates_isBooleanJSONSchema(s)?(s=>!1===s?{not:{}}:{})(s):isJSONSchemaObject(s)?s:{},merge_merge=(s,o,i={})=>{if(predicates_isBooleanJSONSchema(s)&&!0===s)return!0;if(predicates_isBooleanJSONSchema(s)&&!1===s)return!1;if(predicates_isBooleanJSONSchema(o)&&!0===o)return!0;if(predicates_isBooleanJSONSchema(o)&&!1===o)return!1;if(!isJSONSchema(s))return o;if(!isJSONSchema(o))return s;const a={...o,...s};if(o.type&&s.type&&Array.isArray(o.type)&&\"string\"==typeof o.type){const i=normalizeArray(o.type).concat(s.type);a.type=Array.from(new Set(i))}if(Array.isArray(o.required)&&Array.isArray(s.required)&&(a.required=[...new Set([...s.required,...o.required])]),o.properties&&s.properties){const u=new Set([...Object.keys(o.properties),...Object.keys(s.properties)]);a.properties={};for(const _ of u){const u=o.properties[_]||{},w=s.properties[_]||{};u.readOnly&&!i.includeReadOnly||u.writeOnly&&!i.includeWriteOnly?a.required=(a.required||[]).filter((s=>s!==_)):a.properties[_]=merge_merge(w,u,i)}}return isJSONSchema(o.items)&&isJSONSchema(s.items)&&(a.items=merge_merge(s.items,o.items,i)),isJSONSchema(o.contains)&&isJSONSchema(s.contains)&&(a.contains=merge_merge(s.contains,o.contains,i)),isJSONSchema(o.contentSchema)&&isJSONSchema(s.contentSchema)&&(a.contentSchema=merge_merge(s.contentSchema,o.contentSchema,i)),a},MT=merge_merge,main_sampleFromSchemaGeneric=(s,o={},i=void 0,a=!1)=>{if(null==s&&void 0===i)return;\"function\"==typeof s?.toJS&&(s=s.toJS()),s=typeCast(s);let u=void 0!==i||hasExample(s);const _=!u&&Array.isArray(s.oneOf)&&s.oneOf.length>0,w=!u&&Array.isArray(s.anyOf)&&s.anyOf.length>0;if(!u&&(_||w)){const i=typeCast(random_pick(_?s.oneOf:s.anyOf));!(s=MT(s,i,o)).xml&&i.xml&&(s.xml=i.xml),hasExample(s)&&hasExample(i)&&(u=!0)}const x={};let{xml:C,properties:j,additionalProperties:L,items:B,contains:$}=s||{},V=type_getType(s),{includeReadOnly:U,includeWriteOnly:z}=o;C=C||{};let Y,{name:Z,prefix:ee,namespace:ie}=C,ae={};if(Object.hasOwn(s,\"type\")||(s.type=V),a&&(Z=Z||\"notagname\",Y=(ee?`${ee}:`:\"\")+Z,ie)){x[ee?`xmlns:${ee}`:\"xmlns\"]=ie}a&&(ae[Y]=[]);const ce=objectify(j);let le,pe=0;const hasExceededMaxProperties=()=>Number.isInteger(s.maxProperties)&&s.maxProperties>0&&pe>=s.maxProperties,canAddProperty=o=>!(Number.isInteger(s.maxProperties)&&s.maxProperties>0)||!hasExceededMaxProperties()&&(!(o=>!Array.isArray(s.required)||0===s.required.length||!s.required.includes(o))(o)||s.maxProperties-pe-(()=>{if(!Array.isArray(s.required)||0===s.required.length)return 0;let o=0;return a?s.required.forEach((s=>o+=void 0===ae[s]?0:1)):s.required.forEach((s=>{o+=void 0===ae[Y]?.find((o=>void 0!==o[s]))?0:1})),s.required.length-o})()>0);if(le=a?(i,u=void 0)=>{if(s&&ce[i]){if(ce[i].xml=ce[i].xml||{},ce[i].xml.attribute){const s=Array.isArray(ce[i].enum)?random_pick(ce[i].enum):void 0;if(hasExample(ce[i]))x[ce[i].xml.name||i]=extractExample(ce[i]);else if(void 0!==s)x[ce[i].xml.name||i]=s;else{const s=typeCast(ce[i]),a=type_getType(s),_=ce[i].xml.name||i;if(\"array\"===a){const s=main_sampleFromSchemaGeneric(ce[i],o,u,!1);x[_]=s.map((s=>as()(s)?\"UnknownTypeObject\":Array.isArray(s)?\"UnknownTypeArray\":s)).join(\" \")}else x[_]=\"object\"===a?\"UnknownTypeObject\":IT[a](s)}return}ce[i].xml.name=ce[i].xml.name||i}else ce[i]||!1===L||(ce[i]={xml:{name:i}});let _=main_sampleFromSchemaGeneric(ce[i],o,u,a);canAddProperty(i)&&(pe++,Array.isArray(_)?ae[Y]=ae[Y].concat(_):ae[Y].push(_))}:(i,u)=>{if(canAddProperty(i)){if(as()(s.discriminator?.mapping)&&s.discriminator.propertyName===i&&\"string\"==typeof s.$$ref){for(const o in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[o])){ae[i]=o;break}}else ae[i]=main_sampleFromSchemaGeneric(ce[i],o,u,a);pe++}},u){let u;if(u=void 0!==i?i:extractExample(s),!a){if(\"number\"==typeof u&&\"string\"===V)return`${u}`;if(\"string\"!=typeof u||\"string\"===V)return u;try{return JSON.parse(u)}catch{return u}}if(\"array\"===V){if(!Array.isArray(u)){if(\"string\"==typeof u)return u;u=[u]}let i=[];return isJSONSchemaObject(B)&&(B.xml=B.xml||C||{},B.xml.name=B.xml.name||C.name,i=u.map((s=>main_sampleFromSchemaGeneric(B,o,s,a)))),isJSONSchemaObject($)&&($.xml=$.xml||C||{},$.xml.name=$.xml.name||C.name,i=[main_sampleFromSchemaGeneric($,o,void 0,a),...i]),i=IT.array(s,{sample:i}),C.wrapped?(ae[Y]=i,ds()(x)||ae[Y].push({_attr:x})):ae=i,ae}if(\"object\"===V){if(\"string\"==typeof u)return u;for(const s in u)Object.hasOwn(u,s)&&(ce[s]?.readOnly&&!U||ce[s]?.writeOnly&&!z||(ce[s]?.xml?.attribute?x[ce[s].xml.name||s]=u[s]:le(s,u[s])));return ds()(x)||ae[Y].push({_attr:x}),ae}return ae[Y]=ds()(x)?u:[{_attr:x},u],ae}if(\"array\"===V){let i=[];if(isJSONSchemaObject($))if(a&&($.xml=$.xml||s.xml||{},$.xml.name=$.xml.name||C.name),Array.isArray($.anyOf)){const{anyOf:s,...u}=B;i.push(...$.anyOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else if(Array.isArray($.oneOf)){const{oneOf:s,...u}=B;i.push(...$.oneOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else{if(!(!a||a&&C.wrapped))return main_sampleFromSchemaGeneric($,o,void 0,a);i.push(main_sampleFromSchemaGeneric($,o,void 0,a))}if(isJSONSchemaObject(B))if(a&&(B.xml=B.xml||s.xml||{},B.xml.name=B.xml.name||C.name),Array.isArray(B.anyOf)){const{anyOf:s,...u}=B;i.push(...B.anyOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else if(Array.isArray(B.oneOf)){const{oneOf:s,...u}=B;i.push(...B.oneOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else{if(!(!a||a&&C.wrapped))return main_sampleFromSchemaGeneric(B,o,void 0,a);i.push(main_sampleFromSchemaGeneric(B,o,void 0,a))}return i=IT.array(s,{sample:i}),a&&C.wrapped?(ae[Y]=i,ds()(x)||ae[Y].push({_attr:x}),ae):i}if(\"object\"===V){for(let s in ce)Object.hasOwn(ce,s)&&(ce[s]?.deprecated||ce[s]?.readOnly&&!U||ce[s]?.writeOnly&&!z||le(s));if(a&&x&&ae[Y].push({_attr:x}),hasExceededMaxProperties())return ae;if(predicates_isBooleanJSONSchema(L)&&L)a?ae[Y].push({additionalProp:\"Anything can be here\"}):ae.additionalProp1={},pe++;else if(isJSONSchemaObject(L)){const i=L,u=main_sampleFromSchemaGeneric(i,o,void 0,a);if(a&&\"string\"==typeof i?.xml?.name&&\"notagname\"!==i?.xml?.name)ae[Y].push(u);else{const o=Number.isInteger(s.minProperties)&&s.minProperties>0&&pe<s.minProperties?s.minProperties-pe:3;for(let s=1;s<=o;s++){if(hasExceededMaxProperties())return ae;if(a){const o={};o[\"additionalProp\"+s]=u.notagname,ae[Y].push(o)}else ae[\"additionalProp\"+s]=u;pe++}}}return ae}let de;if(void 0!==s.const)de=s.const;else if(s&&Array.isArray(s.enum))de=random_pick(normalizeArray(s.enum));else{const i=isJSONSchemaObject(s.contentSchema)?main_sampleFromSchemaGeneric(s.contentSchema,o,void 0,a):void 0;de=IT[V](s,{sample:i})}return a?(ae[Y]=ds()(x)?de:[{_attr:x},de],ae):de},main_createXMLExample=(s,o,i)=>{const a=main_sampleFromSchemaGeneric(s,o,i,!0);if(a)return\"string\"==typeof a?a:ls()(a,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(s,o,i)=>main_sampleFromSchemaGeneric(s,o,i,!1),main_resolver=(s,o,i)=>[s,JSON.stringify(o),JSON.stringify(i)],RT=utils_memoizeN(main_createXMLExample,main_resolver),DT=utils_memoizeN(main_sampleFromSchema,main_resolver);const LT=new class OptionRegistry extends pT{#s={};data={...this.#s};get defaults(){return{...this.#s}}},api_optionAPI=(s,o)=>(void 0!==o&&LT.register(s,o),LT.get(s)),FT=[{when:/json/,shouldStringifyTypes:[\"string\"]}],BT=[\"object\"],fn_get_json_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.jsonSchema202012.memoizedSampleFromSchema(o,i,u),x=typeof w,C=FT.reduce(((s,o)=>o.when.test(a)?[...s,...o.shouldStringifyTypes]:s),BT);return gt()(C,(s=>s===x))?JSON.stringify(w,null,2):w},fn_get_yaml_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.jsonSchema202012.getJsonSampleSchema(o,i,a,u);let x;try{x=fn.dump(fn.load(w),{lineWidth:-1},{schema:rn}),\"\\n\"===x[x.length-1]&&(x=x.slice(0,x.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return x.replace(/\\t/g,\"  \")},fn_get_xml_sample_schema=s=>(o,i,a)=>{const{fn:u}=s();if(o&&!o.xml&&(o.xml={}),o&&!o.xml.name){if(!o.$$ref&&(o.type||o.items||o.properties||o.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(o.$$ref){let s=o.$$ref.match(/\\S*\\/(\\S+)$/);o.xml.name=s[1]}}return u.jsonSchema202012.memoizedCreateXMLExample(o,i,a)},fn_get_sample_schema=s=>(o,i=\"\",a={},u=void 0)=>{const{fn:_}=s();return\"function\"==typeof o?.toJS&&(o=o.toJS()),\"function\"==typeof u?.toJS&&(u=u.toJS()),/xml/.test(i)?_.jsonSchema202012.getXmlSampleSchema(o,a,u):/(yaml|yml)/.test(i)?_.jsonSchema202012.getYamlSampleSchema(o,a,i,u):_.jsonSchema202012.getJsonSampleSchema(o,a,i,u)},json_schema_2020_12_samples=({getSystem:s})=>{const o=fn_get_json_sample_schema(s),i=fn_get_yaml_sample_schema(s),a=fn_get_xml_sample_schema(s),u=fn_get_sample_schema(s);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleOptionAPI:api_optionAPI,sampleEncoderAPI:ET,sampleFormatAPI:dT,sampleMediaTypeAPI:jT,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:DT,memoizedCreateXMLExample:RT,getJsonSampleSchema:o,getYamlSampleSchema:i,getXmlSampleSchema:a,getSampleSchema:u,mergeJsonSchema:MT,foldType}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const inline_plugin=s=>()=>({fn:s.fn,components:s.components}),factorization_system=s=>{const o=Ye()({layout:{layout:s.layout,filter:s.filter},spec:{spec:\"\",url:s.url},requestSnippets:s.requestSnippets},s.initialState);if(s.initialState)for(const[i,a]of Object.entries(s.initialState))void 0===a&&delete o[i];return{system:{configs:s.configs},plugins:s.presets,state:o}},sources_query=()=>s=>{const o=s.queryConfigEnabled?(()=>{const s=new URLSearchParams(lt.location.search);return Object.fromEntries(s)})():{};return Object.entries(o).reduce(((s,[o,i])=>(\"config\"===o?s.configUrl=i:\"urls.primaryName\"===o?s[o]=i:s=co()(s,o,i),s)),{})},sources_url=({url:s,system:o})=>async i=>{if(!s)return{};if(\"function\"!=typeof o.configsActions?.getConfigByUrl)return{};const a=(()=>{const s={};return s.promise=new Promise(((o,i)=>{s.resolve=o,s.reject=i})),s})();return o.configsActions.getConfigByUrl({url:s,loadRemoteConfig:!0,requestInterceptor:i.requestInterceptor,responseInterceptor:i.responseInterceptor},(s=>{a.resolve(s)})),a.promise},runtime=()=>()=>{const s={};return globalThis.location&&(s.oauth2RedirectUrl=`${globalThis.location.protocol}//${globalThis.location.host}${globalThis.location.pathname.substring(0,globalThis.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`),s},$T=Object.freeze({dom_id:null,domNode:null,spec:{},url:\"\",urls:null,configUrl:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:-1,filter:!1,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:void 0,persistAuthorization:!1,configs:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:s=>(s.curlOptions=[],s),responseInterceptor:s=>s,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:!1,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"},operationsSorter:null,tagsSorter:null,onComplete:null,modelPropertyMacro:null,parameterMacro:null,fileUploadMediaTypes:[\"application/octet-stream\",\"image/\",\"audio/\",\"video/\"],uncaughtExceptionHandler:null});var qT=__webpack_require__(61448),VT=__webpack_require__.n(qT),UT=__webpack_require__(77731),zT=__webpack_require__.n(UT);const type_casters_array=(s,o=[])=>Array.isArray(s)?s:o,type_casters_boolean=(s,o=!1)=>!0===s||\"true\"===s||1===s||\"1\"===s||!1!==s&&\"false\"!==s&&0!==s&&\"0\"!==s&&o,dom_node=s=>null===s||\"null\"===s?null:s,type_casters_filter=s=>{const o=String(s);return type_casters_boolean(s,o)},type_casters_function=(s,o)=>\"function\"==typeof s?s:o,nullable_array=s=>Array.isArray(s)?s:null,nullable_function=s=>\"function\"==typeof s?s:null,nullable_string=s=>null===s||\"null\"===s?null:String(s),type_casters_number=(s,o=-1)=>{const i=parseInt(s,10);return Number.isNaN(i)?o:i},type_casters_object=(s,o={})=>as()(s)?s:o,sorter=s=>\"function\"==typeof s||\"string\"==typeof s?s:null,type_casters_string=s=>String(s),syntax_highlight=(s,o)=>as()(s)?s:!1===s||\"false\"===s||0===s||\"0\"===s?{activated:!1}:o,undefined_string=s=>void 0===s||\"undefined\"===s?void 0:String(s),WT={components:{typeCaster:type_casters_object},configs:{typeCaster:type_casters_object},configUrl:{typeCaster:nullable_string},deepLinking:{typeCaster:type_casters_boolean,defaultValue:$T.deepLinking},defaultModelExpandDepth:{typeCaster:type_casters_number,defaultValue:$T.defaultModelExpandDepth},defaultModelRendering:{typeCaster:type_casters_string},defaultModelsExpandDepth:{typeCaster:type_casters_number,defaultValue:$T.defaultModelsExpandDepth},displayOperationId:{typeCaster:type_casters_boolean,defaultValue:$T.displayOperationId},displayRequestDuration:{typeCaster:type_casters_boolean,defaultValue:$T.displayRequestDuration},docExpansion:{typeCaster:type_casters_string},dom_id:{typeCaster:nullable_string},domNode:{typeCaster:dom_node},fileUploadMediaTypes:{typeCaster:type_casters_array,defaultValue:$T.fileUploadMediaTypes},filter:{typeCaster:type_casters_filter},fn:{typeCaster:type_casters_object},initialState:{typeCaster:type_casters_object},layout:{typeCaster:type_casters_string},maxDisplayedTags:{typeCaster:type_casters_number,defaultValue:$T.maxDisplayedTags},modelPropertyMacro:{typeCaster:nullable_function},oauth2RedirectUrl:{typeCaster:undefined_string},onComplete:{typeCaster:nullable_function},operationsSorter:{typeCaster:sorter},paramaterMacro:{typeCaster:nullable_function},persistAuthorization:{typeCaster:type_casters_boolean,defaultValue:$T.persistAuthorization},plugins:{typeCaster:type_casters_array,defaultValue:$T.plugins},presets:{typeCaster:type_casters_array,defaultValue:$T.presets},requestInterceptor:{typeCaster:type_casters_function,defaultValue:$T.requestInterceptor},requestSnippets:{typeCaster:type_casters_object,defaultValue:$T.requestSnippets},requestSnippetsEnabled:{typeCaster:type_casters_boolean,defaultValue:$T.requestSnippetsEnabled},responseInterceptor:{typeCaster:type_casters_function,defaultValue:$T.responseInterceptor},showCommonExtensions:{typeCaster:type_casters_boolean,defaultValue:$T.showCommonExtensions},showExtensions:{typeCaster:type_casters_boolean,defaultValue:$T.showExtensions},showMutatedRequest:{typeCaster:type_casters_boolean,defaultValue:$T.showMutatedRequest},spec:{typeCaster:type_casters_object,defaultValue:$T.spec},supportedSubmitMethods:{typeCaster:type_casters_array,defaultValue:$T.supportedSubmitMethods},syntaxHighlight:{typeCaster:syntax_highlight,defaultValue:$T.syntaxHighlight},\"syntaxHighlight.activated\":{typeCaster:type_casters_boolean,defaultValue:$T.syntaxHighlight.activated},\"syntaxHighlight.theme\":{typeCaster:type_casters_string},tagsSorter:{typeCaster:sorter},tryItOutEnabled:{typeCaster:type_casters_boolean,defaultValue:$T.tryItOutEnabled},url:{typeCaster:type_casters_string},urls:{typeCaster:nullable_array},\"urls.primaryName\":{typeCaster:type_casters_string},validatorUrl:{typeCaster:nullable_string},withCredentials:{typeCaster:type_casters_boolean,defaultValue:$T.withCredentials},uncaughtExceptionHandler:{typeCaster:nullable_function}},type_cast=s=>Object.entries(WT).reduce(((s,[o,{typeCaster:i,defaultValue:a}])=>{if(VT()(s,o)){const u=i(An()(s,o),a);s=zT()(o,u,s)}return s}),{...s}),config_merge=(s,...o)=>{let i=Symbol.for(\"domNode\"),a=Symbol.for(\"primaryName\");const u=[];for(const s of o){const o={...s};Object.hasOwn(o,\"domNode\")&&(i=o.domNode,delete o.domNode),Object.hasOwn(o,\"urls.primaryName\")?(a=o[\"urls.primaryName\"],delete o[\"urls.primaryName\"]):Array.isArray(o.urls)&&Object.hasOwn(o.urls,\"primaryName\")&&(a=o.urls.primaryName,delete o.urls.primaryName),u.push(o)}const _=Ye()(s,...u);return i!==Symbol.for(\"domNode\")&&(_.domNode=i),a!==Symbol.for(\"primaryName\")&&Array.isArray(_.urls)&&(_.urls.primaryName=a),type_cast(_)};function SwaggerUI(s){const o=sources_query()(s),i=runtime()(),a=SwaggerUI.config.merge({},SwaggerUI.config.defaults,i,s,o),u=factorization_system(a),_=inline_plugin(a),w=new Store(u);w.register([a.plugins,_]);const x=w.getSystem(),persistConfigs=s=>{w.setConfigs(s),x.configsActions.loaded()},updateSpec=s=>{!o.url&&\"object\"==typeof s.spec&&Object.keys(s.spec).length>0?(x.specActions.updateUrl(\"\"),x.specActions.updateLoadingStatus(\"success\"),x.specActions.updateSpec(JSON.stringify(s.spec))):\"function\"==typeof x.specActions.download&&s.url&&!s.urls&&(x.specActions.updateUrl(s.url),x.specActions.download(s.url))},render=s=>{if(s.domNode)x.render(s.domNode,\"App\");else if(s.dom_id){const o=document.querySelector(s.dom_id);x.render(o,\"App\")}else null===s.dom_id||null===s.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\")};return a.configUrl?((async()=>{const{configUrl:s}=a,i=await sources_url({url:s,system:x})(a),u=SwaggerUI.config.merge({},a,i,o);persistConfigs(u),null!==i&&updateSpec(u),render(u)})(),x):(persistConfigs(a),updateSpec(a),render(a),x)}SwaggerUI.System=Store,SwaggerUI.config={defaults:$T,merge:config_merge,typeCast:type_cast,typeCastMappings:WT},SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5:json_schema_5,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SyntaxHighlighting:syntax_highlighting,Versions:versions,SafeRender:safe_render};const JT=SwaggerUI})(),i=i.default})()));"
  },
  {
    "path": "runner/server/docs/ui/swagger-ui-es-bundle-core.js",
    "content": "/*! For license information please see swagger-ui-es-bundle-core.js.LICENSE.txt */\nimport*as e from\"ieee754\";import*as t from\"base64-js\";import*as r from\"react\";import*as n from\"redux\";import*as a from\"immutable\";import*as o from\"redux-immutable\";import*as s from\"serialize-error\";import*as l from\"lodash/merge\";import*as i from\"lodash/camelCase\";import*as c from\"lodash/upperFirst\";import*as u from\"lodash/memoize\";import*as d from\"lodash/find\";import*as p from\"lodash/some\";import*as m from\"lodash/eq\";import*as f from\"lodash/isFunction\";import*as h from\"css.escape\";import*as g from\"url-parse\";import*as y from\"reselect\";import*as S from\"prop-types\";import*as _ from\"lodash/omit\";import*as v from\"js-yaml\";import*as b from\"zenscroll\";import*as w from\"react-immutable-proptypes\";import*as C from\"lodash/reduce\";import*as x from\"lodash/get\";import*as O from\"@babel/runtime-corejs3/helpers/extends\";import*as k from\"classnames\";import*as N from\"react-copy-to-clipboard\";import*as A from\"react-immutable-pure-component\";import*as I from\"react-debounce-input\";import*as j from\"lodash/isPlainObject\";import*as R from\"randexp\";import*as T from\"lodash/isEmpty\";import*as P from\"lodash/constant\";import*as B from\"lodash/isString\";import*as M from\"lodash/debounce\";import*as q from\"lodash/set\";import*as L from\"lodash/fp/assocPath\";import*as U from\"swagger-client/es/resolver/strategies/generic\";import*as D from\"swagger-client/es/resolver/strategies/openapi-2\";import*as $ from\"swagger-client/es/resolver/strategies/openapi-3-0\";import*as V from\"swagger-client/es/resolver/strategies/openapi-3-1-apidom\";import*as J from\"swagger-client/es/resolver\";import*as F from\"swagger-client/es/execute\";import*as z from\"swagger-client/es/http\";import*as K from\"swagger-client/es/subtree-resolver\";import*as W from\"swagger-client/es/helpers\";import*as H from\"react-dom\";import*as G from\"react-redux\";import*as X from\"lodash/identity\";import*as Y from\"react-syntax-highlighter/dist/esm/light\";import*as Q from\"react-syntax-highlighter/dist/esm/languages/hljs/javascript\";import*as Z from\"react-syntax-highlighter/dist/esm/languages/hljs/json\";import*as ee from\"react-syntax-highlighter/dist/esm/languages/hljs/xml\";import*as te from\"react-syntax-highlighter/dist/esm/languages/hljs/bash\";import*as re from\"react-syntax-highlighter/dist/esm/languages/hljs/yaml\";import*as ne from\"react-syntax-highlighter/dist/esm/languages/hljs/http\";import*as ae from\"react-syntax-highlighter/dist/esm/languages/hljs/powershell\";import*as oe from\"react-syntax-highlighter/dist/esm/styles/hljs/agate\";import*as se from\"react-syntax-highlighter/dist/esm/styles/hljs/arta\";import*as le from\"react-syntax-highlighter/dist/esm/styles/hljs/monokai\";import*as ie from\"react-syntax-highlighter/dist/esm/styles/hljs/nord\";import*as ce from\"react-syntax-highlighter/dist/esm/styles/hljs/obsidian\";import*as ue from\"react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night\";import*as de from\"react-syntax-highlighter/dist/esm/styles/hljs/idea\";import*as pe from\"js-file-download\";import*as me from\"lodash/zipObject\";import*as fe from\"lodash/toString\";import*as he from\"xml-but-prettier\";import*as ge from\"lodash/toLower\";import*as ye from\"remarkable\";import*as Ee from\"remarkable/linkify\";import*as Se from\"dompurify\";import*as _e from\"lodash/escapeRegExp\";import*as ve from\"lodash/has\";import*as be from\"lodash/fp/set\";var we={7:function(e){var t,r=\"object\"==typeof Reflect?Reflect:null,n=r&&\"function\"==typeof r.apply?r.apply:function ReflectApply(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&\"function\"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function ReflectOwnKeys(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function NumberIsNaN(e){return e!=e};function EventEmitter(){EventEmitter.init.call(this)}e.exports=EventEmitter,e.exports.once=function once(e,t){return new Promise((function(r,n){function errorListener(r){e.removeListener(t,resolver),n(r)}function resolver(){\"function\"==typeof e.removeListener&&e.removeListener(\"error\",errorListener),r([].slice.call(arguments))}eventTargetAgnosticAddListener(e,t,resolver,{once:!0}),\"error\"!==t&&function addErrorHandlerIfEventEmitter(e,t,r){\"function\"==typeof e.on&&eventTargetAgnosticAddListener(e,\"error\",t,r)}(e,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var o=10;function checkListener(e){if(\"function\"!=typeof e)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof e)}function _getMaxListeners(e){return void 0===e._maxListeners?EventEmitter.defaultMaxListeners:e._maxListeners}function _addListener(e,t,r,n){var a,o,s;if(checkListener(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit(\"newListener\",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if(\"function\"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(a=_getMaxListeners(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error(\"Possible EventEmitter memory leak detected. \"+s.length+\" \"+String(t)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");l.name=\"MaxListenersExceededWarning\",l.emitter=e,l.type=t,l.count=s.length,function ProcessEmitWarning(e){console&&console.warn&&console.warn(e)}(l)}return e}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=onceWrapper.bind(n);return a.listener=r,n.wrapFn=a,a}function _listeners(e,t,r){var n=e._events;if(void 0===n)return[];var a=n[t];return void 0===a?[]:\"function\"==typeof a?r?[a.listener||a]:[a]:r?function unwrapListeners(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(a):arrayClone(a,a.length)}function listenerCount(e){var t=this._events;if(void 0!==t){var r=t[e];if(\"function\"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function arrayClone(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function eventTargetAgnosticAddListener(e,t,r,n){if(\"function\"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if(\"function\"!=typeof e.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function wrapListener(a){n.once&&e.removeEventListener(t,wrapListener),r(a)}))}}Object.defineProperty(EventEmitter,\"defaultMaxListeners\",{enumerable:!0,get:function(){return o},set:function(e){if(\"number\"!=typeof e||e<0||a(e))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+e+\".\");o=e}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(e){if(\"number\"!=typeof e||e<0||a(e))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+e+\".\");return this._maxListeners=e,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var a=\"error\"===e,o=this._events;if(void 0!==o)a=a&&void 0===o.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var l=new Error(\"Unhandled error.\"+(s?\" (\"+s.message+\")\":\"\"));throw l.context=s,l}var i=o[e];if(void 0===i)return!1;if(\"function\"==typeof i)n(i,this,t);else{var c=i.length,u=arrayClone(i,c);for(r=0;r<c;++r)n(u[r],this,t)}return!0},EventEmitter.prototype.addListener=function addListener(e,t){return _addListener(this,e,t,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(e,t){return _addListener(this,e,t,!0)},EventEmitter.prototype.once=function once(e,t){return checkListener(t),this.on(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(e,t){return checkListener(t),this.prependListener(e,_onceWrap(this,e,t)),this},EventEmitter.prototype.removeListener=function removeListener(e,t){var r,n,a,o,s;if(checkListener(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit(\"removeListener\",e,r.listener||t));else if(\"function\"!=typeof r){for(a=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,a=o;break}if(a<0)return this;0===a?r.shift():function spliceOne(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,a),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit(\"removeListener\",e,s||t)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var a,o=Object.keys(r);for(n=0;n<o.length;++n)\"removeListener\"!==(a=o[n])&&this.removeAllListeners(a);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},EventEmitter.prototype.listeners=function listeners(e){return _listeners(this,e,!0)},EventEmitter.prototype.rawListeners=function rawListeners(e){return _listeners(this,e,!1)},EventEmitter.listenerCount=function(e,t){return\"function\"==typeof e.listenerCount?e.listenerCount(t):listenerCount.call(e,t)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?t(this._events):[]}},48:function(e){var t={};function createErrorType(e,r,n){n||(n=Error);var a=function(e){function NodeError(t,n,a){return e.call(this,function getMessage(e,t,n){return\"string\"==typeof r?r:r(e,t,n)}(t,n,a))||this}return function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(NodeError,e),NodeError}(n);a.prototype.name=n.name,a.prototype.code=e,t[e]=a}function oneOf(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))}createErrorType(\"ERR_INVALID_OPT_VALUE\",(function(e,t){return'The value \"'+t+'\" is invalid for option \"'+e+'\"'}),TypeError),createErrorType(\"ERR_INVALID_ARG_TYPE\",(function(e,t,r){var n,a;if(\"string\"==typeof t&&function startsWith(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}(t,\"not \")?(n=\"must not be\",t=t.replace(/^not /,\"\")):n=\"must be\",function endsWith(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e,\" argument\"))a=\"The \".concat(e,\" \").concat(n,\" \").concat(oneOf(t,\"type\"));else{var o=function includes(e,t,r){return\"number\"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,\".\")?\"property\":\"argument\";a='The \"'.concat(e,'\" ').concat(o,\" \").concat(n,\" \").concat(oneOf(t,\"type\"))}return a+=\". Received type \".concat(typeof r)}),TypeError),createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(e){return\"The \"+e+\" method is not implemented\"})),createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),createErrorType(\"ERR_STREAM_DESTROYED\",(function(e){return\"Cannot call \"+e+\" after a stream was destroyed\"})),createErrorType(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),createErrorType(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),createErrorType(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),createErrorType(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),createErrorType(\"ERR_UNKNOWN_ENCODING\",(function(e){return\"Unknown encoding: \"+e}),TypeError),createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),e.exports.F=t},107:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=new Array(64);function Sha256(){this.init(),this._w=l,a.call(this,64,56)}function ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function sigma1(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function gamma0(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function gamma1(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(Sha256,a),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,a=0|this._c,o=0|this._d,l=0|this._e,i=0|this._f,c=0|this._g,u=0|this._h,d=0;d<16;++d)t[d]=e.readInt32BE(4*d);for(;d<64;++d)t[d]=gamma1(t[d-2])+t[d-7]+gamma0(t[d-15])+t[d-16]|0;for(var p=0;p<64;++p){var m=u+sigma1(l)+ch(l,i,c)+s[p]+t[p]|0,f=sigma0(r)+maj(r,n,a)|0;u=c,c=i,i=l,l=o+m|0,o=a,a=n,n=r,r=m+f|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=a+this._c|0,this._d=o+this._d|0,this._e=l+this._e|0,this._f=i+this._f|0,this._g=c+this._g|0,this._h=u+this._h|0},Sha256.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=Sha256},123:function(e,t,r){var n=r(606),a=r(499),o=r(310).Stream;function resolve(e,t,r){var n,o=function create_indent(e,t){return new Array(t||0).join(e||\"\")}(t,r=r||0),s=e;if(\"object\"==typeof e&&((s=e[n=Object.keys(e)[0]])&&s._elem))return s._elem.name=n,s._elem.icount=r,s._elem.indent=t,s._elem.indents=o,s._elem.interrupt=s,s._elem;var l,i=[],c=[];function get_attributes(e){Object.keys(e).forEach((function(t){i.push(function attribute(e,t){return e+'=\"'+a(t)+'\"'}(t,e[t]))}))}switch(typeof s){case\"object\":if(null===s)break;s._attr&&get_attributes(s._attr),s._cdata&&c.push((\"<![CDATA[\"+s._cdata).replace(/\\]\\]>/g,\"]]]]><![CDATA[>\")+\"]]>\"),s.forEach&&(l=!1,c.push(\"\"),s.forEach((function(e){\"object\"==typeof e?\"_attr\"==Object.keys(e)[0]?get_attributes(e._attr):c.push(resolve(e,t,r+1)):(c.pop(),l=!0,c.push(a(e)))})),l||c.push(\"\"));break;default:c.push(a(s))}return{name:n,interrupt:!1,attributes:i,content:c,icount:r,indents:o,indent:t}}function format(e,t,r){if(\"object\"!=typeof t)return e(!1,t);var n=t.interrupt?1:t.content.length;function proceed(){for(;t.content.length;){var a=t.content.shift();if(void 0!==a){if(interrupt(a))return;format(e,a)}}e(!1,(n>1?t.indents:\"\")+(t.name?\"</\"+t.name+\">\":\"\")+(t.indent&&!r?\"\\n\":\"\")),r&&r()}function interrupt(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=proceed,t.interrupt=!1,e(!0),!0)}if(e(!1,t.indents+(t.name?\"<\"+t.name:\"\")+(t.attributes.length?\" \"+t.attributes.join(\" \"):\"\")+(n?t.name?\">\":\"\":t.name?\"/>\":\"\")+(t.indent&&n>1?\"\\n\":\"\")),!n)return e(!1,t.indent?\"\\n\":\"\");interrupt(t)||proceed()}e.exports=function xml(e,t){\"object\"!=typeof t&&(t={indent:t});var r=t.stream?new o:null,a=\"\",s=!1,l=t.indent?!0===t.indent?\"    \":t.indent:\"\",i=!0;function delay(e){i?n.nextTick(e):e()}function append(e,t){if(void 0!==t&&(a+=t),e&&!s&&(r=r||new o,s=!0),e&&s){var n=a;delay((function(){r.emit(\"data\",n)})),a=\"\"}}function add(e,t){format(append,resolve(e,l,l?1:0),t)}function end(){if(r){var e=a;delay((function(){r.emit(\"data\",e),r.emit(\"end\"),r.readable=!1,r.emit(\"close\")}))}}return delay((function(){i=!1})),t.declaration&&function addXmlDeclaration(e){var t={version:\"1.0\",encoding:e.encoding||\"UTF-8\"};e.standalone&&(t.standalone=e.standalone),add({\"?xml\":{_attr:t}}),a=a.replace(\"/>\",\"?>\")}(t.declaration),e&&e.forEach?e.forEach((function(t,r){var n;r+1===e.length&&(n=end),add(t,n)})):add(e,end),r?(r.readable=!0,r):a},e.exports.element=e.exports.Element=function element(){var e={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(e){if(!this.append)throw new Error(\"not assigned to a parent!\");var t=this,r=this._elem.indent;format(this.append,resolve(e,r,this._elem.icount+(r?1:0)),(function(){t.append(!0)}))},close:function(e){void 0!==e&&this.push(e),this.end&&this.end()}};return e}},141:function(e,t,r){var n=r(861).Buffer,a=n.isEncoding||function(e){switch((e=\"\"+e)&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function StringDecoder(e){var t;switch(this.encoding=function normalizeEncoding(e){var t=function _normalizeEncoding(e){if(!e)return\"utf8\";for(var t;;)switch(e){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return e;default:if(t)return;e=(\"\"+e).toLowerCase(),t=!0}}(e);if(\"string\"!=typeof t&&(n.isEncoding===a||!a(e)))throw new Error(\"Unknown encoding: \"+e);return t||e}(e),this.encoding){case\"utf16le\":this.text=utf16Text,this.end=utf16End,t=4;break;case\"utf8\":this.fillLast=utf8FillLast,t=4;break;case\"base64\":this.text=base64Text,this.end=base64End,t=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function utf8CheckByte(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function utf8FillLast(e){var t=this.lastTotal-this.lastNeed,r=function utf8CheckExtraBytes(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,\"�\";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,\"�\";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,\"�\"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function utf16Text(e,t){if((e.length-t)%2==0){var r=e.toString(\"utf16le\",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString(\"utf16le\",t,e.length-1)}function utf16End(e){var t=e&&e.length?this.write(e):\"\";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString(\"utf16le\",0,r)}return t}function base64Text(e,t){var r=(e.length-t)%3;return 0===r?e.toString(\"base64\",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString(\"base64\",t,e.length-r))}function base64End(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+this.lastChar.toString(\"base64\",0,3-this.lastNeed):t}function simpleWrite(e){return e.toString(this.encoding)}function simpleEnd(e){return e&&e.length?this.write(e):\"\"}t.I=StringDecoder,StringDecoder.prototype.write=function(e){if(0===e.length)return\"\";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return\"\";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||\"\"},StringDecoder.prototype.end=function utf8End(e){var t=e&&e.length?this.write(e):\"\";return this.lastNeed?t+\"�\":t},StringDecoder.prototype.text=function utf8Text(e,t){var r=function utf8CheckIncomplete(e,t,r){var n=t.length-1;if(n<r)return 0;var a=utf8CheckByte(t[n]);if(a>=0)return a>0&&(e.lastNeed=a-1),a;if(--n<r||-2===a)return 0;if(a=utf8CheckByte(t[n]),a>=0)return a>0&&(e.lastNeed=a-2),a;if(--n<r||-2===a)return 0;if(a=utf8CheckByte(t[n]),a>=0)return a>0&&(2===a?a=0:e.lastNeed=a-3),a;return 0}(this,e,t);if(!this.lastNeed)return e.toString(\"utf8\",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString(\"utf8\",t,n)},StringDecoder.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},157:function(e){e.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},209:function(e,t,r){var n=r(606),a=65536,o=4294967295;var s=r(861).Buffer,l=r.g.crypto||r.g.msCrypto;l&&l.getRandomValues?e.exports=function randomBytes(e,t){if(e>o)throw new RangeError(\"requested too many random bytes\");var r=s.allocUnsafe(e);if(e>0)if(e>a)for(var i=0;i<e;i+=a)l.getRandomValues(r.slice(i,i+a));else l.getRandomValues(r);if(\"function\"==typeof t)return n.nextTick((function(){t(null,r)}));return r}:e.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},238:function(e,t,r){var n=r(48).F.ERR_STREAM_PREMATURE_CLOSE;function noop(){}e.exports=function eos(e,t,r){if(\"function\"==typeof t)return eos(e,null,t);t||(t={}),r=function once(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];e.apply(this,n)}}}(r||noop);var a=t.readable||!1!==t.readable&&e.readable,o=t.writable||!1!==t.writable&&e.writable,s=function onlegacyfinish(){e.writable||i()},l=e._writableState&&e._writableState.finished,i=function onfinish(){o=!1,l=!0,a||r.call(e)},c=e._readableState&&e._readableState.endEmitted,u=function onend(){a=!1,c=!0,o||r.call(e)},d=function onerror(t){r.call(e,t)},p=function onclose(){var t;return a&&!c?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):o&&!l?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},m=function onrequest(){e.req.on(\"finish\",i)};return!function isRequest(e){return e.setHeader&&\"function\"==typeof e.abort}(e)?o&&!e._writableState&&(e.on(\"end\",s),e.on(\"close\",s)):(e.on(\"complete\",i),e.on(\"abort\",p),e.req?m():e.on(\"request\",m)),e.on(\"end\",u),e.on(\"finish\",i),!1!==t.error&&e.on(\"error\",d),e.on(\"close\",p),function(){e.removeListener(\"complete\",i),e.removeListener(\"abort\",p),e.removeListener(\"request\",m),e.req&&e.req.removeListener(\"finish\",i),e.removeListener(\"end\",s),e.removeListener(\"close\",s),e.removeListener(\"finish\",i),e.removeListener(\"end\",u),e.removeListener(\"error\",d),e.removeListener(\"close\",p)}}},287:function(e,t,r){const n=r(987),a=r(362),o=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;t.Buffer=Buffer,t.SlowBuffer=function SlowBuffer(e){+e!=e&&(e=0);return Buffer.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function createBuffer(e){if(e>s)throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,Buffer.prototype),t}function Buffer(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 allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if(\"string\"==typeof e)return function fromString(e,t){\"string\"==typeof t&&\"\"!==t||(t=\"utf8\");if(!Buffer.isEncoding(t))throw new TypeError(\"Unknown encoding: \"+t);const r=0|byteLength(e,t);let n=createBuffer(r);const a=n.write(e,t);a!==r&&(n=n.slice(0,a));return n}(e,t);if(ArrayBuffer.isView(e))return function fromArrayView(e){if(isInstance(e,Uint8Array)){const t=new Uint8Array(e);return fromArrayBuffer(t.buffer,t.byteOffset,t.byteLength)}return fromArrayLike(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(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer)))return fromArrayBuffer(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 Buffer.from(n,t,r);const a=function fromObject(e){if(Buffer.isBuffer(e)){const t=0|checked(e.length),r=createBuffer(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return\"number\"!=typeof e.length||numberIsNaN(e.length)?createBuffer(0):fromArrayLike(e);if(\"Buffer\"===e.type&&Array.isArray(e.data))return fromArrayLike(e.data)}(e);if(a)return a;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof e[Symbol.toPrimitive])return Buffer.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 assertSize(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 allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromArrayLike(e){const t=e.length<0?0:0|checked(e.length),r=createBuffer(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function fromArrayBuffer(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,Buffer.prototype),n}function checked(e){if(e>=s)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+s.toString(16)+\" bytes\");return 0|e}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(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 a=!1;for(;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return utf8ToBytes(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return base64ToBytes(e).length;default:if(a)return n?-1:utf8ToBytes(e).length;t=(\"\"+t).toLowerCase(),a=!0}}function slowToString(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 hexSlice(this,t,r);case\"utf8\":case\"utf-8\":return utf8Slice(this,t,r);case\"ascii\":return asciiSlice(this,t,r);case\"latin1\":case\"binary\":return latin1Slice(this,t,r);case\"base64\":return base64Slice(this,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,t,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),n=!0}}function swap(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,a){if(0===e.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0){if(!a)return-1;r=0}if(\"string\"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,a);if(\"number\"==typeof t)return t&=255,\"function\"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,a);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(e,t,r,n,a){let o,s=1,l=e.length,i=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;s=2,l/=2,i/=2,r/=2}function read(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let n=-1;for(o=r;o<l;o++)if(read(e,o)===read(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===i)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+i>l&&(r=l-i),o=r;o>=0;o--){let r=!0;for(let n=0;n<i;n++)if(read(e,o+n)!==read(t,n)){r=!1;break}if(r)return o}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;const a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(numberIsNaN(n))return s;e[r+s]=n}return s}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(function asciiToBytes(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(function utf16leToBytes(e,t){let r,n,a;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,a=r%256,o.push(a),o.push(n);return o}(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);const n=[];let a=t;for(;a<r;){const t=e[a];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=r){let r,n,l,i;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[a+1],128==(192&r)&&(i=(31&t)<<6|63&r,i>127&&(o=i));break;case 3:r=e[a+1],n=e[a+2],128==(192&r)&&128==(192&n)&&(i=(15&t)<<12|(63&r)<<6|63&n,i>2047&&(i<55296||i>57343)&&(o=i));break;case 4:r=e[a+1],n=e[a+2],l=e[a+3],128==(192&r)&&128==(192&n)&&128==(192&l)&&(i=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&l,i>65535&&i<1114112&&(o=i))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),a+=s}return function decodeCodePointsArray(e){const t=e.length;if(t<=l)return String.fromCharCode.apply(String,e);let r=\"\",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=l));return r}(n)}t.kMaxLength=s,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){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}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(e,t,r){return function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?\"string\"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function isBuffer(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function compare(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.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 a=0,o=Math.min(r,n);a<o;++a)if(e[a]!==t[a]){r=e[a],n=t[a];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(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}},Buffer.concat=function concat(e,t){if(!Array.isArray(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=Buffer.allocUnsafe(t);let a=0;for(r=0;r<e.length;++r){let t=e[r];if(isInstance(t,Uint8Array))a+t.length>n.length?(Buffer.isBuffer(t)||(t=Buffer.from(t)),t.copy(n,a)):Uint8Array.prototype.set.call(n,t,a);else{if(!Buffer.isBuffer(t))throw new TypeError('\"list\" argument must be an Array of Buffers');t.copy(n,a)}a+=t.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){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)swap(this,t,t+1);return this},Buffer.prototype.swap32=function swap32(){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)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function swap64(){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)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function toString(){const e=this.length;return 0===e?\"\":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function inspect(){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+\">\"},o&&(Buffer.prototype[o]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(e,t,r,n,a){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.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===a&&(a=this.length),t<0||r>e.length||n<0||a>this.length)throw new RangeError(\"out of range index\");if(n>=a&&t>=r)return 0;if(n>=a)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(a>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const l=Math.min(o,s),i=this.slice(n,a),c=e.slice(t,r);for(let e=0;e<l;++e)if(i[e]!==c[e]){o=i[e],s=c[e];break}return o<s?-1:s<o?1:0},Buffer.prototype.includes=function includes(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function indexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function write(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 a=this.length-t;if((void 0===r||r>a)&&(r=a),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let o=!1;for(;;)switch(n){case\"hex\":return hexWrite(this,e,t,r);case\"utf8\":case\"utf-8\":return utf8Write(this,e,t,r);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,e,t,r);case\"base64\":return base64Write(this,e,t,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,e,t,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const l=4096;function asciiSlice(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let a=t;a<r;++a)n+=String.fromCharCode(127&e[a]);return n}function latin1Slice(e,t,r){let n=\"\";r=Math.min(e.length,r);for(let a=t;a<r;++a)n+=String.fromCharCode(e[a]);return n}function hexSlice(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let a=\"\";for(let n=t;n<r;++n)a+=u[e[n]];return a}function utf16leSlice(e,t,r){const n=e.slice(t,r);let a=\"\";for(let e=0;e<n.length-1;e+=2)a+=String.fromCharCode(n[e]+256*n[e+1]);return a}function checkOffset(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 checkInt(e,t,r,n,a,o){if(!Buffer.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>a||t<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>e.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(e,t,r,n,a){checkIntBI(t,n,a,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function wrtBigUInt64BE(e,t,r,n,a){checkIntBI(t,n,a,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function checkIEEE754(e,t,r,n,a,o){if(r+n>e.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function writeFloat(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,4),a.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,o){return t=+t,r>>>=0,o||checkIEEE754(e,0,r,8),a.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function slice(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,Buffer.prototype),n},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[e+o]*a;return n},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e+--t],a=1;for(;t>0&&(a*=256);)n+=this[e+--t]*a;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(a)})),Buffer.prototype.readIntLE=function readIntLE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=this[e],a=1,o=0;for(;++o<t&&(a*=256);)n+=this[e+o]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function readIntBE(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);let n=t,a=1,o=this[e+--n];for(;n>0&&(a*=256);)o+=this[e+--n]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},Buffer.prototype.readInt8=function readInt8(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function readInt16LE(e,t){e>>>=0,t||checkOffset(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(e,t){e>>>=0,t||checkOffset(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(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)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(e){validateNumber(e>>>=0,\"offset\");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||boundsError(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)})),Buffer.prototype.readFloatLE=function readFloatLE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),a.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(e,t){return e>>>=0,t||checkOffset(e,4,this.length),a.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(e,t){return e>>>=0,t||checkOffset(e,8,this.length),a.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(e,t){return e>>>=0,t||checkOffset(e,8,this.length),a.read(this,e,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}let a=1,o=0;for(this[t]=255&e;++o<r&&(a*=256);)this[t+o]=e/a&255;return t+r},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){checkInt(this,e,t,r,Math.pow(2,8*r)-1,0)}let a=r-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,t,r){return e=+e,t>>>=0,r||checkInt(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},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,t,r){return e=+e,t>>>=0,r||checkInt(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},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(e,t=0){return wrtBigUInt64LE(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(e,t=0){return wrtBigUInt64BE(this,e,t,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},Buffer.prototype.writeIntBE=function writeIntBE(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,e,t,r,n-1,-n)}let a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},Buffer.prototype.writeInt8=function writeInt8(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function writeInt16LE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function writeInt16BE(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function writeInt32LE(e,t,r){return e=+e,t>>>=0,r||checkInt(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},Buffer.prototype.writeInt32BE=function writeInt32BE(e,t,r){return e=+e,t>>>=0,r||checkInt(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},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(e,t=0){return wrtBigUInt64LE(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(e,t=0){return wrtBigUInt64BE(this,e,t,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function copy(e,t,r,n){if(!Buffer.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 a=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),a},Buffer.prototype.fill=function fill(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&&!Buffer.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 a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),\"number\"==typeof e)for(a=t;a<r;++a)this[a]=e;else{const o=Buffer.isBuffer(e)?e:Buffer.from(e,n),s=o.length;if(0===s)throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"');for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};const i={};function E(e,t,r){i[e]=class NodeError 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 addNumericalSeparator(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 checkIntBI(e,t,r,n,a,o){if(e>r||e<t){const n=\"bigint\"==typeof t?\"n\":\"\";let a;throw a=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new i.ERR_OUT_OF_RANGE(\"value\",a,e)}!function checkBounds(e,t,r){validateNumber(t,\"offset\"),void 0!==e[t]&&void 0!==e[t+r]||boundsError(t,e.length-(r+1))}(n,a,o)}function validateNumber(e,t){if(\"number\"!=typeof e)throw new i.ERR_INVALID_ARG_TYPE(t,\"number\",e)}function boundsError(e,t,r){if(Math.floor(e)!==e)throw validateNumber(e,r),new i.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",e);if(t<0)throw new i.ERR_BUFFER_OUT_OF_BOUNDS;throw new i.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${t}`,e)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(e){return e?`${e} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(e,t){return`The \"${e}\" argument must be of type number. Received type ${typeof t}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(e,t,r){let n=`The value of \"${e}\" is out of range.`,a=r;return Number.isInteger(r)&&Math.abs(r)>2**32?a=addNumericalSeparator(String(r)):\"bigint\"==typeof r&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=addNumericalSeparator(a)),a+=\"n\"),n+=` It must be ${t}. Received ${a}`,n}),RangeError);const c=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(e,t){let r;t=t||1/0;const n=e.length;let a=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),a=r;continue}r=65536+(a-55296<<10|r-56320)}else a&&(t-=3)>-1&&o.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.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;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function base64ToBytes(e){return n.toByteArray(function base64clean(e){if((e=(e=e.split(\"=\")[0]).trim().replace(c,\"\")).length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}(e))}function blitBuffer(e,t,r,n){let a;for(a=0;a<n&&!(a+r>=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e}const u=function(){const e=\"0123456789abcdef\",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t}();function defineBigIntMethod(e){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:e}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},291:function(e,t,r){var n=r(48).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function getHighWaterMark(e,t,r,a){var o=function highWaterMarkFrom(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(a?r:\"highWaterMark\",o);return Math.floor(o)}return e.objectMode?16:16384}}},310:function(e,t,r){e.exports=Stream;var n=r(7).EventEmitter;function Stream(){n.call(this)}r(698)(Stream,n),Stream.Readable=r(412),Stream.Writable=r(708),Stream.Duplex=r(382),Stream.Transform=r(610),Stream.PassThrough=r(600),Stream.finished=r(238),Stream.pipeline=r(758),Stream.Stream=Stream,Stream.prototype.pipe=function(e,t){var r=this;function ondata(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function ondrain(){r.readable&&r.resume&&r.resume()}r.on(\"data\",ondata),e.on(\"drain\",ondrain),e._isStdio||t&&!1===t.end||(r.on(\"end\",onend),r.on(\"close\",onclose));var a=!1;function onend(){a||(a=!0,e.end())}function onclose(){a||(a=!0,\"function\"==typeof e.destroy&&e.destroy())}function onerror(e){if(cleanup(),0===n.listenerCount(this,\"error\"))throw e}function cleanup(){r.removeListener(\"data\",ondata),e.removeListener(\"drain\",ondrain),r.removeListener(\"end\",onend),r.removeListener(\"close\",onclose),r.removeListener(\"error\",onerror),e.removeListener(\"error\",onerror),r.removeListener(\"end\",cleanup),r.removeListener(\"close\",cleanup),e.removeListener(\"close\",cleanup)}return r.on(\"error\",onerror),e.on(\"error\",onerror),r.on(\"end\",cleanup),r.on(\"close\",cleanup),e.on(\"close\",cleanup),e.emit(\"pipe\",r),e}},340:function(){},345:function(e,t,r){e.exports=r(7).EventEmitter},362:function(t){t.exports=e},382:function(e,t,r){var n=r(606),a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=Duplex;var o=r(412),s=r(708);r(698)(Duplex,o);for(var l=a(s.prototype),i=0;i<l.length;i++){var c=l[i];Duplex.prototype[c]||(Duplex.prototype[c]=s.prototype[c])}function Duplex(e){if(!(this instanceof Duplex))return new Duplex(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",onend)))}function onend(){this._writableState.ended||n.nextTick(onEndNT,this)}function onEndNT(e){e.end()}Object.defineProperty(Duplex.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},392:function(e,t,r){var n=r(861).Buffer;function Hash(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}Hash.prototype.update=function(e,t){\"string\"==typeof e&&(t=t||\"utf8\",e=n.from(e,t));for(var r=this._block,a=this._blockSize,o=e.length,s=this._len,l=0;l<o;){for(var i=s%a,c=Math.min(o-l,a-i),u=0;u<c;u++)r[i+u]=e[l+u];l+=c,(s+=c)%a==0&&this._update(r)}return this._len+=o,this},Hash.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,a=(r-n)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},e.exports=Hash},412:function(e,t,r){var n,a=r(606);e.exports=Readable,Readable.ReadableState=ReadableState;r(7).EventEmitter;var o=function EElistenerCount(e,t){return e.listeners(t).length},s=r(345),l=r(287).Buffer,i=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var c,u=r(838);c=u&&u.debuglog?u.debuglog(\"stream\"):function debug(){};var d,p,m,f=r(726),h=r(896),g=r(291).getHighWaterMark,y=r(48).F,S=y.ERR_INVALID_ARG_TYPE,_=y.ERR_STREAM_PUSH_AFTER_EOF,v=y.ERR_METHOD_NOT_IMPLEMENTED,b=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(698)(Readable,s);var w=h.errorOrDestroy,C=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function ReadableState(e,t,a){n=n||r(382),e=e||{},\"boolean\"!=typeof a&&(a=t instanceof n),this.objectMode=!!e.objectMode,a&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,\"readableHighWaterMark\",a),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r(141).I),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function Readable(e){if(n=n||r(382),!(this instanceof Readable))return new Readable(e);var t=this instanceof n;this._readableState=new ReadableState(e,this,t),this.readable=!0,e&&(\"function\"==typeof e.read&&(this._read=e.read),\"function\"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function readableAddChunk(e,t,r,n,a){c(\"readableAddChunk\",t);var o,s=e._readableState;if(null===t)s.reading=!1,function onEofChunk(e,t){if(c(\"onEofChunk\"),t.ended)return;if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?emitReadable(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,emitReadable_(e)))}(e,s);else if(a||(o=function chunkInvalid(e,t){var r;(function _isUint8Array(e){return l.isBuffer(e)||e instanceof i})(t)||\"string\"==typeof t||void 0===t||e.objectMode||(r=new S(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],t));return r}(s,t)),o)w(e,o);else if(s.objectMode||t&&t.length>0)if(\"string\"==typeof t||s.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function _uint8ArrayToBuffer(e){return l.from(e)}(t)),n)s.endEmitted?w(e,new b):addChunk(e,s,t,!0);else if(s.ended)w(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?addChunk(e,s,t,!1):maybeReadMore(e,s)):addChunk(e,s,t,!1)}else n||(s.reading=!1,maybeReadMore(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function addChunk(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit(\"data\",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&emitReadable(e)),maybeReadMore(e,t)}Object.defineProperty(Readable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(e){this._readableState&&(this._readableState.destroyed=e)}}),Readable.prototype.destroy=h.destroy,Readable.prototype._undestroy=h.undestroy,Readable.prototype._destroy=function(e,t){t(e)},Readable.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:\"string\"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=l.from(e,t),t=\"\"),r=!0),readableAddChunk(this,e,t,!1,r)},Readable.prototype.unshift=function(e){return readableAddChunk(this,e,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(e){d||(d=r(141).I);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,a=\"\";null!==n;)a+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),\"\"!==a&&this._readableState.buffer.push(a),this._readableState.length=a.length,this};var x=1073741824;function howMuchToRead(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function computeNewHighWaterMark(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function emitReadable(e){var t=e._readableState;c(\"emitReadable\",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c(\"emitReadable\",t.flowing),t.emittedReadable=!0,a.nextTick(emitReadable_,e))}function emitReadable_(e){var t=e._readableState;c(\"emitReadable_\",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit(\"readable\"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,flow(e)}function maybeReadMore(e,t){t.readingMore||(t.readingMore=!0,a.nextTick(maybeReadMore_,e,t))}function maybeReadMore_(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c(\"maybeReadMore read 0\"),e.read(0),r===t.length)break}t.readingMore=!1}function updateReadableListening(e){var t=e._readableState;t.readableListening=e.listenerCount(\"readable\")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount(\"data\")>0&&e.resume()}function nReadingNextTick(e){c(\"readable nexttick read 0\"),e.read(0)}function resume_(e,t){c(\"resume\",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit(\"resume\"),flow(e),t.flowing&&!t.reading&&e.read(0)}function flow(e){var t=e._readableState;for(c(\"flow\",t.flowing);t.flowing&&null!==e.read(););}function fromList(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(\"\"):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function endReadable(e){var t=e._readableState;c(\"endReadable\",t.endEmitted),t.endEmitted||(t.ended=!0,a.nextTick(endReadableNT,t,e))}function endReadableNT(e,t){if(c(\"endReadableNT\",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function indexOf(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}Readable.prototype.read=function(e){c(\"read\",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return c(\"read: emitReadable\",t.length,t.ended),0===t.length&&t.ended?endReadable(this):emitReadable(this),null;if(0===(e=howMuchToRead(e,t))&&t.ended)return 0===t.length&&endReadable(this),null;var n,a=t.needReadable;return c(\"need readable\",a),(0===t.length||t.length-e<t.highWaterMark)&&c(\"length less than watermark\",a=!0),t.ended||t.reading?c(\"reading or ended\",a=!1):a&&(c(\"do read\"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=howMuchToRead(r,t))),null===(n=e>0?fromList(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&endReadable(this)),null!==n&&this.emit(\"data\",n),n},Readable.prototype._read=function(e){w(this,new v(\"_read()\"))},Readable.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,c(\"pipe count=%d opts=%j\",n.pipesCount,t);var s=(!t||!1!==t.end)&&e!==a.stdout&&e!==a.stderr?onend:unpipe;function onunpipe(t,a){c(\"onunpipe\"),t===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,function cleanup(){c(\"cleanup\"),e.removeListener(\"close\",onclose),e.removeListener(\"finish\",onfinish),e.removeListener(\"drain\",l),e.removeListener(\"error\",onerror),e.removeListener(\"unpipe\",onunpipe),r.removeListener(\"end\",onend),r.removeListener(\"end\",unpipe),r.removeListener(\"data\",ondata),i=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l()}())}function onend(){c(\"onend\"),e.end()}n.endEmitted?a.nextTick(s):r.once(\"end\",s),e.on(\"unpipe\",onunpipe);var l=function pipeOnDrain(e){return function pipeOnDrainFunctionResult(){var t=e._readableState;c(\"pipeOnDrain\",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,\"data\")&&(t.flowing=!0,flow(e))}}(r);e.on(\"drain\",l);var i=!1;function ondata(t){c(\"ondata\");var a=e.write(t);c(\"dest.write\",a),!1===a&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==indexOf(n.pipes,e))&&!i&&(c(\"false write response, pause\",n.awaitDrain),n.awaitDrain++),r.pause())}function onerror(t){c(\"onerror\",t),unpipe(),e.removeListener(\"error\",onerror),0===o(e,\"error\")&&w(e,t)}function onclose(){e.removeListener(\"finish\",onfinish),unpipe()}function onfinish(){c(\"onfinish\"),e.removeListener(\"close\",onclose),unpipe()}function unpipe(){c(\"unpipe\"),r.unpipe(e)}return r.on(\"data\",ondata),function prependListener(e,t,r){if(\"function\"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,\"error\",onerror),e.once(\"close\",onclose),e.once(\"finish\",onfinish),e.emit(\"pipe\",r),n.flowing||(c(\"pipe resume\"),r.resume()),e},Readable.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this,r)),this;if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<a;o++)n[o].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var s=indexOf(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit(\"unpipe\",this,r)),this},Readable.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return\"data\"===e?(n.readableListening=this.listenerCount(\"readable\")>0,!1!==n.flowing&&this.resume()):\"readable\"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,c(\"on readable\",n.length,n.reading),n.length?emitReadable(this):n.reading||a.nextTick(nReadingNextTick,this))),r},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return\"readable\"===e&&a.nextTick(updateReadableListening,this),r},Readable.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==e&&void 0!==e||a.nextTick(updateReadableListening,this),t},Readable.prototype.resume=function(){var e=this._readableState;return e.flowing||(c(\"resume\"),e.flowing=!e.readableListening,function resume(e,t){t.resumeScheduled||(t.resumeScheduled=!0,a.nextTick(resume_,e,t))}(this,e)),e.paused=!1,this},Readable.prototype.pause=function(){return c(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(c(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on(\"end\",(function(){if(c(\"wrapped end\"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on(\"data\",(function(a){(c(\"wrapped data\"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a)||(r.objectMode||a&&a.length)&&(t.push(a)||(n=!0,e.pause()))})),e)void 0===this[a]&&\"function\"==typeof e[a]&&(this[a]=function methodWrap(t){return function methodWrapReturnFunction(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<C.length;o++)e.on(C[o],this.emit.bind(this,C[o]));return this._read=function(t){c(\"wrapped _read\",t),n&&(n=!1,e.resume())},this},\"function\"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=r(955)),p(this)}),Object.defineProperty(Readable.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,\"readableBuffer\",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,\"readableFlowing\",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(e){this._readableState&&(this._readableState.flowing=e)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,\"readableLength\",{enumerable:!1,get:function get(){return this._readableState.length}}),\"function\"==typeof Symbol&&(Readable.from=function(e,t){return void 0===m&&(m=r(157)),m(Readable,e,t)})},499:function(e){var t={\"&\":\"&amp;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"<\":\"&lt;\",\">\":\"&gt;\"};e.exports=function escapeForXML(e){return e&&e.replace?e.replace(/([&\"<>'])/g,(function(e,r){return t[r]})):e}},600:function(e,t,r){e.exports=PassThrough;var n=r(610);function PassThrough(e){if(!(this instanceof PassThrough))return new PassThrough(e);n.call(this,e)}r(698)(PassThrough,n),PassThrough.prototype._transform=function(e,t,r){r(null,e)}},606:function(e){var t,r,n=e.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(e){if(t===setTimeout)return setTimeout(e,0);if((t===defaultSetTimout||!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:defaultSetTimout}catch(e){t=defaultSetTimout}try{r=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){r=defaultClearTimeout}}();var a,o=[],s=!1,l=-1;function cleanUpNextTick(){s&&a&&(s=!1,a.length?o=a.concat(o):l=-1,o.length&&drainQueue())}function drainQueue(){if(!s){var e=runTimeout(cleanUpNextTick);s=!0;for(var t=o.length;t;){for(a=o,o=[];++l<t;)a&&a[l].run();l=-1,t=o.length}a=null,s=!1,function runClearTimeout(e){if(r===clearTimeout)return clearTimeout(e);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function Item(e,t){this.fun=e,this.array=t}function noop(){}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];o.push(new Item(e,t)),1!==o.length||s||runTimeout(drainQueue)},Item.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=noop,n.addListener=noop,n.once=noop,n.off=noop,n.removeListener=noop,n.removeAllListeners=noop,n.emit=noop,n.prependListener=noop,n.prependOnceListener=noop,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}},610:function(e,t,r){e.exports=Transform;var n=r(48).F,a=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=n.ERR_TRANSFORM_WITH_LENGTH_0,i=r(382);function afterTransform(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit(\"error\",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}function Transform(e){if(!(this instanceof Transform))return new Transform(e);i.call(this,e),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(\"function\"==typeof e.transform&&(this._transform=e.transform),\"function\"==typeof e.flush&&(this._flush=e.flush)),this.on(\"prefinish\",prefinish)}function prefinish(){var e=this;\"function\"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(t,r){done(e,t,r)}))}function done(e,t,r){if(t)return e.emit(\"error\",t);if(null!=r&&e.push(r),e._writableState.length)throw new l;if(e._transformState.transforming)throw new s;return e.push(null)}r(698)(Transform,i),Transform.prototype.push=function(e,t){return this._transformState.needTransform=!1,i.prototype.push.call(this,e,t)},Transform.prototype._transform=function(e,t,r){r(new a(\"_transform()\"))},Transform.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var a=this._readableState;(n.needTransform||a.needReadable||a.length<a.highWaterMark)&&this._read(a.highWaterMark)}},Transform.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},Transform.prototype._destroy=function(e,t){i.prototype._destroy.call(this,e,(function(e){t(e)}))}},643:function(e,t,r){function config(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 deprecate(e,t){if(config(\"noDeprecation\"))return e;var r=!1;return function deprecated(){if(!r){if(config(\"throwDeprecation\"))throw new Error(t);config(\"traceDeprecation\")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},698:function(e){\"function\"==typeof Object.create?e.exports=function inherits(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function inherits(e,t){if(t){e.super_=t;var TempCtor=function(){};TempCtor.prototype=t.prototype,e.prototype=new TempCtor,e.prototype.constructor=e}}},708:function(e,t,r){var n,a=r(606);function CorkedRequest(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(e,t,r){var n=e.entry;e.entry=null;for(;n;){var a=n.callback;t.pendingcb--,a(r),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=Writable,Writable.WritableState=WritableState;var o={deprecate:r(643)},s=r(345),l=r(287).Buffer,i=(void 0!==r.g?r.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var c,u=r(896),d=r(291).getHighWaterMark,p=r(48).F,m=p.ERR_INVALID_ARG_TYPE,f=p.ERR_METHOD_NOT_IMPLEMENTED,h=p.ERR_MULTIPLE_CALLBACK,g=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,S=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,v=p.ERR_UNKNOWN_ENCODING,b=u.errorOrDestroy;function nop(){}function WritableState(e,t,o){n=n||r(382),e=e||{},\"boolean\"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=d(this,e,\"writableHighWaterMark\",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function onwrite(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(\"function\"!=typeof o)throw new h;if(function onwriteStateUpdate(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function onwriteError(e,t,r,n,o){--t.pendingcb,r?(a.nextTick(o,n),a.nextTick(finishMaybe,e,t),e._writableState.errorEmitted=!0,b(e,n)):(o(n),e._writableState.errorEmitted=!0,b(e,n),finishMaybe(e,t))}(e,r,n,t,o);else{var s=needFinish(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||clearBuffer(e,r),n?a.nextTick(afterWrite,e,r,s,o):afterWrite(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(e){var t=this instanceof(n=n||r(382));if(!t&&!c.call(Writable,this))return new Writable(e);this._writableState=new WritableState(e,this,t),this.writable=!0,e&&(\"function\"==typeof e.write&&(this._write=e.write),\"function\"==typeof e.writev&&(this._writev=e.writev),\"function\"==typeof e.destroy&&(this._destroy=e.destroy),\"function\"==typeof e.final&&(this._final=e.final)),s.call(this)}function doWrite(e,t,r,n,a,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y(\"write\")):r?e._writev(a,t.onwrite):e._write(a,o,t.onwrite),t.sync=!1}function afterWrite(e,t,r,n){r||function onwriteDrain(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit(\"drain\"))}(e,t),t.pendingcb--,n(),finishMaybe(e,t)}function clearBuffer(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,l=!0;r;)a[s]=r,r.isBuf||(l=!1),r=r.next,s+=1;a.allBuffers=l,doWrite(e,t,!0,t.length,a,\"\",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new CorkedRequest(t),t.bufferedRequestCount=0}else{for(;r;){var i=r.chunk,c=r.encoding,u=r.callback;if(doWrite(e,t,!1,t.objectMode?1:i.length,i,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function needFinish(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function callFinal(e,t){e._final((function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit(\"prefinish\"),finishMaybe(e,t)}))}function finishMaybe(e,t){var r=needFinish(t);if(r&&(function prefinish(e,t){t.prefinished||t.finalCalled||(\"function\"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit(\"prefinish\")):(t.pendingcb++,t.finalCalled=!0,a.nextTick(callFinal,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit(\"finish\"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(698)(Writable,s),WritableState.prototype.getBuffer=function getBuffer(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(WritableState.prototype,\"buffer\",{get:o.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(e){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(e){return!!c.call(this,e)||this===Writable&&(e&&e._writableState instanceof WritableState)}})):c=function realHasInstance(e){return e instanceof this},Writable.prototype.pipe=function(){b(this,new g)},Writable.prototype.write=function(e,t,r){var n=this._writableState,o=!1,s=!n.objectMode&&function _isUint8Array(e){return l.isBuffer(e)||e instanceof i}(e);return s&&!l.isBuffer(e)&&(e=function _uint8ArrayToBuffer(e){return l.from(e)}(e)),\"function\"==typeof t&&(r=t,t=null),s?t=\"buffer\":t||(t=n.defaultEncoding),\"function\"!=typeof r&&(r=nop),n.ending?function writeAfterEnd(e,t){var r=new _;b(e,r),a.nextTick(t,r)}(this,r):(s||function validChunk(e,t,r,n){var o;return null===r?o=new S:\"string\"==typeof r||t.objectMode||(o=new m(\"chunk\",[\"string\",\"Buffer\"],r)),!o||(b(e,o),a.nextTick(n,o),!1)}(this,n,e,r))&&(n.pendingcb++,o=function writeOrBuffer(e,t,r,n,a,o){if(!r){var s=function decodeChunk(e,t,r){e.objectMode||!1===e.decodeStrings||\"string\"!=typeof t||(t=l.from(t,r));return t}(t,n,a);n!==s&&(r=!0,a=\"buffer\",n=s)}var i=t.objectMode?1:n.length;t.length+=i;var c=t.length<t.highWaterMark;c||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:a,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else doWrite(e,t,!1,i,n,a,o);return c}(this,n,s,e,t,r)),o},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||clearBuffer(this,e))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(e){if(\"string\"==typeof e&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(Writable.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(e,t,r){r(new f(\"_write()\"))},Writable.prototype._writev=null,Writable.prototype.end=function(e,t,r){var n=this._writableState;return\"function\"==typeof e?(r=e,e=null,t=null):\"function\"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function endWritable(e,t,r){t.ending=!0,finishMaybe(e,t),r&&(t.finished?a.nextTick(r):e.once(\"finish\",r));t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(Writable.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(e){this._writableState&&(this._writableState.destroyed=e)}}),Writable.prototype.destroy=u.destroy,Writable.prototype._undestroy=u.undestroy,Writable.prototype._destroy=function(e,t){t(e)}},710:function(e,t,r){var n=r(698),a=r(107),o=r(392),s=r(861).Buffer,l=new Array(64);function Sha224(){this.init(),this._w=l,o.call(this,64,56)}n(Sha224,a),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=Sha224},726:function(e,t,r){function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _defineProperties(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,_toPropertyKey(n.key),n)}}function _toPropertyKey(e){var t=function _toPrimitive(e,t){if(\"object\"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:String(t)}var n=r(287).Buffer,a=r(340).inspect,o=a&&a.custom||\"inspect\";function copyBuffer(e,t,r){n.prototype.copy.call(e,t,r)}e.exports=function(){function BufferList(){!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,\"prototype\",{writable:!1}),e}(BufferList,[{key:\"push\",value:function push(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:\"unshift\",value:function unshift(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:\"shift\",value:function shift(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:\"clear\",value:function clear(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function join(e){if(0===this.length)return\"\";for(var t=this.head,r=\"\"+t.data;t=t.next;)r+=e+t.data;return r}},{key:\"concat\",value:function concat(e){if(0===this.length)return n.alloc(0);for(var t=n.allocUnsafe(e>>>0),r=this.head,a=0;r;)copyBuffer(r.data,t,a),a+=r.data.length,r=r.next;return t}},{key:\"consume\",value:function consume(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:\"first\",value:function first(){return this.head.data}},{key:\"_getString\",value:function _getString(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var a=t.data,o=e>a.length?a.length:e;if(o===a.length?n+=a:n+=a.slice(0,e),0===(e-=o)){o===a.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=a.slice(o));break}++r}return this.length-=r,n}},{key:\"_getBuffer\",value:function _getBuffer(e){var t=n.allocUnsafe(e),r=this.head,a=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,s),0===(e-=s)){s===o.length?(++a,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(s));break}++a}return this.length-=a,t}},{key:o,value:function value(e,t){return a(this,_objectSpread(_objectSpread({},t),{},{depth:0,customInspect:!1}))}}]),BufferList}()},737:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function Sha1(){this.init(),this._w=l,a.call(this,64,56)}function rotl5(e){return e<<5|e>>>27}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(Sha1,a),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,o=0|this._c,l=0|this._d,i=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=(t=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|t>>>31;for(var u=0;u<80;++u){var d=~~(u/20),p=rotl5(n)+ft(d,a,o,l)+i+r[u]+s[d]|0;i=l,l=o,o=rotl30(a),a=n,n=p}this._a=n+this._a|0,this._b=a+this._b|0,this._c=o+this._c|0,this._d=l+this._d|0,this._e=i+this._e|0},Sha1.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=Sha1},758:function(e,t,r){var n;var a=r(48).F,o=a.ERR_MISSING_ARGS,s=a.ERR_STREAM_DESTROYED;function noop(e){if(e)throw e}function call(e){e()}function pipe(e,t){return e.pipe(t)}e.exports=function pipeline(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];var l,i=function popCallback(e){return e.length?\"function\"!=typeof e[e.length-1]?noop:e.pop():noop}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o(\"streams\");var c=t.map((function(e,a){var o=a<t.length-1;return function destroyer(e,t,a,o){o=function once(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var l=!1;e.on(\"close\",(function(){l=!0})),void 0===n&&(n=r(238)),n(e,{readable:t,writable:a},(function(e){if(e)return o(e);l=!0,o()}));var i=!1;return function(t){if(!l&&!i)return i=!0,function isRequest(e){return e.setHeader&&\"function\"==typeof e.abort}(e)?e.abort():\"function\"==typeof e.destroy?e.destroy():void o(t||new s(\"pipe\"))}}(e,o,a>0,(function(e){l||(l=e),e&&c.forEach(call),o||(c.forEach(call),i(l))}))}));return t.reduce(pipe)}},802:function(e,t,r){var n=e.exports=function SHA(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+\" is not supported (we accept pull requests)\");return new t};n.sha=r(816),n.sha1=r(737),n.sha224=r(710),n.sha256=r(107),n.sha384=r(827),n.sha512=r(890)},816:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);function Sha(){this.init(),this._w=l,a.call(this,64,56)}function rotl30(e){return e<<30|e>>>2}function ft(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(Sha,a),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,a=0|this._b,o=0|this._c,l=0|this._d,i=0|this._e,c=0;c<16;++c)r[c]=e.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var u=0;u<80;++u){var d=~~(u/20),p=0|((t=n)<<5|t>>>27)+ft(d,a,o,l)+i+r[u]+s[d];i=l,l=o,o=rotl30(a),a=n,n=p}this._a=n+this._a|0,this._b=a+this._b|0,this._c=o+this._c|0,this._d=l+this._d|0,this._e=i+this._e|0},Sha.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=Sha},827:function(e,t,r){var n=r(698),a=r(890),o=r(392),s=r(861).Buffer,l=new Array(160);function Sha384(){this.init(),this._w=l,o.call(this,128,112)}n(Sha384,a),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var e=s.allocUnsafe(48);function writeInt64BE(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),e},e.exports=Sha384},838:function(){},861:function(e,t,r){var n=r(287),a=n.Buffer;function copyProps(e,t){for(var r in e)t[r]=e[r]}function SafeBuffer(e,t,r){return a(e,t,r)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=n:(copyProps(n,t),t.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(a.prototype),copyProps(a,SafeBuffer),SafeBuffer.from=function(e,t,r){if(\"number\"==typeof e)throw new TypeError(\"Argument must not be a number\");return a(e,t,r)},SafeBuffer.alloc=function(e,t,r){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");var n=a(e);return void 0!==t?\"string\"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},SafeBuffer.allocUnsafe=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return a(e)},SafeBuffer.allocUnsafeSlow=function(e){if(\"number\"!=typeof e)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(e)}},890:function(e,t,r){var n=r(698),a=r(392),o=r(861).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function Sha512(){this.init(),this._w=l,a.call(this,128,112)}function Ch(e,t,r){return r^e&(t^r)}function maj(e,t,r){return e&t|r&(e|t)}function sigma0(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function sigma1(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function Gamma0(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function Gamma0l(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function Gamma1(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function Gamma1l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function getCarry(e,t){return e>>>0<t>>>0?1:0}n(Sha512,a),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,a=0|this._ch,o=0|this._dh,l=0|this._eh,i=0|this._fh,c=0|this._gh,u=0|this._hh,d=0|this._al,p=0|this._bl,m=0|this._cl,f=0|this._dl,h=0|this._el,g=0|this._fl,y=0|this._gl,S=0|this._hl,_=0;_<32;_+=2)t[_]=e.readInt32BE(4*_),t[_+1]=e.readInt32BE(4*_+4);for(;_<160;_+=2){var v=t[_-30],b=t[_-30+1],w=Gamma0(v,b),C=Gamma0l(b,v),x=Gamma1(v=t[_-4],b=t[_-4+1]),O=Gamma1l(b,v),k=t[_-14],N=t[_-14+1],A=t[_-32],I=t[_-32+1],j=C+N|0,R=w+k+getCarry(j,C)|0;R=(R=R+x+getCarry(j=j+O|0,O)|0)+A+getCarry(j=j+I|0,I)|0,t[_]=R,t[_+1]=j}for(var T=0;T<160;T+=2){R=t[T],j=t[T+1];var P=maj(r,n,a),B=maj(d,p,m),M=sigma0(r,d),q=sigma0(d,r),L=sigma1(l,h),U=sigma1(h,l),D=s[T],$=s[T+1],V=Ch(l,i,c),J=Ch(h,g,y),F=S+U|0,z=u+L+getCarry(F,S)|0;z=(z=(z=z+V+getCarry(F=F+J|0,J)|0)+D+getCarry(F=F+$|0,$)|0)+R+getCarry(F=F+j|0,j)|0;var K=q+B|0,W=M+P+getCarry(K,q)|0;u=c,S=y,c=i,y=g,i=l,g=h,l=o+z+getCarry(h=f+F|0,f)|0,o=a,f=m,a=n,m=p,n=r,p=d,r=z+W+getCarry(d=F+K|0,F)|0}this._al=this._al+d|0,this._bl=this._bl+p|0,this._cl=this._cl+m|0,this._dl=this._dl+f|0,this._el=this._el+h|0,this._fl=this._fl+g|0,this._gl=this._gl+y|0,this._hl=this._hl+S|0,this._ah=this._ah+r+getCarry(this._al,d)|0,this._bh=this._bh+n+getCarry(this._bl,p)|0,this._ch=this._ch+a+getCarry(this._cl,m)|0,this._dh=this._dh+o+getCarry(this._dl,f)|0,this._eh=this._eh+l+getCarry(this._el,h)|0,this._fh=this._fh+i+getCarry(this._fl,g)|0,this._gh=this._gh+c+getCarry(this._gl,y)|0,this._hh=this._hh+u+getCarry(this._hl,S)|0},Sha512.prototype._hash=function(){var e=o.allocUnsafe(64);function writeInt64BE(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),e},e.exports=Sha512},896:function(e,t,r){var n=r(606);function emitErrorAndCloseNT(e,t){emitErrorNT(e,t),emitCloseNT(e)}function emitCloseNT(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit(\"close\")}function emitErrorNT(e,t){e.emit(\"error\",t)}e.exports={destroy:function destroy(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(emitErrorNT,this,e)):n.nextTick(emitErrorNT,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(emitCloseNT,r):(r._writableState.errorEmitted=!0,n.nextTick(emitErrorAndCloseNT,r,e)):n.nextTick(emitErrorAndCloseNT,r,e):t?(n.nextTick(emitCloseNT,r),t(e)):n.nextTick(emitCloseNT,r)})),this)},undestroy:function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function errorOrDestroy(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit(\"error\",t)}}},919:function(e,t,r){var n=r(287).Buffer;function isSpecificValue(e){return e instanceof n||e instanceof Date||e instanceof RegExp}function cloneSpecificValue(e){if(e instanceof n){var t=n.alloc?n.alloc(e.length):new n(e.length);return e.copy(t),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error(\"Unexpected situation\")}function deepCloneArray(e){var t=[];return e.forEach((function(e,r){\"object\"==typeof e&&null!==e?Array.isArray(e)?t[r]=deepCloneArray(e):isSpecificValue(e)?t[r]=cloneSpecificValue(e):t[r]=a({},e):t[r]=e})),t}function safeGetProperty(e,t){return\"__proto__\"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||\"object\"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,r=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(n){\"object\"!=typeof n||null===n||Array.isArray(n)||Object.keys(n).forEach((function(o){return t=safeGetProperty(r,o),(e=safeGetProperty(n,o))===r?void 0:\"object\"!=typeof e||null===e?void(r[o]=e):Array.isArray(e)?void(r[o]=deepCloneArray(e)):isSpecificValue(e)?void(r[o]=cloneSpecificValue(e)):\"object\"!=typeof t||null===t||Array.isArray(t)?void(r[o]=a({},e)):void(r[o]=a(t,e))}))})),r}},955:function(e,t,r){var n,a=r(606);function _defineProperty(e,t,r){return(t=function _toPropertyKey(e){var t=function _toPrimitive(e,t){if(\"object\"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||\"default\");if(\"object\"!=typeof n)return n;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)}(e,\"string\");return\"symbol\"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(238),s=Symbol(\"lastResolve\"),l=Symbol(\"lastReject\"),i=Symbol(\"error\"),c=Symbol(\"ended\"),u=Symbol(\"lastPromise\"),d=Symbol(\"handlePromise\"),p=Symbol(\"stream\");function createIterResult(e,t){return{value:e,done:t}}function readAndResolve(e){var t=e[s];if(null!==t){var r=e[p].read();null!==r&&(e[u]=null,e[s]=null,e[l]=null,t(createIterResult(r,!1)))}}function onReadable(e){a.nextTick(readAndResolve,e)}var m=Object.getPrototypeOf((function(){})),f=Object.setPrototypeOf((_defineProperty(n={get stream(){return this[p]},next:function next(){var e=this,t=this[i];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(createIterResult(void 0,!0));if(this[p].destroyed)return new Promise((function(t,r){a.nextTick((function(){e[i]?r(e[i]):t(createIterResult(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(function wrapForNext(e,t){return function(r,n){e.then((function(){t[c]?r(createIterResult(void 0,!0)):t[d](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(createIterResult(o,!1));r=new Promise(this[d])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),_defineProperty(n,\"return\",(function _return(){var e=this;return new Promise((function(t,r){e[p].destroy(null,(function(e){e?r(e):t(createIterResult(void 0,!0))}))}))})),n),m);e.exports=function createReadableStreamAsyncIterator(e){var t,r=Object.create(f,(_defineProperty(t={},p,{value:e,writable:!0}),_defineProperty(t,s,{value:null,writable:!0}),_defineProperty(t,l,{value:null,writable:!0}),_defineProperty(t,i,{value:null,writable:!0}),_defineProperty(t,c,{value:e._readableState.endEmitted,writable:!0}),_defineProperty(t,d,{value:function value(e,t){var n=r[p].read();n?(r[u]=null,r[s]=null,r[l]=null,e(createIterResult(n,!1))):(r[s]=e,r[l]=t)},writable:!0}),t));return r[u]=null,o(e,(function(e){if(e&&\"ERR_STREAM_PREMATURE_CLOSE\"!==e.code){var t=r[l];return null!==t&&(r[u]=null,r[s]=null,r[l]=null,t(e)),void(r[i]=e)}var n=r[s];null!==n&&(r[u]=null,r[s]=null,r[l]=null,n(createIterResult(void 0,!0))),r[c]=!0})),e.on(\"readable\",onReadable.bind(null,r)),r}},987:function(e){e.exports=t}},Ce={};function __webpack_require__(e){var t=Ce[e];if(void 0!==t)return t.exports;var r=Ce[e]={exports:{}};return we[e](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var xe={};__webpack_require__.d(xe,{A:function(){return Zs}});var Oe={};__webpack_require__.r(Oe),__webpack_require__.d(Oe,{CLEAR:function(){return lt},CLEAR_BY:function(){return it},NEW_AUTH_ERR:function(){return st},NEW_SPEC_ERR:function(){return at},NEW_SPEC_ERR_BATCH:function(){return ot},NEW_THROWN_ERR:function(){return rt},NEW_THROWN_ERR_BATCH:function(){return nt},clear:function(){return clear},clearBy:function(){return clearBy},newAuthErr:function(){return newAuthErr},newSpecErr:function(){return newSpecErr},newSpecErrBatch:function(){return newSpecErrBatch},newThrownErr:function(){return newThrownErr},newThrownErrBatch:function(){return newThrownErrBatch}});var ke={};__webpack_require__.r(ke),__webpack_require__.d(ke,{AUTHORIZE:function(){return Nt},AUTHORIZE_OAUTH2:function(){return It},CONFIGURE_AUTH:function(){return jt},LOGOUT:function(){return At},RESTORE_AUTHORIZATION:function(){return Rt},SHOW_AUTH_POPUP:function(){return kt},authPopup:function(){return authPopup},authorize:function(){return authorize},authorizeAccessCodeWithBasicAuthentication:function(){return authorizeAccessCodeWithBasicAuthentication},authorizeAccessCodeWithFormParams:function(){return authorizeAccessCodeWithFormParams},authorizeApplication:function(){return authorizeApplication},authorizeOauth2:function(){return authorizeOauth2},authorizeOauth2WithPersistOption:function(){return authorizeOauth2WithPersistOption},authorizePassword:function(){return authorizePassword},authorizeRequest:function(){return authorizeRequest},authorizeWithPersistOption:function(){return authorizeWithPersistOption},configureAuth:function(){return configureAuth},logout:function(){return logout},logoutWithPersistOption:function(){return logoutWithPersistOption},persistAuthorizationIfNeeded:function(){return persistAuthorizationIfNeeded},preAuthorizeImplicit:function(){return preAuthorizeImplicit},restoreAuthorization:function(){return restoreAuthorization},showDefinitions:function(){return showDefinitions}});var Ne={};__webpack_require__.r(Ne),__webpack_require__.d(Ne,{authorized:function(){return qt},definitionsForRequirements:function(){return definitionsForRequirements},definitionsToAuthorize:function(){return Mt},getConfigs:function(){return Lt},getDefinitionsByNames:function(){return getDefinitionsByNames},isAuthorized:function(){return isAuthorized},selectAuthPath:function(){return selectAuthPath},shownDefinitions:function(){return Bt}});var Ae={};__webpack_require__.r(Ae),__webpack_require__.d(Ae,{TOGGLE_CONFIGS:function(){return zt},UPDATE_CONFIGS:function(){return Ft},downloadConfig:function(){return downloadConfig},getConfigByUrl:function(){return getConfigByUrl},loaded:function(){return actions_loaded},toggle:function(){return toggle},update:function(){return update}});var Ie={};__webpack_require__.r(Ie),__webpack_require__.d(Ie,{get:function(){return get}});var je={};__webpack_require__.r(je),__webpack_require__.d(je,{transform:function(){return transform}});var Re={};__webpack_require__.r(Re),__webpack_require__.d(Re,{transform:function(){return parameter_oneof_transform}});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{allErrors:function(){return rr},lastError:function(){return nr}});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{SHOW:function(){return ir},UPDATE_FILTER:function(){return sr},UPDATE_LAYOUT:function(){return or},UPDATE_MODE:function(){return lr},changeMode:function(){return changeMode},show:function(){return actions_show},updateFilter:function(){return updateFilter},updateLayout:function(){return updateLayout}});var Be={};__webpack_require__.r(Be),__webpack_require__.d(Be,{current:function(){return current},currentFilter:function(){return currentFilter},isShown:function(){return isShown},showSummary:function(){return ur},whatMode:function(){return whatMode}});var Me={};__webpack_require__.r(Me),__webpack_require__.d(Me,{taggedOperations:function(){return taggedOperations}});var qe={};__webpack_require__.r(qe),__webpack_require__.d(qe,{getActiveLanguage:function(){return mr},getDefaultExpanded:function(){return fr},getGenerators:function(){return pr},getSnippetGenerators:function(){return getSnippetGenerators}});var Le={};__webpack_require__.r(Le),__webpack_require__.d(Le,{JsonSchemaArrayItemFile:function(){return JsonSchemaArrayItemFile},JsonSchemaArrayItemText:function(){return JsonSchemaArrayItemText},JsonSchemaForm:function(){return JsonSchemaForm},JsonSchema_array:function(){return JsonSchema_array},JsonSchema_boolean:function(){return JsonSchema_boolean},JsonSchema_object:function(){return JsonSchema_object},JsonSchema_string:function(){return JsonSchema_string}});var Ue={};__webpack_require__.r(Ue),__webpack_require__.d(Ue,{allowTryItOutFor:function(){return allowTryItOutFor},basePath:function(){return ln},canExecuteScheme:function(){return canExecuteScheme},consumes:function(){return rn},consumesOptionsFor:function(){return consumesOptionsFor},contentTypeValues:function(){return contentTypeValues},currentProducesFor:function(){return currentProducesFor},definitions:function(){return sn},externalDocs:function(){return Xr},findDefinition:function(){return findDefinition},getOAS3RequiredRequestBodyContentType:function(){return getOAS3RequiredRequestBodyContentType},getParameter:function(){return getParameter},hasHost:function(){return yn},host:function(){return cn},info:function(){return Gr},isMediaTypeSchemaPropertiesEqual:function(){return isMediaTypeSchemaPropertiesEqual},isOAS3:function(){return Hr},lastError:function(){return Dr},mutatedRequestFor:function(){return mutatedRequestFor},mutatedRequests:function(){return gn},operationScheme:function(){return operationScheme},operationWithMeta:function(){return operationWithMeta},operations:function(){return tn},operationsWithRootInherited:function(){return dn},operationsWithTags:function(){return mn},parameterInclusionSettingFor:function(){return parameterInclusionSettingFor},parameterValues:function(){return parameterValues},parameterWithMeta:function(){return parameterWithMeta},parameterWithMetaByIdentity:function(){return parameterWithMetaByIdentity},parametersIncludeIn:function(){return parametersIncludeIn},parametersIncludeType:function(){return parametersIncludeType},paths:function(){return Zr},produces:function(){return nn},producesOptionsFor:function(){return producesOptionsFor},requestFor:function(){return requestFor},requests:function(){return hn},responseFor:function(){return responseFor},responses:function(){return fn},schemes:function(){return un},security:function(){return an},securityDefinitions:function(){return on},semver:function(){return Qr},spec:function(){return spec},specJS:function(){return zr},specJson:function(){return Fr},specJsonWithResolvedSubtrees:function(){return Wr},specResolved:function(){return Kr},specResolvedSubtree:function(){return specResolvedSubtree},specSource:function(){return Jr},specStr:function(){return Vr},tagDetails:function(){return tagDetails},taggedOperations:function(){return selectors_taggedOperations},tags:function(){return pn},url:function(){return $r},validOperationMethods:function(){return en},validateBeforeExecute:function(){return validateBeforeExecute},validationErrors:function(){return validationErrors},version:function(){return Yr}});var De={};__webpack_require__.r(De),__webpack_require__.d(De,{CLEAR_REQUEST:function(){return Tn},CLEAR_RESPONSE:function(){return Rn},CLEAR_VALIDATE_PARAMS:function(){return Pn},LOG_REQUEST:function(){return jn},SET_MUTATED_REQUEST:function(){return In},SET_REQUEST:function(){return An},SET_RESPONSE:function(){return Nn},SET_SCHEME:function(){return Ln},UPDATE_EMPTY_PARAM_INCLUSION:function(){return On},UPDATE_JSON:function(){return Cn},UPDATE_OPERATION_META_VALUE:function(){return Bn},UPDATE_PARAM:function(){return xn},UPDATE_RESOLVED:function(){return Mn},UPDATE_RESOLVED_SUBTREE:function(){return qn},UPDATE_SPEC:function(){return bn},UPDATE_URL:function(){return wn},VALIDATE_PARAMS:function(){return kn},changeConsumesValue:function(){return changeConsumesValue},changeParam:function(){return changeParam},changeParamByIdentity:function(){return changeParamByIdentity},changeProducesValue:function(){return changeProducesValue},clearRequest:function(){return clearRequest},clearResponse:function(){return clearResponse},clearValidateParams:function(){return clearValidateParams},execute:function(){return actions_execute},executeRequest:function(){return executeRequest},invalidateResolvedSubtreeCache:function(){return invalidateResolvedSubtreeCache},logRequest:function(){return logRequest},parseToJson:function(){return parseToJson},requestResolvedSubtree:function(){return requestResolvedSubtree},resolveSpec:function(){return resolveSpec},setMutatedRequest:function(){return setMutatedRequest},setRequest:function(){return setRequest},setResponse:function(){return setResponse},setScheme:function(){return setScheme},updateEmptyParamInclusion:function(){return updateEmptyParamInclusion},updateJsonSpec:function(){return updateJsonSpec},updateResolved:function(){return updateResolved},updateResolvedSubtree:function(){return updateResolvedSubtree},updateSpec:function(){return updateSpec},updateUrl:function(){return updateUrl},validateParams:function(){return validateParams}});var $e={};__webpack_require__.r($e),__webpack_require__.d($e,{executeRequest:function(){return wrap_actions_executeRequest},updateJsonSpec:function(){return wrap_actions_updateJsonSpec},updateSpec:function(){return wrap_actions_updateSpec},validateParams:function(){return wrap_actions_validateParams}});var Ve={};__webpack_require__.r(Ve),__webpack_require__.d(Ve,{Button:function(){return Button},Col:function(){return Col},Collapse:function(){return Collapse},Container:function(){return Container},Input:function(){return Input},Link:function(){return Link},Row:function(){return Row},Select:function(){return Select},TextArea:function(){return TextArea}});var Je={};__webpack_require__.r(Je),__webpack_require__.d(Je,{basePath:function(){return Ja},consumes:function(){return Fa},definitions:function(){return Ua},findDefinition:function(){return La},hasHost:function(){return Da},host:function(){return Va},produces:function(){return za},schemes:function(){return Ka},securityDefinitions:function(){return $a},validOperationMethods:function(){return wrap_selectors_validOperationMethods}});var Fe={};__webpack_require__.r(Fe),__webpack_require__.d(Fe,{definitionsToAuthorize:function(){return Wa}});var ze={};__webpack_require__.r(ze),__webpack_require__.d(ze,{callbacksOperations:function(){return Xa},findSchema:function(){return findSchema},isOAS3:function(){return selectors_isOAS3},isOAS30:function(){return selectors_isOAS30},isSwagger2:function(){return selectors_isSwagger2},servers:function(){return Ga}});var Ke={};__webpack_require__.r(Ke),__webpack_require__.d(Ke,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:function(){return yo},CLEAR_REQUEST_BODY_VALUE:function(){return Eo},SET_REQUEST_BODY_VALIDATE_ERROR:function(){return go},UPDATE_ACTIVE_EXAMPLES_MEMBER:function(){return po},UPDATE_REQUEST_BODY_INCLUSION:function(){return uo},UPDATE_REQUEST_BODY_VALUE:function(){return io},UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:function(){return co},UPDATE_REQUEST_CONTENT_TYPE:function(){return mo},UPDATE_RESPONSE_CONTENT_TYPE:function(){return fo},UPDATE_SELECTED_SERVER:function(){return lo},UPDATE_SERVER_VARIABLE_VALUE:function(){return ho},clearRequestBodyValidateError:function(){return clearRequestBodyValidateError},clearRequestBodyValue:function(){return clearRequestBodyValue},initRequestBodyValidateError:function(){return initRequestBodyValidateError},setActiveExamplesMember:function(){return setActiveExamplesMember},setRequestBodyInclusion:function(){return setRequestBodyInclusion},setRequestBodyValidateError:function(){return setRequestBodyValidateError},setRequestBodyValue:function(){return setRequestBodyValue},setRequestContentType:function(){return setRequestContentType},setResponseContentType:function(){return setResponseContentType},setRetainRequestBodyValueFlag:function(){return setRetainRequestBodyValueFlag},setSelectedServer:function(){return setSelectedServer},setServerVariableValue:function(){return setServerVariableValue}});var We={};__webpack_require__.r(We),__webpack_require__.d(We,{activeExamplesMember:function(){return Oo},hasUserEditedBody:function(){return wo},requestBodyErrors:function(){return xo},requestBodyInclusionSetting:function(){return Co},requestBodyValue:function(){return vo},requestContentType:function(){return ko},responseContentType:function(){return No},selectDefaultRequestBodyValue:function(){return selectDefaultRequestBodyValue},selectedServer:function(){return _o},serverEffectiveValue:function(){return jo},serverVariableValue:function(){return Ao},serverVariables:function(){return Io},shouldRetainRequestBodyValue:function(){return bo},validOperationMethods:function(){return To},validateBeforeExecute:function(){return Ro},validateShallowRequired:function(){return validateShallowRequired}});var He=function(e){var t={};return __webpack_require__.d(t,e),t}({Component:function(){return r.Component},PureComponent:function(){return r.PureComponent},createContext:function(){return r.createContext},createElement:function(){return r.createElement},default:function(){return r.default},forwardRef:function(){return r.forwardRef},useCallback:function(){return r.useCallback},useContext:function(){return r.useContext},useEffect:function(){return r.useEffect},useMemo:function(){return r.useMemo},useRef:function(){return r.useRef},useState:function(){return r.useState}}),Ge=function(e){var t={};return __webpack_require__.d(t,e),t}({applyMiddleware:function(){return n.applyMiddleware},bindActionCreators:function(){return n.bindActionCreators},compose:function(){return n.compose},createStore:function(){return n.createStore}}),Xe=function(e){var t={};return __webpack_require__.d(t,e),t}({List:function(){return a.List},Map:function(){return a.Map},OrderedMap:function(){return a.OrderedMap},Seq:function(){return a.Seq},Set:function(){return a.Set},default:function(){return a.default},fromJS:function(){return a.fromJS}}),Ye=__webpack_require__(919),Qe=__webpack_require__.n(Ye),Ze=function(e){var t={};return __webpack_require__.d(t,e),t}({combineReducers:function(){return o.combineReducers}}),et=function(e){var t={};return __webpack_require__.d(t,e),t}({serializeError:function(){return s.serializeError}}),tt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return l.default}});const rt=\"err_new_thrown_err\",nt=\"err_new_thrown_err_batch\",at=\"err_new_spec_err\",ot=\"err_new_spec_err_batch\",st=\"err_new_auth_err\",lt=\"err_clear\",it=\"err_clear_by\";function newThrownErr(e){return{type:rt,payload:(0,et.serializeError)(e)}}function newThrownErrBatch(e){return{type:nt,payload:e}}function newSpecErr(e){return{type:at,payload:e}}function newSpecErrBatch(e){return{type:ot,payload:e}}function newAuthErr(e){return{type:st,payload:e}}function clear(e={}){return{type:lt,payload:e}}function clearBy(e=()=>!0){return{type:it,payload:e}}var ct=function makeWindow(){var e={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return e;try{e=window;for(var t of[\"File\",\"Blob\",\"FormData\"])t in window&&(e[t]=window[t])}catch(e){console.error(e)}return e}(),ut=(function(e){var t={};__webpack_require__.d(t,e)}({}),function(e){var t={};__webpack_require__.d(t,e)}({}),function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return u.default}})),dt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return d.default}}),pt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return p.default}}),mt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return m.default}}),ht=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return f.default}}),gt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return h.default}}),yt=__webpack_require__(209),Et=__webpack_require__.n(yt),St=__webpack_require__(802),_t=__webpack_require__.n(St);const vt=Xe.default.Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(e,{isOAS3:t}={}){if(!Xe.default.Map.isMap(e))return{schema:Xe.default.Map(),parameterContentMediaType:null};if(!t)return\"body\"===e.get(\"in\")?{schema:e.get(\"schema\",Xe.default.Map()),parameterContentMediaType:null}:{schema:e.filter(((e,t)=>vt.includes(t))),parameterContentMediaType:null};if(e.get(\"content\")){const t=e.get(\"content\",Xe.default.Map({})).keySeq().first();return{schema:e.getIn([\"content\",t,\"schema\"],Xe.default.Map()),parameterContentMediaType:t}}return{schema:e.get(\"schema\")?e.get(\"schema\",Xe.default.Map()):Xe.default.Map(),parameterContentMediaType:null}}var bt=__webpack_require__(287).Buffer;const wt=\"default\",isImmutable=e=>Xe.default.Iterable.isIterable(e),immutableToJS=e=>isImmutable(e)?e.toJS():e;function objectify(e){return isObject(e)?immutableToJS(e):{}}function fromJSOrdered(e){if(isImmutable(e))return e;if(e instanceof ct.File)return e;if(!isObject(e))return e;if(Array.isArray(e))return Xe.default.Seq(e).map(fromJSOrdered).toList();if((0,ht.default)(e.entries)){const t=function createObjWithHashedKeys(e){if(!(0,ht.default)(e.entries))return e;const t={},r=\"_**[]\",n={};for(let a of e.entries())if(t[a[0]]||n[a[0]]&&n[a[0]].containsMultiple){if(!n[a[0]]){n[a[0]]={containsMultiple:!0,length:1},t[`${a[0]}${r}${n[a[0]].length}`]=t[a[0]],delete t[a[0]]}n[a[0]].length+=1,t[`${a[0]}${r}${n[a[0]].length}`]=a[1]}else t[a[0]]=a[1];return t}(e);return Xe.default.OrderedMap(t).map(fromJSOrdered)}return Xe.default.OrderedMap(e).map(fromJSOrdered)}function normalizeArray(e){return Array.isArray(e)?e:[e]}function isFn(e){return\"function\"==typeof e}function isObject(e){return!!e&&\"object\"==typeof e}function isFunc(e){return\"function\"==typeof e}function isArray(e){return Array.isArray(e)}const Ct=ut.default;function objMap(e,t){return Object.keys(e).reduce(((r,n)=>(r[n]=t(e[n],n),r)),{})}function objReduce(e,t){return Object.keys(e).reduce(((r,n)=>{let a=t(e[n],n);return a&&\"object\"==typeof a&&Object.assign(r,a),r}),{})}function systemThunkMiddleware(e){return({dispatch:t,getState:r})=>t=>r=>\"function\"==typeof r?r(e()):t(r)}function validateValueBySchema(e,t,r,n,a){if(!t)return[];let o=[],s=t.get(\"nullable\"),l=t.get(\"required\"),i=t.get(\"maximum\"),c=t.get(\"minimum\"),u=t.get(\"type\"),d=t.get(\"format\"),p=t.get(\"maxLength\"),m=t.get(\"minLength\"),f=t.get(\"uniqueItems\"),h=t.get(\"maxItems\"),g=t.get(\"minItems\"),y=t.get(\"pattern\");const S=r||!0===l,_=null!=e,v=S||_&&\"array\"===u||!(!S&&!_),b=s&&null===e;if(S&&!_&&!b&&!n&&!u)return o.push(\"Required field is not provided\"),o;if(b||!u||!v)return[];let w=\"string\"===u&&e,C=\"array\"===u&&Array.isArray(e)&&e.length,x=\"array\"===u&&Xe.default.List.isList(e)&&e.count();const O=[w,C,x,\"array\"===u&&\"string\"==typeof e&&e,\"file\"===u&&e instanceof ct.File,\"boolean\"===u&&(e||!1===e),\"number\"===u&&(e||0===e),\"integer\"===u&&(e||0===e),\"object\"===u&&\"object\"==typeof e&&null!==e,\"object\"===u&&\"string\"==typeof e&&e].some((e=>!!e));if(S&&!O&&!n)return o.push(\"Required field is not provided\"),o;if(\"object\"===u&&(null===a||\"application/json\"===a)){let r=e;if(\"string\"==typeof e)try{r=JSON.parse(e)}catch(e){return o.push(\"Parameter string value must be valid JSON\"),o}t&&t.has(\"required\")&&isFunc(l.isList)&&l.isList()&&l.forEach((e=>{void 0===r[e]&&o.push({propKey:e,error:\"Required property not found\"})})),t&&t.has(\"properties\")&&t.get(\"properties\").forEach(((e,t)=>{const s=validateValueBySchema(r[t],e,!1,n,a);o.push(...s.map((e=>({propKey:t,error:e}))))}))}if(y){let t=((e,t)=>{if(!new RegExp(t).test(e))return\"Value must follow pattern \"+t})(e,y);t&&o.push(t)}if(g&&\"array\"===u){let t=((e,t)=>{if(!e&&t>=1||e&&e.length<t)return`Array must contain at least ${t} item${1===t?\"\":\"s\"}`})(e,g);t&&o.push(t)}if(h&&\"array\"===u){let t=((e,t)=>{if(e&&e.length>t)return`Array must not contain more then ${t} item${1===t?\"\":\"s\"}`})(e,h);t&&o.push({needRemove:!0,error:t})}if(f&&\"array\"===u){let t=((e,t)=>{if(e&&(\"true\"===t||!0===t)){const t=(0,Xe.fromJS)(e),r=t.toSet();if(e.length>r.size){let e=(0,Xe.Set)();if(t.forEach(((r,n)=>{t.filter((e=>isFunc(e.equals)?e.equals(r):e===r)).size>1&&(e=e.add(n))})),0!==e.size)return e.map((e=>({index:e,error:\"No duplicates allowed.\"}))).toArray()}}})(e,f);t&&o.push(...t)}if(p||0===p){let t=((e,t)=>{if(e.length>t)return`Value must be no longer than ${t} character${1!==t?\"s\":\"\"}`})(e,p);t&&o.push(t)}if(m){let t=((e,t)=>{if(e.length<t)return`Value must be at least ${t} character${1!==t?\"s\":\"\"}`})(e,m);t&&o.push(t)}if(i||0===i){let t=((e,t)=>{if(e>t)return`Value must be less than or equal to ${t}`})(e,i);t&&o.push(t)}if(c||0===c){let t=((e,t)=>{if(e<t)return`Value must be greater than or equal to ${t}`})(e,c);t&&o.push(t)}if(\"string\"===u){let t;if(t=\"date-time\"===d?(e=>{if(isNaN(Date.parse(e)))return\"Value must be a DateTime\"})(e):\"uuid\"===d?(e=>{if(e=e.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e))return\"Value must be a Guid\"})(e):(e=>{if(e&&\"string\"!=typeof e)return\"Value must be a string\"})(e),!t)return o;o.push(t)}else if(\"boolean\"===u){let t=(e=>{if(\"true\"!==e&&\"false\"!==e&&!0!==e&&!1!==e)return\"Value must be a boolean\"})(e);if(!t)return o;o.push(t)}else if(\"number\"===u){let t=(e=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(e))return\"Value must be a number\"})(e);if(!t)return o;o.push(t)}else if(\"integer\"===u){let t=(e=>{if(!/^-?\\d+$/.test(e))return\"Value must be an integer\"})(e);if(!t)return o;o.push(t)}else if(\"array\"===u){if(!C&&!x)return o;e&&e.forEach(((e,r)=>{const s=validateValueBySchema(e,t.get(\"items\"),!1,n,a);o.push(...s.map((e=>({index:r,error:e}))))}))}else if(\"file\"===u){let t=(e=>{if(e&&!(e instanceof ct.File))return\"Value must be a file\"})(e);if(!t)return o;o.push(t)}return o}const btoa=e=>{let t;return t=e instanceof bt?e:bt.from(e.toString(),\"utf-8\"),t.toString(\"base64\")},xt={operationsSorter:{alpha:(e,t)=>e.get(\"path\").localeCompare(t.get(\"path\")),method:(e,t)=>e.get(\"method\").localeCompare(t.get(\"method\"))},tagsSorter:{alpha:(e,t)=>e.localeCompare(t)}},buildFormData=e=>{let t=[];for(let r in e){let n=e[r];void 0!==n&&\"\"!==n&&t.push([r,\"=\",encodeURIComponent(n).replace(/%20/g,\"+\")].join(\"\"))}return t.join(\"&\")},shallowEqualKeys=(e,t,r)=>!!(0,dt.default)(r,(r=>(0,mt.default)(e[r],t[r])));function requiresValidationURL(e){return!(!e||e.indexOf(\"localhost\")>=0||e.indexOf(\"127.0.0.1\")>=0||\"none\"===e)}const createDeepLinkPath=e=>\"string\"==typeof e||e instanceof String?e.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=e=>(0,gt.default)(createDeepLinkPath(e).replace(/%20/g,\"_\")),getExtensions=e=>{const t=/^x-/;return Xe.Map.isMap(e)?e.filter(((e,r)=>t.test(r))):Object.keys(e).filter((e=>t.test(e)))},getCommonExtensions=e=>e.filter(((e,t)=>/^pattern|maxLength|minLength|maximum|minimum/.test(t)));function deeplyStripKey(e,t,r=()=>!0){if(\"object\"!=typeof e||Array.isArray(e)||null===e||!t)return e;const n=Object.assign({},e);return Object.keys(n).forEach((e=>{e===t&&r(n[e],e)?delete n[e]:n[e]=deeplyStripKey(n[e],t,r)})),n}function stringify(e){if(\"string\"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),\"object\"==typeof e&&null!==e)try{return JSON.stringify(e,null,2)}catch(t){return String(e)}return null==e?\"\":e.toString()}function paramToIdentifier(e,{returnAll:t=!1,allowHashes:r=!0}={}){if(!Xe.default.Map.isMap(e))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const n=e.get(\"name\"),a=e.get(\"in\");let o=[];return e&&e.hashCode&&a&&n&&r&&o.push(`${a}.${n}.hash-${e.hashCode()}`),a&&n&&o.push(`${a}.${n}`),o.push(n),t?o:o[0]||\"\"}function paramToValue(e,t){return paramToIdentifier(e,{returnAll:!0}).map((e=>t[e])).filter((e=>void 0!==e))[0]}function b64toB64UrlEncoded(e){return e.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=e=>!e||!(!isImmutable(e)||!e.isEmpty()),idFn=e=>e;class Store{constructor(e={}){Qe()(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},e),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(e,t,r){return function createStoreWithMiddleware(e,t,r){let n=[systemThunkMiddleware(r)];const a=ct.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Ge.compose;return(0,Ge.createStore)(e,t,a((0,Ge.applyMiddleware)(...n)))}(e,t,r)}(idFn,(0,Xe.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(e,t=!0){var r=combinePlugins(e,this.getSystem());systemExtend(this.system,r),t&&this.buildSystem();callAfterLoad.call(this.system,e,this.getSystem())&&this.buildSystem()}buildSystem(e=!0){let t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getWrappedAndBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:Xe.default,React:He.default},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(e){this.system.configs=e}rebuildReducer(){this.store.replaceReducer(function buildReducer(e,t){return function allReducers(e,t){let r=Object.keys(e).reduce(((r,n)=>(r[n]=function makeReducer(e,t){return(r=new Xe.Map,n)=>{if(!e)return r;let a=e[n.type];if(a){const e=wrapWithTryCatch(a,t)(r,n);return null===e?r:e}return r}}(e[n],t),r)),{});if(!Object.keys(r).length)return idFn;return(0,Ze.combineReducers)(r)}(objMap(e,(e=>e.reducers)),t)}(this.system.statePlugins,this.getSystem))}getType(e){let t=e[0].toUpperCase()+e.slice(1);return objReduce(this.system.statePlugins,((r,n)=>{let a=r[e];if(a)return{[n+t]:a}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(e=>objReduce(e,((e,t)=>{if(isFn(e))return{[t]:e}}))))}getWrappedAndBoundActions(e){return objMap(this.getBoundActions(e),((e,t)=>{let r=this.system.statePlugins[t.slice(0,-7)].wrapActions;return r?objMap(e,((e,t)=>{let n=r[t];return n?(Array.isArray(n)||(n=[n]),n.reduce(((e,t)=>{let newAction=(...r)=>t(e,this.getSystem())(...r);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction,this.getSystem)}),e||Function.prototype)):e})):e}))}getWrappedAndBoundSelectors(e,t){return objMap(this.getBoundSelectors(e,t),((t,r)=>{let n=[r.slice(0,-9)],a=this.system.statePlugins[n].wrapSelectors;return a?objMap(t,((t,r)=>{let o=a[r];return o?(Array.isArray(o)||(o=[o]),o.reduce(((t,r)=>{let wrappedSelector=(...a)=>r(t,this.getSystem())(e().getIn(n),...a);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),t||Function.prototype)):t})):t}))}getStates(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=e.get(r),t)),{})}getStateThunks(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=()=>e().get(r),t)),{})}getFn(){return{fn:this.system.fn}}getComponents(e){const t=this.system.components[e];return Array.isArray(t)?t.reduce(((e,t)=>t(e,this.getSystem()))):void 0!==e?this.system.components[e]:this.system.components}getBoundSelectors(e,t){return objMap(this.getSelectors(),((r,n)=>{let a=[n.slice(0,-9)];return objMap(r,(r=>(...n)=>{let o=wrapWithTryCatch(r,this.getSystem).apply(null,[e().getIn(a),...n]);return\"function\"==typeof o&&(o=wrapWithTryCatch(o,this.getSystem)(t())),o}))}))}getBoundActions(e){e=e||this.getStore().dispatch;const t=this.getActions(),process=e=>\"function\"!=typeof e?objMap(e,(e=>process(e))):(...t)=>{var r=null;try{r=e(...t)}catch(e){r={type:rt,error:!0,payload:(0,et.serializeError)(e)}}finally{return r}};return objMap(t,(t=>(0,Ge.bindActionCreators)(process(t),e)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(e){return t=>Qe()({},this.getWrappedAndBoundActions(t),this.getFn(),e)}}function combinePlugins(e,t){return isObject(e)&&!isArray(e)?(0,tt.default)({},e):isFunc(e)?combinePlugins(e(t),t):isArray(e)?e.map((e=>combinePlugins(e,t))).reduce(systemExtend,{components:t.getComponents()}):{}}function callAfterLoad(e,t,{hasLoaded:r}={}){let n=r;return isObject(e)&&!isArray(e)&&\"function\"==typeof e.afterLoad&&(n=!0,wrapWithTryCatch(e.afterLoad,t.getSystem).call(this,t)),isFunc(e)?callAfterLoad.call(this,e(t),t,{hasLoaded:n}):isArray(e)?e.map((e=>callAfterLoad.call(this,e,t,{hasLoaded:n}))):n}function systemExtend(e={},t={}){if(!isObject(e))return{};if(!isObject(t))return e;t.wrapComponents&&(objMap(t.wrapComponents,((r,n)=>{const a=e.components&&e.components[n];a&&Array.isArray(a)?(e.components[n]=a.concat([r]),delete t.wrapComponents[n]):a&&(e.components[n]=[a,r],delete t.wrapComponents[n])})),Object.keys(t.wrapComponents).length||delete t.wrapComponents);const{statePlugins:r}=e;if(isObject(r))for(let e in r){const n=r[e];if(!isObject(n))continue;const{wrapActions:a,wrapSelectors:o}=n;if(isObject(a))for(let r in a){let n=a[r];Array.isArray(n)||(n=[n],a[r]=n),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapActions&&t.statePlugins[e].wrapActions[r]&&(t.statePlugins[e].wrapActions[r]=a[r].concat(t.statePlugins[e].wrapActions[r]))}if(isObject(o))for(let r in o){let n=o[r];Array.isArray(n)||(n=[n],o[r]=n),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapSelectors&&t.statePlugins[e].wrapSelectors[r]&&(t.statePlugins[e].wrapSelectors[r]=o[r].concat(t.statePlugins[e].wrapSelectors[r]))}}return Qe()(e,t)}function wrapWithTryCatch(e,t,{logErrors:r=!0}={}){return\"function\"!=typeof e?e:function(...n){try{return e.call(this,...n)}catch(e){if(r){const{uncaughtExceptionHandler:r}=t().getConfigs();\"function\"==typeof r?r(e):console.error(e)}return null}}}var Ot=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return g.default}});const kt=\"show_popup\",Nt=\"authorize\",At=\"logout\",It=\"authorize_oauth2\",jt=\"configure_auth\",Rt=\"restore_authorization\";function showDefinitions(e){return{type:kt,payload:e}}function authorize(e){return{type:Nt,payload:e}}const authorizeWithPersistOption=e=>({authActions:t})=>{t.authorize(e),t.persistAuthorizationIfNeeded()};function logout(e){return{type:At,payload:e}}const logoutWithPersistOption=e=>({authActions:t})=>{t.logout(e),t.persistAuthorizationIfNeeded()},preAuthorizeImplicit=e=>({authActions:t,errActions:r})=>{let{auth:n,token:a,isValid:o}=e,{schema:s,name:l}=n,i=s.get(\"flow\");delete ct.swaggerUIRedirectOauth2,\"accessCode\"===i||o||r.newAuthErr({authId:l,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),a.error?r.newAuthErr({authId:l,source:\"auth\",level:\"error\",message:JSON.stringify(a)}):t.authorizeOauth2WithPersistOption({auth:n,token:a})};function authorizeOauth2(e){return{type:It,payload:e}}const authorizeOauth2WithPersistOption=e=>({authActions:t})=>{t.authorizeOauth2(e),t.persistAuthorizationIfNeeded()},authorizePassword=e=>({authActions:t})=>{let{schema:r,name:n,username:a,password:o,passwordType:s,clientId:l,clientSecret:i}=e,c={grant_type:\"password\",scope:e.scopes.join(\" \"),username:a,password:o},u={};switch(s){case\"request-body\":!function setClientIdAndSecret(e,t,r){t&&Object.assign(e,{client_id:t});r&&Object.assign(e,{client_secret:r})}(c,l,i);break;case\"basic\":u.Authorization=\"Basic \"+btoa(l+\":\"+i);break;default:console.warn(`Warning: invalid passwordType ${s} was passed, not including client id and secret`)}return t.authorizeRequest({body:buildFormData(c),url:r.get(\"tokenUrl\"),name:n,headers:u,query:{},auth:e})};const authorizeApplication=e=>({authActions:t})=>{let{schema:r,scopes:n,name:a,clientId:o,clientSecret:s}=e,l={Authorization:\"Basic \"+btoa(o+\":\"+s)},i={grant_type:\"client_credentials\",scope:n.join(\" \")};return t.authorizeRequest({body:buildFormData(i),name:a,url:r.get(\"tokenUrl\"),auth:e,headers:l})},authorizeAccessCodeWithFormParams=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:n,name:a,clientId:o,clientSecret:s,codeVerifier:l}=e,i={grant_type:\"authorization_code\",code:e.code,client_id:o,client_secret:s,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(i),name:a,url:n.get(\"tokenUrl\"),auth:e})},authorizeAccessCodeWithBasicAuthentication=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:n,name:a,clientId:o,clientSecret:s,codeVerifier:l}=e,i={Authorization:\"Basic \"+btoa(o+\":\"+s)},c={grant_type:\"authorization_code\",code:e.code,client_id:o,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(c),name:a,url:n.get(\"tokenUrl\"),auth:e,headers:i})},authorizeRequest=e=>({fn:t,getConfigs:r,authActions:n,errActions:a,oas3Selectors:o,specSelectors:s,authSelectors:l})=>{let i,{body:c,query:u={},headers:d={},name:p,url:m,auth:f}=e,{additionalQueryStringParams:h}=l.getConfigs()||{};if(s.isOAS3()){let e=o.serverEffectiveValue(o.selectedServer());i=(0,Ot.default)(m,e,!0)}else i=(0,Ot.default)(m,s.url(),!0);\"object\"==typeof h&&(i.query=Object.assign({},i.query,h));const g=i.toString();let y=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},d);t.fetch({url:g,method:\"post\",headers:y,query:u,body:c,requestInterceptor:r().requestInterceptor,responseInterceptor:r().responseInterceptor}).then((function(e){let t=JSON.parse(e.data),r=t&&(t.error||\"\"),o=t&&(t.parseError||\"\");e.ok?r||o?a.newAuthErr({authId:p,level:\"error\",source:\"auth\",message:JSON.stringify(t)}):n.authorizeOauth2WithPersistOption({auth:f,token:t}):a.newAuthErr({authId:p,level:\"error\",source:\"auth\",message:e.statusText})})).catch((e=>{let t=new Error(e).message;if(e.response&&e.response.data){const r=e.response.data;try{const e=\"string\"==typeof r?JSON.parse(r):r;e.error&&(t+=`, error: ${e.error}`),e.error_description&&(t+=`, description: ${e.error_description}`)}catch(e){}}a.newAuthErr({authId:p,level:\"error\",source:\"auth\",message:t})}))};function configureAuth(e){return{type:jt,payload:e}}function restoreAuthorization(e){return{type:Rt,payload:e}}const persistAuthorizationIfNeeded=()=>({authSelectors:e,getConfigs:t})=>{if(!t().persistAuthorization)return;const r=e.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(r))},authPopup=(e,t)=>()=>{ct.swaggerUIRedirectOauth2=t,ct.open(e)};var Tt={[kt]:(e,{payload:t})=>e.set(\"showDefinitions\",t),[Nt]:(e,{payload:t})=>{let r=(0,Xe.fromJS)(t),n=e.get(\"authorized\")||(0,Xe.Map)();return r.entrySeq().forEach((([t,r])=>{if(!isFunc(r.getIn))return e.set(\"authorized\",n);let a=r.getIn([\"schema\",\"type\"]);if(\"apiKey\"===a||\"http\"===a)n=n.set(t,r);else if(\"basic\"===a){let e=r.getIn([\"value\",\"username\"]),a=r.getIn([\"value\",\"password\"]);n=n.setIn([t,\"value\"],{username:e,header:\"Basic \"+btoa(e+\":\"+a)}),n=n.setIn([t,\"schema\"],r.get(\"schema\"))}})),e.set(\"authorized\",n)},[It]:(e,{payload:t})=>{let r,{auth:n,token:a}=t;n.token=Object.assign({},a),r=(0,Xe.fromJS)(n);let o=e.get(\"authorized\")||(0,Xe.Map)();return o=o.set(r.get(\"name\"),r),e.set(\"authorized\",o)},[At]:(e,{payload:t})=>{let r=e.get(\"authorized\").withMutations((e=>{t.forEach((t=>{e.delete(t)}))}));return e.set(\"authorized\",r)},[jt]:(e,{payload:t})=>e.set(\"configs\",t),[Rt]:(e,{payload:t})=>e.set(\"authorized\",(0,Xe.fromJS)(t.authorized))},Pt=function(e){var t={};return __webpack_require__.d(t,e),t}({createSelector:function(){return y.createSelector}});const state=e=>e,Bt=(0,Pt.createSelector)(state,(e=>e.get(\"showDefinitions\"))),Mt=(0,Pt.createSelector)(state,(()=>({specSelectors:e})=>{let t=e.securityDefinitions()||(0,Xe.Map)({}),r=(0,Xe.List)();return t.entrySeq().forEach((([e,t])=>{let n=(0,Xe.Map)();n=n.set(e,t),r=r.push(n)})),r})),selectAuthPath=(e,t)=>({specSelectors:e})=>(0,Xe.List)(e.isOAS3()?[\"components\",\"securitySchemes\",t]:[\"securityDefinitions\",t]),getDefinitionsByNames=(e,t)=>({specSelectors:e})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let r=e.securityDefinitions(),n=(0,Xe.List)();return t.valueSeq().forEach((e=>{let t=(0,Xe.Map)();e.entrySeq().forEach((([e,n])=>{let a,o=r.get(e);\"oauth2\"===o.get(\"type\")&&n.size&&(a=o.get(\"scopes\"),a.keySeq().forEach((e=>{n.contains(e)||(a=a.delete(e))})),o=o.set(\"allowedScopes\",a)),t=t.set(e,o)})),n=n.push(t)})),n},definitionsForRequirements=(e,t=(0,Xe.List)())=>({authSelectors:e})=>{const r=e.definitionsToAuthorize()||(0,Xe.List)();let n=(0,Xe.List)();return r.forEach((e=>{let r=t.find((t=>t.get(e.keySeq().first())));r&&(e.forEach(((t,n)=>{if(\"oauth2\"===t.get(\"type\")){const a=r.get(n);let o=t.get(\"scopes\");Xe.List.isList(a)&&Xe.Map.isMap(o)&&(o.keySeq().forEach((e=>{a.contains(e)||(o=o.delete(e))})),e=e.set(n,t.set(\"scopes\",o)))}})),n=n.push(e))})),n},qt=(0,Pt.createSelector)(state,(e=>e.get(\"authorized\")||(0,Xe.Map)())),isAuthorized=(e,t)=>({authSelectors:e})=>{let r=e.authorized();return Xe.List.isList(t)?!!t.toJS().filter((e=>-1===Object.keys(e).map((e=>!!r.get(e))).indexOf(!1))).length:null},Lt=(0,Pt.createSelector)(state,(e=>e.get(\"configs\"))),execute=(e,{authSelectors:t,specSelectors:r})=>({path:n,method:a,operation:o,extras:s})=>{let l={authorized:t.authorized()&&t.authorized().toJS(),definitions:r.securityDefinitions()&&r.securityDefinitions().toJS(),specSecurity:r.security()&&r.security().toJS()};return e({path:n,method:a,operation:o,securities:l,...s})},loaded=(e,t)=>r=>{const{getConfigs:n,authActions:a}=t,o=n();if(e(r),o.persistAuthorization){const e=localStorage.getItem(\"authorized\");e&&a.restoreAuthorization({authorized:JSON.parse(e)})}},wrap_actions_authorize=(e,t)=>r=>{e(r);if(t.getConfigs().persistAuthorization)try{const[{schema:e,value:t}]=Object.values(r),n=\"apiKey\"===e.get(\"type\"),a=\"cookie\"===e.get(\"in\");n&&a&&(document.cookie=`${e.get(\"name\")}=${t}; SameSite=None; Secure`)}catch(e){console.error(\"Error persisting cookie based apiKey in document.cookie.\",e)}},wrap_actions_logout=(e,t)=>r=>{const n=t.getConfigs(),a=t.authSelectors.authorized();try{n.persistAuthorization&&Array.isArray(r)&&r.forEach((e=>{const t=a.get(e,{}),r=\"apiKey\"===t.getIn([\"schema\",\"type\"]),n=\"cookie\"===t.getIn([\"schema\",\"in\"]);if(r&&n){const e=t.getIn([\"schema\",\"name\"]);document.cookie=`${e}=; Max-Age=-99999999`}}))}catch(e){console.error(\"Error deleting cookie based apiKey from document.cookie.\",e)}e(r)};var Ut=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return S.default}}),Dt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return _.default}});class LockAuthIcon extends He.default.Component{mapStateToProps(e,t){return{state:e,ownProps:(0,Dt.default)(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"LockIcon\");return He.default.createElement(r,t)}}var $t=LockAuthIcon;class UnlockAuthIcon extends He.default.Component{mapStateToProps(e,t){return{state:e,ownProps:(0,Dt.default)(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"UnlockIcon\");return He.default.createElement(r,t)}}var Vt=UnlockAuthIcon;function auth(){return{afterLoad(e){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=e.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,e),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,e)},components:{LockAuthIcon:$t,UnlockAuthIcon:Vt,LockAuthOperationIcon:$t,UnlockAuthOperationIcon:Vt},statePlugins:{auth:{reducers:Tt,actions:ke,selectors:Ne,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(e,t,r,n){const{authActions:{authorize:a},specSelectors:{specJson:o,isOAS3:s}}=e,l=s()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],i=o().getIn([...l,t]);return i?a({[t]:{value:{username:r,password:n},schema:i.toJS()}}):null}function preauthorizeApiKey(e,t,r){const{authActions:{authorize:n},specSelectors:{specJson:a,isOAS3:o}}=e,s=o()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],l=a().getIn([...s,t]);return l?n({[t]:{value:r,schema:l.toJS()}}):null}var Jt=function(e){var t={};return __webpack_require__.d(t,e),t}({JSON_SCHEMA:function(){return v.JSON_SCHEMA},default:function(){return v.default}});const Ft=\"configs_update\",zt=\"configs_toggle\";function update(e,t){return{type:Ft,payload:{[e]:t}}}function toggle(e){return{type:zt,payload:e}}const actions_loaded=()=>()=>{},downloadConfig=e=>t=>{const{fn:{fetch:r}}=t;return r(e)},getConfigByUrl=(e,t)=>r=>{const{specActions:n,configsActions:a}=r;if(e)return a.downloadConfig(e).then(next,next);function next(a){a instanceof Error||a.status>=400?(n.updateLoadingStatus(\"failedConfig\"),n.updateLoadingStatus(\"failedConfig\"),n.updateUrl(\"\"),console.error(a.statusText+\" \"+e.url),t(null)):t(((e,t)=>{try{return Jt.default.load(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}})(a.text,r))}},get=(e,t)=>e.getIn(Array.isArray(t)?t:[t]);var Kt={[Ft]:(e,t)=>e.merge((0,Xe.fromJS)(t.payload)),[zt]:(e,t)=>{const r=t.payload,n=e.get(r);return e.set(r,!n)}};function configsPlugin(){return{statePlugins:{configs:{reducers:Kt,actions:Ae,selectors:Ie}}}}const setHash=e=>e?history.pushState(null,null,`#${e}`):window.location.hash=\"\";var Wt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return b.default}});const Ht=\"layout_scroll_to\",Gt=\"layout_clear_scroll\";var Xt={fn:{getScrollParent:function getScrollParent(e,t){const r=document.documentElement;let n=getComputedStyle(e);const a=\"absolute\"===n.position,o=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===n.position)return r;for(let t=e;t=t.parentElement;)if(n=getComputedStyle(t),(!a||\"static\"!==n.position)&&o.test(n.overflow+n.overflowY+n.overflowX))return t;return r}},statePlugins:{layout:{actions:{scrollToElement:(e,t)=>r=>{try{t=t||r.fn.getScrollParent(e),Wt.default.createScroller(t).to(e)}catch(e){console.error(e)}},scrollTo:e=>({type:Ht,payload:Array.isArray(e)?e:[e]}),clearScrollTo:()=>({type:Gt}),readyToScroll:(e,t)=>r=>{const n=r.layoutSelectors.getScrollToKey();Xe.default.is(n,(0,Xe.fromJS)(e))&&(r.layoutActions.scrollToElement(t),r.layoutActions.clearScrollTo())},parseDeepLinkHash:e=>({layoutActions:t,layoutSelectors:r,getConfigs:n})=>{if(n().deepLinking&&e){let n=e.slice(1);\"!\"===n[0]&&(n=n.slice(1)),\"/\"===n[0]&&(n=n.slice(1));const a=n.split(\"/\").map((e=>e||\"\")),o=r.isShownKeyFromUrlHashArray(a),[s,l=\"\",i=\"\"]=o;if(\"operations\"===s){const e=r.isShownKeyFromUrlHashArray([l]);l.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(e.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(e,!0)}(l.indexOf(\"_\")>-1||i.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(o.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(o,!0),t.scrollTo(o)}}},selectors:{getScrollToKey:e=>e.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(e,t){const[r,n]=t;return n?[\"operations\",r,n]:r?[\"operations-tag\",r]:[]},urlHashArrayFromIsShownKey(e,t){let[r,n,a]=t;return\"operations\"==r?[n,a]:\"operations-tag\"==r?[n]:[]}},reducers:{[Ht]:(e,t)=>e.set(\"scrollToKey\",Xe.default.fromJS(t.payload)),[Gt]:e=>e.delete(\"scrollToKey\")},wrapActions:{show:(e,{getConfigs:t,layoutSelectors:r})=>(...n)=>{if(e(...n),t().deepLinking)try{let[e,t]=n;e=Array.isArray(e)?e:[e];const a=r.urlHashArrayFromIsShownKey(e);if(!a.length)return;const[o,s]=a;if(!t)return setHash(\"/\");2===a.length?setHash(createDeepLinkPath(`/${encodeURIComponent(o)}/${encodeURIComponent(s)}`)):1===a.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(o)}`))}catch(e){console.error(e)}}}}}},Yt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return w.default}});var operation_wrapper=(e,t)=>class OperationWrapper extends He.default.Component{onLoad=e=>{const{operation:r}=this.props,{tag:n,operationId:a}=r.toObject();let{isShownKey:o}=r.toObject();o=o||[\"operations\",n,a],t.layoutActions.readyToScroll(o,e)};render(){return He.default.createElement(\"span\",{ref:this.onLoad},He.default.createElement(e,this.props))}};var operation_tag_wrapper=(e,t)=>class OperationTagWrapper extends He.default.Component{onLoad=e=>{const{tag:r}=this.props,n=[\"operations-tag\",r];t.layoutActions.readyToScroll(n,e)};render(){return He.default.createElement(\"span\",{ref:this.onLoad},He.default.createElement(e,this.props))}};function deep_linking(){return[Xt,{statePlugins:{configs:{wrapActions:{loaded:(e,t)=>(...r)=>{e(...r);const n=decodeURIComponent(window.location.hash);t.layoutActions.parseDeepLinkHash(n)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}var Qt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return C.default}});function transform(e){return e.map((e=>{let t=\"is not of a type(s)\",r=e.get(\"message\").indexOf(t);if(r>-1){let t=e.get(\"message\").slice(r+19).split(\",\");return e.set(\"message\",e.get(\"message\").slice(0,r)+function makeNewMessage(e){return e.reduce(((e,t,r,n)=>r===n.length-1&&n.length>1?e+\"or \"+t:n[r+1]&&n.length>2?e+t+\", \":n[r+1]?e+t+\" \":e+t),\"should be a\")}(t))}return e}))}var Zt=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return x.default}});function parameter_oneof_transform(e,{jsSpec:t}){return e}const er=[je,Re];function transformErrors(e){let t={jsSpec:{}},r=(0,Qt.default)(er,((e,r)=>{try{return r.transform(e,t).filter((e=>!!e))}catch(t){return console.error(\"Transformer error:\",t),e}}),e);return r.filter((e=>!!e)).map((e=>(!e.get(\"line\")&&e.get(\"path\"),e)))}let tr={line:0,level:\"error\",message:\"Unknown error\"};const rr=(0,Pt.createSelector)((e=>e),(e=>e.get(\"errors\",(0,Xe.List)()))),nr=(0,Pt.createSelector)(rr,(e=>e.last()));function err(e){return{statePlugins:{err:{reducers:{[rt]:(e,{payload:t})=>{let r=Object.assign(tr,t,{type:\"thrown\"});return e.update(\"errors\",(e=>(e||(0,Xe.List)()).push((0,Xe.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[nt]:(e,{payload:t})=>(t=t.map((e=>(0,Xe.fromJS)(Object.assign(tr,e,{type:\"thrown\"})))),e.update(\"errors\",(e=>(e||(0,Xe.List)()).concat((0,Xe.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[at]:(e,{payload:t})=>{let r=(0,Xe.fromJS)(t);return r=r.set(\"type\",\"spec\"),e.update(\"errors\",(e=>(e||(0,Xe.List)()).push((0,Xe.fromJS)(r)).sortBy((e=>e.get(\"line\"))))).update(\"errors\",(e=>transformErrors(e)))},[ot]:(e,{payload:t})=>(t=t.map((e=>(0,Xe.fromJS)(Object.assign(tr,e,{type:\"spec\"})))),e.update(\"errors\",(e=>(e||(0,Xe.List)()).concat((0,Xe.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[st]:(e,{payload:t})=>{let r=(0,Xe.fromJS)(Object.assign({},t));return r=r.set(\"type\",\"auth\"),e.update(\"errors\",(e=>(e||(0,Xe.List)()).push((0,Xe.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[lt]:(e,{payload:t})=>{if(!t||!e.get(\"errors\"))return e;let r=e.get(\"errors\").filter((e=>e.keySeq().every((r=>{const n=e.get(r),a=t[r];return!a||n!==a}))));return e.merge({errors:r})},[it]:(e,{payload:t})=>{if(!t||\"function\"!=typeof t)return e;let r=e.get(\"errors\").filter((e=>t(e)));return e.merge({errors:r})}},actions:Oe,selectors:Te}}}}function opsFilter(e,t){return e.filter(((e,r)=>-1!==r.indexOf(t)))}function filter(){return{fn:{opsFilter}}}var ar=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return O.default}});var arrow_up=({className:e=null,width:t=20,height:r=20,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"}));var arrow_down=({className:e=null,width:t=20,height:r=20,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"}));var arrow=({className:e=null,width:t=20,height:r=20,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"}));var components_close=({className:e=null,width:t=20,height:r=20,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"}));var copy=({className:e=null,width:t=15,height:r=16,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"g\",{transform:\"translate(2, -1)\"},He.default.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"})));var lock=({className:e=null,width:t=20,height:r=20,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"}));var unlock=({className:e=null,width:t=20,height:r=20,...n})=>He.default.createElement(\"svg\",(0,ar.default)({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},n),He.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"}));var icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}});const or=\"layout_update_layout\",sr=\"layout_update_filter\",lr=\"layout_update_mode\",ir=\"layout_show\";function updateLayout(e){return{type:or,payload:e}}function updateFilter(e){return{type:sr,payload:e}}function actions_show(e,t=!0){return e=normalizeArray(e),{type:ir,payload:{thing:e,shown:t}}}function changeMode(e,t=\"\"){return e=normalizeArray(e),{type:lr,payload:{thing:e,mode:t}}}var cr={[or]:(e,t)=>e.set(\"layout\",t.payload),[sr]:(e,t)=>e.set(\"filter\",t.payload),[ir]:(e,t)=>{const r=t.payload.shown,n=(0,Xe.fromJS)(t.payload.thing);return e.update(\"shown\",(0,Xe.fromJS)({}),(e=>e.set(n,r)))},[lr]:(e,t)=>{let r=t.payload.thing,n=t.payload.mode;return e.setIn([\"modes\"].concat(r),(n||\"\")+\"\")}};const current=e=>e.get(\"layout\"),currentFilter=e=>e.get(\"filter\"),isShown=(e,t,r)=>(t=normalizeArray(t),e.get(\"shown\",(0,Xe.fromJS)({})).get((0,Xe.fromJS)(t),r)),whatMode=(e,t,r=\"\")=>(t=normalizeArray(t),e.getIn([\"modes\",...t],r)),ur=(0,Pt.createSelector)((e=>e),(e=>!isShown(e,\"editor\"))),taggedOperations=(e,t)=>(r,...n)=>{let a=e(r,...n);const{fn:o,layoutSelectors:s,getConfigs:l}=t.getSystem(),i=l(),{maxDisplayedTags:c}=i;let u=s.currentFilter();return u&&!0!==u&&(a=o.opsFilter(a,u)),c>=0&&(a=a.slice(0,c)),a};function plugins_layout(){return{statePlugins:{layout:{reducers:cr,actions:Pe,selectors:Be},spec:{wrapSelectors:Me}}}}function logs({configs:e}){const t={debug:0,info:1,log:2,warn:3,error:4},getLevel=e=>t[e]||-1;let{logLevel:r}=e,n=getLevel(r);function log(e,...t){getLevel(e)>=n&&console[e](...t)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let dr=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:e=>(...t)=>(dr=!0,e(...t)),updateJsonSpec:(e,t)=>(...r)=>{const n=t.getConfigs().onComplete;return dr&&\"function\"==typeof n&&(setTimeout(n,0),dr=!1),e(...r)}}}}}}const extractKey=e=>{const t=\"_**[]\";return e.indexOf(t)<0?e:e.split(t)[0].trim()},escapeShell=e=>\"-d \"===e||/^[_\\/-]/g.test(e)?e:\"'\"+e.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=e=>\"-d \"===(e=e.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?e.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(e)?e:'\"'+e+'\"',escapePowershell=e=>{if(\"-d \"===e)return e;if(/\\n/.test(e)){return`@\"\\n${e.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(e)){return`'${e.replace(/'/g,\"''\")}'`}return e};const curlify=(e,t,r,n=\"\")=>{let a=!1,o=\"\";const addWords=(...e)=>o+=\" \"+e.map(t).join(\" \"),addWordsWithoutLeadingSpace=(...e)=>o+=e.map(t).join(\" \"),addNewLine=()=>o+=` ${r}`,addIndent=(e=1)=>o+=\"  \".repeat(e);let s=e.get(\"headers\");o+=\"curl\"+n;const l=e.get(\"curlOptions\");if(Xe.List.isList(l)&&!l.isEmpty()&&addWords(...e.get(\"curlOptions\")),addWords(\"-X\",e.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${e.get(\"url\")}`),s&&s.size)for(let t of e.get(\"headers\").entries()){addNewLine(),addIndent();let[e,r]=t;addWordsWithoutLeadingSpace(\"-H\",`${e}: ${r}`),a=a||/^content-type$/i.test(e)&&/^multipart\\/form-data$/i.test(r)}const i=e.get(\"body\");if(i)if(a&&[\"POST\",\"PUT\",\"PATCH\"].includes(e.get(\"method\")))for(let[e,t]of i.entrySeq()){let r=extractKey(e);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),t instanceof ct.File&&\"string\"==typeof t.valueOf()?addWords(`${r}=${t.data}${t.type?`;type=${t.type}`:\"\"}`):t instanceof ct.File?addWords(`${r}=@${t.name}${t.type?`;type=${t.type}`:\"\"}`):addWords(`${r}=${t}`)}else if(i instanceof ct.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${i.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let t=i;Xe.Map.isMap(t)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(e){let t=[];for(let[r,n]of e.get(\"body\").entrySeq()){let e=extractKey(r);n instanceof ct.File?t.push(`  \"${e}\": {\\n    \"name\": \"${n.name}\"${n.type?`,\\n    \"type\": \"${n.type}\"`:\"\"}\\n  }`):t.push(`  \"${e}\": ${JSON.stringify(n,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${t.join(\",\\n\")}\\n}`}(e)):(\"string\"!=typeof t&&(t=JSON.stringify(t)),addWordsWithoutLeadingSpace(t))}else i||\"POST\"!==e.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return o},requestSnippetGenerator_curl_powershell=e=>curlify(e,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=e=>curlify(e,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=e=>curlify(e,escapeCMD,\"^\\n\"),request_snippets_selectors_state=e=>e||(0,Xe.Map)(),pr=(0,Pt.createSelector)(request_snippets_selectors_state,(e=>{const t=e.get(\"languages\"),r=e.get(\"generators\",(0,Xe.Map)());return!t||t.isEmpty()?r:r.filter(((e,r)=>t.includes(r)))})),getSnippetGenerators=e=>({fn:t})=>pr(e).map(((e,r)=>{const n=(e=>t[`requestSnippetGenerator_${e}`])(r);return\"function\"!=typeof n?null:e.set(\"fn\",n)})).filter((e=>e)),mr=(0,Pt.createSelector)(request_snippets_selectors_state,(e=>e.get(\"activeLanguage\"))),fr=(0,Pt.createSelector)(request_snippets_selectors_state,(e=>e.get(\"defaultExpanded\")));var hr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return k.default}}),gr=function(e){var t={};return __webpack_require__.d(t,e),t}({CopyToClipboard:function(){return N.CopyToClipboard}});const yr={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},Er={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"};var request_snippets=({request:e,requestSnippetsSelectors:t,getComponent:r})=>{const n=(0,He.useRef)(null),a=r(\"ArrowUpIcon\"),o=r(\"ArrowDownIcon\"),s=r(\"SyntaxHighlighter\",!0),[l,i]=(0,He.useState)(t.getSnippetGenerators()?.keySeq().first()),[c,u]=(0,He.useState)(t?.getDefaultExpanded()),d=t.getSnippetGenerators(),p=d.get(l),m=p.get(\"fn\")(e),handleSetIsExpanded=()=>{u(!c)},handleGetBtnStyle=e=>e===l?Er:yr,handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:n,offsetHeight:a,scrollTop:o}=t;n>a&&(0===o&&r<0||a+o>=n&&r>0)&&e.preventDefault()};return(0,He.useEffect)((()=>{}),[]),(0,He.useEffect)((()=>{const e=Array.from(n.current.childNodes).filter((e=>!!e.nodeType&&e.classList?.contains(\"curl-command\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[e]),He.default.createElement(\"div\",{className:\"request-snippets\",ref:n},He.default.createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},He.default.createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),He.default.createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:c?\"Collapse operation\":\"Expand operation\"},c?He.default.createElement(o,{className:\"arrow\",width:\"10\",height:\"10\"}):He.default.createElement(a,{className:\"arrow\",width:\"10\",height:\"10\"}))),c&&He.default.createElement(\"div\",{className:\"curl-command\"},He.default.createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},d.entrySeq().map((([e,t])=>He.default.createElement(\"div\",{className:(0,hr.default)(\"btn\",{active:e===l}),style:handleGetBtnStyle(e),key:e,onClick:()=>(e=>{l!==e&&i(e)})(e)},He.default.createElement(\"h4\",{style:e===l?{color:\"white\"}:{}},t.get(\"title\")))))),He.default.createElement(\"div\",{className:\"copy-to-clipboard\"},He.default.createElement(gr.CopyToClipboard,{text:m},He.default.createElement(\"button\",null))),He.default.createElement(\"div\",null,He.default.createElement(s,{language:p.get(\"syntax\"),className:\"curl microlight\",renderPlainText:({children:e,PlainTextViewer:t})=>He.default.createElement(t,{className:\"curl\"},e)},m))))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:{requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell},statePlugins:{requestSnippets:{selectors:qe}}});class ModelCollapse extends He.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:Xe.default.List([])};constructor(e,t){super(e,t);let{expanded:r,collapsedContent:n}=this.props;this.state={expanded:r,collapsedContent:n||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:e,expanded:t,modelName:r}=this.props;e&&t&&this.props.onToggle(r,t)}UNSAFE_componentWillReceiveProps(e){this.props.expanded!==e.expanded&&this.setState({expanded:e.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=e=>{if(e&&this.props.layoutSelectors){const t=this.props.layoutSelectors.getScrollToKey();Xe.default.is(t,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,e.parentElement)}};render(){const{title:e,classes:t}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?He.default.createElement(\"span\",{className:t||\"\"},this.props.children):He.default.createElement(\"span\",{className:t||\"\",ref:this.onLoad},He.default.createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},e&&He.default.createElement(\"span\",{className:\"pointer\"},e),He.default.createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&He.default.createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:e,isExecute:t,schema:r,example:n})=>{const a=(0,He.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),o=(0,He.useMemo)((()=>Object.keys(a)),[a]).includes(e)&&r&&!t?e:a.example,s=(e=>{const t=(0,He.useRef)();return(0,He.useEffect)((()=>{t.current=e})),t.current})(t),[l,i]=(0,He.useState)(o),c=(0,He.useCallback)((e=>{i(e.target.dataset.name)}),[]);return(0,He.useEffect)((()=>{s&&!t&&n&&i(a.example)}),[s,t,n]),{activeTab:l,onTabChange:c,tabs:a}};var model_example=({schema:e,example:t,isExecute:r=!1,specPath:n,includeWriteOnly:a=!1,includeReadOnly:o=!1,getComponent:s,getConfigs:l,specSelectors:i})=>{const{defaultModelRendering:c,defaultModelExpandDepth:u}=l(),d=s(\"ModelWrapper\"),p=s(\"HighlightCode\",!0),m=Et()(5).toString(\"base64\"),f=Et()(5).toString(\"base64\"),h=Et()(5).toString(\"base64\"),g=Et()(5).toString(\"base64\"),y=i.isOAS3(),{activeTab:S,tabs:_,onTabChange:v}=useTabs({initialTab:c,isExecute:r,schema:e,example:t});return He.default.createElement(\"div\",{className:\"model-example\"},He.default.createElement(\"ul\",{className:\"tab\",role:\"tablist\"},He.default.createElement(\"li\",{className:(0,hr.default)(\"tabitem\",{active:S===_.example}),role:\"presentation\"},He.default.createElement(\"button\",{\"aria-controls\":f,\"aria-selected\":S===_.example,className:\"tablinks\",\"data-name\":\"example\",id:m,onClick:v,role:\"tab\"},r?\"Edit Value\":\"Example Value\")),e&&He.default.createElement(\"li\",{className:(0,hr.default)(\"tabitem\",{active:S===_.model}),role:\"presentation\"},He.default.createElement(\"button\",{\"aria-controls\":g,\"aria-selected\":S===_.model,className:(0,hr.default)(\"tablinks\",{inactive:r}),\"data-name\":\"model\",id:h,onClick:v,role:\"tab\"},y?\"Schema\":\"Model\"))),S===_.example&&He.default.createElement(\"div\",{\"aria-hidden\":S!==_.example,\"aria-labelledby\":m,\"data-name\":\"examplePanel\",id:f,role:\"tabpanel\",tabIndex:\"0\"},t||He.default.createElement(p,null,\"(no example available\")),S===_.model&&He.default.createElement(\"div\",{className:\"model-container\",\"aria-hidden\":S===_.example,\"aria-labelledby\":h,\"data-name\":\"modelPanel\",id:g,role:\"tabpanel\",tabIndex:\"0\"},He.default.createElement(d,{schema:e,getComponent:s,getConfigs:l,specSelectors:i,expandDepth:u,specPath:n,includeReadOnly:o,includeWriteOnly:a})))};class ModelWrapper extends He.Component{onToggle=(e,t)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,t)};render(){let{getComponent:e,getConfigs:t}=this.props;const r=e(\"Model\");let n;return this.props.layoutSelectors&&(n=this.props.layoutSelectors.isShown(this.props.fullPath)),He.default.createElement(\"div\",{className:\"model-box\"},He.default.createElement(r,(0,ar.default)({},this.props,{getConfigs:t,expanded:n,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}var Sr,_r=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return A.default}});function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_extends.apply(null,arguments)}var rolling_load=e=>He.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},e),Sr||(Sr=He.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},He.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"}))));const decodeRefName=e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}};class Model extends _r.default{static propTypes={schema:Yt.default.map.isRequired,getComponent:Ut.default.func.isRequired,getConfigs:Ut.default.func.isRequired,specSelectors:Ut.default.object.isRequired,name:Ut.default.string,displayName:Ut.default.string,isRef:Ut.default.bool,required:Ut.default.bool,expandDepth:Ut.default.number,depth:Ut.default.number,specPath:Yt.default.list.isRequired,includeReadOnly:Ut.default.bool,includeWriteOnly:Ut.default.bool};getModelName=e=>-1!==e.indexOf(\"#/definitions/\")?decodeRefName(e.replace(/^.*#\\/definitions\\//,\"\")):-1!==e.indexOf(\"#/components/schemas/\")?decodeRefName(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=e=>{let{specSelectors:t}=this.props;return t.findDefinition(e)};render(){let{getComponent:e,getConfigs:t,specSelectors:r,schema:n,required:a,name:o,isRef:s,specPath:l,displayName:i,includeReadOnly:c,includeWriteOnly:u}=this.props;const d=e(\"ObjectModel\"),p=e(\"ArrayModel\"),m=e(\"PrimitiveModel\");let f=\"object\",h=n&&n.get(\"$$ref\"),g=n&&n.get(\"$ref\");if(!o&&h&&(o=this.getModelName(h)),g){const e=this.getModelName(g),t=this.getRefSchema(e);Xe.Map.isMap(t)?(n=t.mergeDeep(n),h||(n=n.set(\"$$ref\",g),h=g)):Xe.Map.isMap(n)&&1===n.size&&(n=null,o=g)}if(!n)return He.default.createElement(\"span\",{className:\"model model-title\"},He.default.createElement(\"span\",{className:\"model-title__text\"},i||o),!g&&He.default.createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const y=r.isOAS3()&&n.get(\"deprecated\");switch(s=void 0!==s?s:!!h,f=n&&n.get(\"type\")||f,f){case\"object\":return He.default.createElement(d,(0,ar.default)({className:\"object\"},this.props,{specPath:l,getConfigs:t,schema:n,name:o,deprecated:y,isRef:s,includeReadOnly:c,includeWriteOnly:u}));case\"array\":return He.default.createElement(p,(0,ar.default)({className:\"array\"},this.props,{getConfigs:t,schema:n,name:o,deprecated:y,required:a,includeReadOnly:c,includeWriteOnly:u}));default:return He.default.createElement(m,(0,ar.default)({},this.props,{getComponent:e,getConfigs:t,schema:n,name:o,deprecated:y,required:a}))}}}class Models extends He.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(e,t)=>{const{layoutActions:r}=this.props;r.show([...this.getSchemaBasePath(),e],t),t&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),e])};onLoadModels=e=>{e&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),e)};onLoadModel=e=>{if(e){const t=e.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),t],e)}};render(){let{specSelectors:e,getComponent:t,layoutSelectors:r,layoutActions:n,getConfigs:a}=this.props,o=e.definitions(),{docExpansion:s,defaultModelsExpandDepth:l}=a();if(!o.size||l<0)return null;const i=this.getSchemaBasePath();let c=r.isShown(i,l>0&&\"none\"!==s);const u=e.isOAS3(),d=t(\"ModelWrapper\"),p=t(\"Collapse\"),m=t(\"ModelCollapse\"),f=t(\"JumpToPath\",!0),h=t(\"ArrowUpIcon\"),g=t(\"ArrowDownIcon\");return He.default.createElement(\"section\",{className:c?\"models is-open\":\"models\",ref:this.onLoadModels},He.default.createElement(\"h4\",null,He.default.createElement(\"button\",{\"aria-expanded\":c,className:\"models-control\",onClick:()=>n.show(i,!c)},He.default.createElement(\"span\",null,u?\"Schemas\":\"Models\"),c?He.default.createElement(h,null):He.default.createElement(g,null))),He.default.createElement(p,{isOpened:c},o.entrySeq().map((([o])=>{const s=[...i,o],c=Xe.default.List(s),u=e.specResolvedSubtree(s),p=e.specJson().getIn(s),h=Xe.Map.isMap(u)?u:Xe.default.Map(),g=Xe.Map.isMap(p)?p:Xe.default.Map(),y=h.get(\"title\")||g.get(\"title\")||o,S=r.isShown(s,!1);S&&0===h.size&&g.size>0&&this.props.specActions.requestResolvedSubtree(s);const _=He.default.createElement(d,{name:o,expandDepth:l,schema:h||Xe.default.Map(),displayName:y,fullPath:s,specPath:c,getComponent:t,specSelectors:e,getConfigs:a,layoutSelectors:r,layoutActions:n,includeReadOnly:!0,includeWriteOnly:!0}),v=He.default.createElement(\"span\",{className:\"model-box\"},He.default.createElement(\"span\",{className:\"model model-title\"},y));return He.default.createElement(\"div\",{id:`model-${o}`,className:\"model-container\",key:`models-section-${o}`,\"data-name\":o,ref:this.onLoadModel},He.default.createElement(\"span\",{className:\"models-jump-to-path\"},He.default.createElement(f,{path:c})),He.default.createElement(m,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(o),onToggle:this.handleToggle,title:v,displayName:y,modelName:o,specPath:c,layoutSelectors:r,layoutActions:n,hideSelfOnExpand:!0,expanded:l>0&&S},_))})).toArray()))}}var enum_model=({value:e,getComponent:t})=>{let r=t(\"ModelCollapse\"),n=He.default.createElement(\"span\",null,\"Array [ \",e.count(),\" ]\");return He.default.createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",He.default.createElement(\"br\",null),He.default.createElement(r,{collapsedContent:n},\"[ \",e.map(String).join(\", \"),\" ]\"))};function isAbsoluteUrl(e){return e.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(e,t){return e?isAbsoluteUrl(e)?function addProtocol(e){return e.match(/^\\/\\//i)?`${window.location.protocol}${e}`:e}(e):new URL(e,t).href:t}function safeBuildUrl(e,t,{selectedServer:r=\"\"}={}){try{return function buildUrl(e,t,{selectedServer:r=\"\"}={}){if(!e)return;if(isAbsoluteUrl(e))return e;const n=buildBaseUrl(r,t);return isAbsoluteUrl(n)?new URL(e,n).href:new URL(e,window.location.href).href}(e,t,{selectedServer:r})}catch{return}}function sanitizeUrl(e){if(\"string\"!=typeof e||\"\"===e.trim())return\"\";const t=e.trim(),r=\"about:blank\";try{const e=`https://base${String(Math.random()).slice(2)}`,n=new URL(t,e),a=n.protocol.slice(0,-1);return[\"javascript\",\"data\",\"vbscript\"].includes(a.toLowerCase())?r:n.origin===e?t.startsWith(\"/\")?`${n.pathname}${n.search}${n.hash}`:t.startsWith(\".\")?`.${n.pathname}${n.search}${n.hash}`:`${n.pathname.substring(1)}${n.search}${n.hash}`:String(n)}catch{return r}}class ObjectModel extends He.Component{render(){let{schema:e,name:t,displayName:r,isRef:n,getComponent:a,getConfigs:o,depth:s,onToggle:l,expanded:i,specPath:c,...u}=this.props,{specSelectors:d,expandDepth:p,includeReadOnly:m,includeWriteOnly:f}=u;const{isOAS3:h}=d,g=s>2||2===s&&\"items\"!==c.last();if(!e)return null;const{showExtensions:y}=o(),S=y?getExtensions(e):(0,Xe.List)();let _=e.get(\"description\"),v=e.get(\"properties\"),b=e.get(\"additionalProperties\"),w=e.get(\"title\")||r||t,C=e.get(\"required\"),x=e.filter(((e,t)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(t))),O=e.get(\"deprecated\"),k=e.getIn([\"externalDocs\",\"url\"]),N=e.getIn([\"externalDocs\",\"description\"]);const A=a(\"JumpToPath\",!0),I=a(\"Markdown\",!0),j=a(\"Model\"),R=a(\"ModelCollapse\"),T=a(\"Property\"),P=a(\"Link\"),B=a(\"ModelExtensions\"),JumpToPathSection=()=>He.default.createElement(\"span\",{className:\"model-jump-to-path\"},He.default.createElement(A,{path:c})),M=He.default.createElement(\"span\",null,He.default.createElement(\"span\",null,\"{\"),\"...\",He.default.createElement(\"span\",null,\"}\"),n?He.default.createElement(JumpToPathSection,null):\"\"),q=d.isOAS3()?e.get(\"allOf\"):null,L=d.isOAS3()?e.get(\"anyOf\"):null,U=d.isOAS3()?e.get(\"oneOf\"):null,D=d.isOAS3()?e.get(\"not\"):null,$=w&&He.default.createElement(\"span\",{className:\"model-title\"},n&&e.get(\"$$ref\")&&He.default.createElement(\"span\",{className:(0,hr.default)(\"model-hint\",{\"model-hint--embedded\":g})},e.get(\"$$ref\")),He.default.createElement(\"span\",{className:\"model-title__text\"},w));return He.default.createElement(\"span\",{className:\"model\"},He.default.createElement(R,{modelName:t,title:$,onToggle:l,expanded:!!i||s<=p,collapsedContent:M},He.default.createElement(\"span\",{className:\"brace-open object\"},\"{\"),n?He.default.createElement(JumpToPathSection,null):null,He.default.createElement(\"span\",{className:\"inner-object\"},He.default.createElement(\"table\",{className:\"model\"},He.default.createElement(\"tbody\",null,_?He.default.createElement(\"tr\",{className:\"description\"},He.default.createElement(\"td\",null,\"description:\"),He.default.createElement(\"td\",null,He.default.createElement(I,{source:_}))):null,k&&He.default.createElement(\"tr\",{className:\"external-docs\"},He.default.createElement(\"td\",null,\"externalDocs:\"),He.default.createElement(\"td\",null,He.default.createElement(P,{target:\"_blank\",href:sanitizeUrl(k)},N||k))),O?He.default.createElement(\"tr\",{className:\"property\"},He.default.createElement(\"td\",null,\"deprecated:\"),He.default.createElement(\"td\",null,\"true\")):null,v&&v.size?v.entrySeq().filter((([,e])=>(!e.get(\"readOnly\")||m)&&(!e.get(\"writeOnly\")||f))).map((([e,r])=>{let n=h()&&r.get(\"deprecated\"),l=Xe.List.isList(C)&&C.contains(e),i=[\"property-row\"];return n&&i.push(\"deprecated\"),l&&i.push(\"required\"),He.default.createElement(\"tr\",{key:e,className:i.join(\" \")},He.default.createElement(\"td\",null,e,l&&He.default.createElement(\"span\",{className:\"star\"},\"*\")),He.default.createElement(\"td\",null,He.default.createElement(j,(0,ar.default)({key:`object-${t}-${e}_${r}`},u,{required:l,getComponent:a,specPath:c.push(\"properties\",e),getConfigs:o,schema:r,depth:s+1}))))})).toArray():null,0===S.size?null:He.default.createElement(He.default.Fragment,null,He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,\" \")),He.default.createElement(B,{extensions:S,propClass:\"extension\"})),b&&b.size?He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,\"< * >:\"),He.default.createElement(\"td\",null,He.default.createElement(j,(0,ar.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"additionalProperties\"),getConfigs:o,schema:b,depth:s+1})))):null,q?He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,\"allOf ->\"),He.default.createElement(\"td\",null,q.map(((e,t)=>He.default.createElement(\"div\",{key:t},He.default.createElement(j,(0,ar.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"allOf\",t),getConfigs:o,schema:e,depth:s+1}))))))):null,L?He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,\"anyOf ->\"),He.default.createElement(\"td\",null,L.map(((e,t)=>He.default.createElement(\"div\",{key:t},He.default.createElement(j,(0,ar.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"anyOf\",t),getConfigs:o,schema:e,depth:s+1}))))))):null,U?He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,\"oneOf ->\"),He.default.createElement(\"td\",null,U.map(((e,t)=>He.default.createElement(\"div\",{key:t},He.default.createElement(j,(0,ar.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"oneOf\",t),getConfigs:o,schema:e,depth:s+1}))))))):null,D?He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,\"not ->\"),He.default.createElement(\"td\",null,He.default.createElement(\"div\",null,He.default.createElement(j,(0,ar.default)({},u,{required:!1,getComponent:a,specPath:c.push(\"not\"),getConfigs:o,schema:D,depth:s+1}))))):null))),He.default.createElement(\"span\",{className:\"brace-close\"},\"}\")),x.size?x.entrySeq().map((([e,t])=>He.default.createElement(T,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null)}}class ArrayModel extends He.Component{render(){let{getComponent:e,getConfigs:t,schema:r,depth:n,expandDepth:a,name:o,displayName:s,specPath:l}=this.props,i=r.get(\"description\"),c=r.get(\"items\"),u=r.get(\"title\")||s||o,d=r.filter(((e,t)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))),p=r.getIn([\"externalDocs\",\"url\"]),m=r.getIn([\"externalDocs\",\"description\"]);const f=e(\"Markdown\",!0),h=e(\"ModelCollapse\"),g=e(\"Model\"),y=e(\"Property\"),S=e(\"Link\"),_=u&&He.default.createElement(\"span\",{className:\"model-title\"},He.default.createElement(\"span\",{className:\"model-title__text\"},u));return He.default.createElement(\"span\",{className:\"model\"},He.default.createElement(h,{title:_,expanded:n<=a,collapsedContent:\"[...]\"},\"[\",d.size?d.entrySeq().map((([e,t])=>He.default.createElement(y,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null,i?He.default.createElement(f,{source:i}):d.size?He.default.createElement(\"div\",{className:\"markdown\"}):null,p&&He.default.createElement(\"div\",{className:\"external-docs\"},He.default.createElement(S,{target:\"_blank\",href:sanitizeUrl(p)},m||p)),He.default.createElement(\"span\",null,He.default.createElement(g,(0,ar.default)({},this.props,{getConfigs:t,specPath:l.push(\"items\"),name:null,schema:c,required:!1,depth:n+1}))),\"]\"))}}const vr=\"property primitive\";class Primitive extends He.Component{render(){let{schema:e,getComponent:t,getConfigs:r,name:n,displayName:a,depth:o,expandDepth:s}=this.props;const{showExtensions:l}=r();if(!e||!e.get)return He.default.createElement(\"div\",null);let i=e.get(\"type\"),c=e.get(\"format\"),u=e.get(\"xml\"),d=e.get(\"enum\"),p=e.get(\"title\")||a||n,m=e.get(\"description\");const f=getExtensions(e);let h=e.filter(((e,t)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))).filterNot(((e,t)=>f.has(t))),g=e.getIn([\"externalDocs\",\"url\"]),y=e.getIn([\"externalDocs\",\"description\"]);const S=t(\"Markdown\",!0),_=t(\"EnumModel\"),v=t(\"Property\"),b=t(\"ModelCollapse\"),w=t(\"Link\"),C=t(\"ModelExtensions\"),x=p&&He.default.createElement(\"span\",{className:\"model-title\"},He.default.createElement(\"span\",{className:\"model-title__text\"},p));return He.default.createElement(\"span\",{className:\"model\"},He.default.createElement(b,{title:x,expanded:o<=s,collapsedContent:\"[...]\"},He.default.createElement(\"span\",{className:\"prop\"},n&&o>1&&He.default.createElement(\"span\",{className:\"prop-name\"},p),He.default.createElement(\"span\",{className:\"prop-type\"},i),c&&He.default.createElement(\"span\",{className:\"prop-format\"},\"($\",c,\")\"),h.size?h.entrySeq().map((([e,t])=>He.default.createElement(v,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:vr}))):null,l&&f.size>0?He.default.createElement(C,{extensions:f,propClass:`${vr} extension`}):null,m?He.default.createElement(S,{source:m}):null,g&&He.default.createElement(\"div\",{className:\"external-docs\"},He.default.createElement(w,{target:\"_blank\",href:sanitizeUrl(g)},y||g)),u&&u.size?He.default.createElement(\"span\",null,He.default.createElement(\"br\",null),He.default.createElement(\"span\",{className:vr},\"xml:\"),u.entrySeq().map((([e,t])=>He.default.createElement(\"span\",{key:`${e}-${t}`,className:vr},He.default.createElement(\"br\",null),\"   \",e,\": \",String(t)))).toArray()):null,d&&He.default.createElement(_,{value:d,getComponent:t}))))}}class Schemes extends He.default.Component{UNSAFE_componentWillMount(){let{schemes:e}=this.props;this.setScheme(e.first())}UNSAFE_componentWillReceiveProps(e){this.props.currentScheme&&e.schemes.includes(this.props.currentScheme)||this.setScheme(e.schemes.first())}onChange=e=>{this.setScheme(e.target.value)};setScheme=e=>{let{path:t,method:r,specActions:n}=this.props;n.setScheme(e,t,r)};render(){let{schemes:e,currentScheme:t}=this.props;return He.default.createElement(\"label\",{htmlFor:\"schemes\"},He.default.createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),He.default.createElement(\"select\",{onChange:this.onChange,value:t,id:\"schemes\"},e.valueSeq().map((e=>He.default.createElement(\"option\",{value:e,key:e},e))).toArray()))}}class SchemesContainer extends He.default.Component{render(){const{specActions:e,specSelectors:t,getComponent:r}=this.props,n=t.operationScheme(),a=t.schemes(),o=r(\"schemes\");return a&&a.size?He.default.createElement(o,{currentScheme:n,schemes:a,specActions:e}):null}}var br=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return I.default}});const wr={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,Xe.List)()};class JsonSchemaForm extends He.Component{static defaultProps=wr;componentDidMount(){const{dispatchInitialValue:e,value:t,onChange:r}=this.props;e?r(t):!1===e&&r(\"\")}render(){let{schema:e,errors:t,value:r,onChange:n,getComponent:a,fn:o,disabled:s}=this.props;const l=e&&e.get?e.get(\"format\"):null,i=e&&e.get?e.get(\"type\"):null,c=o.getSchemaObjectType(e),u=o.isFileUploadIntended(e);let getComponentSilently=e=>a(e,!1,{failSilently:!0}),d=i?getComponentSilently(l?`JsonSchema_${i}_${l}`:`JsonSchema_${i}`):a(\"JsonSchema_string\");return u||!Xe.List.isList(i)||\"array\"!==c&&\"object\"!==c||(d=a(\"JsonSchema_object\")),d||(d=a(\"JsonSchema_string\")),He.default.createElement(d,(0,ar.default)({},this.props,{errors:t,fn:o,getComponent:a,value:r,onChange:n,schema:e,disabled:s}))}}class JsonSchema_string extends He.Component{static defaultProps=wr;onChange=e=>{const t=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?e.target.files[0]:e.target.value;this.props.onChange(t,this.props.keyName)};onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,schema:r,errors:n,required:a,description:o,disabled:s}=this.props;const l=r&&r.get?r.get(\"enum\"):null,i=r&&r.get?r.get(\"format\"):null,c=r&&r.get?r.get(\"type\"):null,u=r&&r.get?r.get(\"in\"):null;if(t?(isImmutable(t)||\"object\"==typeof t)&&(t=stringify(t)):t=\"\",n=n.toJS?n.toJS():[],l){const r=e(\"Select\");return He.default.createElement(r,{className:n.length?\"invalid\":\"\",title:n.length?n:\"\",allowedValues:[...l],value:t,allowEmptyValue:!a,disabled:s,onChange:this.onEnumChange})}const d=s||u&&\"formData\"===u&&!(\"FormData\"in window),p=e(\"Input\");return c&&\"file\"===c?He.default.createElement(p,{type:\"file\",className:n.length?\"invalid\":\"\",title:n.length?n:\"\",onChange:this.onChange,disabled:d}):He.default.createElement(br.default,{type:i&&\"password\"===i?\"password\":\"text\",className:n.length?\"invalid\":\"\",title:n.length?n:\"\",value:t,minLength:0,debounceTimeout:350,placeholder:o,onChange:this.onChange,disabled:d})}}class JsonSchema_array extends He.PureComponent{static defaultProps=wr;constructor(e,t){super(e,t),this.state={value:valueOrEmptyList(e.value),schema:e.schema}}UNSAFE_componentWillReceiveProps(e){const t=valueOrEmptyList(e.value);t!==this.state.value&&this.setState({value:t}),e.schema!==this.state.schema&&this.setState({schema:e.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(e,t)=>{this.setState((({value:r})=>({value:r.set(t,e)})),this.onChange)};removeItem=e=>{this.setState((({value:t})=>({value:t.delete(e)})),this.onChange)};addItem=()=>{const{fn:e}=this.props;let t=valueOrEmptyList(this.state.value);this.setState((()=>({value:t.push(e.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=e=>{this.setState((()=>({value:e})),this.onChange)};render(){let{getComponent:e,required:t,schema:r,errors:n,fn:a,disabled:o}=this.props;n=n.toJS?n.toJS():Array.isArray(n)?n:[];const s=n.filter((e=>\"string\"==typeof e)),l=n.filter((e=>void 0!==e.needRemove)).map((e=>e.error)),i=this.state.value,c=!!(i&&i.count&&i.count()>0),u=r.getIn([\"items\",\"enum\"]),d=r.get(\"items\"),p=a.getSchemaObjectType(d),m=a.getSchemaObjectTypeLabel(d),f=r.getIn([\"items\",\"format\"]),h=r.get(\"items\");let g,y=!1,S=\"file\"===p||\"string\"===p&&\"binary\"===f;if(p&&f?g=e(`JsonSchema_${p}_${f}`):\"boolean\"!==p&&\"array\"!==p&&\"object\"!==p||(g=e(`JsonSchema_${p}`)),!Xe.List.isList(d?.get(\"type\"))||\"array\"!==p&&\"object\"!==p||(g=e(\"JsonSchema_object\")),g||S||(y=!0),u){const r=e(\"Select\");return He.default.createElement(r,{className:n.length?\"invalid\":\"\",title:n.length?n:\"\",multiple:!0,value:i,disabled:o,allowedValues:u,allowEmptyValue:!t,onChange:this.onEnumChange})}const _=e(\"Button\");return He.default.createElement(\"div\",{className:\"json-schema-array\"},c?i.map(((t,r)=>{const s=(0,Xe.fromJS)([...n.filter((e=>e.index===r)).map((e=>e.error))]);return He.default.createElement(\"div\",{key:r,className:\"json-schema-form-item\"},S?He.default.createElement(JsonSchemaArrayItemFile,{value:t,onChange:e=>this.onItemChange(e,r),disabled:o,errors:s,getComponent:e}):y?He.default.createElement(JsonSchemaArrayItemText,{value:t,onChange:e=>this.onItemChange(e,r),disabled:o,errors:s}):He.default.createElement(g,(0,ar.default)({},this.props,{value:t,onChange:e=>this.onItemChange(e,r),disabled:o,errors:s,schema:h,getComponent:e,fn:a})),o?null:He.default.createElement(_,{className:`btn btn-sm json-schema-form-item-remove ${l.length?\"invalid\":null}`,title:l.length?l:\"\",onClick:()=>this.removeItem(r)},\" - \"))})):null,o?null:He.default.createElement(_,{className:`btn btn-sm json-schema-form-item-add ${s.length?\"invalid\":null}`,title:s.length?s:\"\",onClick:this.addItem},\"Add \",m,\" item\"))}}class JsonSchemaArrayItemText extends He.Component{static defaultProps=wr;onChange=e=>{const t=e.target.value;this.props.onChange(t,this.props.keyName)};render(){let{value:e,errors:t,description:r,disabled:n}=this.props;return e?(isImmutable(e)||\"object\"==typeof e)&&(e=stringify(e)):e=\"\",t=t.toJS?t.toJS():[],He.default.createElement(br.default,{type:\"text\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",value:e,minLength:0,debounceTimeout:350,placeholder:r,onChange:this.onChange,disabled:n})}}class JsonSchemaArrayItemFile extends He.Component{static defaultProps=wr;onFileChange=e=>{const t=e.target.files[0];this.props.onChange(t,this.props.keyName)};render(){let{getComponent:e,errors:t,disabled:r}=this.props;const n=e(\"Input\"),a=r||!(\"FormData\"in window);return He.default.createElement(n,{type:\"file\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",onChange:this.onFileChange,disabled:a})}}class JsonSchema_boolean extends He.Component{static defaultProps=wr;onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,errors:r,schema:n,required:a,disabled:o}=this.props;r=r.toJS?r.toJS():[];let s=n&&n.get?n.get(\"enum\"):null,l=!s||!a,i=!s&&[\"true\",\"false\"];const c=e(\"Select\");return He.default.createElement(c,{className:r.length?\"invalid\":\"\",title:r.length?r:\"\",value:String(t),disabled:o,allowedValues:s?[...s]:i,allowEmptyValue:l,onChange:this.onEnumChange})}}const stringifyObjectErrors=e=>e.map((e=>{const t=void 0!==e.propKey?e.propKey:e.index;let r=\"string\"==typeof e?e:\"string\"==typeof e.error?e.error:null;if(!t&&r)return r;let n=e.error,a=`/${e.propKey}`;for(;\"object\"==typeof n;){const e=void 0!==n.propKey?n.propKey:n.index;if(void 0===e)break;if(a+=`/${e}`,!n.error)break;n=n.error}return`${a}: ${n}`}));class JsonSchema_object extends He.PureComponent{constructor(){super()}static defaultProps=wr;onChange=e=>{this.props.onChange(e)};handleOnChange=e=>{const t=e.target.value;this.onChange(t)};render(){let{getComponent:e,value:t,errors:r,disabled:n}=this.props;const a=e(\"TextArea\");return r=r.toJS?r.toJS():Array.isArray(r)?r:[],He.default.createElement(\"div\",null,He.default.createElement(a,{className:(0,hr.default)({invalid:r.length}),title:r.length?stringifyObjectErrors(r).join(\", \"):\"\",value:stringify(t),disabled:n,onChange:this.handleOnChange}))}}function valueOrEmptyList(e){return Xe.List.isList(e)?e:Array.isArray(e)?(0,Xe.fromJS)(e):(0,Xe.List)()}const ModelExtensions=({extensions:e,propClass:t=\"\"})=>e.entrySeq().map((([e,r])=>{const n=immutableToJS(r)??null;return He.default.createElement(\"tr\",{key:e,className:t},He.default.createElement(\"td\",null,e),He.default.createElement(\"td\",null,JSON.stringify(n)))})).toArray();var Cr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return j.default}});const hasSchemaType=(e,t)=>{const r=Xe.Map.isMap(e);if(!r&&!(0,Cr.default)(e))return!1;const n=r?e.get(\"type\"):e.type;return t===n||Array.isArray(t)&&t.includes(n)},getType=(e,t=new WeakSet)=>{if(null==e)return\"any\";if(t.has(e))return\"any\";t.add(e);const{type:r,items:n}=e;return Object.hasOwn(e,\"items\")?(()=>{if(n)return`array<${getType(n,t)}>`;return\"array<any>\"})():r},getSchemaObjectTypeLabel=e=>getType(immutableToJS(e));var json_schema_5=()=>({components:{modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,ModelExtensions,schemes:Schemes,SchemesContainer,...Le},fn:{hasSchemaType,getSchemaObjectTypeLabel}}),xr=__webpack_require__(123),Or=__webpack_require__.n(xr),kr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return R.default}}),Nr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return T.default}});const shallowArrayEquals=e=>t=>Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,r)=>e===t[r])),list=(...e)=>e;class Cache extends Map{delete(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.delete(t)}get(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.get(t)}has(e){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(e))}}var utils_memoizeN=(e,t=list)=>{const{Cache:r}=ut.default;ut.default.Cache=Cache;const n=(0,ut.default)(e,t);return ut.default.Cache=r,n};const Ar={string:e=>e.pattern?(e=>{try{const t=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,r=e.replace(t,\"100\"),n=new kr.default(r);return n.max=100,n.gen()}catch(e){return\"string\"}})(e.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_time:()=>(new Date).toISOString().substring(11),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:e=>\"boolean\"!=typeof e.default||e.default},primitive=e=>{e=objectify(e);let{type:t,format:r}=e,n=Ar[`${t}_${r}`]||Ar[t];return isFunc(n)?n(e):\"Unknown Type: \"+e.type},sanitizeRef=e=>deeplyStripKey(e,\"$$ref\",(e=>\"string\"==typeof e&&e.indexOf(\"#\")>-1)),Ir=[\"maxProperties\",\"minProperties\"],jr=[\"minItems\",\"maxItems\"],Rr=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],Tr=[\"minLength\",\"maxLength\"],mergeJsonSchema=(e,t,r={})=>{const n={...e};if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...Ir,...jr,...Rr,...Tr].forEach((e=>(e=>{void 0===n[e]&&void 0!==t[e]&&(n[e]=t[e])})(e))),void 0!==t.required&&Array.isArray(t.required)&&(void 0!==n.required&&n.required.length||(n.required=[]),t.required.forEach((e=>{n.required.includes(e)||n.required.push(e)}))),t.properties){n.properties||(n.properties={});let e=objectify(t.properties);for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(e[a]&&e[a].deprecated||e[a]&&e[a].readOnly&&!r.includeReadOnly||e[a]&&e[a].writeOnly&&!r.includeWriteOnly||n.properties[a]||(n.properties[a]=e[a],!t.required&&Array.isArray(t.required)&&-1!==t.required.indexOf(a)&&(n.required?n.required.push(a):n.required=[a])))}return t.items&&(n.items||(n.items={}),n.items=mergeJsonSchema(n.items,t.items,r)),n},sampleFromSchemaGeneric=(e,t={},r=void 0,n=!1)=>{e&&isFunc(e.toJS)&&(e=e.toJS());let a=void 0!==r||e&&void 0!==e.example||e&&void 0!==e.default;const o=!a&&e&&e.oneOf&&e.oneOf.length>0,s=!a&&e&&e.anyOf&&e.anyOf.length>0;if(!a&&(o||s)){const r=objectify(o?e.oneOf[0]:e.anyOf[0]);if(!(e=mergeJsonSchema(e,r,t)).xml&&r.xml&&(e.xml=r.xml),void 0!==e.example&&void 0!==r.example)a=!0;else if(r.properties){e.properties||(e.properties={});let n=objectify(r.properties);for(let a in n)Object.prototype.hasOwnProperty.call(n,a)&&(n[a]&&n[a].deprecated||n[a]&&n[a].readOnly&&!t.includeReadOnly||n[a]&&n[a].writeOnly&&!t.includeWriteOnly||e.properties[a]||(e.properties[a]=n[a],!r.required&&Array.isArray(r.required)&&-1!==r.required.indexOf(a)&&(e.required?e.required.push(a):e.required=[a])))}}const l={};let{xml:i,type:c,example:u,properties:d,additionalProperties:p,items:m}=e||{},{includeReadOnly:f,includeWriteOnly:h}=t;i=i||{};let g,{name:y,prefix:S,namespace:_}=i,v={};if(n&&(y=y||\"notagname\",g=(S?S+\":\":\"\")+y,_)){l[S?\"xmlns:\"+S:\"xmlns\"]=_}n&&(v[g]=[]);const schemaHasAny=t=>t.some((t=>Object.prototype.hasOwnProperty.call(e,t)));e&&!c&&(d||p||schemaHasAny(Ir)?c=\"object\":m||schemaHasAny(jr)?c=\"array\":schemaHasAny(Rr)?(c=\"number\",e.type=\"number\"):a||e.enum||(c=\"string\",e.type=\"string\"));const handleMinMaxItems=t=>{if(null!=e?.maxItems&&(t=t.slice(0,e?.maxItems)),null!=e?.minItems){let r=0;for(;t.length<e?.minItems;)t.push(t[r++%t.length])}return t},b=objectify(d);let w,C=0;const hasExceededMaxProperties=()=>e&&null!==e.maxProperties&&void 0!==e.maxProperties&&C>=e.maxProperties,canAddProperty=t=>!e||null===e.maxProperties||void 0===e.maxProperties||!hasExceededMaxProperties()&&(!(t=>!(e&&e.required&&e.required.length&&e.required.includes(t)))(t)||e.maxProperties-C-(()=>{if(!e||!e.required)return 0;let t=0;return n?e.required.forEach((e=>t+=void 0===v[e]?0:1)):e.required.forEach((e=>t+=void 0===v[g]?.find((t=>void 0!==t[e]))?0:1)),e.required.length-t})()>0);if(w=n?(r,a=void 0)=>{if(e&&b[r]){if(b[r].xml=b[r].xml||{},b[r].xml.attribute){const e=Array.isArray(b[r].enum)?b[r].enum[0]:void 0,t=b[r].example,n=b[r].default;return void(l[b[r].xml.name||r]=void 0!==t?t:void 0!==n?n:void 0!==e?e:primitive(b[r]))}b[r].xml.name=b[r].xml.name||r}else b[r]||!1===p||(b[r]={xml:{name:r}});let o=sampleFromSchemaGeneric(e&&b[r]||void 0,t,a,n);canAddProperty(r)&&(C++,Array.isArray(o)?v[g]=v[g].concat(o):v[g].push(o))}:(r,a)=>{if(canAddProperty(r)){if(Object.prototype.hasOwnProperty.call(e,\"discriminator\")&&e.discriminator&&Object.prototype.hasOwnProperty.call(e.discriminator,\"mapping\")&&e.discriminator.mapping&&Object.prototype.hasOwnProperty.call(e,\"$$ref\")&&e.$$ref&&e.discriminator.propertyName===r){for(let t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){v[r]=t;break}}else v[r]=sampleFromSchemaGeneric(b[r],t,a,n);C++}},a){let a;if(a=sanitizeRef(void 0!==r?r:void 0!==u?u:e.default),!n){if(\"number\"==typeof a&&\"string\"===c)return`${a}`;if(\"string\"!=typeof a||\"string\"===c)return a;try{return JSON.parse(a)}catch(e){return a}}if(e||(c=Array.isArray(a)?\"array\":typeof a),\"array\"===c){if(!Array.isArray(a)){if(\"string\"==typeof a)return a;a=[a]}const r=e?e.items:void 0;r&&(r.xml=r.xml||i||{},r.xml.name=r.xml.name||i.name);let o=a.map((e=>sampleFromSchemaGeneric(r,t,e,n)));return o=handleMinMaxItems(o),i.wrapped?(v[g]=o,(0,Nr.default)(l)||v[g].push({_attr:l})):v=o,v}if(\"object\"===c){if(\"string\"==typeof a)return a;for(let t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e&&b[t]&&b[t].readOnly&&!f||e&&b[t]&&b[t].writeOnly&&!h||(e&&b[t]&&b[t].xml&&b[t].xml.attribute?l[b[t].xml.name||t]=a[t]:w(t,a[t])));return(0,Nr.default)(l)||v[g].push({_attr:l}),v}return v[g]=(0,Nr.default)(l)?a:[{_attr:l},a],v}if(\"object\"===c){for(let e in b)Object.prototype.hasOwnProperty.call(b,e)&&(b[e]&&b[e].deprecated||b[e]&&b[e].readOnly&&!f||b[e]&&b[e].writeOnly&&!h||w(e));if(n&&l&&v[g].push({_attr:l}),hasExceededMaxProperties())return v;if(!0===p)n?v[g].push({additionalProp:\"Anything can be here\"}):v.additionalProp1={},C++;else if(p){const r=objectify(p),a=sampleFromSchemaGeneric(r,t,void 0,n);if(n&&r.xml&&r.xml.name&&\"notagname\"!==r.xml.name)v[g].push(a);else{const t=null!==e.minProperties&&void 0!==e.minProperties&&C<e.minProperties?e.minProperties-C:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return v;if(n){const t={};t[\"additionalProp\"+e]=a.notagname,v[g].push(t)}else v[\"additionalProp\"+e]=a;C++}}}return v}if(\"array\"===c){if(!m)return;let r;if(n&&(m.xml=m.xml||e?.xml||{},m.xml.name=m.xml.name||i.name),Array.isArray(m.anyOf))r=m.anyOf.map((e=>sampleFromSchemaGeneric(mergeJsonSchema(e,m,t),t,void 0,n)));else if(Array.isArray(m.oneOf))r=m.oneOf.map((e=>sampleFromSchemaGeneric(mergeJsonSchema(e,m,t),t,void 0,n)));else{if(!(!n||n&&i.wrapped))return sampleFromSchemaGeneric(m,t,void 0,n);r=[sampleFromSchemaGeneric(m,t,void 0,n)]}return r=handleMinMaxItems(r),n&&i.wrapped?(v[g]=r,(0,Nr.default)(l)||v[g].push({_attr:l}),v):r}let x;if(e&&Array.isArray(e.enum))x=normalizeArray(e.enum)[0];else{if(!e)return;if(x=primitive(e),\"number\"==typeof x){let t=e.minimum;null!=t&&(e.exclusiveMinimum&&t++,x=t);let r=e.maximum;null!=r&&(e.exclusiveMaximum&&r--,x=r)}if(\"string\"==typeof x&&(null!==e.maxLength&&void 0!==e.maxLength&&(x=x.slice(0,e.maxLength)),null!==e.minLength&&void 0!==e.minLength)){let t=0;for(;x.length<e.minLength;)x+=x[t++%x.length]}}if(\"file\"!==c)return n?(v[g]=(0,Nr.default)(l)?x:[{_attr:l},x],v):x},inferSchema=e=>(e.schema&&(e=e.schema),e.properties&&(e.type=\"object\"),e),createXMLExample=(e,t,r)=>{const n=sampleFromSchemaGeneric(e,t,r,!0);if(n)return\"string\"==typeof n?n:Or()(n,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(e,t,r)=>sampleFromSchemaGeneric(e,t,r,!1),resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],Pr=utils_memoizeN(createXMLExample,resolver),Br=utils_memoizeN(sampleFromSchema,resolver),getSchemaObjectType=e=>immutableToJS(e)?.type??\"string\",Mr=[{when:/json/,shouldStringifyTypes:[\"string\"]}],qr=[\"object\"];var get_json_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.memoizedSampleFromSchema(t,r,a),l=typeof s,i=Mr.reduce(((e,t)=>t.when.test(n)?[...e,...t.shouldStringifyTypes]:e),qr);return(0,pt.default)(i,(e=>e===l))?JSON.stringify(s,null,2):s};var get_yaml_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.getJsonSampleSchema(t,r,n,a);let l;try{l=Jt.default.dump(Jt.default.load(s),{lineWidth:-1},{schema:Jt.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")};var get_xml_sample_schema=e=>(t,r,n)=>{const{fn:a}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return a.memoizedCreateXMLExample(t,r,n)};var get_sample_schema=e=>(t,r=\"\",n={},a=void 0)=>{const{fn:o}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof a?.toJS&&(a=a.toJS()),/xml/.test(r)?o.getXmlSampleSchema(t,n,a):/(yaml|yml)/.test(r)?o.getYamlSampleSchema(t,n,r,a):o.getJsonSampleSchema(t,n,r,a)};var json_schema_5_samples=({getSystem:e})=>{const t=get_json_sample_schema(e),r=get_yaml_sample_schema(e),n=get_xml_sample_schema(e),a=get_sample_schema(e);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Br,memoizedCreateXMLExample:Pr,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:n,getSampleSchema:a,mergeJsonSchema},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Br,memoizedCreateXMLExample:Pr,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:n,getSampleSchema:a,mergeJsonSchema,getSchemaObjectType}}},Lr=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return P.default}});const Ur=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=e=>e||(0,Xe.Map)(),Dr=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"lastError\"))),$r=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"url\"))),Vr=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"spec\")||\"\")),Jr=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"specSource\")||\"not-editor\")),Fr=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"json\",(0,Xe.Map)()))),zr=(0,Pt.createSelector)(Fr,(e=>e.toJS())),Kr=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"resolved\",(0,Xe.Map)()))),specResolvedSubtree=(e,t)=>e.getIn([\"resolvedSubtrees\",...t],void 0),mergerFn=(e,t)=>Xe.Map.isMap(e)&&Xe.Map.isMap(t)?t.get(\"$$ref\")?t:(0,Xe.OrderedMap)().mergeWith(mergerFn,e,t):t,Wr=(0,Pt.createSelector)(spec_selectors_state,(e=>(0,Xe.OrderedMap)().mergeWith(mergerFn,e.get(\"json\"),e.get(\"resolvedSubtrees\")))),spec=e=>Fr(e),Hr=(0,Pt.createSelector)(spec,(()=>!1)),Gr=(0,Pt.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"info\")))),Xr=(0,Pt.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"externalDocs\")))),Yr=(0,Pt.createSelector)(Gr,(e=>e&&e.get(\"version\"))),Qr=(0,Pt.createSelector)(Yr,(e=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(e).slice(1))),Zr=(0,Pt.createSelector)(Wr,(e=>e.get(\"paths\"))),en=(0,Lr.default)([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),tn=(0,Pt.createSelector)(Zr,(e=>{let t=(0,Xe.List)();return!Xe.Map.isMap(e)||e.isEmpty()||e.forEach(((e,r)=>{if(!e||!e.forEach)return{};e.forEach(((e,n)=>{Ur.indexOf(n)<0||(t=t.push((0,Xe.fromJS)({path:r,method:n,operation:e,id:`${n}-${r}`})))}))})),t})),rn=(0,Pt.createSelector)(spec,(e=>(0,Xe.Set)(e.get(\"consumes\")))),nn=(0,Pt.createSelector)(spec,(e=>(0,Xe.Set)(e.get(\"produces\")))),an=(0,Pt.createSelector)(spec,(e=>e.get(\"security\",(0,Xe.List)()))),on=(0,Pt.createSelector)(spec,(e=>e.get(\"securityDefinitions\"))),findDefinition=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"definitions\",t],null),n=e.getIn([\"json\",\"definitions\",t],null);return r||n||null},sn=(0,Pt.createSelector)(spec,(e=>{const t=e.get(\"definitions\");return Xe.Map.isMap(t)?t:(0,Xe.Map)()})),ln=(0,Pt.createSelector)(spec,(e=>e.get(\"basePath\"))),cn=(0,Pt.createSelector)(spec,(e=>e.get(\"host\"))),un=(0,Pt.createSelector)(spec,(e=>e.get(\"schemes\",(0,Xe.Map)()))),dn=(0,Pt.createSelector)([tn,rn,nn],((e,t,r)=>e.map((e=>e.update(\"operation\",(e=>Xe.Map.isMap(e)?e.withMutations((e=>(e.get(\"consumes\")||e.update(\"consumes\",(e=>(0,Xe.Set)(e).merge(t))),e.get(\"produces\")||e.update(\"produces\",(e=>(0,Xe.Set)(e).merge(r))),e))):(0,Xe.Map)())))))),pn=(0,Pt.createSelector)(spec,(e=>{const t=e.get(\"tags\",(0,Xe.List)());return Xe.List.isList(t)?t.filter((e=>Xe.Map.isMap(e))):(0,Xe.List)()})),tagDetails=(e,t)=>(pn(e)||(0,Xe.List)()).filter(Xe.Map.isMap).find((e=>e.get(\"name\")===t),(0,Xe.Map)()),mn=(0,Pt.createSelector)(dn,pn,((e,t)=>e.reduce(((e,t)=>{let r=(0,Xe.Set)(t.getIn([\"operation\",\"tags\"]));return r.count()<1?e.update(\"default\",(0,Xe.List)(),(e=>e.push(t))):r.reduce(((e,r)=>e.update(r,(0,Xe.List)(),(e=>e.push(t)))),e)}),t.reduce(((e,t)=>e.set(t.get(\"name\"),(0,Xe.List)())),(0,Xe.OrderedMap)())))),selectors_taggedOperations=e=>({getConfigs:t})=>{let{tagsSorter:r,operationsSorter:n}=t();return mn(e).sortBy(((e,t)=>t),((e,t)=>{let n=\"function\"==typeof r?r:xt.tagsSorter[r];return n?n(e,t):null})).map(((t,r)=>{let a=\"function\"==typeof n?n:xt.operationsSorter[n],o=a?t.sort(a):t;return(0,Xe.Map)({tagDetails:tagDetails(e,r),operations:o})}))},fn=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"responses\",(0,Xe.Map)()))),hn=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"requests\",(0,Xe.Map)()))),gn=(0,Pt.createSelector)(spec_selectors_state,(e=>e.get(\"mutatedRequests\",(0,Xe.Map)()))),responseFor=(e,t,r)=>fn(e).getIn([t,r],null),requestFor=(e,t,r)=>hn(e).getIn([t,r],null),mutatedRequestFor=(e,t,r)=>gn(e).getIn([t,r],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(e,t,r)=>{const n=Wr(e).getIn([\"paths\",...t,\"parameters\"],(0,Xe.OrderedMap)()),a=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,Xe.OrderedMap)());return n.map((e=>{const t=a.get(`${r.get(\"in\")}.${r.get(\"name\")}`),n=a.get(`${r.get(\"in\")}.${r.get(\"name\")}.hash-${r.hashCode()}`);return(0,Xe.OrderedMap)().merge(e,t,n)})).find((e=>e.get(\"in\")===r.get(\"in\")&&e.get(\"name\")===r.get(\"name\")),(0,Xe.OrderedMap)())},parameterInclusionSettingFor=(e,t,r,n)=>{const a=`${n}.${r}`;return e.getIn([\"meta\",\"paths\",...t,\"parameter_inclusions\",a],!1)},parameterWithMeta=(e,t,r,n)=>{const a=Wr(e).getIn([\"paths\",...t,\"parameters\"],(0,Xe.OrderedMap)()).find((e=>e.get(\"in\")===n&&e.get(\"name\")===r),(0,Xe.OrderedMap)());return parameterWithMetaByIdentity(e,t,a)},operationWithMeta=(e,t,r)=>{const n=Wr(e).getIn([\"paths\",t,r],(0,Xe.OrderedMap)()),a=e.getIn([\"meta\",\"paths\",t,r],(0,Xe.OrderedMap)()),o=n.get(\"parameters\",(0,Xe.List)()).map((n=>parameterWithMetaByIdentity(e,[t,r],n)));return(0,Xe.OrderedMap)().merge(n,a).set(\"parameters\",o)};function getParameter(e,t,r,n){return t=t||[],e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,Xe.fromJS)([])).find((e=>Xe.Map.isMap(e)&&e.get(\"name\")===r&&e.get(\"in\")===n))||(0,Xe.Map)()}const yn=(0,Pt.createSelector)(spec,(e=>{const t=e.get(\"host\");return\"string\"==typeof t&&t.length>0&&\"/\"!==t[0]}));function parameterValues(e,t,r){return t=t||[],operationWithMeta(e,...t).get(\"parameters\",(0,Xe.List)()).reduce(((e,t)=>{let n=r&&\"body\"===t.get(\"in\")?t.get(\"value_xml\"):t.get(\"value\");return Xe.List.isList(n)&&(n=n.filter((e=>\"\"!==e))),e.set(paramToIdentifier(t,{allowHashes:!1}),n)}),(0,Xe.fromJS)({}))}function parametersIncludeIn(e,t=\"\"){if(Xe.List.isList(e))return e.some((e=>Xe.Map.isMap(e)&&e.get(\"in\")===t))}function parametersIncludeType(e,t=\"\"){if(Xe.List.isList(e))return e.some((e=>Xe.Map.isMap(e)&&e.get(\"type\")===t))}function contentTypeValues(e,t){t=t||[];let r=Wr(e).getIn([\"paths\",...t],(0,Xe.fromJS)({})),n=e.getIn([\"meta\",\"paths\",...t],(0,Xe.fromJS)({})),a=currentProducesFor(e,t);const o=r.get(\"parameters\")||new Xe.List,s=n.get(\"consumes_value\")?n.get(\"consumes_value\"):parametersIncludeType(o,\"file\")?\"multipart/form-data\":parametersIncludeType(o,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,Xe.fromJS)({requestContentType:s,responseContentType:a})}function currentProducesFor(e,t){t=t||[];const r=Wr(e).getIn([\"paths\",...t],null);if(null===r)return;const n=e.getIn([\"meta\",\"paths\",...t,\"produces_value\"],null),a=r.getIn([\"produces\",0],null);return n||a||\"application/json\"}function producesOptionsFor(e,t){t=t||[];const r=Wr(e),n=r.getIn([\"paths\",...t],null);if(null===n)return;const[a]=t,o=n.get(\"produces\",null),s=r.getIn([\"paths\",a,\"produces\"],null),l=r.getIn([\"produces\"],null);return o||s||l}function consumesOptionsFor(e,t){t=t||[];const r=Wr(e),n=r.getIn([\"paths\",...t],null);if(null===n)return;const[a]=t,o=n.get(\"consumes\",null),s=r.getIn([\"paths\",a,\"consumes\"],null),l=r.getIn([\"consumes\"],null);return o||s||l}const operationScheme=(e,t,r)=>{let n=e.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),a=Array.isArray(n)?n[1]:null;return e.getIn([\"scheme\",t,r])||e.getIn([\"scheme\",\"_defaultScheme\"])||a||\"\"},canExecuteScheme=(e,t,r)=>[\"http\",\"https\"].indexOf(operationScheme(e,t,r))>-1,validationErrors=(e,t)=>{t=t||[];const r=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,Xe.fromJS)([])),n=[];if(0===r.length)return n;const getErrorsWithPaths=(e,t=[])=>{const getNestedErrorsWithPaths=(e,t)=>{const r=[...t,e.get(\"propKey\")||e.get(\"index\")];return Xe.Map.isMap(e.get(\"error\"))?getErrorsWithPaths(e.get(\"error\"),r):{error:e.get(\"error\"),path:r}};return Xe.List.isList(e)?e.map((e=>Xe.Map.isMap(e)?getNestedErrorsWithPaths(e,t):{error:e,path:t})):getNestedErrorsWithPaths(e,t)};return r.forEach(((e,t)=>{const r=t.split(\".\").slice(1,-1).join(\".\"),a=e.get(\"errors\");if(a&&a.count()){getErrorsWithPaths(a).forEach((({error:e,path:t})=>{n.push(((e,t,r)=>`For '${r}'${(t=t.reduce(((e,t)=>\"number\"==typeof t?`${e}[${t}]`:e?`${e}.${t}`:t),\"\"))?` at path '${t}'`:\"\"}: ${e}.`)(e,t,r))}))}})),n},validateBeforeExecute=(e,t)=>0===validationErrors(e,t).length,getOAS3RequiredRequestBodyContentType=(e,t)=>{let r={requestBody:!1,requestContentType:{}},n=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\"],(0,Xe.fromJS)([]));return n.size<1||(n.getIn([\"required\"])&&(r.requestBody=n.getIn([\"required\"])),n.getIn([\"content\"]).entrySeq().forEach((e=>{const t=e[0];if(e[1].getIn([\"schema\",\"required\"])){const n=e[1].getIn([\"schema\",\"required\"]).toJS();r.requestContentType[t]=n}}))),r},isMediaTypeSchemaPropertiesEqual=(e,t,r,n)=>{if((r||n)&&r===n)return!0;let a=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\",\"content\"],(0,Xe.fromJS)([]));if(a.size<2||!r||!n)return!1;let o=a.getIn([r,\"schema\",\"properties\"],(0,Xe.fromJS)([])),s=a.getIn([n,\"schema\",\"properties\"],(0,Xe.fromJS)([]));return!!o.equals(s)};function returnSelfOrNewMap(e){return Xe.Map.isMap(e)?e:new Xe.Map}var En=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return B.default}}),Sn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return M.default}}),_n=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return q.default}}),vn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return L.default}});const bn=\"spec_update_spec\",wn=\"spec_update_url\",Cn=\"spec_update_json\",xn=\"spec_update_param\",On=\"spec_update_empty_param_inclusion\",kn=\"spec_validate_param\",Nn=\"spec_set_response\",An=\"spec_set_request\",In=\"spec_set_mutated_request\",jn=\"spec_log_request\",Rn=\"spec_clear_response\",Tn=\"spec_clear_request\",Pn=\"spec_clear_validate_param\",Bn=\"spec_update_operation_meta_value\",Mn=\"spec_update_resolved\",qn=\"spec_update_resolved_subtree\",Ln=\"set_scheme\",toStr=e=>(0,En.default)(e)?e:\"\";function updateSpec(e){const t=toStr(e).replace(/\\t/g,\"  \");if(\"string\"==typeof e)return{type:bn,payload:t}}function updateResolved(e){return{type:Mn,payload:e}}function updateUrl(e){return{type:wn,payload:e}}function updateJsonSpec(e){return{type:Cn,payload:e}}const parseToJson=e=>({specActions:t,specSelectors:r,errActions:n})=>{let{specStr:a}=r,o=null;try{e=e||a(),n.clear({source:\"parser\"}),o=Jt.default.load(e,{schema:Jt.JSON_SCHEMA})}catch(e){return console.error(e),n.newSpecErr({source:\"parser\",level:\"error\",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return o&&\"object\"==typeof o?t.updateJsonSpec(o):t.updateJsonSpec({})};let Un=!1;const resolveSpec=(e,t)=>({specActions:r,specSelectors:n,errActions:a,fn:{fetch:o,resolve:s,AST:l={}},getConfigs:i})=>{Un||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),Un=!0);const{modelPropertyMacro:c,parameterMacro:u,requestInterceptor:d,responseInterceptor:p}=i();void 0===e&&(e=n.specJson()),void 0===t&&(t=n.url());let m=l.getLineNumberForPath?l.getLineNumberForPath:()=>{},f=n.specStr();return s({fetch:o,spec:e,baseDoc:String(new URL(t,document.baseURI)),modelPropertyMacro:c,parameterMacro:u,requestInterceptor:d,responseInterceptor:p}).then((({spec:e,errors:t})=>{if(a.clear({type:\"thrown\"}),Array.isArray(t)&&t.length>0){let e=t.map((e=>(console.error(e),e.line=e.fullPath?m(f,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));a.newThrownErrBatch(e)}return r.updateResolved(e)}))};let Dn=[];const $n=(0,Sn.default)((()=>{const e=Dn.reduce(((e,{path:t,system:r})=>(e.has(r)||e.set(r,[]),e.get(r).push(t),e)),new Map);Dn=[],e.forEach((async(e,t)=>{if(!t)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!t.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:r,errSelectors:n,fn:{resolveSubtree:a,fetch:o,AST:s={}},specSelectors:l,specActions:i}=t,c=s.getLineNumberForPath??(0,Lr.default)(void 0),u=l.specStr(),{modelPropertyMacro:d,parameterMacro:p,requestInterceptor:m,responseInterceptor:f}=t.getConfigs();try{const t=await e.reduce((async(e,t)=>{let{resultMap:s,specWithCurrentSubtrees:i}=await e;const{errors:h,spec:g}=await a(i,t,{baseDoc:String(new URL(l.url(),document.baseURI)),modelPropertyMacro:d,parameterMacro:p,requestInterceptor:m,responseInterceptor:f});if(n.allErrors().size&&r.clearBy((e=>\"thrown\"!==e.get(\"type\")||\"resolver\"!==e.get(\"source\")||!e.get(\"fullPath\")?.every(((e,r)=>e===t[r]||void 0===t[r])))),Array.isArray(h)&&h.length>0){let e=h.map((e=>(e.line=e.fullPath?c(u,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));r.newThrownErrBatch(e)}return g&&l.isOAS3()&&\"components\"===t[0]&&\"securitySchemes\"===t[1]&&await Promise.all(Object.values(g).filter((e=>\"openIdConnect\"===e?.type)).map((async e=>{const t={url:e.openIdConnectUrl,requestInterceptor:m,responseInterceptor:f};try{const r=await o(t);r instanceof Error||r.status>=400?console.error(r.statusText+\" \"+t.url):e.openIdConnectData=JSON.parse(r.text)}catch(e){console.error(e)}}))),(0,_n.default)(s,t,g),i=(0,vn.default)(t,g,i),{resultMap:s,specWithCurrentSubtrees:i}}),Promise.resolve({resultMap:(l.specResolvedSubtree([])||(0,Xe.Map)()).toJS(),specWithCurrentSubtrees:l.specJS()}));i.updateResolvedSubtree([],t.resultMap)}catch(e){console.error(e)}}))}),35),requestResolvedSubtree=e=>t=>{Dn.find((({path:r,system:n})=>n===t&&r.toString()===e.toString()))||(Dn.push({path:e,system:t}),$n())};function changeParam(e,t,r,n,a){return{type:xn,payload:{path:e,value:n,paramName:t,paramIn:r,isXml:a}}}function changeParamByIdentity(e,t,r,n){return{type:xn,payload:{path:e,param:t,value:r,isXml:n}}}const updateResolvedSubtree=(e,t)=>({type:qn,payload:{path:e,value:t}}),invalidateResolvedSubtreeCache=()=>({type:qn,payload:{path:[],value:(0,Xe.Map)()}}),validateParams=(e,t)=>({type:kn,payload:{pathMethod:e,isOAS3:t}}),updateEmptyParamInclusion=(e,t,r,n)=>({type:On,payload:{pathMethod:e,paramName:t,paramIn:r,includeEmptyValue:n}});function clearValidateParams(e){return{type:Pn,payload:{pathMethod:e}}}function changeConsumesValue(e,t){return{type:Bn,payload:{path:e,value:t,key:\"consumes_value\"}}}function changeProducesValue(e,t){return{type:Bn,payload:{path:e,value:t,key:\"produces_value\"}}}const setResponse=(e,t,r)=>({payload:{path:e,method:t,res:r},type:Nn}),setRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:An}),setMutatedRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:In}),logRequest=e=>({payload:e,type:jn}),executeRequest=e=>({fn:t,specActions:r,specSelectors:n,getConfigs:a,oas3Selectors:o})=>{let{pathName:s,method:l,operation:i}=e,{requestInterceptor:c,responseInterceptor:u}=a(),d=i.toJS();if(i&&i.get(\"parameters\")&&i.get(\"parameters\").filter((e=>e&&!0===e.get(\"allowEmptyValue\"))).forEach((t=>{if(n.parameterInclusionSettingFor([s,l],t.get(\"name\"),t.get(\"in\"))){e.parameters=e.parameters||{};const r=paramToValue(t,e.parameters);(!r||r&&0===r.size)&&(e.parameters[t.get(\"name\")]=\"\")}})),e.contextUrl=(0,Ot.default)(n.url()).toString(),d&&d.operationId?e.operationId=d.operationId:d&&s&&l&&(e.operationId=t.opId(d,s,l)),n.isOAS3()){const t=`${s}:${l}`;e.server=o.selectedServer(t)||o.selectedServer();const r=o.serverVariables({server:e.server,namespace:t}).toJS(),n=o.serverVariables({server:e.server}).toJS();e.serverVariables=Object.keys(r).length?r:n,e.requestContentType=o.requestContentType(s,l),e.responseContentType=o.responseContentType(s,l)||\"*/*\";const a=o.requestBodyValue(s,l),i=o.requestBodyInclusionSetting(s,l);a&&a.toJS?e.requestBody=a.map((e=>Xe.Map.isMap(e)?e.get(\"value\"):e)).filter(((e,t)=>(Array.isArray(e)?0!==e.length:!isEmptyValue(e))||i.get(t))).toJS():e.requestBody=a}let p=Object.assign({},e);p=t.buildRequest(p),r.setRequest(e.pathName,e.method,p);e.requestInterceptor=async t=>{let n=await c.apply(void 0,[t]),a=Object.assign({},n);return r.setMutatedRequest(e.pathName,e.method,a),n},e.responseInterceptor=u;const m=Date.now();return t.execute(e).then((t=>{t.duration=Date.now()-m,r.setResponse(e.pathName,e.method,t)})).catch((t=>{\"Failed to fetch\"===t.message&&(t.name=\"\",t.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),r.setResponse(e.pathName,e.method,{error:!0,err:t})}))},actions_execute=({path:e,method:t,...r}={})=>n=>{let{fn:{fetch:a},specSelectors:o,specActions:s}=n,l=o.specJsonWithResolvedSubtrees().toJS(),i=o.operationScheme(e,t),{requestContentType:c,responseContentType:u}=o.contentTypeValues([e,t]).toJS(),d=/xml/i.test(c),p=o.parameterValues([e,t],d).toJS();return s.executeRequest({...r,fetch:a,spec:l,pathName:e,method:t,parameters:p,requestContentType:c,scheme:i,responseContentType:u})};function clearResponse(e,t){return{type:Rn,payload:{path:e,method:t}}}function clearRequest(e,t){return{type:Tn,payload:{path:e,method:t}}}function setScheme(e,t,r){return{type:Ln,payload:{scheme:e,path:t,method:r}}}var Vn={[bn]:(e,t)=>\"string\"==typeof t.payload?e.set(\"spec\",t.payload):e,[wn]:(e,t)=>e.set(\"url\",t.payload+\"\"),[Cn]:(e,t)=>e.set(\"json\",fromJSOrdered(t.payload)),[Mn]:(e,t)=>e.setIn([\"resolved\"],fromJSOrdered(t.payload)),[qn]:(e,t)=>{const{value:r,path:n}=t.payload;return e.setIn([\"resolvedSubtrees\",...n],fromJSOrdered(r))},[xn]:(e,{payload:t})=>{let{path:r,paramName:n,paramIn:a,param:o,value:s,isXml:l}=t,i=o?paramToIdentifier(o):`${a}.${n}`;const c=l?\"value_xml\":\"value\";return e.setIn([\"meta\",\"paths\",...r,\"parameters\",i,c],(0,Xe.fromJS)(s))},[On]:(e,{payload:t})=>{let{pathMethod:r,paramName:n,paramIn:a,includeEmptyValue:o}=t;if(!n||!a)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),e;const s=`${a}.${n}`;return e.setIn([\"meta\",\"paths\",...r,\"parameter_inclusions\",s],o)},[kn]:(e,{payload:{pathMethod:t,isOAS3:r}})=>{const n=Wr(e).getIn([\"paths\",...t]),a=parameterValues(e,t).toJS();return e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,Xe.fromJS)({}),(o=>n.get(\"parameters\",(0,Xe.List)()).reduce(((n,o)=>{const s=paramToValue(o,a),l=parameterInclusionSettingFor(e,t,o.get(\"name\"),o.get(\"in\")),i=((e,t,{isOAS3:r=!1,bypassRequiredCheck:n=!1}={})=>{let a=e.get(\"required\"),{schema:o,parameterContentMediaType:s}=getParameterSchema(e,{isOAS3:r});return validateValueBySchema(t,o,a,n,s)})(o,s,{bypassRequiredCheck:l,isOAS3:r});return n.setIn([paramToIdentifier(o),\"errors\"],(0,Xe.fromJS)(i))}),o)))},[Pn]:(e,{payload:{pathMethod:t}})=>e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,Xe.fromJS)([]),(e=>e.map((e=>e.set(\"errors\",(0,Xe.fromJS)([])))))),[Nn]:(e,{payload:{res:t,path:r,method:n}})=>{let a;a=t.error?Object.assign({error:!0,name:t.err.name,message:t.err.message,statusCode:t.err.statusCode},t.err.response):t,a.headers=a.headers||{};let o=e.setIn([\"responses\",r,n],fromJSOrdered(a));return ct.Blob&&a.data instanceof ct.Blob&&(o=o.setIn([\"responses\",r,n,\"text\"],a.data)),o},[An]:(e,{payload:{req:t,path:r,method:n}})=>e.setIn([\"requests\",r,n],fromJSOrdered(t)),[In]:(e,{payload:{req:t,path:r,method:n}})=>e.setIn([\"mutatedRequests\",r,n],fromJSOrdered(t)),[Bn]:(e,{payload:{path:t,value:r,key:n}})=>{let a=[\"paths\",...t],o=[\"meta\",\"paths\",...t];return e.getIn([\"json\",...a])||e.getIn([\"resolved\",...a])||e.getIn([\"resolvedSubtrees\",...a])?e.setIn([...o,n],(0,Xe.fromJS)(r)):e},[Rn]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"responses\",t,r]),[Tn]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"requests\",t,r]),[Ln]:(e,{payload:{scheme:t,path:r,method:n}})=>r&&n?e.setIn([\"scheme\",r,n],t):r||n?void 0:e.setIn([\"scheme\",\"_defaultScheme\"],t)};const wrap_actions_updateSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.parseToJson(...r)},wrap_actions_updateJsonSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.invalidateResolvedSubtreeCache();const[n]=r,a=(0,Zt.default)(n,[\"paths\"])||{};Object.keys(a).forEach((e=>{const r=(0,Zt.default)(a,[e]);(0,Cr.default)(r)&&r.$ref&&t.requestResolvedSubtree([\"paths\",e])})),t.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(e,{specActions:t})=>r=>(t.logRequest(r),e(r)),wrap_actions_validateParams=(e,{specSelectors:t})=>r=>e(r,t.isOAS3());var plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...$e},reducers:{...Vn},actions:{...De},selectors:{...Ue}}}}),Jn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return U.default}}),Fn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return D.default}}),zn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return $.default}}),Kn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return V.default}}),Wn=function(e){var t={};return __webpack_require__.d(t,e),t}({makeResolve:function(){return J.makeResolve}}),Hn=function(e){var t={};return __webpack_require__.d(t,e),t}({buildRequest:function(){return F.buildRequest},execute:function(){return F.execute}}),Gn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return z.default},makeHttp:function(){return z.makeHttp},serializeRes:function(){return z.serializeRes}}),Xn=function(e){var t={};return __webpack_require__.d(t,e),t}({makeResolveSubtree:function(){return K.makeResolveSubtree}}),Yn=function(e){var t={};return __webpack_require__.d(t,e),t}({opId:function(){return W.opId}});const configs_wrap_actions_loaded=(e,t)=>(...r)=>{e(...r);const n=t.getConfigs().withCredentials;t.fn.fetch.withCredentials=n};function swagger_client({configs:e,getConfigs:t}){return{fn:{fetch:(0,Gn.makeHttp)(Gn.default,e.preFetch,e.postFetch),buildRequest:Hn.buildRequest,execute:Hn.execute,resolve:(0,Wn.makeResolve)({strategies:[Kn.default,zn.default,Fn.default,Jn.default]}),resolveSubtree:async(e,r,n={})=>{const a=t(),o={modelPropertyMacro:a.modelPropertyMacro,parameterMacro:a.parameterMacro,requestInterceptor:a.requestInterceptor,responseInterceptor:a.responseInterceptor,strategies:[Kn.default,zn.default,Fn.default,Jn.default]};return(0,Xn.makeResolveSubtree)(o)(e,r,n)},serializeRes:Gn.serializeRes,opId:Yn.opId},statePlugins:{configs:{wrapActions:{loaded:configs_wrap_actions_loaded}}}}}function util(){return{fn:{shallowEqualKeys,sanitizeUrl}}}var Qn=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return H.default}}),Zn=function(e){var t={};return __webpack_require__.d(t,e),t}({Provider:function(){return G.Provider},connect:function(){return G.connect}}),ea=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return X.default}});const withSystem=e=>t=>{const{fn:r}=e();class WithSystem extends He.Component{render(){return He.default.createElement(t,(0,ar.default)({},e(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${r.getDisplayName(t)})`,WithSystem},withRoot=(e,t)=>r=>{const{fn:n}=e();class WithRoot extends He.Component{render(){return He.default.createElement(Zn.Provider,{store:t},He.default.createElement(r,(0,ar.default)({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${n.getDisplayName(r)})`,WithRoot},withConnect=(e,t,r)=>(0,Ge.compose)(r?withRoot(e,r):ea.default,(0,Zn.connect)(((r,n)=>{const a={...n,...e()},o=t.prototype?.mapStateToProps||(e=>({state:e}));return o(r,a)})),withSystem(e))(t),handleProps=(e,t,r,n)=>{for(const a in t){const o=t[a];\"function\"==typeof o&&o(r[a],n[a],e())}},withMappedContainer=(e,t,r)=>(t,n)=>{const{fn:a}=e(),o=r(t,\"root\");class WithMappedContainer extends He.Component{constructor(t,r){super(t,r),handleProps(e,n,t,{})}UNSAFE_componentWillReceiveProps(t){handleProps(e,n,t,this.props)}render(){const e=(0,Dt.default)(this.props,n?Object.keys(n):[]);return He.default.createElement(o,e)}}return WithMappedContainer.displayName=`WithMappedContainer(${a.getDisplayName(o)})`,WithMappedContainer},render=(e,t,r,n)=>a=>{const o=r(e,t,n)(\"App\",\"root\"),{createRoot:s}=Qn.default;s(a).render(He.default.createElement(o,null))},getComponent=(e,t,r)=>(n,a,o={})=>{if(\"string\"!=typeof n)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof n);const s=r(n);return s?a?\"root\"===a?withConnect(e,s,t()):withConnect(e,s):s:(o.failSilently||e().log.warn(\"Could not find component:\",n),null)},getDisplayName=e=>e.displayName||e.name||\"Component\";var view=({getComponents:e,getStore:t,getSystem:r})=>{const n=(a=getComponent(r,t,e),Ct(a,((...e)=>JSON.stringify(e))));var a;const o=(e=>utils_memoizeN(e,((...e)=>e)))(withMappedContainer(r,0,n));return{rootInjects:{getComponent:n,makeMappedContainer:o,render:render(r,t,getComponent,e)},fn:{getDisplayName}}};var view_legacy=({React:e,getSystem:t,getStore:r,getComponents:n})=>{const a={},o=parseInt(e?.version,10);return o>=16&&o<18&&(a.render=((e,t,r,n)=>a=>{const o=r(e,t,n)(\"App\",\"root\");Qn.default.render(He.default.createElement(o,null),a)})(t,r,getComponent,n)),{rootInjects:a}};function downloadUrlPlugin(e){let{fn:t}=e;const r={download:e=>({errActions:r,specSelectors:n,specActions:a,getConfigs:o})=>{let{fetch:s}=t;const l=o();function next(t){if(t instanceof Error||t.status>=400)return a.updateLoadingStatus(\"failed\"),r.newThrownErr(Object.assign(new Error((t.message||t.statusText)+\" \"+e),{source:\"fetch\"})),void(!t.status&&t instanceof Error&&function checkPossibleFailReasons(){try{let t;if(\"URL\"in ct?t=new URL(e):(t=document.createElement(\"a\"),t.href=e),\"https:\"!==t.protocol&&\"https:\"===ct.location.protocol){const e=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${t.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void r.newThrownErr(e)}if(t.origin!==ct.location.origin){const e=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${t.origin}) does not match the page (${ct.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});r.newThrownErr(e)}}catch(e){return}}());a.updateLoadingStatus(\"success\"),a.updateSpec(t.text),n.url()!==e&&a.updateUrl(e)}e=e||n.url(),a.updateLoadingStatus(\"loading\"),r.clear({source:\"fetch\"}),s({url:e,loadSpec:!0,requestInterceptor:l.requestInterceptor||(e=>e),responseInterceptor:l.responseInterceptor||(e=>e),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:e=>{let t=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===t.indexOf(e)&&console.error(`Error: ${e} is not one of ${JSON.stringify(t)}`),{type:\"spec_update_loading_status\",payload:e}}};let n={loadingStatus:(0,Pt.createSelector)((e=>e||(0,Xe.Map)()),(e=>e.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:r,reducers:{spec_update_loading_status:(e,t)=>\"string\"==typeof t.payload?e.set(\"loadingStatus\",t.payload):e},selectors:n}}}}var ta=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Y.default}}),ra=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Q.default}}),na=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Z.default}}),aa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ee.default}}),oa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return te.default}}),sa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return re.default}}),la=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ne.default}}),ia=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ae.default}});var after_load=()=>{ta.default.registerLanguage(\"json\",na.default),ta.default.registerLanguage(\"js\",ra.default),ta.default.registerLanguage(\"xml\",aa.default),ta.default.registerLanguage(\"yaml\",sa.default),ta.default.registerLanguage(\"http\",la.default),ta.default.registerLanguage(\"bash\",oa.default),ta.default.registerLanguage(\"powershell\",ia.default),ta.default.registerLanguage(\"javascript\",ra.default)},ca=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return oe.default}}),ua=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return se.default}}),da=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return le.default}}),pa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ie.default}}),ma=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ce.default}}),fa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ue.default}}),ha=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return de.default}});const ga={agate:ca.default,arta:ua.default,monokai:da.default,nord:pa.default,obsidian:ma.default,\"tomorrow-night\":fa.default,idea:ha.default},ya=ca.default;var components_SyntaxHighlighter=({language:e,className:t=\"\",getConfigs:r,syntaxHighlighting:n={},children:a=\"\"})=>{const o=r().syntaxHighlight.theme,{styles:s,defaultStyle:l}=n,i=s?.[o]??l;return He.default.createElement(ta.default,{language:e,className:t,style:i},a)},Ea=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return pe.default}});var components_HighlightCode=({fileName:e=\"response.txt\",className:t,downloadable:r,getComponent:n,canCopy:a,language:o,children:s})=>{const l=(0,He.useRef)(null),i=n(\"SyntaxHighlighter\",!0),handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:n,offsetHeight:a,scrollTop:o}=t;n>a&&(0===o&&r<0||a+o>=n&&r>0)&&e.preventDefault()};return(0,He.useEffect)((()=>{const e=Array.from(l.current.childNodes).filter((e=>!!e.nodeType&&e.classList.contains(\"microlight\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s,t,o]),He.default.createElement(\"div\",{className:\"highlight-code\",ref:l},a&&He.default.createElement(\"div\",{className:\"copy-to-clipboard\"},He.default.createElement(gr.CopyToClipboard,{text:s},He.default.createElement(\"button\",null))),r?He.default.createElement(\"button\",{className:\"download-contents\",onClick:()=>{(0,Ea.default)(s,e)}},\"Download\"):null,He.default.createElement(i,{language:o,className:(0,hr.default)(t,\"microlight\"),renderPlainText:({children:e,PlainTextViewer:r})=>He.default.createElement(r,{className:t},e)},s))};var components_PlainTextViewer=({className:e=\"\",children:t})=>He.default.createElement(\"pre\",{className:(0,hr.default)(\"microlight\",e)},t);var wrap_components_SyntaxHighlighter=(e,t)=>({renderPlainText:r,children:n,...a})=>{const o=t.getConfigs().syntaxHighlight.activated,s=t.getComponent(\"PlainTextViewer\");return o||\"function\"!=typeof r?o?He.default.createElement(e,a,n):He.default.createElement(s,null,n):r({children:n,PlainTextViewer:s})};const SyntaxHighlightingPlugin1=()=>({afterLoad:after_load,rootInjects:{syntaxHighlighting:{styles:ga,defaultStyle:ya}},components:{SyntaxHighlighter:components_SyntaxHighlighter,HighlightCode:components_HighlightCode,PlainTextViewer:components_PlainTextViewer}}),SyntaxHighlightingPlugin2=()=>({wrapComponents:{SyntaxHighlighter:wrap_components_SyntaxHighlighter}});var syntax_highlighting=()=>[SyntaxHighlightingPlugin1,SyntaxHighlightingPlugin2];var versions_after_load=()=>{const{GIT_DIRTY:e,GIT_COMMIT:t,PACKAGE_VERSION:r,BUILD_TIME:n}={PACKAGE_VERSION:\"5.24.2\",GIT_COMMIT:\"gf714aff1\",GIT_DIRTY:!0,BUILD_TIME:\"Mon, 16 Jun 2025 12:49:08 GMT\"};ct.versions=ct.versions||{},ct.versions.swaggerUI={version:r,gitRevision:t,gitDirty:e,buildTimestamp:n}};var versions=()=>({afterLoad:versions_after_load}),Sa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return me.default}});const _a=console.error,withErrorBoundary=e=>t=>{const{getComponent:r,fn:n}=e(),a=r(\"ErrorBoundary\"),o=n.getDisplayName(t);class WithErrorBoundary extends He.Component{render(){return He.default.createElement(a,{targetName:o,getComponent:r,fn:n},He.default.createElement(t,(0,ar.default)({},this.props,this.context)))}}var s;return WithErrorBoundary.displayName=`WithErrorBoundary(${o})`,(s=t).prototype&&s.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=t.prototype.mapStateToProps),WithErrorBoundary};var fallback=({name:e})=>He.default.createElement(\"div\",{className:\"fallback\"},\"😱 \",He.default.createElement(\"i\",null,\"Could not render \",\"t\"===e?\"this component\":e,\", see the console.\"));class ErrorBoundary extends He.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:_a},children:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}constructor(...e){super(...e),this.state={hasError:!1,error:null}}componentDidCatch(e,t){this.props.fn.componentDidCatch(e,t)}render(){const{getComponent:e,targetName:t,children:r}=this.props;if(this.state.hasError){const r=e(\"Fallback\");return He.default.createElement(r,{name:t})}return r}}var va=ErrorBoundary;var safe_render=({componentList:e=[],fullOverride:t=!1}={})=>({getSystem:r})=>{const n=t?e:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...e],a=(0,Sa.default)(n,Array(n.length).fill(((e,{fn:t})=>t.withErrorBoundary(e))));return{fn:{componentDidCatch:_a,withErrorBoundary:withErrorBoundary(r)},components:{ErrorBoundary:va,Fallback:fallback},wrapComponents:a}};class App extends He.default.Component{getLayout(){const{getComponent:e,layoutSelectors:t}=this.props,r=t.current(),n=e(r,!0);return n||(()=>He.default.createElement(\"h1\",null,' No layout defined for \"',r,'\" '))}render(){const e=this.getLayout();return He.default.createElement(e,null)}}var ba=App;class AuthorizationPopup extends He.default.Component{close=()=>{let{authActions:e}=this.props;e.showDefinitions(!1)};render(){let{authSelectors:e,authActions:t,getComponent:r,errSelectors:n,specSelectors:a,fn:{AST:o={}}}=this.props,s=e.shownDefinitions();const l=r(\"auths\"),i=r(\"CloseIcon\");return He.default.createElement(\"div\",{className:\"dialog-ux\"},He.default.createElement(\"div\",{className:\"backdrop-ux\"}),He.default.createElement(\"div\",{className:\"modal-ux\"},He.default.createElement(\"div\",{className:\"modal-dialog-ux\"},He.default.createElement(\"div\",{className:\"modal-ux-inner\"},He.default.createElement(\"div\",{className:\"modal-ux-header\"},He.default.createElement(\"h3\",null,\"Available authorizations\"),He.default.createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},He.default.createElement(i,null))),He.default.createElement(\"div\",{className:\"modal-ux-content\"},s.valueSeq().map(((s,i)=>He.default.createElement(l,{key:i,AST:o,definitions:s,getComponent:r,errSelectors:n,authSelectors:e,authActions:t,specSelectors:a}))))))))}}class AuthorizeBtn extends He.default.Component{render(){let{isAuthorized:e,showPopup:t,onClick:r,getComponent:n}=this.props;const a=n(\"authorizationPopup\",!0),o=n(\"LockAuthIcon\",!0),s=n(\"UnlockAuthIcon\",!0);return He.default.createElement(\"div\",{className:\"auth-wrapper\"},He.default.createElement(\"button\",{className:e?\"btn authorize locked\":\"btn authorize unlocked\",onClick:r},He.default.createElement(\"span\",null,\"Authorize\"),e?He.default.createElement(o,null):He.default.createElement(s,null)),t&&He.default.createElement(a,null))}}class AuthorizeBtnContainer extends He.default.Component{render(){const{authActions:e,authSelectors:t,specSelectors:r,getComponent:n}=this.props,a=r.securityDefinitions(),o=t.definitionsToAuthorize(),s=n(\"authorizeBtn\");return a?He.default.createElement(s,{onClick:()=>e.showDefinitions(o),isAuthorized:!!t.authorized().size,showPopup:!!t.shownDefinitions(),getComponent:n}):null}}class AuthorizeOperationBtn extends He.default.Component{onClick=e=>{e.stopPropagation();let{onClick:t}=this.props;t&&t()};render(){let{isAuthorized:e,getComponent:t}=this.props;const r=t(\"LockAuthOperationIcon\",!0),n=t(\"UnlockAuthOperationIcon\",!0);return He.default.createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":e?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},e?He.default.createElement(r,{className:\"locked\"}):He.default.createElement(n,{className:\"unlocked\"}))}}class Auths extends He.default.Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,n=r.map(((e,t)=>t)).toArray();this.setState(n.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(n)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:n}=this.props;const a=t(\"AuthItem\"),o=t(\"oauth2\",!0),s=t(\"Button\");let l=r.authorized(),i=e.filter(((e,t)=>!!l.get(t))),c=e.filter((e=>\"oauth2\"!==e.get(\"type\"))),u=e.filter((e=>\"oauth2\"===e.get(\"type\")));return He.default.createElement(\"div\",{className:\"auth-container\"},!!c.size&&He.default.createElement(\"form\",{onSubmit:this.submitAuth},c.map(((e,o)=>He.default.createElement(a,{key:o,schema:e,name:o,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:n,authSelectors:r}))).toArray(),He.default.createElement(\"div\",{className:\"auth-btn-wrapper\"},c.size===i.size?He.default.createElement(s,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):He.default.createElement(s,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),He.default.createElement(s,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),u&&u.size?He.default.createElement(\"div\",null,He.default.createElement(\"div\",{className:\"scope-def\"},He.default.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),He.default.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>He.default.createElement(\"div\",{key:t},He.default.createElement(o,{authorized:l,schema:e,name:t})))).toArray()):null)}}class auth_item_Auths extends He.default.Component{render(){let{schema:e,name:t,getComponent:r,onAuthChange:n,authorized:a,errSelectors:o,authSelectors:s}=this.props;const l=r(\"apiKeyAuth\"),i=r(\"basicAuth\");let c;const u=e.get(\"type\");switch(u){case\"apiKey\":c=He.default.createElement(l,{key:t,schema:e,name:t,errSelectors:o,authorized:a,getComponent:r,onChange:n,authSelectors:s});break;case\"basic\":c=He.default.createElement(i,{key:t,schema:e,name:t,errSelectors:o,authorized:a,getComponent:r,onChange:n,authSelectors:s});break;default:c=He.default.createElement(\"div\",{key:t},\"Unknown security definition type \",u)}return He.default.createElement(\"div\",{key:`${t}-jump`},c)}}class AuthError extends He.default.Component{render(){let{error:e}=this.props,t=e.get(\"level\"),r=e.get(\"message\"),n=e.get(\"source\");return He.default.createElement(\"div\",{className:\"errors\"},He.default.createElement(\"b\",null,n,\" \",t),He.default.createElement(\"span\",null,r))}}class ApiKeyAuth extends He.default.Component{constructor(e,t){super(e,t);let{name:r,schema:n}=this.props,a=this.getValue();this.state={name:r,schema:n,value:a}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,r=e.target.value,n=Object.assign({},this.state,{value:r});this.setState(n),t(n)};render(){let{schema:e,getComponent:t,errSelectors:r,name:n,authSelectors:a}=this.props;const o=t(\"Input\"),s=t(\"Row\"),l=t(\"Col\"),i=t(\"authError\"),c=t(\"Markdown\",!0),u=t(\"JumpToPath\",!0),d=a.selectAuthPath(n);let p=this.getValue(),m=r.allErrors().filter((e=>e.get(\"authId\")===n));return He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,He.default.createElement(\"code\",null,n||e.get(\"name\")),\" (apiKey)\",He.default.createElement(u,{path:d})),p&&He.default.createElement(\"h6\",null,\"Authorized\"),He.default.createElement(s,null,He.default.createElement(c,{source:e.get(\"description\")})),He.default.createElement(s,null,He.default.createElement(\"p\",null,\"Name: \",He.default.createElement(\"code\",null,e.get(\"name\")))),He.default.createElement(s,null,He.default.createElement(\"p\",null,\"In: \",He.default.createElement(\"code\",null,e.get(\"in\")))),He.default.createElement(s,null,He.default.createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),p?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(l,null,He.default.createElement(o,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),m.valueSeq().map(((e,t)=>He.default.createElement(i,{error:e,key:t}))))}}class BasicAuth extends He.default.Component{constructor(e,t){super(e,t);let{schema:r,name:n}=this.props,a=this.getValue().username;this.state={name:n,schema:r,value:a?{username:a}:{}}}getValue(){let{authorized:e,name:t}=this.props;return e&&e.getIn([t,\"value\"])||{}}onChange=e=>{let{onChange:t}=this.props,{value:r,name:n}=e.target,a=this.state.value;a[n]=r,this.setState({value:a}),t(this.state)};render(){let{schema:e,getComponent:t,name:r,errSelectors:n,authSelectors:a}=this.props;const o=t(\"Input\"),s=t(\"Row\"),l=t(\"Col\"),i=t(\"authError\"),c=t(\"JumpToPath\",!0),u=t(\"Markdown\",!0),d=a.selectAuthPath(r);let p=this.getValue().username,m=n.allErrors().filter((e=>e.get(\"authId\")===r));return He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,\"Basic authorization\",He.default.createElement(c,{path:d})),p&&He.default.createElement(\"h6\",null,\"Authorized\"),He.default.createElement(s,null,He.default.createElement(u,{source:e.get(\"description\")})),He.default.createElement(s,null,He.default.createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),p?He.default.createElement(\"code\",null,\" \",p,\" \"):He.default.createElement(l,null,He.default.createElement(o,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),He.default.createElement(s,null,He.default.createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),p?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(l,null,He.default.createElement(o,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),m.valueSeq().map(((e,t)=>He.default.createElement(i,{error:e,key:t}))))}}function Example(e){const{example:t,showValue:r,getComponent:n}=e,a=n(\"Markdown\",!0),o=n(\"HighlightCode\",!0);return t&&Xe.Map.isMap(t)?He.default.createElement(\"div\",{className:\"example\"},t.get(\"description\")?He.default.createElement(\"section\",{className:\"example__section\"},He.default.createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),He.default.createElement(\"p\",null,He.default.createElement(a,{source:t.get(\"description\")}))):null,r&&t.has(\"value\")?He.default.createElement(\"section\",{className:\"example__section\"},He.default.createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),He.default.createElement(o,null,stringify(t.get(\"value\")))):null):null}class ExamplesSelect extends He.default.PureComponent{static defaultProps={examples:(0,Xe.Map)({}),onSelect:(...e)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...e),currentExampleKey:null,showLabels:!0};_onSelect=(e,{isSyntheticChange:t=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(e,{isSyntheticChange:t})};_onDomSelect=e=>{if(\"function\"==typeof this.props.onSelect){const t=e.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(t,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:e,currentExampleKey:t}=this.props,r=e.get(t),n=e.keySeq().first(),a=e.get(n);return r||a||(0,Xe.Map)({})};componentDidMount(){const{onSelect:e,examples:t}=this.props;if(\"function\"==typeof e){const e=t.first(),r=t.keyOf(e);this._onSelect(r,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(e){const{currentExampleKey:t,examples:r}=e;if(r!==this.props.examples&&!r.has(t)){const e=r.first(),t=r.keyOf(e);this._onSelect(t,{isSyntheticChange:!0})}}render(){const{examples:e,currentExampleKey:t,isValueModified:r,isModifiedValueAvailable:n,showLabels:a}=this.props;return He.default.createElement(\"div\",{className:\"examples-select\"},a?He.default.createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,He.default.createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:n&&r?\"__MODIFIED__VALUE__\":t||\"\"},n?He.default.createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,e.map(((e,t)=>He.default.createElement(\"option\",{key:t,value:t},Xe.Map.isMap(e)&&e.get(\"summary\")||t))).valueSeq()))}}const stringifyUnlessList=e=>Xe.List.isList(e)?e:stringify(e);class ExamplesSelectValueRetainer extends He.default.PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,Xe.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...e),updateValue:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...e)};constructor(e){super(e);const t=this._getCurrentExampleValue();this.state={[e.currentNamespace]:(0,Xe.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:t,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==t})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:e}=this.props;return(this.state[e]||(0,Xe.Map)()).toObject()};_setStateForCurrentNamespace=e=>{const{currentNamespace:t}=this.props;return this._setStateForNamespace(t,e)};_setStateForNamespace=(e,t)=>{const r=(this.state[e]||(0,Xe.Map)()).mergeDeep(t);return this.setState({[e]:r})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:e}=this.props;return this._getCurrentExampleValue()===e};_getValueForExample=(e,t)=>{const{examples:r}=t||this.props;return stringifyUnlessList((r||(0,Xe.Map)({})).getIn([e,\"value\"]))};_getCurrentExampleValue=e=>{const{currentKey:t}=e||this.props;return this._getValueForExample(t,e||this.props)};_onExamplesSelect=(e,{isSyntheticChange:t}={},...r)=>{const{onSelect:n,updateValue:a,currentUserInputValue:o,userHasEditedBody:s}=this.props,{lastUserEditedValue:l}=this._getStateForCurrentNamespace(),i=this._getValueForExample(e);if(\"__MODIFIED__VALUE__\"===e)return a(stringifyUnlessList(l)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof n&&n(e,{isSyntheticChange:t},...r),this._setStateForCurrentNamespace({lastDownstreamValue:i,isModifiedValueSelected:t&&s||!!o&&o!==i}),t||\"function\"==typeof a&&a(stringifyUnlessList(i))};UNSAFE_componentWillReceiveProps(e){const{currentUserInputValue:t,examples:r,onSelect:n,userHasEditedBody:a}=e,{lastUserEditedValue:o,lastDownstreamValue:s}=this._getStateForCurrentNamespace(),l=this._getValueForExample(e.currentKey,e),i=r.filter((e=>Xe.Map.isMap(e)&&(e.get(\"value\")===t||stringify(e.get(\"value\"))===t)));if(i.size){let t;t=i.has(e.currentKey)?e.currentKey:i.keySeq().first(),n(t,{isSyntheticChange:!0})}else t!==this.props.currentUserInputValue&&t!==o&&t!==s&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(e.currentNamespace,{lastUserEditedValue:e.currentUserInputValue,isModifiedValueSelected:a||t!==l}))}render(){const{currentUserInputValue:e,examples:t,currentKey:r,getComponent:n,userHasEditedBody:a}=this.props,{lastDownstreamValue:o,lastUserEditedValue:s,isModifiedValueSelected:l}=this._getStateForCurrentNamespace(),i=n(\"ExamplesSelect\");return He.default.createElement(i,{examples:t,currentExampleKey:r,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!s&&s!==o,isValueModified:void 0!==e&&l&&e!==this._getCurrentExampleValue()||a})}}function oauth2_authorize_authorize({auth:e,authActions:t,errActions:r,configs:n,authConfigs:a={},currentServer:o}){let{schema:s,scopes:l,name:i,clientId:c}=e,u=s.get(\"flow\"),d=[];switch(u){case\"password\":return void t.authorizePassword(e);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void t.authorizeApplication(e);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":d.push(\"response_type=code\");break;case\"implicit\":d.push(\"response_type=token\")}\"string\"==typeof c&&d.push(\"client_id=\"+encodeURIComponent(c));let p=n.oauth2RedirectUrl;if(void 0===p)return void r.newAuthErr({authId:i,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});d.push(\"redirect_uri=\"+encodeURIComponent(p));let m=[];if(Array.isArray(l)?m=l:Xe.default.List.isList(l)&&(m=l.toArray()),m.length>0){let e=a.scopeSeparator||\" \";d.push(\"scope=\"+encodeURIComponent(m.join(e)))}let f=btoa(new Date);if(d.push(\"state=\"+encodeURIComponent(f)),void 0!==a.realm&&d.push(\"realm=\"+encodeURIComponent(a.realm)),(\"authorizationCode\"===u||\"authorization_code\"===u||\"accessCode\"===u)&&a.usePkceWithAuthorizationCodeGrant){const t=function generateCodeVerifier(){return b64toB64UrlEncoded(Et()(32).toString(\"base64\"))}(),r=function createCodeChallenge(e){return b64toB64UrlEncoded(_t()(\"sha256\").update(e).digest(\"base64\"))}(t);d.push(\"code_challenge=\"+r),d.push(\"code_challenge_method=S256\"),e.codeVerifier=t}let{additionalQueryStringParams:h}=a;for(let e in h)void 0!==h[e]&&d.push([e,h[e]].map(encodeURIComponent).join(\"=\"));const g=s.get(\"authorizationUrl\");let y;y=o?(0,Ot.default)(sanitizeUrl(g),o,!0).toString():sanitizeUrl(g);let S,_=[y,d.join(\"&\")].join(\"string\"!=typeof g||g.includes(\"?\")?\"&\":\"?\");S=\"implicit\"===u?t.preAuthorizeImplicit:a.useBasicAuthenticationWithAccessCodeGrant?t.authorizeAccessCodeWithBasicAuthentication:t.authorizeAccessCodeWithFormParams,t.authPopup(_,{auth:e,state:f,redirectUrl:p,callback:S,errCb:r.newAuthErr})}class Oauth2 extends He.default.Component{constructor(e,t){super(e,t);let{name:r,schema:n,authorized:a,authSelectors:o}=this.props,s=a&&a.get(r),l=o.getConfigs()||{},i=s&&s.get(\"username\")||\"\",c=s&&s.get(\"clientId\")||l.clientId||\"\",u=s&&s.get(\"clientSecret\")||l.clientSecret||\"\",d=s&&s.get(\"passwordType\")||\"basic\",p=s&&s.get(\"scopes\")||l.scopes||[];\"string\"==typeof p&&(p=p.split(l.scopeSeparator||\" \")),this.state={appName:l.appName,name:r,schema:n,scopes:p,clientId:c,clientSecret:u,username:i,password:\"\",passwordType:d}}close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};authorize=()=>{let{authActions:e,errActions:t,getConfigs:r,authSelectors:n,oas3Selectors:a}=this.props,o=r(),s=n.getConfigs();t.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:a.serverEffectiveValue(a.selectedServer()),authActions:e,errActions:t,configs:o,authConfigs:s})};onScopeChange=e=>{let{target:t}=e,{checked:r}=t,n=t.dataset.value;if(r&&-1===this.state.scopes.indexOf(n)){let e=this.state.scopes.concat([n]);this.setState({scopes:e})}else!r&&this.state.scopes.indexOf(n)>-1&&this.setState({scopes:this.state.scopes.filter((e=>e!==n))})};onInputChange=e=>{let{target:{dataset:{name:t},value:r}}=e,n={[t]:r};this.setState(n)};selectScopes=e=>{e.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=e=>{e.preventDefault();let{authActions:t,errActions:r,name:n}=this.props;r.clear({authId:n,type:\"auth\",source:\"auth\"}),t.logoutWithPersistOption([n])};render(){let{schema:e,getComponent:t,authSelectors:r,errSelectors:n,name:a,specSelectors:o}=this.props;const s=t(\"Input\"),l=t(\"Row\"),i=t(\"Col\"),c=t(\"Button\"),u=t(\"authError\"),d=t(\"JumpToPath\",!0),p=t(\"Markdown\",!0),m=t(\"InitializedInput\"),{isOAS3:f}=o;let h=f()?e.get(\"openIdConnectUrl\"):null;const g=\"implicit\",y=\"password\",S=f()?h?\"authorization_code\":\"authorizationCode\":\"accessCode\",_=f()?h?\"client_credentials\":\"clientCredentials\":\"application\",v=r.selectAuthPath(a);let b=!!(r.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,w=e.get(\"flow\"),C=w===S&&b?w+\" with PKCE\":w,x=e.get(\"allowedScopes\")||e.get(\"scopes\"),O=!!r.authorized().get(a),k=n.allErrors().filter((e=>e.get(\"authId\")===a)),N=!k.filter((e=>\"validation\"===e.get(\"source\"))).size,A=e.get(\"description\");return He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,a,\" (OAuth2, \",C,\") \",He.default.createElement(d,{path:v})),this.state.appName?He.default.createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,A&&He.default.createElement(p,{source:e.get(\"description\")}),O&&He.default.createElement(\"h6\",null,\"Authorized\"),h&&He.default.createElement(\"p\",null,\"OpenID Connect URL: \",He.default.createElement(\"code\",null,h)),(w===g||w===S)&&He.default.createElement(\"p\",null,\"Authorization URL: \",He.default.createElement(\"code\",null,e.get(\"authorizationUrl\"))),(w===y||w===S||w===_)&&He.default.createElement(\"p\",null,\"Token URL:\",He.default.createElement(\"code\",null,\" \",e.get(\"tokenUrl\"))),He.default.createElement(\"p\",{className:\"flow\"},\"Flow: \",He.default.createElement(\"code\",null,C)),w!==y?null:He.default.createElement(l,null,He.default.createElement(l,null,He.default.createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),O?He.default.createElement(\"code\",null,\" \",this.state.username,\" \"):He.default.createElement(i,{tablet:10,desktop:10},He.default.createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),He.default.createElement(l,null,He.default.createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),O?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(i,{tablet:10,desktop:10},He.default.createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),He.default.createElement(l,null,He.default.createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),O?He.default.createElement(\"code\",null,\" \",this.state.passwordType,\" \"):He.default.createElement(i,{tablet:10,desktop:10},He.default.createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},He.default.createElement(\"option\",{value:\"basic\"},\"Authorization header\"),He.default.createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(w===_||w===g||w===S||w===y)&&(!O||O&&this.state.clientId)&&He.default.createElement(l,null,He.default.createElement(\"label\",{htmlFor:`client_id_${w}`},\"client_id:\"),O?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(i,{tablet:10,desktop:10},He.default.createElement(m,{id:`client_id_${w}`,type:\"text\",required:w===y,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(w===_||w===S||w===y)&&He.default.createElement(l,null,He.default.createElement(\"label\",{htmlFor:`client_secret_${w}`},\"client_secret:\"),O?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(i,{tablet:10,desktop:10},He.default.createElement(m,{id:`client_secret_${w}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!O&&x&&x.size?He.default.createElement(\"div\",{className:\"scopes\"},He.default.createElement(\"h2\",null,\"Scopes:\",He.default.createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),He.default.createElement(\"a\",{onClick:this.selectScopes},\"select none\")),x.map(((e,t)=>He.default.createElement(l,{key:t},He.default.createElement(\"div\",{className:\"checkbox\"},He.default.createElement(s,{\"data-value\":t,id:`${t}-${w}-checkbox-${this.state.name}`,disabled:O,checked:this.state.scopes.includes(t),type:\"checkbox\",onChange:this.onScopeChange}),He.default.createElement(\"label\",{htmlFor:`${t}-${w}-checkbox-${this.state.name}`},He.default.createElement(\"span\",{className:\"item\"}),He.default.createElement(\"div\",{className:\"text\"},He.default.createElement(\"p\",{className:\"name\"},t),He.default.createElement(\"p\",{className:\"description\"},e))))))).toArray()):null,k.valueSeq().map(((e,t)=>He.default.createElement(u,{error:e,key:t}))),He.default.createElement(\"div\",{className:\"auth-btn-wrapper\"},N&&(O?He.default.createElement(c,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):He.default.createElement(c,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),He.default.createElement(c,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends He.Component{onClick=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearResponse(t,r),e.clearRequest(t,r)};render(){return He.default.createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const Headers=({headers:e})=>He.default.createElement(\"div\",null,He.default.createElement(\"h5\",null,\"Response headers\"),He.default.createElement(\"pre\",{className:\"microlight\"},e)),Duration=({duration:e})=>He.default.createElement(\"div\",null,He.default.createElement(\"h5\",null,\"Request duration\"),He.default.createElement(\"pre\",{className:\"microlight\"},e,\" ms\"));class LiveResponse extends He.default.Component{shouldComponentUpdate(e){return this.props.response!==e.response||this.props.path!==e.path||this.props.method!==e.method||this.props.displayRequestDuration!==e.displayRequestDuration}render(){const{response:e,getComponent:t,getConfigs:r,displayRequestDuration:n,specSelectors:a,path:o,method:s}=this.props,{showMutatedRequest:l,requestSnippetsEnabled:i}=r(),c=l?a.mutatedRequestFor(o,s):a.requestFor(o,s),u=e.get(\"status\"),d=c.get(\"url\"),p=e.get(\"headers\").toJS(),m=e.get(\"notDocumented\"),f=e.get(\"error\"),h=e.get(\"text\"),g=e.get(\"duration\"),y=Object.keys(p),S=p[\"content-type\"]||p[\"Content-Type\"],_=t(\"responseBody\"),v=y.map((e=>{var t=Array.isArray(p[e])?p[e].join():p[e];return He.default.createElement(\"span\",{className:\"headerline\",key:e},\" \",e,\": \",t,\" \")})),b=0!==v.length,w=t(\"Markdown\",!0),C=t(\"RequestSnippets\",!0),x=t(\"curl\",!0);return He.default.createElement(\"div\",null,c&&i?He.default.createElement(C,{request:c}):He.default.createElement(x,{request:c}),d&&He.default.createElement(\"div\",null,He.default.createElement(\"div\",{className:\"request-url\"},He.default.createElement(\"h4\",null,\"Request URL\"),He.default.createElement(\"pre\",{className:\"microlight\"},d))),He.default.createElement(\"h4\",null,\"Server response\"),He.default.createElement(\"table\",{className:\"responses-table live-responses-table\"},He.default.createElement(\"thead\",null,He.default.createElement(\"tr\",{className:\"responses-header\"},He.default.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),He.default.createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),He.default.createElement(\"tbody\",null,He.default.createElement(\"tr\",{className:\"response\"},He.default.createElement(\"td\",{className:\"response-col_status\"},u,m?He.default.createElement(\"div\",{className:\"response-undocumented\"},He.default.createElement(\"i\",null,\" Undocumented \")):null),He.default.createElement(\"td\",{className:\"response-col_description\"},f?He.default.createElement(w,{source:`${\"\"!==e.get(\"name\")?`${e.get(\"name\")}: `:\"\"}${e.get(\"message\")}`}):null,h?He.default.createElement(_,{content:h,contentType:S,url:d,headers:p,getConfigs:r,getComponent:t}):null,b?He.default.createElement(Headers,{headers:v}):null,n&&g?He.default.createElement(Duration,{duration:g}):null)))))}}class OnlineValidatorBadge extends He.default.Component{constructor(e,t){super(e,t);let{getConfigs:r}=e,{validatorUrl:n}=r();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===n?\"https://validator.swagger.io/validator\":n}}getDefinitionUrl=()=>{let{specSelectors:e}=this.props;return new Ot.default(e.url(),ct.location).toString()};UNSAFE_componentWillReceiveProps(e){let{getConfigs:t}=e,{validatorUrl:r}=t();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===r?\"https://validator.swagger.io/validator\":r})}render(){let{getConfigs:e}=this.props,{spec:t}=e(),r=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof t&&Object.keys(t).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?He.default.createElement(\"span\",{className:\"float-right\"},He.default.createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${r}/debug?url=${encodeURIComponent(this.state.url)}`},He.default.createElement(ValidatorImage,{src:`${r}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends He.default.Component{constructor(e){super(e),this.state={loaded:!1,error:!1}}componentDidMount(){const e=new Image;e.onload=()=>{this.setState({loaded:!0})},e.onerror=()=>{this.setState({error:!0})},e.src=this.props.src}UNSAFE_componentWillReceiveProps(e){if(e.src!==this.props.src){const t=new Image;t.onload=()=>{this.setState({loaded:!0})},t.onerror=()=>{this.setState({error:!0})},t.src=e.src}}render(){return this.state.error?He.default.createElement(\"img\",{alt:\"Error\"}):this.state.loaded?He.default.createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends He.default.Component{render(){let{specSelectors:e}=this.props;const t=e.taggedOperations();return 0===t.size?He.default.createElement(\"h3\",null,\" No operations defined in spec!\"):He.default.createElement(\"div\",null,t.map(this.renderOperationTag).toArray(),t.size<1?He.default.createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(e,t)=>{const{specSelectors:r,getComponent:n,oas3Selectors:a,layoutSelectors:o,layoutActions:s,getConfigs:l}=this.props,i=r.validOperationMethods(),c=n(\"OperationContainer\",!0),u=n(\"OperationTag\"),d=e.get(\"operations\");return He.default.createElement(u,{key:\"operation-\"+t,tagObj:e,tag:t,oas3Selectors:a,layoutSelectors:o,layoutActions:s,getConfigs:l,getComponent:n,specUrl:r.url()},He.default.createElement(\"div\",{className:\"operation-tag-content\"},d.map((e=>{const r=e.get(\"path\"),n=e.get(\"method\"),a=Xe.default.List([\"paths\",r,n]);return-1===i.indexOf(n)?null:He.default.createElement(c,{key:`${r}-${n}`,specPath:a,op:e,path:r,method:n,tag:t})})).toArray()))}}class OperationTag extends He.default.Component{static defaultProps={tagObj:Xe.default.fromJS({}),tag:\"\"};render(){const{tagObj:e,tag:t,children:r,oas3Selectors:n,layoutSelectors:a,layoutActions:o,getConfigs:s,getComponent:l,specUrl:i}=this.props;let{docExpansion:c,deepLinking:u}=s();const d=l(\"Collapse\"),p=l(\"Markdown\",!0),m=l(\"DeepLink\"),f=l(\"Link\"),h=l(\"ArrowUpIcon\"),g=l(\"ArrowDownIcon\");let y,S=e.getIn([\"tagDetails\",\"description\"],null),_=e.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),v=e.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);y=isFunc(n)&&isFunc(n.selectedServer)?safeBuildUrl(v,i,{selectedServer:n.selectedServer()}):v;let b=[\"operations-tag\",t],w=a.isShown(b,\"full\"===c||\"list\"===c);return He.default.createElement(\"div\",{className:w?\"opblock-tag-section is-open\":\"opblock-tag-section\"},He.default.createElement(\"h3\",{onClick:()=>o.show(b,!w),className:S?\"opblock-tag\":\"opblock-tag no-desc\",id:b.map((e=>escapeDeepLinkPath(e))).join(\"-\"),\"data-tag\":t,\"data-is-open\":w},He.default.createElement(m,{enabled:u,isShown:w,path:createDeepLinkPath(t),text:t}),S?He.default.createElement(\"small\",null,He.default.createElement(p,{source:S})):He.default.createElement(\"small\",null),y?He.default.createElement(\"div\",{className:\"info__externaldocs\"},He.default.createElement(\"small\",null,He.default.createElement(f,{href:sanitizeUrl(y),onClick:e=>e.stopPropagation(),target:\"_blank\"},_||y))):null,He.default.createElement(\"button\",{\"aria-expanded\":w,className:\"expand-operation\",title:w?\"Collapse operation\":\"Expand operation\",onClick:()=>o.show(b,!w)},w?He.default.createElement(h,{className:\"arrow\"}):He.default.createElement(g,{className:\"arrow\"}))),He.default.createElement(d,{isOpened:w},r))}}class Operation extends He.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,Xe.List)(),summary:\"\"};render(){let{specPath:e,response:t,request:r,toggleShown:n,onTryoutClick:a,onResetClick:o,onCancelClick:s,onExecute:l,fn:i,getComponent:c,getConfigs:u,specActions:d,specSelectors:p,authActions:m,authSelectors:f,oas3Actions:h,oas3Selectors:g}=this.props,y=this.props.operation,{deprecated:S,isShown:_,path:v,method:b,op:w,tag:C,operationId:x,allowTryItOut:O,displayRequestDuration:k,tryItOutEnabled:N,executeInProgress:A}=y.toJS(),{description:I,externalDocs:j,schemes:R}=w;const T=j?safeBuildUrl(j.url,p.url(),{selectedServer:g.selectedServer()}):\"\";let P=y.getIn([\"op\"]),B=P.get(\"responses\"),M=function getList(e,t){if(!Xe.default.Iterable.isIterable(e))return Xe.default.List();let r=e.getIn(Array.isArray(t)?t:[t]);return Xe.default.List.isList(r)?r:Xe.default.List()}(P,[\"parameters\"]),q=p.operationScheme(v,b),L=[\"operations\",C,x],U=getExtensions(P);const D=c(\"responses\"),$=c(\"parameters\"),V=c(\"execute\"),J=c(\"clear\"),F=c(\"Collapse\"),z=c(\"Markdown\",!0),K=c(\"schemes\"),W=c(\"OperationServers\"),H=c(\"OperationExt\"),G=c(\"OperationSummary\"),X=c(\"Link\"),{showExtensions:Y}=u();if(B&&t&&t.size>0){let e=!B.get(String(t.get(\"status\")))&&!B.get(\"default\");t=t.set(\"notDocumented\",e)}let Q=[v,b];const Z=p.validationErrors([v,b]);return He.default.createElement(\"div\",{className:S?\"opblock opblock-deprecated\":_?`opblock opblock-${b} is-open`:`opblock opblock-${b}`,id:escapeDeepLinkPath(L.join(\"-\"))},He.default.createElement(G,{operationProps:y,isShown:_,toggleShown:n,getComponent:c,authActions:m,authSelectors:f,specPath:e}),He.default.createElement(F,{isOpened:_},He.default.createElement(\"div\",{className:\"opblock-body\"},P&&P.size||null===P?null:He.default.createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),S&&He.default.createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),I&&He.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},He.default.createElement(\"div\",{className:\"opblock-description\"},He.default.createElement(z,{source:I}))),T?He.default.createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},He.default.createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),He.default.createElement(\"div\",{className:\"opblock-external-docs\"},j.description&&He.default.createElement(\"span\",{className:\"opblock-external-docs__description\"},He.default.createElement(z,{source:j.description})),He.default.createElement(X,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl(T)},T))):null,P&&P.size?He.default.createElement($,{parameters:M,specPath:e.push(\"parameters\"),operation:P,onChangeKey:Q,onTryoutClick:a,onResetClick:o,onCancelClick:s,tryItOutEnabled:N,allowTryItOut:O,fn:i,getComponent:c,specActions:d,specSelectors:p,pathMethod:[v,b],getConfigs:u,oas3Actions:h,oas3Selectors:g}):null,N?He.default.createElement(W,{getComponent:c,path:v,method:b,operationServers:P.get(\"servers\"),pathServers:p.paths().getIn([v,\"servers\"]),getSelectedServer:g.selectedServer,setSelectedServer:h.setSelectedServer,setServerVariableValue:h.setServerVariableValue,getServerVariable:g.serverVariableValue,getEffectiveServerValue:g.serverEffectiveValue}):null,N&&O&&R&&R.size?He.default.createElement(\"div\",{className:\"opblock-schemes\"},He.default.createElement(K,{schemes:R,path:v,method:b,specActions:d,currentScheme:q})):null,!N||!O||Z.length<=0?null:He.default.createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",He.default.createElement(\"ul\",null,Z.map(((e,t)=>He.default.createElement(\"li\",{key:t},\" \",e,\" \"))))),He.default.createElement(\"div\",{className:N&&t&&O?\"btn-group\":\"execute-wrapper\"},N&&O?He.default.createElement(V,{operation:P,specActions:d,specSelectors:p,oas3Selectors:g,oas3Actions:h,path:v,method:b,onExecute:l,disabled:A}):null,N&&t&&O?He.default.createElement(J,{specActions:d,path:v,method:b}):null),A?He.default.createElement(\"div\",{className:\"loading-container\"},He.default.createElement(\"div\",{className:\"loading\"})):null,B?He.default.createElement(D,{responses:B,request:r,tryItOutResponse:t,getComponent:c,getConfigs:u,specSelectors:p,oas3Actions:h,oas3Selectors:g,specActions:d,produces:p.producesOptionsFor([v,b]),producesValue:p.currentProducesFor([v,b]),specPath:e.push(\"responses\"),path:v,method:b,displayRequestDuration:k,fn:i}):null,Y&&U.size?He.default.createElement(H,{extensions:U,getComponent:c}):null)))}}class OperationContainer extends He.PureComponent{constructor(e,t){super(e,t);const{tryItOutEnabled:r}=e.getConfigs();this.state={tryItOutEnabled:r,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(e,t){const{op:r,layoutSelectors:n,getConfigs:a}=t,{docExpansion:o,deepLinking:s,displayOperationId:l,displayRequestDuration:i,supportedSubmitMethods:c}=a(),u=n.showSummary(),d=r.getIn([\"operation\",\"__originalOperationId\"])||r.getIn([\"operation\",\"operationId\"])||(0,Yn.opId)(r.get(\"operation\"),t.path,t.method)||r.get(\"id\"),p=[\"operations\",t.tag,d],m=c.indexOf(t.method)>=0&&(void 0===t.allowTryItOut?t.specSelectors.allowTryItOutFor(t.path,t.method):t.allowTryItOut),f=r.getIn([\"operation\",\"security\"])||t.specSelectors.security();return{operationId:d,isDeepLinkingEnabled:s,showSummary:u,displayOperationId:l,displayRequestDuration:i,allowTryItOut:m,security:f,isAuthorized:t.authSelectors.isAuthorized(f),isShown:n.isShown(p,\"full\"===o),jumpToKey:`paths.${t.path}.${t.method}`,response:t.specSelectors.responseFor(t.path,t.method),request:t.specSelectors.requestFor(t.path,t.method)}}componentDidMount(){const{isShown:e}=this.props,t=this.getResolvedSubtree();e&&void 0===t&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(e){const{response:t,isShown:r}=e,n=this.getResolvedSubtree();t!==this.props.response&&this.setState({executeInProgress:!1}),r&&void 0===n&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:e,tag:t,operationId:r,isShown:n}=this.props;const a=this.getResolvedSubtree();n||void 0!==a||this.requestResolvedSubtree(),e.show([\"operations\",t,r],!n)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=e=>{const t=this.props.oas3Selectors.selectDefaultRequestBodyValue(...e);this.props.oas3Actions.setRequestBodyValue({value:t,pathMethod:e})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:e,path:t,method:r,specPath:n}=this.props;return n?e.specResolvedSubtree(n.toJS()):e.specResolvedSubtree([\"paths\",t,r])};requestResolvedSubtree=()=>{const{specActions:e,path:t,method:r,specPath:n}=this.props;return n?e.requestResolvedSubtree(n.toJS()):e.requestResolvedSubtree([\"paths\",t,r])};render(){let{op:e,tag:t,path:r,method:n,security:a,isAuthorized:o,operationId:s,showSummary:l,isShown:i,jumpToKey:c,allowTryItOut:u,response:d,request:p,displayOperationId:m,displayRequestDuration:f,isDeepLinkingEnabled:h,specPath:g,specSelectors:y,specActions:S,getComponent:_,getConfigs:v,layoutSelectors:b,layoutActions:w,authActions:C,authSelectors:x,oas3Actions:O,oas3Selectors:k,fn:N}=this.props;const A=_(\"operation\"),I=this.getResolvedSubtree()||(0,Xe.Map)(),j=(0,Xe.fromJS)({op:I,tag:t,path:r,summary:e.getIn([\"operation\",\"summary\"])||\"\",deprecated:I.get(\"deprecated\")||e.getIn([\"operation\",\"deprecated\"])||!1,method:n,security:a,isAuthorized:o,operationId:s,originalOperationId:I.getIn([\"operation\",\"__originalOperationId\"]),showSummary:l,isShown:i,jumpToKey:c,allowTryItOut:u,request:p,displayOperationId:m,displayRequestDuration:f,isDeepLinkingEnabled:h,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return He.default.createElement(A,{operation:j,response:d,request:p,isShown:i,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:g,specActions:S,specSelectors:y,oas3Actions:O,oas3Selectors:k,layoutActions:w,layoutSelectors:b,authActions:C,authSelectors:x,getComponent:_,getConfigs:v,fn:N})}}var wa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return fe.default}});class OperationSummary extends He.PureComponent{static defaultProps={operationProps:null,specPath:(0,Xe.List)(),summary:\"\"};render(){let{isShown:e,toggleShown:t,getComponent:r,authActions:n,authSelectors:a,operationProps:o,specPath:s}=this.props,{summary:l,isAuthorized:i,method:c,op:u,showSummary:d,path:p,operationId:m,originalOperationId:f,displayOperationId:h}=o.toJS(),{summary:g}=u,y=o.get(\"security\");const S=r(\"authorizeOperationBtn\",!0),_=r(\"OperationSummaryMethod\"),v=r(\"OperationSummaryPath\"),b=r(\"JumpToPath\",!0),w=r(\"CopyToClipboardBtn\",!0),C=r(\"ArrowUpIcon\"),x=r(\"ArrowDownIcon\"),O=y&&!!y.count(),k=O&&1===y.size&&y.first().isEmpty(),N=!O||k;return He.default.createElement(\"div\",{className:`opblock-summary opblock-summary-${c}`},He.default.createElement(\"button\",{\"aria-expanded\":e,className:\"opblock-summary-control\",onClick:t},He.default.createElement(_,{method:c}),He.default.createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},He.default.createElement(v,{getComponent:r,operationProps:o,specPath:s}),d?He.default.createElement(\"div\",{className:\"opblock-summary-description\"},(0,wa.default)(g||l)):null),h&&(f||m)?He.default.createElement(\"span\",{className:\"opblock-summary-operation-id\"},f||m):null),He.default.createElement(w,{textToCopy:`${s.get(1)}`}),N?null:He.default.createElement(S,{isAuthorized:i,onClick:()=>{const e=a.definitionsForRequirements(y);n.showDefinitions(e)}}),He.default.createElement(b,{path:s}),He.default.createElement(\"button\",{\"aria-label\":`${c} ${p.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":e,tabIndex:\"-1\",onClick:t},e?He.default.createElement(C,{className:\"arrow\"}):He.default.createElement(x,{className:\"arrow\"})))}}class OperationSummaryMethod extends He.PureComponent{static defaultProps={operationProps:null};render(){let{method:e}=this.props;return He.default.createElement(\"span\",{className:\"opblock-summary-method\"},e.toUpperCase())}}class OperationSummaryPath extends He.PureComponent{render(){let{getComponent:e,operationProps:t}=this.props,{deprecated:r,isShown:n,path:a,tag:o,operationId:s,isDeepLinkingEnabled:l}=t.toJS();const i=a.split(/(?=\\/)/g);for(let e=1;e<i.length;e+=2)i.splice(e,0,He.default.createElement(\"wbr\",{key:e}));const c=e(\"DeepLink\");return He.default.createElement(\"span\",{className:r?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":a},He.default.createElement(c,{enabled:l,isShown:n,path:createDeepLinkPath(`${o}/${s}`),text:i}))}}var operation_extensions=({extensions:e,getComponent:t})=>{let r=t(\"OperationExtRow\");return He.default.createElement(\"div\",{className:\"opblock-section\"},He.default.createElement(\"div\",{className:\"opblock-section-header\"},He.default.createElement(\"h4\",null,\"Extensions\")),He.default.createElement(\"div\",{className:\"table-container\"},He.default.createElement(\"table\",null,He.default.createElement(\"thead\",null,He.default.createElement(\"tr\",null,He.default.createElement(\"td\",{className:\"col_header\"},\"Field\"),He.default.createElement(\"td\",{className:\"col_header\"},\"Value\"))),He.default.createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>He.default.createElement(r,{key:`${e}-${t}`,xKey:e,xVal:t})))))))};var operation_extension_row=({xKey:e,xVal:t})=>{const r=t?t.toJS?t.toJS():t:null;return He.default.createElement(\"tr\",null,He.default.createElement(\"td\",null,e),He.default.createElement(\"td\",null,JSON.stringify(r)))};function createHtmlReadyId(e,t=\"_\"){return e.replace(/[^\\w-]/g,t)}class Responses extends He.default.Component{static defaultProps={tryItOutResponse:null,produces:(0,Xe.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);onResponseContentTypeChange=({controlsAcceptHeader:e,value:t})=>{const{oas3Actions:r,path:n,method:a}=this.props;e&&r.setResponseContentType({value:t,path:n,method:a})};render(){let{responses:e,tryItOutResponse:t,getComponent:r,getConfigs:n,specSelectors:a,fn:o,producesValue:s,displayRequestDuration:l,specPath:i,path:c,method:u,oas3Selectors:d,oas3Actions:p}=this.props,m=function defaultStatusCode(e){let t=e.keySeq();return t.contains(wt)?wt:t.filter((e=>\"2\"===(e+\"\")[0])).sort().first()}(e);const f=r(\"contentType\"),h=r(\"liveResponse\"),g=r(\"response\");let y=this.props.produces&&this.props.produces.size?this.props.produces:Responses.defaultProps.produces;const S=a.isOAS3()?function getAcceptControllingResponse(e){if(!Xe.default.OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;const t=e.find(((e,t)=>t.startsWith(\"2\")&&Object.keys(e.get(\"content\")||{}).length>0)),r=e.get(\"default\")||Xe.default.OrderedMap(),n=(r.get(\"content\")||Xe.default.OrderedMap()).keySeq().toJS().length?r:null;return t||n}(e):null,_=createHtmlReadyId(`${u}${c}_responses`),v=`${_}_select`;return He.default.createElement(\"div\",{className:\"responses-wrapper\"},He.default.createElement(\"div\",{className:\"opblock-section-header\"},He.default.createElement(\"h4\",null,\"Responses\"),a.isOAS3()?null:He.default.createElement(\"label\",{htmlFor:v},He.default.createElement(\"span\",null,\"Response content type\"),He.default.createElement(f,{value:s,ariaControls:_,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:y,controlId:v,onChange:this.onChangeProducesWrapper}))),He.default.createElement(\"div\",{className:\"responses-inner\"},t?He.default.createElement(\"div\",null,He.default.createElement(h,{response:t,getComponent:r,getConfigs:n,specSelectors:a,path:this.props.path,method:this.props.method,displayRequestDuration:l}),He.default.createElement(\"h4\",null,\"Responses\")):null,He.default.createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:_,role:\"region\"},He.default.createElement(\"thead\",null,He.default.createElement(\"tr\",{className:\"responses-header\"},He.default.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),He.default.createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),a.isOAS3()?He.default.createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),He.default.createElement(\"tbody\",null,e.entrySeq().map((([e,l])=>{let f=t&&t.get(\"status\")==e?\"response_current\":\"\";return He.default.createElement(g,{key:e,path:c,method:u,specPath:i.push(e),isDefault:m===e,fn:o,className:f,code:e,response:l,specSelectors:a,controlsAcceptHeader:l===S,onContentTypeChange:this.onResponseContentTypeChange,contentType:s,getConfigs:n,activeExamplesKey:d.activeExamplesMember(c,u,\"responses\",e),oas3Actions:p,getComponent:r})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(e){return function canJsonParse(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?\"json\":null}class Response extends He.default.Component{constructor(e,t){super(e,t),this.state={responseContentType:\"\"}}static defaultProps={response:(0,Xe.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=e=>{const{onContentTypeChange:t,controlsAcceptHeader:r}=this.props;this.setState({responseContentType:e}),t({value:e,controlsAcceptHeader:r})};getTargetExamplesKey=()=>{const{response:e,contentType:t,activeExamplesKey:r}=this.props,n=this.state.responseContentType||t,a=e.getIn([\"content\",n],(0,Xe.Map)({})).get(\"examples\",null).keySeq().first();return r||a};render(){let{path:e,method:t,code:r,response:n,className:a,specPath:o,fn:s,getComponent:l,getConfigs:i,specSelectors:c,contentType:u,controlsAcceptHeader:d,oas3Actions:p}=this.props,{inferSchema:m,getSampleSchema:f}=s,h=c.isOAS3();const{showExtensions:g}=i();let y=g?getExtensions(n):null,S=n.get(\"headers\"),_=n.get(\"links\");const v=l(\"ResponseExtension\"),b=l(\"headers\"),w=l(\"HighlightCode\",!0),C=l(\"modelExample\"),x=l(\"Markdown\",!0),O=l(\"operationLink\"),k=l(\"contentType\"),N=l(\"ExamplesSelect\"),A=l(\"Example\");var I,j;const R=this.state.responseContentType||u,T=n.getIn([\"content\",R],(0,Xe.Map)({})),P=T.get(\"examples\",null);if(h){const e=T.get(\"schema\");I=e?m(e.toJS()):null,j=e?(0,Xe.List)([\"content\",this.state.responseContentType,\"schema\"]):o}else I=n.get(\"schema\"),j=n.has(\"schema\")?o.push(\"schema\"):o;let B,M,q=!1,L={includeReadOnly:!0};if(h)if(M=T.get(\"schema\")?.toJS(),Xe.Map.isMap(P)&&!P.isEmpty()){const e=this.getTargetExamplesKey(),getMediaTypeExample=e=>Xe.Map.isMap(e)?e.get(\"value\"):void 0;B=getMediaTypeExample(P.get(e,(0,Xe.Map)({}))),void 0===B&&(B=getMediaTypeExample(P.values().next().value)),q=!0}else void 0!==T.get(\"example\")&&(B=T.get(\"example\"),q=!0);else{M=I,L={...L,includeWriteOnly:!0};const e=n.getIn([\"examples\",R]);e&&(B=e,q=!0)}const U=((e,t)=>{if(null==e)return null;const r=getKnownSyntaxHighlighterLanguage(e)?\"json\":null;return He.default.createElement(\"div\",null,He.default.createElement(t,{className:\"example\",language:r},stringify(e)))})(f(M,R,L,q?B:void 0),w);return He.default.createElement(\"tr\",{className:\"response \"+(a||\"\"),\"data-code\":r},He.default.createElement(\"td\",{className:\"response-col_status\"},r),He.default.createElement(\"td\",{className:\"response-col_description\"},He.default.createElement(\"div\",{className:\"response-col_description__inner\"},He.default.createElement(x,{source:n.get(\"description\")})),g&&y.size?y.entrySeq().map((([e,t])=>He.default.createElement(v,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,h&&n.get(\"content\")?He.default.createElement(\"section\",{className:\"response-controls\"},He.default.createElement(\"div\",{className:(0,hr.default)(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":d})},He.default.createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),He.default.createElement(k,{value:this.state.responseContentType,contentTypes:n.get(\"content\")?n.get(\"content\").keySeq():(0,Xe.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),d?He.default.createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",He.default.createElement(\"code\",null,\"Accept\"),\" header.\"):null),Xe.Map.isMap(P)&&!P.isEmpty()?He.default.createElement(\"div\",{className:\"response-control-examples\"},He.default.createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),He.default.createElement(N,{examples:P,currentExampleKey:this.getTargetExamplesKey(),onSelect:n=>p.setActiveExamplesMember({name:n,pathMethod:[e,t],contextType:\"responses\",contextName:r}),showLabels:!1})):null):null,U||I?He.default.createElement(C,{specPath:j,getComponent:l,getConfigs:i,specSelectors:c,schema:fromJSOrdered(I),example:U,includeReadOnly:!0}):null,h&&P?He.default.createElement(A,{example:P.get(this.getTargetExamplesKey(),(0,Xe.Map)({})),getComponent:l,getConfigs:i,omitValue:!0}):null,S?He.default.createElement(b,{headers:S,getComponent:l}):null),h?He.default.createElement(\"td\",{className:\"response-col_links\"},_?_.toSeq().entrySeq().map((([e,t])=>He.default.createElement(O,{key:e,name:e,link:t,getComponent:l}))):He.default.createElement(\"i\",null,\"No links\")):null)}}var response_extension=({xKey:e,xVal:t})=>He.default.createElement(\"div\",{className:\"response__extension\"},e,\": \",String(t)),Ca=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return he.default}}),xa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ge.default}});class ResponseBody extends He.default.PureComponent{state={parsedContent:null};updateParsedContent=e=>{const{content:t}=this.props;if(e!==t)if(t&&t instanceof Blob){var r=new FileReader;r.onload=()=>{this.setState({parsedContent:r.result})},r.readAsText(t)}else this.setState({parsedContent:t.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(e){this.updateParsedContent(e.content)}render(){let{content:e,contentType:t,url:r,headers:n={},getComponent:a}=this.props;const{parsedContent:o}=this.state,s=a(\"HighlightCode\",!0),l=\"response_\"+(new Date).getTime();let i,c;if(r=r||\"\",(/^application\\/octet-stream/i.test(t)||n[\"Content-Disposition\"]&&/attachment/i.test(n[\"Content-Disposition\"])||n[\"content-disposition\"]&&/attachment/i.test(n[\"content-disposition\"])||n[\"Content-Description\"]&&/File Transfer/i.test(n[\"Content-Description\"])||n[\"content-description\"]&&/File Transfer/i.test(n[\"content-description\"]))&&(e.size>0||e.length>0))if(\"Blob\"in window){let a=t||\"text/html\",o=e instanceof Blob?e:new Blob([e],{type:a}),s=window.URL.createObjectURL(o),l=[a,r.substr(r.lastIndexOf(\"/\")+1),s].join(\":\"),i=n[\"content-disposition\"]||n[\"Content-Disposition\"];if(void 0!==i){let e=function extractFileNameFromContentDispositionHeader(e){let t;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((r=>(t=r.exec(e),null!==t))),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}(i);null!==e&&(l=e)}c=ct.navigator&&ct.navigator.msSaveOrOpenBlob?He.default.createElement(\"div\",null,He.default.createElement(\"a\",{href:s,onClick:()=>ct.navigator.msSaveOrOpenBlob(o,l)},\"Download file\")):He.default.createElement(\"div\",null,He.default.createElement(\"a\",{href:s,download:l},\"Download file\"))}else c=He.default.createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(t)){let t=null;getKnownSyntaxHighlighterLanguage(e)&&(t=\"json\");try{i=JSON.stringify(JSON.parse(e),null,\"  \")}catch(t){i=\"can't parse JSON.  Raw result:\\n\\n\"+e}c=He.default.createElement(s,{language:t,downloadable:!0,fileName:`${l}.json`,canCopy:!0},i)}else/xml/i.test(t)?(i=(0,Ca.default)(e,{textNodesOnSameLine:!0,indentor:\"  \"}),c=He.default.createElement(s,{downloadable:!0,fileName:`${l}.xml`,canCopy:!0},i)):c=\"text/html\"===(0,xa.default)(t)||/text\\/plain/.test(t)?He.default.createElement(s,{downloadable:!0,fileName:`${l}.html`,canCopy:!0},e):\"text/csv\"===(0,xa.default)(t)||/text\\/csv/.test(t)?He.default.createElement(s,{downloadable:!0,fileName:`${l}.csv`,canCopy:!0},e):/^image\\//i.test(t)?t.includes(\"svg\")?He.default.createElement(\"div\",null,\" \",e,\" \"):He.default.createElement(\"img\",{src:window.URL.createObjectURL(e)}):/^audio\\//i.test(t)?He.default.createElement(\"pre\",{className:\"microlight\"},He.default.createElement(\"audio\",{controls:!0,key:r},He.default.createElement(\"source\",{src:r,type:t}))):\"string\"==typeof e?He.default.createElement(s,{downloadable:!0,fileName:`${l}.txt`,canCopy:!0},e):e.size>0?o?He.default.createElement(\"div\",null,He.default.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),He.default.createElement(s,{downloadable:!0,fileName:`${l}.txt`,canCopy:!0},o)):He.default.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return c?He.default.createElement(\"div\",null,He.default.createElement(\"h5\",null,\"Response body\"),c):null}}class Parameters extends He.Component{constructor(e){super(e),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(e,t,r)=>{let{specActions:{changeParamByIdentity:n},onChangeKey:a}=this.props;n(a,e,t,r)};onChangeConsumesWrapper=e=>{let{specActions:{changeConsumesValue:t},onChangeKey:r}=this.props;t(r,e)};toggleTab=e=>\"parameters\"===e?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===e?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:e,pathMethod:t})=>{let{specActions:r,oas3Selectors:n,oas3Actions:a}=this.props;const o=n.hasUserEditedBody(...t),s=n.shouldRetainRequestBodyValue(...t);a.setRequestContentType({value:e,pathMethod:t}),a.initRequestBodyValidateError({pathMethod:t}),o||(s||a.setRequestBodyValue({value:void 0,pathMethod:t}),r.clearResponse(...t),r.clearRequest(...t),r.clearValidateParams(t))};render(){let{onTryoutClick:e,onResetClick:t,parameters:r,allowTryItOut:n,tryItOutEnabled:a,specPath:o,fn:s,getComponent:l,getConfigs:i,specSelectors:c,specActions:u,pathMethod:d,oas3Actions:p,oas3Selectors:m,operation:f}=this.props;const h=l(\"parameterRow\"),g=l(\"TryItOutButton\"),y=l(\"contentType\"),S=l(\"Callbacks\",!0),_=l(\"RequestBody\",!0),v=a&&n,b=c.isOAS3(),w=`${createHtmlReadyId(`${d[1]}${d[0]}_requests`)}_select`,C=f.get(\"requestBody\"),x=Object.values(r.reduce(((e,t)=>{if(Xe.Map.isMap(t)){const r=t.get(\"in\");e[r]??=[],e[r].push(t)}return e}),{})).reduce(((e,t)=>e.concat(t)),[]);return He.default.createElement(\"div\",{className:\"opblock-section\"},He.default.createElement(\"div\",{className:\"opblock-section-header\"},b?He.default.createElement(\"div\",{className:\"tab-header\"},He.default.createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},He.default.createElement(\"h4\",{className:\"opblock-title\"},He.default.createElement(\"span\",null,\"Parameters\"))),f.get(\"callbacks\")?He.default.createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},He.default.createElement(\"h4\",{className:\"opblock-title\"},He.default.createElement(\"span\",null,\"Callbacks\"))):null):He.default.createElement(\"div\",{className:\"tab-header\"},He.default.createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),n?He.default.createElement(g,{isOAS3:c.isOAS3(),hasUserEditedBody:m.hasUserEditedBody(...d),enabled:a,onCancelClick:this.props.onCancelClick,onTryoutClick:e,onResetClick:()=>t(d)}):null),this.state.parametersVisible?He.default.createElement(\"div\",{className:\"parameters-container\"},x.length?He.default.createElement(\"div\",{className:\"table-container\"},He.default.createElement(\"table\",{className:\"parameters\"},He.default.createElement(\"thead\",null,He.default.createElement(\"tr\",null,He.default.createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),He.default.createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),He.default.createElement(\"tbody\",null,x.map(((e,t)=>He.default.createElement(h,{fn:s,specPath:o.push(t.toString()),getComponent:l,getConfigs:i,rawParam:e,param:c.parameterWithMetaByIdentity(d,e),key:`${e.get(\"in\")}.${e.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:c,specActions:u,oas3Actions:p,oas3Selectors:m,pathMethod:d,isExecute:v})))))):He.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},He.default.createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?He.default.createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},He.default.createElement(S,{callbacks:(0,Xe.Map)(f.get(\"callbacks\")),specPath:o.slice(0,-1).push(\"callbacks\")})):null,b&&C&&this.state.parametersVisible&&He.default.createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},He.default.createElement(\"div\",{className:\"opblock-section-header\"},He.default.createElement(\"h4\",{className:`opblock-title parameter__name ${C.get(\"required\")&&\"required\"}`},\"Request body\"),He.default.createElement(\"label\",{id:w},He.default.createElement(y,{value:m.requestContentType(...d),contentTypes:C.get(\"content\",(0,Xe.List)()).keySeq(),onChange:e=>{this.onChangeMediaType({value:e,pathMethod:d})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:w}))),He.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},He.default.createElement(_,{setRetainRequestBodyValueFlag:e=>p.setRetainRequestBodyValueFlag({value:e,pathMethod:d}),userHasEditedBody:m.hasUserEditedBody(...d),specPath:o.slice(0,-1).push(\"requestBody\"),requestBody:C,requestBodyValue:m.requestBodyValue(...d),requestBodyInclusionSetting:m.requestBodyInclusionSetting(...d),requestBodyErrors:m.requestBodyErrors(...d),isExecute:v,getConfigs:i,activeExamplesKey:m.activeExamplesMember(...d,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(e,t)=>{if(t){const r=m.requestBodyValue(...d),n=Xe.Map.isMap(r)?r:(0,Xe.Map)();return p.setRequestBodyValue({pathMethod:d,value:n.setIn(t,e)})}p.setRequestBodyValue({value:e,pathMethod:d})},onChangeIncludeEmpty:(e,t)=>{p.setRequestBodyInclusion({pathMethod:d,value:t,name:e})},contentType:m.requestContentType(...d)}))))}}var parameter_extension=({xKey:e,xVal:t})=>He.default.createElement(\"div\",{className:\"parameter__extension\"},e,\": \",String(t));const Oa={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends He.Component{static defaultProps=Oa;componentDidMount(){const{isIncludedOptions:e,onChange:t}=this.props,{shouldDispatchInit:r,defaultValue:n}=e;r&&t(n)}onCheckboxChange=e=>{const{onChange:t}=this.props;t(e.target.checked)};render(){let{isIncluded:e,isDisabled:t}=this.props;return He.default.createElement(\"div\",null,He.default.createElement(\"label\",{htmlFor:\"include_empty_value\",className:(0,hr.default)(\"parameter__empty_value_toggle\",{disabled:t})},He.default.createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:t,checked:!t&&e,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends He.Component{constructor(e,t){super(e,t),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(e){let t,{specSelectors:r,pathMethod:n,rawParam:a}=e,o=r.isOAS3(),s=r.parameterWithMetaByIdentity(n,a)||new Xe.Map;if(s=s.isEmpty()?a:s,o){let{schema:e}=getParameterSchema(s,{isOAS3:o});t=e?e.get(\"enum\"):void 0}else t=s?s.get(\"enum\"):void 0;let l,i=s?s.get(\"value\"):void 0;void 0!==i?l=i:a.get(\"required\")&&t&&t.size&&(l=t.first()),void 0!==l&&l!==i&&this.onChangeWrapper(function numberToString(e){return\"number\"==typeof e?e.toString():e}(l)),this.setDefaultValue()}onChangeWrapper=(e,t=!1)=>{let r,{onChange:n,rawParam:a}=this.props;return r=\"\"===e||e&&0===e.size?null:e,n(a,r,t)};_onExampleSelect=e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=e=>{let{specActions:t,param:r,pathMethod:n}=this.props;const a=r.get(\"name\"),o=r.get(\"in\");return t.updateEmptyParamInclusion(n,a,o,e)};setDefaultValue=()=>{let{specSelectors:e,pathMethod:t,rawParam:r,oas3Selectors:n,fn:a}=this.props;const o=e.parameterWithMetaByIdentity(t,r)||(0,Xe.Map)();let{schema:s}=getParameterSchema(o,{isOAS3:e.isOAS3()});const l=o.get(\"content\",(0,Xe.Map)()).keySeq().first(),i=s?a.getSampleSchema(s.toJS(),l,{includeWriteOnly:!0}):null;if(o&&void 0===o.get(\"value\")&&\"body\"!==o.get(\"in\")){let r;if(e.isSwagger2())r=void 0!==o.get(\"x-example\")?o.get(\"x-example\"):void 0!==o.getIn([\"schema\",\"example\"])?o.getIn([\"schema\",\"example\"]):s&&s.getIn([\"default\"]);else if(e.isOAS3()){s=this.composeJsonSchema(s);const e=n.activeExamplesMember(...t,\"parameters\",this.getParamKey());r=void 0!==o.getIn([\"examples\",e,\"value\"])?o.getIn([\"examples\",e,\"value\"]):void 0!==o.getIn([\"content\",l,\"example\"])?o.getIn([\"content\",l,\"example\"]):void 0!==o.get(\"example\")?o.get(\"example\"):void 0!==(s&&s.get(\"example\"))?s&&s.get(\"example\"):void 0!==(s&&s.get(\"default\"))?s&&s.get(\"default\"):o.get(\"default\")}void 0===r||Xe.List.isList(r)||(r=stringify(r));const c=a.getSchemaObjectType(s),u=a.getSchemaObjectType(s?.get(\"items\"));void 0!==r?this.onChangeWrapper(r):\"object\"===c&&i&&!o.get(\"examples\")?this.onChangeWrapper(Xe.List.isList(i)?i:stringify(i)):\"array\"===c&&\"object\"===u&&i&&!o.get(\"examples\")&&this.onChangeWrapper(Xe.List.isList(i)?i:(0,Xe.List)(JSON.parse(i)))}};getParamKey(){const{param:e}=this.props;return e?`${e.get(\"name\")}-${e.get(\"in\")}`:null}composeJsonSchema(e){const{fn:t}=this.props,r=e.get(\"oneOf\")?.get(0)?.toJS(),n=e.get(\"anyOf\")?.get(0)?.toJS();return(0,Xe.fromJS)(t.mergeJsonSchema(e.toJS(),r??n??{}))}render(){let{param:e,rawParam:t,getComponent:r,getConfigs:n,isExecute:a,fn:o,onChangeConsumes:s,specSelectors:l,pathMethod:i,specPath:c,oas3Selectors:u}=this.props,d=l.isOAS3();const{showExtensions:p,showCommonExtensions:m}=n();if(e||(e=t),!t)return null;const f=r(\"JsonSchemaForm\"),h=r(\"ParamBody\");let g=e.get(\"in\"),y=\"body\"!==g?null:He.default.createElement(h,{getComponent:r,getConfigs:n,fn:o,param:e,consumes:l.consumesOptionsFor(i),consumesValue:l.contentTypeValues(i).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:s,isExecute:a,specSelectors:l,pathMethod:i});const S=r(\"modelExample\"),_=r(\"Markdown\",!0),v=r(\"ParameterExt\"),b=r(\"ParameterIncludeEmpty\"),w=r(\"ExamplesSelectValueRetainer\"),C=r(\"Example\");let{schema:x}=getParameterSchema(e,{isOAS3:d}),O=l.parameterWithMetaByIdentity(i,t)||(0,Xe.Map)();d&&(x=this.composeJsonSchema(x));let k=x?x.get(\"format\"):null,N=\"formData\"===g,A=\"FormData\"in ct,I=e.get(\"required\");const j=o.getSchemaObjectType(x),R=o.getSchemaObjectType(x?.get(\"items\")),T=o.getSchemaObjectTypeLabel(x),P=!y&&\"object\"===j,B=!y&&\"object\"===R;let M,q,L,U,D=O?O.get(\"value\"):\"\",$=m?getCommonExtensions(x):null,V=p?getExtensions(e):null,J=!1;void 0!==e&&x&&(M=x.get(\"items\")),void 0!==M?(q=M.get(\"enum\"),L=M.get(\"default\")):x&&(q=x.get(\"enum\")),q&&q.size&&q.size>0&&(J=!0),void 0!==e&&(x&&(L=x.get(\"default\")),void 0===L&&(L=e.get(\"default\")),U=e.get(\"example\"),void 0===U&&(U=e.get(\"x-example\")));const F=y?null:He.default.createElement(f,{fn:o,getComponent:r,value:D,required:I,disabled:!a,description:e.get(\"name\"),onChange:this.onChangeWrapper,errors:O.get(\"errors\"),schema:x});return He.default.createElement(\"tr\",{\"data-param-name\":e.get(\"name\"),\"data-param-in\":e.get(\"in\")},He.default.createElement(\"td\",{className:\"parameters-col_name\"},He.default.createElement(\"div\",{className:I?\"parameter__name required\":\"parameter__name\"},e.get(\"name\"),I?He.default.createElement(\"span\",null,\" *\"):null),He.default.createElement(\"div\",{className:\"parameter__type\"},T,k&&He.default.createElement(\"span\",{className:\"prop-format\"},\"($\",k,\")\")),He.default.createElement(\"div\",{className:\"parameter__deprecated\"},d&&e.get(\"deprecated\")?\"deprecated\":null),He.default.createElement(\"div\",{className:\"parameter__in\"},\"(\",e.get(\"in\"),\")\")),He.default.createElement(\"td\",{className:\"parameters-col_description\"},e.get(\"description\")?He.default.createElement(_,{source:e.get(\"description\")}):null,!y&&a||!J?null:He.default.createElement(_,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+q.map((function(e){return e})).toArray().map(String).join(\", \")}),!y&&a||void 0===L?null:He.default.createElement(_,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+L}),!y&&a||void 0===U?null:He.default.createElement(_,{source:\"<i>Example</i> : \"+U}),N&&!A&&He.default.createElement(\"div\",null,\"Error: your browser does not support FormData\"),d&&e.get(\"examples\")?He.default.createElement(\"section\",{className:\"parameter-controls\"},He.default.createElement(w,{examples:e.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:r,defaultToFirstExample:!0,currentKey:u.activeExamplesMember(...i,\"parameters\",this.getParamKey()),currentUserInputValue:D})):null,P||B?He.default.createElement(S,{getComponent:r,specPath:c.push(\"schema\"),getConfigs:n,isExecute:a,specSelectors:l,schema:x,example:F}):F,y&&x?He.default.createElement(S,{getComponent:r,specPath:c.push(\"schema\"),getConfigs:n,isExecute:a,specSelectors:l,schema:x,example:y,includeWriteOnly:!0}):null,!y&&a&&e.get(\"allowEmptyValue\")?He.default.createElement(b,{onChange:this.onChangeIncludeEmpty,isIncluded:l.parameterInclusionSettingFor(i,e.get(\"name\"),e.get(\"in\")),isDisabled:!isEmptyValue(D)}):null,d&&e.get(\"examples\")?He.default.createElement(C,{example:e.getIn([\"examples\",u.activeExamplesMember(...i,\"parameters\",this.getParamKey())]),getComponent:r,getConfigs:n}):null,m&&$.size?$.entrySeq().map((([e,t])=>He.default.createElement(v,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,p&&V.size?V.entrySeq().map((([e,t])=>He.default.createElement(v,{key:`${e}-${t}`,xKey:e,xVal:t}))):null))}}class Execute extends He.Component{handleValidateParameters=()=>{let{specSelectors:e,specActions:t,path:r,method:n}=this.props;return t.validateParams([r,n]),e.validateBeforeExecute([r,n])};handleValidateRequestBody=()=>{let{path:e,method:t,specSelectors:r,oas3Selectors:n,oas3Actions:a}=this.props,o={missingBodyValue:!1,missingRequiredKeys:[]};a.clearRequestBodyValidateError({path:e,method:t});let s=r.getOAS3RequiredRequestBodyContentType([e,t]),l=n.requestBodyValue(e,t),i=n.validateBeforeExecute([e,t]),c=n.requestContentType(e,t);if(!i)return o.missingBodyValue=!0,a.setRequestBodyValidateError({path:e,method:t,validationErrors:o}),!1;if(!s)return!0;let u=n.validateShallowRequired({oas3RequiredRequestBodyContentType:s,oas3RequestContentType:c,oas3RequestBodyValue:l});return!u||u.length<1||(u.forEach((e=>{o.missingRequiredKeys.push(e)})),a.setRequestBodyValidateError({path:e,method:t,validationErrors:o}),!1)};handleValidationResultPass=()=>{let{specActions:e,operation:t,path:r,method:n}=this.props;this.props.onExecute&&this.props.onExecute(),e.execute({operation:t,path:r,method:n})};handleValidationResultFail=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearValidateParams([t,r]),setTimeout((()=>{e.validateParams([t,r])}),40)};handleValidationResult=e=>{e?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let e=this.handleValidateParameters(),t=this.handleValidateRequestBody(),r=e&&t;this.handleValidationResult(r)};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);render(){const{disabled:e}=this.props;return He.default.createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:e},\"Execute\")}}class headers_Headers extends He.default.Component{render(){let{headers:e,getComponent:t}=this.props;const r=t(\"Property\"),n=t(\"Markdown\",!0);return e&&e.size?He.default.createElement(\"div\",{className:\"headers-wrapper\"},He.default.createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),He.default.createElement(\"table\",{className:\"headers\"},He.default.createElement(\"thead\",null,He.default.createElement(\"tr\",{className:\"header-row\"},He.default.createElement(\"th\",{className:\"header-col\"},\"Name\"),He.default.createElement(\"th\",{className:\"header-col\"},\"Description\"),He.default.createElement(\"th\",{className:\"header-col\"},\"Type\"))),He.default.createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>{if(!Xe.default.Map.isMap(t))return null;const a=t.get(\"description\"),o=t.getIn([\"schema\"])?t.getIn([\"schema\",\"type\"]):t.getIn([\"type\"]),s=t.getIn([\"schema\",\"example\"]);return He.default.createElement(\"tr\",{key:e},He.default.createElement(\"td\",{className:\"header-col\"},e),He.default.createElement(\"td\",{className:\"header-col\"},a?He.default.createElement(n,{source:a}):null),He.default.createElement(\"td\",{className:\"header-col\"},o,\" \",s?He.default.createElement(r,{propKey:\"Example\",propVal:s,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends He.default.Component{render(){let{editorActions:e,errSelectors:t,layoutSelectors:r,layoutActions:n,getComponent:a}=this.props;const o=a(\"Collapse\");if(e&&e.jumpToLine)var s=e.jumpToLine;let l=t.allErrors().filter((e=>\"thrown\"===e.get(\"type\")||\"error\"===e.get(\"level\")));if(!l||l.count()<1)return null;let i=r.isShown([\"errorPane\"],!0),c=l.sortBy((e=>e.get(\"line\")));return He.default.createElement(\"pre\",{className:\"errors-wrapper\"},He.default.createElement(\"hgroup\",{className:\"error\"},He.default.createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),He.default.createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>n.show([\"errorPane\"],!i)},i?\"Hide\":\"Show\")),He.default.createElement(o,{isOpened:i,animated:!0},He.default.createElement(\"div\",{className:\"errors\"},c.map(((e,t)=>{let r=e.get(\"type\");return\"thrown\"===r||\"auth\"===r?He.default.createElement(ThrownErrorItem,{key:t,error:e.get(\"error\")||e,jumpToLine:s}):\"spec\"===r?He.default.createElement(SpecErrorItem,{key:t,error:e,jumpToLine:s}):void 0})))))}}const ThrownErrorItem=({error:e,jumpToLine:t})=>{if(!e)return null;let r=e.get(\"line\");return He.default.createElement(\"div\",{className:\"error-wrapper\"},e?He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,e.get(\"source\")&&e.get(\"level\")?toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"):\"\",e.get(\"path\")?He.default.createElement(\"small\",null,\" at \",e.get(\"path\")):null),He.default.createElement(\"span\",{className:\"message thrown\"},e.get(\"message\")),He.default.createElement(\"div\",{className:\"error-line\"},r&&t?He.default.createElement(\"a\",{onClick:t.bind(null,r)},\"Jump to line \",r):null)):null)},SpecErrorItem=({error:e,jumpToLine:t=null})=>{let r=null;return e.get(\"path\")?r=Xe.List.isList(e.get(\"path\"))?He.default.createElement(\"small\",null,\"at \",e.get(\"path\").join(\".\")):He.default.createElement(\"small\",null,\"at \",e.get(\"path\")):e.get(\"line\")&&!t&&(r=He.default.createElement(\"small\",null,\"on line \",e.get(\"line\"))),He.default.createElement(\"div\",{className:\"error-wrapper\"},e?He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"),\" \",r),He.default.createElement(\"span\",{className:\"message\"},e.get(\"message\")),He.default.createElement(\"div\",{className:\"error-line\"},t?He.default.createElement(\"a\",{onClick:t.bind(null,e.get(\"line\"))},\"Jump to line \",e.get(\"line\")):null)):null)};function toTitleCase(e){return(e||\"\").split(\" \").map((e=>e[0].toUpperCase()+e.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends He.default.Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,Xe.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(e){e.contentTypes&&e.contentTypes.size&&(e.contentTypes.includes(e.value)||e.onChange(e.contentTypes.first()))}onChangeWrapper=e=>this.props.onChange(e.target.value);render(){let{ariaControls:e,ariaLabel:t,className:r,contentTypes:n,controlId:a,value:o}=this.props;return n&&n.size?He.default.createElement(\"div\",{className:\"content-type-wrapper \"+(r||\"\")},He.default.createElement(\"select\",{\"aria-controls\":e,\"aria-label\":t,className:\"content-type\",id:a,onChange:this.onChangeWrapper,value:o||\"\"},n.map((e=>He.default.createElement(\"option\",{key:e,value:e},e))).toArray())):null}}function xclass(...e){return e.filter((e=>!!e)).join(\" \").trim()}class Container extends He.default.Component{render(){let{fullscreen:e,full:t,...r}=this.props;if(e)return He.default.createElement(\"section\",r);let n=\"swagger-container\"+(t?\"-full\":\"\");return He.default.createElement(\"section\",(0,ar.default)({},r,{className:xclass(r.className,n)}))}}const ka={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends He.default.Component{render(){const{hide:e,keepContents:t,mobile:r,tablet:n,desktop:a,large:o,...s}=this.props;if(e&&!t)return He.default.createElement(\"span\",null);let l=[];for(let e in ka){if(!Object.prototype.hasOwnProperty.call(ka,e))continue;let t=ka[e];if(e in this.props){let r=this.props[e];if(r<1){l.push(\"none\"+t);continue}l.push(\"block\"+t),l.push(\"col-\"+r+t)}}e&&l.push(\"hidden\");let i=xclass(s.className,...l);return He.default.createElement(\"section\",(0,ar.default)({},s,{className:i}))}}class Row extends He.default.Component{render(){return He.default.createElement(\"div\",(0,ar.default)({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends He.default.Component{static defaultProps={className:\"\"};render(){return He.default.createElement(\"button\",(0,ar.default)({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=e=>He.default.createElement(\"textarea\",e),Input=e=>He.default.createElement(\"input\",e);class Select extends He.default.Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(e,t){let r;super(e,t),r=e.value?e.value:e.multiple?[\"\"]:\"\",this.state={value:r}}onChange=e=>{let t,{onChange:r,multiple:n}=this.props,a=[].slice.call(e.target.options);t=n?a.filter((function(e){return e.selected})).map((function(e){return e.value})):e.target.value,this.setState({value:t}),r&&r(t)};UNSAFE_componentWillReceiveProps(e){e.value!==this.props.value&&this.setState({value:e.value})}render(){let{allowedValues:e,multiple:t,allowEmptyValue:r,disabled:n}=this.props,a=this.state.value?.toJS?.()||this.state.value;return He.default.createElement(\"select\",{className:this.props.className,multiple:t,value:a,onChange:this.onChange,disabled:n},r?He.default.createElement(\"option\",{value:\"\"},\"--\"):null,e.map((function(e,t){return He.default.createElement(\"option\",{key:t,value:String(e)},String(e))})))}}class Link extends He.default.Component{render(){return He.default.createElement(\"a\",(0,ar.default)({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:e})=>He.default.createElement(\"div\",{className:\"no-margin\"},\" \",e,\" \");class Collapse extends He.default.Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?He.default.createElement(NoMargin,null,this.props.children):He.default.createElement(\"noscript\",null)}render(){let{animated:e,isOpened:t,children:r}=this.props;return e?(r=t?r:null,He.default.createElement(NoMargin,null,r)):this.renderNotAnimated()}}class Overview extends He.default.Component{constructor(...e){super(...e),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(e,t){this.props.layoutActions.show(e,t)}showOp(e,t){let{layoutActions:r}=this.props;r.show(e,t)}render(){let{specSelectors:e,layoutSelectors:t,layoutActions:r,getComponent:n}=this.props,a=e.taggedOperations();const o=n(\"Collapse\");return He.default.createElement(\"div\",null,He.default.createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),a.map(((e,n)=>{let a=e.get(\"operations\"),s=[\"overview-tags\",n],l=t.isShown(s,!0);return He.default.createElement(\"div\",{key:\"overview-\"+n},He.default.createElement(\"h4\",{onClick:()=>r.show(s,!l),className:\"link overview-tag\"},\" \",l?\"-\":\"+\",n),He.default.createElement(o,{isOpened:l,animated:!0},a.map((e=>{let{path:n,method:a,id:o}=e.toObject(),s=\"operations\",l=o,i=t.isShown([s,l]);return He.default.createElement(OperationLink,{key:o,path:n,method:a,id:n+\"-\"+a,shown:i,showOpId:l,showOpIdPrefix:s,href:`#operation-${l}`,onClick:r.show})})).toArray()))})).toArray(),a.size<1&&He.default.createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends He.default.Component{constructor(e){super(e),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:e,showOpIdPrefix:t,onClick:r,shown:n}=this.props;r([t,e],!n)}render(){let{id:e,method:t,shown:r,href:n}=this.props;return He.default.createElement(Link,{href:n,onClick:this.onClick,className:\"block opblock-link \"+(r?\"shown\":\"\")},He.default.createElement(\"div\",null,He.default.createElement(\"small\",{className:`bold-label-${t}`},t.toUpperCase()),He.default.createElement(\"span\",{className:\"bold-label\"},e)))}}class InitializedInput extends He.default.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:e,defaultValue:t,initialValue:r,...n}=this.props;return He.default.createElement(\"input\",(0,ar.default)({},n,{ref:e=>this.inputRef=e}))}}class InfoBasePath extends He.default.Component{render(){const{host:e,basePath:t}=this.props;return He.default.createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",e,t,\" ]\")}}class InfoUrl extends He.default.PureComponent{render(){const{url:e,getComponent:t}=this.props,r=t(\"Link\");return He.default.createElement(r,{target:\"_blank\",href:sanitizeUrl(e)},He.default.createElement(\"span\",{className:\"url\"},\" \",e))}}class Info extends He.default.Component{render(){const{info:e,url:t,host:r,basePath:n,getComponent:a,externalDocs:o,selectedServer:s,url:l}=this.props,i=e.get(\"version\"),c=e.get(\"description\"),u=e.get(\"title\"),d=safeBuildUrl(e.get(\"termsOfService\"),l,{selectedServer:s}),p=e.get(\"contact\"),m=e.get(\"license\"),f=safeBuildUrl(o&&o.get(\"url\"),l,{selectedServer:s}),h=o&&o.get(\"description\"),g=a(\"Markdown\",!0),y=a(\"Link\"),S=a(\"VersionStamp\"),_=a(\"OpenAPIVersion\"),v=a(\"InfoUrl\"),b=a(\"InfoBasePath\"),w=a(\"License\"),C=a(\"Contact\");return He.default.createElement(\"div\",{className:\"info\"},He.default.createElement(\"hgroup\",{className:\"main\"},He.default.createElement(\"h2\",{className:\"title\"},u,He.default.createElement(\"span\",null,i&&He.default.createElement(S,{version:i}),He.default.createElement(_,{oasVersion:\"2.0\"}))),r||n?He.default.createElement(b,{host:r,basePath:n}):null,t&&He.default.createElement(v,{getComponent:a,url:t})),He.default.createElement(\"div\",{className:\"description\"},He.default.createElement(g,{source:c})),d&&He.default.createElement(\"div\",{className:\"info__tos\"},He.default.createElement(y,{target:\"_blank\",href:sanitizeUrl(d)},\"Terms of service\")),p?.size>0&&He.default.createElement(C,{getComponent:a,data:p,selectedServer:s,url:t}),m?.size>0&&He.default.createElement(w,{getComponent:a,license:m,selectedServer:s,url:t}),f?He.default.createElement(y,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(f)},h||f):null)}}var Na=Info;class InfoContainer extends He.default.Component{render(){const{specSelectors:e,getComponent:t,oas3Selectors:r}=this.props,n=e.info(),a=e.url(),o=e.basePath(),s=e.host(),l=e.externalDocs(),i=r.selectedServer(),c=t(\"info\");return He.default.createElement(\"div\",null,n&&n.count()?He.default.createElement(c,{info:n,url:a,host:s,basePath:o,externalDocs:l,getComponent:t,selectedServer:i}):null)}}class Contact extends He.default.Component{render(){const{data:e,getComponent:t,selectedServer:r,url:n}=this.props,a=e.get(\"name\",\"the developer\"),o=safeBuildUrl(e.get(\"url\"),n,{selectedServer:r}),s=e.get(\"email\"),l=t(\"Link\");return He.default.createElement(\"div\",{className:\"info__contact\"},o&&He.default.createElement(\"div\",null,He.default.createElement(l,{href:sanitizeUrl(o),target:\"_blank\"},a,\" - Website\")),s&&He.default.createElement(l,{href:sanitizeUrl(`mailto:${s}`)},o?`Send email to ${a}`:`Contact ${a}`))}}var Aa=Contact;class License extends He.default.Component{render(){const{license:e,getComponent:t,selectedServer:r,url:n}=this.props,a=e.get(\"name\",\"License\"),o=safeBuildUrl(e.get(\"url\"),n,{selectedServer:r}),s=t(\"Link\");return He.default.createElement(\"div\",{className:\"info__license\"},o?He.default.createElement(\"div\",{className:\"info__license__url\"},He.default.createElement(s,{target:\"_blank\",href:sanitizeUrl(o)},a)):He.default.createElement(\"span\",null,a))}}var Ia=License;class JumpToPath extends He.default.Component{render(){return null}}class CopyToClipboardBtn extends He.default.Component{render(){let{getComponent:e}=this.props;const t=e(\"CopyIcon\");return He.default.createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},He.default.createElement(gr.CopyToClipboard,{text:this.props.textToCopy},He.default.createElement(t,null)))}}class Footer extends He.default.Component{render(){return He.default.createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends He.default.Component{onFilterChange=e=>{const{target:{value:t}}=e;this.props.layoutActions.updateFilter(t)};render(){const{specSelectors:e,layoutSelectors:t,getComponent:r}=this.props,n=r(\"Col\"),a=\"loading\"===e.loadingStatus(),o=\"failed\"===e.loadingStatus(),s=t.currentFilter(),l=[\"operation-filter-input\"];return o&&l.push(\"failed\"),a&&l.push(\"loading\"),He.default.createElement(\"div\",null,!1===s?null:He.default.createElement(\"div\",{className:\"filter-container\"},He.default.createElement(n,{className:\"filter wrapper\",mobile:12},He.default.createElement(\"input\",{className:l.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:\"string\"==typeof s?s:\"\",disabled:a}))))}}const ja=Function.prototype;class ParamBody extends He.PureComponent{static defaultProp={consumes:(0,Xe.fromJS)([\"application/json\"]),param:(0,Xe.fromJS)({}),onChange:ja,onChangeConsumes:ja};constructor(e,t){super(e,t),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(e){this.updateValues.call(this,e)}updateValues=e=>{let{param:t,isExecute:r,consumesValue:n=\"\"}=e,a=/xml/i.test(n),o=/json/i.test(n),s=a?t.get(\"value_xml\"):t.get(\"value\");if(void 0!==s){let e=!s&&o?\"{}\":s;this.setState({value:e}),this.onChange(e,{isXml:a,isEditBox:r})}else a?this.onChange(this.sample(\"xml\"),{isXml:a,isEditBox:r}):this.onChange(this.sample(),{isEditBox:r})};sample=e=>{let{param:t,fn:r}=this.props,n=r.inferSchema(t.toJS());return r.getSampleSchema(n,e,{includeWriteOnly:!0})};onChange=(e,{isEditBox:t,isXml:r})=>{this.setState({value:e,isEditBox:t}),this._onChange(e,r)};_onChange=(e,t)=>{(this.props.onChange||ja)(e,t)};handleOnChange=e=>{const{consumesValue:t}=this.props,r=/xml/i.test(t),n=e.target.value;this.onChange(n,{isXml:r,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((e=>({isEditBox:!e.isEditBox})));render(){let{onChangeConsumes:e,param:t,isExecute:r,specSelectors:n,pathMethod:a,getComponent:o}=this.props;const s=o(\"Button\"),l=o(\"TextArea\"),i=o(\"HighlightCode\",!0),c=o(\"contentType\");let u=(n?n.parameterWithMetaByIdentity(a,t):t).get(\"errors\",(0,Xe.List)()),d=n.contentTypeValues(a).get(\"requestContentType\"),p=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:m,isEditBox:f}=this.state,h=null;getKnownSyntaxHighlighterLanguage(m)&&(h=\"json\");const g=`${createHtmlReadyId(`${a[1]}${a[0]}_parameters`)}_select`;return He.default.createElement(\"div\",{className:\"body-param\",\"data-param-name\":t.get(\"name\"),\"data-param-in\":t.get(\"in\")},f&&r?He.default.createElement(l,{className:\"body-param__text\"+(u.count()?\" invalid\":\"\"),value:m,onChange:this.handleOnChange}):m&&He.default.createElement(i,{className:\"body-param__example\",language:h},m),He.default.createElement(\"div\",{className:\"body-param-options\"},r?He.default.createElement(\"div\",{className:\"body-param-edit\"},He.default.createElement(s,{className:f?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},f?\"Cancel\":\"Edit\")):null,He.default.createElement(\"label\",{htmlFor:g},He.default.createElement(\"span\",null,\"Parameter content type\"),He.default.createElement(c,{value:d,contentTypes:p,onChange:e,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:g}))))}}class Curl extends He.default.Component{render(){const{request:e,getComponent:t}=this.props,r=requestSnippetGenerator_curl_bash(e),n=t(\"SyntaxHighlighter\",!0);return He.default.createElement(\"div\",{className:\"curl-command\"},He.default.createElement(\"h4\",null,\"Curl\"),He.default.createElement(\"div\",{className:\"copy-to-clipboard\"},He.default.createElement(gr.CopyToClipboard,{text:r},He.default.createElement(\"button\",null))),He.default.createElement(\"div\",null,He.default.createElement(n,{language:\"bash\",className:\"curl microlight\",renderPlainText:({children:e,PlainTextViewer:t})=>He.default.createElement(t,{className:\"curl\"},e)},r)))}}var property=({propKey:e,propVal:t,propClass:r})=>He.default.createElement(\"span\",{className:r},He.default.createElement(\"br\",null),e,\": \",String(t));class TryItOutButton extends He.default.Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:e,onCancelClick:t,onResetClick:r,enabled:n,hasUserEditedBody:a,isOAS3:o}=this.props,s=o&&a;return He.default.createElement(\"div\",{className:s?\"try-out btn-group\":\"try-out\"},n?He.default.createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:t},\"Cancel\"):He.default.createElement(\"button\",{className:\"btn try-out__btn\",onClick:e},\"Try it out \"),s&&He.default.createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:r},\"Reset\"))}}class VersionPragmaFilter extends He.default.PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:e,isSwagger2:t,isOAS3:r,alsoShow:n}=this.props;return e?He.default.createElement(\"div\",null,this.props.children):t&&r?He.default.createElement(\"div\",{className:\"version-pragma\"},n,He.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},He.default.createElement(\"div\",null,He.default.createElement(\"h3\",null,\"Unable to render this definition\"),He.default.createElement(\"p\",null,He.default.createElement(\"code\",null,\"swagger\"),\" and \",He.default.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),He.default.createElement(\"p\",null,\"Supported version fields are \",He.default.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",He.default.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",He.default.createElement(\"code\",null,\"openapi: 3.0.4\"),\").\")))):t||r?He.default.createElement(\"div\",null,this.props.children):He.default.createElement(\"div\",{className:\"version-pragma\"},n,He.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},He.default.createElement(\"div\",null,He.default.createElement(\"h3\",null,\"Unable to render this definition\"),He.default.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),He.default.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",He.default.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",He.default.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",He.default.createElement(\"code\",null,\"openapi: 3.0.4\"),\").\"))))}}var version_stamp=({version:e})=>He.default.createElement(\"small\",null,He.default.createElement(\"pre\",{className:\"version\"},\" \",e,\" \"));var openapi_version=({oasVersion:e})=>He.default.createElement(\"small\",{className:\"version-stamp\"},He.default.createElement(\"pre\",{className:\"version\"},\"OAS \",e));var deep_link=({enabled:e,path:t,text:r})=>He.default.createElement(\"a\",{className:\"nostyle\",onClick:e?e=>e.preventDefault():null,href:e?`#/${t}`:null},He.default.createElement(\"span\",null,r));var svg_assets=()=>He.default.createElement(\"div\",null,He.default.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},He.default.createElement(\"defs\",null,He.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},He.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},He.default.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},He.default.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},He.default.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},He.default.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},He.default.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},He.default.createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},He.default.createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),He.default.createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},He.default.createElement(\"g\",{transform:\"translate(2, -1)\"},He.default.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"})))))),Ra=function(e){var t={};return __webpack_require__.d(t,e),t}({Remarkable:function(){return ye.Remarkable}}),Ta=function(e){var t={};return __webpack_require__.d(t,e),t}({linkify:function(){return Ee.linkify}}),Pa=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return Se.default}});Pa.default.addHook&&Pa.default.addHook(\"beforeSanitizeElements\",(function(e){return e.href&&e.setAttribute(\"rel\",\"noopener noreferrer\"),e}));var Ba=function Markdown({source:e,className:t=\"\",getConfigs:r=()=>({useUnsafeMarkdown:!1})}){if(\"string\"!=typeof e)return null;const n=new Ra.Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(Ta.linkify);n.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:a}=r(),o=n.render(e),s=sanitizer(o,{useUnsafeMarkdown:a});return e&&o&&s?He.default.createElement(\"div\",{className:(0,hr.default)(t,\"markdown\"),dangerouslySetInnerHTML:{__html:s}}):null};function sanitizer(e,{useUnsafeMarkdown:t=!1}={}){const r=t,n=t?[]:[\"style\",\"class\"];return t&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),Pa.default.sanitize(e,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:r,FORBID_ATTR:n})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends He.default.Component{render(){const{errSelectors:e,specSelectors:t,getComponent:r}=this.props,n=r(\"SvgAssets\"),a=r(\"InfoContainer\",!0),o=r(\"VersionPragmaFilter\"),s=r(\"operations\",!0),l=r(\"Models\",!0),i=r(\"Webhooks\",!0),c=r(\"Row\"),u=r(\"Col\"),d=r(\"errors\",!0),p=r(\"ServersContainer\",!0),m=r(\"SchemesContainer\",!0),f=r(\"AuthorizeBtnContainer\",!0),h=r(\"FilterContainer\",!0),g=t.isSwagger2(),y=t.isOAS3(),S=t.isOAS31(),_=!t.specStr(),v=t.loadingStatus();let b=null;if(\"loading\"===v&&(b=He.default.createElement(\"div\",{className:\"info\"},He.default.createElement(\"div\",{className:\"loading-container\"},He.default.createElement(\"div\",{className:\"loading\"})))),\"failed\"===v&&(b=He.default.createElement(\"div\",{className:\"info\"},He.default.createElement(\"div\",{className:\"loading-container\"},He.default.createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),He.default.createElement(d,null)))),\"failedConfig\"===v){const t=e.lastError(),r=t?t.get(\"message\"):\"\";b=He.default.createElement(\"div\",{className:\"info failed-config\"},He.default.createElement(\"div\",{className:\"loading-container\"},He.default.createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),He.default.createElement(\"p\",null,r)))}if(!b&&_&&(b=He.default.createElement(\"h4\",null,\"No API definition provided.\")),b)return He.default.createElement(\"div\",{className:\"swagger-ui\"},He.default.createElement(\"div\",{className:\"loading-container\"},b));const w=t.servers(),C=t.schemes(),x=w&&w.size,O=C&&C.size,k=!!t.securityDefinitions();return He.default.createElement(\"div\",{className:\"swagger-ui\"},He.default.createElement(n,null),He.default.createElement(o,{isSwagger2:g,isOAS3:y,alsoShow:He.default.createElement(d,null)},He.default.createElement(d,null),He.default.createElement(c,{className:\"information-container\"},He.default.createElement(u,{mobile:12},He.default.createElement(a,null))),x||O||k?He.default.createElement(\"div\",{className:\"scheme-container\"},He.default.createElement(u,{className:\"schemes wrapper\",mobile:12},x||O?He.default.createElement(\"div\",{className:\"schemes-server-container\"},x?He.default.createElement(p,null):null,O?He.default.createElement(m,null):null):null,k?He.default.createElement(f,null):null)):null,He.default.createElement(h,null),He.default.createElement(c,null,He.default.createElement(u,{mobile:12,desktop:12},He.default.createElement(s,null))),S&&He.default.createElement(c,{className:\"webhooks-container\"},He.default.createElement(u,{mobile:12,desktop:12},He.default.createElement(i,null))),He.default.createElement(c,null,He.default.createElement(u,{mobile:12,desktop:12},He.default.createElement(l,null)))))}}var core_components=()=>({components:{App:ba,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:Na,InfoContainer,InfoUrl,InfoBasePath,Contact:Aa,License:Ia,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,responses:Responses,response:Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,Property:property,TryItOutButton,Markdown:Ba,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example,ExamplesSelect,ExamplesSelectValueRetainer}});var form_components=()=>({components:{...Ve}});var base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5,json_schema_5_samples,core_components,form_components,swagger_client,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,syntax_highlighting,versions,safe_render()];const Ma=(0,Xe.Map)();function onlyOAS3(e){return(t,r)=>(...n)=>{if(r.getSystem().specSelectors.isOAS3()){const t=e(...n);return\"function\"==typeof t?t(r):t}return t(...n)}}const qa=onlyOAS3((0,Lr.default)(null)),La=onlyOAS3(((e,t)=>e=>e.getSystem().specSelectors.findSchema(t))),Ua=onlyOAS3((()=>e=>{const t=e.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return Xe.Map.isMap(t)?t:Ma})),Da=onlyOAS3((()=>e=>e.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),$a=onlyOAS3((0,Pt.createSelector)(Wr,(e=>e.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(e,t)=>(r,...n)=>t.specSelectors.isOAS3()?t.oas3Selectors.validOperationMethods():e(...n),Va=qa,Ja=qa,Fa=qa,za=qa,Ka=qa;const Wa=function wrap_selectors_onlyOAS3(e){return(t,r)=>(...n)=>{if(r.getSystem().specSelectors.isOAS3()){let t=r.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return e(r,t,...n)}return t(...n)}}((0,Pt.createSelector)((e=>e),(({specSelectors:e})=>e.securityDefinitions()),((e,t)=>{let r=(0,Xe.List)();return t?(t.entrySeq().forEach((([e,t])=>{const n=t?.get(\"type\");if(\"oauth2\"===n&&t.get(\"flows\").entrySeq().forEach((([n,a])=>{let o=(0,Xe.fromJS)({flow:n,authorizationUrl:a.get(\"authorizationUrl\"),tokenUrl:a.get(\"tokenUrl\"),scopes:a.get(\"scopes\"),type:t.get(\"type\"),description:t.get(\"description\")});r=r.push(new Xe.Map({[e]:o.filter((e=>void 0!==e))}))})),\"http\"!==n&&\"apiKey\"!==n||(r=r.push(new Xe.Map({[e]:t}))),\"openIdConnect\"===n&&t.get(\"openIdConnectData\")){let n=t.get(\"openIdConnectData\");(n.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((a=>{let o=n.get(\"scopes_supported\")&&n.get(\"scopes_supported\").reduce(((e,t)=>e.set(t,\"\")),new Xe.Map),s=(0,Xe.fromJS)({flow:a,authorizationUrl:n.get(\"authorization_endpoint\"),tokenUrl:n.get(\"token_endpoint\"),scopes:o,type:\"oauth2\",openIdConnectUrl:t.get(\"openIdConnectUrl\")});r=r.push(new Xe.Map({[e]:s.filter((e=>void 0!==e))}))}))}})),r):r})));function OAS3ComponentWrapFactory(e){return(t,r)=>n=>\"function\"==typeof r.specSelectors?.isOAS3?r.specSelectors.isOAS3()?He.default.createElement(e,(0,ar.default)({},n,r,{Ori:t})):He.default.createElement(t,n):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const Ha=(0,Xe.Map)(),selectors_isSwagger2=()=>e=>function isSwagger2(e){const t=e.get(\"swagger\");return\"string\"==typeof t&&\"2.0\"===t}(e.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>e=>function isOAS30(e){const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.0\\.(?:[1-9]\\d*|0)$/.test(t)}(e.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>e=>e.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(e){return(t,...r)=>n=>{if(n.specSelectors.isOAS3()){const a=e(t,...r);return\"function\"==typeof a?a(n):a}return null}}const Ga=selectors_onlyOAS3((()=>e=>e.specSelectors.specJson().get(\"servers\",Ha))),findSchema=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",t],null),n=e.getIn([\"json\",\"components\",\"schemas\",t],null);return r||n||null},Xa=selectors_onlyOAS3(((e,{callbacks:t,specPath:r})=>e=>{const n=e.specSelectors.validOperationMethods();return Xe.Map.isMap(t)?t.reduce(((e,t,a)=>{if(!Xe.Map.isMap(t))return e;const o=t.reduce(((e,t,o)=>{if(!Xe.Map.isMap(t))return e;const s=t.entrySeq().filter((([e])=>n.includes(e))).map((([e,t])=>({operation:(0,Xe.Map)({operation:t}),method:e,path:o,callbackName:a,specPath:r.concat([a,o,e])})));return e.concat(s)}),(0,Xe.List)());return e.concat(o)}),(0,Xe.List)()).groupBy((e=>e.callbackName)).map((e=>e.toArray())).toObject():{}}));var callbacks=({callbacks:e,specPath:t,specSelectors:r,getComponent:n})=>{const a=r.callbacksOperations({callbacks:e,specPath:t}),o=Object.keys(a),s=n(\"OperationContainer\",!0);return 0===o.length?He.default.createElement(\"span\",null,\"No callbacks\"):He.default.createElement(\"div\",null,o.map((e=>He.default.createElement(\"div\",{key:`${e}`},He.default.createElement(\"h2\",null,e),a[e].map((t=>He.default.createElement(s,{key:`${e}-${t.path}-${t.method}`,op:t.operation,tag:\"callbacks\",method:t.method,path:t.path,specPath:t.specPath,allowTryItOut:!1})))))))};const getDefaultRequestBodyValue=(e,t,r,n)=>{const a=e.getIn([\"content\",t])??(0,Xe.OrderedMap)(),o=a.get(\"schema\",(0,Xe.OrderedMap)()).toJS(),s=void 0!==a.get(\"examples\"),l=a.get(\"example\"),i=s?a.getIn([\"examples\",r,\"value\"]):l;return stringify(n.getSampleSchema(o,t,{includeWriteOnly:!0},i))};var request_body=({userHasEditedBody:e,requestBody:t,requestBodyValue:r,requestBodyInclusionSetting:n,requestBodyErrors:a,getComponent:o,getConfigs:s,specSelectors:l,fn:i,contentType:c,isExecute:u,specPath:d,onChange:p,onChangeIncludeEmpty:m,activeExamplesKey:f,updateActiveExamplesKey:h,setRetainRequestBodyValueFlag:g})=>{const handleFile=e=>{p(e.target.files[0])},setIsIncludedOptions=e=>{let t={key:e,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===n.get(e,\"no value\")&&(t.shouldDispatchInit=!0),t},y=o(\"Markdown\",!0),S=o(\"modelExample\"),_=o(\"RequestBodyEditor\"),v=o(\"HighlightCode\",!0),b=o(\"ExamplesSelectValueRetainer\"),w=o(\"Example\"),C=o(\"ParameterIncludeEmpty\"),{showCommonExtensions:x}=s(),O=t?.get(\"description\")??null,k=t?.get(\"content\")??new Xe.OrderedMap;c=c||k.keySeq().first()||\"\";const N=k.get(c)??(0,Xe.OrderedMap)(),A=N.get(\"schema\",(0,Xe.OrderedMap)()),I=N.get(\"examples\",null),j=I?.map(((e,r)=>{const n=e?.get(\"value\",null);return n&&(e=e.set(\"value\",getDefaultRequestBodyValue(t,c,r,i),n)),e}));a=Xe.List.isList(a)?a:(0,Xe.List)();if(i.isFileUploadIntended(N?.get(\"schema\"),c)){const e=o(\"Input\");return u?He.default.createElement(e,{type:\"file\",onChange:handleFile}):He.default.createElement(\"i\",null,\"Example values are not available for \",He.default.createElement(\"code\",null,c),\" media types.\")}if(!N.size)return null;if(i.hasSchemaType(N.get(\"schema\"),\"object\")&&(\"application/x-www-form-urlencoded\"===c||0===c.indexOf(\"multipart/\"))&&A.get(\"properties\",(0,Xe.OrderedMap)()).size>0){const e=o(\"JsonSchemaForm\"),t=o(\"ParameterExt\"),c=A.get(\"properties\",(0,Xe.OrderedMap)());return r=Xe.Map.isMap(r)?r:(0,Xe.OrderedMap)(),He.default.createElement(\"div\",{className:\"table-container\"},O&&He.default.createElement(y,{source:O}),He.default.createElement(\"table\",null,He.default.createElement(\"tbody\",null,Xe.Map.isMap(c)&&c.entrySeq().map((([c,f])=>{if(f.get(\"readOnly\"))return;const h=f.get(\"oneOf\")?.get(0)?.toJS(),g=f.get(\"anyOf\")?.get(0)?.toJS();f=(0,Xe.fromJS)(i.mergeJsonSchema(f.toJS(),h??g??{}));let _=x?getCommonExtensions(f):null;const v=A.get(\"required\",(0,Xe.List)()).includes(c),b=i.getSchemaObjectType(f),w=i.getSchemaObjectTypeLabel(f),O=i.getSchemaObjectType(f?.get(\"items\")),k=f.get(\"format\"),N=f.get(\"description\"),I=r.getIn([c,\"value\"]),j=r.getIn([c,\"errors\"])||a,R=n.get(c)||!1;let T=i.getSampleSchema(f,!1,{includeWriteOnly:!0});!1===T&&(T=\"false\"),0===T&&(T=\"0\"),\"string\"!=typeof T&&\"object\"===b&&(T=stringify(T)),\"string\"==typeof T&&\"array\"===b&&(T=JSON.parse(T));const P=i.isFileUploadIntended(f),B=He.default.createElement(e,{fn:i,dispatchInitialValue:!P,schema:f,description:c,getComponent:o,value:void 0===I?T:I,required:v,errors:j,onChange:e=>{p(e,[c])}});return He.default.createElement(\"tr\",{key:c,className:\"parameters\",\"data-property-name\":c},He.default.createElement(\"td\",{className:\"parameters-col_name\"},He.default.createElement(\"div\",{className:v?\"parameter__name required\":\"parameter__name\"},c,v?He.default.createElement(\"span\",null,\" *\"):null),He.default.createElement(\"div\",{className:\"parameter__type\"},w,k&&He.default.createElement(\"span\",{className:\"prop-format\"},\"($\",k,\")\"),x&&_.size?_.entrySeq().map((([e,r])=>He.default.createElement(t,{key:`${e}-${r}`,xKey:e,xVal:r}))):null),He.default.createElement(\"div\",{className:\"parameter__deprecated\"},f.get(\"deprecated\")?\"deprecated\":null)),He.default.createElement(\"td\",{className:\"parameters-col_description\"},He.default.createElement(y,{source:N}),u?He.default.createElement(\"div\",null,\"object\"===b||\"object\"===O?He.default.createElement(S,{getComponent:o,specPath:d.push(\"schema\"),getConfigs:s,isExecute:u,specSelectors:l,schema:f,example:B}):B,v?null:He.default.createElement(C,{onChange:e=>m(c,e),isIncluded:R,isIncludedOptions:setIsIncludedOptions(c),isDisabled:Array.isArray(I)?0!==I.length:!isEmptyValue(I)})):null))})))))}const R=getDefaultRequestBodyValue(t,c,f,i);let T=null;getKnownSyntaxHighlighterLanguage(R)&&(T=\"json\");const P=u?He.default.createElement(_,{value:r,errors:a,defaultValue:R,onChange:p,getComponent:o}):He.default.createElement(v,{className:\"body-param__example\",language:T},stringify(r)||R);return He.default.createElement(\"div\",null,O&&He.default.createElement(y,{source:O}),j?He.default.createElement(b,{userHasEditedBody:e,examples:j,currentKey:f,currentUserInputValue:r,onSelect:e=>{h(e)},updateValue:p,defaultToFirstExample:!0,getComponent:o,setRetainRequestBodyValueFlag:g}):null,He.default.createElement(S,{getComponent:o,getConfigs:s,specSelectors:l,expandDepth:1,isExecute:u,schema:N.get(\"schema\"),specPath:d.push(\"content\",c),example:P,includeWriteOnly:!0}),j?He.default.createElement(w,{example:j.get(f),getComponent:o,getConfigs:s}):null)};class operation_link_OperationLink extends He.Component{render(){const{link:e,name:t,getComponent:r}=this.props,n=r(\"Markdown\",!0);let a=e.get(\"operationId\")||e.get(\"operationRef\"),o=e.get(\"parameters\")&&e.get(\"parameters\").toJS(),s=e.get(\"description\");return He.default.createElement(\"div\",{className:\"operation-link\"},He.default.createElement(\"div\",{className:\"description\"},He.default.createElement(\"b\",null,He.default.createElement(\"code\",null,t)),s?He.default.createElement(n,{source:s}):null),He.default.createElement(\"pre\",null,\"Operation `\",a,\"`\",He.default.createElement(\"br\",null),He.default.createElement(\"br\",null),\"Parameters \",function padString(e,t){if(\"string\"!=typeof t)return\"\";return t.split(\"\\n\").map(((t,r)=>r>0?Array(e+1).join(\" \")+t:t)).join(\"\\n\")}(0,JSON.stringify(o,null,2))||\"{}\",He.default.createElement(\"br\",null)))}}var Ya=operation_link_OperationLink;var components_servers=({servers:e,currentServer:t,setSelectedServer:r,setServerVariableValue:n,getServerVariable:a,getEffectiveServerValue:o})=>{const s=(e.find((e=>e.get(\"url\")===t))||(0,Xe.OrderedMap)()).get(\"variables\")||(0,Xe.OrderedMap)(),l=0!==s.size;(0,He.useEffect)((()=>{t||r(e.first()?.get(\"url\"))}),[]),(0,He.useEffect)((()=>{const a=e.find((e=>e.get(\"url\")===t));if(!a)return void r(e.first().get(\"url\"));(a.get(\"variables\")||(0,Xe.OrderedMap)()).map(((e,r)=>{n({server:t,key:r,val:e.get(\"default\")||\"\"})}))}),[t,e]);const i=(0,He.useCallback)((e=>{r(e.target.value)}),[r]),c=(0,He.useCallback)((e=>{const r=e.target.getAttribute(\"data-variable\"),a=e.target.value;n({server:t,key:r,val:a})}),[n,t]);return He.default.createElement(\"div\",{className:\"servers\"},He.default.createElement(\"label\",{htmlFor:\"servers\"},He.default.createElement(\"select\",{onChange:i,value:t,id:\"servers\"},e.valueSeq().map((e=>He.default.createElement(\"option\",{value:e.get(\"url\"),key:e.get(\"url\")},e.get(\"url\"),e.get(\"description\")&&` - ${e.get(\"description\")}`))).toArray())),l&&He.default.createElement(\"div\",null,He.default.createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",He.default.createElement(\"code\",null,o(t))),He.default.createElement(\"h4\",null,\"Server variables\"),He.default.createElement(\"table\",null,He.default.createElement(\"tbody\",null,s.entrySeq().map((([e,r])=>He.default.createElement(\"tr\",{key:e},He.default.createElement(\"td\",null,e),He.default.createElement(\"td\",null,r.get(\"enum\")?He.default.createElement(\"select\",{\"data-variable\":e,onChange:c},r.get(\"enum\").map((r=>He.default.createElement(\"option\",{selected:r===a(t,e),key:r,value:r},r)))):He.default.createElement(\"input\",{type:\"text\",value:a(t,e)||\"\",onChange:c,\"data-variable\":e})))))))))};class ServersContainer extends He.default.Component{render(){const{specSelectors:e,oas3Selectors:t,oas3Actions:r,getComponent:n}=this.props,a=e.servers(),o=n(\"Servers\");return a&&a.size?He.default.createElement(\"div\",null,He.default.createElement(\"span\",{className:\"servers-title\"},\"Servers\"),He.default.createElement(o,{servers:a,currentServer:t.selectedServer(),setSelectedServer:r.setSelectedServer,setServerVariableValue:r.setServerVariableValue,getServerVariable:t.serverVariableValue,getEffectiveServerValue:t.serverEffectiveValue})):null}}const Qa=Function.prototype;class RequestBodyEditor extends He.PureComponent{static defaultProps={onChange:Qa,userHasEditedBody:!1};constructor(e,t){super(e,t),this.state={value:stringify(e.value)||e.defaultValue},e.onChange(e.value)}applyDefaultValue=e=>{const{onChange:t,defaultValue:r}=e||this.props;return this.setState({value:r}),t(r)};onChange=e=>{this.props.onChange(stringify(e))};onDomChange=e=>{const t=e.target.value;this.setState({value:t},(()=>this.onChange(t)))};UNSAFE_componentWillReceiveProps(e){this.props.value!==e.value&&e.value!==this.state.value&&this.setState({value:stringify(e.value)}),!e.value&&e.defaultValue&&this.state.value&&this.applyDefaultValue(e)}render(){let{getComponent:e,errors:t}=this.props,{value:r}=this.state,n=t.size>0;const a=e(\"TextArea\");return He.default.createElement(\"div\",{className:\"body-param\"},He.default.createElement(a,{className:(0,hr.default)(\"body-param__text\",{invalid:n}),title:t.size?t.join(\", \"):\"\",value:r,onChange:this.onDomChange}))}}class HttpAuth extends He.default.Component{constructor(e,t){super(e,t);let{name:r,schema:n}=this.props,a=this.getValue();this.state={name:r,schema:n,value:a}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,{value:r,name:n}=e.target,a=Object.assign({},this.state.value);n?a[n]=r:a=r,this.setState({value:a},(()=>t(this.state)))};render(){let{schema:e,getComponent:t,errSelectors:r,name:n,authSelectors:a}=this.props;const o=t(\"Input\"),s=t(\"Row\"),l=t(\"Col\"),i=t(\"authError\"),c=t(\"Markdown\",!0),u=t(\"JumpToPath\",!0),d=(e.get(\"scheme\")||\"\").toLowerCase(),p=a.selectAuthPath(n);let m=this.getValue(),f=r.allErrors().filter((e=>e.get(\"authId\")===n));if(\"basic\"===d){let t=m?m.get(\"username\"):null;return He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,He.default.createElement(\"code\",null,n),\"  (http, Basic)\",He.default.createElement(u,{path:p})),t&&He.default.createElement(\"h6\",null,\"Authorized\"),He.default.createElement(s,null,He.default.createElement(c,{source:e.get(\"description\")})),He.default.createElement(s,null,He.default.createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),t?He.default.createElement(\"code\",null,\" \",t,\" \"):He.default.createElement(l,null,He.default.createElement(o,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),He.default.createElement(s,null,He.default.createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),t?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(l,null,He.default.createElement(o,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),f.valueSeq().map(((e,t)=>He.default.createElement(i,{error:e,key:t}))))}return\"bearer\"===d?He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,He.default.createElement(\"code\",null,n),\"  (http, Bearer)\",He.default.createElement(u,{path:p})),m&&He.default.createElement(\"h6\",null,\"Authorized\"),He.default.createElement(s,null,He.default.createElement(c,{source:e.get(\"description\")})),He.default.createElement(s,null,He.default.createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),m?He.default.createElement(\"code\",null,\" ****** \"):He.default.createElement(l,null,He.default.createElement(o,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),f.valueSeq().map(((e,t)=>He.default.createElement(i,{error:e,key:t})))):He.default.createElement(\"div\",null,He.default.createElement(\"em\",null,He.default.createElement(\"b\",null,n),\" HTTP authentication: unsupported scheme \",`'${d}'`))}}class OperationServers extends He.default.Component{setSelectedServer=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setSelectedServer(e,`${t}:${r}`)};setServerVariableValue=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...e,namespace:`${t}:${r}`})};getSelectedServer=()=>{const{path:e,method:t}=this.props;return this.props.getSelectedServer(`${e}:${t}`)};getServerVariable=(e,t)=>{const{path:r,method:n}=this.props;return this.props.getServerVariable({namespace:`${r}:${n}`,server:e},t)};getEffectiveServerValue=e=>{const{path:t,method:r}=this.props;return this.props.getEffectiveServerValue({server:e,namespace:`${t}:${r}`})};render(){const{operationServers:e,pathServers:t,getComponent:r}=this.props;if(!e&&!t)return null;const n=r(\"Servers\"),a=e||t,o=e?\"operation\":\"path\";return He.default.createElement(\"div\",{className:\"opblock-section operation-servers\"},He.default.createElement(\"div\",{className:\"opblock-section-header\"},He.default.createElement(\"div\",{className:\"tab-header\"},He.default.createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),He.default.createElement(\"div\",{className:\"opblock-description-wrapper\"},He.default.createElement(\"h4\",{className:\"message\"},\"These \",o,\"-level options override the global server options.\"),He.default.createElement(n,{servers:a,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}var Za={Callbacks:callbacks,HttpAuth,RequestBody:request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers,operationLink:Ya};const eo=new Ra.Remarkable(\"commonmark\");eo.block.ruler.enable([\"table\"]),eo.set({linkTarget:\"_blank\"});var to=OAS3ComponentWrapFactory((({source:e,className:t=\"\",getConfigs:r=()=>({useUnsafeMarkdown:!1})})=>{if(\"string\"!=typeof e)return null;if(e){const{useUnsafeMarkdown:n}=r(),a=sanitizer(eo.render(e),{useUnsafeMarkdown:n});let o;return\"string\"==typeof a&&(o=a.trim()),He.default.createElement(\"div\",{dangerouslySetInnerHTML:{__html:o},className:(0,hr.default)(t,\"renderedMarkdown\")})}return null})),ro=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:n,errSelectors:a,authorized:o,onAuthChange:s,name:l,authSelectors:i}=t,c=n(\"HttpAuth\");return\"http\"===r.get(\"type\")?He.default.createElement(c,{key:l,schema:r,name:l,errSelectors:a,authorized:o,getComponent:n,onChange:s,authSelectors:i}):He.default.createElement(e,t)})),no=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends He.Component{render(){let{getConfigs:e,schema:t,Ori:r}=this.props,n=[\"model-box\"],a=null;return!0===t.get(\"deprecated\")&&(n.push(\"deprecated\"),a=He.default.createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),He.default.createElement(\"div\",{className:n.join(\" \")},a,He.default.createElement(r,(0,ar.default)({},this.props,{getConfigs:e,depth:1,expandDepth:this.props.expandDepth||0})))}}var ao=OAS3ComponentWrapFactory(ModelComponent),oo=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:n,errors:a,onChange:o,fn:s}=t,l=s.isFileUploadIntended(r),i=n(\"Input\");return l?He.default.createElement(i,{type:\"file\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",onChange:e=>{o(e.target.files[0])},disabled:e.isDisabled}):He.default.createElement(e,t)})),so={Markdown:to,AuthItem:ro,OpenAPIVersion:function OAS30ComponentWrapFactory(e){return(t,r)=>n=>\"function\"==typeof r.specSelectors?.isOAS30?r.specSelectors.isOAS30()?He.default.createElement(e,(0,ar.default)({},n,r,{Ori:t})):He.default.createElement(t,n):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((e=>{const{Ori:t}=e;return He.default.createElement(t,{oasVersion:\"3.0\"})})),JsonSchema_string:oo,model:ao,onlineValidatorBadge:no};const lo=\"oas3_set_servers\",io=\"oas3_set_request_body_value\",co=\"oas3_set_request_body_retain_flag\",uo=\"oas3_set_request_body_inclusion\",po=\"oas3_set_active_examples_member\",mo=\"oas3_set_request_content_type\",fo=\"oas3_set_response_content_type\",ho=\"oas3_set_server_variable_value\",go=\"oas3_set_request_body_validate_error\",yo=\"oas3_clear_request_body_validate_error\",Eo=\"oas3_clear_request_body_value\";function setSelectedServer(e,t){return{type:lo,payload:{selectedServerUrl:e,namespace:t}}}function setRequestBodyValue({value:e,pathMethod:t}){return{type:io,payload:{value:e,pathMethod:t}}}const setRetainRequestBodyValueFlag=({value:e,pathMethod:t})=>({type:co,payload:{value:e,pathMethod:t}});function setRequestBodyInclusion({value:e,pathMethod:t,name:r}){return{type:uo,payload:{value:e,pathMethod:t,name:r}}}function setActiveExamplesMember({name:e,pathMethod:t,contextType:r,contextName:n}){return{type:po,payload:{name:e,pathMethod:t,contextType:r,contextName:n}}}function setRequestContentType({value:e,pathMethod:t}){return{type:mo,payload:{value:e,pathMethod:t}}}function setResponseContentType({value:e,path:t,method:r}){return{type:fo,payload:{value:e,path:t,method:r}}}function setServerVariableValue({server:e,namespace:t,key:r,val:n}){return{type:ho,payload:{server:e,namespace:t,key:r,val:n}}}const setRequestBodyValidateError=({path:e,method:t,validationErrors:r})=>({type:go,payload:{path:e,method:t,validationErrors:r}}),clearRequestBodyValidateError=({path:e,method:t})=>({type:yo,payload:{path:e,method:t}}),initRequestBodyValidateError=({pathMethod:e})=>({type:yo,payload:{path:e[0],method:e[1]}}),clearRequestBodyValue=({pathMethod:e})=>({type:Eo,payload:{pathMethod:e}});var So=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return _e.default}});const oas3_selectors_onlyOAS3=e=>(t,...r)=>n=>{if(n.getSystem().specSelectors.isOAS3()){const a=e(t,...r);return\"function\"==typeof a?a(n):a}return null};const _o=oas3_selectors_onlyOAS3(((e,t)=>{const r=t?[t,\"selectedServer\"]:[\"selectedServer\"];return e.getIn(r)||\"\"})),vo=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyValue\"])||null)),bo=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(e,t,r)=>e=>{const{oas3Selectors:n,specSelectors:a,fn:o}=e.getSystem();if(a.isOAS3()){const e=n.requestContentType(t,r);if(e)return getDefaultRequestBodyValue(a.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]),e,n.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),o)}return null},wo=oas3_selectors_onlyOAS3(((e,t,r)=>e=>{const{oas3Selectors:n,specSelectors:a,fn:o}=e;let s=!1;const l=n.requestContentType(t,r);let i=n.requestBodyValue(t,r);const c=a.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]);if(!c)return!1;if(Xe.Map.isMap(i)&&(i=stringify(i.mapEntries((e=>Xe.Map.isMap(e[1])?[e[0],e[1].get(\"value\")]:e)).toJS())),Xe.List.isList(i)&&(i=stringify(i)),l){const e=getDefaultRequestBodyValue(c,l,n.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),o);s=!!i&&i!==e}return s})),Co=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyInclusion\"])||(0,Xe.Map)())),xo=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"errors\"])||null)),Oo=oas3_selectors_onlyOAS3(((e,t,r,n,a)=>e.getIn([\"examples\",t,r,n,a,\"activeExample\"])||null)),ko=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"requestContentType\"])||null)),No=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"responseContentType\"])||null)),Ao=oas3_selectors_onlyOAS3(((e,t,r)=>{let n;if(\"string\"!=typeof t){const{server:e,namespace:a}=t;n=a?[a,\"serverVariableValues\",e,r]:[\"serverVariableValues\",e,r]}else{n=[\"serverVariableValues\",t,r]}return e.getIn(n)||null})),Io=oas3_selectors_onlyOAS3(((e,t)=>{let r;if(\"string\"!=typeof t){const{server:e,namespace:n}=t;r=n?[n,\"serverVariableValues\",e]:[\"serverVariableValues\",e]}else{r=[\"serverVariableValues\",t]}return e.getIn(r)||(0,Xe.OrderedMap)()})),jo=oas3_selectors_onlyOAS3(((e,t)=>{var r,n;if(\"string\"!=typeof t){const{server:a,namespace:o}=t;n=a,r=o?e.getIn([o,\"serverVariableValues\",n]):e.getIn([\"serverVariableValues\",n])}else n=t,r=e.getIn([\"serverVariableValues\",n]);r=r||(0,Xe.OrderedMap)();let a=n;return r.map(((e,t)=>{a=a.replace(new RegExp(`{${(0,So.default)(t)}}`,\"g\"),e)})),a})),Ro=function validateRequestBodyIsRequired(e){return(...t)=>r=>{const n=r.getSystem().specSelectors.specJson();let a=[...t][1]||[];return!n.getIn([\"paths\",...a,\"requestBody\",\"required\"])||e(...t)}}(((e,t)=>((e,t)=>(t=t||[],!!e.getIn([\"requestData\",...t,\"bodyValue\"])))(e,t))),validateShallowRequired=(e,{oas3RequiredRequestBodyContentType:t,oas3RequestContentType:r,oas3RequestBodyValue:n})=>{let a=[];if(!Xe.Map.isMap(n))return a;let o=[];return Object.keys(t.requestContentType).forEach((e=>{if(e===r){t.requestContentType[e].forEach((e=>{o.indexOf(e)<0&&o.push(e)}))}})),o.forEach((e=>{n.getIn([e,\"value\"])||a.push(e)})),a},To=(0,Lr.default)([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]);var Po={[lo]:(e,{payload:{selectedServerUrl:t,namespace:r}})=>{const n=r?[r,\"selectedServer\"]:[\"selectedServer\"];return e.setIn(n,t)},[io]:(e,{payload:{value:t,pathMethod:r}})=>{let[n,a]=r;if(!Xe.Map.isMap(t))return e.setIn([\"requestData\",n,a,\"bodyValue\"],t);let o,s=e.getIn([\"requestData\",n,a,\"bodyValue\"])||(0,Xe.Map)();Xe.Map.isMap(s)||(s=(0,Xe.Map)());const[...l]=t.keys();return l.forEach((e=>{let r=t.getIn([e]);s.has(e)&&Xe.Map.isMap(r)||(o=s.setIn([e,\"value\"],r))})),e.setIn([\"requestData\",n,a,\"bodyValue\"],o)},[co]:(e,{payload:{value:t,pathMethod:r}})=>{let[n,a]=r;return e.setIn([\"requestData\",n,a,\"retainBodyValue\"],t)},[uo]:(e,{payload:{value:t,pathMethod:r,name:n}})=>{let[a,o]=r;return e.setIn([\"requestData\",a,o,\"bodyInclusion\",n],t)},[po]:(e,{payload:{name:t,pathMethod:r,contextType:n,contextName:a}})=>{let[o,s]=r;return e.setIn([\"examples\",o,s,n,a,\"activeExample\"],t)},[mo]:(e,{payload:{value:t,pathMethod:r}})=>{let[n,a]=r;return e.setIn([\"requestData\",n,a,\"requestContentType\"],t)},[fo]:(e,{payload:{value:t,path:r,method:n}})=>e.setIn([\"requestData\",r,n,\"responseContentType\"],t),[ho]:(e,{payload:{server:t,namespace:r,key:n,val:a}})=>{const o=r?[r,\"serverVariableValues\",t,n]:[\"serverVariableValues\",t,n];return e.setIn(o,a)},[go]:(e,{payload:{path:t,method:r,validationErrors:n}})=>{let a=[];if(a.push(\"Required field is not provided\"),n.missingBodyValue)return e.setIn([\"requestData\",t,r,\"errors\"],(0,Xe.fromJS)(a));if(n.missingRequiredKeys&&n.missingRequiredKeys.length>0){const{missingRequiredKeys:o}=n;return e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,Xe.fromJS)({}),(e=>o.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,Xe.fromJS)(a))),e)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),e},[yo]:(e,{payload:{path:t,method:r}})=>{const n=e.getIn([\"requestData\",t,r,\"bodyValue\"]);if(!Xe.Map.isMap(n))return e.setIn([\"requestData\",t,r,\"errors\"],(0,Xe.fromJS)([]));const[...a]=n.keys();return a?e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,Xe.fromJS)({}),(e=>a.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,Xe.fromJS)([]))),e))):e},[Eo]:(e,{payload:{pathMethod:t}})=>{let[r,n]=t;const a=e.getIn([\"requestData\",r,n,\"bodyValue\"]);return a?Xe.Map.isMap(a)?e.setIn([\"requestData\",r,n,\"bodyValue\"],(0,Xe.Map)()):e.setIn([\"requestData\",r,n,\"bodyValue\"],\"\"):e}};function oas3({getSystem:e}){const t=(e=>(t,r=null)=>{const{getConfigs:n,fn:a}=e(),{fileUploadMediaTypes:o}=n();if(\"string\"==typeof r&&o.some((e=>r.startsWith(e))))return!0;const s=Xe.Map.isMap(t);if(!s&&!(0,Cr.default)(t))return!1;const l=s?t.get(\"format\"):t.format;return a.hasSchemaType(t,\"string\")&&[\"binary\",\"byte\"].includes(l)})(e);return{components:Za,wrapComponents:so,statePlugins:{spec:{wrapSelectors:Je,selectors:ze},auth:{wrapSelectors:Fe},oas3:{actions:{...Ke},reducers:Po,selectors:{...We}}},fn:{isFileUploadIntended:t,isFileUploadIntendedOAS30:t}}}var webhooks=({specSelectors:e,getComponent:t})=>{const r=e.selectWebhooksOperations(),n=Object.keys(r),a=t(\"OperationContainer\",!0);return 0===n.length?null:He.default.createElement(\"div\",{className:\"webhooks\"},He.default.createElement(\"h2\",null,\"Webhooks\"),n.map((e=>He.default.createElement(\"div\",{key:`${e}-webhook`},r[e].map((t=>He.default.createElement(a,{key:`${e}-${t.method}-webhook`,op:t.operation,tag:\"webhooks\",method:t.method,path:e,specPath:(0,Xe.List)(t.specPath),allowTryItOut:!1})))))))};var components_license=({getComponent:e,specSelectors:t})=>{const r=t.selectLicenseNameField(),n=t.selectLicenseUrl(),a=e(\"Link\");return He.default.createElement(\"div\",{className:\"info__license\"},n?He.default.createElement(\"div\",{className:\"info__license__url\"},He.default.createElement(a,{target:\"_blank\",href:sanitizeUrl(n)},r)):He.default.createElement(\"span\",null,r))};var components_contact=({getComponent:e,specSelectors:t})=>{const r=t.selectContactNameField(),n=t.selectContactUrl(),a=t.selectContactEmailField(),o=e(\"Link\");return He.default.createElement(\"div\",{className:\"info__contact\"},n&&He.default.createElement(\"div\",null,He.default.createElement(o,{href:sanitizeUrl(n),target:\"_blank\"},r,\" - Website\")),a&&He.default.createElement(o,{href:sanitizeUrl(`mailto:${a}`)},n?`Send email to ${r}`:`Contact ${r}`))};var oas31_components_info=({getComponent:e,specSelectors:t})=>{const r=t.version(),n=t.url(),a=t.basePath(),o=t.host(),s=t.selectInfoSummaryField(),l=t.selectInfoDescriptionField(),i=t.selectInfoTitleField(),c=t.selectInfoTermsOfServiceUrl(),u=t.selectExternalDocsUrl(),d=t.selectExternalDocsDescriptionField(),p=t.contact(),m=t.license(),f=e(\"Markdown\",!0),h=e(\"Link\"),g=e(\"VersionStamp\"),y=e(\"OpenAPIVersion\"),S=e(\"InfoUrl\"),_=e(\"InfoBasePath\"),v=e(\"License\",!0),b=e(\"Contact\",!0),w=e(\"JsonSchemaDialect\",!0);return He.default.createElement(\"div\",{className:\"info\"},He.default.createElement(\"hgroup\",{className:\"main\"},He.default.createElement(\"h2\",{className:\"title\"},i,He.default.createElement(\"span\",null,r&&He.default.createElement(g,{version:r}),He.default.createElement(y,{oasVersion:\"3.1\"}))),(o||a)&&He.default.createElement(_,{host:o,basePath:a}),n&&He.default.createElement(S,{getComponent:e,url:n})),s&&He.default.createElement(\"p\",{className:\"info__summary\"},s),He.default.createElement(\"div\",{className:\"info__description description\"},He.default.createElement(f,{source:l})),c&&He.default.createElement(\"div\",{className:\"info__tos\"},He.default.createElement(h,{target:\"_blank\",href:sanitizeUrl(c)},\"Terms of service\")),p.size>0&&He.default.createElement(b,null),m.size>0&&He.default.createElement(v,null),u&&He.default.createElement(h,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(u)},d||u),He.default.createElement(w,null))};var json_schema_dialect=({getComponent:e,specSelectors:t})=>{const r=t.selectJsonSchemaDialectField(),n=t.selectJsonSchemaDialectDefault(),a=e(\"Link\");return He.default.createElement(He.default.Fragment,null,r&&r===n&&He.default.createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",He.default.createElement(a,{target:\"_blank\",href:sanitizeUrl(r)},r)),r&&r!==n&&He.default.createElement(\"div\",{className:\"error-wrapper\"},He.default.createElement(\"div\",{className:\"no-margin\"},He.default.createElement(\"div\",{className:\"errors\"},He.default.createElement(\"div\",{className:\"errors-wrapper\"},He.default.createElement(\"h4\",{className:\"center\"},\"Warning\"),He.default.createElement(\"p\",{className:\"message\"},He.default.createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",He.default.createElement(a,{target:\"_blank\",href:n},n),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))};var version_pragma_filter=({bypass:e,isSwagger2:t,isOAS3:r,isOAS31:n,alsoShow:a,children:o})=>e?He.default.createElement(\"div\",null,o):t&&(r||n)?He.default.createElement(\"div\",{className:\"version-pragma\"},a,He.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},He.default.createElement(\"div\",null,He.default.createElement(\"h3\",null,\"Unable to render this definition\"),He.default.createElement(\"p\",null,He.default.createElement(\"code\",null,\"swagger\"),\" and \",He.default.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),He.default.createElement(\"p\",null,\"Supported version fields are \",He.default.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",He.default.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",He.default.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):t||r||n?He.default.createElement(\"div\",null,o):He.default.createElement(\"div\",{className:\"version-pragma\"},a,He.default.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},He.default.createElement(\"div\",null,He.default.createElement(\"h3\",null,\"Unable to render this definition\"),He.default.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),He.default.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",He.default.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",He.default.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",He.default.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\"))));const getModelName=e=>\"string\"==typeof e&&e.includes(\"#/components/schemas/\")?(e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}})(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,Bo=(0,He.forwardRef)((({schema:e,getComponent:t,onToggle:r=()=>{},specPath:n},a)=>{const o=t(\"JSONSchema202012\"),s=getModelName(e.get(\"$$ref\")),l=(0,He.useCallback)(((e,t)=>{r(s,t)}),[s,r]);return He.default.createElement(o,{name:s,schema:e.toJS(),ref:a,onExpand:l,identifier:n.toJS().join(\"_\")})}));var Mo=Bo;var models=({specActions:e,specSelectors:t,layoutSelectors:r,layoutActions:n,getComponent:a,getConfigs:o,fn:s})=>{const l=t.selectSchemas(),i=Object.keys(l).length>0,c=[\"components\",\"schemas\"],{docExpansion:u,defaultModelsExpandDepth:d}=o(),p=d>0&&\"none\"!==u,m=r.isShown(c,p),f=a(\"Collapse\"),h=a(\"JSONSchema202012\"),g=a(\"ArrowUpIcon\"),y=a(\"ArrowDownIcon\"),{getTitle:S}=s.jsonSchema202012.useFn();(0,He.useEffect)((()=>{const r=m&&d>1,n=null!=t.specResolvedSubtree(c);r&&!n&&e.requestResolvedSubtree(c)}),[m,d]);const _=(0,He.useCallback)((()=>{n.show(c,!m)}),[m]),v=(0,He.useCallback)((e=>{null!==e&&n.readyToScroll(c,e)}),[]),handleJSONSchema202012Ref=e=>t=>{null!==t&&n.readyToScroll([...c,e],t)},handleJSONSchema202012Expand=r=>(n,a)=>{if(a){const n=[...c,r];null!=t.specResolvedSubtree(n)||e.requestResolvedSubtree([...c,r])}};return!i||d<0?null:He.default.createElement(\"section\",{className:(0,hr.default)(\"models\",{\"is-open\":m}),ref:v},He.default.createElement(\"h4\",null,He.default.createElement(\"button\",{\"aria-expanded\":m,className:\"models-control\",onClick:_},He.default.createElement(\"span\",null,\"Schemas\"),m?He.default.createElement(g,null):He.default.createElement(y,null))),He.default.createElement(f,{isOpened:m},Object.entries(l).map((([e,t])=>{const r=S(t,{lookup:\"basic\"})||e;return He.default.createElement(h,{key:e,ref:handleJSONSchema202012Ref(e),schema:t,name:r,onExpand:handleJSONSchema202012Expand(e)})}))))};var mutual_tls_auth=({schema:e,getComponent:t,name:r,authSelectors:n})=>{const a=t(\"JumpToPath\",!0),o=n.selectAuthPath(r);return He.default.createElement(\"div\",null,He.default.createElement(\"h4\",null,r,\" (mutualTLS) \",He.default.createElement(a,{path:o})),He.default.createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),He.default.createElement(\"p\",null,e.get(\"description\")))};class auths_Auths extends He.default.Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,n=r.map(((e,t)=>t)).toArray();this.setState(n.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(n)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:n}=this.props;const a=t(\"AuthItem\"),o=t(\"oauth2\",!0),s=t(\"Button\"),l=r.authorized(),i=e.filter(((e,t)=>!!l.get(t))),c=e.filter((e=>\"oauth2\"!==e.get(\"type\")&&\"mutualTLS\"!==e.get(\"type\"))),u=e.filter((e=>\"oauth2\"===e.get(\"type\"))),d=e.filter((e=>\"mutualTLS\"===e.get(\"type\")));return He.default.createElement(\"div\",{className:\"auth-container\"},c.size>0&&He.default.createElement(\"form\",{onSubmit:this.submitAuth},c.map(((e,o)=>He.default.createElement(a,{key:o,schema:e,name:o,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:n,authSelectors:r}))).toArray(),He.default.createElement(\"div\",{className:\"auth-btn-wrapper\"},c.size===i.size?He.default.createElement(s,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):He.default.createElement(s,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),He.default.createElement(s,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),u.size>0?He.default.createElement(\"div\",null,He.default.createElement(\"div\",{className:\"scope-def\"},He.default.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),He.default.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>He.default.createElement(\"div\",{key:t},He.default.createElement(o,{authorized:l,schema:e,name:t})))).toArray()):null,d.size>0&&He.default.createElement(\"div\",null,d.map(((e,o)=>He.default.createElement(a,{key:o,schema:e,name:o,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:n,authSelectors:r}))).toArray()))}}var qo=auths_Auths;const isOAS31=e=>{const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(t)},fn_createOnlyOAS31Selector=e=>(t,...r)=>n=>{if(n.getSystem().specSelectors.isOAS31()){const a=e(t,...r);return\"function\"==typeof a?a(n):a}return null},createOnlyOAS31SelectorWrapper=e=>(t,r)=>(n,...a)=>{if(r.getSystem().specSelectors.isOAS31()){const o=e(n,...a);return\"function\"==typeof o?o(t,r):o}return t(...a)},fn_createSystemSelector=e=>(t,...r)=>n=>{const a=e(t,n,...r);return\"function\"==typeof a?a(n):a},createOnlyOAS31ComponentWrapper=e=>(t,r)=>n=>r.specSelectors.isOAS31()?He.default.createElement(e,(0,ar.default)({},n,{originalComponent:t,getSystem:r.getSystem})):He.default.createElement(t,n),wrapOAS31Fn=(e,t)=>{const{fn:r,specSelectors:n}=t;return Object.fromEntries(Object.entries(e).map((([e,t])=>{const a=r[e];return[e,(...e)=>n.isOAS31()?t(...e):\"function\"==typeof a?a(...e):void 0]})))};var Lo=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31License\",!0);return He.default.createElement(t,null)}));var Uo=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Contact\",!0);return He.default.createElement(t,null)}));var Do=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Info\",!0);return He.default.createElement(t,null)}));const getProperties=(e,{includeReadOnly:t,includeWriteOnly:r})=>{if(!e?.properties)return{};const n=Object.entries(e.properties).filter((([,e])=>(!(!0===e?.readOnly)||t)&&(!(!0===e?.writeOnly)||r)));return Object.fromEntries(n)},makeGetSchemaKeywords=e=>{if(\"function\"!=typeof e)return null;const t=e();return()=>[...t,\"discriminator\",\"xml\",\"externalDocs\",\"example\",\"$$ref\"]},$o=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e(),{getComponent:n,fn:a,getConfigs:o}=r,s=o(),l=n(\"OAS31Model\"),i=n(\"withJSONSchema202012SystemContext\");return $o.ModelWithJSONSchemaContext??=i(l,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:s.defaultModelExpandDepth,includeReadOnly:t.includeReadOnly,includeWriteOnly:t.includeWriteOnly},fn:{getProperties:a.jsonSchema202012.getProperties,isExpandable:a.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(a.jsonSchema202012.getSchemaKeywords)}}),He.default.createElement($o.ModelWithJSONSchemaContext,t)}));var Vo=$o;const Jo=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const{getComponent:t,fn:r,getConfigs:n}=e(),a=n();if(Jo.ModelsWithJSONSchemaContext)return He.default.createElement(Jo.ModelsWithJSONSchemaContext,null);const o=t(\"OAS31Models\",!0),s=t(\"withJSONSchema202012SystemContext\");return Jo.ModelsWithJSONSchemaContext??=s(o,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:a.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},fn:{getProperties:r.jsonSchema202012.getProperties,isExpandable:r.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(r.jsonSchema202012.getSchemaKeywords)}}),He.default.createElement(Jo.ModelsWithJSONSchemaContext,null)}));Jo.ModelsWithJSONSchemaContext=null;var Fo=Jo;var wrap_components_version_pragma_filter=(e,t)=>e=>{const r=t.specSelectors.isOAS31(),n=t.getComponent(\"OAS31VersionPragmaFilter\");return He.default.createElement(n,(0,ar.default)({isOAS31:r},e))};const zo=createOnlyOAS31ComponentWrapper((({originalComponent:e,...t})=>{const{getComponent:r,schema:n,name:a}=t,o=r(\"MutualTLSAuth\",!0);return\"mutualTLS\"===n.get(\"type\")?He.default.createElement(o,{schema:n,name:a}):He.default.createElement(e,t)}));var Ko=zo;var Wo=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e().getComponent(\"OAS31Auths\",!0);return He.default.createElement(r,t)}));const Ho=(0,Xe.Map)(),Go=(0,Pt.createSelector)(((e,t)=>t.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>e=>{const t=e.specSelectors.specJson().get(\"webhooks\");return Xe.Map.isMap(t)?t:Ho},Xo=(0,Pt.createSelector)([(e,t)=>t.specSelectors.webhooks(),(e,t)=>t.specSelectors.validOperationMethods(),(e,t)=>t.specSelectors.specResolvedSubtree([\"webhooks\"])],((e,t)=>e.reduce(((e,r,n)=>{if(!Xe.Map.isMap(r))return e;const a=r.entrySeq().filter((([e])=>t.includes(e))).map((([e,t])=>({operation:(0,Xe.Map)({operation:t}),method:e,path:n,specPath:[\"webhooks\",n,e]})));return e.concat(a)}),(0,Xe.List)()).groupBy((e=>e.path)).map((e=>e.toArray())).toObject())),selectors_license=()=>e=>{const t=e.specSelectors.info().get(\"license\");return Xe.Map.isMap(t)?t:Ho},selectLicenseNameField=()=>e=>e.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>e=>e.specSelectors.license().get(\"url\"),Yo=(0,Pt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectLicenseIdentifierField=()=>e=>e.specSelectors.license().get(\"identifier\"),selectors_contact=()=>e=>{const t=e.specSelectors.info().get(\"contact\");return Xe.Map.isMap(t)?t:Ho},selectContactNameField=()=>e=>e.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>e=>e.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>e=>e.specSelectors.contact().get(\"url\"),Qo=(0,Pt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectContactUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectInfoTitleField=()=>e=>e.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>e=>e.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>e=>e.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>e=>e.specSelectors.info().get(\"termsOfService\"),Zo=(0,Pt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectInfoTermsOfServiceField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectExternalDocsDescriptionField=()=>e=>e.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>e=>e.specSelectors.externalDocs().get(\"url\"),es=(0,Pt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectExternalDocsUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectJsonSchemaDialectField=()=>e=>e.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",ts=(0,Pt.createSelector)(((e,t)=>t.specSelectors.definitions()),((e,t)=>t.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((e,t)=>Xe.Map.isMap(e)?Xe.Map.isMap(t)?Object.entries(e.toJS()).reduce(((e,[r,n])=>{const a=t.get(r);return e[r]=a?.toJS()||n,e}),{}):e.toJS():{})),wrap_selectors_isOAS3=(e,t)=>(r,...n)=>t.specSelectors.isOAS31()||e(...n),rs=createOnlyOAS31SelectorWrapper((()=>(e,t)=>t.oas31Selectors.selectLicenseUrl())),ns=createOnlyOAS31SelectorWrapper((()=>(e,t)=>{const r=t.specSelectors.securityDefinitions();let n=e();return r?(r.entrySeq().forEach((([e,t])=>{const r=t?.get(\"type\");\"mutualTLS\"===r&&(n=n.push(new Xe.Map({[e]:t})))})),n):n})),as=(0,Pt.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField(),(e,t)=>t.specSelectors.selectLicenseIdentifierField()],((e,t,r,n)=>r?safeBuildUrl(r,e,{selectedServer:t}):n?`https://spdx.org/licenses/${n}.html`:void 0));var keywords_Example=({schema:e,getSystem:t})=>{const{fn:r,getComponent:n}=t(),{hasKeyword:a}=r.jsonSchema202012.useFn(),o=n(\"JSONSchema202012JSONViewer\");return a(e,\"example\")?He.default.createElement(o,{name:\"Example\",value:e.example,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"}):null};var keywords_Xml=({schema:e,getSystem:t})=>{const r=e?.xml||{},{fn:n,getComponent:a,getConfigs:o}=t(),{showExtensions:s}=o(),{useComponent:l,useIsExpanded:i,usePath:c,useLevel:u}=n.jsonSchema202012,{path:d}=c(\"xml\"),{isExpanded:p,setExpanded:m,setCollapsed:f}=i(\"xml\"),[h,g]=u(),y=s?getExtensions(r):[],S=!!(r.name||r.namespace||r.prefix||y.length>0),_=l(\"Accordion\"),v=l(\"ExpandDeepButton\"),b=a(\"OpenAPI31Extensions\"),w=a(\"JSONSchema202012PathContext\")(),C=a(\"JSONSchema202012LevelContext\")(),x=(0,He.useCallback)((()=>{p?f():m()}),[p,m,f]),O=(0,He.useCallback)(((e,t)=>{t?m({deep:!0}):f({deep:!0})}),[m,f]);return 0===Object.keys(r).length?null:He.default.createElement(w.Provider,{value:d},He.default.createElement(C.Provider,{value:g},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\",\"data-json-schema-level\":h},S?He.default.createElement(He.default.Fragment,null,He.default.createElement(_,{expanded:p,onChange:x},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),He.default.createElement(v,{expanded:p,onClick:O})):He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===r.attribute&&He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===r.wrapped&&He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!p})},p&&He.default.createElement(He.default.Fragment,null,r.name&&He.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.name))),r.namespace&&He.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.namespace))),r.prefix&&He.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.prefix)))),y.length>0&&He.default.createElement(b,{openAPISpecObj:r,openAPIExtensions:y,getSystem:t})))))};var Discriminator_DiscriminatorMapping=({discriminator:e})=>{const t=e?.mapping||{};return 0===Object.keys(t).length?null:Object.entries(t).map((([e,t])=>He.default.createElement(\"div\",{key:`${e}-${t}`,className:\"json-schema-2020-12-keyword\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},e),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},t))))};var Discriminator_Discriminator=({schema:e,getSystem:t})=>{const r=e?.discriminator||{},{fn:n,getComponent:a,getConfigs:o}=t(),{showExtensions:s}=o(),{useComponent:l,useIsExpanded:i,usePath:c,useLevel:u}=n.jsonSchema202012,d=\"discriminator\",{path:p}=c(d),{isExpanded:m,setExpanded:f,setCollapsed:h}=i(d),[g,y]=u(),S=s?getExtensions(r):[],_=!!(r.mapping||S.length>0),v=l(\"Accordion\"),b=l(\"ExpandDeepButton\"),w=a(\"OpenAPI31Extensions\"),C=a(\"JSONSchema202012PathContext\")(),x=a(\"JSONSchema202012LevelContext\")(),O=(0,He.useCallback)((()=>{m?h():f()}),[m,f,h]),k=(0,He.useCallback)(((e,t)=>{t?f({deep:!0}):h({deep:!0})}),[f,h]);return 0===Object.keys(r).length?null:He.default.createElement(C.Provider,{value:p},He.default.createElement(x.Provider,{value:y},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\",\"data-json-schema-level\":g},_?He.default.createElement(He.default.Fragment,null,He.default.createElement(v,{expanded:m,onChange:O},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),He.default.createElement(b,{expanded:m,onClick:k})):He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),r.propertyName&&He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},r.propertyName),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!m})},m&&He.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},He.default.createElement(Discriminator_DiscriminatorMapping,{discriminator:r})),S.length>0&&He.default.createElement(w,{openAPISpecObj:r,openAPIExtensions:S,getSystem:t})))))};var keywords_OpenAPIExtensions=({openAPISpecObj:e,getSystem:t,openAPIExtensions:r})=>{const{fn:n}=t(),{useComponent:a}=n.jsonSchema202012,o=a(\"JSONViewer\");return r.map((t=>He.default.createElement(o,{key:t,name:t,value:e[t],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))};var keywords_ExternalDocs=({schema:e,getSystem:t})=>{const r=e?.externalDocs||{},{fn:n,getComponent:a,getConfigs:o}=t(),{showExtensions:s}=o(),{useComponent:l,useIsExpanded:i,usePath:c,useLevel:u}=n.jsonSchema202012,d=\"externalDocs\",{path:p}=c(d),{isExpanded:m,setExpanded:f,setCollapsed:h}=i(d),[g,y]=u(),S=s?getExtensions(r):[],_=!!(r.description||r.url||S.length>0),v=l(\"Accordion\"),b=l(\"ExpandDeepButton\"),w=a(\"JSONSchema202012KeywordDescription\"),C=a(\"Link\"),x=a(\"OpenAPI31Extensions\"),O=a(\"JSONSchema202012PathContext\")(),k=a(\"JSONSchema202012LevelContext\")(),N=(0,He.useCallback)((()=>{m?h():f()}),[m,f,h]),A=(0,He.useCallback)(((e,t)=>{t?f({deep:!0}):h({deep:!0})}),[f,h]);return 0===Object.keys(r).length?null:He.default.createElement(O.Provider,{value:p},He.default.createElement(k.Provider,{value:y},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\",\"data-json-schema-level\":g},_?He.default.createElement(He.default.Fragment,null,He.default.createElement(v,{expanded:m,onChange:N},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),He.default.createElement(b,{expanded:m,onClick:A})):He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!m})},m&&He.default.createElement(He.default.Fragment,null,r.description&&He.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},He.default.createElement(w,{schema:r,getSystem:t})),r.url&&He.default.createElement(\"li\",{className:\"json-schema-2020-12-property\"},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},He.default.createElement(C,{target:\"_blank\",href:sanitizeUrl(r.url)},r.url))))),S.length>0&&He.default.createElement(x,{openAPISpecObj:r,openAPIExtensions:S,getSystem:t})))))};var keywords_Description=({schema:e,getSystem:t})=>{if(!e?.description)return null;const{getComponent:r}=t(),n=r(\"Markdown\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},He.default.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},He.default.createElement(n,{source:e.description})))};var os=createOnlyOAS31ComponentWrapper(keywords_Description);const ss=createOnlyOAS31ComponentWrapper((({schema:e,getSystem:t,originalComponent:r})=>{const{getComponent:n}=t(),a=n(\"JSONSchema202012KeywordDiscriminator\"),o=n(\"JSONSchema202012KeywordXml\"),s=n(\"JSONSchema202012KeywordExample\"),l=n(\"JSONSchema202012KeywordExternalDocs\");return He.default.createElement(He.default.Fragment,null,He.default.createElement(r,{schema:e}),He.default.createElement(a,{schema:e,getSystem:t}),He.default.createElement(o,{schema:e,getSystem:t}),He.default.createElement(l,{schema:e,getSystem:t}),He.default.createElement(s,{schema:e,getSystem:t}))}));var ls=ss;var keywords_Properties=({schema:e,getSystem:t})=>{const{fn:r,getComponent:n}=t(),{useComponent:a,usePath:o}=r.jsonSchema202012,{getDependentRequired:s,getProperties:l}=r.jsonSchema202012.useFn(),i=r.jsonSchema202012.useConfig(),c=Array.isArray(e?.required)?e.required:[],{path:u}=o(\"properties\"),d=a(\"JSONSchema\"),p=n(\"JSONSchema202012PathContext\")(),m=l(e,i);return 0===Object.keys(m).length?null:He.default.createElement(p.Provider,{value:u},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},He.default.createElement(\"ul\",null,Object.entries(m).map((([t,r])=>{const n=c.includes(t),a=s(t,e);return He.default.createElement(\"li\",{key:t,className:(0,hr.default)(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":n})},He.default.createElement(d,{name:t,schema:r,dependentRequired:a}))})))))};var is=createOnlyOAS31ComponentWrapper(keywords_Properties);var cs=function oas31_after_load_afterLoad({fn:e,getSystem:t}){if(e.jsonSchema202012){const r=((e,t)=>{const{fn:r}=t();if(\"function\"!=typeof e)return null;const{hasKeyword:n}=r.jsonSchema202012;return t=>e(t)||n(t,\"example\")||t?.xml||t?.discriminator||t?.externalDocs})(e.jsonSchema202012.isExpandable,t);Object.assign(this.fn.jsonSchema202012,{isExpandable:r,getProperties})}if(\"function\"==typeof e.sampleFromSchema&&e.jsonSchema202012){const r=wrapOAS31Fn({sampleFromSchema:e.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:e.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:e.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:e.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:e.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:e.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:e.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:e.jsonSchema202012.getXmlSampleSchema,getSampleSchema:e.jsonSchema202012.getSampleSchema,mergeJsonSchema:e.jsonSchema202012.mergeJsonSchema,getSchemaObjectTypeLabel:t=>e.jsonSchema202012.getType(immutableToJS(t)),getSchemaObjectType:t=>e.jsonSchema202012.foldType(immutableToJS(t)?.type)},t());Object.assign(this.fn,r)}const r=(e=>(t,r=null)=>{const{fn:n}=e();if(n.isFileUploadIntendedOAS30(t,r))return!0;const a=Xe.Map.isMap(t);if(!a&&!(0,Cr.default)(t))return!1;const o=a?t.get(\"contentMediaType\"):t.contentMediaType,s=a?t.get(\"contentEncoding\"):t.contentEncoding;return\"string\"==typeof o&&\"\"!==o||\"string\"==typeof s&&\"\"!==s})(t),{isFileUploadIntended:n}=wrapOAS31Fn({isFileUploadIntended:r},t());if(this.fn.isFileUploadIntended=n,this.fn.isFileUploadIntendedOAS31=r,e.jsonSchema202012){const{hasSchemaType:r}=wrapOAS31Fn({hasSchemaType:e.jsonSchema202012.hasSchemaType},t());this.fn.hasSchemaType=r}};var oas31=({fn:e})=>{const t=e.createSystemSelector||fn_createSystemSelector,r=e.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:cs,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:components_license,OAS31Contact:components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:Mo,OAS31Models:models,OAS31Auths:qo,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs,OpenAPI31Extensions:keywords_OpenAPIExtensions},wrapComponents:{InfoContainer:Do,License:Lo,Contact:Uo,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:Vo,Models:Fo,AuthItem:Ko,auths:Wo,JSONSchema202012KeywordDescription:os,JSONSchema202012KeywordExamples:ls,JSONSchema202012KeywordProperties:is},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:ns}},spec:{selectors:{isOAS31:t(Go),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:r(selectLicenseIdentifierField),selectLicenseUrl:t(Yo),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:t(Qo),selectInfoTitleField,selectInfoSummaryField:r(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:t(Zo),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:t(es),webhooks:r(selectors_webhooks),selectWebhooksOperations:r(t(Xo)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:t(ts)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:rs}},oas31:{selectors:{selectLicenseUrl:r(t(as))}}}}};const us=Ut.default.object,ds=Ut.default.bool,ps=(Ut.default.oneOfType([us,ds]),(0,He.createContext)(null));ps.displayName=\"JSONSchemaContext\";const ms=(0,He.createContext)(0);ms.displayName=\"JSONSchemaLevelContext\";const fs=(0,He.createContext)(new Set),hs=(0,He.createContext)([]);class JSONSchemaIsExpandedState{static Collapsed=\"collapsed\";static Expanded=\"expanded\";static DeeplyExpanded=\"deeply-expanded\"}const useConfig=()=>{const{config:e}=(0,He.useContext)(ps);return e},useComponent=e=>{const{components:t}=(0,He.useContext)(ps);return t[e]||null},useFn=(e=void 0)=>{const{fn:t}=(0,He.useContext)(ps);return void 0!==e?t[e]:t},useJSONSchemaContextState=()=>{const[,e]=(0,He.useState)(null),{state:t}=(0,He.useContext)(ps);return{state:t,setState:r=>{r(t),e({})}}},useLevel=()=>{const e=(0,He.useContext)(ms);return[e,e+1]},usePath=e=>{const t=(0,He.useContext)(hs),{setState:r}=useJSONSchemaContextState(),n=\"string\"==typeof e?[...t,e]:t;return{path:n,pathMutator:(e,t={deep:!1})=>{const a=n.toString(),updateFn=t=>{t.paths[a]=e,e===JSONSchemaIsExpandedState.Collapsed&&Object.keys(t.paths).forEach((e=>{e.startsWith(a)&&t.paths[e]===JSONSchemaIsExpandedState.DeeplyExpanded&&(t.paths[e]=JSONSchemaIsExpandedState.Expanded)}))},updateDeepFn=t=>{Object.keys(t.paths).forEach((r=>{r.startsWith(a)&&(t.paths[r]=e)}))};t.deep?r(updateDeepFn):r(updateFn)}}},useIsExpanded=e=>{const[t]=useLevel(),{defaultExpandedLevels:r}=useConfig(),{path:n,pathMutator:a}=usePath(e),{path:o}=usePath(),{state:s}=useJSONSchemaContextState(),l=s.paths[n.toString()],i=s.paths[o.toString()]??s.paths[o.slice(0,-1).toString()],c=l??(r-t>0?JSONSchemaIsExpandedState.Expanded:JSONSchemaIsExpandedState.Collapsed),u=c!==JSONSchemaIsExpandedState.Collapsed;(0,He.useEffect)((()=>{a(i===JSONSchemaIsExpandedState.DeeplyExpanded?JSONSchemaIsExpandedState.DeeplyExpanded:c)}),[i]);return{isExpanded:u,setExpanded:(0,He.useCallback)(((e={deep:!1})=>{a(e.deep?JSONSchemaIsExpandedState.DeeplyExpanded:JSONSchemaIsExpandedState.Expanded)}),[]),setCollapsed:(0,He.useCallback)(((e={deep:!1})=>{a(JSONSchemaIsExpandedState.Collapsed,e)}),[])}},useRenderedSchemas=(e=void 0)=>{if(void 0===e)return(0,He.useContext)(fs);const t=(0,He.useContext)(fs);return new Set([...t,e])},gs=(0,He.forwardRef)((({schema:e,name:t=\"\",dependentRequired:r=[],onExpand:n=()=>{},identifier:a=\"\"},o)=>{const s=useFn(),l=a||e?.$id||t,{path:i}=usePath(l),{isExpanded:c,setExpanded:u,setCollapsed:d}=useIsExpanded(l),[p,m]=useLevel(),f=(()=>{const[e]=useLevel();return e>0})(),h=s.isExpandable(e)||r.length>0,g=(e=>useRenderedSchemas().has(e))(e),y=useRenderedSchemas(e),S=s.stringifyConstraints(e),_=useComponent(\"Accordion\"),v=useComponent(\"Keyword$schema\"),b=useComponent(\"Keyword$vocabulary\"),w=useComponent(\"Keyword$id\"),C=useComponent(\"Keyword$anchor\"),x=useComponent(\"Keyword$dynamicAnchor\"),O=useComponent(\"Keyword$ref\"),k=useComponent(\"Keyword$dynamicRef\"),N=useComponent(\"Keyword$defs\"),A=useComponent(\"Keyword$comment\"),I=useComponent(\"KeywordAllOf\"),j=useComponent(\"KeywordAnyOf\"),R=useComponent(\"KeywordOneOf\"),T=useComponent(\"KeywordNot\"),P=useComponent(\"KeywordIf\"),B=useComponent(\"KeywordThen\"),M=useComponent(\"KeywordElse\"),q=useComponent(\"KeywordDependentSchemas\"),L=useComponent(\"KeywordPrefixItems\"),U=useComponent(\"KeywordItems\"),D=useComponent(\"KeywordContains\"),$=useComponent(\"KeywordProperties\"),V=useComponent(\"KeywordPatternProperties\"),J=useComponent(\"KeywordAdditionalProperties\"),F=useComponent(\"KeywordPropertyNames\"),z=useComponent(\"KeywordUnevaluatedItems\"),K=useComponent(\"KeywordUnevaluatedProperties\"),W=useComponent(\"KeywordType\"),H=useComponent(\"KeywordEnum\"),G=useComponent(\"KeywordConst\"),X=useComponent(\"KeywordConstraint\"),Y=useComponent(\"KeywordDependentRequired\"),Q=useComponent(\"KeywordContentSchema\"),Z=useComponent(\"KeywordTitle\"),ee=useComponent(\"KeywordDescription\"),te=useComponent(\"KeywordDefault\"),re=useComponent(\"KeywordDeprecated\"),ne=useComponent(\"KeywordReadOnly\"),ae=useComponent(\"KeywordWriteOnly\"),oe=useComponent(\"KeywordExamples\"),se=useComponent(\"ExtensionKeywords\"),le=useComponent(\"ExpandDeepButton\"),ie=(0,He.useCallback)(((e,t)=>{t?u():d(),n(e,t,!1)}),[n,u,d]),ce=(0,He.useCallback)(((e,t)=>{t?u({deep:!0}):d({deep:!0}),n(e,t,!0)}),[n,u,d]);return He.default.createElement(hs.Provider,{value:i},He.default.createElement(ms.Provider,{value:m},He.default.createElement(fs.Provider,{value:y},He.default.createElement(\"article\",{ref:o,\"data-json-schema-level\":p,className:(0,hr.default)(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":f,\"json-schema-2020-12--circular\":g})},He.default.createElement(\"div\",{className:\"json-schema-2020-12-head\"},h&&!g?He.default.createElement(He.default.Fragment,null,He.default.createElement(_,{expanded:c,onChange:ie},He.default.createElement(Z,{title:t,schema:e})),He.default.createElement(le,{expanded:c,onClick:ce})):He.default.createElement(Z,{title:t,schema:e}),He.default.createElement(re,{schema:e}),He.default.createElement(ne,{schema:e}),He.default.createElement(ae,{schema:e}),He.default.createElement(W,{schema:e,isCircular:g}),S.length>0&&S.map((e=>He.default.createElement(X,{key:`${e.scope}-${e.value}`,constraint:e})))),He.default.createElement(\"div\",{className:(0,hr.default)(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!c})},c&&He.default.createElement(He.default.Fragment,null,He.default.createElement(ee,{schema:e}),!g&&h&&He.default.createElement(He.default.Fragment,null,He.default.createElement($,{schema:e}),He.default.createElement(V,{schema:e}),He.default.createElement(J,{schema:e}),He.default.createElement(K,{schema:e}),He.default.createElement(F,{schema:e}),He.default.createElement(I,{schema:e}),He.default.createElement(j,{schema:e}),He.default.createElement(R,{schema:e}),He.default.createElement(T,{schema:e}),He.default.createElement(P,{schema:e}),He.default.createElement(B,{schema:e}),He.default.createElement(M,{schema:e}),He.default.createElement(q,{schema:e}),He.default.createElement(L,{schema:e}),He.default.createElement(U,{schema:e}),He.default.createElement(z,{schema:e}),He.default.createElement(D,{schema:e}),He.default.createElement(Q,{schema:e})),He.default.createElement(H,{schema:e}),He.default.createElement(G,{schema:e}),He.default.createElement(Y,{schema:e,dependentRequired:r}),He.default.createElement(te,{schema:e}),He.default.createElement(oe,{schema:e}),He.default.createElement(v,{schema:e}),He.default.createElement(b,{schema:e}),He.default.createElement(w,{schema:e}),He.default.createElement(C,{schema:e}),He.default.createElement(x,{schema:e}),He.default.createElement(O,{schema:e}),!g&&h&&He.default.createElement(N,{schema:e}),He.default.createElement(k,{schema:e}),He.default.createElement(A,{schema:e}),He.default.createElement(se,{schema:e})))))))}));var ys=gs;var keywords_$schema=({schema:e})=>e?.$schema?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$schema)):null;var $vocabulary_$vocabulary=({schema:e})=>{const t=\"$vocabulary\",{path:r}=usePath(t),{isExpanded:n,setExpanded:a,setCollapsed:o}=useIsExpanded(t),s=useComponent(\"Accordion\"),l=(0,He.useCallback)((()=>{n?o():a()}),[n,a,o]);return e?.$vocabulary?\"object\"!=typeof e.$vocabulary?null:He.default.createElement(hs.Provider,{value:r},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},He.default.createElement(s,{expanded:n,onChange:l},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),He.default.createElement(\"ul\",null,n&&Object.entries(e.$vocabulary).map((([e,t])=>He.default.createElement(\"li\",{key:e,className:(0,hr.default)(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!t})},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e))))))):null};var keywords_$id=({schema:e})=>e?.$id?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$id)):null;var keywords_$anchor=({schema:e})=>e?.$anchor?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$anchor)):null;var keywords_$dynamicAnchor=({schema:e})=>e?.$dynamicAnchor?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicAnchor)):null;var keywords_$ref=({schema:e})=>e?.$ref?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$ref)):null;var keywords_$dynamicRef=({schema:e})=>e?.$dynamicRef?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicRef)):null;var keywords_$defs=({schema:e})=>{const t=e?.$defs||{},r=\"$defs\",{path:n}=usePath(r),{isExpanded:a,setExpanded:o,setCollapsed:s}=useIsExpanded(r),[l,i]=useLevel(),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONSchema\"),p=(0,He.useCallback)((()=>{a?s():o()}),[a,o,s]),m=(0,He.useCallback)(((e,t)=>{t?o({deep:!0}):s({deep:!0})}),[o,s]);return 0===Object.keys(t).length?null:He.default.createElement(hs.Provider,{value:n},He.default.createElement(ms.Provider,{value:i},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\",\"data-json-schema-level\":l},He.default.createElement(c,{expanded:a,onChange:p},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),He.default.createElement(u,{expanded:a,onClick:m}),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!a})},a&&He.default.createElement(He.default.Fragment,null,Object.entries(t).map((([e,t])=>He.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},He.default.createElement(d,{name:e,schema:t})))))))))};var keywords_$comment=({schema:e})=>e?.$comment?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$comment)):null;var keywords_AllOf=({schema:e})=>{const t=e?.allOf||[],r=useFn(),n=\"allOf\",{path:a}=usePath(n),{isExpanded:o,setExpanded:s,setCollapsed:l}=useIsExpanded(n),[i,c]=useLevel(),u=useComponent(\"Accordion\"),d=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),m=useComponent(\"KeywordType\"),f=(0,He.useCallback)((()=>{o?l():s()}),[o,s,l]),h=(0,He.useCallback)(((e,t)=>{t?s({deep:!0}):l({deep:!0})}),[s,l]);return Array.isArray(t)&&0!==t.length?He.default.createElement(hs.Provider,{value:a},He.default.createElement(ms.Provider,{value:c},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\",\"data-json-schema-level\":i},He.default.createElement(u,{expanded:o,onChange:f},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),He.default.createElement(d,{expanded:o,onClick:h}),He.default.createElement(m,{schema:{allOf:t}}),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&He.default.createElement(He.default.Fragment,null,t.map(((e,t)=>He.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},He.default.createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null};var keywords_AnyOf=({schema:e})=>{const t=e?.anyOf||[],r=useFn(),n=\"anyOf\",{path:a}=usePath(n),{isExpanded:o,setExpanded:s,setCollapsed:l}=useIsExpanded(n),[i,c]=useLevel(),u=useComponent(\"Accordion\"),d=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),m=useComponent(\"KeywordType\"),f=(0,He.useCallback)((()=>{o?l():s()}),[o,s,l]),h=(0,He.useCallback)(((e,t)=>{t?s({deep:!0}):l({deep:!0})}),[s,l]);return Array.isArray(t)&&0!==t.length?He.default.createElement(hs.Provider,{value:a},He.default.createElement(ms.Provider,{value:c},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\",\"data-json-schema-level\":i},He.default.createElement(u,{expanded:o,onChange:f},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),He.default.createElement(d,{expanded:o,onClick:h}),He.default.createElement(m,{schema:{anyOf:t}}),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&He.default.createElement(He.default.Fragment,null,t.map(((e,t)=>He.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},He.default.createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null};var keywords_OneOf=({schema:e})=>{const t=e?.oneOf||[],r=useFn(),n=\"oneOf\",{path:a}=usePath(n),{isExpanded:o,setExpanded:s,setCollapsed:l}=useIsExpanded(n),[i,c]=useLevel(),u=useComponent(\"Accordion\"),d=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),m=useComponent(\"KeywordType\"),f=(0,He.useCallback)((()=>{o?l():s()}),[o,s,l]),h=(0,He.useCallback)(((e,t)=>{t?s({deep:!0}):l({deep:!0})}),[s,l]);return Array.isArray(t)&&0!==t.length?He.default.createElement(hs.Provider,{value:a},He.default.createElement(ms.Provider,{value:c},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\",\"data-json-schema-level\":i},He.default.createElement(u,{expanded:o,onChange:f},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),He.default.createElement(d,{expanded:o,onClick:h}),He.default.createElement(m,{schema:{oneOf:t}}),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&He.default.createElement(He.default.Fragment,null,t.map(((e,t)=>He.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},He.default.createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null};var keywords_Not=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"not\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},He.default.createElement(r,{name:n,schema:e.not,identifier:\"not\"}))};var keywords_If=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"if\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},He.default.createElement(r,{name:n,schema:e.if,identifier:\"if\"}))};var keywords_Then=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"then\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},He.default.createElement(r,{name:n,schema:e.then,identifier:\"then\"}))};var keywords_Else=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"else\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},He.default.createElement(r,{name:n,schema:e.else,identifier:\"else\"}))};var keywords_DependentSchemas=({schema:e})=>{const t=e?.dependentSchemas||[],r=\"dependentSchemas\",{path:n}=usePath(r),{isExpanded:a,setExpanded:o,setCollapsed:s}=useIsExpanded(r),[l,i]=useLevel(),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONSchema\"),p=(0,He.useCallback)((()=>{a?s():o()}),[a,o,s]),m=(0,He.useCallback)(((e,t)=>{t?o({deep:!0}):s({deep:!0})}),[o,s]);return\"object\"!=typeof t||0===Object.keys(t).length?null:He.default.createElement(hs.Provider,{value:n},He.default.createElement(ms.Provider,{value:i},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\",\"data-json-schema-level\":l},He.default.createElement(c,{expanded:a,onChange:p},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),He.default.createElement(u,{expanded:a,onClick:m}),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!a})},a&&He.default.createElement(He.default.Fragment,null,Object.entries(t).map((([e,t])=>He.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},He.default.createElement(d,{name:e,schema:t})))))))))};var keywords_PrefixItems=({schema:e})=>{const t=e?.prefixItems||[],r=useFn(),n=\"prefixItems\",{path:a}=usePath(n),{isExpanded:o,setExpanded:s,setCollapsed:l}=useIsExpanded(n),[i,c]=useLevel(),u=useComponent(\"Accordion\"),d=useComponent(\"ExpandDeepButton\"),p=useComponent(\"JSONSchema\"),m=useComponent(\"KeywordType\"),f=(0,He.useCallback)((()=>{o?l():s()}),[o,s,l]),h=(0,He.useCallback)(((e,t)=>{t?s({deep:!0}):l({deep:!0})}),[s,l]);return Array.isArray(t)&&0!==t.length?He.default.createElement(hs.Provider,{value:a},He.default.createElement(ms.Provider,{value:c},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\",\"data-json-schema-level\":i},He.default.createElement(u,{expanded:o,onChange:f},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),He.default.createElement(d,{expanded:o,onClick:h}),He.default.createElement(m,{schema:{prefixItems:t}}),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!o})},o&&He.default.createElement(He.default.Fragment,null,t.map(((e,t)=>He.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},He.default.createElement(p,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null};var keywords_Items=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"items\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},He.default.createElement(r,{name:n,schema:e.items,identifier:\"items\"}))};var keywords_Contains=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contains\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},He.default.createElement(r,{name:n,schema:e.contains,identifier:\"contains\"}))};var keywords_Properties_Properties=({schema:e})=>{const t=useFn(),r=e?.properties||{},n=Array.isArray(e?.required)?e.required:[],a=useComponent(\"JSONSchema\"),{path:o}=usePath(\"properties\");return 0===Object.keys(r).length?null:He.default.createElement(hs.Provider,{value:o},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},He.default.createElement(\"ul\",null,Object.entries(r).map((([r,o])=>{const s=n.includes(r),l=t.getDependentRequired(r,e);return He.default.createElement(\"li\",{key:r,className:(0,hr.default)(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":s})},He.default.createElement(a,{name:r,schema:o,dependentRequired:l}))})))))};var PatternProperties_PatternProperties=({schema:e})=>{const t=e?.patternProperties||{},r=useComponent(\"JSONSchema\"),{path:n}=usePath(\"patternProperties\");return 0===Object.keys(t).length?null:He.default.createElement(hs.Provider,{value:n},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},He.default.createElement(\"ul\",null,Object.entries(t).map((([e,t])=>He.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},He.default.createElement(r,{name:e,schema:t})))))))};var keywords_AdditionalProperties=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"additionalProperties\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===e.additionalProperties?He.default.createElement(He.default.Fragment,null,n,He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===e.additionalProperties?He.default.createElement(He.default.Fragment,null,n,He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):He.default.createElement(r,{name:n,schema:e.additionalProperties,identifier:\"additionalProperties\"}))};var keywords_PropertyNames=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\"),n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return t.hasKeyword(e,\"propertyNames\")?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},He.default.createElement(r,{name:n,schema:e.propertyNames,identifier:\"propertyNames\"})):null};var keywords_UnevaluatedItems=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedItems\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},He.default.createElement(r,{name:n,schema:e.unevaluatedItems,identifier:\"unevaluatedItems\"}))};var keywords_UnevaluatedProperties=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedProperties\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},He.default.createElement(r,{name:n,schema:e.unevaluatedProperties,identifier:\"unevaluatedProperties\"}))};var keywords_Type=({schema:e,isCircular:t=!1})=>{const r=useFn().getType(e),n=t?\" [circular]\":\"\";return He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${r}${n}`)};var Enum_Enum=({schema:e})=>{const t=useComponent(\"JSONViewer\");return Array.isArray(e?.enum)?He.default.createElement(t,{name:\"Enum\",value:e.enum,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"}):null};var Const_Const=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONViewer\");return t.hasKeyword(e,\"const\")?He.default.createElement(r,{name:\"Const\",value:e.const,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"}):null};const fn_upperFirst=e=>\"string\"==typeof e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:e,makeGetTitle=e=>(t,{lookup:r=\"extended\"}={})=>{const n=e();if(null!=t?.title)return n.upperFirst(String(t.title));if(\"extended\"===r){if(null!=t?.$anchor)return n.upperFirst(String(t.$anchor));if(null!=t?.$id)return String(t.$id)}return\"\"},makeGetType=e=>{const getType=(t,r=new WeakSet)=>{const n=e();if(null==t)return\"any\";if(n.isBooleanJSONSchema(t))return t?\"any\":\"never\";if(\"object\"!=typeof t)return\"any\";if(r.has(t))return\"any\";r.add(t);const{type:a,prefixItems:o,items:s}=t,getArrayType=()=>{if(Array.isArray(o)){const e=o.map((e=>getType(e,r))),t=s?getType(s,r):\"any\";return`array<[${e.join(\", \")}], ${t}>`}if(s){return`array<${getType(s,r)}>`}return\"array<any>\"};if(t.not&&\"any\"===getType(t.not))return\"never\";const handleCombiningKeywords=(e,n)=>{if(Array.isArray(t[e])){return`(${t[e].map((e=>getType(e,r))).join(n)})`}return null},l=[Array.isArray(a)?a.map((e=>\"array\"===e?getArrayType():e)).join(\" | \"):\"array\"===a?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(a)?a:(()=>{if(Object.hasOwn(t,\"prefixItems\")||Object.hasOwn(t,\"items\")||Object.hasOwn(t,\"contains\"))return getArrayType();if(Object.hasOwn(t,\"properties\")||Object.hasOwn(t,\"additionalProperties\")||Object.hasOwn(t,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(t.format))return\"integer\";if([\"float\",\"double\"].includes(t.format))return\"number\";if(Object.hasOwn(t,\"minimum\")||Object.hasOwn(t,\"maximum\")||Object.hasOwn(t,\"exclusiveMinimum\")||Object.hasOwn(t,\"exclusiveMaximum\")||Object.hasOwn(t,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(t,\"pattern\")||Object.hasOwn(t,\"format\")||Object.hasOwn(t,\"minLength\")||Object.hasOwn(t,\"maxLength\")||Object.hasOwn(t,\"contentEncoding\")||Object.hasOwn(t,\"contentMediaType\"))return\"string\";if(void 0!==t.const){if(null===t.const)return\"null\";if(\"boolean\"==typeof t.const)return\"boolean\";if(\"number\"==typeof t.const)return Number.isInteger(t.const)?\"integer\":\"number\";if(\"string\"==typeof t.const)return\"string\";if(Array.isArray(t.const))return\"array<any>\";if(\"object\"==typeof t.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return r.delete(t),l||\"any\"};return getType},isBooleanJSONSchema=e=>\"boolean\"==typeof e,hasKeyword=(e,t)=>null!==e&&\"object\"==typeof e&&Object.hasOwn(e,t),fn_makeIsExpandable=e=>t=>{const r=e();return t?.$schema||t?.$vocabulary||t?.$id||t?.$anchor||t?.$dynamicAnchor||t?.$ref||t?.$dynamicRef||t?.$defs||t?.$comment||t?.allOf||t?.anyOf||t?.oneOf||r.hasKeyword(t,\"not\")||r.hasKeyword(t,\"if\")||r.hasKeyword(t,\"then\")||r.hasKeyword(t,\"else\")||t?.dependentSchemas||t?.prefixItems||r.hasKeyword(t,\"items\")||r.hasKeyword(t,\"contains\")||t?.properties||t?.patternProperties||r.hasKeyword(t,\"additionalProperties\")||r.hasKeyword(t,\"propertyNames\")||r.hasKeyword(t,\"unevaluatedItems\")||r.hasKeyword(t,\"unevaluatedProperties\")||t?.description||t?.enum||r.hasKeyword(t,\"const\")||r.hasKeyword(t,\"contentSchema\")||r.hasKeyword(t,\"default\")||t?.examples||r.getExtensionKeywords(t).length>0},fn_stringify=e=>null===e||[\"number\",\"bigint\",\"boolean\"].includes(typeof e)?String(e):Array.isArray(e)?`[${e.map(fn_stringify).join(\", \")}]`:JSON.stringify(e),stringifyConstraintRange=(e,t,r)=>{const n=\"number\"==typeof t,a=\"number\"==typeof r;return n&&a?t===r?`${t} ${e}`:`[${t}, ${r}] ${e}`:n?`≥ ${t} ${e}`:a?`≤ ${r} ${e}`:null},stringifyConstraints=e=>{const t=[],r=(e=>{if(\"number\"!=typeof e?.multipleOf)return null;if(e.multipleOf<=0)return null;if(1===e.multipleOf)return null;const{multipleOf:t}=e;if(Number.isInteger(t))return`multiple of ${t}`;const r=10**t.toString().split(\".\")[1].length;return`multiple of ${t*r}/${r}`})(e);null!==r&&t.push({scope:\"number\",value:r});const n=(e=>{const t=e?.minimum,r=e?.maximum,n=e?.exclusiveMinimum,a=e?.exclusiveMaximum,o=\"number\"==typeof t,s=\"number\"==typeof r,l=\"number\"==typeof n,i=\"number\"==typeof a,c=l&&(!o||t<n),u=i&&(!s||r>a);if((o||l)&&(s||i))return`${c?\"(\":\"[\"}${c?n:t}, ${u?a:r}${u?\")\":\"]\"}`;if(o||l)return`${c?\">\":\"≥\"} ${c?n:t}`;if(s||i)return`${u?\"<\":\"≤\"} ${u?a:r}`;return null})(e);null!==n&&t.push({scope:\"number\",value:n}),e?.format&&t.push({scope:\"string\",value:e.format});const a=stringifyConstraintRange(\"characters\",e?.minLength,e?.maxLength);null!==a&&t.push({scope:\"string\",value:a}),e?.pattern&&t.push({scope:\"string\",value:`matches ${e?.pattern}`}),e?.contentMediaType&&t.push({scope:\"string\",value:`media type: ${e.contentMediaType}`}),e?.contentEncoding&&t.push({scope:\"string\",value:`encoding: ${e.contentEncoding}`});const o=stringifyConstraintRange(e?.uniqueItems?\"unique items\":\"items\",e?.minItems,e?.maxItems);null!==o&&t.push({scope:\"array\",value:o}),e?.uniqueItems&&!o&&t.push({scope:\"array\",value:\"unique\"});const s=stringifyConstraintRange(\"contained items\",e?.minContains,e?.maxContains);null!==s&&t.push({scope:\"array\",value:s});const l=stringifyConstraintRange(\"properties\",e?.minProperties,e?.maxProperties);return null!==l&&t.push({scope:\"object\",value:l}),t},getDependentRequired=(e,t)=>t?.dependentRequired?Array.from(Object.entries(t.dependentRequired).reduce(((t,[r,n])=>Array.isArray(n)&&n.includes(e)?(t.add(r),t):t),new Set)):[],isPlainObject=e=>\"object\"==typeof e&&null!==e&&!Array.isArray(e)&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype),getSchemaKeywords=()=>[\"$schema\",\"$vocabulary\",\"$id\",\"$anchor\",\"$dynamicAnchor\",\"$dynamicRef\",\"$ref\",\"$defs\",\"$comment\",\"allOf\",\"anyOf\",\"oneOf\",\"not\",\"if\",\"then\",\"else\",\"dependentSchemas\",\"prefixItems\",\"items\",\"contains\",\"properties\",\"patternProperties\",\"additionalProperties\",\"propertyNames\",\"unevaluatedItems\",\"unevaluatedProperties\",\"type\",\"enum\",\"const\",\"multipleOf\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"maxContains\",\"minContains\",\"maxProperties\",\"minProperties\",\"required\",\"dependentRequired\",\"title\",\"description\",\"default\",\"deprecated\",\"readOnly\",\"writeOnly\",\"examples\",\"format\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],makeGetExtensionKeywords=e=>t=>{const r=e().getSchemaKeywords();return isPlainObject(t)?((e,t)=>{const r=new Set(t);return e.filter((e=>!r.has(e)))})(Object.keys(t),r):[]},fn_hasSchemaType=(e,t)=>{const r=Xe.Map.isMap(e);if(!r&&!isPlainObject(e))return!1;const hasType=e=>t===e||Array.isArray(t)&&t.includes(e),n=r?e.get(\"type\"):e.type;return Xe.List.isList(n)||Array.isArray(n)?n.some((e=>hasType(e))):hasType(n)},Constraint=({constraint:e})=>isPlainObject(e)&&\"string\"==typeof e.scope&&\"string\"==typeof e.value?He.default.createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${e.scope}`},e.value):null;var Es=He.default.memo(Constraint);var DependentRequired_DependentRequired=({dependentRequired:e})=>Array.isArray(e)&&0!==e.length?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),He.default.createElement(\"ul\",null,e.map((e=>He.default.createElement(\"li\",{key:e},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},e)))))):null;var keywords_ContentSchema=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contentSchema\"))return null;const n=He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},He.default.createElement(r,{name:n,schema:e.contentSchema,identifier:\"contentSchema\"}))};var Title_Title=({title:e=\"\",schema:t})=>{const r=useFn(),n=e||r.getTitle(t);return n?He.default.createElement(\"div\",{className:\"json-schema-2020-12__title\"},n):null};var keywords_Description_Description=({schema:e})=>e?.description?He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},He.default.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},e.description)):null;var Default_Default=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONViewer\");return t.hasKeyword(e,\"default\")?He.default.createElement(r,{name:\"Default\",value:e.default,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"}):null};var keywords_Deprecated=({schema:e})=>!0!==e?.deprecated?null:He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\");var keywords_ReadOnly=({schema:e})=>!0!==e?.readOnly?null:He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\");var keywords_WriteOnly=({schema:e})=>!0!==e?.writeOnly?null:He.default.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\");var keywords_Examples_Examples=({schema:e})=>{const t=e?.examples||[],r=useComponent(\"JSONViewer\");return Array.isArray(t)&&0!==t.length?He.default.createElement(r,{name:\"Examples\",value:e.examples,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--examples\"}):null};var ExtensionKeywords_ExtensionKeywords=({schema:e})=>{const t=useFn(),r=\"ExtensionKeywords\",{path:n}=usePath(r),{isExpanded:a,setExpanded:o,setCollapsed:s}=useIsExpanded(r),[l,i]=useLevel(),c=useComponent(\"Accordion\"),u=useComponent(\"ExpandDeepButton\"),d=useComponent(\"JSONViewer\"),{showExtensionKeywords:p}=useConfig(),m=t.getExtensionKeywords(e),f=(0,He.useCallback)((()=>{a?s():o()}),[a,o,s]),h=(0,He.useCallback)(((e,t)=>{t?o({deep:!0}):s({deep:!0})}),[o,s]);return p&&0!==m.length?He.default.createElement(hs.Provider,{value:n},He.default.createElement(ms.Provider,{value:i},He.default.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--extension-keywords\",\"data-json-schema-level\":l},He.default.createElement(c,{expanded:a,onChange:f},He.default.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--extension\"},\"Extension Keywords\")),He.default.createElement(u,{expanded:a,onClick:h}),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!a})},a&&He.default.createElement(He.default.Fragment,null,m.map((t=>He.default.createElement(d,{key:t,name:t,value:e[t],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))))))):null};const JSONViewer=({name:e,value:t,className:r})=>{const n=useFn(),{path:a}=usePath(e),{isExpanded:o,setExpanded:s,setCollapsed:l}=useIsExpanded(e),[i,c]=useLevel(),u=useComponent(\"Accordion\"),d=useComponent(\"ExpandDeepButton\"),p=\"string\"==typeof t||\"number\"==typeof t||\"bigint\"==typeof t||\"boolean\"==typeof t||\"symbol\"==typeof t||null==t,m=(e=>isPlainObject(e)&&0===Object.keys(e).length)(t)||(e=>Array.isArray(e)&&0===e.length)(t),f=(0,He.useCallback)((()=>{o?l():s()}),[o,s,l]),h=(0,He.useCallback)(((e,t)=>{t?s({deep:!0}):l({deep:!0})}),[s,l]);return p?He.default.createElement(\"div\",{className:(0,hr.default)(\"json-schema-2020-12-json-viewer\",r)},He.default.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},e),He.default.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__value json-schema-2020-12-json-viewer__value--secondary\"},n.stringify(t))):m?He.default.createElement(\"div\",{className:(0,hr.default)(\"json-schema-2020-12-json-viewer\",r)},He.default.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},e),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(t)?\"empty array\":\"empty object\")):He.default.createElement(hs.Provider,{value:a},He.default.createElement(ms.Provider,{value:c},He.default.createElement(\"div\",{className:(0,hr.default)(\"json-schema-2020-12-json-viewer\",r),\"data-json-schema-level\":i},He.default.createElement(u,{expanded:o,onChange:f},He.default.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},e)),He.default.createElement(d,{expanded:o,onClick:h}),He.default.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(t)?\"array\":\"object\"),He.default.createElement(\"ul\",{className:(0,hr.default)(\"json-schema-2020-12-json-viewer__children\",{\"json-schema-2020-12-json-viewer__children--collapsed\":!o})},o&&He.default.createElement(He.default.Fragment,null,Array.isArray(t)?t.map(((e,t)=>He.default.createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},He.default.createElement(JSONViewer,{name:`#${t}`,value:e,className:r})))):Object.entries(t).map((([e,t])=>He.default.createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},He.default.createElement(JSONViewer,{name:e,value:t,className:r})))))))))};var Ss=JSONViewer;var Accordion_Accordion=({expanded:e=!1,children:t,onChange:r})=>{const n=useComponent(\"ChevronRightIcon\"),a=(0,He.useCallback)((t=>{r(t,!e)}),[e,r]);return He.default.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:a},He.default.createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},t),He.default.createElement(\"span\",{className:(0,hr.default)(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":e,\"json-schema-2020-12-accordion__icon--collapsed\":!e})},He.default.createElement(n,null)))};var ExpandDeepButton_ExpandDeepButton=({expanded:e,onClick:t})=>{const r=(0,He.useCallback)((r=>{t(r,!e)}),[e,t]);return He.default.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:r},e?\"Collapse all\":\"Expand all\")};var icons_ChevronRight=()=>He.default.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},He.default.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"}));const withJSONSchemaContext=(e,t={})=>{const r={components:{JSONSchema:ys,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:Const_Const,KeywordConstraint:Es,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:Default_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,KeywordExamples:keywords_Examples_Examples,ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONViewer:Ss,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...t.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,showExtensionKeywords:!0,...t.config},fn:{upperFirst:fn_upperFirst,getTitle:makeGetTitle(useFn),getType:makeGetType(useFn),isBooleanJSONSchema,hasKeyword,isExpandable:fn_makeIsExpandable(useFn),stringify:fn_stringify,stringifyConstraints,getDependentRequired,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(useFn),...t.fn},state:{paths:{}}},HOC=t=>He.default.createElement(ps.Provider,{value:r},He.default.createElement(e,t));return HOC.contexts={JSONSchemaContext:ps},HOC.displayName=e.displayName,HOC},makeWithJSONSchemaSystemContext=({getSystem:e})=>(t,r={})=>{const{getComponent:n,getConfigs:a}=e(),o=a(),s=n(\"JSONSchema202012\"),l=n(\"JSONSchema202012Keyword$schema\"),i=n(\"JSONSchema202012Keyword$vocabulary\"),c=n(\"JSONSchema202012Keyword$id\"),u=n(\"JSONSchema202012Keyword$anchor\"),d=n(\"JSONSchema202012Keyword$dynamicAnchor\"),p=n(\"JSONSchema202012Keyword$ref\"),m=n(\"JSONSchema202012Keyword$dynamicRef\"),f=n(\"JSONSchema202012Keyword$defs\"),h=n(\"JSONSchema202012Keyword$comment\"),g=n(\"JSONSchema202012KeywordAllOf\"),y=n(\"JSONSchema202012KeywordAnyOf\"),S=n(\"JSONSchema202012KeywordOneOf\"),_=n(\"JSONSchema202012KeywordNot\"),v=n(\"JSONSchema202012KeywordIf\"),b=n(\"JSONSchema202012KeywordThen\"),w=n(\"JSONSchema202012KeywordElse\"),C=n(\"JSONSchema202012KeywordDependentSchemas\"),x=n(\"JSONSchema202012KeywordPrefixItems\"),O=n(\"JSONSchema202012KeywordItems\"),k=n(\"JSONSchema202012KeywordContains\"),N=n(\"JSONSchema202012KeywordProperties\"),A=n(\"JSONSchema202012KeywordPatternProperties\"),I=n(\"JSONSchema202012KeywordAdditionalProperties\"),j=n(\"JSONSchema202012KeywordPropertyNames\"),R=n(\"JSONSchema202012KeywordUnevaluatedItems\"),T=n(\"JSONSchema202012KeywordUnevaluatedProperties\"),P=n(\"JSONSchema202012KeywordType\"),B=n(\"JSONSchema202012KeywordEnum\"),M=n(\"JSONSchema202012KeywordConst\"),q=n(\"JSONSchema202012KeywordConstraint\"),L=n(\"JSONSchema202012KeywordDependentRequired\"),U=n(\"JSONSchema202012KeywordContentSchema\"),D=n(\"JSONSchema202012KeywordTitle\"),$=n(\"JSONSchema202012KeywordDescription\"),V=n(\"JSONSchema202012KeywordDefault\"),J=n(\"JSONSchema202012KeywordDeprecated\"),F=n(\"JSONSchema202012KeywordReadOnly\"),z=n(\"JSONSchema202012KeywordWriteOnly\"),K=n(\"JSONSchema202012KeywordExamples\"),W=n(\"JSONSchema202012ExtensionKeywords\"),H=n(\"JSONSchema202012JSONViewer\"),G=n(\"JSONSchema202012Accordion\"),X=n(\"JSONSchema202012ExpandDeepButton\"),Y=n(\"JSONSchema202012ChevronRightIcon\");return withJSONSchemaContext(t,{components:{JSONSchema:s,Keyword$schema:l,Keyword$vocabulary:i,Keyword$id:c,Keyword$anchor:u,Keyword$dynamicAnchor:d,Keyword$ref:p,Keyword$dynamicRef:m,Keyword$defs:f,Keyword$comment:h,KeywordAllOf:g,KeywordAnyOf:y,KeywordOneOf:S,KeywordNot:_,KeywordIf:v,KeywordThen:b,KeywordElse:w,KeywordDependentSchemas:C,KeywordPrefixItems:x,KeywordItems:O,KeywordContains:k,KeywordProperties:N,KeywordPatternProperties:A,KeywordAdditionalProperties:I,KeywordPropertyNames:j,KeywordUnevaluatedItems:R,KeywordUnevaluatedProperties:T,KeywordType:P,KeywordEnum:B,KeywordConst:M,KeywordConstraint:q,KeywordDependentRequired:L,KeywordContentSchema:U,KeywordTitle:D,KeywordDescription:$,KeywordDefault:V,KeywordDeprecated:J,KeywordReadOnly:F,KeywordWriteOnly:z,KeywordExamples:K,ExtensionKeywords:W,JSONViewer:H,Accordion:G,ExpandDeepButton:X,ChevronRightIcon:Y,...r.components},config:{showExtensionKeywords:o.showExtensions,...r.config},fn:{...r.fn}})};var json_schema_2020_12=({getSystem:e,fn:t})=>{const fnAccessor=()=>({upperFirst:t.upperFirst,...t.jsonSchema202012});return{components:{JSONSchema202012:ys,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:Const_Const,JSONSchema202012KeywordConstraint:Es,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:Default_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012KeywordExamples:keywords_Examples_Examples,JSONSchema202012ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONSchema202012JSONViewer:Ss,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,withJSONSchema202012SystemContext:makeWithJSONSchemaSystemContext(e()),JSONSchema202012PathContext:()=>hs,JSONSchema202012LevelContext:()=>ms},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{getTitle:makeGetTitle(fnAccessor),getType:makeGetType(fnAccessor),isExpandable:fn_makeIsExpandable(fnAccessor),isBooleanJSONSchema,hasKeyword,useFn,useConfig,useComponent,useIsExpanded,usePath,useLevel,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(fnAccessor),hasSchemaType:fn_hasSchemaType}}}};var array=(e,{sample:t=[]}={})=>((e,t={})=>{const{minItems:r,maxItems:n,uniqueItems:a}=t,{contains:o,minContains:s,maxContains:l}=t;let i=[...e];if(null!=o&&\"object\"==typeof o){if(Number.isInteger(s)&&s>1){const e=i.at(0);for(let t=1;t<s;t+=1)i.unshift(e)}Number.isInteger(l)}if(Number.isInteger(n)&&n>0&&(i=e.slice(0,n)),Number.isInteger(r)&&r>0)for(let e=0;i.length<r;e+=1)i.push(i[e%i.length]);return!0===a&&(i=Array.from(new Set(i))),i})(t,e);var object=()=>{throw new Error(\"Not implemented\")};const bytes=e=>Et()(e),pick=e=>e.at(0),predicates_isBooleanJSONSchema=e=>\"boolean\"==typeof e,isJSONSchemaObject=e=>(0,Cr.default)(e),isJSONSchema=e=>predicates_isBooleanJSONSchema(e)||isJSONSchemaObject(e);var _s=class Registry{data={};register(e,t){this.data[e]=t}unregister(e){void 0===e?this.data={}:delete this.data[e]}get(e){return this.data[e]}};var int32=()=>0;var int64=()=>0;var generators_float=()=>.1;var generators_double=()=>.1;var email=()=>\"user@example.com\";var idn_email=()=>\"실례@example.com\";var hostname=()=>\"example.com\";var idn_hostname=()=>\"실례.com\";var ipv4=()=>\"198.51.100.42\";var ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\";var uri=()=>\"https://example.com/\";var uri_reference=()=>\"path/index.html\";var iri=()=>\"https://실례.com/\";var iri_reference=()=>\"path/실례.html\";var uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\";var uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\";var json_pointer=()=>\"/a/b/c\";var relative_json_pointer=()=>\"1/0\";var date_time=()=>(new Date).toISOString();var date=()=>(new Date).toISOString().substring(0,10);var time=()=>(new Date).toISOString().substring(11);var duration=()=>\"P3D\";var generators_password=()=>\"********\";var regex=()=>\"^[a-z]+$\";const vs=new class FormatRegistry extends _s{#e={int32,int64,float:generators_float,double:generators_double,email,\"idn-email\":idn_email,hostname,\"idn-hostname\":idn_hostname,ipv4,ipv6,uri,\"uri-reference\":uri_reference,iri,\"iri-reference\":iri_reference,uuid,\"uri-template\":uri_template,\"json-pointer\":json_pointer,\"relative-json-pointer\":relative_json_pointer,\"date-time\":date_time,date,time,duration,password:generators_password,regex};data={...this.#e};get defaults(){return{...this.#e}}},formatAPI=(e,t)=>\"function\"==typeof t?vs.register(e,t):null===t?vs.unregister(e):vs.get(e);formatAPI.getDefaults=()=>vs.defaults;var bs=formatAPI,ws=__webpack_require__(287).Buffer;var _7bit=e=>ws.from(e).toString(\"ascii\"),Cs=__webpack_require__(287).Buffer;var _8bit=e=>Cs.from(e).toString(\"utf8\"),xs=__webpack_require__(287).Buffer;var binary=e=>xs.from(e).toString(\"binary\");var quoted_printable=e=>{let t=\"\";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);if(61===n)t+=\"=3D\";else if(n>=33&&n<=60||n>=62&&n<=126||9===n||32===n)t+=e.charAt(r);else if(13===n||10===n)t+=\"\\r\\n\";else if(n>126){const n=unescape(encodeURIComponent(e.charAt(r)));for(let e=0;e<n.length;e++)t+=\"=\"+(\"0\"+n.charCodeAt(e).toString(16)).slice(-2).toUpperCase()}else t+=\"=\"+(\"0\"+n.toString(16)).slice(-2).toUpperCase()}return t},Os=__webpack_require__(287).Buffer;var base16=e=>Os.from(e).toString(\"hex\"),ks=__webpack_require__(287).Buffer;var base32=e=>{const t=ks.from(e).toString(\"utf8\"),r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let n=0,a=\"\",o=0,s=0;for(let e=0;e<t.length;e++)for(o=o<<8|t.charCodeAt(e),s+=8;s>=5;)a+=r.charAt(o>>>s-5&31),s-=5;s>0&&(a+=r.charAt(o<<5-s&31),n=(8-8*t.length%5)%5);for(let e=0;e<n;e++)a+=\"=\";return a},Ns=__webpack_require__(287).Buffer;var base64=e=>Ns.from(e).toString(\"base64\"),As=__webpack_require__(287).Buffer;var base64url=e=>As.from(e).toString(\"base64url\");const Is=new class EncoderRegistry extends _s{#e={\"7bit\":_7bit,\"8bit\":_8bit,binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#e};get defaults(){return{...this.#e}}},encoderAPI=(e,t)=>\"function\"==typeof t?Is.register(e,t):null===t?Is.unregister(e):Is.get(e);encoderAPI.getDefaults=()=>Is.defaults;var js=encoderAPI;var Rs={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"};var Ts={\"image/*\":()=>bytes(25).toString(\"binary\")};var Ps={\"audio/*\":()=>bytes(25).toString(\"binary\")};var Bs={\"video/*\":()=>bytes(25).toString(\"binary\")};var Ms={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const qs=new class MediaTypeRegistry extends _s{#e={...Rs,...Ts,...Ps,...Bs,...Ms};data={...this.#e};get defaults(){return{...this.#e}}},mediaTypeAPI=(e,t)=>{if(\"function\"==typeof t)return qs.register(e,t);if(null===t)return qs.unregister(e);const r=e.split(\";\").at(0),n=`${r.split(\"/\").at(0)}/*`;return qs.get(e)||qs.get(r)||qs.get(n)};mediaTypeAPI.getDefaults=()=>qs.defaults;var Ls=mediaTypeAPI;const applyStringConstraints=(e,t={})=>{const{maxLength:r,minLength:n}=t;let a=e;if(Number.isInteger(r)&&r>0&&(a=a.slice(0,r)),Number.isInteger(n)&&n>0){let e=0;for(;a.length<n;)a+=a[e++%a.length]}return a};var types_string=(e,{sample:t}={})=>{const{contentEncoding:r,contentMediaType:n,contentSchema:a}=e,{pattern:o,format:s}=e,l=js(r)||ea.default;let i;return i=\"string\"==typeof o?applyStringConstraints((e=>{try{const t=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,r=e.replace(t,\"100\"),n=new kr.default(r);return n.max=100,n.gen()}catch{return\"string\"}})(o),e):\"string\"==typeof s?(e=>{const{format:t}=e,r=bs(t);return\"function\"==typeof r?r(e):\"string\"})(e):isJSONSchema(a)&&\"string\"==typeof n&&void 0!==t?Array.isArray(t)||\"object\"==typeof t?JSON.stringify(t):applyStringConstraints(String(t),e):\"string\"==typeof n?(e=>{const{contentMediaType:t}=e,r=Ls(t);return\"function\"==typeof r?r(e):\"string\"})(e):applyStringConstraints(\"string\",e),l(i)};const applyNumberConstraints=(e,t={})=>{const{minimum:r,maximum:n,exclusiveMinimum:a,exclusiveMaximum:o}=t,{multipleOf:s}=t,l=Number.isInteger(e)?1:Number.EPSILON;let i=\"number\"==typeof r?r:null,c=\"number\"==typeof n?n:null,u=e;if(\"number\"==typeof a&&(i=null!==i?Math.max(i,a+l):a+l),\"number\"==typeof o&&(c=null!==c?Math.min(c,o-l):o-l),u=i>c&&e||i||c||u,\"number\"==typeof s&&s>0){const e=u%s;u=0===e?u:u+s-e}return u};var types_number=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=bs(t);return\"function\"==typeof r?r(e):0})(e):0,applyNumberConstraints(r,e)};var types_integer=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=bs(t);if(\"function\"==typeof r)return r(e);switch(t){case\"int32\":return int32();case\"int64\":return int64()}return 0})(e):0,applyNumberConstraints(r,e)};var types_boolean=e=>\"boolean\"!=typeof e.default||e.default;var Us=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(e,t)=>\"string\"==typeof t&&Object.hasOwn(e,t)?e[t]:()=>`Unknown Type: ${t}`});const Ds=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=e=>{if(!isJSONSchemaObject(e))return!1;const{examples:t,example:r,default:n}=e;return!!(Array.isArray(t)&&t.length>=1)||(void 0!==n||void 0!==r)},extractExample=e=>{if(!isJSONSchemaObject(e))return null;const{examples:t,example:r,default:n}=e;return Array.isArray(t)&&t.length>=1?t.at(0):void 0!==n?n:void 0!==r?r:void 0},$s={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};$s.number=$s.integer;const Vs=\"string\",inferTypeFromValue=e=>void 0===e?null:null===e?\"null\":Array.isArray(e)?\"array\":Number.isInteger(e)?\"integer\":typeof e,foldType=e=>{if(Array.isArray(e)&&e.length>=1){if(e.includes(\"array\"))return\"array\";if(e.includes(\"object\"))return\"object\";{const t=e.filter((e=>\"null\"!==e)),r=pick(t.length>0?t:e);if(Ds.includes(r))return r}}return Ds.includes(e)?e:null},inferType=(e,t=new WeakSet)=>{if(!isJSONSchemaObject(e))return Vs;if(t.has(e))return Vs;t.add(e);let{type:r,const:n}=e;if(r=foldType(r),\"string\"!=typeof r){const t=Object.keys($s);e:for(let n=0;n<t.length;n+=1){const a=t[n],o=$s[a];for(let t=0;t<o.length;t+=1){const n=o[t];if(Object.hasOwn(e,n)){r=a;break e}}}}if(\"string\"!=typeof r&&void 0!==n){const e=inferTypeFromValue(n);r=\"string\"==typeof e?e:r}if(\"string\"!=typeof r){const combineTypes=r=>{if(Array.isArray(e[r])){const n=e[r].map((e=>inferType(e,t)));return foldType(n)}return null},n=combineTypes(\"allOf\"),a=combineTypes(\"anyOf\"),o=combineTypes(\"oneOf\"),s=e.not?inferType(e.not,t):null;(n||a||o||s)&&(r=foldType([n,a,o,s].filter(Boolean)))}if(\"string\"!=typeof r&&hasExample(e)){const t=extractExample(e),n=inferTypeFromValue(t);r=\"string\"==typeof n?n:r}return t.delete(e),r||Vs},type_getType=e=>inferType(e),typeCast=e=>predicates_isBooleanJSONSchema(e)?(e=>!1===e?{not:{}}:{})(e):isJSONSchemaObject(e)?e:{},merge=(e,t,r={})=>{if(predicates_isBooleanJSONSchema(e)&&!0===e)return!0;if(predicates_isBooleanJSONSchema(e)&&!1===e)return!1;if(predicates_isBooleanJSONSchema(t)&&!0===t)return!0;if(predicates_isBooleanJSONSchema(t)&&!1===t)return!1;if(!isJSONSchema(e))return t;if(!isJSONSchema(t))return e;const n={...t,...e};if(t.type&&e.type&&Array.isArray(t.type)&&\"string\"==typeof t.type){const r=normalizeArray(t.type).concat(e.type);n.type=Array.from(new Set(r))}if(Array.isArray(t.required)&&Array.isArray(e.required)&&(n.required=[...new Set([...e.required,...t.required])]),t.properties&&e.properties){const a=new Set([...Object.keys(t.properties),...Object.keys(e.properties)]);n.properties={};for(const o of a){const a=t.properties[o]||{},s=e.properties[o]||{};a.readOnly&&!r.includeReadOnly||a.writeOnly&&!r.includeWriteOnly?n.required=(n.required||[]).filter((e=>e!==o)):n.properties[o]=merge(s,a,r)}}return isJSONSchema(t.items)&&isJSONSchema(e.items)&&(n.items=merge(e.items,t.items,r)),isJSONSchema(t.contains)&&isJSONSchema(e.contains)&&(n.contains=merge(e.contains,t.contains,r)),isJSONSchema(t.contentSchema)&&isJSONSchema(e.contentSchema)&&(n.contentSchema=merge(e.contentSchema,t.contentSchema,r)),n};var Js=merge;const main_sampleFromSchemaGeneric=(e,t={},r=void 0,n=!1)=>{if(null==e&&void 0===r)return;\"function\"==typeof e?.toJS&&(e=e.toJS()),e=typeCast(e);let a=void 0!==r||hasExample(e);const o=!a&&Array.isArray(e.oneOf)&&e.oneOf.length>0,s=!a&&Array.isArray(e.anyOf)&&e.anyOf.length>0;if(!a&&(o||s)){const r=typeCast(pick(o?e.oneOf:e.anyOf));!(e=Js(e,r,t)).xml&&r.xml&&(e.xml=r.xml),hasExample(e)&&hasExample(r)&&(a=!0)}const l={};let{xml:i,properties:c,additionalProperties:u,items:d,contains:p}=e||{},m=type_getType(e),{includeReadOnly:f,includeWriteOnly:h}=t;i=i||{};let g,{name:y,prefix:S,namespace:_}=i,v={};if(Object.hasOwn(e,\"type\")||(e.type=m),n&&(y=y||\"notagname\",g=(S?`${S}:`:\"\")+y,_)){l[S?`xmlns:${S}`:\"xmlns\"]=_}n&&(v[g]=[]);const b=objectify(c);let w,C=0;const hasExceededMaxProperties=()=>Number.isInteger(e.maxProperties)&&e.maxProperties>0&&C>=e.maxProperties,canAddProperty=t=>!(Number.isInteger(e.maxProperties)&&e.maxProperties>0)||!hasExceededMaxProperties()&&(!(t=>!Array.isArray(e.required)||0===e.required.length||!e.required.includes(t))(t)||e.maxProperties-C-(()=>{if(!Array.isArray(e.required)||0===e.required.length)return 0;let t=0;return n?e.required.forEach((e=>t+=void 0===v[e]?0:1)):e.required.forEach((e=>{t+=void 0===v[g]?.find((t=>void 0!==t[e]))?0:1})),e.required.length-t})()>0);if(w=n?(r,a=void 0)=>{if(e&&b[r]){if(b[r].xml=b[r].xml||{},b[r].xml.attribute){const e=Array.isArray(b[r].enum)?pick(b[r].enum):void 0;if(hasExample(b[r]))l[b[r].xml.name||r]=extractExample(b[r]);else if(void 0!==e)l[b[r].xml.name||r]=e;else{const e=typeCast(b[r]),n=type_getType(e),o=b[r].xml.name||r;if(\"array\"===n){const e=main_sampleFromSchemaGeneric(b[r],t,a,!1);l[o]=e.map((e=>(0,Cr.default)(e)?\"UnknownTypeObject\":Array.isArray(e)?\"UnknownTypeArray\":e)).join(\" \")}else l[o]=\"object\"===n?\"UnknownTypeObject\":Us[n](e)}return}b[r].xml.name=b[r].xml.name||r}else b[r]||!1===u||(b[r]={xml:{name:r}});let o=main_sampleFromSchemaGeneric(b[r],t,a,n);canAddProperty(r)&&(C++,Array.isArray(o)?v[g]=v[g].concat(o):v[g].push(o))}:(r,a)=>{if(canAddProperty(r)){if((0,Cr.default)(e.discriminator?.mapping)&&e.discriminator.propertyName===r&&\"string\"==typeof e.$$ref){for(const t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){v[r]=t;break}}else v[r]=main_sampleFromSchemaGeneric(b[r],t,a,n);C++}},a){let a;if(a=void 0!==r?r:extractExample(e),!n){if(\"number\"==typeof a&&\"string\"===m)return`${a}`;if(\"string\"!=typeof a||\"string\"===m)return a;try{return JSON.parse(a)}catch{return a}}if(\"array\"===m){if(!Array.isArray(a)){if(\"string\"==typeof a)return a;a=[a]}let r=[];return isJSONSchemaObject(d)&&(d.xml=d.xml||i||{},d.xml.name=d.xml.name||i.name,r=a.map((e=>main_sampleFromSchemaGeneric(d,t,e,n)))),isJSONSchemaObject(p)&&(p.xml=p.xml||i||{},p.xml.name=p.xml.name||i.name,r=[main_sampleFromSchemaGeneric(p,t,void 0,n),...r]),r=Us.array(e,{sample:r}),i.wrapped?(v[g]=r,(0,Nr.default)(l)||v[g].push({_attr:l})):v=r,v}if(\"object\"===m){if(\"string\"==typeof a)return a;for(const e in a)Object.hasOwn(a,e)&&(b[e]?.readOnly&&!f||b[e]?.writeOnly&&!h||(b[e]?.xml?.attribute?l[b[e].xml.name||e]=a[e]:w(e,a[e])));return(0,Nr.default)(l)||v[g].push({_attr:l}),v}return v[g]=(0,Nr.default)(l)?a:[{_attr:l},a],v}if(\"array\"===m){let r=[];if(isJSONSchemaObject(p))if(n&&(p.xml=p.xml||e.xml||{},p.xml.name=p.xml.name||i.name),Array.isArray(p.anyOf)){const{anyOf:e,...a}=d;r.push(...p.anyOf.map((e=>main_sampleFromSchemaGeneric(Js(e,a,t),t,void 0,n))))}else if(Array.isArray(p.oneOf)){const{oneOf:e,...a}=d;r.push(...p.oneOf.map((e=>main_sampleFromSchemaGeneric(Js(e,a,t),t,void 0,n))))}else{if(!(!n||n&&i.wrapped))return main_sampleFromSchemaGeneric(p,t,void 0,n);r.push(main_sampleFromSchemaGeneric(p,t,void 0,n))}if(isJSONSchemaObject(d))if(n&&(d.xml=d.xml||e.xml||{},d.xml.name=d.xml.name||i.name),Array.isArray(d.anyOf)){const{anyOf:e,...a}=d;r.push(...d.anyOf.map((e=>main_sampleFromSchemaGeneric(Js(e,a,t),t,void 0,n))))}else if(Array.isArray(d.oneOf)){const{oneOf:e,...a}=d;r.push(...d.oneOf.map((e=>main_sampleFromSchemaGeneric(Js(e,a,t),t,void 0,n))))}else{if(!(!n||n&&i.wrapped))return main_sampleFromSchemaGeneric(d,t,void 0,n);r.push(main_sampleFromSchemaGeneric(d,t,void 0,n))}return r=Us.array(e,{sample:r}),n&&i.wrapped?(v[g]=r,(0,Nr.default)(l)||v[g].push({_attr:l}),v):r}if(\"object\"===m){for(let e in b)Object.hasOwn(b,e)&&(b[e]?.deprecated||b[e]?.readOnly&&!f||b[e]?.writeOnly&&!h||w(e));if(n&&l&&v[g].push({_attr:l}),hasExceededMaxProperties())return v;if(predicates_isBooleanJSONSchema(u)&&u)n?v[g].push({additionalProp:\"Anything can be here\"}):v.additionalProp1={},C++;else if(isJSONSchemaObject(u)){const r=u,a=main_sampleFromSchemaGeneric(r,t,void 0,n);if(n&&\"string\"==typeof r?.xml?.name&&\"notagname\"!==r?.xml?.name)v[g].push(a);else{const t=Number.isInteger(e.minProperties)&&e.minProperties>0&&C<e.minProperties?e.minProperties-C:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return v;if(n){const t={};t[\"additionalProp\"+e]=a.notagname,v[g].push(t)}else v[\"additionalProp\"+e]=a;C++}}}return v}let x;if(void 0!==e.const)x=e.const;else if(e&&Array.isArray(e.enum))x=pick(normalizeArray(e.enum));else{const r=isJSONSchemaObject(e.contentSchema)?main_sampleFromSchemaGeneric(e.contentSchema,t,void 0,n):void 0;x=Us[m](e,{sample:r})}return n?(v[g]=(0,Nr.default)(l)?x:[{_attr:l},x],v):x},main_createXMLExample=(e,t,r)=>{const n=main_sampleFromSchemaGeneric(e,t,r,!0);if(n)return\"string\"==typeof n?n:Or()(n,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(e,t,r)=>main_sampleFromSchemaGeneric(e,t,r,!1),main_resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],Fs=utils_memoizeN(main_createXMLExample,main_resolver),zs=utils_memoizeN(main_sampleFromSchema,main_resolver);const Ks=new class OptionRegistry extends _s{#e={};data={...this.#e};get defaults(){return{...this.#e}}};var api_optionAPI=(e,t)=>(void 0!==t&&Ks.register(e,t),Ks.get(e));const Ws=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Hs=[\"object\"];var fn_get_json_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.jsonSchema202012.memoizedSampleFromSchema(t,r,a),l=typeof s,i=Ws.reduce(((e,t)=>t.when.test(n)?[...e,...t.shouldStringifyTypes]:e),Hs);return(0,pt.default)(i,(e=>e===l))?JSON.stringify(s,null,2):s};var fn_get_yaml_sample_schema=e=>(t,r,n,a)=>{const{fn:o}=e(),s=o.jsonSchema202012.getJsonSampleSchema(t,r,n,a);let l;try{l=Jt.default.dump(Jt.default.load(s),{lineWidth:-1},{schema:Jt.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")};var fn_get_xml_sample_schema=e=>(t,r,n)=>{const{fn:a}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return a.jsonSchema202012.memoizedCreateXMLExample(t,r,n)};var fn_get_sample_schema=e=>(t,r=\"\",n={},a=void 0)=>{const{fn:o}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof a?.toJS&&(a=a.toJS()),/xml/.test(r)?o.jsonSchema202012.getXmlSampleSchema(t,n,a):/(yaml|yml)/.test(r)?o.jsonSchema202012.getYamlSampleSchema(t,n,r,a):o.jsonSchema202012.getJsonSampleSchema(t,n,r,a)};var json_schema_2020_12_samples=({getSystem:e})=>{const t=fn_get_json_sample_schema(e),r=fn_get_yaml_sample_schema(e),n=fn_get_xml_sample_schema(e),a=fn_get_sample_schema(e);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleOptionAPI:api_optionAPI,sampleEncoderAPI:js,sampleFormatAPI:bs,sampleMediaTypeAPI:Ls,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:zs,memoizedCreateXMLExample:Fs,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:n,getSampleSchema:a,mergeJsonSchema:Js,foldType}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}var inline_plugin=e=>()=>({fn:e.fn,components:e.components});var factorization_system=e=>{const t=Qe()({layout:{layout:e.layout,filter:e.filter},spec:{spec:\"\",url:e.url},requestSnippets:e.requestSnippets},e.initialState);if(e.initialState)for(const[r,n]of Object.entries(e.initialState))void 0===n&&delete t[r];return{system:{configs:e.configs},plugins:e.presets,state:t}};var query=()=>e=>{const t=e.queryConfigEnabled?(()=>{const e=new URLSearchParams(ct.location.search);return Object.fromEntries(e)})():{};return Object.entries(t).reduce(((e,[t,r])=>(\"config\"===t?e.configUrl=r:\"urls.primaryName\"===t?e[t]=r:e=(0,_n.default)(e,t,r),e)),{})};var sources_url=({url:e,system:t})=>async r=>{if(!e)return{};if(\"function\"!=typeof t.configsActions?.getConfigByUrl)return{};const n=(()=>{const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e})();return t.configsActions.getConfigByUrl({url:e,loadRemoteConfig:!0,requestInterceptor:r.requestInterceptor,responseInterceptor:r.responseInterceptor},(e=>{n.resolve(e)})),n.promise};var runtime=()=>()=>{const e={};return globalThis.location&&(e.oauth2RedirectUrl=`${globalThis.location.protocol}//${globalThis.location.host}${globalThis.location.pathname.substring(0,globalThis.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`),e};var Gs=Object.freeze({dom_id:null,domNode:null,spec:{},url:\"\",urls:null,configUrl:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:-1,filter:!1,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:void 0,persistAuthorization:!1,configs:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:e=>(e.curlOptions=[],e),responseInterceptor:e=>e,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:!1,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"},operationsSorter:null,tagsSorter:null,onComplete:null,modelPropertyMacro:null,parameterMacro:null,fileUploadMediaTypes:[\"application/octet-stream\",\"image/\",\"audio/\",\"video/\"],uncaughtExceptionHandler:null}),Xs=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return ve.default}}),Ys=function(e){var t={};return __webpack_require__.d(t,e),t}({default:function(){return be.default}});var type_casters_array=(e,t=[])=>Array.isArray(e)?e:t;var type_casters_boolean=(e,t=!1)=>!0===e||\"true\"===e||1===e||\"1\"===e||!1!==e&&\"false\"!==e&&0!==e&&\"0\"!==e&&t;var dom_node=e=>null===e||\"null\"===e?null:e;var type_casters_filter=e=>{const t=String(e);return type_casters_boolean(e,t)};var type_casters_function=(e,t)=>\"function\"==typeof e?e:t;var nullable_array=e=>Array.isArray(e)?e:null;var nullable_function=e=>\"function\"==typeof e?e:null;var nullable_string=e=>null===e||\"null\"===e?null:String(e);var type_casters_number=(e,t=-1)=>{const r=parseInt(e,10);return Number.isNaN(r)?t:r};var type_casters_object=(e,t={})=>(0,Cr.default)(e)?e:t;var sorter=e=>\"function\"==typeof e||\"string\"==typeof e?e:null;var type_casters_string=e=>String(e);var syntax_highlight=(e,t)=>(0,Cr.default)(e)?e:!1===e||\"false\"===e||0===e||\"0\"===e?{activated:!1}:t;var undefined_string=e=>void 0===e||\"undefined\"===e?void 0:String(e);var Qs={components:{typeCaster:type_casters_object},configs:{typeCaster:type_casters_object},configUrl:{typeCaster:nullable_string},deepLinking:{typeCaster:type_casters_boolean,defaultValue:Gs.deepLinking},defaultModelExpandDepth:{typeCaster:type_casters_number,defaultValue:Gs.defaultModelExpandDepth},defaultModelRendering:{typeCaster:type_casters_string},defaultModelsExpandDepth:{typeCaster:type_casters_number,defaultValue:Gs.defaultModelsExpandDepth},displayOperationId:{typeCaster:type_casters_boolean,defaultValue:Gs.displayOperationId},displayRequestDuration:{typeCaster:type_casters_boolean,defaultValue:Gs.displayRequestDuration},docExpansion:{typeCaster:type_casters_string},dom_id:{typeCaster:nullable_string},domNode:{typeCaster:dom_node},fileUploadMediaTypes:{typeCaster:type_casters_array,defaultValue:Gs.fileUploadMediaTypes},filter:{typeCaster:type_casters_filter},fn:{typeCaster:type_casters_object},initialState:{typeCaster:type_casters_object},layout:{typeCaster:type_casters_string},maxDisplayedTags:{typeCaster:type_casters_number,defaultValue:Gs.maxDisplayedTags},modelPropertyMacro:{typeCaster:nullable_function},oauth2RedirectUrl:{typeCaster:undefined_string},onComplete:{typeCaster:nullable_function},operationsSorter:{typeCaster:sorter},paramaterMacro:{typeCaster:nullable_function},persistAuthorization:{typeCaster:type_casters_boolean,defaultValue:Gs.persistAuthorization},plugins:{typeCaster:type_casters_array,defaultValue:Gs.plugins},presets:{typeCaster:type_casters_array,defaultValue:Gs.presets},requestInterceptor:{typeCaster:type_casters_function,defaultValue:Gs.requestInterceptor},requestSnippets:{typeCaster:type_casters_object,defaultValue:Gs.requestSnippets},requestSnippetsEnabled:{typeCaster:type_casters_boolean,defaultValue:Gs.requestSnippetsEnabled},responseInterceptor:{typeCaster:type_casters_function,defaultValue:Gs.responseInterceptor},showCommonExtensions:{typeCaster:type_casters_boolean,defaultValue:Gs.showCommonExtensions},showExtensions:{typeCaster:type_casters_boolean,defaultValue:Gs.showExtensions},showMutatedRequest:{typeCaster:type_casters_boolean,defaultValue:Gs.showMutatedRequest},spec:{typeCaster:type_casters_object,defaultValue:Gs.spec},supportedSubmitMethods:{typeCaster:type_casters_array,defaultValue:Gs.supportedSubmitMethods},syntaxHighlight:{typeCaster:syntax_highlight,defaultValue:Gs.syntaxHighlight},\"syntaxHighlight.activated\":{typeCaster:type_casters_boolean,defaultValue:Gs.syntaxHighlight.activated},\"syntaxHighlight.theme\":{typeCaster:type_casters_string},tagsSorter:{typeCaster:sorter},tryItOutEnabled:{typeCaster:type_casters_boolean,defaultValue:Gs.tryItOutEnabled},url:{typeCaster:type_casters_string},urls:{typeCaster:nullable_array},\"urls.primaryName\":{typeCaster:type_casters_string},validatorUrl:{typeCaster:nullable_string},withCredentials:{typeCaster:type_casters_boolean,defaultValue:Gs.withCredentials},uncaughtExceptionHandler:{typeCaster:nullable_function}};var type_cast=e=>Object.entries(Qs).reduce(((e,[t,{typeCaster:r,defaultValue:n}])=>{if((0,Xs.default)(e,t)){const a=r((0,Zt.default)(e,t),n);e=(0,Ys.default)(t,a,e)}return e}),{...e});var config_merge=(e,...t)=>{let r=Symbol.for(\"domNode\"),n=Symbol.for(\"primaryName\");const a=[];for(const e of t){const t={...e};Object.hasOwn(t,\"domNode\")&&(r=t.domNode,delete t.domNode),Object.hasOwn(t,\"urls.primaryName\")?(n=t[\"urls.primaryName\"],delete t[\"urls.primaryName\"]):Array.isArray(t.urls)&&Object.hasOwn(t.urls,\"primaryName\")&&(n=t.urls.primaryName,delete t.urls.primaryName),a.push(t)}const o=Qe()(e,...a);return r!==Symbol.for(\"domNode\")&&(o.domNode=r),n!==Symbol.for(\"primaryName\")&&Array.isArray(o.urls)&&(o.urls.primaryName=n),type_cast(o)};function SwaggerUI(e){const t=query()(e),r=runtime()(),n=SwaggerUI.config.merge({},SwaggerUI.config.defaults,r,e,t),a=factorization_system(n),o=inline_plugin(n),s=new Store(a);s.register([n.plugins,o]);const l=s.getSystem(),persistConfigs=e=>{s.setConfigs(e),l.configsActions.loaded()},updateSpec=e=>{!t.url&&\"object\"==typeof e.spec&&Object.keys(e.spec).length>0?(l.specActions.updateUrl(\"\"),l.specActions.updateLoadingStatus(\"success\"),l.specActions.updateSpec(JSON.stringify(e.spec))):\"function\"==typeof l.specActions.download&&e.url&&!e.urls&&(l.specActions.updateUrl(e.url),l.specActions.download(e.url))},render=e=>{if(e.domNode)l.render(e.domNode,\"App\");else if(e.dom_id){const t=document.querySelector(e.dom_id);l.render(t,\"App\")}else null===e.dom_id||null===e.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\")};return n.configUrl?((async()=>{const{configUrl:e}=n,r=await sources_url({url:e,system:l})(n),a=SwaggerUI.config.merge({},n,r,t);persistConfigs(a),null!==r&&updateSpec(a),render(a)})(),l):(persistConfigs(n),updateSpec(n),render(n),l)}SwaggerUI.System=Store,SwaggerUI.config={defaults:Gs,merge:config_merge,typeCast:type_cast,typeCastMappings:Qs},SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5:json_schema_5,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SyntaxHighlighting:syntax_highlighting,Versions:versions,SafeRender:safe_render};var Zs=SwaggerUI,el=xe.A;export{el as default};\n//# sourceMappingURL=swagger-ui-es-bundle-core.js.map"
  },
  {
    "path": "runner/server/docs/ui/swagger-ui-es-bundle.js",
    "content": "/*! For license information please see swagger-ui-es-bundle.js.LICENSE.txt */\n(()=>{var s={251:(s,o)=>{o.read=function(s,o,i,a,u){var _,w,x=8*u-a-1,C=(1<<x)-1,j=C>>1,L=-7,B=i?u-1:0,$=i?-1:1,V=s[o+B];for(B+=$,_=V&(1<<-L)-1,V>>=-L,L+=x;L>0;_=256*_+s[o+B],B+=$,L-=8);for(w=_&(1<<-L)-1,_>>=-L,L+=a;L>0;w=256*w+s[o+B],B+=$,L-=8);if(0===_)_=1-j;else{if(_===C)return w?NaN:1/0*(V?-1:1);w+=Math.pow(2,a),_-=j}return(V?-1:1)*w*Math.pow(2,_-a)},o.write=function(s,o,i,a,u,_){var w,x,C,j=8*_-u-1,L=(1<<j)-1,B=L>>1,$=23===u?Math.pow(2,-24)-Math.pow(2,-77):0,V=a?0:_-1,U=a?1:-1,z=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(x=isNaN(o)?1:0,w=L):(w=Math.floor(Math.log(o)/Math.LN2),o*(C=Math.pow(2,-w))<1&&(w--,C*=2),(o+=w+B>=1?$/C:$*Math.pow(2,1-B))*C>=2&&(w++,C/=2),w+B>=L?(x=0,w=L):w+B>=1?(x=(o*C-1)*Math.pow(2,u),w+=B):(x=o*Math.pow(2,B-1)*Math.pow(2,u),w=0));u>=8;s[i+V]=255&x,V+=U,x/=256,u-=8);for(w=w<<u|x,j+=u;j>0;s[i+V]=255&w,V+=U,w/=256,j-=8);s[i+V-U]|=128*z}},462:(s,o,i)=>{\"use strict\";var a=i(40975);s.exports=a},659:(s,o,i)=>{var a=i(51873),u=Object.prototype,_=u.hasOwnProperty,w=u.toString,x=a?a.toStringTag:void 0;s.exports=function getRawTag(s){var o=_.call(s,x),i=s[x];try{s[x]=void 0;var a=!0}catch(s){}var u=w.call(s);return a&&(o?s[x]=i:delete s[x]),u}},694:(s,o,i)=>{\"use strict\";i(91599);var a=i(37257);i(12560),s.exports=a},953:(s,o,i)=>{\"use strict\";s.exports=i(53375)},1733:s=>{var o=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;s.exports=function asciiWords(s){return s.match(o)||[]}},1882:(s,o,i)=>{var a=i(72552),u=i(23805);s.exports=function isFunction(s){if(!u(s))return!1;var o=a(s);return\"[object Function]\"==o||\"[object GeneratorFunction]\"==o||\"[object AsyncFunction]\"==o||\"[object Proxy]\"==o}},1907:(s,o,i)=>{\"use strict\";var a=i(41505),u=Function.prototype,_=u.call,w=a&&u.bind.bind(_,_);s.exports=a?w:function(s){return function(){return _.apply(s,arguments)}}},2205:function(s,o,i){var a;a=void 0!==i.g?i.g:this,s.exports=function(s){if(s.CSS&&s.CSS.escape)return s.CSS.escape;var cssEscape=function(s){if(0==arguments.length)throw new TypeError(\"`CSS.escape` requires an argument.\");for(var o,i=String(s),a=i.length,u=-1,_=\"\",w=i.charCodeAt(0);++u<a;)0!=(o=i.charCodeAt(u))?_+=o>=1&&o<=31||127==o||0==u&&o>=48&&o<=57||1==u&&o>=48&&o<=57&&45==w?\"\\\\\"+o.toString(16)+\" \":0==u&&1==a&&45==o||!(o>=128||45==o||95==o||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122)?\"\\\\\"+i.charAt(u):i.charAt(u):_+=\"�\";return _};return s.CSS||(s.CSS={}),s.CSS.escape=cssEscape,cssEscape}(a)},2209:(s,o,i)=>{\"use strict\";var a,u=i(9404),_=function productionTypeChecker(){invariant(!1,\"ImmutablePropTypes type checking code is stripped in production.\")};_.isRequired=_;var w=function getProductionTypeChecker(){return _};function getPropType(s){var o=typeof s;return Array.isArray(s)?\"array\":s instanceof RegExp?\"object\":s instanceof u.Iterable?\"Immutable.\"+s.toSource().split(\" \")[0]:o}function createChainableTypeChecker(s){function checkType(o,i,a,u,_,w){for(var x=arguments.length,C=Array(x>6?x-6:0),j=6;j<x;j++)C[j-6]=arguments[j];return w=w||a,u=u||\"<<anonymous>>\",null!=i[a]?s.apply(void 0,[i,a,u,_,w].concat(C)):o?new Error(\"Required \"+_+\" `\"+w+\"` was not specified in `\"+u+\"`.\"):void 0}var o=checkType.bind(null,!1);return o.isRequired=checkType.bind(null,!0),o}function createIterableSubclassTypeChecker(s,o){return function createImmutableTypeChecker(s,o){return createChainableTypeChecker((function validate(i,a,u,_,w){var x=i[a];if(!o(x)){var C=getPropType(x);return new Error(\"Invalid \"+_+\" `\"+w+\"` of type `\"+C+\"` supplied to `\"+u+\"`, expected `\"+s+\"`.\")}return null}))}(\"Iterable.\"+s,(function(s){return u.Iterable.isIterable(s)&&o(s)}))}(a={listOf:w,mapOf:w,orderedMapOf:w,setOf:w,orderedSetOf:w,stackOf:w,iterableOf:w,recordOf:w,shape:w,contains:w,mapContains:w,orderedMapContains:w,list:_,map:_,orderedMap:_,set:_,orderedSet:_,stack:_,seq:_,record:_,iterable:_}).iterable.indexed=createIterableSubclassTypeChecker(\"Indexed\",u.Iterable.isIndexed),a.iterable.keyed=createIterableSubclassTypeChecker(\"Keyed\",u.Iterable.isKeyed),s.exports=a},2404:(s,o,i)=>{var a=i(60270);s.exports=function isEqual(s,o){return a(s,o)}},2523:s=>{s.exports=function baseFindIndex(s,o,i,a){for(var u=s.length,_=i+(a?1:-1);a?_--:++_<u;)if(o(s[_],_,s))return _;return-1}},2532:(s,o,i)=>{\"use strict\";var a=i(45951),u=Object.defineProperty;s.exports=function(s,o){try{u(a,s,{value:o,configurable:!0,writable:!0})}catch(i){a[s]=o}return o}},2694:(s,o,i)=>{\"use strict\";var a=i(6925);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,s.exports=function(){function shim(s,o,i,u,_,w){if(w!==a){var x=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw x.name=\"Invariant Violation\",x}}function getShim(){return shim}shim.isRequired=shim;var s={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return s.PropTypes=s,s}},2874:s=>{s.exports={}},2875:(s,o,i)=>{\"use strict\";var a=i(23045),u=i(80376);s.exports=Object.keys||function keys(s){return a(s,u)}},2955:(s,o,i)=>{\"use strict\";var a,u=i(65606);function _defineProperty(s,o,i){return(o=function _toPropertyKey(s){var o=function _toPrimitive(s,o){if(\"object\"!=typeof s||null===s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||\"default\");if(\"object\"!=typeof a)return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===o?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof o?o:String(o)}(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var _=i(86238),w=Symbol(\"lastResolve\"),x=Symbol(\"lastReject\"),C=Symbol(\"error\"),j=Symbol(\"ended\"),L=Symbol(\"lastPromise\"),B=Symbol(\"handlePromise\"),$=Symbol(\"stream\");function createIterResult(s,o){return{value:s,done:o}}function readAndResolve(s){var o=s[w];if(null!==o){var i=s[$].read();null!==i&&(s[L]=null,s[w]=null,s[x]=null,o(createIterResult(i,!1)))}}function onReadable(s){u.nextTick(readAndResolve,s)}var V=Object.getPrototypeOf((function(){})),U=Object.setPrototypeOf((_defineProperty(a={get stream(){return this[$]},next:function next(){var s=this,o=this[C];if(null!==o)return Promise.reject(o);if(this[j])return Promise.resolve(createIterResult(void 0,!0));if(this[$].destroyed)return new Promise((function(o,i){u.nextTick((function(){s[C]?i(s[C]):o(createIterResult(void 0,!0))}))}));var i,a=this[L];if(a)i=new Promise(function wrapForNext(s,o){return function(i,a){s.then((function(){o[j]?i(createIterResult(void 0,!0)):o[B](i,a)}),a)}}(a,this));else{var _=this[$].read();if(null!==_)return Promise.resolve(createIterResult(_,!1));i=new Promise(this[B])}return this[L]=i,i}},Symbol.asyncIterator,(function(){return this})),_defineProperty(a,\"return\",(function _return(){var s=this;return new Promise((function(o,i){s[$].destroy(null,(function(s){s?i(s):o(createIterResult(void 0,!0))}))}))})),a),V);s.exports=function createReadableStreamAsyncIterator(s){var o,i=Object.create(U,(_defineProperty(o={},$,{value:s,writable:!0}),_defineProperty(o,w,{value:null,writable:!0}),_defineProperty(o,x,{value:null,writable:!0}),_defineProperty(o,C,{value:null,writable:!0}),_defineProperty(o,j,{value:s._readableState.endEmitted,writable:!0}),_defineProperty(o,B,{value:function value(s,o){var a=i[$].read();a?(i[L]=null,i[w]=null,i[x]=null,s(createIterResult(a,!1))):(i[w]=s,i[x]=o)},writable:!0}),o));return i[L]=null,_(s,(function(s){if(s&&\"ERR_STREAM_PREMATURE_CLOSE\"!==s.code){var o=i[x];return null!==o&&(i[L]=null,i[w]=null,i[x]=null,o(s)),void(i[C]=s)}var a=i[w];null!==a&&(i[L]=null,i[w]=null,i[x]=null,a(createIterResult(void 0,!0))),i[j]=!0})),s.on(\"readable\",onReadable.bind(null,i)),i}},3110:(s,o,i)=>{const a=i(5187),u=i(85015),_=i(98023),w=i(53812),x=i(23805),C=i(85105),j=i(86804);class Namespace{constructor(s){this.elementMap={},this.elementDetection=[],this.Element=j.Element,this.KeyValuePair=j.KeyValuePair,s&&s.noDefault||this.useDefault(),this._attributeElementKeys=[],this._attributeElementArrayKeys=[]}use(s){return s.namespace&&s.namespace({base:this}),s.load&&s.load({base:this}),this}useDefault(){return this.register(\"null\",j.NullElement).register(\"string\",j.StringElement).register(\"number\",j.NumberElement).register(\"boolean\",j.BooleanElement).register(\"array\",j.ArrayElement).register(\"object\",j.ObjectElement).register(\"member\",j.MemberElement).register(\"ref\",j.RefElement).register(\"link\",j.LinkElement),this.detect(a,j.NullElement,!1).detect(u,j.StringElement,!1).detect(_,j.NumberElement,!1).detect(w,j.BooleanElement,!1).detect(Array.isArray,j.ArrayElement,!1).detect(x,j.ObjectElement,!1),this}register(s,o){return this._elements=void 0,this.elementMap[s]=o,this}unregister(s){return this._elements=void 0,delete this.elementMap[s],this}detect(s,o,i){return void 0===i||i?this.elementDetection.unshift([s,o]):this.elementDetection.push([s,o]),this}toElement(s){if(s instanceof this.Element)return s;let o;for(let i=0;i<this.elementDetection.length;i+=1){const a=this.elementDetection[i][0],u=this.elementDetection[i][1];if(a(s)){o=new u(s);break}}return o}getElementClass(s){const o=this.elementMap[s];return void 0===o?this.Element:o}fromRefract(s){return this.serialiser.deserialise(s)}toRefract(s){return this.serialiser.serialise(s)}get elements(){return void 0===this._elements&&(this._elements={Element:this.Element},Object.keys(this.elementMap).forEach((s=>{const o=s[0].toUpperCase()+s.substr(1);this._elements[o]=this.elementMap[s]}))),this._elements}get serialiser(){return new C(this)}}C.prototype.Namespace=Namespace,s.exports=Namespace},3121:(s,o,i)=>{\"use strict\";var a=i(65482),u=Math.min;s.exports=function(s){var o=a(s);return o>0?u(o,9007199254740991):0}},3209:(s,o,i)=>{var a=i(91596),u=i(53320),_=i(36306),w=\"__lodash_placeholder__\",x=128,C=Math.min;s.exports=function mergeData(s,o){var i=s[1],j=o[1],L=i|j,B=L<131,$=j==x&&8==i||j==x&&256==i&&s[7].length<=o[8]||384==j&&o[7].length<=o[8]&&8==i;if(!B&&!$)return s;1&j&&(s[2]=o[2],L|=1&i?0:4);var V=o[3];if(V){var U=s[3];s[3]=U?a(U,V,o[4]):V,s[4]=U?_(s[3],w):o[4]}return(V=o[5])&&(U=s[5],s[5]=U?u(U,V,o[6]):V,s[6]=U?_(s[5],w):o[6]),(V=o[7])&&(s[7]=V),j&x&&(s[8]=null==s[8]?o[8]:C(s[8],o[8])),null==s[9]&&(s[9]=o[9]),s[0]=o[0],s[1]=L,s}},3650:(s,o,i)=>{var a=i(74335)(Object.keys,Object);s.exports=a},3656:(s,o,i)=>{s=i.nmd(s);var a=i(9325),u=i(89935),_=o&&!o.nodeType&&o,w=_&&s&&!s.nodeType&&s,x=w&&w.exports===_?a.Buffer:void 0,C=(x?x.isBuffer:void 0)||u;s.exports=C},4509:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheHas(s){return a(this,s).has(s)}},4640:s=>{\"use strict\";var o=String;s.exports=function(s){try{return o(s)}catch(s){return\"Object\"}}},4664:(s,o,i)=>{var a=i(79770),u=i(63345),_=Object.prototype.propertyIsEnumerable,w=Object.getOwnPropertySymbols,x=w?function(s){return null==s?[]:(s=Object(s),a(w(s),(function(o){return _.call(s,o)})))}:u;s.exports=x},4901:(s,o,i)=>{var a=i(72552),u=i(30294),_=i(40346),w={};w[\"[object Float32Array]\"]=w[\"[object Float64Array]\"]=w[\"[object Int8Array]\"]=w[\"[object Int16Array]\"]=w[\"[object Int32Array]\"]=w[\"[object Uint8Array]\"]=w[\"[object Uint8ClampedArray]\"]=w[\"[object Uint16Array]\"]=w[\"[object Uint32Array]\"]=!0,w[\"[object Arguments]\"]=w[\"[object Array]\"]=w[\"[object ArrayBuffer]\"]=w[\"[object Boolean]\"]=w[\"[object DataView]\"]=w[\"[object Date]\"]=w[\"[object Error]\"]=w[\"[object Function]\"]=w[\"[object Map]\"]=w[\"[object Number]\"]=w[\"[object Object]\"]=w[\"[object RegExp]\"]=w[\"[object Set]\"]=w[\"[object String]\"]=w[\"[object WeakMap]\"]=!1,s.exports=function baseIsTypedArray(s){return _(s)&&u(s.length)&&!!w[a(s)]}},4993:(s,o,i)=>{\"use strict\";var a=i(16946),u=i(74239);s.exports=function(s){return a(u(s))}},5187:s=>{s.exports=function isNull(s){return null===s}},5419:s=>{s.exports=function(s,o,i,a){var u=new Blob(void 0!==a?[a,s]:[s],{type:i||\"application/octet-stream\"});if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(u,o);else{var _=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(u):window.webkitURL.createObjectURL(u),w=document.createElement(\"a\");w.style.display=\"none\",w.href=_,w.setAttribute(\"download\",o),void 0===w.download&&w.setAttribute(\"target\",\"_blank\"),document.body.appendChild(w),w.click(),setTimeout((function(){document.body.removeChild(w),window.URL.revokeObjectURL(_)}),200)}}},5556:(s,o,i)=>{s.exports=i(2694)()},5861:(s,o,i)=>{var a=i(55580),u=i(68223),_=i(32804),w=i(76545),x=i(28303),C=i(72552),j=i(47473),L=\"[object Map]\",B=\"[object Promise]\",$=\"[object Set]\",V=\"[object WeakMap]\",U=\"[object DataView]\",z=j(a),Y=j(u),Z=j(_),ee=j(w),ie=j(x),ae=C;(a&&ae(new a(new ArrayBuffer(1)))!=U||u&&ae(new u)!=L||_&&ae(_.resolve())!=B||w&&ae(new w)!=$||x&&ae(new x)!=V)&&(ae=function(s){var o=C(s),i=\"[object Object]\"==o?s.constructor:void 0,a=i?j(i):\"\";if(a)switch(a){case z:return U;case Y:return L;case Z:return B;case ee:return $;case ie:return V}return o}),s.exports=ae},6048:s=>{s.exports=function negate(s){if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}},6205:s=>{s.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}},6233:(s,o,i)=>{const a=i(6048),u=i(10316),_=i(92340);class ArrayElement extends u{constructor(s,o,i){super(s||[],o,i),this.element=\"array\"}primitive(){return\"array\"}get(s){return this.content[s]}getValue(s){const o=this.get(s);if(o)return o.toValue()}getIndex(s){return this.content[s]}set(s,o){return this.content[s]=this.refract(o),this}remove(s){const o=this.content.splice(s,1);return o.length?o[0]:null}map(s,o){return this.content.map(s,o)}flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(a);u&&i.push(u)})),i}filter(s,o){return new _(this.content.filter(s,o))}reject(s,o){return this.filter(a(s),o)}reduce(s,o){let i,a;void 0!==o?(i=0,a=this.refract(o)):(i=1,a=\"object\"===this.primitive()?this.first.value:this.first);for(let o=i;o<this.length;o+=1){const i=this.content[o];a=\"object\"===this.primitive()?this.refract(s(a,i.value,i.key,i,this)):this.refract(s(a,i,o,this))}return a}forEach(s,o){this.content.forEach(((i,a)=>{s.bind(o)(i,this.refract(a))}))}shift(){return this.content.shift()}unshift(s){this.content.unshift(this.refract(s))}push(s){return this.content.push(this.refract(s)),this}add(s){this.push(s)}findElements(s,o){const i=o||{},a=!!i.recursive,u=void 0===i.results?[]:i.results;return this.forEach(((o,i,_)=>{a&&void 0!==o.findElements&&o.findElements(s,{results:u,recursive:a}),s(o,i,_)&&u.push(o)})),u}find(s){return new _(this.findElements(s,{recursive:!0}))}findByElement(s){return this.find((o=>o.element===s))}findByClass(s){return this.find((o=>o.classes.includes(s)))}getById(s){return this.find((o=>o.id.toValue()===s)).first}includes(s){return this.content.some((o=>o.equals(s)))}contains(s){return this.includes(s)}empty(){return new this.constructor([])}\"fantasy-land/empty\"(){return this.empty()}concat(s){return new this.constructor(this.content.concat(s.content))}\"fantasy-land/concat\"(s){return this.concat(s)}\"fantasy-land/map\"(s){return new this.constructor(this.map(s))}\"fantasy-land/chain\"(s){return this.map((o=>s(o)),this).reduce(((s,o)=>s.concat(o)),this.empty())}\"fantasy-land/filter\"(s){return new this.constructor(this.content.filter(s))}\"fantasy-land/reduce\"(s,o){return this.content.reduce(s,o)}get length(){return this.content.length}get isEmpty(){return 0===this.content.length}get first(){return this.getIndex(0)}get second(){return this.getIndex(1)}get last(){return this.getIndex(this.length-1)}}ArrayElement.empty=function empty(){return new this},ArrayElement[\"fantasy-land/empty\"]=ArrayElement.empty,\"undefined\"!=typeof Symbol&&(ArrayElement.prototype[Symbol.iterator]=function symbol(){return this.content[Symbol.iterator]()}),s.exports=ArrayElement},6499:(s,o,i)=>{\"use strict\";var a=i(1907),u=0,_=Math.random(),w=a(1..toString);s.exports=function(s){return\"Symbol(\"+(void 0===s?\"\":s)+\")_\"+w(++u+_,36)}},6925:s=>{\"use strict\";s.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},7057:(s,o,i)=>{\"use strict\";var a=i(11470).charAt,u=i(90160),_=i(64932),w=i(60183),x=i(59550),C=\"String Iterator\",j=_.set,L=_.getterFor(C);w(String,\"String\",(function(s){j(this,{type:C,string:u(s),index:0})}),(function next(){var s,o=L(this),i=o.string,u=o.index;return u>=i.length?x(void 0,!0):(s=a(i,u),o.index+=s.length,x(s,!1))}))},7309:(s,o,i)=>{var a=i(62006)(i(24713));s.exports=a},7376:s=>{\"use strict\";s.exports=!0},7463:(s,o,i)=>{\"use strict\";var a=i(98828),u=i(62250),_=/#|\\.prototype\\./,isForced=function(s,o){var i=x[w(s)];return i===j||i!==C&&(u(o)?a(o):!!o)},w=isForced.normalize=function(s){return String(s).replace(_,\".\").toLowerCase()},x=isForced.data={},C=isForced.NATIVE=\"N\",j=isForced.POLYFILL=\"P\";s.exports=isForced},7666:(s,o,i)=>{var a=i(84851),u=i(953);function _extends(){var o;return s.exports=_extends=a?u(o=a).call(o):function(s){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},s.exports.__esModule=!0,s.exports.default=s.exports,_extends.apply(null,arguments)}s.exports=_extends,s.exports.__esModule=!0,s.exports.default=s.exports},8048:(s,o,i)=>{const a=i(6205);o.wordBoundary=()=>({type:a.POSITION,value:\"b\"}),o.nonWordBoundary=()=>({type:a.POSITION,value:\"B\"}),o.begin=()=>({type:a.POSITION,value:\"^\"}),o.end=()=>({type:a.POSITION,value:\"$\"})},8068:s=>{\"use strict\";var o=(()=>{var s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,__defNormalProp=(o,i,a)=>i in o?s(o,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[i]=a,__spreadValues=(s,o)=>{for(var i in o||(o={}))u.call(o,i)&&__defNormalProp(s,i,o[i]);if(a)for(var i of a(o))_.call(o,i)&&__defNormalProp(s,i,o[i]);return s},__publicField=(s,o,i)=>__defNormalProp(s,\"symbol\"!=typeof o?o+\"\":o,i),w={};((o,i)=>{for(var a in i)s(o,a,{get:i[a],enumerable:!0})})(w,{DEFAULT_OPTIONS:()=>C,DEFAULT_UUID_LENGTH:()=>x,default:()=>B});var x=6,C={dictionary:\"alphanum\",shuffle:!0,debug:!1,length:x,counter:0},j=class _ShortUniqueId{constructor(s={}){__publicField(this,\"counter\"),__publicField(this,\"debug\"),__publicField(this,\"dict\"),__publicField(this,\"version\"),__publicField(this,\"dictIndex\",0),__publicField(this,\"dictRange\",[]),__publicField(this,\"lowerBound\",0),__publicField(this,\"upperBound\",0),__publicField(this,\"dictLength\",0),__publicField(this,\"uuidLength\"),__publicField(this,\"_digit_first_ascii\",48),__publicField(this,\"_digit_last_ascii\",58),__publicField(this,\"_alpha_lower_first_ascii\",97),__publicField(this,\"_alpha_lower_last_ascii\",123),__publicField(this,\"_hex_last_ascii\",103),__publicField(this,\"_alpha_upper_first_ascii\",65),__publicField(this,\"_alpha_upper_last_ascii\",91),__publicField(this,\"_number_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii]}),__publicField(this,\"_alpha_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alpha_lower_dict_ranges\",{lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alpha_upper_dict_ranges\",{upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_alphanum_lower_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],lowerCase:[this._alpha_lower_first_ascii,this._alpha_lower_last_ascii]}),__publicField(this,\"_alphanum_upper_dict_ranges\",{digits:[this._digit_first_ascii,this._digit_last_ascii],upperCase:[this._alpha_upper_first_ascii,this._alpha_upper_last_ascii]}),__publicField(this,\"_hex_dict_ranges\",{decDigits:[this._digit_first_ascii,this._digit_last_ascii],alphaDigits:[this._alpha_lower_first_ascii,this._hex_last_ascii]}),__publicField(this,\"_dict_ranges\",{_number_dict_ranges:this._number_dict_ranges,_alpha_dict_ranges:this._alpha_dict_ranges,_alpha_lower_dict_ranges:this._alpha_lower_dict_ranges,_alpha_upper_dict_ranges:this._alpha_upper_dict_ranges,_alphanum_dict_ranges:this._alphanum_dict_ranges,_alphanum_lower_dict_ranges:this._alphanum_lower_dict_ranges,_alphanum_upper_dict_ranges:this._alphanum_upper_dict_ranges,_hex_dict_ranges:this._hex_dict_ranges}),__publicField(this,\"log\",((...s)=>{const o=[...s];o[0]=\"[short-unique-id] \".concat(s[0]),!0!==this.debug||\"undefined\"==typeof console||null===console||console.log(...o)})),__publicField(this,\"_normalizeDictionary\",((s,o)=>{let i;if(s&&Array.isArray(s)&&s.length>1)i=s;else{i=[],this.dictIndex=0;const o=\"_\".concat(s,\"_dict_ranges\"),a=this._dict_ranges[o];let u=0;for(const[,s]of Object.entries(a)){const[o,i]=s;u+=Math.abs(i-o)}i=new Array(u);let _=0;for(const[,s]of Object.entries(a)){this.dictRange=s,this.lowerBound=this.dictRange[0],this.upperBound=this.dictRange[1];const o=this.lowerBound<=this.upperBound,a=this.lowerBound,u=this.upperBound;if(o)for(let s=a;s<u;s++)i[_++]=String.fromCharCode(s),this.dictIndex=s;else for(let s=a;s>u;s--)i[_++]=String.fromCharCode(s),this.dictIndex=s}i.length=_}if(o){for(let s=i.length-1;s>0;s--){const o=Math.floor(Math.random()*(s+1));[i[s],i[o]]=[i[o],i[s]]}}return i})),__publicField(this,\"setDictionary\",((s,o)=>{this.dict=this._normalizeDictionary(s,o),this.dictLength=this.dict.length,this.setCounter(0)})),__publicField(this,\"seq\",(()=>this.sequentialUUID())),__publicField(this,\"sequentialUUID\",(()=>{const s=this.dictLength,o=this.dict;let i=this.counter;const a=[];do{const u=i%s;i=Math.trunc(i/s),a.push(o[u])}while(0!==i);const u=a.join(\"\");return this.counter+=1,u})),__publicField(this,\"rnd\",((s=this.uuidLength||x)=>this.randomUUID(s))),__publicField(this,\"randomUUID\",((s=this.uuidLength||x)=>{if(null==s||s<1)throw new Error(\"Invalid UUID Length Provided\");const o=new Array(s),i=this.dictLength,a=this.dict;for(let u=0;u<s;u++){const s=Math.floor(Math.random()*i);o[u]=a[s]}return o.join(\"\")})),__publicField(this,\"fmt\",((s,o)=>this.formattedUUID(s,o))),__publicField(this,\"formattedUUID\",((s,o)=>{const i={$r:this.randomUUID,$s:this.sequentialUUID,$t:this.stamp};return s.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const a=s.slice(0,2),u=Number.parseInt(s.slice(2),10);return\"$s\"===a?i[a]().padStart(u,\"0\"):\"$t\"===a&&o?i[a](u,o):i[a](u)}))})),__publicField(this,\"availableUUIDs\",((s=this.uuidLength)=>Number.parseFloat(([...new Set(this.dict)].length**s).toFixed(0)))),__publicField(this,\"_collisionCache\",new Map),__publicField(this,\"approxMaxBeforeCollision\",((s=this.availableUUIDs(this.uuidLength))=>{const o=s,i=this._collisionCache.get(o);if(void 0!==i)return i;const a=Number.parseFloat(Math.sqrt(Math.PI/2*s).toFixed(20));return this._collisionCache.set(o,a),a})),__publicField(this,\"collisionProbability\",((s=this.availableUUIDs(this.uuidLength),o=this.uuidLength)=>Number.parseFloat((this.approxMaxBeforeCollision(s)/this.availableUUIDs(o)).toFixed(20)))),__publicField(this,\"uniqueness\",((s=this.availableUUIDs(this.uuidLength))=>{const o=Number.parseFloat((1-this.approxMaxBeforeCollision(s)/s).toFixed(20));return o>1?1:o<0?0:o})),__publicField(this,\"getVersion\",(()=>this.version)),__publicField(this,\"stamp\",((s,o)=>{const i=Math.floor(+(o||new Date)/1e3).toString(16);if(\"number\"==typeof s&&0===s)return i;if(\"number\"!=typeof s||s<10)throw new Error([\"Param finalLength must be a number greater than or equal to 10,\",\"or 0 if you want the raw hexadecimal timestamp\"].join(\"\\n\"));const a=s-9,u=Math.round(Math.random()*(a>15?15:a)),_=this.randomUUID(a);return\"\".concat(_.substring(0,u)).concat(i).concat(_.substring(u)).concat(u.toString(16))})),__publicField(this,\"parseStamp\",((s,o)=>{if(o&&!/t0|t[1-9]\\d{1,}/.test(o))throw new Error(\"Cannot extract date from a formated UUID with no timestamp in the format\");const i=o?o.replace(/\\$[rs]\\d{0,}|\\$t0|\\$t[1-9]\\d{1,}/g,(s=>{const o={$r:s=>[...Array(s)].map((()=>\"r\")).join(\"\"),$s:s=>[...Array(s)].map((()=>\"s\")).join(\"\"),$t:s=>[...Array(s)].map((()=>\"t\")).join(\"\")},i=s.slice(0,2),a=Number.parseInt(s.slice(2),10);return o[i](a)})).replace(/^(.*?)(t{8,})(.*)$/g,((o,i,a)=>s.substring(i.length,i.length+a.length))):s;if(8===i.length)return new Date(1e3*Number.parseInt(i,16));if(i.length<10)throw new Error(\"Stamp length invalid\");const a=Number.parseInt(i.substring(i.length-1),16);return new Date(1e3*Number.parseInt(i.substring(a,a+8),16))})),__publicField(this,\"setCounter\",(s=>{this.counter=s})),__publicField(this,\"validate\",((s,o)=>{const i=o?this._normalizeDictionary(o):this.dict;return s.split(\"\").every((s=>i.includes(s)))}));const o=__spreadValues(__spreadValues({},C),s);this.counter=0,this.debug=!1,this.dict=[],this.version=\"5.3.2\";const{dictionary:i,shuffle:a,length:u,counter:_}=o;this.uuidLength=u,this.setDictionary(i,a),this.setCounter(_),this.debug=o.debug,this.log(this.dict),this.log(\"Generator instantiated with Dictionary Size \".concat(this.dictLength,\" and counter set to \").concat(this.counter)),this.log=this.log.bind(this),this.setDictionary=this.setDictionary.bind(this),this.setCounter=this.setCounter.bind(this),this.seq=this.seq.bind(this),this.sequentialUUID=this.sequentialUUID.bind(this),this.rnd=this.rnd.bind(this),this.randomUUID=this.randomUUID.bind(this),this.fmt=this.fmt.bind(this),this.formattedUUID=this.formattedUUID.bind(this),this.availableUUIDs=this.availableUUIDs.bind(this),this.approxMaxBeforeCollision=this.approxMaxBeforeCollision.bind(this),this.collisionProbability=this.collisionProbability.bind(this),this.uniqueness=this.uniqueness.bind(this),this.getVersion=this.getVersion.bind(this),this.stamp=this.stamp.bind(this),this.parseStamp=this.parseStamp.bind(this)}};__publicField(j,\"default\",j);var L,B=j;return L=w,((a,_,w,x)=>{if(_&&\"object\"==typeof _||\"function\"==typeof _)for(let C of i(_))u.call(a,C)||C===w||s(a,C,{get:()=>_[C],enumerable:!(x=o(_,C))||x.enumerable});return a})(s({},\"__esModule\",{value:!0}),L)})();s.exports=o.default,\"undefined\"!=typeof window&&(o=o.default)},9325:(s,o,i)=>{var a=i(34840),u=\"object\"==typeof self&&self&&self.Object===Object&&self,_=a||u||Function(\"return this\")();s.exports=_},9404:function(s){s.exports=function(){\"use strict\";var s=Array.prototype.slice;function createClass(s,o){o&&(s.prototype=Object.create(o.prototype)),s.prototype.constructor=s}function Iterable(s){return isIterable(s)?s:Seq(s)}function KeyedIterable(s){return isKeyed(s)?s:KeyedSeq(s)}function IndexedIterable(s){return isIndexed(s)?s:IndexedSeq(s)}function SetIterable(s){return isIterable(s)&&!isAssociative(s)?s:SetSeq(s)}function isIterable(s){return!(!s||!s[o])}function isKeyed(s){return!(!s||!s[i])}function isIndexed(s){return!(!s||!s[a])}function isAssociative(s){return isKeyed(s)||isIndexed(s)}function isOrdered(s){return!(!s||!s[u])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var o=\"@@__IMMUTABLE_ITERABLE__@@\",i=\"@@__IMMUTABLE_KEYED__@@\",a=\"@@__IMMUTABLE_INDEXED__@@\",u=\"@@__IMMUTABLE_ORDERED__@@\",_=\"delete\",w=5,x=1<<w,C=x-1,j={},L={value:!1},B={value:!1};function MakeRef(s){return s.value=!1,s}function SetRef(s){s&&(s.value=!0)}function OwnerID(){}function arrCopy(s,o){o=o||0;for(var i=Math.max(0,s.length-o),a=new Array(i),u=0;u<i;u++)a[u]=s[u+o];return a}function ensureSize(s){return void 0===s.size&&(s.size=s.__iterate(returnTrue)),s.size}function wrapIndex(s,o){if(\"number\"!=typeof o){var i=o>>>0;if(\"\"+i!==o||4294967295===i)return NaN;o=i}return o<0?ensureSize(s)+o:o}function returnTrue(){return!0}function wholeSlice(s,o,i){return(0===s||void 0!==i&&s<=-i)&&(void 0===o||void 0!==i&&o>=i)}function resolveBegin(s,o){return resolveIndex(s,o,0)}function resolveEnd(s,o){return resolveIndex(s,o,o)}function resolveIndex(s,o,i){return void 0===s?i:s<0?Math.max(0,o+s):void 0===o?s:Math.min(o,s)}var $=0,V=1,U=2,z=\"function\"==typeof Symbol&&Symbol.iterator,Y=\"@@iterator\",Z=z||Y;function Iterator(s){this.next=s}function iteratorValue(s,o,i,a){var u=0===s?o:1===s?i:[o,i];return a?a.value=u:a={value:u,done:!1},a}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(s){return!!getIteratorFn(s)}function isIterator(s){return s&&\"function\"==typeof s.next}function getIterator(s){var o=getIteratorFn(s);return o&&o.call(s)}function getIteratorFn(s){var o=s&&(z&&s[z]||s[Y]);if(\"function\"==typeof o)return o}function isArrayLike(s){return s&&\"number\"==typeof s.length}function Seq(s){return null==s?emptySequence():isIterable(s)?s.toSeq():seqFromValue(s)}function KeyedSeq(s){return null==s?emptySequence().toKeyedSeq():isIterable(s)?isKeyed(s)?s.toSeq():s.fromEntrySeq():keyedSeqFromValue(s)}function IndexedSeq(s){return null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s.toIndexedSeq():indexedSeqFromValue(s)}function SetSeq(s){return(null==s?emptySequence():isIterable(s)?isKeyed(s)?s.entrySeq():s:indexedSeqFromValue(s)).toSetSeq()}Iterator.prototype.toString=function(){return\"[Iterator]\"},Iterator.KEYS=$,Iterator.VALUES=V,Iterator.ENTRIES=U,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[Z]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(s,o){return seqIterate(this,s,o,!0)},Seq.prototype.__iterator=function(s,o){return seqIterator(this,s,o,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\")},IndexedSeq.prototype.__iterate=function(s,o){return seqIterate(this,s,o,!1)},IndexedSeq.prototype.__iterator=function(s,o){return seqIterator(this,s,o,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var ee,ie,ae,ce=\"@@__IMMUTABLE_SEQ__@@\";function ArraySeq(s){this._array=s,this.size=s.length}function ObjectSeq(s){var o=Object.keys(s);this._object=s,this._keys=o,this.size=o.length}function IterableSeq(s){this._iterable=s,this.size=s.length||s.size}function IteratorSeq(s){this._iterator=s,this._iteratorCache=[]}function isSeq(s){return!(!s||!s[ce])}function emptySequence(){return ee||(ee=new ArraySeq([]))}function keyedSeqFromValue(s){var o=Array.isArray(s)?new ArraySeq(s).fromEntrySeq():isIterator(s)?new IteratorSeq(s).fromEntrySeq():hasIterator(s)?new IterableSeq(s).fromEntrySeq():\"object\"==typeof s?new ObjectSeq(s):void 0;if(!o)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+s);return o}function indexedSeqFromValue(s){var o=maybeIndexedSeqFromValue(s);if(!o)throw new TypeError(\"Expected Array or iterable object of values: \"+s);return o}function seqFromValue(s){var o=maybeIndexedSeqFromValue(s)||\"object\"==typeof s&&new ObjectSeq(s);if(!o)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+s);return o}function maybeIndexedSeqFromValue(s){return isArrayLike(s)?new ArraySeq(s):isIterator(s)?new IteratorSeq(s):hasIterator(s)?new IterableSeq(s):void 0}function seqIterate(s,o,i,a){var u=s._cache;if(u){for(var _=u.length-1,w=0;w<=_;w++){var x=u[i?_-w:w];if(!1===o(x[1],a?x[0]:w,s))return w+1}return w}return s.__iterateUncached(o,i)}function seqIterator(s,o,i,a){var u=s._cache;if(u){var _=u.length-1,w=0;return new Iterator((function(){var s=u[i?_-w:w];return w++>_?iteratorDone():iteratorValue(o,a?s[0]:w-1,s[1])}))}return s.__iteratorUncached(o,i)}function fromJS(s,o){return o?fromJSWith(o,s,\"\",{\"\":s}):fromJSDefault(s)}function fromJSWith(s,o,i,a){return Array.isArray(o)?s.call(a,i,IndexedSeq(o).map((function(i,a){return fromJSWith(s,i,a,o)}))):isPlainObj(o)?s.call(a,i,KeyedSeq(o).map((function(i,a){return fromJSWith(s,i,a,o)}))):o}function fromJSDefault(s){return Array.isArray(s)?IndexedSeq(s).map(fromJSDefault).toList():isPlainObj(s)?KeyedSeq(s).map(fromJSDefault).toMap():s}function isPlainObj(s){return s&&(s.constructor===Object||void 0===s.constructor)}function is(s,o){if(s===o||s!=s&&o!=o)return!0;if(!s||!o)return!1;if(\"function\"==typeof s.valueOf&&\"function\"==typeof o.valueOf){if((s=s.valueOf())===(o=o.valueOf())||s!=s&&o!=o)return!0;if(!s||!o)return!1}return!(\"function\"!=typeof s.equals||\"function\"!=typeof o.equals||!s.equals(o))}function deepEqual(s,o){if(s===o)return!0;if(!isIterable(o)||void 0!==s.size&&void 0!==o.size&&s.size!==o.size||void 0!==s.__hash&&void 0!==o.__hash&&s.__hash!==o.__hash||isKeyed(s)!==isKeyed(o)||isIndexed(s)!==isIndexed(o)||isOrdered(s)!==isOrdered(o))return!1;if(0===s.size&&0===o.size)return!0;var i=!isAssociative(s);if(isOrdered(s)){var a=s.entries();return o.every((function(s,o){var u=a.next().value;return u&&is(u[1],s)&&(i||is(u[0],o))}))&&a.next().done}var u=!1;if(void 0===s.size)if(void 0===o.size)\"function\"==typeof s.cacheResult&&s.cacheResult();else{u=!0;var _=s;s=o,o=_}var w=!0,x=o.__iterate((function(o,a){if(i?!s.has(o):u?!is(o,s.get(a,j)):!is(s.get(a,j),o))return w=!1,!1}));return w&&s.size===x}function Repeat(s,o){if(!(this instanceof Repeat))return new Repeat(s,o);if(this._value=s,this.size=void 0===o?1/0:Math.max(0,o),0===this.size){if(ie)return ie;ie=this}}function invariant(s,o){if(!s)throw new Error(o)}function Range(s,o,i){if(!(this instanceof Range))return new Range(s,o,i);if(invariant(0!==i,\"Cannot step a Range by 0\"),s=s||0,void 0===o&&(o=1/0),i=void 0===i?1:Math.abs(i),o<s&&(i=-i),this._start=s,this._end=o,this._step=i,this.size=Math.max(0,Math.ceil((o-s)/i-1)+1),0===this.size){if(ae)return ae;ae=this}}function Collection(){throw TypeError(\"Abstract\")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[ce]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(s,o){return this.has(s)?this._array[wrapIndex(this,s)]:o},ArraySeq.prototype.__iterate=function(s,o){for(var i=this._array,a=i.length-1,u=0;u<=a;u++)if(!1===s(i[o?a-u:u],u,this))return u+1;return u},ArraySeq.prototype.__iterator=function(s,o){var i=this._array,a=i.length-1,u=0;return new Iterator((function(){return u>a?iteratorDone():iteratorValue(s,u,i[o?a-u++:u++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(s,o){return void 0===o||this.has(s)?this._object[s]:o},ObjectSeq.prototype.has=function(s){return this._object.hasOwnProperty(s)},ObjectSeq.prototype.__iterate=function(s,o){for(var i=this._object,a=this._keys,u=a.length-1,_=0;_<=u;_++){var w=a[o?u-_:_];if(!1===s(i[w],w,this))return _+1}return _},ObjectSeq.prototype.__iterator=function(s,o){var i=this._object,a=this._keys,u=a.length-1,_=0;return new Iterator((function(){var w=a[o?u-_:_];return _++>u?iteratorDone():iteratorValue(s,w,i[w])}))},ObjectSeq.prototype[u]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(s,o){if(o)return this.cacheResult().__iterate(s,o);var i=getIterator(this._iterable),a=0;if(isIterator(i))for(var u;!(u=i.next()).done&&!1!==s(u.value,a++,this););return a},IterableSeq.prototype.__iteratorUncached=function(s,o){if(o)return this.cacheResult().__iterator(s,o);var i=getIterator(this._iterable);if(!isIterator(i))return new Iterator(iteratorDone);var a=0;return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,a++,o.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(s,o){if(o)return this.cacheResult().__iterate(s,o);for(var i,a=this._iterator,u=this._iteratorCache,_=0;_<u.length;)if(!1===s(u[_],_++,this))return _;for(;!(i=a.next()).done;){var w=i.value;if(u[_]=w,!1===s(w,_++,this))break}return _},IteratorSeq.prototype.__iteratorUncached=function(s,o){if(o)return this.cacheResult().__iterator(s,o);var i=this._iterator,a=this._iteratorCache,u=0;return new Iterator((function(){if(u>=a.length){var o=i.next();if(o.done)return o;a[u]=o.value}return iteratorValue(s,u,a[u++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},Repeat.prototype.get=function(s,o){return this.has(s)?this._value:o},Repeat.prototype.includes=function(s){return is(this._value,s)},Repeat.prototype.slice=function(s,o){var i=this.size;return wholeSlice(s,o,i)?this:new Repeat(this._value,resolveEnd(o,i)-resolveBegin(s,i))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(s){return is(this._value,s)?0:-1},Repeat.prototype.lastIndexOf=function(s){return is(this._value,s)?this.size:-1},Repeat.prototype.__iterate=function(s,o){for(var i=0;i<this.size;i++)if(!1===s(this._value,i,this))return i+1;return i},Repeat.prototype.__iterator=function(s,o){var i=this,a=0;return new Iterator((function(){return a<i.size?iteratorValue(s,a++,i._value):iteratorDone()}))},Repeat.prototype.equals=function(s){return s instanceof Repeat?is(this._value,s._value):deepEqual(s)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\"},Range.prototype.get=function(s,o){return this.has(s)?this._start+wrapIndex(this,s)*this._step:o},Range.prototype.includes=function(s){var o=(s-this._start)/this._step;return o>=0&&o<this.size&&o===Math.floor(o)},Range.prototype.slice=function(s,o){return wholeSlice(s,o,this.size)?this:(s=resolveBegin(s,this.size),(o=resolveEnd(o,this.size))<=s?new Range(0,0):new Range(this.get(s,this._end),this.get(o,this._end),this._step))},Range.prototype.indexOf=function(s){var o=s-this._start;if(o%this._step==0){var i=o/this._step;if(i>=0&&i<this.size)return i}return-1},Range.prototype.lastIndexOf=function(s){return this.indexOf(s)},Range.prototype.__iterate=function(s,o){for(var i=this.size-1,a=this._step,u=o?this._start+i*a:this._start,_=0;_<=i;_++){if(!1===s(u,_,this))return _+1;u+=o?-a:a}return _},Range.prototype.__iterator=function(s,o){var i=this.size-1,a=this._step,u=o?this._start+i*a:this._start,_=0;return new Iterator((function(){var w=u;return u+=o?-a:a,_>i?iteratorDone():iteratorValue(s,_++,w)}))},Range.prototype.equals=function(s){return s instanceof Range?this._start===s._start&&this._end===s._end&&this._step===s._step:deepEqual(this,s)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var le=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(s,o){var i=65535&(s|=0),a=65535&(o|=0);return i*a+((s>>>16)*a+i*(o>>>16)<<16>>>0)|0};function smi(s){return s>>>1&1073741824|3221225471&s}function hash(s){if(!1===s||null==s)return 0;if(\"function\"==typeof s.valueOf&&(!1===(s=s.valueOf())||null==s))return 0;if(!0===s)return 1;var o=typeof s;if(\"number\"===o){if(s!=s||s===1/0)return 0;var i=0|s;for(i!==s&&(i^=4294967295*s);s>4294967295;)i^=s/=4294967295;return smi(i)}if(\"string\"===o)return s.length>Se?cachedHashString(s):hashString(s);if(\"function\"==typeof s.hashCode)return s.hashCode();if(\"object\"===o)return hashJSObj(s);if(\"function\"==typeof s.toString)return hashString(s.toString());throw new Error(\"Value type \"+o+\" cannot be hashed.\")}function cachedHashString(s){var o=Pe[s];return void 0===o&&(o=hashString(s),xe===we&&(xe=0,Pe={}),xe++,Pe[s]=o),o}function hashString(s){for(var o=0,i=0;i<s.length;i++)o=31*o+s.charCodeAt(i)|0;return smi(o)}function hashJSObj(s){var o;if(ye&&void 0!==(o=fe.get(s)))return o;if(void 0!==(o=s[_e]))return o;if(!de){if(void 0!==(o=s.propertyIsEnumerable&&s.propertyIsEnumerable[_e]))return o;if(void 0!==(o=getIENodeHash(s)))return o}if(o=++be,1073741824&be&&(be=0),ye)fe.set(s,o);else{if(void 0!==pe&&!1===pe(s))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(de)Object.defineProperty(s,_e,{enumerable:!1,configurable:!1,writable:!1,value:o});else if(void 0!==s.propertyIsEnumerable&&s.propertyIsEnumerable===s.constructor.prototype.propertyIsEnumerable)s.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},s.propertyIsEnumerable[_e]=o;else{if(void 0===s.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");s[_e]=o}}return o}var pe=Object.isExtensible,de=function(){try{return Object.defineProperty({},\"@\",{}),!0}catch(s){return!1}}();function getIENodeHash(s){if(s&&s.nodeType>0)switch(s.nodeType){case 1:return s.uniqueID;case 9:return s.documentElement&&s.documentElement.uniqueID}}var fe,ye=\"function\"==typeof WeakMap;ye&&(fe=new WeakMap);var be=0,_e=\"__immutablehash__\";\"function\"==typeof Symbol&&(_e=Symbol(_e));var Se=16,we=255,xe=0,Pe={};function assertNotInfinite(s){invariant(s!==1/0,\"Cannot perform this action with an infinite size.\")}function Map(s){return null==s?emptyMap():isMap(s)&&!isOrdered(s)?s:emptyMap().withMutations((function(o){var i=KeyedIterable(s);assertNotInfinite(i.size),i.forEach((function(s,i){return o.set(i,s)}))}))}function isMap(s){return!(!s||!s[Re])}createClass(Map,KeyedCollection),Map.of=function(){var o=s.call(arguments,0);return emptyMap().withMutations((function(s){for(var i=0;i<o.length;i+=2){if(i+1>=o.length)throw new Error(\"Missing value for key: \"+o[i]);s.set(o[i],o[i+1])}}))},Map.prototype.toString=function(){return this.__toString(\"Map {\",\"}\")},Map.prototype.get=function(s,o){return this._root?this._root.get(0,void 0,s,o):o},Map.prototype.set=function(s,o){return updateMap(this,s,o)},Map.prototype.setIn=function(s,o){return this.updateIn(s,j,(function(){return o}))},Map.prototype.remove=function(s){return updateMap(this,s,j)},Map.prototype.deleteIn=function(s){return this.updateIn(s,(function(){return j}))},Map.prototype.update=function(s,o,i){return 1===arguments.length?s(this):this.updateIn([s],o,i)},Map.prototype.updateIn=function(s,o,i){i||(i=o,o=void 0);var a=updateInDeepMap(this,forceIterator(s),o,i);return a===j?void 0:a},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(o){return mergeIntoMapWith(this,o,s.call(arguments,1))},Map.prototype.mergeIn=function(o){var i=s.call(arguments,1);return this.updateIn(o,emptyMap(),(function(s){return\"function\"==typeof s.merge?s.merge.apply(s,i):i[i.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(o){var i=s.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(o),i)},Map.prototype.mergeDeepIn=function(o){var i=s.call(arguments,1);return this.updateIn(o,emptyMap(),(function(s){return\"function\"==typeof s.mergeDeep?s.mergeDeep.apply(s,i):i[i.length-1]}))},Map.prototype.sort=function(s){return OrderedMap(sortFactory(this,s))},Map.prototype.sortBy=function(s,o){return OrderedMap(sortFactory(this,o,s))},Map.prototype.withMutations=function(s){var o=this.asMutable();return s(o),o.wasAltered()?o.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(s,o){return new MapIterator(this,s,o)},Map.prototype.__iterate=function(s,o){var i=this,a=0;return this._root&&this._root.iterate((function(o){return a++,s(o[1],o[0],i)}),o),a},Map.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeMap(this.size,this._root,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Map.isMap=isMap;var Te,Re=\"@@__IMMUTABLE_MAP__@@\",$e=Map.prototype;function ArrayMapNode(s,o){this.ownerID=s,this.entries=o}function BitmapIndexedNode(s,o,i){this.ownerID=s,this.bitmap=o,this.nodes=i}function HashArrayMapNode(s,o,i){this.ownerID=s,this.count=o,this.nodes=i}function HashCollisionNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entries=i}function ValueNode(s,o,i){this.ownerID=s,this.keyHash=o,this.entry=i}function MapIterator(s,o,i){this._type=o,this._reverse=i,this._stack=s._root&&mapIteratorFrame(s._root)}function mapIteratorValue(s,o){return iteratorValue(s,o[0],o[1])}function mapIteratorFrame(s,o){return{node:s,index:0,__prev:o}}function makeMap(s,o,i,a){var u=Object.create($e);return u.size=s,u._root=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyMap(){return Te||(Te=makeMap(0))}function updateMap(s,o,i){var a,u;if(s._root){var _=MakeRef(L),w=MakeRef(B);if(a=updateNode(s._root,s.__ownerID,0,void 0,o,i,_,w),!w.value)return s;u=s.size+(_.value?i===j?-1:1:0)}else{if(i===j)return s;u=1,a=new ArrayMapNode(s.__ownerID,[[o,i]])}return s.__ownerID?(s.size=u,s._root=a,s.__hash=void 0,s.__altered=!0,s):a?makeMap(u,a):emptyMap()}function updateNode(s,o,i,a,u,_,w,x){return s?s.update(o,i,a,u,_,w,x):_===j?s:(SetRef(x),SetRef(w),new ValueNode(o,a,[u,_]))}function isLeafNode(s){return s.constructor===ValueNode||s.constructor===HashCollisionNode}function mergeIntoNode(s,o,i,a,u){if(s.keyHash===a)return new HashCollisionNode(o,a,[s.entry,u]);var _,x=(0===i?s.keyHash:s.keyHash>>>i)&C,j=(0===i?a:a>>>i)&C;return new BitmapIndexedNode(o,1<<x|1<<j,x===j?[mergeIntoNode(s,o,i+w,a,u)]:(_=new ValueNode(o,a,u),x<j?[s,_]:[_,s]))}function createNodes(s,o,i,a){s||(s=new OwnerID);for(var u=new ValueNode(s,hash(i),[i,a]),_=0;_<o.length;_++){var w=o[_];u=u.update(s,0,void 0,w[0],w[1])}return u}function packNodes(s,o,i,a){for(var u=0,_=0,w=new Array(i),x=0,C=1,j=o.length;x<j;x++,C<<=1){var L=o[x];void 0!==L&&x!==a&&(u|=C,w[_++]=L)}return new BitmapIndexedNode(s,u,w)}function expandNodes(s,o,i,a,u){for(var _=0,w=new Array(x),C=0;0!==i;C++,i>>>=1)w[C]=1&i?o[_++]:void 0;return w[a]=u,new HashArrayMapNode(s,_+1,w)}function mergeIntoMapWith(s,o,i){for(var a=[],u=0;u<i.length;u++){var _=i[u],w=KeyedIterable(_);isIterable(_)||(w=w.map((function(s){return fromJS(s)}))),a.push(w)}return mergeIntoCollectionWith(s,o,a)}function deepMerger(s,o,i){return s&&s.mergeDeep&&isIterable(o)?s.mergeDeep(o):is(s,o)?s:o}function deepMergerWith(s){return function(o,i,a){if(o&&o.mergeDeepWith&&isIterable(i))return o.mergeDeepWith(s,i);var u=s(o,i,a);return is(o,u)?o:u}}function mergeIntoCollectionWith(s,o,i){return 0===(i=i.filter((function(s){return 0!==s.size}))).length?s:0!==s.size||s.__ownerID||1!==i.length?s.withMutations((function(s){for(var a=o?function(i,a){s.update(a,j,(function(s){return s===j?i:o(s,i,a)}))}:function(o,i){s.set(i,o)},u=0;u<i.length;u++)i[u].forEach(a)})):s.constructor(i[0])}function updateInDeepMap(s,o,i,a){var u=s===j,_=o.next();if(_.done){var w=u?i:s,x=a(w);return x===w?s:x}invariant(u||s&&s.set,\"invalid keyPath\");var C=_.value,L=u?j:s.get(C,j),B=updateInDeepMap(L,o,i,a);return B===L?s:B===j?s.remove(C):(u?emptyMap():s).set(C,B)}function popCount(s){return s=(s=(858993459&(s-=s>>1&1431655765))+(s>>2&858993459))+(s>>4)&252645135,s+=s>>8,127&(s+=s>>16)}function setIn(s,o,i,a){var u=a?s:arrCopy(s);return u[o]=i,u}function spliceIn(s,o,i,a){var u=s.length+1;if(a&&o+1===u)return s[o]=i,s;for(var _=new Array(u),w=0,x=0;x<u;x++)x===o?(_[x]=i,w=-1):_[x]=s[x+w];return _}function spliceOut(s,o,i){var a=s.length-1;if(i&&o===a)return s.pop(),s;for(var u=new Array(a),_=0,w=0;w<a;w++)w===o&&(_=1),u[w]=s[w+_];return u}$e[Re]=!0,$e[_]=$e.remove,$e.removeIn=$e.deleteIn,ArrayMapNode.prototype.get=function(s,o,i,a){for(var u=this.entries,_=0,w=u.length;_<w;_++)if(is(i,u[_][0]))return u[_][1];return a},ArrayMapNode.prototype.update=function(s,o,i,a,u,_,w){for(var x=u===j,C=this.entries,L=0,B=C.length;L<B&&!is(a,C[L][0]);L++);var $=L<B;if($?C[L][1]===u:x)return this;if(SetRef(w),(x||!$)&&SetRef(_),!x||1!==C.length){if(!$&&!x&&C.length>=qe)return createNodes(s,C,a,u);var V=s&&s===this.ownerID,U=V?C:arrCopy(C);return $?x?L===B-1?U.pop():U[L]=U.pop():U[L]=[a,u]:U.push([a,u]),V?(this.entries=U,this):new ArrayMapNode(s,U)}},BitmapIndexedNode.prototype.get=function(s,o,i,a){void 0===o&&(o=hash(i));var u=1<<((0===s?o:o>>>s)&C),_=this.bitmap;return _&u?this.nodes[popCount(_&u-1)].get(s+w,o,i,a):a},BitmapIndexedNode.prototype.update=function(s,o,i,a,u,_,x){void 0===i&&(i=hash(a));var L=(0===o?i:i>>>o)&C,B=1<<L,$=this.bitmap,V=!!($&B);if(!V&&u===j)return this;var U=popCount($&B-1),z=this.nodes,Y=V?z[U]:void 0,Z=updateNode(Y,s,o+w,i,a,u,_,x);if(Z===Y)return this;if(!V&&Z&&z.length>=ze)return expandNodes(s,z,$,L,Z);if(V&&!Z&&2===z.length&&isLeafNode(z[1^U]))return z[1^U];if(V&&Z&&1===z.length&&isLeafNode(Z))return Z;var ee=s&&s===this.ownerID,ie=V?Z?$:$^B:$|B,ae=V?Z?setIn(z,U,Z,ee):spliceOut(z,U,ee):spliceIn(z,U,Z,ee);return ee?(this.bitmap=ie,this.nodes=ae,this):new BitmapIndexedNode(s,ie,ae)},HashArrayMapNode.prototype.get=function(s,o,i,a){void 0===o&&(o=hash(i));var u=(0===s?o:o>>>s)&C,_=this.nodes[u];return _?_.get(s+w,o,i,a):a},HashArrayMapNode.prototype.update=function(s,o,i,a,u,_,x){void 0===i&&(i=hash(a));var L=(0===o?i:i>>>o)&C,B=u===j,$=this.nodes,V=$[L];if(B&&!V)return this;var U=updateNode(V,s,o+w,i,a,u,_,x);if(U===V)return this;var z=this.count;if(V){if(!U&&--z<We)return packNodes(s,$,z,L)}else z++;var Y=s&&s===this.ownerID,Z=setIn($,L,U,Y);return Y?(this.count=z,this.nodes=Z,this):new HashArrayMapNode(s,z,Z)},HashCollisionNode.prototype.get=function(s,o,i,a){for(var u=this.entries,_=0,w=u.length;_<w;_++)if(is(i,u[_][0]))return u[_][1];return a},HashCollisionNode.prototype.update=function(s,o,i,a,u,_,w){void 0===i&&(i=hash(a));var x=u===j;if(i!==this.keyHash)return x?this:(SetRef(w),SetRef(_),mergeIntoNode(this,s,o,i,[a,u]));for(var C=this.entries,L=0,B=C.length;L<B&&!is(a,C[L][0]);L++);var $=L<B;if($?C[L][1]===u:x)return this;if(SetRef(w),(x||!$)&&SetRef(_),x&&2===B)return new ValueNode(s,this.keyHash,C[1^L]);var V=s&&s===this.ownerID,U=V?C:arrCopy(C);return $?x?L===B-1?U.pop():U[L]=U.pop():U[L]=[a,u]:U.push([a,u]),V?(this.entries=U,this):new HashCollisionNode(s,this.keyHash,U)},ValueNode.prototype.get=function(s,o,i,a){return is(i,this.entry[0])?this.entry[1]:a},ValueNode.prototype.update=function(s,o,i,a,u,_,w){var x=u===j,C=is(a,this.entry[0]);return(C?u===this.entry[1]:x)?this:(SetRef(w),x?void SetRef(_):C?s&&s===this.ownerID?(this.entry[1]=u,this):new ValueNode(s,this.keyHash,[a,u]):(SetRef(_),mergeIntoNode(this,s,o,hash(a),[a,u])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(s,o){for(var i=this.entries,a=0,u=i.length-1;a<=u;a++)if(!1===s(i[o?u-a:a]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(s,o){for(var i=this.nodes,a=0,u=i.length-1;a<=u;a++){var _=i[o?u-a:a];if(_&&!1===_.iterate(s,o))return!1}},ValueNode.prototype.iterate=function(s,o){return s(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var s=this._type,o=this._stack;o;){var i,a=o.node,u=o.index++;if(a.entry){if(0===u)return mapIteratorValue(s,a.entry)}else if(a.entries){if(u<=(i=a.entries.length-1))return mapIteratorValue(s,a.entries[this._reverse?i-u:u])}else if(u<=(i=a.nodes.length-1)){var _=a.nodes[this._reverse?i-u:u];if(_){if(_.entry)return mapIteratorValue(s,_.entry);o=this._stack=mapIteratorFrame(_,o)}continue}o=this._stack=this._stack.__prev}return iteratorDone()};var qe=x/4,ze=x/2,We=x/4;function List(s){var o=emptyList();if(null==s)return o;if(isList(s))return s;var i=IndexedIterable(s),a=i.size;return 0===a?o:(assertNotInfinite(a),a>0&&a<x?makeList(0,a,w,null,new VNode(i.toArray())):o.withMutations((function(s){s.setSize(a),i.forEach((function(o,i){return s.set(i,o)}))})))}function isList(s){return!(!s||!s[He])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString(\"List [\",\"]\")},List.prototype.get=function(s,o){if((s=wrapIndex(this,s))>=0&&s<this.size){var i=listNodeFor(this,s+=this._origin);return i&&i.array[s&C]}return o},List.prototype.set=function(s,o){return updateList(this,s,o)},List.prototype.remove=function(s){return this.has(s)?0===s?this.shift():s===this.size-1?this.pop():this.splice(s,1):this},List.prototype.insert=function(s,o){return this.splice(s,0,o)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=w,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var s=arguments,o=this.size;return this.withMutations((function(i){setListBounds(i,0,o+s.length);for(var a=0;a<s.length;a++)i.set(o+a,s[a])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var s=arguments;return this.withMutations((function(o){setListBounds(o,-s.length);for(var i=0;i<s.length;i++)o.set(i,s[i])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(o){return mergeIntoListWith(this,o,s.call(arguments,1))},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(o){var i=s.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(o),i)},List.prototype.setSize=function(s){return setListBounds(this,0,s)},List.prototype.slice=function(s,o){var i=this.size;return wholeSlice(s,o,i)?this:setListBounds(this,resolveBegin(s,i),resolveEnd(o,i))},List.prototype.__iterator=function(s,o){var i=0,a=iterateList(this,o);return new Iterator((function(){var o=a();return o===et?iteratorDone():iteratorValue(s,i++,o)}))},List.prototype.__iterate=function(s,o){for(var i,a=0,u=iterateList(this,o);(i=u())!==et&&!1!==s(i,a++,this););return a},List.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeList(this._origin,this._capacity,this._level,this._root,this._tail,s,this.__hash):(this.__ownerID=s,this)},List.isList=isList;var He=\"@@__IMMUTABLE_LIST__@@\",Ye=List.prototype;function VNode(s,o){this.array=s,this.ownerID=o}Ye[He]=!0,Ye[_]=Ye.remove,Ye.setIn=$e.setIn,Ye.deleteIn=Ye.removeIn=$e.removeIn,Ye.update=$e.update,Ye.updateIn=$e.updateIn,Ye.mergeIn=$e.mergeIn,Ye.mergeDeepIn=$e.mergeDeepIn,Ye.withMutations=$e.withMutations,Ye.asMutable=$e.asMutable,Ye.asImmutable=$e.asImmutable,Ye.wasAltered=$e.wasAltered,VNode.prototype.removeBefore=function(s,o,i){if(i===o?1<<o:0===this.array.length)return this;var a=i>>>o&C;if(a>=this.array.length)return new VNode([],s);var u,_=0===a;if(o>0){var x=this.array[a];if((u=x&&x.removeBefore(s,o-w,i))===x&&_)return this}if(_&&!u)return this;var j=editableVNode(this,s);if(!_)for(var L=0;L<a;L++)j.array[L]=void 0;return u&&(j.array[a]=u),j},VNode.prototype.removeAfter=function(s,o,i){if(i===(o?1<<o:0)||0===this.array.length)return this;var a,u=i-1>>>o&C;if(u>=this.array.length)return this;if(o>0){var _=this.array[u];if((a=_&&_.removeAfter(s,o-w,i))===_&&u===this.array.length-1)return this}var x=editableVNode(this,s);return x.array.splice(u+1),a&&(x.array[u]=a),x};var Xe,Qe,et={};function iterateList(s,o){var i=s._origin,a=s._capacity,u=getTailOffset(a),_=s._tail;return iterateNodeOrLeaf(s._root,s._level,0);function iterateNodeOrLeaf(s,o,i){return 0===o?iterateLeaf(s,i):iterateNode(s,o,i)}function iterateLeaf(s,w){var C=w===u?_&&_.array:s&&s.array,j=w>i?0:i-w,L=a-w;return L>x&&(L=x),function(){if(j===L)return et;var s=o?--L:j++;return C&&C[s]}}function iterateNode(s,u,_){var C,j=s&&s.array,L=_>i?0:i-_>>u,B=1+(a-_>>u);return B>x&&(B=x),function(){for(;;){if(C){var s=C();if(s!==et)return s;C=null}if(L===B)return et;var i=o?--B:L++;C=iterateNodeOrLeaf(j&&j[i],u-w,_+(i<<u))}}}}function makeList(s,o,i,a,u,_,w){var x=Object.create(Ye);return x.size=o-s,x._origin=s,x._capacity=o,x._level=i,x._root=a,x._tail=u,x.__ownerID=_,x.__hash=w,x.__altered=!1,x}function emptyList(){return Xe||(Xe=makeList(0,0,w))}function updateList(s,o,i){if((o=wrapIndex(s,o))!=o)return s;if(o>=s.size||o<0)return s.withMutations((function(s){o<0?setListBounds(s,o).set(0,i):setListBounds(s,0,o+1).set(o,i)}));o+=s._origin;var a=s._tail,u=s._root,_=MakeRef(B);return o>=getTailOffset(s._capacity)?a=updateVNode(a,s.__ownerID,0,o,i,_):u=updateVNode(u,s.__ownerID,s._level,o,i,_),_.value?s.__ownerID?(s._root=u,s._tail=a,s.__hash=void 0,s.__altered=!0,s):makeList(s._origin,s._capacity,s._level,u,a):s}function updateVNode(s,o,i,a,u,_){var x,j=a>>>i&C,L=s&&j<s.array.length;if(!L&&void 0===u)return s;if(i>0){var B=s&&s.array[j],$=updateVNode(B,o,i-w,a,u,_);return $===B?s:((x=editableVNode(s,o)).array[j]=$,x)}return L&&s.array[j]===u?s:(SetRef(_),x=editableVNode(s,o),void 0===u&&j===x.array.length-1?x.array.pop():x.array[j]=u,x)}function editableVNode(s,o){return o&&s&&o===s.ownerID?s:new VNode(s?s.array.slice():[],o)}function listNodeFor(s,o){if(o>=getTailOffset(s._capacity))return s._tail;if(o<1<<s._level+w){for(var i=s._root,a=s._level;i&&a>0;)i=i.array[o>>>a&C],a-=w;return i}}function setListBounds(s,o,i){void 0!==o&&(o|=0),void 0!==i&&(i|=0);var a=s.__ownerID||new OwnerID,u=s._origin,_=s._capacity,x=u+o,j=void 0===i?_:i<0?_+i:u+i;if(x===u&&j===_)return s;if(x>=j)return s.clear();for(var L=s._level,B=s._root,$=0;x+$<0;)B=new VNode(B&&B.array.length?[void 0,B]:[],a),$+=1<<(L+=w);$&&(x+=$,u+=$,j+=$,_+=$);for(var V=getTailOffset(_),U=getTailOffset(j);U>=1<<L+w;)B=new VNode(B&&B.array.length?[B]:[],a),L+=w;var z=s._tail,Y=U<V?listNodeFor(s,j-1):U>V?new VNode([],a):z;if(z&&U>V&&x<_&&z.array.length){for(var Z=B=editableVNode(B,a),ee=L;ee>w;ee-=w){var ie=V>>>ee&C;Z=Z.array[ie]=editableVNode(Z.array[ie],a)}Z.array[V>>>w&C]=z}if(j<_&&(Y=Y&&Y.removeAfter(a,0,j)),x>=U)x-=U,j-=U,L=w,B=null,Y=Y&&Y.removeBefore(a,0,x);else if(x>u||U<V){for($=0;B;){var ae=x>>>L&C;if(ae!==U>>>L&C)break;ae&&($+=(1<<L)*ae),L-=w,B=B.array[ae]}B&&x>u&&(B=B.removeBefore(a,L,x-$)),B&&U<V&&(B=B.removeAfter(a,L,U-$)),$&&(x-=$,j-=$)}return s.__ownerID?(s.size=j-x,s._origin=x,s._capacity=j,s._level=L,s._root=B,s._tail=Y,s.__hash=void 0,s.__altered=!0,s):makeList(x,j,L,B,Y)}function mergeIntoListWith(s,o,i){for(var a=[],u=0,_=0;_<i.length;_++){var w=i[_],x=IndexedIterable(w);x.size>u&&(u=x.size),isIterable(w)||(x=x.map((function(s){return fromJS(s)}))),a.push(x)}return u>s.size&&(s=s.setSize(u)),mergeIntoCollectionWith(s,o,a)}function getTailOffset(s){return s<x?0:s-1>>>w<<w}function OrderedMap(s){return null==s?emptyOrderedMap():isOrderedMap(s)?s:emptyOrderedMap().withMutations((function(o){var i=KeyedIterable(s);assertNotInfinite(i.size),i.forEach((function(s,i){return o.set(i,s)}))}))}function isOrderedMap(s){return isMap(s)&&isOrdered(s)}function makeOrderedMap(s,o,i,a){var u=Object.create(OrderedMap.prototype);return u.size=s?s.size:0,u._map=s,u._list=o,u.__ownerID=i,u.__hash=a,u}function emptyOrderedMap(){return Qe||(Qe=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(s,o,i){var a,u,_=s._map,w=s._list,C=_.get(o),L=void 0!==C;if(i===j){if(!L)return s;w.size>=x&&w.size>=2*_.size?(a=(u=w.filter((function(s,o){return void 0!==s&&C!==o}))).toKeyedSeq().map((function(s){return s[0]})).flip().toMap(),s.__ownerID&&(a.__ownerID=u.__ownerID=s.__ownerID)):(a=_.remove(o),u=C===w.size-1?w.pop():w.set(C,void 0))}else if(L){if(i===w.get(C)[1])return s;a=_,u=w.set(C,[o,i])}else a=_.set(o,w.size),u=w.set(w.size,[o,i]);return s.__ownerID?(s.size=a.size,s._map=a,s._list=u,s.__hash=void 0,s):makeOrderedMap(a,u)}function ToKeyedSequence(s,o){this._iter=s,this._useKeys=o,this.size=s.size}function ToIndexedSequence(s){this._iter=s,this.size=s.size}function ToSetSequence(s){this._iter=s,this.size=s.size}function FromEntriesSequence(s){this._iter=s,this.size=s.size}function flipFactory(s){var o=makeSequence(s);return o._iter=s,o.size=s.size,o.flip=function(){return s},o.reverse=function(){var o=s.reverse.apply(this);return o.flip=function(){return s.reverse()},o},o.has=function(o){return s.includes(o)},o.includes=function(o){return s.has(o)},o.cacheResult=cacheResultThrough,o.__iterateUncached=function(o,i){var a=this;return s.__iterate((function(s,i){return!1!==o(i,s,a)}),i)},o.__iteratorUncached=function(o,i){if(o===U){var a=s.__iterator(o,i);return new Iterator((function(){var s=a.next();if(!s.done){var o=s.value[0];s.value[0]=s.value[1],s.value[1]=o}return s}))}return s.__iterator(o===V?$:V,i)},o}function mapFactory(s,o,i){var a=makeSequence(s);return a.size=s.size,a.has=function(o){return s.has(o)},a.get=function(a,u){var _=s.get(a,j);return _===j?u:o.call(i,_,a,s)},a.__iterateUncached=function(a,u){var _=this;return s.__iterate((function(s,u,w){return!1!==a(o.call(i,s,u,w),u,_)}),u)},a.__iteratorUncached=function(a,u){var _=s.__iterator(U,u);return new Iterator((function(){var u=_.next();if(u.done)return u;var w=u.value,x=w[0];return iteratorValue(a,x,o.call(i,w[1],x,s),u)}))},a}function reverseFactory(s,o){var i=makeSequence(s);return i._iter=s,i.size=s.size,i.reverse=function(){return s},s.flip&&(i.flip=function(){var o=flipFactory(s);return o.reverse=function(){return s.flip()},o}),i.get=function(i,a){return s.get(o?i:-1-i,a)},i.has=function(i){return s.has(o?i:-1-i)},i.includes=function(o){return s.includes(o)},i.cacheResult=cacheResultThrough,i.__iterate=function(o,i){var a=this;return s.__iterate((function(s,i){return o(s,i,a)}),!i)},i.__iterator=function(o,i){return s.__iterator(o,!i)},i}function filterFactory(s,o,i,a){var u=makeSequence(s);return a&&(u.has=function(a){var u=s.get(a,j);return u!==j&&!!o.call(i,u,a,s)},u.get=function(a,u){var _=s.get(a,j);return _!==j&&o.call(i,_,a,s)?_:u}),u.__iterateUncached=function(u,_){var w=this,x=0;return s.__iterate((function(s,_,C){if(o.call(i,s,_,C))return x++,u(s,a?_:x-1,w)}),_),x},u.__iteratorUncached=function(u,_){var w=s.__iterator(U,_),x=0;return new Iterator((function(){for(;;){var _=w.next();if(_.done)return _;var C=_.value,j=C[0],L=C[1];if(o.call(i,L,j,s))return iteratorValue(u,a?j:x++,L,_)}}))},u}function countByFactory(s,o,i){var a=Map().asMutable();return s.__iterate((function(u,_){a.update(o.call(i,u,_,s),0,(function(s){return s+1}))})),a.asImmutable()}function groupByFactory(s,o,i){var a=isKeyed(s),u=(isOrdered(s)?OrderedMap():Map()).asMutable();s.__iterate((function(_,w){u.update(o.call(i,_,w,s),(function(s){return(s=s||[]).push(a?[w,_]:_),s}))}));var _=iterableClass(s);return u.map((function(o){return reify(s,_(o))}))}function sliceFactory(s,o,i,a){var u=s.size;if(void 0!==o&&(o|=0),void 0!==i&&(i===1/0?i=u:i|=0),wholeSlice(o,i,u))return s;var _=resolveBegin(o,u),w=resolveEnd(i,u);if(_!=_||w!=w)return sliceFactory(s.toSeq().cacheResult(),o,i,a);var x,C=w-_;C==C&&(x=C<0?0:C);var j=makeSequence(s);return j.size=0===x?x:s.size&&x||void 0,!a&&isSeq(s)&&x>=0&&(j.get=function(o,i){return(o=wrapIndex(this,o))>=0&&o<x?s.get(o+_,i):i}),j.__iterateUncached=function(o,i){var u=this;if(0===x)return 0;if(i)return this.cacheResult().__iterate(o,i);var w=0,C=!0,j=0;return s.__iterate((function(s,i){if(!C||!(C=w++<_))return j++,!1!==o(s,a?i:j-1,u)&&j!==x})),j},j.__iteratorUncached=function(o,i){if(0!==x&&i)return this.cacheResult().__iterator(o,i);var u=0!==x&&s.__iterator(o,i),w=0,C=0;return new Iterator((function(){for(;w++<_;)u.next();if(++C>x)return iteratorDone();var s=u.next();return a||o===V?s:iteratorValue(o,C-1,o===$?void 0:s.value[1],s)}))},j}function takeWhileFactory(s,o,i){var a=makeSequence(s);return a.__iterateUncached=function(a,u){var _=this;if(u)return this.cacheResult().__iterate(a,u);var w=0;return s.__iterate((function(s,u,x){return o.call(i,s,u,x)&&++w&&a(s,u,_)})),w},a.__iteratorUncached=function(a,u){var _=this;if(u)return this.cacheResult().__iterator(a,u);var w=s.__iterator(U,u),x=!0;return new Iterator((function(){if(!x)return iteratorDone();var s=w.next();if(s.done)return s;var u=s.value,C=u[0],j=u[1];return o.call(i,j,C,_)?a===U?s:iteratorValue(a,C,j,s):(x=!1,iteratorDone())}))},a}function skipWhileFactory(s,o,i,a){var u=makeSequence(s);return u.__iterateUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterate(u,_);var x=!0,C=0;return s.__iterate((function(s,_,j){if(!x||!(x=o.call(i,s,_,j)))return C++,u(s,a?_:C-1,w)})),C},u.__iteratorUncached=function(u,_){var w=this;if(_)return this.cacheResult().__iterator(u,_);var x=s.__iterator(U,_),C=!0,j=0;return new Iterator((function(){var s,_,L;do{if((s=x.next()).done)return a||u===V?s:iteratorValue(u,j++,u===$?void 0:s.value[1],s);var B=s.value;_=B[0],L=B[1],C&&(C=o.call(i,L,_,w))}while(C);return u===U?s:iteratorValue(u,_,L,s)}))},u}function concatFactory(s,o){var i=isKeyed(s),a=[s].concat(o).map((function(s){return isIterable(s)?i&&(s=KeyedIterable(s)):s=i?keyedSeqFromValue(s):indexedSeqFromValue(Array.isArray(s)?s:[s]),s})).filter((function(s){return 0!==s.size}));if(0===a.length)return s;if(1===a.length){var u=a[0];if(u===s||i&&isKeyed(u)||isIndexed(s)&&isIndexed(u))return u}var _=new ArraySeq(a);return i?_=_.toKeyedSeq():isIndexed(s)||(_=_.toSetSeq()),(_=_.flatten(!0)).size=a.reduce((function(s,o){if(void 0!==s){var i=o.size;if(void 0!==i)return s+i}}),0),_}function flattenFactory(s,o,i){var a=makeSequence(s);return a.__iterateUncached=function(a,u){var _=0,w=!1;function flatDeep(s,x){var C=this;s.__iterate((function(s,u){return(!o||x<o)&&isIterable(s)?flatDeep(s,x+1):!1===a(s,i?u:_++,C)&&(w=!0),!w}),u)}return flatDeep(s,0),_},a.__iteratorUncached=function(a,u){var _=s.__iterator(a,u),w=[],x=0;return new Iterator((function(){for(;_;){var s=_.next();if(!1===s.done){var C=s.value;if(a===U&&(C=C[1]),o&&!(w.length<o)||!isIterable(C))return i?s:iteratorValue(a,x++,C,s);w.push(_),_=C.__iterator(a,u)}else _=w.pop()}return iteratorDone()}))},a}function flatMapFactory(s,o,i){var a=iterableClass(s);return s.toSeq().map((function(u,_){return a(o.call(i,u,_,s))})).flatten(!0)}function interposeFactory(s,o){var i=makeSequence(s);return i.size=s.size&&2*s.size-1,i.__iterateUncached=function(i,a){var u=this,_=0;return s.__iterate((function(s,a){return(!_||!1!==i(o,_++,u))&&!1!==i(s,_++,u)}),a),_},i.__iteratorUncached=function(i,a){var u,_=s.__iterator(V,a),w=0;return new Iterator((function(){return(!u||w%2)&&(u=_.next()).done?u:w%2?iteratorValue(i,w++,o):iteratorValue(i,w++,u.value,u)}))},i}function sortFactory(s,o,i){o||(o=defaultComparator);var a=isKeyed(s),u=0,_=s.toSeq().map((function(o,a){return[a,o,u++,i?i(o,a,s):o]})).toArray();return _.sort((function(s,i){return o(s[3],i[3])||s[2]-i[2]})).forEach(a?function(s,o){_[o].length=2}:function(s,o){_[o]=s[1]}),a?KeyedSeq(_):isIndexed(s)?IndexedSeq(_):SetSeq(_)}function maxFactory(s,o,i){if(o||(o=defaultComparator),i){var a=s.toSeq().map((function(o,a){return[o,i(o,a,s)]})).reduce((function(s,i){return maxCompare(o,s[1],i[1])?i:s}));return a&&a[0]}return s.reduce((function(s,i){return maxCompare(o,s,i)?i:s}))}function maxCompare(s,o,i){var a=s(i,o);return 0===a&&i!==o&&(null==i||i!=i)||a>0}function zipWithFactory(s,o,i){var a=makeSequence(s);return a.size=new ArraySeq(i).map((function(s){return s.size})).min(),a.__iterate=function(s,o){for(var i,a=this.__iterator(V,o),u=0;!(i=a.next()).done&&!1!==s(i.value,u++,this););return u},a.__iteratorUncached=function(s,a){var u=i.map((function(s){return s=Iterable(s),getIterator(a?s.reverse():s)})),_=0,w=!1;return new Iterator((function(){var i;return w||(i=u.map((function(s){return s.next()})),w=i.some((function(s){return s.done}))),w?iteratorDone():iteratorValue(s,_++,o.apply(null,i.map((function(s){return s.value}))))}))},a}function reify(s,o){return isSeq(s)?o:s.constructor(o)}function validateEntry(s){if(s!==Object(s))throw new TypeError(\"Expected [K, V] tuple: \"+s)}function resolveSize(s){return assertNotInfinite(s.size),ensureSize(s)}function iterableClass(s){return isKeyed(s)?KeyedIterable:isIndexed(s)?IndexedIterable:SetIterable}function makeSequence(s){return Object.create((isKeyed(s)?KeyedSeq:isIndexed(s)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(s,o){return s>o?1:s<o?-1:0}function forceIterator(s){var o=getIterator(s);if(!o){if(!isArrayLike(s))throw new TypeError(\"Expected iterable or array-like: \"+s);o=getIterator(Iterable(s))}return o}function Record(s,o){var i,a=function Record(_){if(_ instanceof a)return _;if(!(this instanceof a))return new a(_);if(!i){i=!0;var w=Object.keys(s);setProps(u,w),u.size=w.length,u._name=o,u._keys=w,u._defaultValues=s}this._map=Map(_)},u=a.prototype=Object.create(tt);return u.constructor=a,a}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\")},OrderedMap.prototype.get=function(s,o){var i=this._map.get(s);return void 0!==i?this._list.get(i)[1]:o},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(s,o){return updateOrderedMap(this,s,o)},OrderedMap.prototype.remove=function(s){return updateOrderedMap(this,s,j)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(s,o){var i=this;return this._list.__iterate((function(o){return o&&s(o[1],o[0],i)}),o)},OrderedMap.prototype.__iterator=function(s,o){return this._list.fromEntrySeq().__iterator(s,o)},OrderedMap.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var o=this._map.__ensureOwner(s),i=this._list.__ensureOwner(s);return s?makeOrderedMap(o,i,s,this.__hash):(this.__ownerID=s,this._map=o,this._list=i,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[u]=!0,OrderedMap.prototype[_]=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(s,o){return this._iter.get(s,o)},ToKeyedSequence.prototype.has=function(s){return this._iter.has(s)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var s=this,o=reverseFactory(this,!0);return this._useKeys||(o.valueSeq=function(){return s._iter.toSeq().reverse()}),o},ToKeyedSequence.prototype.map=function(s,o){var i=this,a=mapFactory(this,s,o);return this._useKeys||(a.valueSeq=function(){return i._iter.toSeq().map(s,o)}),a},ToKeyedSequence.prototype.__iterate=function(s,o){var i,a=this;return this._iter.__iterate(this._useKeys?function(o,i){return s(o,i,a)}:(i=o?resolveSize(this):0,function(u){return s(u,o?--i:i++,a)}),o)},ToKeyedSequence.prototype.__iterator=function(s,o){if(this._useKeys)return this._iter.__iterator(s,o);var i=this._iter.__iterator(V,o),a=o?resolveSize(this):0;return new Iterator((function(){var u=i.next();return u.done?u:iteratorValue(s,o?--a:a++,u.value,u)}))},ToKeyedSequence.prototype[u]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(s){return this._iter.includes(s)},ToIndexedSequence.prototype.__iterate=function(s,o){var i=this,a=0;return this._iter.__iterate((function(o){return s(o,a++,i)}),o)},ToIndexedSequence.prototype.__iterator=function(s,o){var i=this._iter.__iterator(V,o),a=0;return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,a++,o.value,o)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(s){return this._iter.includes(s)},ToSetSequence.prototype.__iterate=function(s,o){var i=this;return this._iter.__iterate((function(o){return s(o,o,i)}),o)},ToSetSequence.prototype.__iterator=function(s,o){var i=this._iter.__iterator(V,o);return new Iterator((function(){var o=i.next();return o.done?o:iteratorValue(s,o.value,o.value,o)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(s,o){var i=this;return this._iter.__iterate((function(o){if(o){validateEntry(o);var a=isIterable(o);return s(a?o.get(1):o[1],a?o.get(0):o[0],i)}}),o)},FromEntriesSequence.prototype.__iterator=function(s,o){var i=this._iter.__iterator(V,o);return new Iterator((function(){for(;;){var o=i.next();if(o.done)return o;var a=o.value;if(a){validateEntry(a);var u=isIterable(a);return iteratorValue(s,u?a.get(0):a[0],u?a.get(1):a[1],o)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+\" {\",\"}\")},Record.prototype.has=function(s){return this._defaultValues.hasOwnProperty(s)},Record.prototype.get=function(s,o){if(!this.has(s))return o;var i=this._defaultValues[s];return this._map?this._map.get(s,i):i},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var s=this.constructor;return s._empty||(s._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(s,o){if(!this.has(s))throw new Error('Cannot set unknown key \"'+s+'\" on '+recordName(this));if(this._map&&!this._map.has(s)&&o===this._defaultValues[s])return this;var i=this._map&&this._map.set(s,o);return this.__ownerID||i===this._map?this:makeRecord(this,i)},Record.prototype.remove=function(s){if(!this.has(s))return this;var o=this._map&&this._map.remove(s);return this.__ownerID||o===this._map?this:makeRecord(this,o)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(s,o){var i=this;return KeyedIterable(this._defaultValues).map((function(s,o){return i.get(o)})).__iterator(s,o)},Record.prototype.__iterate=function(s,o){var i=this;return KeyedIterable(this._defaultValues).map((function(s,o){return i.get(o)})).__iterate(s,o)},Record.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var o=this._map&&this._map.__ensureOwner(s);return s?makeRecord(this,o,s):(this.__ownerID=s,this._map=o,this)};var tt=Record.prototype;function makeRecord(s,o,i){var a=Object.create(Object.getPrototypeOf(s));return a._map=o,a.__ownerID=i,a}function recordName(s){return s._name||s.constructor.name||\"Record\"}function setProps(s,o){try{o.forEach(setProp.bind(void 0,s))}catch(s){}}function setProp(s,o){Object.defineProperty(s,o,{get:function(){return this.get(o)},set:function(s){invariant(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(o,s)}})}function Set(s){return null==s?emptySet():isSet(s)&&!isOrdered(s)?s:emptySet().withMutations((function(o){var i=SetIterable(s);assertNotInfinite(i.size),i.forEach((function(s){return o.add(s)}))}))}function isSet(s){return!(!s||!s[nt])}tt[_]=tt.remove,tt.deleteIn=tt.removeIn=$e.removeIn,tt.merge=$e.merge,tt.mergeWith=$e.mergeWith,tt.mergeIn=$e.mergeIn,tt.mergeDeep=$e.mergeDeep,tt.mergeDeepWith=$e.mergeDeepWith,tt.mergeDeepIn=$e.mergeDeepIn,tt.setIn=$e.setIn,tt.update=$e.update,tt.updateIn=$e.updateIn,tt.withMutations=$e.withMutations,tt.asMutable=$e.asMutable,tt.asImmutable=$e.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},Set.prototype.toString=function(){return this.__toString(\"Set {\",\"}\")},Set.prototype.has=function(s){return this._map.has(s)},Set.prototype.add=function(s){return updateSet(this,this._map.set(s,!0))},Set.prototype.remove=function(s){return updateSet(this,this._map.remove(s))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var o=s.call(arguments,0);return 0===(o=o.filter((function(s){return 0!==s.size}))).length?this:0!==this.size||this.__ownerID||1!==o.length?this.withMutations((function(s){for(var i=0;i<o.length;i++)SetIterable(o[i]).forEach((function(o){return s.add(o)}))})):this.constructor(o[0])},Set.prototype.intersect=function(){var o=s.call(arguments,0);if(0===o.length)return this;o=o.map((function(s){return SetIterable(s)}));var i=this;return this.withMutations((function(s){i.forEach((function(i){o.every((function(s){return s.includes(i)}))||s.remove(i)}))}))},Set.prototype.subtract=function(){var o=s.call(arguments,0);if(0===o.length)return this;o=o.map((function(s){return SetIterable(s)}));var i=this;return this.withMutations((function(s){i.forEach((function(i){o.some((function(s){return s.includes(i)}))&&s.remove(i)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(o){var i=s.call(arguments,1);return this.union.apply(this,i)},Set.prototype.sort=function(s){return OrderedSet(sortFactory(this,s))},Set.prototype.sortBy=function(s,o){return OrderedSet(sortFactory(this,o,s))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(s,o){var i=this;return this._map.__iterate((function(o,a){return s(a,a,i)}),o)},Set.prototype.__iterator=function(s,o){return this._map.map((function(s,o){return o})).__iterator(s,o)},Set.prototype.__ensureOwner=function(s){if(s===this.__ownerID)return this;var o=this._map.__ensureOwner(s);return s?this.__make(o,s):(this.__ownerID=s,this._map=o,this)},Set.isSet=isSet;var rt,nt=\"@@__IMMUTABLE_SET__@@\",st=Set.prototype;function updateSet(s,o){return s.__ownerID?(s.size=o.size,s._map=o,s):o===s._map?s:0===o.size?s.__empty():s.__make(o)}function makeSet(s,o){var i=Object.create(st);return i.size=s?s.size:0,i._map=s,i.__ownerID=o,i}function emptySet(){return rt||(rt=makeSet(emptyMap()))}function OrderedSet(s){return null==s?emptyOrderedSet():isOrderedSet(s)?s:emptyOrderedSet().withMutations((function(o){var i=SetIterable(s);assertNotInfinite(i.size),i.forEach((function(s){return o.add(s)}))}))}function isOrderedSet(s){return isSet(s)&&isOrdered(s)}st[nt]=!0,st[_]=st.remove,st.mergeDeep=st.merge,st.mergeDeepWith=st.mergeWith,st.withMutations=$e.withMutations,st.asMutable=$e.asMutable,st.asImmutable=$e.asImmutable,st.__empty=emptySet,st.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(s){return this(KeyedIterable(s).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\")},OrderedSet.isOrderedSet=isOrderedSet;var ot,it=OrderedSet.prototype;function makeOrderedSet(s,o){var i=Object.create(it);return i.size=s?s.size:0,i._map=s,i.__ownerID=o,i}function emptyOrderedSet(){return ot||(ot=makeOrderedSet(emptyOrderedMap()))}function Stack(s){return null==s?emptyStack():isStack(s)?s:emptyStack().unshiftAll(s)}function isStack(s){return!(!s||!s[ct])}it[u]=!0,it.__empty=emptyOrderedSet,it.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\")},Stack.prototype.get=function(s,o){var i=this._head;for(s=wrapIndex(this,s);i&&s--;)i=i.next;return i?i.value:o},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var s=this.size+arguments.length,o=this._head,i=arguments.length-1;i>=0;i--)o={value:arguments[i],next:o};return this.__ownerID?(this.size=s,this._head=o,this.__hash=void 0,this.__altered=!0,this):makeStack(s,o)},Stack.prototype.pushAll=function(s){if(0===(s=IndexedIterable(s)).size)return this;assertNotInfinite(s.size);var o=this.size,i=this._head;return s.reverse().forEach((function(s){o++,i={value:s,next:i}})),this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(o,i)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(s){return this.pushAll(s)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(s,o){if(wholeSlice(s,o,this.size))return this;var i=resolveBegin(s,this.size);if(resolveEnd(o,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,s,o);for(var a=this.size-i,u=this._head;i--;)u=u.next;return this.__ownerID?(this.size=a,this._head=u,this.__hash=void 0,this.__altered=!0,this):makeStack(a,u)},Stack.prototype.__ensureOwner=function(s){return s===this.__ownerID?this:s?makeStack(this.size,this._head,s,this.__hash):(this.__ownerID=s,this.__altered=!1,this)},Stack.prototype.__iterate=function(s,o){if(o)return this.reverse().__iterate(s);for(var i=0,a=this._head;a&&!1!==s(a.value,i++,this);)a=a.next;return i},Stack.prototype.__iterator=function(s,o){if(o)return this.reverse().__iterator(s);var i=0,a=this._head;return new Iterator((function(){if(a){var o=a.value;return a=a.next,iteratorValue(s,i++,o)}return iteratorDone()}))},Stack.isStack=isStack;var at,ct=\"@@__IMMUTABLE_STACK__@@\",lt=Stack.prototype;function makeStack(s,o,i,a){var u=Object.create(lt);return u.size=s,u._head=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function emptyStack(){return at||(at=makeStack(0))}function mixin(s,o){var keyCopier=function(i){s.prototype[i]=o[i]};return Object.keys(o).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(o).forEach(keyCopier),s}lt[ct]=!0,lt.withMutations=$e.withMutations,lt.asMutable=$e.asMutable,lt.asImmutable=$e.asImmutable,lt.wasAltered=$e.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var s=new Array(this.size||0);return this.valueSeq().__iterate((function(o,i){s[i]=o})),s},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJS?s.toJS():s})).__toJS()},toJSON:function(){return this.toSeq().map((function(s){return s&&\"function\"==typeof s.toJSON?s.toJSON():s})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var s={};return this.__iterate((function(o,i){s[i]=o})),s},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(s,o){return 0===this.size?s+o:s+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+o},concat:function(){return reify(this,concatFactory(this,s.call(arguments,0)))},includes:function(s){return this.some((function(o){return is(o,s)}))},entries:function(){return this.__iterator(U)},every:function(s,o){assertNotInfinite(this.size);var i=!0;return this.__iterate((function(a,u,_){if(!s.call(o,a,u,_))return i=!1,!1})),i},filter:function(s,o){return reify(this,filterFactory(this,s,o,!0))},find:function(s,o,i){var a=this.findEntry(s,o);return a?a[1]:i},forEach:function(s,o){return assertNotInfinite(this.size),this.__iterate(o?s.bind(o):s)},join:function(s){assertNotInfinite(this.size),s=void 0!==s?\"\"+s:\",\";var o=\"\",i=!0;return this.__iterate((function(a){i?i=!1:o+=s,o+=null!=a?a.toString():\"\"})),o},keys:function(){return this.__iterator($)},map:function(s,o){return reify(this,mapFactory(this,s,o))},reduce:function(s,o,i){var a,u;return assertNotInfinite(this.size),arguments.length<2?u=!0:a=o,this.__iterate((function(o,_,w){u?(u=!1,a=o):a=s.call(i,a,o,_,w)})),a},reduceRight:function(s,o,i){var a=this.toKeyedSeq().reverse();return a.reduce.apply(a,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(s,o){return reify(this,sliceFactory(this,s,o,!0))},some:function(s,o){return!this.every(not(s),o)},sort:function(s){return reify(this,sortFactory(this,s))},values:function(){return this.__iterator(V)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(s,o){return ensureSize(s?this.toSeq().filter(s,o):this)},countBy:function(s,o){return countByFactory(this,s,o)},equals:function(s){return deepEqual(this,s)},entrySeq:function(){var s=this;if(s._cache)return new ArraySeq(s._cache);var o=s.toSeq().map(entryMapper).toIndexedSeq();return o.fromEntrySeq=function(){return s.toSeq()},o},filterNot:function(s,o){return this.filter(not(s),o)},findEntry:function(s,o,i){var a=i;return this.__iterate((function(i,u,_){if(s.call(o,i,u,_))return a=[u,i],!1})),a},findKey:function(s,o){var i=this.findEntry(s,o);return i&&i[0]},findLast:function(s,o,i){return this.toKeyedSeq().reverse().find(s,o,i)},findLastEntry:function(s,o,i){return this.toKeyedSeq().reverse().findEntry(s,o,i)},findLastKey:function(s,o){return this.toKeyedSeq().reverse().findKey(s,o)},first:function(){return this.find(returnTrue)},flatMap:function(s,o){return reify(this,flatMapFactory(this,s,o))},flatten:function(s){return reify(this,flattenFactory(this,s,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(s,o){return this.find((function(o,i){return is(i,s)}),void 0,o)},getIn:function(s,o){for(var i,a=this,u=forceIterator(s);!(i=u.next()).done;){var _=i.value;if((a=a&&a.get?a.get(_,j):j)===j)return o}return a},groupBy:function(s,o){return groupByFactory(this,s,o)},has:function(s){return this.get(s,j)!==j},hasIn:function(s){return this.getIn(s,j)!==j},isSubset:function(s){return s=\"function\"==typeof s.includes?s:Iterable(s),this.every((function(o){return s.includes(o)}))},isSuperset:function(s){return(s=\"function\"==typeof s.isSubset?s:Iterable(s)).isSubset(this)},keyOf:function(s){return this.findKey((function(o){return is(o,s)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(s){return this.toKeyedSeq().reverse().keyOf(s)},max:function(s){return maxFactory(this,s)},maxBy:function(s,o){return maxFactory(this,o,s)},min:function(s){return maxFactory(this,s?neg(s):defaultNegComparator)},minBy:function(s,o){return maxFactory(this,o?neg(o):defaultNegComparator,s)},rest:function(){return this.slice(1)},skip:function(s){return this.slice(Math.max(0,s))},skipLast:function(s){return reify(this,this.toSeq().reverse().skip(s).reverse())},skipWhile:function(s,o){return reify(this,skipWhileFactory(this,s,o,!0))},skipUntil:function(s,o){return this.skipWhile(not(s),o)},sortBy:function(s,o){return reify(this,sortFactory(this,o,s))},take:function(s){return this.slice(0,Math.max(0,s))},takeLast:function(s){return reify(this,this.toSeq().reverse().take(s).reverse())},takeWhile:function(s,o){return reify(this,takeWhileFactory(this,s,o))},takeUntil:function(s,o){return this.takeWhile(not(s),o)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var ut=Iterable.prototype;ut[o]=!0,ut[Z]=ut.values,ut.__toJS=ut.toArray,ut.__toStringMapper=quoteString,ut.inspect=ut.toSource=function(){return this.toString()},ut.chain=ut.flatMap,ut.contains=ut.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(s,o){var i=this,a=0;return reify(this,this.toSeq().map((function(u,_){return s.call(o,[_,u],a++,i)})).fromEntrySeq())},mapKeys:function(s,o){var i=this;return reify(this,this.toSeq().flip().map((function(a,u){return s.call(o,a,u,i)})).flip())}});var pt=KeyedIterable.prototype;function keyMapper(s,o){return o}function entryMapper(s,o){return[o,s]}function not(s){return function(){return!s.apply(this,arguments)}}function neg(s){return function(){return-s.apply(this,arguments)}}function quoteString(s){return\"string\"==typeof s?JSON.stringify(s):String(s)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(s,o){return s<o?1:s>o?-1:0}function hashIterable(s){if(s.size===1/0)return 0;var o=isOrdered(s),i=isKeyed(s),a=o?1:0;return murmurHashOfSize(s.__iterate(i?o?function(s,o){a=31*a+hashMerge(hash(s),hash(o))|0}:function(s,o){a=a+hashMerge(hash(s),hash(o))|0}:o?function(s){a=31*a+hash(s)|0}:function(s){a=a+hash(s)|0}),a)}function murmurHashOfSize(s,o){return o=le(o,3432918353),o=le(o<<15|o>>>-15,461845907),o=le(o<<13|o>>>-13,5),o=le((o=o+3864292196^s)^o>>>16,2246822507),o=smi((o=le(o^o>>>13,3266489909))^o>>>16)}function hashMerge(s,o){return s^o+2654435769+(s<<6)+(s>>2)}return pt[i]=!0,pt[Z]=ut.entries,pt.__toJS=ut.toObject,pt.__toStringMapper=function(s,o){return JSON.stringify(o)+\": \"+quoteString(s)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(s,o){return reify(this,filterFactory(this,s,o,!1))},findIndex:function(s,o){var i=this.findEntry(s,o);return i?i[0]:-1},indexOf:function(s){var o=this.keyOf(s);return void 0===o?-1:o},lastIndexOf:function(s){var o=this.lastKeyOf(s);return void 0===o?-1:o},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(s,o){return reify(this,sliceFactory(this,s,o,!1))},splice:function(s,o){var i=arguments.length;if(o=Math.max(0|o,0),0===i||2===i&&!o)return this;s=resolveBegin(s,s<0?this.count():this.size);var a=this.slice(0,s);return reify(this,1===i?a:a.concat(arrCopy(arguments,2),this.slice(s+o)))},findLastIndex:function(s,o){var i=this.findLastEntry(s,o);return i?i[0]:-1},first:function(){return this.get(0)},flatten:function(s){return reify(this,flattenFactory(this,s,!1))},get:function(s,o){return(s=wrapIndex(this,s))<0||this.size===1/0||void 0!==this.size&&s>this.size?o:this.find((function(o,i){return i===s}),void 0,o)},has:function(s){return(s=wrapIndex(this,s))>=0&&(void 0!==this.size?this.size===1/0||s<this.size:-1!==this.indexOf(s))},interpose:function(s){return reify(this,interposeFactory(this,s))},interleave:function(){var s=[this].concat(arrCopy(arguments)),o=zipWithFactory(this.toSeq(),IndexedSeq.of,s),i=o.flatten(!0);return o.size&&(i.size=o.size*s.length),reify(this,i)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(s,o){return reify(this,skipWhileFactory(this,s,o,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipWith:function(s){var o=arrCopy(arguments);return o[0]=this,reify(this,zipWithFactory(this,s,o))}}),IndexedIterable.prototype[a]=!0,IndexedIterable.prototype[u]=!0,mixin(SetIterable,{get:function(s,o){return this.has(s)?s:o},includes:function(s){return this.has(s)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=ut.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is,fromJS}}()},9748:(s,o,i)=>{\"use strict\";i(71340);var a=i(92046);s.exports=a.Object.assign},9999:(s,o,i)=>{var a=i(37217),u=i(83729),_=i(16547),w=i(74733),x=i(43838),C=i(93290),j=i(23007),L=i(92271),B=i(48948),$=i(50002),V=i(83349),U=i(5861),z=i(76189),Y=i(77199),Z=i(35529),ee=i(56449),ie=i(3656),ae=i(87730),ce=i(23805),le=i(38440),pe=i(95950),de=i(37241),fe=\"[object Arguments]\",ye=\"[object Function]\",be=\"[object Object]\",_e={};_e[fe]=_e[\"[object Array]\"]=_e[\"[object ArrayBuffer]\"]=_e[\"[object DataView]\"]=_e[\"[object Boolean]\"]=_e[\"[object Date]\"]=_e[\"[object Float32Array]\"]=_e[\"[object Float64Array]\"]=_e[\"[object Int8Array]\"]=_e[\"[object Int16Array]\"]=_e[\"[object Int32Array]\"]=_e[\"[object Map]\"]=_e[\"[object Number]\"]=_e[be]=_e[\"[object RegExp]\"]=_e[\"[object Set]\"]=_e[\"[object String]\"]=_e[\"[object Symbol]\"]=_e[\"[object Uint8Array]\"]=_e[\"[object Uint8ClampedArray]\"]=_e[\"[object Uint16Array]\"]=_e[\"[object Uint32Array]\"]=!0,_e[\"[object Error]\"]=_e[ye]=_e[\"[object WeakMap]\"]=!1,s.exports=function baseClone(s,o,i,Se,we,xe){var Pe,Te=1&o,Re=2&o,$e=4&o;if(i&&(Pe=we?i(s,Se,we,xe):i(s)),void 0!==Pe)return Pe;if(!ce(s))return s;var qe=ee(s);if(qe){if(Pe=z(s),!Te)return j(s,Pe)}else{var ze=U(s),We=ze==ye||\"[object GeneratorFunction]\"==ze;if(ie(s))return C(s,Te);if(ze==be||ze==fe||We&&!we){if(Pe=Re||We?{}:Z(s),!Te)return Re?B(s,x(Pe,s)):L(s,w(Pe,s))}else{if(!_e[ze])return we?s:{};Pe=Y(s,ze,Te)}}xe||(xe=new a);var He=xe.get(s);if(He)return He;xe.set(s,Pe),le(s)?s.forEach((function(a){Pe.add(baseClone(a,o,i,a,s,xe))})):ae(s)&&s.forEach((function(a,u){Pe.set(u,baseClone(a,o,i,u,s,xe))}));var Ye=qe?void 0:($e?Re?V:$:Re?de:pe)(s);return u(Ye||s,(function(a,u){Ye&&(a=s[u=a]),_(Pe,u,baseClone(a,o,i,u,s,xe))})),Pe}},10023:(s,o,i)=>{const a=i(6205),INTS=()=>[{type:a.RANGE,from:48,to:57}],WORDS=()=>[{type:a.CHAR,value:95},{type:a.RANGE,from:97,to:122},{type:a.RANGE,from:65,to:90}].concat(INTS()),WHITESPACE=()=>[{type:a.CHAR,value:9},{type:a.CHAR,value:10},{type:a.CHAR,value:11},{type:a.CHAR,value:12},{type:a.CHAR,value:13},{type:a.CHAR,value:32},{type:a.CHAR,value:160},{type:a.CHAR,value:5760},{type:a.RANGE,from:8192,to:8202},{type:a.CHAR,value:8232},{type:a.CHAR,value:8233},{type:a.CHAR,value:8239},{type:a.CHAR,value:8287},{type:a.CHAR,value:12288},{type:a.CHAR,value:65279}];o.words=()=>({type:a.SET,set:WORDS(),not:!1}),o.notWords=()=>({type:a.SET,set:WORDS(),not:!0}),o.ints=()=>({type:a.SET,set:INTS(),not:!1}),o.notInts=()=>({type:a.SET,set:INTS(),not:!0}),o.whitespace=()=>({type:a.SET,set:WHITESPACE(),not:!1}),o.notWhitespace=()=>({type:a.SET,set:WHITESPACE(),not:!0}),o.anyChar=()=>({type:a.SET,set:[{type:a.CHAR,value:10},{type:a.CHAR,value:13},{type:a.CHAR,value:8232},{type:a.CHAR,value:8233}],not:!0})},10043:(s,o,i)=>{\"use strict\";var a=i(54018),u=String,_=TypeError;s.exports=function(s){if(a(s))return s;throw new _(\"Can't set \"+u(s)+\" as a prototype\")}},10124:(s,o,i)=>{var a=i(9325);s.exports=function(){return a.Date.now()}},10300:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(82159),_=i(36624),w=i(4640),x=i(73448),C=TypeError;s.exports=function(s,o){var i=arguments.length<2?x(s):o;if(u(i))return _(a(i,s));throw new C(w(s)+\" is not iterable\")}},10316:(s,o,i)=>{const a=i(2404),u=i(55973),_=i(92340);class Element{constructor(s,o,i){o&&(this.meta=o),i&&(this.attributes=i),this.content=s}freeze(){Object.isFrozen(this)||(this._meta&&(this.meta.parent=this,this.meta.freeze()),this._attributes&&(this.attributes.parent=this,this.attributes.freeze()),this.children.forEach((s=>{s.parent=this,s.freeze()}),this),this.content&&Array.isArray(this.content)&&Object.freeze(this.content),Object.freeze(this))}primitive(){}clone(){const s=new this.constructor;return s.element=this.element,this.meta.length&&(s._meta=this.meta.clone()),this.attributes.length&&(s._attributes=this.attributes.clone()),this.content?this.content.clone?s.content=this.content.clone():Array.isArray(this.content)?s.content=this.content.map((s=>s.clone())):s.content=this.content:s.content=this.content,s}toValue(){return this.content instanceof Element?this.content.toValue():this.content instanceof u?{key:this.content.key.toValue(),value:this.content.value?this.content.value.toValue():void 0}:this.content&&this.content.map?this.content.map((s=>s.toValue()),this):this.content}toRef(s){if(\"\"===this.id.toValue())throw Error(\"Cannot create reference to an element that does not contain an ID\");const o=new this.RefElement(this.id.toValue());return s&&(o.path=s),o}findRecursive(...s){if(arguments.length>1&&!this.isFrozen)throw new Error(\"Cannot find recursive with multiple element names without first freezing the element. Call `element.freeze()`\");const o=s.pop();let i=new _;const append=(s,o)=>(s.push(o),s),checkElement=(s,i)=>{i.element===o&&s.push(i);const a=i.findRecursive(o);return a&&a.reduce(append,s),i.content instanceof u&&(i.content.key&&checkElement(s,i.content.key),i.content.value&&checkElement(s,i.content.value)),s};return this.content&&(this.content.element&&checkElement(i,this.content),Array.isArray(this.content)&&this.content.reduce(checkElement,i)),s.isEmpty||(i=i.filter((o=>{let i=o.parents.map((s=>s.element));for(const o in s){const a=s[o],u=i.indexOf(a);if(-1===u)return!1;i=i.splice(0,u)}return!0}))),i}set(s){return this.content=s,this}equals(s){return a(this.toValue(),s)}getMetaProperty(s,o){if(!this.meta.hasKey(s)){if(this.isFrozen){const s=this.refract(o);return s.freeze(),s}this.meta.set(s,o)}return this.meta.get(s)}setMetaProperty(s,o){this.meta.set(s,o)}get element(){return this._storedElement||\"element\"}set element(s){this._storedElement=s}get content(){return this._content}set content(s){if(s instanceof Element)this._content=s;else if(s instanceof _)this.content=s.elements;else if(\"string\"==typeof s||\"number\"==typeof s||\"boolean\"==typeof s||\"null\"===s||null==s)this._content=s;else if(s instanceof u)this._content=s;else if(Array.isArray(s))this._content=s.map(this.refract);else{if(\"object\"!=typeof s)throw new Error(\"Cannot set content to given value\");this._content=Object.keys(s).map((o=>new this.MemberElement(o,s[o])))}}get meta(){if(!this._meta){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._meta=new this.ObjectElement}return this._meta}set meta(s){s instanceof this.ObjectElement?this._meta=s:this.meta.set(s||{})}get attributes(){if(!this._attributes){if(this.isFrozen){const s=new this.ObjectElement;return s.freeze(),s}this._attributes=new this.ObjectElement}return this._attributes}set attributes(s){s instanceof this.ObjectElement?this._attributes=s:this.attributes.set(s||{})}get id(){return this.getMetaProperty(\"id\",\"\")}set id(s){this.setMetaProperty(\"id\",s)}get classes(){return this.getMetaProperty(\"classes\",[])}set classes(s){this.setMetaProperty(\"classes\",s)}get title(){return this.getMetaProperty(\"title\",\"\")}set title(s){this.setMetaProperty(\"title\",s)}get description(){return this.getMetaProperty(\"description\",\"\")}set description(s){this.setMetaProperty(\"description\",s)}get links(){return this.getMetaProperty(\"links\",[])}set links(s){this.setMetaProperty(\"links\",s)}get isFrozen(){return Object.isFrozen(this)}get parents(){let{parent:s}=this;const o=new _;for(;s;)o.push(s),s=s.parent;return o}get children(){if(Array.isArray(this.content))return new _(this.content);if(this.content instanceof u){const s=new _([this.content.key]);return this.content.value&&s.push(this.content.value),s}return this.content instanceof Element?new _([this.content]):new _}get recursiveChildren(){const s=new _;return this.children.forEach((o=>{s.push(o),o.recursiveChildren.forEach((o=>{s.push(o)}))})),s}}s.exports=Element},10392:s=>{s.exports=function getValue(s,o){return null==s?void 0:s[o]}},10776:(s,o,i)=>{var a=i(30756),u=i(95950);s.exports=function getMatchData(s){for(var o=u(s),i=o.length;i--;){var _=o[i],w=s[_];o[i]=[_,w,a(w)]}return o}},10866:(s,o,i)=>{const a=i(6048),u=i(92340);class ObjectSlice extends u{map(s,o){return this.elements.map((i=>s.bind(o)(i.value,i.key,i)))}filter(s,o){return new ObjectSlice(this.elements.filter((i=>s.bind(o)(i.value,i.key,i))))}reject(s,o){return this.filter(a(s.bind(o)))}forEach(s,o){return this.elements.forEach(((i,a)=>{s.bind(o)(i.value,i.key,i,a)}))}keys(){return this.map(((s,o)=>o.toValue()))}values(){return this.map((s=>s.toValue()))}}s.exports=ObjectSlice},11042:(s,o,i)=>{\"use strict\";var a=i(85582),u=i(1907),_=i(24443),w=i(87170),x=i(36624),C=u([].concat);s.exports=a(\"Reflect\",\"ownKeys\")||function ownKeys(s){var o=_.f(x(s)),i=w.f;return i?C(o,i(s)):o}},11091:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(76024),_=i(92361),w=i(62250),x=i(13846).f,C=i(7463),j=i(92046),L=i(28311),B=i(61626),$=i(49724);i(36128);var wrapConstructor=function(s){var Wrapper=function(o,i,a){if(this instanceof Wrapper){switch(arguments.length){case 0:return new s;case 1:return new s(o);case 2:return new s(o,i)}return new s(o,i,a)}return u(s,this,arguments)};return Wrapper.prototype=s.prototype,Wrapper};s.exports=function(s,o){var i,u,V,U,z,Y,Z,ee,ie,ae=s.target,ce=s.global,le=s.stat,pe=s.proto,de=ce?a:le?a[ae]:a[ae]&&a[ae].prototype,fe=ce?j:j[ae]||B(j,ae,{})[ae],ye=fe.prototype;for(U in o)u=!(i=C(ce?U:ae+(le?\".\":\"#\")+U,s.forced))&&de&&$(de,U),Y=fe[U],u&&(Z=s.dontCallGetSet?(ie=x(de,U))&&ie.value:de[U]),z=u&&Z?Z:o[U],(i||pe||typeof Y!=typeof z)&&(ee=s.bind&&u?L(z,a):s.wrap&&u?wrapConstructor(z):pe&&w(z)?_(z):z,(s.sham||z&&z.sham||Y&&Y.sham)&&B(ee,\"sham\",!0),B(fe,U,ee),pe&&($(j,V=ae+\"Prototype\")||B(j,V,{}),B(j[V],U,z),s.real&&ye&&(i||!ye[U])&&B(ye,U,z)))}},11287:s=>{s.exports=function getHolder(s){return s.placeholder}},11331:(s,o,i)=>{var a=i(72552),u=i(28879),_=i(40346),w=Function.prototype,x=Object.prototype,C=w.toString,j=x.hasOwnProperty,L=C.call(Object);s.exports=function isPlainObject(s){if(!_(s)||\"[object Object]\"!=a(s))return!1;var o=u(s);if(null===o)return!0;var i=j.call(o,\"constructor\")&&o.constructor;return\"function\"==typeof i&&i instanceof i&&C.call(i)==L}},11470:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(65482),_=i(90160),w=i(74239),x=a(\"\".charAt),C=a(\"\".charCodeAt),j=a(\"\".slice),createMethod=function(s){return function(o,i){var a,L,B=_(w(o)),$=u(i),V=B.length;return $<0||$>=V?s?\"\":void 0:(a=C(B,$))<55296||a>56319||$+1===V||(L=C(B,$+1))<56320||L>57343?s?x(B,$):a:s?j(B,$,$+2):L-56320+(a-55296<<10)+65536}};s.exports={codeAt:createMethod(!1),charAt:createMethod(!0)}},11842:(s,o,i)=>{var a=i(82819),u=i(9325);s.exports=function createBind(s,o,i){var _=1&o,w=a(s);return function wrapper(){return(this&&this!==u&&this instanceof wrapper?w:s).apply(_?i:this,arguments)}}},12242:(s,o,i)=>{const a=i(10316);s.exports=class BooleanElement extends a{constructor(s,o,i){super(s,o,i),this.element=\"boolean\"}primitive(){return\"boolean\"}}},12507:(s,o,i)=>{var a=i(28754),u=i(49698),_=i(63912),w=i(13222);s.exports=function createCaseFirst(s){return function(o){o=w(o);var i=u(o)?_(o):void 0,x=i?i[0]:o.charAt(0),C=i?a(i,1).join(\"\"):o.slice(1);return x[s]()+C}}},12560:(s,o,i)=>{\"use strict\";i(99363);var a=i(19287),u=i(45951),_=i(14840),w=i(93742);for(var x in a)_(u[x],x),w[x]=w.Array},12651:(s,o,i)=>{var a=i(74218);s.exports=function getMapData(s,o){var i=s.__data__;return a(o)?i[\"string\"==typeof o?\"string\":\"hash\"]:i.map}},12749:(s,o,i)=>{var a=i(81042),u=Object.prototype.hasOwnProperty;s.exports=function hashHas(s){var o=this.__data__;return a?void 0!==o[s]:u.call(o,s)}},13222:(s,o,i)=>{var a=i(77556);s.exports=function toString(s){return null==s?\"\":a(s)}},13846:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(13930),_=i(22574),w=i(75817),x=i(4993),C=i(70470),j=i(49724),L=i(73648),B=Object.getOwnPropertyDescriptor;o.f=a?B:function getOwnPropertyDescriptor(s,o){if(s=x(s),o=C(o),L)try{return B(s,o)}catch(s){}if(j(s,o))return w(!u(_.f,s,o),s[o])}},13930:(s,o,i)=>{\"use strict\";var a=i(41505),u=Function.prototype.call;s.exports=a?u.bind(u):function(){return u.apply(u,arguments)}},14248:s=>{s.exports=function arraySome(s,o){for(var i=-1,a=null==s?0:s.length;++i<a;)if(o(s[i],i,s))return!0;return!1}},14528:s=>{s.exports=function arrayPush(s,o){for(var i=-1,a=o.length,u=s.length;++i<a;)s[u+i]=o[i];return s}},14540:(s,o,i)=>{const a=i(10316);s.exports=class RefElement extends a{constructor(s,o,i){super(s||[],o,i),this.element=\"ref\",this.path||(this.path=\"element\")}get path(){return this.attributes.get(\"path\")}set path(s){this.attributes.set(\"path\",s)}}},14744:s=>{\"use strict\";var o=function isMergeableObject(s){return function isNonNullObject(s){return!!s&&\"object\"==typeof s}(s)&&!function isSpecial(s){var o=Object.prototype.toString.call(s);return\"[object RegExp]\"===o||\"[object Date]\"===o||function isReactElement(s){return s.$$typeof===i}(s)}(s)};var i=\"function\"==typeof Symbol&&Symbol.for?Symbol.for(\"react.element\"):60103;function cloneUnlessOtherwiseSpecified(s,o){return!1!==o.clone&&o.isMergeableObject(s)?deepmerge(function emptyTarget(s){return Array.isArray(s)?[]:{}}(s),s,o):s}function defaultArrayMerge(s,o,i){return s.concat(o).map((function(s){return cloneUnlessOtherwiseSpecified(s,i)}))}function getKeys(s){return Object.keys(s).concat(function getEnumerableOwnPropertySymbols(s){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(s).filter((function(o){return Object.propertyIsEnumerable.call(s,o)})):[]}(s))}function propertyIsOnObject(s,o){try{return o in s}catch(s){return!1}}function mergeObject(s,o,i){var a={};return i.isMergeableObject(s)&&getKeys(s).forEach((function(o){a[o]=cloneUnlessOtherwiseSpecified(s[o],i)})),getKeys(o).forEach((function(u){(function propertyIsUnsafe(s,o){return propertyIsOnObject(s,o)&&!(Object.hasOwnProperty.call(s,o)&&Object.propertyIsEnumerable.call(s,o))})(s,u)||(propertyIsOnObject(s,u)&&i.isMergeableObject(o[u])?a[u]=function getMergeFunction(s,o){if(!o.customMerge)return deepmerge;var i=o.customMerge(s);return\"function\"==typeof i?i:deepmerge}(u,i)(s[u],o[u],i):a[u]=cloneUnlessOtherwiseSpecified(o[u],i))})),a}function deepmerge(s,i,a){(a=a||{}).arrayMerge=a.arrayMerge||defaultArrayMerge,a.isMergeableObject=a.isMergeableObject||o,a.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var u=Array.isArray(i);return u===Array.isArray(s)?u?a.arrayMerge(s,i,a):mergeObject(s,i,a):cloneUnlessOtherwiseSpecified(i,a)}deepmerge.all=function deepmergeAll(s,o){if(!Array.isArray(s))throw new Error(\"first argument should be an array\");return s.reduce((function(s,i){return deepmerge(s,i,o)}),{})};var a=deepmerge;s.exports=a},14792:(s,o,i)=>{var a=i(13222),u=i(55808);s.exports=function capitalize(s){return u(a(s).toLowerCase())}},14840:(s,o,i)=>{\"use strict\";var a=i(52623),u=i(74284).f,_=i(61626),w=i(49724),x=i(54878),C=i(76264)(\"toStringTag\");s.exports=function(s,o,i,j){var L=i?s:s&&s.prototype;L&&(w(L,C)||u(L,C,{configurable:!0,value:o}),j&&!a&&_(L,\"toString\",x))}},14974:s=>{s.exports=function safeGet(s,o){if((\"constructor\"!==o||\"function\"!=typeof s[o])&&\"__proto__\"!=o)return s[o]}},15287:(s,o)=>{\"use strict\";var i=Symbol.for(\"react.element\"),a=Symbol.for(\"react.portal\"),u=Symbol.for(\"react.fragment\"),_=Symbol.for(\"react.strict_mode\"),w=Symbol.for(\"react.profiler\"),x=Symbol.for(\"react.provider\"),C=Symbol.for(\"react.context\"),j=Symbol.for(\"react.forward_ref\"),L=Symbol.for(\"react.suspense\"),B=Symbol.for(\"react.memo\"),$=Symbol.for(\"react.lazy\"),V=Symbol.iterator;var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,Y={};function E(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i||U}function F(){}function G(s,o,i){this.props=s,this.context=o,this.refs=Y,this.updater=i||U}E.prototype.isReactComponent={},E.prototype.setState=function(s,o){if(\"object\"!=typeof s&&\"function\"!=typeof s&&null!=s)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,s,o,\"setState\")},E.prototype.forceUpdate=function(s){this.updater.enqueueForceUpdate(this,s,\"forceUpdate\")},F.prototype=E.prototype;var Z=G.prototype=new F;Z.constructor=G,z(Z,E.prototype),Z.isPureReactComponent=!0;var ee=Array.isArray,ie=Object.prototype.hasOwnProperty,ae={current:null},ce={key:!0,ref:!0,__self:!0,__source:!0};function M(s,o,a){var u,_={},w=null,x=null;if(null!=o)for(u in void 0!==o.ref&&(x=o.ref),void 0!==o.key&&(w=\"\"+o.key),o)ie.call(o,u)&&!ce.hasOwnProperty(u)&&(_[u]=o[u]);var C=arguments.length-2;if(1===C)_.children=a;else if(1<C){for(var j=Array(C),L=0;L<C;L++)j[L]=arguments[L+2];_.children=j}if(s&&s.defaultProps)for(u in C=s.defaultProps)void 0===_[u]&&(_[u]=C[u]);return{$$typeof:i,type:s,key:w,ref:x,props:_,_owner:ae.current}}function O(s){return\"object\"==typeof s&&null!==s&&s.$$typeof===i}var le=/\\/+/g;function Q(s,o){return\"object\"==typeof s&&null!==s&&null!=s.key?function escape(s){var o={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+s.replace(/[=:]/g,(function(s){return o[s]}))}(\"\"+s.key):o.toString(36)}function R(s,o,u,_,w){var x=typeof s;\"undefined\"!==x&&\"boolean\"!==x||(s=null);var C=!1;if(null===s)C=!0;else switch(x){case\"string\":case\"number\":C=!0;break;case\"object\":switch(s.$$typeof){case i:case a:C=!0}}if(C)return w=w(C=s),s=\"\"===_?\".\"+Q(C,0):_,ee(w)?(u=\"\",null!=s&&(u=s.replace(le,\"$&/\")+\"/\"),R(w,o,u,\"\",(function(s){return s}))):null!=w&&(O(w)&&(w=function N(s,o){return{$$typeof:i,type:s.type,key:o,ref:s.ref,props:s.props,_owner:s._owner}}(w,u+(!w.key||C&&C.key===w.key?\"\":(\"\"+w.key).replace(le,\"$&/\")+\"/\")+s)),o.push(w)),1;if(C=0,_=\"\"===_?\".\":_+\":\",ee(s))for(var j=0;j<s.length;j++){var L=_+Q(x=s[j],j);C+=R(x,o,u,L,w)}else if(L=function A(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=V&&s[V]||s[\"@@iterator\"])?s:null}(s),\"function\"==typeof L)for(s=L.call(s),j=0;!(x=s.next()).done;)C+=R(x=x.value,o,u,L=_+Q(x,j++),w);else if(\"object\"===x)throw o=String(s),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===o?\"object with keys {\"+Object.keys(s).join(\", \")+\"}\":o)+\"). If you meant to render a collection of children, use an array instead.\");return C}function S(s,o,i){if(null==s)return s;var a=[],u=0;return R(s,a,\"\",\"\",(function(s){return o.call(i,s,u++)})),a}function T(s){if(-1===s._status){var o=s._result;(o=o()).then((function(o){0!==s._status&&-1!==s._status||(s._status=1,s._result=o)}),(function(o){0!==s._status&&-1!==s._status||(s._status=2,s._result=o)})),-1===s._status&&(s._status=0,s._result=o)}if(1===s._status)return s._result.default;throw s._result}var pe={current:null},de={transition:null},fe={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:de,ReactCurrentOwner:ae};function X(){throw Error(\"act(...) is not supported in production builds of React.\")}o.Children={map:S,forEach:function(s,o,i){S(s,(function(){o.apply(this,arguments)}),i)},count:function(s){var o=0;return S(s,(function(){o++})),o},toArray:function(s){return S(s,(function(s){return s}))||[]},only:function(s){if(!O(s))throw Error(\"React.Children.only expected to receive a single React element child.\");return s}},o.Component=E,o.Fragment=u,o.Profiler=w,o.PureComponent=G,o.StrictMode=_,o.Suspense=L,o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fe,o.act=X,o.cloneElement=function(s,o,a){if(null==s)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+s+\".\");var u=z({},s.props),_=s.key,w=s.ref,x=s._owner;if(null!=o){if(void 0!==o.ref&&(w=o.ref,x=ae.current),void 0!==o.key&&(_=\"\"+o.key),s.type&&s.type.defaultProps)var C=s.type.defaultProps;for(j in o)ie.call(o,j)&&!ce.hasOwnProperty(j)&&(u[j]=void 0===o[j]&&void 0!==C?C[j]:o[j])}var j=arguments.length-2;if(1===j)u.children=a;else if(1<j){C=Array(j);for(var L=0;L<j;L++)C[L]=arguments[L+2];u.children=C}return{$$typeof:i,type:s.type,key:_,ref:w,props:u,_owner:x}},o.createContext=function(s){return(s={$$typeof:C,_currentValue:s,_currentValue2:s,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:x,_context:s},s.Consumer=s},o.createElement=M,o.createFactory=function(s){var o=M.bind(null,s);return o.type=s,o},o.createRef=function(){return{current:null}},o.forwardRef=function(s){return{$$typeof:j,render:s}},o.isValidElement=O,o.lazy=function(s){return{$$typeof:$,_payload:{_status:-1,_result:s},_init:T}},o.memo=function(s,o){return{$$typeof:B,type:s,compare:void 0===o?null:o}},o.startTransition=function(s){var o=de.transition;de.transition={};try{s()}finally{de.transition=o}},o.unstable_act=X,o.useCallback=function(s,o){return pe.current.useCallback(s,o)},o.useContext=function(s){return pe.current.useContext(s)},o.useDebugValue=function(){},o.useDeferredValue=function(s){return pe.current.useDeferredValue(s)},o.useEffect=function(s,o){return pe.current.useEffect(s,o)},o.useId=function(){return pe.current.useId()},o.useImperativeHandle=function(s,o,i){return pe.current.useImperativeHandle(s,o,i)},o.useInsertionEffect=function(s,o){return pe.current.useInsertionEffect(s,o)},o.useLayoutEffect=function(s,o){return pe.current.useLayoutEffect(s,o)},o.useMemo=function(s,o){return pe.current.useMemo(s,o)},o.useReducer=function(s,o,i){return pe.current.useReducer(s,o,i)},o.useRef=function(s){return pe.current.useRef(s)},o.useState=function(s){return pe.current.useState(s)},o.useSyncExternalStore=function(s,o,i){return pe.current.useSyncExternalStore(s,o,i)},o.useTransition=function(){return pe.current.useTransition()},o.version=\"18.3.1\"},15325:(s,o,i)=>{var a=i(96131);s.exports=function arrayIncludes(s,o){return!!(null==s?0:s.length)&&a(s,o,0)>-1}},15340:()=>{},15389:(s,o,i)=>{var a=i(93663),u=i(87978),_=i(83488),w=i(56449),x=i(50583);s.exports=function baseIteratee(s){return\"function\"==typeof s?s:null==s?_:\"object\"==typeof s?w(s)?u(s[0],s[1]):a(s):x(s)}},15972:(s,o,i)=>{\"use strict\";var a=i(49724),u=i(62250),_=i(39298),w=i(92522),x=i(57382),C=w(\"IE_PROTO\"),j=Object,L=j.prototype;s.exports=x?j.getPrototypeOf:function(s){var o=_(s);if(a(o,C))return o[C];var i=o.constructor;return u(i)&&o instanceof i?i.prototype:o instanceof j?L:null}},16038:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function baseIsSet(s){return u(s)&&\"[object Set]\"==a(s)}},16426:s=>{s.exports=function(){var s=document.getSelection();if(!s.rangeCount)return function(){};for(var o=document.activeElement,i=[],a=0;a<s.rangeCount;a++)i.push(s.getRangeAt(a));switch(o.tagName.toUpperCase()){case\"INPUT\":case\"TEXTAREA\":o.blur();break;default:o=null}return s.removeAllRanges(),function(){\"Caret\"===s.type&&s.removeAllRanges(),s.rangeCount||i.forEach((function(o){s.addRange(o)})),o&&o.focus()}}},16547:(s,o,i)=>{var a=i(43360),u=i(75288),_=Object.prototype.hasOwnProperty;s.exports=function assignValue(s,o,i){var w=s[o];_.call(s,o)&&u(w,i)&&(void 0!==i||o in s)||a(s,o,i)}},16708:(s,o,i)=>{\"use strict\";var a,u=i(65606);function CorkedRequest(s){var o=this;this.next=null,this.entry=null,this.finish=function(){!function onCorkedFinish(s,o,i){var a=s.entry;s.entry=null;for(;a;){var u=a.callback;o.pendingcb--,u(i),a=a.next}o.corkedRequestsFree.next=s}(o,s)}}s.exports=Writable,Writable.WritableState=WritableState;var _={deprecate:i(94643)},w=i(40345),x=i(48287).Buffer,C=(void 0!==i.g?i.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var j,L=i(75896),B=i(65291).getHighWaterMark,$=i(86048).F,V=$.ERR_INVALID_ARG_TYPE,U=$.ERR_METHOD_NOT_IMPLEMENTED,z=$.ERR_MULTIPLE_CALLBACK,Y=$.ERR_STREAM_CANNOT_PIPE,Z=$.ERR_STREAM_DESTROYED,ee=$.ERR_STREAM_NULL_VALUES,ie=$.ERR_STREAM_WRITE_AFTER_END,ae=$.ERR_UNKNOWN_ENCODING,ce=L.errorOrDestroy;function nop(){}function WritableState(s,o,_){a=a||i(25382),s=s||{},\"boolean\"!=typeof _&&(_=o instanceof a),this.objectMode=!!s.objectMode,_&&(this.objectMode=this.objectMode||!!s.writableObjectMode),this.highWaterMark=B(this,s,\"writableHighWaterMark\",_),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var w=!1===s.decodeStrings;this.decodeStrings=!w,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){!function onwrite(s,o){var i=s._writableState,a=i.sync,_=i.writecb;if(\"function\"!=typeof _)throw new z;if(function onwriteStateUpdate(s){s.writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0}(i),o)!function onwriteError(s,o,i,a,_){--o.pendingcb,i?(u.nextTick(_,a),u.nextTick(finishMaybe,s,o),s._writableState.errorEmitted=!0,ce(s,a)):(_(a),s._writableState.errorEmitted=!0,ce(s,a),finishMaybe(s,o))}(s,i,a,o,_);else{var w=needFinish(i)||s.destroyed;w||i.corked||i.bufferProcessing||!i.bufferedRequest||clearBuffer(s,i),a?u.nextTick(afterWrite,s,i,w,_):afterWrite(s,i,w,_)}}(o,s)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(s){var o=this instanceof(a=a||i(25382));if(!o&&!j.call(Writable,this))return new Writable(s);this._writableState=new WritableState(s,this,o),this.writable=!0,s&&(\"function\"==typeof s.write&&(this._write=s.write),\"function\"==typeof s.writev&&(this._writev=s.writev),\"function\"==typeof s.destroy&&(this._destroy=s.destroy),\"function\"==typeof s.final&&(this._final=s.final)),w.call(this)}function doWrite(s,o,i,a,u,_,w){o.writelen=a,o.writecb=w,o.writing=!0,o.sync=!0,o.destroyed?o.onwrite(new Z(\"write\")):i?s._writev(u,o.onwrite):s._write(u,_,o.onwrite),o.sync=!1}function afterWrite(s,o,i,a){i||function onwriteDrain(s,o){0===o.length&&o.needDrain&&(o.needDrain=!1,s.emit(\"drain\"))}(s,o),o.pendingcb--,a(),finishMaybe(s,o)}function clearBuffer(s,o){o.bufferProcessing=!0;var i=o.bufferedRequest;if(s._writev&&i&&i.next){var a=o.bufferedRequestCount,u=new Array(a),_=o.corkedRequestsFree;_.entry=i;for(var w=0,x=!0;i;)u[w]=i,i.isBuf||(x=!1),i=i.next,w+=1;u.allBuffers=x,doWrite(s,o,!0,o.length,u,\"\",_.finish),o.pendingcb++,o.lastBufferedRequest=null,_.next?(o.corkedRequestsFree=_.next,_.next=null):o.corkedRequestsFree=new CorkedRequest(o),o.bufferedRequestCount=0}else{for(;i;){var C=i.chunk,j=i.encoding,L=i.callback;if(doWrite(s,o,!1,o.objectMode?1:C.length,C,j,L),i=i.next,o.bufferedRequestCount--,o.writing)break}null===i&&(o.lastBufferedRequest=null)}o.bufferedRequest=i,o.bufferProcessing=!1}function needFinish(s){return s.ending&&0===s.length&&null===s.bufferedRequest&&!s.finished&&!s.writing}function callFinal(s,o){s._final((function(i){o.pendingcb--,i&&ce(s,i),o.prefinished=!0,s.emit(\"prefinish\"),finishMaybe(s,o)}))}function finishMaybe(s,o){var i=needFinish(o);if(i&&(function prefinish(s,o){o.prefinished||o.finalCalled||(\"function\"!=typeof s._final||o.destroyed?(o.prefinished=!0,s.emit(\"prefinish\")):(o.pendingcb++,o.finalCalled=!0,u.nextTick(callFinal,s,o)))}(s,o),0===o.pendingcb&&(o.finished=!0,s.emit(\"finish\"),o.autoDestroy))){var a=s._readableState;(!a||a.autoDestroy&&a.endEmitted)&&s.destroy()}return i}i(56698)(Writable,w),WritableState.prototype.getBuffer=function getBuffer(){for(var s=this.bufferedRequest,o=[];s;)o.push(s),s=s.next;return o},function(){try{Object.defineProperty(WritableState.prototype,\"buffer\",{get:_.deprecate((function writableStateBufferGetter(){return this.getBuffer()}),\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\",\"DEP0003\")})}catch(s){}}(),\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(j=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function value(s){return!!j.call(this,s)||this===Writable&&(s&&s._writableState instanceof WritableState)}})):j=function realHasInstance(s){return s instanceof this},Writable.prototype.pipe=function(){ce(this,new Y)},Writable.prototype.write=function(s,o,i){var a=this._writableState,_=!1,w=!a.objectMode&&function _isUint8Array(s){return x.isBuffer(s)||s instanceof C}(s);return w&&!x.isBuffer(s)&&(s=function _uint8ArrayToBuffer(s){return x.from(s)}(s)),\"function\"==typeof o&&(i=o,o=null),w?o=\"buffer\":o||(o=a.defaultEncoding),\"function\"!=typeof i&&(i=nop),a.ending?function writeAfterEnd(s,o){var i=new ie;ce(s,i),u.nextTick(o,i)}(this,i):(w||function validChunk(s,o,i,a){var _;return null===i?_=new ee:\"string\"==typeof i||o.objectMode||(_=new V(\"chunk\",[\"string\",\"Buffer\"],i)),!_||(ce(s,_),u.nextTick(a,_),!1)}(this,a,s,i))&&(a.pendingcb++,_=function writeOrBuffer(s,o,i,a,u,_){if(!i){var w=function decodeChunk(s,o,i){s.objectMode||!1===s.decodeStrings||\"string\"!=typeof o||(o=x.from(o,i));return o}(o,a,u);a!==w&&(i=!0,u=\"buffer\",a=w)}var C=o.objectMode?1:a.length;o.length+=C;var j=o.length<o.highWaterMark;j||(o.needDrain=!0);if(o.writing||o.corked){var L=o.lastBufferedRequest;o.lastBufferedRequest={chunk:a,encoding:u,isBuf:i,callback:_,next:null},L?L.next=o.lastBufferedRequest:o.bufferedRequest=o.lastBufferedRequest,o.bufferedRequestCount+=1}else doWrite(s,o,!1,C,a,u,_);return j}(this,a,w,s,o,i)),_},Writable.prototype.cork=function(){this._writableState.corked++},Writable.prototype.uncork=function(){var s=this._writableState;s.corked&&(s.corked--,s.writing||s.corked||s.bufferProcessing||!s.bufferedRequest||clearBuffer(this,s))},Writable.prototype.setDefaultEncoding=function setDefaultEncoding(s){if(\"string\"==typeof s&&(s=s.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((s+\"\").toLowerCase())>-1))throw new ae(s);return this._writableState.defaultEncoding=s,this},Object.defineProperty(Writable.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Writable.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Writable.prototype._write=function(s,o,i){i(new U(\"_write()\"))},Writable.prototype._writev=null,Writable.prototype.end=function(s,o,i){var a=this._writableState;return\"function\"==typeof s?(i=s,s=null,o=null):\"function\"==typeof o&&(i=o,o=null),null!=s&&this.write(s,o),a.corked&&(a.corked=1,this.uncork()),a.ending||function endWritable(s,o,i){o.ending=!0,finishMaybe(s,o),i&&(o.finished?u.nextTick(i):s.once(\"finish\",i));o.ended=!0,s.writable=!1}(this,a,i),this},Object.defineProperty(Writable.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Writable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._writableState&&this._writableState.destroyed},set:function set(s){this._writableState&&(this._writableState.destroyed=s)}}),Writable.prototype.destroy=L.destroy,Writable.prototype._undestroy=L.undestroy,Writable.prototype._destroy=function(s,o){o(s)}},16946:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(98828),_=i(45807),w=Object,x=a(\"\".split);s.exports=u((function(){return!w(\"z\").propertyIsEnumerable(0)}))?function(s){return\"String\"===_(s)?x(s,\"\"):w(s)}:w},16962:(s,o)=>{o.aliasToReal={each:\"forEach\",eachRight:\"forEachRight\",entries:\"toPairs\",entriesIn:\"toPairsIn\",extend:\"assignIn\",extendAll:\"assignInAll\",extendAllWith:\"assignInAllWith\",extendWith:\"assignInWith\",first:\"head\",conforms:\"conformsTo\",matches:\"isMatch\",property:\"get\",__:\"placeholder\",F:\"stubFalse\",T:\"stubTrue\",all:\"every\",allPass:\"overEvery\",always:\"constant\",any:\"some\",anyPass:\"overSome\",apply:\"spread\",assoc:\"set\",assocPath:\"set\",complement:\"negate\",compose:\"flowRight\",contains:\"includes\",dissoc:\"unset\",dissocPath:\"unset\",dropLast:\"dropRight\",dropLastWhile:\"dropRightWhile\",equals:\"isEqual\",identical:\"eq\",indexBy:\"keyBy\",init:\"initial\",invertObj:\"invert\",juxt:\"over\",omitAll:\"omit\",nAry:\"ary\",path:\"get\",pathEq:\"matchesProperty\",pathOr:\"getOr\",paths:\"at\",pickAll:\"pick\",pipe:\"flow\",pluck:\"map\",prop:\"get\",propEq:\"matchesProperty\",propOr:\"getOr\",props:\"at\",symmetricDifference:\"xor\",symmetricDifferenceBy:\"xorBy\",symmetricDifferenceWith:\"xorWith\",takeLast:\"takeRight\",takeLastWhile:\"takeRightWhile\",unapply:\"rest\",unnest:\"flatten\",useWith:\"overArgs\",where:\"conformsTo\",whereEq:\"isMatch\",zipObj:\"zipObject\"},o.aryMethod={1:[\"assignAll\",\"assignInAll\",\"attempt\",\"castArray\",\"ceil\",\"create\",\"curry\",\"curryRight\",\"defaultsAll\",\"defaultsDeepAll\",\"floor\",\"flow\",\"flowRight\",\"fromPairs\",\"invert\",\"iteratee\",\"memoize\",\"method\",\"mergeAll\",\"methodOf\",\"mixin\",\"nthArg\",\"over\",\"overEvery\",\"overSome\",\"rest\",\"reverse\",\"round\",\"runInContext\",\"spread\",\"template\",\"trim\",\"trimEnd\",\"trimStart\",\"uniqueId\",\"words\",\"zipAll\"],2:[\"add\",\"after\",\"ary\",\"assign\",\"assignAllWith\",\"assignIn\",\"assignInAllWith\",\"at\",\"before\",\"bind\",\"bindAll\",\"bindKey\",\"chunk\",\"cloneDeepWith\",\"cloneWith\",\"concat\",\"conformsTo\",\"countBy\",\"curryN\",\"curryRightN\",\"debounce\",\"defaults\",\"defaultsDeep\",\"defaultTo\",\"delay\",\"difference\",\"divide\",\"drop\",\"dropRight\",\"dropRightWhile\",\"dropWhile\",\"endsWith\",\"eq\",\"every\",\"filter\",\"find\",\"findIndex\",\"findKey\",\"findLast\",\"findLastIndex\",\"findLastKey\",\"flatMap\",\"flatMapDeep\",\"flattenDepth\",\"forEach\",\"forEachRight\",\"forIn\",\"forInRight\",\"forOwn\",\"forOwnRight\",\"get\",\"groupBy\",\"gt\",\"gte\",\"has\",\"hasIn\",\"includes\",\"indexOf\",\"intersection\",\"invertBy\",\"invoke\",\"invokeMap\",\"isEqual\",\"isMatch\",\"join\",\"keyBy\",\"lastIndexOf\",\"lt\",\"lte\",\"map\",\"mapKeys\",\"mapValues\",\"matchesProperty\",\"maxBy\",\"meanBy\",\"merge\",\"mergeAllWith\",\"minBy\",\"multiply\",\"nth\",\"omit\",\"omitBy\",\"overArgs\",\"pad\",\"padEnd\",\"padStart\",\"parseInt\",\"partial\",\"partialRight\",\"partition\",\"pick\",\"pickBy\",\"propertyOf\",\"pull\",\"pullAll\",\"pullAt\",\"random\",\"range\",\"rangeRight\",\"rearg\",\"reject\",\"remove\",\"repeat\",\"restFrom\",\"result\",\"sampleSize\",\"some\",\"sortBy\",\"sortedIndex\",\"sortedIndexOf\",\"sortedLastIndex\",\"sortedLastIndexOf\",\"sortedUniqBy\",\"split\",\"spreadFrom\",\"startsWith\",\"subtract\",\"sumBy\",\"take\",\"takeRight\",\"takeRightWhile\",\"takeWhile\",\"tap\",\"throttle\",\"thru\",\"times\",\"trimChars\",\"trimCharsEnd\",\"trimCharsStart\",\"truncate\",\"union\",\"uniqBy\",\"uniqWith\",\"unset\",\"unzipWith\",\"without\",\"wrap\",\"xor\",\"zip\",\"zipObject\",\"zipObjectDeep\"],3:[\"assignInWith\",\"assignWith\",\"clamp\",\"differenceBy\",\"differenceWith\",\"findFrom\",\"findIndexFrom\",\"findLastFrom\",\"findLastIndexFrom\",\"getOr\",\"includesFrom\",\"indexOfFrom\",\"inRange\",\"intersectionBy\",\"intersectionWith\",\"invokeArgs\",\"invokeArgsMap\",\"isEqualWith\",\"isMatchWith\",\"flatMapDepth\",\"lastIndexOfFrom\",\"mergeWith\",\"orderBy\",\"padChars\",\"padCharsEnd\",\"padCharsStart\",\"pullAllBy\",\"pullAllWith\",\"rangeStep\",\"rangeStepRight\",\"reduce\",\"reduceRight\",\"replace\",\"set\",\"slice\",\"sortedIndexBy\",\"sortedLastIndexBy\",\"transform\",\"unionBy\",\"unionWith\",\"update\",\"xorBy\",\"xorWith\",\"zipWith\"],4:[\"fill\",\"setWith\",\"updateWith\"]},o.aryRearg={2:[1,0],3:[2,0,1],4:[3,2,0,1]},o.iterateeAry={dropRightWhile:1,dropWhile:1,every:1,filter:1,find:1,findFrom:1,findIndex:1,findIndexFrom:1,findKey:1,findLast:1,findLastFrom:1,findLastIndex:1,findLastIndexFrom:1,findLastKey:1,flatMap:1,flatMapDeep:1,flatMapDepth:1,forEach:1,forEachRight:1,forIn:1,forInRight:1,forOwn:1,forOwnRight:1,map:1,mapKeys:1,mapValues:1,partition:1,reduce:2,reduceRight:2,reject:1,remove:1,some:1,takeRightWhile:1,takeWhile:1,times:1,transform:2},o.iterateeRearg={mapKeys:[1],reduceRight:[1,0]},o.methodRearg={assignInAllWith:[1,0],assignInWith:[1,2,0],assignAllWith:[1,0],assignWith:[1,2,0],differenceBy:[1,2,0],differenceWith:[1,2,0],getOr:[2,1,0],intersectionBy:[1,2,0],intersectionWith:[1,2,0],isEqualWith:[1,2,0],isMatchWith:[2,1,0],mergeAllWith:[1,0],mergeWith:[1,2,0],padChars:[2,1,0],padCharsEnd:[2,1,0],padCharsStart:[2,1,0],pullAllBy:[2,1,0],pullAllWith:[2,1,0],rangeStep:[1,2,0],rangeStepRight:[1,2,0],setWith:[3,1,2,0],sortedIndexBy:[2,1,0],sortedLastIndexBy:[2,1,0],unionBy:[1,2,0],unionWith:[1,2,0],updateWith:[3,1,2,0],xorBy:[1,2,0],xorWith:[1,2,0],zipWith:[1,2,0]},o.methodSpread={assignAll:{start:0},assignAllWith:{start:0},assignInAll:{start:0},assignInAllWith:{start:0},defaultsAll:{start:0},defaultsDeepAll:{start:0},invokeArgs:{start:2},invokeArgsMap:{start:2},mergeAll:{start:0},mergeAllWith:{start:0},partial:{start:1},partialRight:{start:1},without:{start:1},zipAll:{start:0}},o.mutate={array:{fill:!0,pull:!0,pullAll:!0,pullAllBy:!0,pullAllWith:!0,pullAt:!0,remove:!0,reverse:!0},object:{assign:!0,assignAll:!0,assignAllWith:!0,assignIn:!0,assignInAll:!0,assignInAllWith:!0,assignInWith:!0,assignWith:!0,defaults:!0,defaultsAll:!0,defaultsDeep:!0,defaultsDeepAll:!0,merge:!0,mergeAll:!0,mergeAllWith:!0,mergeWith:!0},set:{set:!0,setWith:!0,unset:!0,update:!0,updateWith:!0}},o.realToAlias=function(){var s=Object.prototype.hasOwnProperty,i=o.aliasToReal,a={};for(var u in i){var _=i[u];s.call(a,_)?a[_].push(u):a[_]=[u]}return a}(),o.remap={assignAll:\"assign\",assignAllWith:\"assignWith\",assignInAll:\"assignIn\",assignInAllWith:\"assignInWith\",curryN:\"curry\",curryRightN:\"curryRight\",defaultsAll:\"defaults\",defaultsDeepAll:\"defaultsDeep\",findFrom:\"find\",findIndexFrom:\"findIndex\",findLastFrom:\"findLast\",findLastIndexFrom:\"findLastIndex\",getOr:\"get\",includesFrom:\"includes\",indexOfFrom:\"indexOf\",invokeArgs:\"invoke\",invokeArgsMap:\"invokeMap\",lastIndexOfFrom:\"lastIndexOf\",mergeAll:\"merge\",mergeAllWith:\"mergeWith\",padChars:\"pad\",padCharsEnd:\"padEnd\",padCharsStart:\"padStart\",propertyOf:\"get\",rangeStep:\"range\",rangeStepRight:\"rangeRight\",restFrom:\"rest\",spreadFrom:\"spread\",trimChars:\"trim\",trimCharsEnd:\"trimEnd\",trimCharsStart:\"trimStart\",zipAll:\"zip\"},o.skipFixed={castArray:!0,flow:!0,flowRight:!0,iteratee:!0,mixin:!0,rearg:!0,runInContext:!0},o.skipRearg={add:!0,assign:!0,assignIn:!0,bind:!0,bindKey:!0,concat:!0,difference:!0,divide:!0,eq:!0,gt:!0,gte:!0,isEqual:!0,lt:!0,lte:!0,matchesProperty:!0,merge:!0,multiply:!0,overArgs:!0,partial:!0,partialRight:!0,propertyOf:!0,random:!0,range:!0,rangeRight:!0,subtract:!0,zip:!0,zipObject:!0,zipObjectDeep:!0}},17255:(s,o,i)=>{var a=i(47422);s.exports=function basePropertyDeep(s){return function(o){return a(o,s)}}},17285:s=>{function source(s){return s?\"string\"==typeof s?s:s.source:null}function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>source(s))).join(\"\")}function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}s.exports=function xml(s){const o=concat(/[A-Z_]/,function optional(s){return concat(\"(\",s,\")?\")}(/[A-Z0-9_.-]*:/),/[A-Z0-9_.-]*/),i={className:\"symbol\",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\\s/,contains:[{className:\"meta-keyword\",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\\n/}]},u=s.inherit(a,{begin:/\\(/,end:/\\)/}),_=s.inherit(s.APOS_STRING_MODE,{className:\"meta-string\"}),w=s.inherit(s.QUOTE_STRING_MODE,{className:\"meta-string\"}),x={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:\"attr\",begin:/[A-Za-z0-9._:-]+/,relevance:0},{begin:/=\\s*/,relevance:0,contains:[{className:\"string\",endsParent:!0,variants:[{begin:/\"/,end:/\"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\\s\"'=<>`]+/}]}]}]};return{name:\"HTML, XML\",aliases:[\"html\",\"xhtml\",\"rss\",\"atom\",\"xjb\",\"xsd\",\"xsl\",\"plist\",\"wsf\",\"svg\"],case_insensitive:!0,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,w,_,u,{begin:/\\[/,end:/\\]/,contains:[{className:\"meta\",begin:/<![a-z]/,end:/>/,contains:[a,u,w,_]}]}]},s.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\\[CDATA\\[/,end:/\\]\\]>/,relevance:10},i,{className:\"meta\",begin:/<\\?xml/,end:/\\?>/,relevance:10},{className:\"tag\",begin:/<style(?=\\s|>)/,end:/>/,keywords:{name:\"style\"},contains:[x],starts:{end:/<\\/style>/,returnEnd:!0,subLanguage:[\"css\",\"xml\"]}},{className:\"tag\",begin:/<script(?=\\s|>)/,end:/>/,keywords:{name:\"script\"},contains:[x],starts:{end:/<\\/script>/,returnEnd:!0,subLanguage:[\"javascript\",\"handlebars\",\"xml\"]}},{className:\"tag\",begin:/<>|<\\/>/},{className:\"tag\",begin:concat(/</,lookahead(concat(o,either(/\\/>/,/>/,/\\s/)))),end:/\\/?>/,contains:[{className:\"name\",begin:o,relevance:0,starts:x}]},{className:\"tag\",begin:concat(/<\\//,lookahead(concat(o,/>/))),contains:[{className:\"name\",begin:o,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}},17400:(s,o,i)=>{var a=i(99374),u=1/0;s.exports=function toFinite(s){return s?(s=a(s))===u||s===-1/0?17976931348623157e292*(s<0?-1:1):s==s?s:0:0===s?s:0}},17533:s=>{s.exports=function yaml(s){var o=\"true false yes no null\",i=\"[\\\\w#;/?:@&=+$,.~*'()[\\\\]]+\",a={className:\"string\",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/\\S+/}],contains:[s.BACKSLASH_ESCAPE,{className:\"template-variable\",variants:[{begin:/\\{\\{/,end:/\\}\\}/},{begin:/%\\{/,end:/\\}/}]}]},u=s.inherit(a,{variants:[{begin:/'/,end:/'/},{begin:/\"/,end:/\"/},{begin:/[^\\s,{}[\\]]+/}]}),_={className:\"number\",begin:\"\\\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\\\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\\\.[0-9]*)?([ \\\\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\\\b\"},w={end:\",\",endsWithParent:!0,excludeEnd:!0,keywords:o,relevance:0},x={begin:/\\{/,end:/\\}/,contains:[w],illegal:\"\\\\n\",relevance:0},C={begin:\"\\\\[\",end:\"\\\\]\",contains:[w],illegal:\"\\\\n\",relevance:0},j=[{className:\"attr\",variants:[{begin:\"\\\\w[\\\\w :\\\\/.-]*:(?=[ \\t]|$)\"},{begin:'\"\\\\w[\\\\w :\\\\/.-]*\":(?=[ \\t]|$)'},{begin:\"'\\\\w[\\\\w :\\\\/.-]*':(?=[ \\t]|$)\"}]},{className:\"meta\",begin:\"^---\\\\s*$\",relevance:10},{className:\"string\",begin:\"[\\\\|>]([1-9]?[+-])?[ ]*\\\\n( +)[^ ][^\\\\n]*\\\\n(\\\\2[^\\\\n]+\\\\n?)*\"},{begin:\"<%[%=-]?\",end:\"[%-]?%>\",subLanguage:\"ruby\",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:\"type\",begin:\"!\\\\w+!\"+i},{className:\"type\",begin:\"!<\"+i+\">\"},{className:\"type\",begin:\"!\"+i},{className:\"type\",begin:\"!!\"+i},{className:\"meta\",begin:\"&\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"meta\",begin:\"\\\\*\"+s.UNDERSCORE_IDENT_RE+\"$\"},{className:\"bullet\",begin:\"-(?=[ ]|$)\",relevance:0},s.HASH_COMMENT_MODE,{beginKeywords:o,keywords:{literal:o}},_,{className:\"number\",begin:s.C_NUMBER_RE+\"\\\\b\",relevance:0},x,C,a],L=[...j];return L.pop(),L.push(u),w.contains=L,{name:\"YAML\",case_insensitive:!0,aliases:[\"yml\"],contains:j}}},17670:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheDelete(s){var o=a(this,s).delete(s);return this.size-=o?1:0,o}},17965:(s,o,i)=>{\"use strict\";var a=i(16426),u={\"text/plain\":\"Text\",\"text/html\":\"Url\",default:\"Text\"};s.exports=function copy(s,o){var i,_,w,x,C,j,L=!1;o||(o={}),i=o.debug||!1;try{if(w=a(),x=document.createRange(),C=document.getSelection(),(j=document.createElement(\"span\")).textContent=s,j.ariaHidden=\"true\",j.style.all=\"unset\",j.style.position=\"fixed\",j.style.top=0,j.style.clip=\"rect(0, 0, 0, 0)\",j.style.whiteSpace=\"pre\",j.style.webkitUserSelect=\"text\",j.style.MozUserSelect=\"text\",j.style.msUserSelect=\"text\",j.style.userSelect=\"text\",j.addEventListener(\"copy\",(function(a){if(a.stopPropagation(),o.format)if(a.preventDefault(),void 0===a.clipboardData){i&&console.warn(\"unable to use e.clipboardData\"),i&&console.warn(\"trying IE specific stuff\"),window.clipboardData.clearData();var _=u[o.format]||u.default;window.clipboardData.setData(_,s)}else a.clipboardData.clearData(),a.clipboardData.setData(o.format,s);o.onCopy&&(a.preventDefault(),o.onCopy(a.clipboardData))})),document.body.appendChild(j),x.selectNodeContents(j),C.addRange(x),!document.execCommand(\"copy\"))throw new Error(\"copy command was unsuccessful\");L=!0}catch(a){i&&console.error(\"unable to copy using execCommand: \",a),i&&console.warn(\"trying IE specific stuff\");try{window.clipboardData.setData(o.format||\"text\",s),o.onCopy&&o.onCopy(window.clipboardData),L=!0}catch(a){i&&console.error(\"unable to copy using clipboardData: \",a),i&&console.error(\"falling back to prompt\"),_=function format(s){var o=(/mac os x/i.test(navigator.userAgent)?\"⌘\":\"Ctrl\")+\"+C\";return s.replace(/#{\\s*key\\s*}/g,o)}(\"message\"in o?o.message:\"Copy to clipboard: #{key}, Enter\"),window.prompt(_,s)}}finally{C&&(\"function\"==typeof C.removeRange?C.removeRange(x):C.removeAllRanges()),j&&document.body.removeChild(j),w()}return L}},18073:(s,o,i)=>{var a=i(85087),u=i(54641),_=i(70981);s.exports=function createRecurry(s,o,i,w,x,C,j,L,B,$){var V=8&o;o|=V?32:64,4&(o&=~(V?64:32))||(o&=-4);var U=[s,o,x,V?C:void 0,V?j:void 0,V?void 0:C,V?void 0:j,L,B,$],z=i.apply(void 0,U);return a(s)&&u(z,U),z.placeholder=w,_(z,s,o)}},19123:(s,o,i)=>{var a=i(65606),u=i(31499),_=i(88310).Stream;function resolve(s,o,i){var a,_=function create_indent(s,o){return new Array(o||0).join(s||\"\")}(o,i=i||0),w=s;if(\"object\"==typeof s&&((w=s[a=Object.keys(s)[0]])&&w._elem))return w._elem.name=a,w._elem.icount=i,w._elem.indent=o,w._elem.indents=_,w._elem.interrupt=w,w._elem;var x,C=[],j=[];function get_attributes(s){Object.keys(s).forEach((function(o){C.push(function attribute(s,o){return s+'=\"'+u(o)+'\"'}(o,s[o]))}))}switch(typeof w){case\"object\":if(null===w)break;w._attr&&get_attributes(w._attr),w._cdata&&j.push((\"<![CDATA[\"+w._cdata).replace(/\\]\\]>/g,\"]]]]><![CDATA[>\")+\"]]>\"),w.forEach&&(x=!1,j.push(\"\"),w.forEach((function(s){\"object\"==typeof s?\"_attr\"==Object.keys(s)[0]?get_attributes(s._attr):j.push(resolve(s,o,i+1)):(j.pop(),x=!0,j.push(u(s)))})),x||j.push(\"\"));break;default:j.push(u(w))}return{name:a,interrupt:!1,attributes:C,content:j,icount:i,indents:_,indent:o}}function format(s,o,i){if(\"object\"!=typeof o)return s(!1,o);var a=o.interrupt?1:o.content.length;function proceed(){for(;o.content.length;){var u=o.content.shift();if(void 0!==u){if(interrupt(u))return;format(s,u)}}s(!1,(a>1?o.indents:\"\")+(o.name?\"</\"+o.name+\">\":\"\")+(o.indent&&!i?\"\\n\":\"\")),i&&i()}function interrupt(o){return!!o.interrupt&&(o.interrupt.append=s,o.interrupt.end=proceed,o.interrupt=!1,s(!0),!0)}if(s(!1,o.indents+(o.name?\"<\"+o.name:\"\")+(o.attributes.length?\" \"+o.attributes.join(\" \"):\"\")+(a?o.name?\">\":\"\":o.name?\"/>\":\"\")+(o.indent&&a>1?\"\\n\":\"\")),!a)return s(!1,o.indent?\"\\n\":\"\");interrupt(o)||proceed()}s.exports=function xml(s,o){\"object\"!=typeof o&&(o={indent:o});var i=o.stream?new _:null,u=\"\",w=!1,x=o.indent?!0===o.indent?\"    \":o.indent:\"\",C=!0;function delay(s){C?a.nextTick(s):s()}function append(s,o){if(void 0!==o&&(u+=o),s&&!w&&(i=i||new _,w=!0),s&&w){var a=u;delay((function(){i.emit(\"data\",a)})),u=\"\"}}function add(s,o){format(append,resolve(s,x,x?1:0),o)}function end(){if(i){var s=u;delay((function(){i.emit(\"data\",s),i.emit(\"end\"),i.readable=!1,i.emit(\"close\")}))}}return delay((function(){C=!1})),o.declaration&&function addXmlDeclaration(s){var o={version:\"1.0\",encoding:s.encoding||\"UTF-8\"};s.standalone&&(o.standalone=s.standalone),add({\"?xml\":{_attr:o}}),u=u.replace(\"/>\",\"?>\")}(o.declaration),s&&s.forEach?s.forEach((function(o,i){var a;i+1===s.length&&(a=end),add(o,a)})):add(s,end),i?(i.readable=!0,i):u},s.exports.element=s.exports.Element=function element(){var s={_elem:resolve(Array.prototype.slice.call(arguments)),push:function(s){if(!this.append)throw new Error(\"not assigned to a parent!\");var o=this,i=this._elem.indent;format(this.append,resolve(s,i,this._elem.icount+(i?1:0)),(function(){o.append(!0)}))},close:function(s){void 0!==s&&this.push(s),this.end&&this.end()}};return s}},19219:s=>{s.exports=function cacheHas(s,o){return s.has(o)}},19287:s=>{\"use strict\";s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},19358:(s,o,i)=>{\"use strict\";var a=i(85582),u=i(49724),_=i(61626),w=i(88280),x=i(79192),C=i(19595),j=i(54829),L=i(34084),B=i(32096),$=i(39259),V=i(85884),U=i(39447),z=i(7376);s.exports=function(s,o,i,Y){var Z=\"stackTraceLimit\",ee=Y?2:1,ie=s.split(\".\"),ae=ie[ie.length-1],ce=a.apply(null,ie);if(ce){var le=ce.prototype;if(!z&&u(le,\"cause\")&&delete le.cause,!i)return ce;var pe=a(\"Error\"),de=o((function(s,o){var i=B(Y?o:s,void 0),a=Y?new ce(s):new ce;return void 0!==i&&_(a,\"message\",i),V(a,de,a.stack,2),this&&w(le,this)&&L(a,this,de),arguments.length>ee&&$(a,arguments[ee]),a}));if(de.prototype=le,\"Error\"!==ae?x?x(de,pe):C(de,pe,{name:!0}):U&&Z in ce&&(j(de,ce,Z),j(de,ce,\"prepareStackTrace\")),C(de,ce),!z)try{le.name!==ae&&_(le,\"name\",ae),le.constructor=de}catch(s){}return de}}},19570:(s,o,i)=>{var a=i(37334),u=i(93243),_=i(83488),w=u?function(s,o){return u(s,\"toString\",{configurable:!0,enumerable:!1,value:a(o),writable:!0})}:_;s.exports=w},19595:(s,o,i)=>{\"use strict\";var a=i(49724),u=i(11042),_=i(13846),w=i(74284);s.exports=function(s,o,i){for(var x=u(o),C=w.f,j=_.f,L=0;L<x.length;L++){var B=x[L];a(s,B)||i&&a(i,B)||C(s,B,j(o,B))}}},19709:(s,o,i)=>{\"use strict\";var a=i(23034);s.exports=a},19846:(s,o,i)=>{\"use strict\";var a=i(20798),u=i(98828),_=i(45951).String;s.exports=!!Object.getOwnPropertySymbols&&!u((function(){var s=Symbol(\"symbol detection\");return!_(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&a&&a<41}))},19931:(s,o,i)=>{var a=i(31769),u=i(68090),_=i(68969),w=i(77797);s.exports=function baseUnset(s,o){return o=a(o,s),null==(s=_(s,o))||delete s[w(u(o))]}},20181:(s,o,i)=>{var a=/^\\s+|\\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,_=/^0b[01]+$/i,w=/^0o[0-7]+$/i,x=parseInt,C=\"object\"==typeof i.g&&i.g&&i.g.Object===Object&&i.g,j=\"object\"==typeof self&&self&&self.Object===Object&&self,L=C||j||Function(\"return this\")(),B=Object.prototype.toString,$=Math.max,V=Math.min,now=function(){return L.Date.now()};function isObject(s){var o=typeof s;return!!s&&(\"object\"==o||\"function\"==o)}function toNumber(s){if(\"number\"==typeof s)return s;if(function isSymbol(s){return\"symbol\"==typeof s||function isObjectLike(s){return!!s&&\"object\"==typeof s}(s)&&\"[object Symbol]\"==B.call(s)}(s))return NaN;if(isObject(s)){var o=\"function\"==typeof s.valueOf?s.valueOf():s;s=isObject(o)?o+\"\":o}if(\"string\"!=typeof s)return 0===s?s:+s;s=s.replace(a,\"\");var i=_.test(s);return i||w.test(s)?x(s.slice(2),i?2:8):u.test(s)?NaN:+s}s.exports=function debounce(s,o,i){var a,u,_,w,x,C,j=0,L=!1,B=!1,U=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(o){var i=a,_=u;return a=u=void 0,j=o,w=s.apply(_,i)}function shouldInvoke(s){var i=s-C;return void 0===C||i>=o||i<0||B&&s-j>=_}function timerExpired(){var s=now();if(shouldInvoke(s))return trailingEdge(s);x=setTimeout(timerExpired,function remainingWait(s){var i=o-(s-C);return B?V(i,_-(s-j)):i}(s))}function trailingEdge(s){return x=void 0,U&&a?invokeFunc(s):(a=u=void 0,w)}function debounced(){var s=now(),i=shouldInvoke(s);if(a=arguments,u=this,C=s,i){if(void 0===x)return function leadingEdge(s){return j=s,x=setTimeout(timerExpired,o),L?invokeFunc(s):w}(C);if(B)return x=setTimeout(timerExpired,o),invokeFunc(C)}return void 0===x&&(x=setTimeout(timerExpired,o)),w}return o=toNumber(o)||0,isObject(i)&&(L=!!i.leading,_=(B=\"maxWait\"in i)?$(toNumber(i.maxWait)||0,o):_,U=\"trailing\"in i?!!i.trailing:U),debounced.cancel=function cancel(){void 0!==x&&clearTimeout(x),j=0,a=C=u=x=void 0},debounced.flush=function flush(){return void 0===x?w:trailingEdge(now())},debounced}},20317:s=>{s.exports=function mapToArray(s){var o=-1,i=Array(s.size);return s.forEach((function(s,a){i[++o]=[a,s]})),i}},20334:(s,o,i)=>{\"use strict\";var a=i(48287).Buffer;class NonError extends Error{constructor(s){super(NonError._prepareSuperMessage(s)),Object.defineProperty(this,\"name\",{value:\"NonError\",configurable:!0,writable:!0}),Error.captureStackTrace&&Error.captureStackTrace(this,NonError)}static _prepareSuperMessage(s){try{return JSON.stringify(s)}catch{return String(s)}}}const u=[{property:\"name\",enumerable:!1},{property:\"message\",enumerable:!1},{property:\"stack\",enumerable:!1},{property:\"code\",enumerable:!0}],_=Symbol(\".toJSON called\"),destroyCircular=({from:s,seen:o,to_:i,forceEnumerable:w,maxDepth:x,depth:C})=>{const j=i||(Array.isArray(s)?[]:{});if(o.push(s),C>=x)return j;if(\"function\"==typeof s.toJSON&&!0!==s[_])return(s=>{s[_]=!0;const o=s.toJSON();return delete s[_],o})(s);for(const[i,u]of Object.entries(s))\"function\"==typeof a&&a.isBuffer(u)?j[i]=\"[object Buffer]\":\"function\"!=typeof u&&(u&&\"object\"==typeof u?o.includes(s[i])?j[i]=\"[Circular]\":(C++,j[i]=destroyCircular({from:s[i],seen:o.slice(),forceEnumerable:w,maxDepth:x,depth:C})):j[i]=u);for(const{property:o,enumerable:i}of u)\"string\"==typeof s[o]&&Object.defineProperty(j,o,{value:s[o],enumerable:!!w||i,configurable:!0,writable:!0});return j};s.exports={serializeError:(s,o={})=>{const{maxDepth:i=Number.POSITIVE_INFINITY}=o;return\"object\"==typeof s&&null!==s?destroyCircular({from:s,seen:[],forceEnumerable:!0,maxDepth:i,depth:0}):\"function\"==typeof s?`[Function: ${s.name||\"anonymous\"}]`:s},deserializeError:(s,o={})=>{const{maxDepth:i=Number.POSITIVE_INFINITY}=o;if(s instanceof Error)return s;if(\"object\"==typeof s&&null!==s&&!Array.isArray(s)){const o=new Error;return destroyCircular({from:s,seen:[],to_:o,maxDepth:i,depth:0}),o}return new NonError(s)}}},20426:s=>{var o=Object.prototype.hasOwnProperty;s.exports=function baseHas(s,i){return null!=s&&o.call(s,i)}},20575:(s,o,i)=>{\"use strict\";var a=i(3121);s.exports=function(s){return a(s.length)}},20798:(s,o,i)=>{\"use strict\";var a,u,_=i(45951),w=i(96794),x=_.process,C=_.Deno,j=x&&x.versions||C&&C.version,L=j&&j.v8;L&&(u=(a=L.split(\".\"))[0]>0&&a[0]<4?1:+(a[0]+a[1])),!u&&w&&(!(a=w.match(/Edge\\/(\\d+)/))||a[1]>=74)&&(a=w.match(/Chrome\\/(\\d+)/))&&(u=+a[1]),s.exports=u},20850:(s,o,i)=>{\"use strict\";s.exports=i(46076)},20999:(s,o,i)=>{var a=i(69302),u=i(36800);s.exports=function createAssigner(s){return a((function(o,i){var a=-1,_=i.length,w=_>1?i[_-1]:void 0,x=_>2?i[2]:void 0;for(w=s.length>3&&\"function\"==typeof w?(_--,w):void 0,x&&u(i[0],i[1],x)&&(w=_<3?void 0:w,_=1),o=Object(o);++a<_;){var C=i[a];C&&s(o,C,a,w)}return o}))}},21549:(s,o,i)=>{var a=i(22032),u=i(63862),_=i(66721),w=i(12749),x=i(35749);function Hash(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){var a=s[o];this.set(a[0],a[1])}}Hash.prototype.clear=a,Hash.prototype.delete=u,Hash.prototype.get=_,Hash.prototype.has=w,Hash.prototype.set=x,s.exports=Hash},21791:(s,o,i)=>{var a=i(16547),u=i(43360);s.exports=function copyObject(s,o,i,_){var w=!i;i||(i={});for(var x=-1,C=o.length;++x<C;){var j=o[x],L=_?_(i[j],s[j],j,i,s):void 0;void 0===L&&(L=s[j]),w?u(i,j,L):a(i,j,L)}return i}},21986:(s,o,i)=>{var a=i(51873),u=i(37828),_=i(75288),w=i(25911),x=i(20317),C=i(84247),j=a?a.prototype:void 0,L=j?j.valueOf:void 0;s.exports=function equalByTag(s,o,i,a,j,B,$){switch(i){case\"[object DataView]\":if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case\"[object ArrayBuffer]\":return!(s.byteLength!=o.byteLength||!B(new u(s),new u(o)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return _(+s,+o);case\"[object Error]\":return s.name==o.name&&s.message==o.message;case\"[object RegExp]\":case\"[object String]\":return s==o+\"\";case\"[object Map]\":var V=x;case\"[object Set]\":var U=1&a;if(V||(V=C),s.size!=o.size&&!U)return!1;var z=$.get(s);if(z)return z==o;a|=2,$.set(s,o);var Y=w(V(s),V(o),a,j,B,$);return $.delete(s),Y;case\"[object Symbol]\":if(L)return L.call(s)==L.call(o)}return!1}},22032:(s,o,i)=>{var a=i(81042);s.exports=function hashClear(){this.__data__=a?a(null):{},this.size=0}},22225:s=>{var o=\"\\\\ud800-\\\\udfff\",i=\"\\\\u2700-\\\\u27bf\",a=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",u=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",_=\"\\\\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\",w=\"[\"+_+\"]\",x=\"\\\\d+\",C=\"[\"+i+\"]\",j=\"[\"+a+\"]\",L=\"[^\"+o+_+x+i+a+u+\"]\",B=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",$=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",V=\"[\"+u+\"]\",U=\"(?:\"+j+\"|\"+L+\")\",z=\"(?:\"+V+\"|\"+L+\")\",Y=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",Z=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",ee=\"(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?\",ie=\"[\\\\ufe0e\\\\ufe0f]?\",ae=ie+ee+(\"(?:\\\\u200d(?:\"+[\"[^\"+o+\"]\",B,$].join(\"|\")+\")\"+ie+ee+\")*\"),ce=\"(?:\"+[C,B,$].join(\"|\")+\")\"+ae,le=RegExp([V+\"?\"+j+\"+\"+Y+\"(?=\"+[w,V,\"$\"].join(\"|\")+\")\",z+\"+\"+Z+\"(?=\"+[w,V+U,\"$\"].join(\"|\")+\")\",V+\"?\"+U+\"+\"+Y,V+\"+\"+Z,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",x,ce].join(\"|\"),\"g\");s.exports=function unicodeWords(s){return s.match(le)||[]}},22551:(s,o,i)=>{\"use strict\";var a=i(96540),u=i(69982);function p(s){for(var o=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+s,i=1;i<arguments.length;i++)o+=\"&args[]=\"+encodeURIComponent(arguments[i]);return\"Minified React error #\"+s+\"; visit \"+o+\" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"}var _=new Set,w={};function fa(s,o){ha(s,o),ha(s+\"Capture\",o)}function ha(s,o){for(w[s]=o,s=0;s<o.length;s++)_.add(o[s])}var x=!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement),C=Object.prototype.hasOwnProperty,j=/^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$/,L={},B={};function v(s,o,i,a,u,_,w){this.acceptsBooleans=2===o||3===o||4===o,this.attributeName=a,this.attributeNamespace=u,this.mustUseProperty=i,this.propertyName=s,this.type=o,this.sanitizeURL=_,this.removeEmptyString=w}var $={};\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach((function(s){$[s]=new v(s,0,!1,s,null,!1,!1)})),[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach((function(s){var o=s[0];$[o]=new v(o,1,!1,s[1],null,!1,!1)})),[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach((function(s){$[s]=new v(s,2,!1,s.toLowerCase(),null,!1,!1)})),[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach((function(s){$[s]=new v(s,2,!1,s,null,!1,!1)})),\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach((function(s){$[s]=new v(s,3,!1,s.toLowerCase(),null,!1,!1)})),[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach((function(s){$[s]=new v(s,3,!0,s,null,!1,!1)})),[\"capture\",\"download\"].forEach((function(s){$[s]=new v(s,4,!1,s,null,!1,!1)})),[\"cols\",\"rows\",\"size\",\"span\"].forEach((function(s){$[s]=new v(s,6,!1,s,null,!1,!1)})),[\"rowSpan\",\"start\"].forEach((function(s){$[s]=new v(s,5,!1,s.toLowerCase(),null,!1,!1)}));var V=/[\\-:]([a-z])/g;function sa(s){return s[1].toUpperCase()}function ta(s,o,i,a){var u=$.hasOwnProperty(o)?$[o]:null;(null!==u?0!==u.type:a||!(2<o.length)||\"o\"!==o[0]&&\"O\"!==o[0]||\"n\"!==o[1]&&\"N\"!==o[1])&&(function qa(s,o,i,a){if(null==o||function pa(s,o,i,a){if(null!==i&&0===i.type)return!1;switch(typeof o){case\"function\":case\"symbol\":return!0;case\"boolean\":return!a&&(null!==i?!i.acceptsBooleans:\"data-\"!==(s=s.toLowerCase().slice(0,5))&&\"aria-\"!==s);default:return!1}}(s,o,i,a))return!0;if(a)return!1;if(null!==i)switch(i.type){case 3:return!o;case 4:return!1===o;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}(o,i,u,a)&&(i=null),a||null===u?function oa(s){return!!C.call(B,s)||!C.call(L,s)&&(j.test(s)?B[s]=!0:(L[s]=!0,!1))}(o)&&(null===i?s.removeAttribute(o):s.setAttribute(o,\"\"+i)):u.mustUseProperty?s[u.propertyName]=null===i?3!==u.type&&\"\":i:(o=u.attributeName,a=u.attributeNamespace,null===i?s.removeAttribute(o):(i=3===(u=u.type)||4===u&&!0===i?\"\":\"\"+i,a?s.setAttributeNS(a,o,i):s.setAttribute(o,i))))}\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach((function(s){var o=s.replace(V,sa);$[o]=new v(o,1,!1,s,null,!1,!1)})),\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach((function(s){var o=s.replace(V,sa);$[o]=new v(o,1,!1,s,\"http://www.w3.org/1999/xlink\",!1,!1)})),[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach((function(s){var o=s.replace(V,sa);$[o]=new v(o,1,!1,s,\"http://www.w3.org/XML/1998/namespace\",!1,!1)})),[\"tabIndex\",\"crossOrigin\"].forEach((function(s){$[s]=new v(s,1,!1,s.toLowerCase(),null,!1,!1)})),$.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1),[\"src\",\"href\",\"action\",\"formAction\"].forEach((function(s){$[s]=new v(s,1,!1,s.toLowerCase(),null,!0,!0)}));var U=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,z=Symbol.for(\"react.element\"),Y=Symbol.for(\"react.portal\"),Z=Symbol.for(\"react.fragment\"),ee=Symbol.for(\"react.strict_mode\"),ie=Symbol.for(\"react.profiler\"),ae=Symbol.for(\"react.provider\"),ce=Symbol.for(\"react.context\"),le=Symbol.for(\"react.forward_ref\"),pe=Symbol.for(\"react.suspense\"),de=Symbol.for(\"react.suspense_list\"),fe=Symbol.for(\"react.memo\"),ye=Symbol.for(\"react.lazy\");Symbol.for(\"react.scope\"),Symbol.for(\"react.debug_trace_mode\");var be=Symbol.for(\"react.offscreen\");Symbol.for(\"react.legacy_hidden\"),Symbol.for(\"react.cache\"),Symbol.for(\"react.tracing_marker\");var _e=Symbol.iterator;function Ka(s){return null===s||\"object\"!=typeof s?null:\"function\"==typeof(s=_e&&s[_e]||s[\"@@iterator\"])?s:null}var Se,we=Object.assign;function Ma(s){if(void 0===Se)try{throw Error()}catch(s){var o=s.stack.trim().match(/\\n( *(at )?)/);Se=o&&o[1]||\"\"}return\"\\n\"+Se+s}var xe=!1;function Oa(s,o){if(!s||xe)return\"\";xe=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,\"props\",{set:function(){throw Error()}}),\"object\"==typeof Reflect&&Reflect.construct){try{Reflect.construct(o,[])}catch(s){var a=s}Reflect.construct(s,[],o)}else{try{o.call()}catch(s){a=s}s.call(o.prototype)}else{try{throw Error()}catch(s){a=s}s()}}catch(o){if(o&&a&&\"string\"==typeof o.stack){for(var u=o.stack.split(\"\\n\"),_=a.stack.split(\"\\n\"),w=u.length-1,x=_.length-1;1<=w&&0<=x&&u[w]!==_[x];)x--;for(;1<=w&&0<=x;w--,x--)if(u[w]!==_[x]){if(1!==w||1!==x)do{if(w--,0>--x||u[w]!==_[x]){var C=\"\\n\"+u[w].replace(\" at new \",\" at \");return s.displayName&&C.includes(\"<anonymous>\")&&(C=C.replace(\"<anonymous>\",s.displayName)),C}}while(1<=w&&0<=x);break}}}finally{xe=!1,Error.prepareStackTrace=i}return(s=s?s.displayName||s.name:\"\")?Ma(s):\"\"}function Pa(s){switch(s.tag){case 5:return Ma(s.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return s=Oa(s.type,!1);case 11:return s=Oa(s.type.render,!1);case 1:return s=Oa(s.type,!0);default:return\"\"}}function Qa(s){if(null==s)return null;if(\"function\"==typeof s)return s.displayName||s.name||null;if(\"string\"==typeof s)return s;switch(s){case Z:return\"Fragment\";case Y:return\"Portal\";case ie:return\"Profiler\";case ee:return\"StrictMode\";case pe:return\"Suspense\";case de:return\"SuspenseList\"}if(\"object\"==typeof s)switch(s.$$typeof){case ce:return(s.displayName||\"Context\")+\".Consumer\";case ae:return(s._context.displayName||\"Context\")+\".Provider\";case le:var o=s.render;return(s=s.displayName)||(s=\"\"!==(s=o.displayName||o.name||\"\")?\"ForwardRef(\"+s+\")\":\"ForwardRef\"),s;case fe:return null!==(o=s.displayName||null)?o:Qa(s.type)||\"Memo\";case ye:o=s._payload,s=s._init;try{return Qa(s(o))}catch(s){}}return null}function Ra(s){var o=s.type;switch(s.tag){case 24:return\"Cache\";case 9:return(o.displayName||\"Context\")+\".Consumer\";case 10:return(o._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return s=(s=o.render).displayName||s.name||\"\",o.displayName||(\"\"!==s?\"ForwardRef(\"+s+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return o;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(o);case 8:return o===ee?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";case 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"==typeof o)return o.displayName||o.name||null;if(\"string\"==typeof o)return o}return null}function Sa(s){switch(typeof s){case\"boolean\":case\"number\":case\"string\":case\"undefined\":case\"object\":return s;default:return\"\"}}function Ta(s){var o=s.type;return(s=s.nodeName)&&\"input\"===s.toLowerCase()&&(\"checkbox\"===o||\"radio\"===o)}function Va(s){s._valueTracker||(s._valueTracker=function Ua(s){var o=Ta(s)?\"checked\":\"value\",i=Object.getOwnPropertyDescriptor(s.constructor.prototype,o),a=\"\"+s[o];if(!s.hasOwnProperty(o)&&void 0!==i&&\"function\"==typeof i.get&&\"function\"==typeof i.set){var u=i.get,_=i.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return u.call(this)},set:function(s){a=\"\"+s,_.call(this,s)}}),Object.defineProperty(s,o,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(s){a=\"\"+s},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}(s))}function Wa(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var i=o.getValue(),a=\"\";return s&&(a=Ta(s)?s.checked?\"true\":\"false\":s.value),(s=a)!==i&&(o.setValue(s),!0)}function Xa(s){if(void 0===(s=s||(\"undefined\"!=typeof document?document:void 0)))return null;try{return s.activeElement||s.body}catch(o){return s.body}}function Ya(s,o){var i=o.checked;return we({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=i?i:s._wrapperState.initialChecked})}function Za(s,o){var i=null==o.defaultValue?\"\":o.defaultValue,a=null!=o.checked?o.checked:o.defaultChecked;i=Sa(null!=o.value?o.value:i),s._wrapperState={initialChecked:a,initialValue:i,controlled:\"checkbox\"===o.type||\"radio\"===o.type?null!=o.checked:null!=o.value}}function ab(s,o){null!=(o=o.checked)&&ta(s,\"checked\",o,!1)}function bb(s,o){ab(s,o);var i=Sa(o.value),a=o.type;if(null!=i)\"number\"===a?(0===i&&\"\"===s.value||s.value!=i)&&(s.value=\"\"+i):s.value!==\"\"+i&&(s.value=\"\"+i);else if(\"submit\"===a||\"reset\"===a)return void s.removeAttribute(\"value\");o.hasOwnProperty(\"value\")?cb(s,o.type,i):o.hasOwnProperty(\"defaultValue\")&&cb(s,o.type,Sa(o.defaultValue)),null==o.checked&&null!=o.defaultChecked&&(s.defaultChecked=!!o.defaultChecked)}function db(s,o,i){if(o.hasOwnProperty(\"value\")||o.hasOwnProperty(\"defaultValue\")){var a=o.type;if(!(\"submit\"!==a&&\"reset\"!==a||void 0!==o.value&&null!==o.value))return;o=\"\"+s._wrapperState.initialValue,i||o===s.value||(s.value=o),s.defaultValue=o}\"\"!==(i=s.name)&&(s.name=\"\"),s.defaultChecked=!!s._wrapperState.initialChecked,\"\"!==i&&(s.name=i)}function cb(s,o,i){\"number\"===o&&Xa(s.ownerDocument)===s||(null==i?s.defaultValue=\"\"+s._wrapperState.initialValue:s.defaultValue!==\"\"+i&&(s.defaultValue=\"\"+i))}var Pe=Array.isArray;function fb(s,o,i,a){if(s=s.options,o){o={};for(var u=0;u<i.length;u++)o[\"$\"+i[u]]=!0;for(i=0;i<s.length;i++)u=o.hasOwnProperty(\"$\"+s[i].value),s[i].selected!==u&&(s[i].selected=u),u&&a&&(s[i].defaultSelected=!0)}else{for(i=\"\"+Sa(i),o=null,u=0;u<s.length;u++){if(s[u].value===i)return s[u].selected=!0,void(a&&(s[u].defaultSelected=!0));null!==o||s[u].disabled||(o=s[u])}null!==o&&(o.selected=!0)}}function gb(s,o){if(null!=o.dangerouslySetInnerHTML)throw Error(p(91));return we({},o,{value:void 0,defaultValue:void 0,children:\"\"+s._wrapperState.initialValue})}function hb(s,o){var i=o.value;if(null==i){if(i=o.children,o=o.defaultValue,null!=i){if(null!=o)throw Error(p(92));if(Pe(i)){if(1<i.length)throw Error(p(93));i=i[0]}o=i}null==o&&(o=\"\"),i=o}s._wrapperState={initialValue:Sa(i)}}function ib(s,o){var i=Sa(o.value),a=Sa(o.defaultValue);null!=i&&((i=\"\"+i)!==s.value&&(s.value=i),null==o.defaultValue&&s.defaultValue!==i&&(s.defaultValue=i)),null!=a&&(s.defaultValue=\"\"+a)}function jb(s){var o=s.textContent;o===s._wrapperState.initialValue&&\"\"!==o&&null!==o&&(s.value=o)}function kb(s){switch(s){case\"svg\":return\"http://www.w3.org/2000/svg\";case\"math\":return\"http://www.w3.org/1998/Math/MathML\";default:return\"http://www.w3.org/1999/xhtml\"}}function lb(s,o){return null==s||\"http://www.w3.org/1999/xhtml\"===s?kb(o):\"http://www.w3.org/2000/svg\"===s&&\"foreignObject\"===o?\"http://www.w3.org/1999/xhtml\":s}var Te,Re,$e=(Re=function(s,o){if(\"http://www.w3.org/2000/svg\"!==s.namespaceURI||\"innerHTML\"in s)s.innerHTML=o;else{for((Te=Te||document.createElement(\"div\")).innerHTML=\"<svg>\"+o.valueOf().toString()+\"</svg>\",o=Te.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;o.firstChild;)s.appendChild(o.firstChild)}},\"undefined\"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(s,o,i,a){MSApp.execUnsafeLocalFunction((function(){return Re(s,o)}))}:Re);function ob(s,o){if(o){var i=s.firstChild;if(i&&i===s.lastChild&&3===i.nodeType)return void(i.nodeValue=o)}s.textContent=o}var qe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ze=[\"Webkit\",\"ms\",\"Moz\",\"O\"];function rb(s,o,i){return null==o||\"boolean\"==typeof o||\"\"===o?\"\":i||\"number\"!=typeof o||0===o||qe.hasOwnProperty(s)&&qe[s]?(\"\"+o).trim():o+\"px\"}function sb(s,o){for(var i in s=s.style,o)if(o.hasOwnProperty(i)){var a=0===i.indexOf(\"--\"),u=rb(i,o[i],a);\"float\"===i&&(i=\"cssFloat\"),a?s.setProperty(i,u):s[i]=u}}Object.keys(qe).forEach((function(s){ze.forEach((function(o){o=o+s.charAt(0).toUpperCase()+s.substring(1),qe[o]=qe[s]}))}));var We=we({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(s,o){if(o){if(We[s]&&(null!=o.children||null!=o.dangerouslySetInnerHTML))throw Error(p(137,s));if(null!=o.dangerouslySetInnerHTML){if(null!=o.children)throw Error(p(60));if(\"object\"!=typeof o.dangerouslySetInnerHTML||!(\"__html\"in o.dangerouslySetInnerHTML))throw Error(p(61))}if(null!=o.style&&\"object\"!=typeof o.style)throw Error(p(62))}}function vb(s,o){if(-1===s.indexOf(\"-\"))return\"string\"==typeof o.is;switch(s){case\"annotation-xml\":case\"color-profile\":case\"font-face\":case\"font-face-src\":case\"font-face-uri\":case\"font-face-format\":case\"font-face-name\":case\"missing-glyph\":return!1;default:return!0}}var He=null;function xb(s){return(s=s.target||s.srcElement||window).correspondingUseElement&&(s=s.correspondingUseElement),3===s.nodeType?s.parentNode:s}var Ye=null,Xe=null,Qe=null;function Bb(s){if(s=Cb(s)){if(\"function\"!=typeof Ye)throw Error(p(280));var o=s.stateNode;o&&(o=Db(o),Ye(s.stateNode,s.type,o))}}function Eb(s){Xe?Qe?Qe.push(s):Qe=[s]:Xe=s}function Fb(){if(Xe){var s=Xe,o=Qe;if(Qe=Xe=null,Bb(s),o)for(s=0;s<o.length;s++)Bb(o[s])}}function Gb(s,o){return s(o)}function Hb(){}var et=!1;function Jb(s,o,i){if(et)return s(o,i);et=!0;try{return Gb(s,o,i)}finally{et=!1,(null!==Xe||null!==Qe)&&(Hb(),Fb())}}function Kb(s,o){var i=s.stateNode;if(null===i)return null;var a=Db(i);if(null===a)return null;i=a[o];e:switch(o){case\"onClick\":case\"onClickCapture\":case\"onDoubleClick\":case\"onDoubleClickCapture\":case\"onMouseDown\":case\"onMouseDownCapture\":case\"onMouseMove\":case\"onMouseMoveCapture\":case\"onMouseUp\":case\"onMouseUpCapture\":case\"onMouseEnter\":(a=!a.disabled)||(a=!(\"button\"===(s=s.type)||\"input\"===s||\"select\"===s||\"textarea\"===s)),s=!a;break e;default:s=!1}if(s)return null;if(i&&\"function\"!=typeof i)throw Error(p(231,o,typeof i));return i}var tt=!1;if(x)try{var rt={};Object.defineProperty(rt,\"passive\",{get:function(){tt=!0}}),window.addEventListener(\"test\",rt,rt),window.removeEventListener(\"test\",rt,rt)}catch(Re){tt=!1}function Nb(s,o,i,a,u,_,w,x,C){var j=Array.prototype.slice.call(arguments,3);try{o.apply(i,j)}catch(s){this.onError(s)}}var nt=!1,st=null,ot=!1,it=null,at={onError:function(s){nt=!0,st=s}};function Tb(s,o,i,a,u,_,w,x,C){nt=!1,st=null,Nb.apply(at,arguments)}function Vb(s){var o=s,i=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do{!!(4098&(o=s).flags)&&(i=o.return),s=o.return}while(s)}return 3===o.tag?i:null}function Wb(s){if(13===s.tag){var o=s.memoizedState;if(null===o&&(null!==(s=s.alternate)&&(o=s.memoizedState)),null!==o)return o.dehydrated}return null}function Xb(s){if(Vb(s)!==s)throw Error(p(188))}function Zb(s){return null!==(s=function Yb(s){var o=s.alternate;if(!o){if(null===(o=Vb(s)))throw Error(p(188));return o!==s?null:s}for(var i=s,a=o;;){var u=i.return;if(null===u)break;var _=u.alternate;if(null===_){if(null!==(a=u.return)){i=a;continue}break}if(u.child===_.child){for(_=u.child;_;){if(_===i)return Xb(u),s;if(_===a)return Xb(u),o;_=_.sibling}throw Error(p(188))}if(i.return!==a.return)i=u,a=_;else{for(var w=!1,x=u.child;x;){if(x===i){w=!0,i=u,a=_;break}if(x===a){w=!0,a=u,i=_;break}x=x.sibling}if(!w){for(x=_.child;x;){if(x===i){w=!0,i=_,a=u;break}if(x===a){w=!0,a=_,i=u;break}x=x.sibling}if(!w)throw Error(p(189))}}if(i.alternate!==a)throw Error(p(190))}if(3!==i.tag)throw Error(p(188));return i.stateNode.current===i?s:o}(s))?$b(s):null}function $b(s){if(5===s.tag||6===s.tag)return s;for(s=s.child;null!==s;){var o=$b(s);if(null!==o)return o;s=s.sibling}return null}var ct=u.unstable_scheduleCallback,lt=u.unstable_cancelCallback,ut=u.unstable_shouldYield,pt=u.unstable_requestPaint,ht=u.unstable_now,dt=u.unstable_getCurrentPriorityLevel,mt=u.unstable_ImmediatePriority,gt=u.unstable_UserBlockingPriority,yt=u.unstable_NormalPriority,vt=u.unstable_LowPriority,bt=u.unstable_IdlePriority,_t=null,St=null;var Et=Math.clz32?Math.clz32:function nc(s){return s>>>=0,0===s?32:31-(wt(s)/xt|0)|0},wt=Math.log,xt=Math.LN2;var kt=64,Ot=4194304;function tc(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&s;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&s;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function uc(s,o){var i=s.pendingLanes;if(0===i)return 0;var a=0,u=s.suspendedLanes,_=s.pingedLanes,w=268435455&i;if(0!==w){var x=w&~u;0!==x?a=tc(x):0!==(_&=w)&&(a=tc(_))}else 0!==(w=i&~u)?a=tc(w):0!==_&&(a=tc(_));if(0===a)return 0;if(0!==o&&o!==a&&!(o&u)&&((u=a&-a)>=(_=o&-o)||16===u&&4194240&_))return o;if(4&a&&(a|=16&i),0!==(o=s.entangledLanes))for(s=s.entanglements,o&=a;0<o;)u=1<<(i=31-Et(o)),a|=s[i],o&=~u;return a}function vc(s,o){switch(s){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;default:return-1}}function xc(s){return 0!==(s=-1073741825&s.pendingLanes)?s:1073741824&s?1073741824:0}function yc(){var s=kt;return!(4194240&(kt<<=1))&&(kt=64),s}function zc(s){for(var o=[],i=0;31>i;i++)o.push(s);return o}function Ac(s,o,i){s.pendingLanes|=o,536870912!==o&&(s.suspendedLanes=0,s.pingedLanes=0),(s=s.eventTimes)[o=31-Et(o)]=i}function Cc(s,o){var i=s.entangledLanes|=o;for(s=s.entanglements;i;){var a=31-Et(i),u=1<<a;u&o|s[a]&o&&(s[a]|=o),i&=~u}}var Ct=0;function Dc(s){return 1<(s&=-s)?4<s?268435455&s?16:536870912:4:1}var At,jt,Pt,It,Tt,Nt=!1,Mt=[],Rt=null,Dt=null,Lt=null,Ft=new Map,Bt=new Map,$t=[],qt=\"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit\".split(\" \");function Sc(s,o){switch(s){case\"focusin\":case\"focusout\":Rt=null;break;case\"dragenter\":case\"dragleave\":Dt=null;break;case\"mouseover\":case\"mouseout\":Lt=null;break;case\"pointerover\":case\"pointerout\":Ft.delete(o.pointerId);break;case\"gotpointercapture\":case\"lostpointercapture\":Bt.delete(o.pointerId)}}function Tc(s,o,i,a,u,_){return null===s||s.nativeEvent!==_?(s={blockedOn:o,domEventName:i,eventSystemFlags:a,nativeEvent:_,targetContainers:[u]},null!==o&&(null!==(o=Cb(o))&&jt(o)),s):(s.eventSystemFlags|=a,o=s.targetContainers,null!==u&&-1===o.indexOf(u)&&o.push(u),s)}function Vc(s){var o=Wc(s.target);if(null!==o){var i=Vb(o);if(null!==i)if(13===(o=i.tag)){if(null!==(o=Wb(i)))return s.blockedOn=o,void Tt(s.priority,(function(){Pt(i)}))}else if(3===o&&i.stateNode.current.memoizedState.isDehydrated)return void(s.blockedOn=3===i.tag?i.stateNode.containerInfo:null)}s.blockedOn=null}function Xc(s){if(null!==s.blockedOn)return!1;for(var o=s.targetContainers;0<o.length;){var i=Yc(s.domEventName,s.eventSystemFlags,o[0],s.nativeEvent);if(null!==i)return null!==(o=Cb(i))&&jt(o),s.blockedOn=i,!1;var a=new(i=s.nativeEvent).constructor(i.type,i);He=a,i.target.dispatchEvent(a),He=null,o.shift()}return!0}function Zc(s,o,i){Xc(s)&&i.delete(o)}function $c(){Nt=!1,null!==Rt&&Xc(Rt)&&(Rt=null),null!==Dt&&Xc(Dt)&&(Dt=null),null!==Lt&&Xc(Lt)&&(Lt=null),Ft.forEach(Zc),Bt.forEach(Zc)}function ad(s,o){s.blockedOn===o&&(s.blockedOn=null,Nt||(Nt=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,$c)))}function bd(s){function b(o){return ad(o,s)}if(0<Mt.length){ad(Mt[0],s);for(var o=1;o<Mt.length;o++){var i=Mt[o];i.blockedOn===s&&(i.blockedOn=null)}}for(null!==Rt&&ad(Rt,s),null!==Dt&&ad(Dt,s),null!==Lt&&ad(Lt,s),Ft.forEach(b),Bt.forEach(b),o=0;o<$t.length;o++)(i=$t[o]).blockedOn===s&&(i.blockedOn=null);for(;0<$t.length&&null===(o=$t[0]).blockedOn;)Vc(o),null===o.blockedOn&&$t.shift()}var Vt=U.ReactCurrentBatchConfig,Ut=!0;function ed(s,o,i,a){var u=Ct,_=Vt.transition;Vt.transition=null;try{Ct=1,fd(s,o,i,a)}finally{Ct=u,Vt.transition=_}}function gd(s,o,i,a){var u=Ct,_=Vt.transition;Vt.transition=null;try{Ct=4,fd(s,o,i,a)}finally{Ct=u,Vt.transition=_}}function fd(s,o,i,a){if(Ut){var u=Yc(s,o,i,a);if(null===u)hd(s,o,a,zt,i),Sc(s,a);else if(function Uc(s,o,i,a,u){switch(o){case\"focusin\":return Rt=Tc(Rt,s,o,i,a,u),!0;case\"dragenter\":return Dt=Tc(Dt,s,o,i,a,u),!0;case\"mouseover\":return Lt=Tc(Lt,s,o,i,a,u),!0;case\"pointerover\":var _=u.pointerId;return Ft.set(_,Tc(Ft.get(_)||null,s,o,i,a,u)),!0;case\"gotpointercapture\":return _=u.pointerId,Bt.set(_,Tc(Bt.get(_)||null,s,o,i,a,u)),!0}return!1}(u,s,o,i,a))a.stopPropagation();else if(Sc(s,a),4&o&&-1<qt.indexOf(s)){for(;null!==u;){var _=Cb(u);if(null!==_&&At(_),null===(_=Yc(s,o,i,a))&&hd(s,o,a,zt,i),_===u)break;u=_}null!==u&&a.stopPropagation()}else hd(s,o,a,null,i)}}var zt=null;function Yc(s,o,i,a){if(zt=null,null!==(s=Wc(s=xb(a))))if(null===(o=Vb(s)))s=null;else if(13===(i=o.tag)){if(null!==(s=Wb(o)))return s;s=null}else if(3===i){if(o.stateNode.current.memoizedState.isDehydrated)return 3===o.tag?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null);return zt=s,null}function jd(s){switch(s){case\"cancel\":case\"click\":case\"close\":case\"contextmenu\":case\"copy\":case\"cut\":case\"auxclick\":case\"dblclick\":case\"dragend\":case\"dragstart\":case\"drop\":case\"focusin\":case\"focusout\":case\"input\":case\"invalid\":case\"keydown\":case\"keypress\":case\"keyup\":case\"mousedown\":case\"mouseup\":case\"paste\":case\"pause\":case\"play\":case\"pointercancel\":case\"pointerdown\":case\"pointerup\":case\"ratechange\":case\"reset\":case\"resize\":case\"seeked\":case\"submit\":case\"touchcancel\":case\"touchend\":case\"touchstart\":case\"volumechange\":case\"change\":case\"selectionchange\":case\"textInput\":case\"compositionstart\":case\"compositionend\":case\"compositionupdate\":case\"beforeblur\":case\"afterblur\":case\"beforeinput\":case\"blur\":case\"fullscreenchange\":case\"focus\":case\"hashchange\":case\"popstate\":case\"select\":case\"selectstart\":return 1;case\"drag\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"mousemove\":case\"mouseout\":case\"mouseover\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"scroll\":case\"toggle\":case\"touchmove\":case\"wheel\":case\"mouseenter\":case\"mouseleave\":case\"pointerenter\":case\"pointerleave\":return 4;case\"message\":switch(dt()){case mt:return 1;case gt:return 4;case yt:case vt:return 16;case bt:return 536870912;default:return 16}default:return 16}}var Wt=null,Jt=null,Ht=null;function nd(){if(Ht)return Ht;var s,o,i=Jt,a=i.length,u=\"value\"in Wt?Wt.value:Wt.textContent,_=u.length;for(s=0;s<a&&i[s]===u[s];s++);var w=a-s;for(o=1;o<=w&&i[a-o]===u[_-o];o++);return Ht=u.slice(s,1<o?1-o:void 0)}function od(s){var o=s.keyCode;return\"charCode\"in s?0===(s=s.charCode)&&13===o&&(s=13):s=o,10===s&&(s=13),32<=s||13===s?s:0}function pd(){return!0}function qd(){return!1}function rd(s){function b(o,i,a,u,_){for(var w in this._reactName=o,this._targetInst=a,this.type=i,this.nativeEvent=u,this.target=_,this.currentTarget=null,s)s.hasOwnProperty(w)&&(o=s[w],this[w]=o?o(u):u[w]);return this.isDefaultPrevented=(null!=u.defaultPrevented?u.defaultPrevented:!1===u.returnValue)?pd:qd,this.isPropagationStopped=qd,this}return we(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():\"unknown\"!=typeof s.returnValue&&(s.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():\"unknown\"!=typeof s.cancelBubble&&(s.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),b}var Kt,Gt,Yt,Xt={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qt=rd(Xt),Zt=we({},Xt,{view:0,detail:0}),er=rd(Zt),tr=we({},Zt,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(s){return void 0===s.relatedTarget?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return\"movementX\"in s?s.movementX:(s!==Yt&&(Yt&&\"mousemove\"===s.type?(Kt=s.screenX-Yt.screenX,Gt=s.screenY-Yt.screenY):Gt=Kt=0,Yt=s),Kt)},movementY:function(s){return\"movementY\"in s?s.movementY:Gt}}),rr=rd(tr),nr=rd(we({},tr,{dataTransfer:0})),sr=rd(we({},Zt,{relatedTarget:0})),ir=rd(we({},Xt,{animationName:0,elapsedTime:0,pseudoElement:0})),ar=we({},Xt,{clipboardData:function(s){return\"clipboardData\"in s?s.clipboardData:window.clipboardData}}),cr=rd(ar),lr=rd(we({},Xt,{data:0})),ur={Esc:\"Escape\",Spacebar:\" \",Left:\"ArrowLeft\",Up:\"ArrowUp\",Right:\"ArrowRight\",Down:\"ArrowDown\",Del:\"Delete\",Win:\"OS\",Menu:\"ContextMenu\",Apps:\"ContextMenu\",Scroll:\"ScrollLock\",MozPrintableKey:\"Unidentified\"},pr={8:\"Backspace\",9:\"Tab\",12:\"Clear\",13:\"Enter\",16:\"Shift\",17:\"Control\",18:\"Alt\",19:\"Pause\",20:\"CapsLock\",27:\"Escape\",32:\" \",33:\"PageUp\",34:\"PageDown\",35:\"End\",36:\"Home\",37:\"ArrowLeft\",38:\"ArrowUp\",39:\"ArrowRight\",40:\"ArrowDown\",45:\"Insert\",46:\"Delete\",112:\"F1\",113:\"F2\",114:\"F3\",115:\"F4\",116:\"F5\",117:\"F6\",118:\"F7\",119:\"F8\",120:\"F9\",121:\"F10\",122:\"F11\",123:\"F12\",144:\"NumLock\",145:\"ScrollLock\",224:\"Meta\"},dr={Alt:\"altKey\",Control:\"ctrlKey\",Meta:\"metaKey\",Shift:\"shiftKey\"};function Pd(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):!!(s=dr[s])&&!!o[s]}function zd(){return Pd}var fr=we({},Zt,{key:function(s){if(s.key){var o=ur[s.key]||s.key;if(\"Unidentified\"!==o)return o}return\"keypress\"===s.type?13===(s=od(s))?\"Enter\":String.fromCharCode(s):\"keydown\"===s.type||\"keyup\"===s.type?pr[s.keyCode]||\"Unidentified\":\"\"},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(s){return\"keypress\"===s.type?od(s):0},keyCode:function(s){return\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0},which:function(s){return\"keypress\"===s.type?od(s):\"keydown\"===s.type||\"keyup\"===s.type?s.keyCode:0}}),mr=rd(fr),gr=rd(we({},tr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),yr=rd(we({},Zt,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd})),vr=rd(we({},Xt,{propertyName:0,elapsedTime:0,pseudoElement:0})),br=we({},tr,{deltaX:function(s){return\"deltaX\"in s?s.deltaX:\"wheelDeltaX\"in s?-s.wheelDeltaX:0},deltaY:function(s){return\"deltaY\"in s?s.deltaY:\"wheelDeltaY\"in s?-s.wheelDeltaY:\"wheelDelta\"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),_r=rd(br),Sr=[9,13,27,32],Er=x&&\"CompositionEvent\"in window,wr=null;x&&\"documentMode\"in document&&(wr=document.documentMode);var xr=x&&\"TextEvent\"in window&&!wr,kr=x&&(!Er||wr&&8<wr&&11>=wr),Or=String.fromCharCode(32),Cr=!1;function ge(s,o){switch(s){case\"keyup\":return-1!==Sr.indexOf(o.keyCode);case\"keydown\":return 229!==o.keyCode;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function he(s){return\"object\"==typeof(s=s.detail)&&\"data\"in s?s.data:null}var Ar=!1;var jr={color:!0,date:!0,datetime:!0,\"datetime-local\":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return\"input\"===o?!!jr[s.type]:\"textarea\"===o}function ne(s,o,i,a){Eb(a),0<(o=oe(o,\"onChange\")).length&&(i=new Qt(\"onChange\",\"change\",null,i,a),s.push({event:i,listeners:o}))}var Pr=null,Ir=null;function re(s){se(s,0)}function te(s){if(Wa(ue(s)))return s}function ve(s,o){if(\"change\"===s)return o}var Tr=!1;if(x){var Nr;if(x){var Mr=\"oninput\"in document;if(!Mr){var Rr=document.createElement(\"div\");Rr.setAttribute(\"oninput\",\"return;\"),Mr=\"function\"==typeof Rr.oninput}Nr=Mr}else Nr=!1;Tr=Nr&&(!document.documentMode||9<document.documentMode)}function Ae(){Pr&&(Pr.detachEvent(\"onpropertychange\",Be),Ir=Pr=null)}function Be(s){if(\"value\"===s.propertyName&&te(Ir)){var o=[];ne(o,Ir,s,xb(s)),Jb(re,o)}}function Ce(s,o,i){\"focusin\"===s?(Ae(),Ir=i,(Pr=o).attachEvent(\"onpropertychange\",Be)):\"focusout\"===s&&Ae()}function De(s){if(\"selectionchange\"===s||\"keyup\"===s||\"keydown\"===s)return te(Ir)}function Ee(s,o){if(\"click\"===s)return te(o)}function Fe(s,o){if(\"input\"===s||\"change\"===s)return te(o)}var Dr=\"function\"==typeof Object.is?Object.is:function Ge(s,o){return s===o&&(0!==s||1/s==1/o)||s!=s&&o!=o};function Ie(s,o){if(Dr(s,o))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof o||null===o)return!1;var i=Object.keys(s),a=Object.keys(o);if(i.length!==a.length)return!1;for(a=0;a<i.length;a++){var u=i[a];if(!C.call(o,u)||!Dr(s[u],o[u]))return!1}return!0}function Je(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Ke(s,o){var i,a=Je(s);for(s=0;a;){if(3===a.nodeType){if(i=s+a.textContent.length,s<=o&&i>=o)return{node:a,offset:o-s};s=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Je(a)}}function Le(s,o){return!(!s||!o)&&(s===o||(!s||3!==s.nodeType)&&(o&&3===o.nodeType?Le(s,o.parentNode):\"contains\"in s?s.contains(o):!!s.compareDocumentPosition&&!!(16&s.compareDocumentPosition(o))))}function Me(){for(var s=window,o=Xa();o instanceof s.HTMLIFrameElement;){try{var i=\"string\"==typeof o.contentWindow.location.href}catch(s){i=!1}if(!i)break;o=Xa((s=o.contentWindow).document)}return o}function Ne(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(\"input\"===o&&(\"text\"===s.type||\"search\"===s.type||\"tel\"===s.type||\"url\"===s.type||\"password\"===s.type)||\"textarea\"===o||\"true\"===s.contentEditable)}function Oe(s){var o=Me(),i=s.focusedElem,a=s.selectionRange;if(o!==i&&i&&i.ownerDocument&&Le(i.ownerDocument.documentElement,i)){if(null!==a&&Ne(i))if(o=a.start,void 0===(s=a.end)&&(s=o),\"selectionStart\"in i)i.selectionStart=o,i.selectionEnd=Math.min(s,i.value.length);else if((s=(o=i.ownerDocument||document)&&o.defaultView||window).getSelection){s=s.getSelection();var u=i.textContent.length,_=Math.min(a.start,u);a=void 0===a.end?_:Math.min(a.end,u),!s.extend&&_>a&&(u=a,a=_,_=u),u=Ke(i,_);var w=Ke(i,a);u&&w&&(1!==s.rangeCount||s.anchorNode!==u.node||s.anchorOffset!==u.offset||s.focusNode!==w.node||s.focusOffset!==w.offset)&&((o=o.createRange()).setStart(u.node,u.offset),s.removeAllRanges(),_>a?(s.addRange(o),s.extend(w.node,w.offset)):(o.setEnd(w.node,w.offset),s.addRange(o)))}for(o=[],s=i;s=s.parentNode;)1===s.nodeType&&o.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(\"function\"==typeof i.focus&&i.focus(),i=0;i<o.length;i++)(s=o[i]).element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Lr=x&&\"documentMode\"in document&&11>=document.documentMode,Fr=null,Br=null,$r=null,qr=!1;function Ue(s,o,i){var a=i.window===i?i.document:9===i.nodeType?i:i.ownerDocument;qr||null==Fr||Fr!==Xa(a)||(\"selectionStart\"in(a=Fr)&&Ne(a)?a={start:a.selectionStart,end:a.selectionEnd}:a={anchorNode:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset},$r&&Ie($r,a)||($r=a,0<(a=oe(Br,\"onSelect\")).length&&(o=new Qt(\"onSelect\",\"select\",null,o,i),s.push({event:o,listeners:a}),o.target=Fr)))}function Ve(s,o){var i={};return i[s.toLowerCase()]=o.toLowerCase(),i[\"Webkit\"+s]=\"webkit\"+o,i[\"Moz\"+s]=\"moz\"+o,i}var Vr={animationend:Ve(\"Animation\",\"AnimationEnd\"),animationiteration:Ve(\"Animation\",\"AnimationIteration\"),animationstart:Ve(\"Animation\",\"AnimationStart\"),transitionend:Ve(\"Transition\",\"TransitionEnd\")},Ur={},zr={};function Ze(s){if(Ur[s])return Ur[s];if(!Vr[s])return s;var o,i=Vr[s];for(o in i)if(i.hasOwnProperty(o)&&o in zr)return Ur[s]=i[o];return s}x&&(zr=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),\"TransitionEvent\"in window||delete Vr.transitionend.transition);var Wr=Ze(\"animationend\"),Jr=Ze(\"animationiteration\"),Hr=Ze(\"animationstart\"),Kr=Ze(\"transitionend\"),Gr=new Map,Yr=\"abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\" \");function ff(s,o){Gr.set(s,o),fa(o,[s])}for(var Xr=0;Xr<Yr.length;Xr++){var Qr=Yr[Xr];ff(Qr.toLowerCase(),\"on\"+(Qr[0].toUpperCase()+Qr.slice(1)))}ff(Wr,\"onAnimationEnd\"),ff(Jr,\"onAnimationIteration\"),ff(Hr,\"onAnimationStart\"),ff(\"dblclick\",\"onDoubleClick\"),ff(\"focusin\",\"onFocus\"),ff(\"focusout\",\"onBlur\"),ff(Kr,\"onTransitionEnd\"),ha(\"onMouseEnter\",[\"mouseout\",\"mouseover\"]),ha(\"onMouseLeave\",[\"mouseout\",\"mouseover\"]),ha(\"onPointerEnter\",[\"pointerout\",\"pointerover\"]),ha(\"onPointerLeave\",[\"pointerout\",\"pointerover\"]),fa(\"onChange\",\"change click focusin focusout input keydown keyup selectionchange\".split(\" \")),fa(\"onSelect\",\"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\" \")),fa(\"onBeforeInput\",[\"compositionend\",\"keypress\",\"textInput\",\"paste\"]),fa(\"onCompositionEnd\",\"compositionend focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionStart\",\"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")),fa(\"onCompositionUpdate\",\"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \"));var Zr=\"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\" \"),en=new Set(\"cancel close invalid load scroll toggle\".split(\" \").concat(Zr));function nf(s,o,i){var a=s.type||\"unknown-event\";s.currentTarget=i,function Ub(s,o,i,a,u,_,w,x,C){if(Tb.apply(this,arguments),nt){if(!nt)throw Error(p(198));var j=st;nt=!1,st=null,ot||(ot=!0,it=j)}}(a,o,void 0,s),s.currentTarget=null}function se(s,o){o=!!(4&o);for(var i=0;i<s.length;i++){var a=s[i],u=a.event;a=a.listeners;e:{var _=void 0;if(o)for(var w=a.length-1;0<=w;w--){var x=a[w],C=x.instance,j=x.currentTarget;if(x=x.listener,C!==_&&u.isPropagationStopped())break e;nf(u,x,j),_=C}else for(w=0;w<a.length;w++){if(C=(x=a[w]).instance,j=x.currentTarget,x=x.listener,C!==_&&u.isPropagationStopped())break e;nf(u,x,j),_=C}}}if(ot)throw s=it,ot=!1,it=null,s}function D(s,o){var i=o[mn];void 0===i&&(i=o[mn]=new Set);var a=s+\"__bubble\";i.has(a)||(pf(o,s,2,!1),i.add(a))}function qf(s,o,i){var a=0;o&&(a|=4),pf(i,s,a,o)}var tn=\"_reactListening\"+Math.random().toString(36).slice(2);function sf(s){if(!s[tn]){s[tn]=!0,_.forEach((function(o){\"selectionchange\"!==o&&(en.has(o)||qf(o,!1,s),qf(o,!0,s))}));var o=9===s.nodeType?s:s.ownerDocument;null===o||o[tn]||(o[tn]=!0,qf(\"selectionchange\",!1,o))}}function pf(s,o,i,a){switch(jd(o)){case 1:var u=ed;break;case 4:u=gd;break;default:u=fd}i=u.bind(null,o,i,s),u=void 0,!tt||\"touchstart\"!==o&&\"touchmove\"!==o&&\"wheel\"!==o||(u=!0),a?void 0!==u?s.addEventListener(o,i,{capture:!0,passive:u}):s.addEventListener(o,i,!0):void 0!==u?s.addEventListener(o,i,{passive:u}):s.addEventListener(o,i,!1)}function hd(s,o,i,a,u){var _=a;if(!(1&o||2&o||null===a))e:for(;;){if(null===a)return;var w=a.tag;if(3===w||4===w){var x=a.stateNode.containerInfo;if(x===u||8===x.nodeType&&x.parentNode===u)break;if(4===w)for(w=a.return;null!==w;){var C=w.tag;if((3===C||4===C)&&((C=w.stateNode.containerInfo)===u||8===C.nodeType&&C.parentNode===u))return;w=w.return}for(;null!==x;){if(null===(w=Wc(x)))return;if(5===(C=w.tag)||6===C){a=_=w;continue e}x=x.parentNode}}a=a.return}Jb((function(){var a=_,u=xb(i),w=[];e:{var x=Gr.get(s);if(void 0!==x){var C=Qt,j=s;switch(s){case\"keypress\":if(0===od(i))break e;case\"keydown\":case\"keyup\":C=mr;break;case\"focusin\":j=\"focus\",C=sr;break;case\"focusout\":j=\"blur\",C=sr;break;case\"beforeblur\":case\"afterblur\":C=sr;break;case\"click\":if(2===i.button)break e;case\"auxclick\":case\"dblclick\":case\"mousedown\":case\"mousemove\":case\"mouseup\":case\"mouseout\":case\"mouseover\":case\"contextmenu\":C=rr;break;case\"drag\":case\"dragend\":case\"dragenter\":case\"dragexit\":case\"dragleave\":case\"dragover\":case\"dragstart\":case\"drop\":C=nr;break;case\"touchcancel\":case\"touchend\":case\"touchmove\":case\"touchstart\":C=yr;break;case Wr:case Jr:case Hr:C=ir;break;case Kr:C=vr;break;case\"scroll\":C=er;break;case\"wheel\":C=_r;break;case\"copy\":case\"cut\":case\"paste\":C=cr;break;case\"gotpointercapture\":case\"lostpointercapture\":case\"pointercancel\":case\"pointerdown\":case\"pointermove\":case\"pointerout\":case\"pointerover\":case\"pointerup\":C=gr}var L=!!(4&o),B=!L&&\"scroll\"===s,$=L?null!==x?x+\"Capture\":null:x;L=[];for(var V,U=a;null!==U;){var z=(V=U).stateNode;if(5===V.tag&&null!==z&&(V=z,null!==$&&(null!=(z=Kb(U,$))&&L.push(tf(U,z,V)))),B)break;U=U.return}0<L.length&&(x=new C(x,j,null,i,u),w.push({event:x,listeners:L}))}}if(!(7&o)){if(C=\"mouseout\"===s||\"pointerout\"===s,(!(x=\"mouseover\"===s||\"pointerover\"===s)||i===He||!(j=i.relatedTarget||i.fromElement)||!Wc(j)&&!j[fn])&&(C||x)&&(x=u.window===u?u:(x=u.ownerDocument)?x.defaultView||x.parentWindow:window,C?(C=a,null!==(j=(j=i.relatedTarget||i.toElement)?Wc(j):null)&&(j!==(B=Vb(j))||5!==j.tag&&6!==j.tag)&&(j=null)):(C=null,j=a),C!==j)){if(L=rr,z=\"onMouseLeave\",$=\"onMouseEnter\",U=\"mouse\",\"pointerout\"!==s&&\"pointerover\"!==s||(L=gr,z=\"onPointerLeave\",$=\"onPointerEnter\",U=\"pointer\"),B=null==C?x:ue(C),V=null==j?x:ue(j),(x=new L(z,U+\"leave\",C,i,u)).target=B,x.relatedTarget=V,z=null,Wc(u)===a&&((L=new L($,U+\"enter\",j,i,u)).target=V,L.relatedTarget=B,z=L),B=z,C&&j)e:{for($=j,U=0,V=L=C;V;V=vf(V))U++;for(V=0,z=$;z;z=vf(z))V++;for(;0<U-V;)L=vf(L),U--;for(;0<V-U;)$=vf($),V--;for(;U--;){if(L===$||null!==$&&L===$.alternate)break e;L=vf(L),$=vf($)}L=null}else L=null;null!==C&&wf(w,x,C,L,!1),null!==j&&null!==B&&wf(w,B,j,L,!0)}if(\"select\"===(C=(x=a?ue(a):window).nodeName&&x.nodeName.toLowerCase())||\"input\"===C&&\"file\"===x.type)var Y=ve;else if(me(x))if(Tr)Y=Fe;else{Y=De;var Z=Ce}else(C=x.nodeName)&&\"input\"===C.toLowerCase()&&(\"checkbox\"===x.type||\"radio\"===x.type)&&(Y=Ee);switch(Y&&(Y=Y(s,a))?ne(w,Y,i,u):(Z&&Z(s,x,a),\"focusout\"===s&&(Z=x._wrapperState)&&Z.controlled&&\"number\"===x.type&&cb(x,\"number\",x.value)),Z=a?ue(a):window,s){case\"focusin\":(me(Z)||\"true\"===Z.contentEditable)&&(Fr=Z,Br=a,$r=null);break;case\"focusout\":$r=Br=Fr=null;break;case\"mousedown\":qr=!0;break;case\"contextmenu\":case\"mouseup\":case\"dragend\":qr=!1,Ue(w,i,u);break;case\"selectionchange\":if(Lr)break;case\"keydown\":case\"keyup\":Ue(w,i,u)}var ee;if(Er)e:{switch(s){case\"compositionstart\":var ie=\"onCompositionStart\";break e;case\"compositionend\":ie=\"onCompositionEnd\";break e;case\"compositionupdate\":ie=\"onCompositionUpdate\";break e}ie=void 0}else Ar?ge(s,i)&&(ie=\"onCompositionEnd\"):\"keydown\"===s&&229===i.keyCode&&(ie=\"onCompositionStart\");ie&&(kr&&\"ko\"!==i.locale&&(Ar||\"onCompositionStart\"!==ie?\"onCompositionEnd\"===ie&&Ar&&(ee=nd()):(Jt=\"value\"in(Wt=u)?Wt.value:Wt.textContent,Ar=!0)),0<(Z=oe(a,ie)).length&&(ie=new lr(ie,s,null,i,u),w.push({event:ie,listeners:Z}),ee?ie.data=ee:null!==(ee=he(i))&&(ie.data=ee))),(ee=xr?function je(s,o){switch(s){case\"compositionend\":return he(o);case\"keypress\":return 32!==o.which?null:(Cr=!0,Or);case\"textInput\":return(s=o.data)===Or&&Cr?null:s;default:return null}}(s,i):function ke(s,o){if(Ar)return\"compositionend\"===s||!Er&&ge(s,o)?(s=nd(),Ht=Jt=Wt=null,Ar=!1,s):null;switch(s){case\"paste\":default:return null;case\"keypress\":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case\"compositionend\":return kr&&\"ko\"!==o.locale?null:o.data}}(s,i))&&(0<(a=oe(a,\"onBeforeInput\")).length&&(u=new lr(\"onBeforeInput\",\"beforeinput\",null,i,u),w.push({event:u,listeners:a}),u.data=ee))}se(w,o)}))}function tf(s,o,i){return{instance:s,listener:o,currentTarget:i}}function oe(s,o){for(var i=o+\"Capture\",a=[];null!==s;){var u=s,_=u.stateNode;5===u.tag&&null!==_&&(u=_,null!=(_=Kb(s,i))&&a.unshift(tf(s,_,u)),null!=(_=Kb(s,o))&&a.push(tf(s,_,u))),s=s.return}return a}function vf(s){if(null===s)return null;do{s=s.return}while(s&&5!==s.tag);return s||null}function wf(s,o,i,a,u){for(var _=o._reactName,w=[];null!==i&&i!==a;){var x=i,C=x.alternate,j=x.stateNode;if(null!==C&&C===a)break;5===x.tag&&null!==j&&(x=j,u?null!=(C=Kb(i,_))&&w.unshift(tf(i,C,x)):u||null!=(C=Kb(i,_))&&w.push(tf(i,C,x))),i=i.return}0!==w.length&&s.push({event:o,listeners:w})}var rn=/\\r\\n?/g,nn=/\\u0000|\\uFFFD/g;function zf(s){return(\"string\"==typeof s?s:\"\"+s).replace(rn,\"\\n\").replace(nn,\"\")}function Af(s,o,i){if(o=zf(o),zf(s)!==o&&i)throw Error(p(425))}function Bf(){}var sn=null,on=null;function Ef(s,o){return\"textarea\"===s||\"noscript\"===s||\"string\"==typeof o.children||\"number\"==typeof o.children||\"object\"==typeof o.dangerouslySetInnerHTML&&null!==o.dangerouslySetInnerHTML&&null!=o.dangerouslySetInnerHTML.__html}var an=\"function\"==typeof setTimeout?setTimeout:void 0,cn=\"function\"==typeof clearTimeout?clearTimeout:void 0,ln=\"function\"==typeof Promise?Promise:void 0,un=\"function\"==typeof queueMicrotask?queueMicrotask:void 0!==ln?function(s){return ln.resolve(null).then(s).catch(If)}:an;function If(s){setTimeout((function(){throw s}))}function Kf(s,o){var i=o,a=0;do{var u=i.nextSibling;if(s.removeChild(i),u&&8===u.nodeType)if(\"/$\"===(i=u.data)){if(0===a)return s.removeChild(u),void bd(o);a--}else\"$\"!==i&&\"$?\"!==i&&\"$!\"!==i||a++;i=u}while(i);bd(o)}function Lf(s){for(;null!=s;s=s.nextSibling){var o=s.nodeType;if(1===o||3===o)break;if(8===o){if(\"$\"===(o=s.data)||\"$!\"===o||\"$?\"===o)break;if(\"/$\"===o)return null}}return s}function Mf(s){s=s.previousSibling;for(var o=0;s;){if(8===s.nodeType){var i=s.data;if(\"$\"===i||\"$!\"===i||\"$?\"===i){if(0===o)return s;o--}else\"/$\"===i&&o++}s=s.previousSibling}return null}var pn=Math.random().toString(36).slice(2),hn=\"__reactFiber$\"+pn,dn=\"__reactProps$\"+pn,fn=\"__reactContainer$\"+pn,mn=\"__reactEvents$\"+pn,gn=\"__reactListeners$\"+pn,yn=\"__reactHandles$\"+pn;function Wc(s){var o=s[hn];if(o)return o;for(var i=s.parentNode;i;){if(o=i[fn]||i[hn]){if(i=o.alternate,null!==o.child||null!==i&&null!==i.child)for(s=Mf(s);null!==s;){if(i=s[hn])return i;s=Mf(s)}return o}i=(s=i).parentNode}return null}function Cb(s){return!(s=s[hn]||s[fn])||5!==s.tag&&6!==s.tag&&13!==s.tag&&3!==s.tag?null:s}function ue(s){if(5===s.tag||6===s.tag)return s.stateNode;throw Error(p(33))}function Db(s){return s[dn]||null}var vn=[],bn=-1;function Uf(s){return{current:s}}function E(s){0>bn||(s.current=vn[bn],vn[bn]=null,bn--)}function G(s,o){bn++,vn[bn]=s.current,s.current=o}var _n={},Sn=Uf(_n),En=Uf(!1),wn=_n;function Yf(s,o){var i=s.type.contextTypes;if(!i)return _n;var a=s.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===o)return a.__reactInternalMemoizedMaskedChildContext;var u,_={};for(u in i)_[u]=o[u];return a&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=_),_}function Zf(s){return null!=(s=s.childContextTypes)}function $f(){E(En),E(Sn)}function ag(s,o,i){if(Sn.current!==_n)throw Error(p(168));G(Sn,o),G(En,i)}function bg(s,o,i){var a=s.stateNode;if(o=o.childContextTypes,\"function\"!=typeof a.getChildContext)return i;for(var u in a=a.getChildContext())if(!(u in o))throw Error(p(108,Ra(s)||\"Unknown\",u));return we({},i,a)}function cg(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||_n,wn=Sn.current,G(Sn,s),G(En,En.current),!0}function dg(s,o,i){var a=s.stateNode;if(!a)throw Error(p(169));i?(s=bg(s,o,wn),a.__reactInternalMemoizedMergedChildContext=s,E(En),E(Sn),G(Sn,s)):E(En),G(En,i)}var xn=null,kn=!1,On=!1;function hg(s){null===xn?xn=[s]:xn.push(s)}function jg(){if(!On&&null!==xn){On=!0;var s=0,o=Ct;try{var i=xn;for(Ct=1;s<i.length;s++){var a=i[s];do{a=a(!0)}while(null!==a)}xn=null,kn=!1}catch(o){throw null!==xn&&(xn=xn.slice(s+1)),ct(mt,jg),o}finally{Ct=o,On=!1}}return null}var Cn=[],An=0,jn=null,Pn=0,In=[],Tn=0,Nn=null,Mn=1,Rn=\"\";function tg(s,o){Cn[An++]=Pn,Cn[An++]=jn,jn=s,Pn=o}function ug(s,o,i){In[Tn++]=Mn,In[Tn++]=Rn,In[Tn++]=Nn,Nn=s;var a=Mn;s=Rn;var u=32-Et(a)-1;a&=~(1<<u),i+=1;var _=32-Et(o)+u;if(30<_){var w=u-u%5;_=(a&(1<<w)-1).toString(32),a>>=w,u-=w,Mn=1<<32-Et(o)+u|i<<u|a,Rn=_+s}else Mn=1<<_|i<<u|a,Rn=s}function vg(s){null!==s.return&&(tg(s,1),ug(s,1,0))}function wg(s){for(;s===jn;)jn=Cn[--An],Cn[An]=null,Pn=Cn[--An],Cn[An]=null;for(;s===Nn;)Nn=In[--Tn],In[Tn]=null,Rn=In[--Tn],In[Tn]=null,Mn=In[--Tn],In[Tn]=null}var Dn=null,Ln=null,Fn=!1,Bn=null;function Ag(s,o){var i=Bg(5,null,null,0);i.elementType=\"DELETED\",i.stateNode=o,i.return=s,null===(o=s.deletions)?(s.deletions=[i],s.flags|=16):o.push(i)}function Cg(s,o){switch(s.tag){case 5:var i=s.type;return null!==(o=1!==o.nodeType||i.toLowerCase()!==o.nodeName.toLowerCase()?null:o)&&(s.stateNode=o,Dn=s,Ln=Lf(o.firstChild),!0);case 6:return null!==(o=\"\"===s.pendingProps||3!==o.nodeType?null:o)&&(s.stateNode=o,Dn=s,Ln=null,!0);case 13:return null!==(o=8!==o.nodeType?null:o)&&(i=null!==Nn?{id:Mn,overflow:Rn}:null,s.memoizedState={dehydrated:o,treeContext:i,retryLane:1073741824},(i=Bg(18,null,null,0)).stateNode=o,i.return=s,s.child=i,Dn=s,Ln=null,!0);default:return!1}}function Dg(s){return!(!(1&s.mode)||128&s.flags)}function Eg(s){if(Fn){var o=Ln;if(o){var i=o;if(!Cg(s,o)){if(Dg(s))throw Error(p(418));o=Lf(i.nextSibling);var a=Dn;o&&Cg(s,o)?Ag(a,i):(s.flags=-4097&s.flags|2,Fn=!1,Dn=s)}}else{if(Dg(s))throw Error(p(418));s.flags=-4097&s.flags|2,Fn=!1,Dn=s}}}function Fg(s){for(s=s.return;null!==s&&5!==s.tag&&3!==s.tag&&13!==s.tag;)s=s.return;Dn=s}function Gg(s){if(s!==Dn)return!1;if(!Fn)return Fg(s),Fn=!0,!1;var o;if((o=3!==s.tag)&&!(o=5!==s.tag)&&(o=\"head\"!==(o=s.type)&&\"body\"!==o&&!Ef(s.type,s.memoizedProps)),o&&(o=Ln)){if(Dg(s))throw Hg(),Error(p(418));for(;o;)Ag(s,o),o=Lf(o.nextSibling)}if(Fg(s),13===s.tag){if(!(s=null!==(s=s.memoizedState)?s.dehydrated:null))throw Error(p(317));e:{for(s=s.nextSibling,o=0;s;){if(8===s.nodeType){var i=s.data;if(\"/$\"===i){if(0===o){Ln=Lf(s.nextSibling);break e}o--}else\"$\"!==i&&\"$!\"!==i&&\"$?\"!==i||o++}s=s.nextSibling}Ln=null}}else Ln=Dn?Lf(s.stateNode.nextSibling):null;return!0}function Hg(){for(var s=Ln;s;)s=Lf(s.nextSibling)}function Ig(){Ln=Dn=null,Fn=!1}function Jg(s){null===Bn?Bn=[s]:Bn.push(s)}var $n=U.ReactCurrentBatchConfig;function Lg(s,o,i){if(null!==(s=i.ref)&&\"function\"!=typeof s&&\"object\"!=typeof s){if(i._owner){if(i=i._owner){if(1!==i.tag)throw Error(p(309));var a=i.stateNode}if(!a)throw Error(p(147,s));var u=a,_=\"\"+s;return null!==o&&null!==o.ref&&\"function\"==typeof o.ref&&o.ref._stringRef===_?o.ref:(o=function(s){var o=u.refs;null===s?delete o[_]:o[_]=s},o._stringRef=_,o)}if(\"string\"!=typeof s)throw Error(p(284));if(!i._owner)throw Error(p(290,s))}return s}function Mg(s,o){throw s=Object.prototype.toString.call(o),Error(p(31,\"[object Object]\"===s?\"object with keys {\"+Object.keys(o).join(\", \")+\"}\":s))}function Ng(s){return(0,s._init)(s._payload)}function Og(s){function b(o,i){if(s){var a=o.deletions;null===a?(o.deletions=[i],o.flags|=16):a.push(i)}}function c(o,i){if(!s)return null;for(;null!==i;)b(o,i),i=i.sibling;return null}function d(s,o){for(s=new Map;null!==o;)null!==o.key?s.set(o.key,o):s.set(o.index,o),o=o.sibling;return s}function e(s,o){return(s=Pg(s,o)).index=0,s.sibling=null,s}function f(o,i,a){return o.index=a,s?null!==(a=o.alternate)?(a=a.index)<i?(o.flags|=2,i):a:(o.flags|=2,i):(o.flags|=1048576,i)}function g(o){return s&&null===o.alternate&&(o.flags|=2),o}function h(s,o,i,a){return null===o||6!==o.tag?((o=Qg(i,s.mode,a)).return=s,o):((o=e(o,i)).return=s,o)}function k(s,o,i,a){var u=i.type;return u===Z?m(s,o,i.props.children,a,i.key):null!==o&&(o.elementType===u||\"object\"==typeof u&&null!==u&&u.$$typeof===ye&&Ng(u)===o.type)?((a=e(o,i.props)).ref=Lg(s,o,i),a.return=s,a):((a=Rg(i.type,i.key,i.props,null,s.mode,a)).ref=Lg(s,o,i),a.return=s,a)}function l(s,o,i,a){return null===o||4!==o.tag||o.stateNode.containerInfo!==i.containerInfo||o.stateNode.implementation!==i.implementation?((o=Sg(i,s.mode,a)).return=s,o):((o=e(o,i.children||[])).return=s,o)}function m(s,o,i,a,u){return null===o||7!==o.tag?((o=Tg(i,s.mode,a,u)).return=s,o):((o=e(o,i)).return=s,o)}function q(s,o,i){if(\"string\"==typeof o&&\"\"!==o||\"number\"==typeof o)return(o=Qg(\"\"+o,s.mode,i)).return=s,o;if(\"object\"==typeof o&&null!==o){switch(o.$$typeof){case z:return(i=Rg(o.type,o.key,o.props,null,s.mode,i)).ref=Lg(s,null,o),i.return=s,i;case Y:return(o=Sg(o,s.mode,i)).return=s,o;case ye:return q(s,(0,o._init)(o._payload),i)}if(Pe(o)||Ka(o))return(o=Tg(o,s.mode,i,null)).return=s,o;Mg(s,o)}return null}function r(s,o,i,a){var u=null!==o?o.key:null;if(\"string\"==typeof i&&\"\"!==i||\"number\"==typeof i)return null!==u?null:h(s,o,\"\"+i,a);if(\"object\"==typeof i&&null!==i){switch(i.$$typeof){case z:return i.key===u?k(s,o,i,a):null;case Y:return i.key===u?l(s,o,i,a):null;case ye:return r(s,o,(u=i._init)(i._payload),a)}if(Pe(i)||Ka(i))return null!==u?null:m(s,o,i,a,null);Mg(s,i)}return null}function y(s,o,i,a,u){if(\"string\"==typeof a&&\"\"!==a||\"number\"==typeof a)return h(o,s=s.get(i)||null,\"\"+a,u);if(\"object\"==typeof a&&null!==a){switch(a.$$typeof){case z:return k(o,s=s.get(null===a.key?i:a.key)||null,a,u);case Y:return l(o,s=s.get(null===a.key?i:a.key)||null,a,u);case ye:return y(s,o,i,(0,a._init)(a._payload),u)}if(Pe(a)||Ka(a))return m(o,s=s.get(i)||null,a,u,null);Mg(o,a)}return null}function n(o,i,a,u){for(var _=null,w=null,x=i,C=i=0,j=null;null!==x&&C<a.length;C++){x.index>C?(j=x,x=null):j=x.sibling;var L=r(o,x,a[C],u);if(null===L){null===x&&(x=j);break}s&&x&&null===L.alternate&&b(o,x),i=f(L,i,C),null===w?_=L:w.sibling=L,w=L,x=j}if(C===a.length)return c(o,x),Fn&&tg(o,C),_;if(null===x){for(;C<a.length;C++)null!==(x=q(o,a[C],u))&&(i=f(x,i,C),null===w?_=x:w.sibling=x,w=x);return Fn&&tg(o,C),_}for(x=d(o,x);C<a.length;C++)null!==(j=y(x,o,C,a[C],u))&&(s&&null!==j.alternate&&x.delete(null===j.key?C:j.key),i=f(j,i,C),null===w?_=j:w.sibling=j,w=j);return s&&x.forEach((function(s){return b(o,s)})),Fn&&tg(o,C),_}function t(o,i,a,u){var _=Ka(a);if(\"function\"!=typeof _)throw Error(p(150));if(null==(a=_.call(a)))throw Error(p(151));for(var w=_=null,x=i,C=i=0,j=null,L=a.next();null!==x&&!L.done;C++,L=a.next()){x.index>C?(j=x,x=null):j=x.sibling;var B=r(o,x,L.value,u);if(null===B){null===x&&(x=j);break}s&&x&&null===B.alternate&&b(o,x),i=f(B,i,C),null===w?_=B:w.sibling=B,w=B,x=j}if(L.done)return c(o,x),Fn&&tg(o,C),_;if(null===x){for(;!L.done;C++,L=a.next())null!==(L=q(o,L.value,u))&&(i=f(L,i,C),null===w?_=L:w.sibling=L,w=L);return Fn&&tg(o,C),_}for(x=d(o,x);!L.done;C++,L=a.next())null!==(L=y(x,o,C,L.value,u))&&(s&&null!==L.alternate&&x.delete(null===L.key?C:L.key),i=f(L,i,C),null===w?_=L:w.sibling=L,w=L);return s&&x.forEach((function(s){return b(o,s)})),Fn&&tg(o,C),_}return function J(s,o,i,a){if(\"object\"==typeof i&&null!==i&&i.type===Z&&null===i.key&&(i=i.props.children),\"object\"==typeof i&&null!==i){switch(i.$$typeof){case z:e:{for(var u=i.key,_=o;null!==_;){if(_.key===u){if((u=i.type)===Z){if(7===_.tag){c(s,_.sibling),(o=e(_,i.props.children)).return=s,s=o;break e}}else if(_.elementType===u||\"object\"==typeof u&&null!==u&&u.$$typeof===ye&&Ng(u)===_.type){c(s,_.sibling),(o=e(_,i.props)).ref=Lg(s,_,i),o.return=s,s=o;break e}c(s,_);break}b(s,_),_=_.sibling}i.type===Z?((o=Tg(i.props.children,s.mode,a,i.key)).return=s,s=o):((a=Rg(i.type,i.key,i.props,null,s.mode,a)).ref=Lg(s,o,i),a.return=s,s=a)}return g(s);case Y:e:{for(_=i.key;null!==o;){if(o.key===_){if(4===o.tag&&o.stateNode.containerInfo===i.containerInfo&&o.stateNode.implementation===i.implementation){c(s,o.sibling),(o=e(o,i.children||[])).return=s,s=o;break e}c(s,o);break}b(s,o),o=o.sibling}(o=Sg(i,s.mode,a)).return=s,s=o}return g(s);case ye:return J(s,o,(_=i._init)(i._payload),a)}if(Pe(i))return n(s,o,i,a);if(Ka(i))return t(s,o,i,a);Mg(s,i)}return\"string\"==typeof i&&\"\"!==i||\"number\"==typeof i?(i=\"\"+i,null!==o&&6===o.tag?(c(s,o.sibling),(o=e(o,i)).return=s,s=o):(c(s,o),(o=Qg(i,s.mode,a)).return=s,s=o),g(s)):c(s,o)}}var qn=Og(!0),Vn=Og(!1),Un=Uf(null),zn=null,Wn=null,Jn=null;function $g(){Jn=Wn=zn=null}function ah(s){var o=Un.current;E(Un),s._currentValue=o}function bh(s,o,i){for(;null!==s;){var a=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,null!==a&&(a.childLanes|=o)):null!==a&&(a.childLanes&o)!==o&&(a.childLanes|=o),s===i)break;s=s.return}}function ch(s,o){zn=s,Jn=Wn=null,null!==(s=s.dependencies)&&null!==s.firstContext&&(!!(s.lanes&o)&&(bs=!0),s.firstContext=null)}function eh(s){var o=s._currentValue;if(Jn!==s)if(s={context:s,memoizedValue:o,next:null},null===Wn){if(null===zn)throw Error(p(308));Wn=s,zn.dependencies={lanes:0,firstContext:s}}else Wn=Wn.next=s;return o}var Hn=null;function gh(s){null===Hn?Hn=[s]:Hn.push(s)}function hh(s,o,i,a){var u=o.interleaved;return null===u?(i.next=i,gh(o)):(i.next=u.next,u.next=i),o.interleaved=i,ih(s,a)}function ih(s,o){s.lanes|=o;var i=s.alternate;for(null!==i&&(i.lanes|=o),i=s,s=s.return;null!==s;)s.childLanes|=o,null!==(i=s.alternate)&&(i.childLanes|=o),i=s,s=s.return;return 3===i.tag?i.stateNode:null}var Kn=!1;function kh(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lh(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function mh(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:null,next:null}}function nh(s,o,i){var a=s.updateQueue;if(null===a)return null;if(a=a.shared,2&Ls){var u=a.pending;return null===u?o.next=o:(o.next=u.next,u.next=o),a.pending=o,ih(s,i)}return null===(u=a.interleaved)?(o.next=o,gh(a)):(o.next=u.next,u.next=o),a.interleaved=o,ih(s,i)}function oh(s,o,i){if(null!==(o=o.updateQueue)&&(o=o.shared,4194240&i)){var a=o.lanes;i|=a&=s.pendingLanes,o.lanes=i,Cc(s,i)}}function ph(s,o){var i=s.updateQueue,a=s.alternate;if(null!==a&&i===(a=a.updateQueue)){var u=null,_=null;if(null!==(i=i.firstBaseUpdate)){do{var w={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};null===_?u=_=w:_=_.next=w,i=i.next}while(null!==i);null===_?u=_=o:_=_.next=o}else u=_=o;return i={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:_,shared:a.shared,effects:a.effects},void(s.updateQueue=i)}null===(s=i.lastBaseUpdate)?i.firstBaseUpdate=o:s.next=o,i.lastBaseUpdate=o}function qh(s,o,i,a){var u=s.updateQueue;Kn=!1;var _=u.firstBaseUpdate,w=u.lastBaseUpdate,x=u.shared.pending;if(null!==x){u.shared.pending=null;var C=x,j=C.next;C.next=null,null===w?_=j:w.next=j,w=C;var L=s.alternate;null!==L&&((x=(L=L.updateQueue).lastBaseUpdate)!==w&&(null===x?L.firstBaseUpdate=j:x.next=j,L.lastBaseUpdate=C))}if(null!==_){var B=u.baseState;for(w=0,L=j=C=null,x=_;;){var $=x.lane,V=x.eventTime;if((a&$)===$){null!==L&&(L=L.next={eventTime:V,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var U=s,z=x;switch($=o,V=i,z.tag){case 1:if(\"function\"==typeof(U=z.payload)){B=U.call(V,B,$);break e}B=U;break e;case 3:U.flags=-65537&U.flags|128;case 0:if(null==($=\"function\"==typeof(U=z.payload)?U.call(V,B,$):U))break e;B=we({},B,$);break e;case 2:Kn=!0}}null!==x.callback&&0!==x.lane&&(s.flags|=64,null===($=u.effects)?u.effects=[x]:$.push(x))}else V={eventTime:V,lane:$,tag:x.tag,payload:x.payload,callback:x.callback,next:null},null===L?(j=L=V,C=B):L=L.next=V,w|=$;if(null===(x=x.next)){if(null===(x=u.shared.pending))break;x=($=x).next,$.next=null,u.lastBaseUpdate=$,u.shared.pending=null}}if(null===L&&(C=B),u.baseState=C,u.firstBaseUpdate=j,u.lastBaseUpdate=L,null!==(o=u.shared.interleaved)){u=o;do{w|=u.lane,u=u.next}while(u!==o)}else null===_&&(u.shared.lanes=0);Ws|=w,s.lanes=w,s.memoizedState=B}}function sh(s,o,i){if(s=o.effects,o.effects=null,null!==s)for(o=0;o<s.length;o++){var a=s[o],u=a.callback;if(null!==u){if(a.callback=null,a=i,\"function\"!=typeof u)throw Error(p(191,u));u.call(a)}}}var Gn={},Yn=Uf(Gn),Xn=Uf(Gn),Qn=Uf(Gn);function xh(s){if(s===Gn)throw Error(p(174));return s}function yh(s,o){switch(G(Qn,o),G(Xn,s),G(Yn,Gn),s=o.nodeType){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:lb(null,\"\");break;default:o=lb(o=(s=8===s?o.parentNode:o).namespaceURI||null,s=s.tagName)}E(Yn),G(Yn,o)}function zh(){E(Yn),E(Xn),E(Qn)}function Ah(s){xh(Qn.current);var o=xh(Yn.current),i=lb(o,s.type);o!==i&&(G(Xn,s),G(Yn,i))}function Bh(s){Xn.current===s&&(E(Yn),E(Xn))}var Zn=Uf(0);function Ch(s){for(var o=s;null!==o;){if(13===o.tag){var i=o.memoizedState;if(null!==i&&(null===(i=i.dehydrated)||\"$?\"===i.data||\"$!\"===i.data))return o}else if(19===o.tag&&void 0!==o.memoizedProps.revealOrder){if(128&o.flags)return o}else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===s)break;for(;null===o.sibling;){if(null===o.return||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var es=[];function Eh(){for(var s=0;s<es.length;s++)es[s]._workInProgressVersionPrimary=null;es.length=0}var ts=U.ReactCurrentDispatcher,rs=U.ReactCurrentBatchConfig,ns=0,ss=null,os=null,as=null,cs=!1,ls=!1,us=0,ps=0;function P(){throw Error(p(321))}function Mh(s,o){if(null===o)return!1;for(var i=0;i<o.length&&i<s.length;i++)if(!Dr(s[i],o[i]))return!1;return!0}function Nh(s,o,i,a,u,_){if(ns=_,ss=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,ts.current=null===s||null===s.memoizedState?ds:fs,s=i(a,u),ls){_=0;do{if(ls=!1,us=0,25<=_)throw Error(p(301));_+=1,as=os=null,o.updateQueue=null,ts.current=ms,s=i(a,u)}while(ls)}if(ts.current=hs,o=null!==os&&null!==os.next,ns=0,as=os=ss=null,cs=!1,o)throw Error(p(300));return s}function Sh(){var s=0!==us;return us=0,s}function Th(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===as?ss.memoizedState=as=s:as=as.next=s,as}function Uh(){if(null===os){var s=ss.alternate;s=null!==s?s.memoizedState:null}else s=os.next;var o=null===as?ss.memoizedState:as.next;if(null!==o)as=o,os=s;else{if(null===s)throw Error(p(310));s={memoizedState:(os=s).memoizedState,baseState:os.baseState,baseQueue:os.baseQueue,queue:os.queue,next:null},null===as?ss.memoizedState=as=s:as=as.next=s}return as}function Vh(s,o){return\"function\"==typeof o?o(s):o}function Wh(s){var o=Uh(),i=o.queue;if(null===i)throw Error(p(311));i.lastRenderedReducer=s;var a=os,u=a.baseQueue,_=i.pending;if(null!==_){if(null!==u){var w=u.next;u.next=_.next,_.next=w}a.baseQueue=u=_,i.pending=null}if(null!==u){_=u.next,a=a.baseState;var x=w=null,C=null,j=_;do{var L=j.lane;if((ns&L)===L)null!==C&&(C=C.next={lane:0,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null}),a=j.hasEagerState?j.eagerState:s(a,j.action);else{var B={lane:L,action:j.action,hasEagerState:j.hasEagerState,eagerState:j.eagerState,next:null};null===C?(x=C=B,w=a):C=C.next=B,ss.lanes|=L,Ws|=L}j=j.next}while(null!==j&&j!==_);null===C?w=a:C.next=x,Dr(a,o.memoizedState)||(bs=!0),o.memoizedState=a,o.baseState=w,o.baseQueue=C,i.lastRenderedState=a}if(null!==(s=i.interleaved)){u=s;do{_=u.lane,ss.lanes|=_,Ws|=_,u=u.next}while(u!==s)}else null===u&&(i.lanes=0);return[o.memoizedState,i.dispatch]}function Xh(s){var o=Uh(),i=o.queue;if(null===i)throw Error(p(311));i.lastRenderedReducer=s;var a=i.dispatch,u=i.pending,_=o.memoizedState;if(null!==u){i.pending=null;var w=u=u.next;do{_=s(_,w.action),w=w.next}while(w!==u);Dr(_,o.memoizedState)||(bs=!0),o.memoizedState=_,null===o.baseQueue&&(o.baseState=_),i.lastRenderedState=_}return[_,a]}function Yh(){}function Zh(s,o){var i=ss,a=Uh(),u=o(),_=!Dr(a.memoizedState,u);if(_&&(a.memoizedState=u,bs=!0),a=a.queue,$h(ai.bind(null,i,a,s),[s]),a.getSnapshot!==o||_||null!==as&&1&as.memoizedState.tag){if(i.flags|=2048,bi(9,ci.bind(null,i,a,u,o),void 0,null),null===Fs)throw Error(p(349));30&ns||di(i,o,u)}return u}function di(s,o,i){s.flags|=16384,s={getSnapshot:o,value:i},null===(o=ss.updateQueue)?(o={lastEffect:null,stores:null},ss.updateQueue=o,o.stores=[s]):null===(i=o.stores)?o.stores=[s]:i.push(s)}function ci(s,o,i,a){o.value=i,o.getSnapshot=a,ei(o)&&fi(s)}function ai(s,o,i){return i((function(){ei(o)&&fi(s)}))}function ei(s){var o=s.getSnapshot;s=s.value;try{var i=o();return!Dr(s,i)}catch(s){return!0}}function fi(s){var o=ih(s,1);null!==o&&gi(o,s,1,-1)}function hi(s){var o=Th();return\"function\"==typeof s&&(s=s()),o.memoizedState=o.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Vh,lastRenderedState:s},o.queue=s,s=s.dispatch=ii.bind(null,ss,s),[o.memoizedState,s]}function bi(s,o,i,a){return s={tag:s,create:o,destroy:i,deps:a,next:null},null===(o=ss.updateQueue)?(o={lastEffect:null,stores:null},ss.updateQueue=o,o.lastEffect=s.next=s):null===(i=o.lastEffect)?o.lastEffect=s.next=s:(a=i.next,i.next=s,s.next=a,o.lastEffect=s),s}function ji(){return Uh().memoizedState}function ki(s,o,i,a){var u=Th();ss.flags|=s,u.memoizedState=bi(1|o,i,void 0,void 0===a?null:a)}function li(s,o,i,a){var u=Uh();a=void 0===a?null:a;var _=void 0;if(null!==os){var w=os.memoizedState;if(_=w.destroy,null!==a&&Mh(a,w.deps))return void(u.memoizedState=bi(o,i,_,a))}ss.flags|=s,u.memoizedState=bi(1|o,i,_,a)}function mi(s,o){return ki(8390656,8,s,o)}function $h(s,o){return li(2048,8,s,o)}function ni(s,o){return li(4,2,s,o)}function oi(s,o){return li(4,4,s,o)}function pi(s,o){return\"function\"==typeof o?(s=s(),o(s),function(){o(null)}):null!=o?(s=s(),o.current=s,function(){o.current=null}):void 0}function qi(s,o,i){return i=null!=i?i.concat([s]):null,li(4,4,pi.bind(null,o,s),i)}function ri(){}function si(s,o){var i=Uh();o=void 0===o?null:o;var a=i.memoizedState;return null!==a&&null!==o&&Mh(o,a[1])?a[0]:(i.memoizedState=[s,o],s)}function ti(s,o){var i=Uh();o=void 0===o?null:o;var a=i.memoizedState;return null!==a&&null!==o&&Mh(o,a[1])?a[0]:(s=s(),i.memoizedState=[s,o],s)}function ui(s,o,i){return 21&ns?(Dr(i,o)||(i=yc(),ss.lanes|=i,Ws|=i,s.baseState=!0),o):(s.baseState&&(s.baseState=!1,bs=!0),s.memoizedState=i)}function vi(s,o){var i=Ct;Ct=0!==i&&4>i?i:4,s(!0);var a=rs.transition;rs.transition={};try{s(!1),o()}finally{Ct=i,rs.transition=a}}function wi(){return Uh().memoizedState}function xi(s,o,i){var a=yi(s);if(i={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null},zi(s))Ai(o,i);else if(null!==(i=hh(s,o,i,a))){gi(i,s,a,R()),Bi(i,o,a)}}function ii(s,o,i){var a=yi(s),u={lane:a,action:i,hasEagerState:!1,eagerState:null,next:null};if(zi(s))Ai(o,u);else{var _=s.alternate;if(0===s.lanes&&(null===_||0===_.lanes)&&null!==(_=o.lastRenderedReducer))try{var w=o.lastRenderedState,x=_(w,i);if(u.hasEagerState=!0,u.eagerState=x,Dr(x,w)){var C=o.interleaved;return null===C?(u.next=u,gh(o)):(u.next=C.next,C.next=u),void(o.interleaved=u)}}catch(s){}null!==(i=hh(s,o,u,a))&&(gi(i,s,a,u=R()),Bi(i,o,a))}}function zi(s){var o=s.alternate;return s===ss||null!==o&&o===ss}function Ai(s,o){ls=cs=!0;var i=s.pending;null===i?o.next=o:(o.next=i.next,i.next=o),s.pending=o}function Bi(s,o,i){if(4194240&i){var a=o.lanes;i|=a&=s.pendingLanes,o.lanes=i,Cc(s,i)}}var hs={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},ds={readContext:eh,useCallback:function(s,o){return Th().memoizedState=[s,void 0===o?null:o],s},useContext:eh,useEffect:mi,useImperativeHandle:function(s,o,i){return i=null!=i?i.concat([s]):null,ki(4194308,4,pi.bind(null,o,s),i)},useLayoutEffect:function(s,o){return ki(4194308,4,s,o)},useInsertionEffect:function(s,o){return ki(4,2,s,o)},useMemo:function(s,o){var i=Th();return o=void 0===o?null:o,s=s(),i.memoizedState=[s,o],s},useReducer:function(s,o,i){var a=Th();return o=void 0!==i?i(o):o,a.memoizedState=a.baseState=o,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},a.queue=s,s=s.dispatch=xi.bind(null,ss,s),[a.memoizedState,s]},useRef:function(s){return s={current:s},Th().memoizedState=s},useState:hi,useDebugValue:ri,useDeferredValue:function(s){return Th().memoizedState=s},useTransition:function(){var s=hi(!1),o=s[0];return s=vi.bind(null,s[1]),Th().memoizedState=s,[o,s]},useMutableSource:function(){},useSyncExternalStore:function(s,o,i){var a=ss,u=Th();if(Fn){if(void 0===i)throw Error(p(407));i=i()}else{if(i=o(),null===Fs)throw Error(p(349));30&ns||di(a,o,i)}u.memoizedState=i;var _={value:i,getSnapshot:o};return u.queue=_,mi(ai.bind(null,a,_,s),[s]),a.flags|=2048,bi(9,ci.bind(null,a,_,i,o),void 0,null),i},useId:function(){var s=Th(),o=Fs.identifierPrefix;if(Fn){var i=Rn;o=\":\"+o+\"R\"+(i=(Mn&~(1<<32-Et(Mn)-1)).toString(32)+i),0<(i=us++)&&(o+=\"H\"+i.toString(32)),o+=\":\"}else o=\":\"+o+\"r\"+(i=ps++).toString(32)+\":\";return s.memoizedState=o},unstable_isNewReconciler:!1},fs={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Wh,useRef:ji,useState:function(){return Wh(Vh)},useDebugValue:ri,useDeferredValue:function(s){return ui(Uh(),os.memoizedState,s)},useTransition:function(){return[Wh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1},ms={readContext:eh,useCallback:si,useContext:eh,useEffect:$h,useImperativeHandle:qi,useInsertionEffect:ni,useLayoutEffect:oi,useMemo:ti,useReducer:Xh,useRef:ji,useState:function(){return Xh(Vh)},useDebugValue:ri,useDeferredValue:function(s){var o=Uh();return null===os?o.memoizedState=s:ui(o,os.memoizedState,s)},useTransition:function(){return[Xh(Vh)[0],Uh().memoizedState]},useMutableSource:Yh,useSyncExternalStore:Zh,useId:wi,unstable_isNewReconciler:!1};function Ci(s,o){if(s&&s.defaultProps){for(var i in o=we({},o),s=s.defaultProps)void 0===o[i]&&(o[i]=s[i]);return o}return o}function Di(s,o,i,a){i=null==(i=i(a,o=s.memoizedState))?o:we({},o,i),s.memoizedState=i,0===s.lanes&&(s.updateQueue.baseState=i)}var gs={isMounted:function(s){return!!(s=s._reactInternals)&&Vb(s)===s},enqueueSetState:function(s,o,i){s=s._reactInternals;var a=R(),u=yi(s),_=mh(a,u);_.payload=o,null!=i&&(_.callback=i),null!==(o=nh(s,_,u))&&(gi(o,s,u,a),oh(o,s,u))},enqueueReplaceState:function(s,o,i){s=s._reactInternals;var a=R(),u=yi(s),_=mh(a,u);_.tag=1,_.payload=o,null!=i&&(_.callback=i),null!==(o=nh(s,_,u))&&(gi(o,s,u,a),oh(o,s,u))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var i=R(),a=yi(s),u=mh(i,a);u.tag=2,null!=o&&(u.callback=o),null!==(o=nh(s,u,a))&&(gi(o,s,a,i),oh(o,s,a))}};function Fi(s,o,i,a,u,_,w){return\"function\"==typeof(s=s.stateNode).shouldComponentUpdate?s.shouldComponentUpdate(a,_,w):!o.prototype||!o.prototype.isPureReactComponent||(!Ie(i,a)||!Ie(u,_))}function Gi(s,o,i){var a=!1,u=_n,_=o.contextType;return\"object\"==typeof _&&null!==_?_=eh(_):(u=Zf(o)?wn:Sn.current,_=(a=null!=(a=o.contextTypes))?Yf(s,u):_n),o=new o(i,_),s.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,o.updater=gs,s.stateNode=o,o._reactInternals=s,a&&((s=s.stateNode).__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=_),o}function Hi(s,o,i,a){s=o.state,\"function\"==typeof o.componentWillReceiveProps&&o.componentWillReceiveProps(i,a),\"function\"==typeof o.UNSAFE_componentWillReceiveProps&&o.UNSAFE_componentWillReceiveProps(i,a),o.state!==s&&gs.enqueueReplaceState(o,o.state,null)}function Ii(s,o,i,a){var u=s.stateNode;u.props=i,u.state=s.memoizedState,u.refs={},kh(s);var _=o.contextType;\"object\"==typeof _&&null!==_?u.context=eh(_):(_=Zf(o)?wn:Sn.current,u.context=Yf(s,_)),u.state=s.memoizedState,\"function\"==typeof(_=o.getDerivedStateFromProps)&&(Di(s,o,_,i),u.state=s.memoizedState),\"function\"==typeof o.getDerivedStateFromProps||\"function\"==typeof u.getSnapshotBeforeUpdate||\"function\"!=typeof u.UNSAFE_componentWillMount&&\"function\"!=typeof u.componentWillMount||(o=u.state,\"function\"==typeof u.componentWillMount&&u.componentWillMount(),\"function\"==typeof u.UNSAFE_componentWillMount&&u.UNSAFE_componentWillMount(),o!==u.state&&gs.enqueueReplaceState(u,u.state,null),qh(s,i,u,a),u.state=s.memoizedState),\"function\"==typeof u.componentDidMount&&(s.flags|=4194308)}function Ji(s,o){try{var i=\"\",a=o;do{i+=Pa(a),a=a.return}while(a);var u=i}catch(s){u=\"\\nError generating stack: \"+s.message+\"\\n\"+s.stack}return{value:s,source:o,stack:u,digest:null}}function Ki(s,o,i){return{value:s,source:null,stack:null!=i?i:null,digest:null!=o?o:null}}function Li(s,o){try{console.error(o.value)}catch(s){setTimeout((function(){throw s}))}}var ys=\"function\"==typeof WeakMap?WeakMap:Map;function Ni(s,o,i){(i=mh(-1,i)).tag=3,i.payload={element:null};var a=o.value;return i.callback=function(){Zs||(Zs=!0,eo=a),Li(0,o)},i}function Qi(s,o,i){(i=mh(-1,i)).tag=3;var a=s.type.getDerivedStateFromError;if(\"function\"==typeof a){var u=o.value;i.payload=function(){return a(u)},i.callback=function(){Li(0,o)}}var _=s.stateNode;return null!==_&&\"function\"==typeof _.componentDidCatch&&(i.callback=function(){Li(0,o),\"function\"!=typeof a&&(null===to?to=new Set([this]):to.add(this));var s=o.stack;this.componentDidCatch(o.value,{componentStack:null!==s?s:\"\"})}),i}function Si(s,o,i){var a=s.pingCache;if(null===a){a=s.pingCache=new ys;var u=new Set;a.set(o,u)}else void 0===(u=a.get(o))&&(u=new Set,a.set(o,u));u.has(i)||(u.add(i),s=Ti.bind(null,s,o,i),o.then(s,s))}function Ui(s){do{var o;if((o=13===s.tag)&&(o=null===(o=s.memoizedState)||null!==o.dehydrated),o)return s;s=s.return}while(null!==s);return null}function Vi(s,o,i,a,u){return 1&s.mode?(s.flags|=65536,s.lanes=u,s):(s===o?s.flags|=65536:(s.flags|=128,i.flags|=131072,i.flags&=-52805,1===i.tag&&(null===i.alternate?i.tag=17:((o=mh(-1,1)).tag=2,nh(i,o,1))),i.lanes|=1),s)}var vs=U.ReactCurrentOwner,bs=!1;function Xi(s,o,i,a){o.child=null===s?Vn(o,null,i,a):qn(o,s.child,i,a)}function Yi(s,o,i,a,u){i=i.render;var _=o.ref;return ch(o,u),a=Nh(s,o,i,a,_,u),i=Sh(),null===s||bs?(Fn&&i&&vg(o),o.flags|=1,Xi(s,o,a,u),o.child):(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~u,Zi(s,o,u))}function $i(s,o,i,a,u){if(null===s){var _=i.type;return\"function\"!=typeof _||aj(_)||void 0!==_.defaultProps||null!==i.compare||void 0!==i.defaultProps?((s=Rg(i.type,null,a,o,o.mode,u)).ref=o.ref,s.return=o,o.child=s):(o.tag=15,o.type=_,bj(s,o,_,a,u))}if(_=s.child,!(s.lanes&u)){var w=_.memoizedProps;if((i=null!==(i=i.compare)?i:Ie)(w,a)&&s.ref===o.ref)return Zi(s,o,u)}return o.flags|=1,(s=Pg(_,a)).ref=o.ref,s.return=o,o.child=s}function bj(s,o,i,a,u){if(null!==s){var _=s.memoizedProps;if(Ie(_,a)&&s.ref===o.ref){if(bs=!1,o.pendingProps=a=_,!(s.lanes&u))return o.lanes=s.lanes,Zi(s,o,u);131072&s.flags&&(bs=!0)}}return cj(s,o,i,a,u)}function dj(s,o,i){var a=o.pendingProps,u=a.children,_=null!==s?s.memoizedState:null;if(\"hidden\"===a.mode)if(1&o.mode){if(!(1073741824&i))return s=null!==_?_.baseLanes|i:i,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,G(Vs,qs),qs|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=null!==_?_.baseLanes:i,G(Vs,qs),qs|=a}else o.memoizedState={baseLanes:0,cachePool:null,transitions:null},G(Vs,qs),qs|=i;else null!==_?(a=_.baseLanes|i,o.memoizedState=null):a=i,G(Vs,qs),qs|=a;return Xi(s,o,u,i),o.child}function gj(s,o){var i=o.ref;(null===s&&null!==i||null!==s&&s.ref!==i)&&(o.flags|=512,o.flags|=2097152)}function cj(s,o,i,a,u){var _=Zf(i)?wn:Sn.current;return _=Yf(o,_),ch(o,u),i=Nh(s,o,i,a,_,u),a=Sh(),null===s||bs?(Fn&&a&&vg(o),o.flags|=1,Xi(s,o,i,u),o.child):(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~u,Zi(s,o,u))}function hj(s,o,i,a,u){if(Zf(i)){var _=!0;cg(o)}else _=!1;if(ch(o,u),null===o.stateNode)ij(s,o),Gi(o,i,a),Ii(o,i,a,u),a=!0;else if(null===s){var w=o.stateNode,x=o.memoizedProps;w.props=x;var C=w.context,j=i.contextType;\"object\"==typeof j&&null!==j?j=eh(j):j=Yf(o,j=Zf(i)?wn:Sn.current);var L=i.getDerivedStateFromProps,B=\"function\"==typeof L||\"function\"==typeof w.getSnapshotBeforeUpdate;B||\"function\"!=typeof w.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof w.componentWillReceiveProps||(x!==a||C!==j)&&Hi(o,w,a,j),Kn=!1;var $=o.memoizedState;w.state=$,qh(o,a,w,u),C=o.memoizedState,x!==a||$!==C||En.current||Kn?(\"function\"==typeof L&&(Di(o,i,L,a),C=o.memoizedState),(x=Kn||Fi(o,i,x,a,$,C,j))?(B||\"function\"!=typeof w.UNSAFE_componentWillMount&&\"function\"!=typeof w.componentWillMount||(\"function\"==typeof w.componentWillMount&&w.componentWillMount(),\"function\"==typeof w.UNSAFE_componentWillMount&&w.UNSAFE_componentWillMount()),\"function\"==typeof w.componentDidMount&&(o.flags|=4194308)):(\"function\"==typeof w.componentDidMount&&(o.flags|=4194308),o.memoizedProps=a,o.memoizedState=C),w.props=a,w.state=C,w.context=j,a=x):(\"function\"==typeof w.componentDidMount&&(o.flags|=4194308),a=!1)}else{w=o.stateNode,lh(s,o),x=o.memoizedProps,j=o.type===o.elementType?x:Ci(o.type,x),w.props=j,B=o.pendingProps,$=w.context,\"object\"==typeof(C=i.contextType)&&null!==C?C=eh(C):C=Yf(o,C=Zf(i)?wn:Sn.current);var V=i.getDerivedStateFromProps;(L=\"function\"==typeof V||\"function\"==typeof w.getSnapshotBeforeUpdate)||\"function\"!=typeof w.UNSAFE_componentWillReceiveProps&&\"function\"!=typeof w.componentWillReceiveProps||(x!==B||$!==C)&&Hi(o,w,a,C),Kn=!1,$=o.memoizedState,w.state=$,qh(o,a,w,u);var U=o.memoizedState;x!==B||$!==U||En.current||Kn?(\"function\"==typeof V&&(Di(o,i,V,a),U=o.memoizedState),(j=Kn||Fi(o,i,j,a,$,U,C)||!1)?(L||\"function\"!=typeof w.UNSAFE_componentWillUpdate&&\"function\"!=typeof w.componentWillUpdate||(\"function\"==typeof w.componentWillUpdate&&w.componentWillUpdate(a,U,C),\"function\"==typeof w.UNSAFE_componentWillUpdate&&w.UNSAFE_componentWillUpdate(a,U,C)),\"function\"==typeof w.componentDidUpdate&&(o.flags|=4),\"function\"==typeof w.getSnapshotBeforeUpdate&&(o.flags|=1024)):(\"function\"!=typeof w.componentDidUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=4),\"function\"!=typeof w.getSnapshotBeforeUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=1024),o.memoizedProps=a,o.memoizedState=U),w.props=a,w.state=U,w.context=C,a=j):(\"function\"!=typeof w.componentDidUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=4),\"function\"!=typeof w.getSnapshotBeforeUpdate||x===s.memoizedProps&&$===s.memoizedState||(o.flags|=1024),a=!1)}return jj(s,o,i,a,_,u)}function jj(s,o,i,a,u,_){gj(s,o);var w=!!(128&o.flags);if(!a&&!w)return u&&dg(o,i,!1),Zi(s,o,_);a=o.stateNode,vs.current=o;var x=w&&\"function\"!=typeof i.getDerivedStateFromError?null:a.render();return o.flags|=1,null!==s&&w?(o.child=qn(o,s.child,null,_),o.child=qn(o,null,x,_)):Xi(s,o,x,_),o.memoizedState=a.state,u&&dg(o,i,!0),o.child}function kj(s){var o=s.stateNode;o.pendingContext?ag(0,o.pendingContext,o.pendingContext!==o.context):o.context&&ag(0,o.context,!1),yh(s,o.containerInfo)}function lj(s,o,i,a,u){return Ig(),Jg(u),o.flags|=256,Xi(s,o,i,a),o.child}var _s,Ss,Es,ws,xs={dehydrated:null,treeContext:null,retryLane:0};function nj(s){return{baseLanes:s,cachePool:null,transitions:null}}function oj(s,o,i){var a,u=o.pendingProps,_=Zn.current,w=!1,x=!!(128&o.flags);if((a=x)||(a=(null===s||null!==s.memoizedState)&&!!(2&_)),a?(w=!0,o.flags&=-129):null!==s&&null===s.memoizedState||(_|=1),G(Zn,1&_),null===s)return Eg(o),null!==(s=o.memoizedState)&&null!==(s=s.dehydrated)?(1&o.mode?\"$!\"===s.data?o.lanes=8:o.lanes=1073741824:o.lanes=1,null):(x=u.children,s=u.fallback,w?(u=o.mode,w=o.child,x={mode:\"hidden\",children:x},1&u||null===w?w=pj(x,u,0,null):(w.childLanes=0,w.pendingProps=x),s=Tg(s,u,i,null),w.return=o,s.return=o,w.sibling=s,o.child=w,o.child.memoizedState=nj(i),o.memoizedState=xs,s):qj(o,x));if(null!==(_=s.memoizedState)&&null!==(a=_.dehydrated))return function rj(s,o,i,a,u,_,w){if(i)return 256&o.flags?(o.flags&=-257,sj(s,o,w,a=Ki(Error(p(422))))):null!==o.memoizedState?(o.child=s.child,o.flags|=128,null):(_=a.fallback,u=o.mode,a=pj({mode:\"visible\",children:a.children},u,0,null),(_=Tg(_,u,w,null)).flags|=2,a.return=o,_.return=o,a.sibling=_,o.child=a,1&o.mode&&qn(o,s.child,null,w),o.child.memoizedState=nj(w),o.memoizedState=xs,_);if(!(1&o.mode))return sj(s,o,w,null);if(\"$!\"===u.data){if(a=u.nextSibling&&u.nextSibling.dataset)var x=a.dgst;return a=x,sj(s,o,w,a=Ki(_=Error(p(419)),a,void 0))}if(x=!!(w&s.childLanes),bs||x){if(null!==(a=Fs)){switch(w&-w){case 4:u=2;break;case 16:u=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:u=32;break;case 536870912:u=268435456;break;default:u=0}0!==(u=u&(a.suspendedLanes|w)?0:u)&&u!==_.retryLane&&(_.retryLane=u,ih(s,u),gi(a,s,u,-1))}return tj(),sj(s,o,w,a=Ki(Error(p(421))))}return\"$?\"===u.data?(o.flags|=128,o.child=s.child,o=uj.bind(null,s),u._reactRetry=o,null):(s=_.treeContext,Ln=Lf(u.nextSibling),Dn=o,Fn=!0,Bn=null,null!==s&&(In[Tn++]=Mn,In[Tn++]=Rn,In[Tn++]=Nn,Mn=s.id,Rn=s.overflow,Nn=o),o=qj(o,a.children),o.flags|=4096,o)}(s,o,x,u,a,_,i);if(w){w=u.fallback,x=o.mode,a=(_=s.child).sibling;var C={mode:\"hidden\",children:u.children};return 1&x||o.child===_?(u=Pg(_,C)).subtreeFlags=14680064&_.subtreeFlags:((u=o.child).childLanes=0,u.pendingProps=C,o.deletions=null),null!==a?w=Pg(a,w):(w=Tg(w,x,i,null)).flags|=2,w.return=o,u.return=o,u.sibling=w,o.child=u,u=w,w=o.child,x=null===(x=s.child.memoizedState)?nj(i):{baseLanes:x.baseLanes|i,cachePool:null,transitions:x.transitions},w.memoizedState=x,w.childLanes=s.childLanes&~i,o.memoizedState=xs,u}return s=(w=s.child).sibling,u=Pg(w,{mode:\"visible\",children:u.children}),!(1&o.mode)&&(u.lanes=i),u.return=o,u.sibling=null,null!==s&&(null===(i=o.deletions)?(o.deletions=[s],o.flags|=16):i.push(s)),o.child=u,o.memoizedState=null,u}function qj(s,o){return(o=pj({mode:\"visible\",children:o},s.mode,0,null)).return=s,s.child=o}function sj(s,o,i,a){return null!==a&&Jg(a),qn(o,s.child,null,i),(s=qj(o,o.pendingProps.children)).flags|=2,o.memoizedState=null,s}function vj(s,o,i){s.lanes|=o;var a=s.alternate;null!==a&&(a.lanes|=o),bh(s.return,o,i)}function wj(s,o,i,a,u){var _=s.memoizedState;null===_?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:a,tail:i,tailMode:u}:(_.isBackwards=o,_.rendering=null,_.renderingStartTime=0,_.last=a,_.tail=i,_.tailMode=u)}function xj(s,o,i){var a=o.pendingProps,u=a.revealOrder,_=a.tail;if(Xi(s,o,a.children,i),2&(a=Zn.current))a=1&a|2,o.flags|=128;else{if(null!==s&&128&s.flags)e:for(s=o.child;null!==s;){if(13===s.tag)null!==s.memoizedState&&vj(s,i,o);else if(19===s.tag)vj(s,i,o);else if(null!==s.child){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;null===s.sibling;){if(null===s.return||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}a&=1}if(G(Zn,a),1&o.mode)switch(u){case\"forwards\":for(i=o.child,u=null;null!==i;)null!==(s=i.alternate)&&null===Ch(s)&&(u=i),i=i.sibling;null===(i=u)?(u=o.child,o.child=null):(u=i.sibling,i.sibling=null),wj(o,!1,u,i,_);break;case\"backwards\":for(i=null,u=o.child,o.child=null;null!==u;){if(null!==(s=u.alternate)&&null===Ch(s)){o.child=u;break}s=u.sibling,u.sibling=i,i=u,u=s}wj(o,!0,i,null,_);break;case\"together\":wj(o,!1,null,null,void 0);break;default:o.memoizedState=null}else o.memoizedState=null;return o.child}function ij(s,o){!(1&o.mode)&&null!==s&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Zi(s,o,i){if(null!==s&&(o.dependencies=s.dependencies),Ws|=o.lanes,!(i&o.childLanes))return null;if(null!==s&&o.child!==s.child)throw Error(p(153));if(null!==o.child){for(i=Pg(s=o.child,s.pendingProps),o.child=i,i.return=o;null!==s.sibling;)s=s.sibling,(i=i.sibling=Pg(s,s.pendingProps)).return=o;i.sibling=null}return o.child}function Dj(s,o){if(!Fn)switch(s.tailMode){case\"hidden\":o=s.tail;for(var i=null;null!==o;)null!==o.alternate&&(i=o),o=o.sibling;null===i?s.tail=null:i.sibling=null;break;case\"collapsed\":i=s.tail;for(var a=null;null!==i;)null!==i.alternate&&(a=i),i=i.sibling;null===a?o||null===s.tail?s.tail=null:s.tail.sibling=null:a.sibling=null}}function S(s){var o=null!==s.alternate&&s.alternate.child===s.child,i=0,a=0;if(o)for(var u=s.child;null!==u;)i|=u.lanes|u.childLanes,a|=14680064&u.subtreeFlags,a|=14680064&u.flags,u.return=s,u=u.sibling;else for(u=s.child;null!==u;)i|=u.lanes|u.childLanes,a|=u.subtreeFlags,a|=u.flags,u.return=s,u=u.sibling;return s.subtreeFlags|=a,s.childLanes=i,o}function Ej(s,o,i){var a=o.pendingProps;switch(wg(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return S(o),null;case 1:case 17:return Zf(o.type)&&$f(),S(o),null;case 3:return a=o.stateNode,zh(),E(En),E(Sn),Eh(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),null!==s&&null!==s.child||(Gg(o)?o.flags|=4:null===s||s.memoizedState.isDehydrated&&!(256&o.flags)||(o.flags|=1024,null!==Bn&&(Fj(Bn),Bn=null))),Ss(s,o),S(o),null;case 5:Bh(o);var u=xh(Qn.current);if(i=o.type,null!==s&&null!=o.stateNode)Es(s,o,i,a,u),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!a){if(null===o.stateNode)throw Error(p(166));return S(o),null}if(s=xh(Yn.current),Gg(o)){a=o.stateNode,i=o.type;var _=o.memoizedProps;switch(a[hn]=o,a[dn]=_,s=!!(1&o.mode),i){case\"dialog\":D(\"cancel\",a),D(\"close\",a);break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",a);break;case\"video\":case\"audio\":for(u=0;u<Zr.length;u++)D(Zr[u],a);break;case\"source\":D(\"error\",a);break;case\"img\":case\"image\":case\"link\":D(\"error\",a),D(\"load\",a);break;case\"details\":D(\"toggle\",a);break;case\"input\":Za(a,_),D(\"invalid\",a);break;case\"select\":a._wrapperState={wasMultiple:!!_.multiple},D(\"invalid\",a);break;case\"textarea\":hb(a,_),D(\"invalid\",a)}for(var x in ub(i,_),u=null,_)if(_.hasOwnProperty(x)){var C=_[x];\"children\"===x?\"string\"==typeof C?a.textContent!==C&&(!0!==_.suppressHydrationWarning&&Af(a.textContent,C,s),u=[\"children\",C]):\"number\"==typeof C&&a.textContent!==\"\"+C&&(!0!==_.suppressHydrationWarning&&Af(a.textContent,C,s),u=[\"children\",\"\"+C]):w.hasOwnProperty(x)&&null!=C&&\"onScroll\"===x&&D(\"scroll\",a)}switch(i){case\"input\":Va(a),db(a,_,!0);break;case\"textarea\":Va(a),jb(a);break;case\"select\":case\"option\":break;default:\"function\"==typeof _.onClick&&(a.onclick=Bf)}a=u,o.updateQueue=a,null!==a&&(o.flags|=4)}else{x=9===u.nodeType?u:u.ownerDocument,\"http://www.w3.org/1999/xhtml\"===s&&(s=kb(i)),\"http://www.w3.org/1999/xhtml\"===s?\"script\"===i?((s=x.createElement(\"div\")).innerHTML=\"<script><\\/script>\",s=s.removeChild(s.firstChild)):\"string\"==typeof a.is?s=x.createElement(i,{is:a.is}):(s=x.createElement(i),\"select\"===i&&(x=s,a.multiple?x.multiple=!0:a.size&&(x.size=a.size))):s=x.createElementNS(s,i),s[hn]=o,s[dn]=a,_s(s,o,!1,!1),o.stateNode=s;e:{switch(x=vb(i,a),i){case\"dialog\":D(\"cancel\",s),D(\"close\",s),u=a;break;case\"iframe\":case\"object\":case\"embed\":D(\"load\",s),u=a;break;case\"video\":case\"audio\":for(u=0;u<Zr.length;u++)D(Zr[u],s);u=a;break;case\"source\":D(\"error\",s),u=a;break;case\"img\":case\"image\":case\"link\":D(\"error\",s),D(\"load\",s),u=a;break;case\"details\":D(\"toggle\",s),u=a;break;case\"input\":Za(s,a),u=Ya(s,a),D(\"invalid\",s);break;case\"option\":default:u=a;break;case\"select\":s._wrapperState={wasMultiple:!!a.multiple},u=we({},a,{value:void 0}),D(\"invalid\",s);break;case\"textarea\":hb(s,a),u=gb(s,a),D(\"invalid\",s)}for(_ in ub(i,u),C=u)if(C.hasOwnProperty(_)){var j=C[_];\"style\"===_?sb(s,j):\"dangerouslySetInnerHTML\"===_?null!=(j=j?j.__html:void 0)&&$e(s,j):\"children\"===_?\"string\"==typeof j?(\"textarea\"!==i||\"\"!==j)&&ob(s,j):\"number\"==typeof j&&ob(s,\"\"+j):\"suppressContentEditableWarning\"!==_&&\"suppressHydrationWarning\"!==_&&\"autoFocus\"!==_&&(w.hasOwnProperty(_)?null!=j&&\"onScroll\"===_&&D(\"scroll\",s):null!=j&&ta(s,_,j,x))}switch(i){case\"input\":Va(s),db(s,a,!1);break;case\"textarea\":Va(s),jb(s);break;case\"option\":null!=a.value&&s.setAttribute(\"value\",\"\"+Sa(a.value));break;case\"select\":s.multiple=!!a.multiple,null!=(_=a.value)?fb(s,!!a.multiple,_,!1):null!=a.defaultValue&&fb(s,!!a.multiple,a.defaultValue,!0);break;default:\"function\"==typeof u.onClick&&(s.onclick=Bf)}switch(i){case\"button\":case\"input\":case\"select\":case\"textarea\":a=!!a.autoFocus;break e;case\"img\":a=!0;break e;default:a=!1}}a&&(o.flags|=4)}null!==o.ref&&(o.flags|=512,o.flags|=2097152)}return S(o),null;case 6:if(s&&null!=o.stateNode)ws(s,o,s.memoizedProps,a);else{if(\"string\"!=typeof a&&null===o.stateNode)throw Error(p(166));if(i=xh(Qn.current),xh(Yn.current),Gg(o)){if(a=o.stateNode,i=o.memoizedProps,a[hn]=o,(_=a.nodeValue!==i)&&null!==(s=Dn))switch(s.tag){case 3:Af(a.nodeValue,i,!!(1&s.mode));break;case 5:!0!==s.memoizedProps.suppressHydrationWarning&&Af(a.nodeValue,i,!!(1&s.mode))}_&&(o.flags|=4)}else(a=(9===i.nodeType?i:i.ownerDocument).createTextNode(a))[hn]=o,o.stateNode=a}return S(o),null;case 13:if(E(Zn),a=o.memoizedState,null===s||null!==s.memoizedState&&null!==s.memoizedState.dehydrated){if(Fn&&null!==Ln&&1&o.mode&&!(128&o.flags))Hg(),Ig(),o.flags|=98560,_=!1;else if(_=Gg(o),null!==a&&null!==a.dehydrated){if(null===s){if(!_)throw Error(p(318));if(!(_=null!==(_=o.memoizedState)?_.dehydrated:null))throw Error(p(317));_[hn]=o}else Ig(),!(128&o.flags)&&(o.memoizedState=null),o.flags|=4;S(o),_=!1}else null!==Bn&&(Fj(Bn),Bn=null),_=!0;if(!_)return 65536&o.flags?o:null}return 128&o.flags?(o.lanes=i,o):((a=null!==a)!==(null!==s&&null!==s.memoizedState)&&a&&(o.child.flags|=8192,1&o.mode&&(null===s||1&Zn.current?0===Us&&(Us=3):tj())),null!==o.updateQueue&&(o.flags|=4),S(o),null);case 4:return zh(),Ss(s,o),null===s&&sf(o.stateNode.containerInfo),S(o),null;case 10:return ah(o.type._context),S(o),null;case 19:if(E(Zn),null===(_=o.memoizedState))return S(o),null;if(a=!!(128&o.flags),null===(x=_.rendering))if(a)Dj(_,!1);else{if(0!==Us||null!==s&&128&s.flags)for(s=o.child;null!==s;){if(null!==(x=Ch(s))){for(o.flags|=128,Dj(_,!1),null!==(a=x.updateQueue)&&(o.updateQueue=a,o.flags|=4),o.subtreeFlags=0,a=i,i=o.child;null!==i;)s=a,(_=i).flags&=14680066,null===(x=_.alternate)?(_.childLanes=0,_.lanes=s,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=x.childLanes,_.lanes=x.lanes,_.child=x.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=x.memoizedProps,_.memoizedState=x.memoizedState,_.updateQueue=x.updateQueue,_.type=x.type,s=x.dependencies,_.dependencies=null===s?null:{lanes:s.lanes,firstContext:s.firstContext}),i=i.sibling;return G(Zn,1&Zn.current|2),o.child}s=s.sibling}null!==_.tail&&ht()>Xs&&(o.flags|=128,a=!0,Dj(_,!1),o.lanes=4194304)}else{if(!a)if(null!==(s=Ch(x))){if(o.flags|=128,a=!0,null!==(i=s.updateQueue)&&(o.updateQueue=i,o.flags|=4),Dj(_,!0),null===_.tail&&\"hidden\"===_.tailMode&&!x.alternate&&!Fn)return S(o),null}else 2*ht()-_.renderingStartTime>Xs&&1073741824!==i&&(o.flags|=128,a=!0,Dj(_,!1),o.lanes=4194304);_.isBackwards?(x.sibling=o.child,o.child=x):(null!==(i=_.last)?i.sibling=x:o.child=x,_.last=x)}return null!==_.tail?(o=_.tail,_.rendering=o,_.tail=o.sibling,_.renderingStartTime=ht(),o.sibling=null,i=Zn.current,G(Zn,a?1&i|2:1&i),o):(S(o),null);case 22:case 23:return Hj(),a=null!==o.memoizedState,null!==s&&null!==s.memoizedState!==a&&(o.flags|=8192),a&&1&o.mode?!!(1073741824&qs)&&(S(o),6&o.subtreeFlags&&(o.flags|=8192)):S(o),null;case 24:case 25:return null}throw Error(p(156,o.tag))}function Ij(s,o){switch(wg(o),o.tag){case 1:return Zf(o.type)&&$f(),65536&(s=o.flags)?(o.flags=-65537&s|128,o):null;case 3:return zh(),E(En),E(Sn),Eh(),65536&(s=o.flags)&&!(128&s)?(o.flags=-65537&s|128,o):null;case 5:return Bh(o),null;case 13:if(E(Zn),null!==(s=o.memoizedState)&&null!==s.dehydrated){if(null===o.alternate)throw Error(p(340));Ig()}return 65536&(s=o.flags)?(o.flags=-65537&s|128,o):null;case 19:return E(Zn),null;case 4:return zh(),null;case 10:return ah(o.type._context),null;case 22:case 23:return Hj(),null;default:return null}}_s=function(s,o){for(var i=o.child;null!==i;){if(5===i.tag||6===i.tag)s.appendChild(i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===o)break;for(;null===i.sibling;){if(null===i.return||i.return===o)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},Ss=function(){},Es=function(s,o,i,a){var u=s.memoizedProps;if(u!==a){s=o.stateNode,xh(Yn.current);var _,x=null;switch(i){case\"input\":u=Ya(s,u),a=Ya(s,a),x=[];break;case\"select\":u=we({},u,{value:void 0}),a=we({},a,{value:void 0}),x=[];break;case\"textarea\":u=gb(s,u),a=gb(s,a),x=[];break;default:\"function\"!=typeof u.onClick&&\"function\"==typeof a.onClick&&(s.onclick=Bf)}for(L in ub(i,a),i=null,u)if(!a.hasOwnProperty(L)&&u.hasOwnProperty(L)&&null!=u[L])if(\"style\"===L){var C=u[L];for(_ in C)C.hasOwnProperty(_)&&(i||(i={}),i[_]=\"\")}else\"dangerouslySetInnerHTML\"!==L&&\"children\"!==L&&\"suppressContentEditableWarning\"!==L&&\"suppressHydrationWarning\"!==L&&\"autoFocus\"!==L&&(w.hasOwnProperty(L)?x||(x=[]):(x=x||[]).push(L,null));for(L in a){var j=a[L];if(C=null!=u?u[L]:void 0,a.hasOwnProperty(L)&&j!==C&&(null!=j||null!=C))if(\"style\"===L)if(C){for(_ in C)!C.hasOwnProperty(_)||j&&j.hasOwnProperty(_)||(i||(i={}),i[_]=\"\");for(_ in j)j.hasOwnProperty(_)&&C[_]!==j[_]&&(i||(i={}),i[_]=j[_])}else i||(x||(x=[]),x.push(L,i)),i=j;else\"dangerouslySetInnerHTML\"===L?(j=j?j.__html:void 0,C=C?C.__html:void 0,null!=j&&C!==j&&(x=x||[]).push(L,j)):\"children\"===L?\"string\"!=typeof j&&\"number\"!=typeof j||(x=x||[]).push(L,\"\"+j):\"suppressContentEditableWarning\"!==L&&\"suppressHydrationWarning\"!==L&&(w.hasOwnProperty(L)?(null!=j&&\"onScroll\"===L&&D(\"scroll\",s),x||C===j||(x=[])):(x=x||[]).push(L,j))}i&&(x=x||[]).push(\"style\",i);var L=x;(o.updateQueue=L)&&(o.flags|=4)}},ws=function(s,o,i,a){i!==a&&(o.flags|=4)};var ks=!1,Os=!1,Cs=\"function\"==typeof WeakSet?WeakSet:Set,As=null;function Lj(s,o){var i=s.ref;if(null!==i)if(\"function\"==typeof i)try{i(null)}catch(i){W(s,o,i)}else i.current=null}function Mj(s,o,i){try{i()}catch(i){W(s,o,i)}}var js=!1;function Pj(s,o,i){var a=o.updateQueue;if(null!==(a=null!==a?a.lastEffect:null)){var u=a=a.next;do{if((u.tag&s)===s){var _=u.destroy;u.destroy=void 0,void 0!==_&&Mj(o,i,_)}u=u.next}while(u!==a)}}function Qj(s,o){if(null!==(o=null!==(o=o.updateQueue)?o.lastEffect:null)){var i=o=o.next;do{if((i.tag&s)===s){var a=i.create;i.destroy=a()}i=i.next}while(i!==o)}}function Rj(s){var o=s.ref;if(null!==o){var i=s.stateNode;s.tag,s=i,\"function\"==typeof o?o(s):o.current=s}}function Sj(s){var o=s.alternate;null!==o&&(s.alternate=null,Sj(o)),s.child=null,s.deletions=null,s.sibling=null,5===s.tag&&(null!==(o=s.stateNode)&&(delete o[hn],delete o[dn],delete o[mn],delete o[gn],delete o[yn])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function Tj(s){return 5===s.tag||3===s.tag||4===s.tag}function Uj(s){e:for(;;){for(;null===s.sibling;){if(null===s.return||Tj(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;5!==s.tag&&6!==s.tag&&18!==s.tag;){if(2&s.flags)continue e;if(null===s.child||4===s.tag)continue e;s.child.return=s,s=s.child}if(!(2&s.flags))return s.stateNode}}function Vj(s,o,i){var a=s.tag;if(5===a||6===a)s=s.stateNode,o?8===i.nodeType?i.parentNode.insertBefore(s,o):i.insertBefore(s,o):(8===i.nodeType?(o=i.parentNode).insertBefore(s,i):(o=i).appendChild(s),null!=(i=i._reactRootContainer)||null!==o.onclick||(o.onclick=Bf));else if(4!==a&&null!==(s=s.child))for(Vj(s,o,i),s=s.sibling;null!==s;)Vj(s,o,i),s=s.sibling}function Wj(s,o,i){var a=s.tag;if(5===a||6===a)s=s.stateNode,o?i.insertBefore(s,o):i.appendChild(s);else if(4!==a&&null!==(s=s.child))for(Wj(s,o,i),s=s.sibling;null!==s;)Wj(s,o,i),s=s.sibling}var Ps=null,Is=!1;function Yj(s,o,i){for(i=i.child;null!==i;)Zj(s,o,i),i=i.sibling}function Zj(s,o,i){if(St&&\"function\"==typeof St.onCommitFiberUnmount)try{St.onCommitFiberUnmount(_t,i)}catch(s){}switch(i.tag){case 5:Os||Lj(i,o);case 6:var a=Ps,u=Is;Ps=null,Yj(s,o,i),Is=u,null!==(Ps=a)&&(Is?(s=Ps,i=i.stateNode,8===s.nodeType?s.parentNode.removeChild(i):s.removeChild(i)):Ps.removeChild(i.stateNode));break;case 18:null!==Ps&&(Is?(s=Ps,i=i.stateNode,8===s.nodeType?Kf(s.parentNode,i):1===s.nodeType&&Kf(s,i),bd(s)):Kf(Ps,i.stateNode));break;case 4:a=Ps,u=Is,Ps=i.stateNode.containerInfo,Is=!0,Yj(s,o,i),Ps=a,Is=u;break;case 0:case 11:case 14:case 15:if(!Os&&(null!==(a=i.updateQueue)&&null!==(a=a.lastEffect))){u=a=a.next;do{var _=u,w=_.destroy;_=_.tag,void 0!==w&&(2&_||4&_)&&Mj(i,o,w),u=u.next}while(u!==a)}Yj(s,o,i);break;case 1:if(!Os&&(Lj(i,o),\"function\"==typeof(a=i.stateNode).componentWillUnmount))try{a.props=i.memoizedProps,a.state=i.memoizedState,a.componentWillUnmount()}catch(s){W(i,o,s)}Yj(s,o,i);break;case 21:Yj(s,o,i);break;case 22:1&i.mode?(Os=(a=Os)||null!==i.memoizedState,Yj(s,o,i),Os=a):Yj(s,o,i);break;default:Yj(s,o,i)}}function ak(s){var o=s.updateQueue;if(null!==o){s.updateQueue=null;var i=s.stateNode;null===i&&(i=s.stateNode=new Cs),o.forEach((function(o){var a=bk.bind(null,s,o);i.has(o)||(i.add(o),o.then(a,a))}))}}function ck(s,o){var i=o.deletions;if(null!==i)for(var a=0;a<i.length;a++){var u=i[a];try{var _=s,w=o,x=w;e:for(;null!==x;){switch(x.tag){case 5:Ps=x.stateNode,Is=!1;break e;case 3:case 4:Ps=x.stateNode.containerInfo,Is=!0;break e}x=x.return}if(null===Ps)throw Error(p(160));Zj(_,w,u),Ps=null,Is=!1;var C=u.alternate;null!==C&&(C.return=null),u.return=null}catch(s){W(u,o,s)}}if(12854&o.subtreeFlags)for(o=o.child;null!==o;)dk(o,s),o=o.sibling}function dk(s,o){var i=s.alternate,a=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(ck(o,s),ek(s),4&a){try{Pj(3,s,s.return),Qj(3,s)}catch(o){W(s,s.return,o)}try{Pj(5,s,s.return)}catch(o){W(s,s.return,o)}}break;case 1:ck(o,s),ek(s),512&a&&null!==i&&Lj(i,i.return);break;case 5:if(ck(o,s),ek(s),512&a&&null!==i&&Lj(i,i.return),32&s.flags){var u=s.stateNode;try{ob(u,\"\")}catch(o){W(s,s.return,o)}}if(4&a&&null!=(u=s.stateNode)){var _=s.memoizedProps,w=null!==i?i.memoizedProps:_,x=s.type,C=s.updateQueue;if(s.updateQueue=null,null!==C)try{\"input\"===x&&\"radio\"===_.type&&null!=_.name&&ab(u,_),vb(x,w);var j=vb(x,_);for(w=0;w<C.length;w+=2){var L=C[w],B=C[w+1];\"style\"===L?sb(u,B):\"dangerouslySetInnerHTML\"===L?$e(u,B):\"children\"===L?ob(u,B):ta(u,L,B,j)}switch(x){case\"input\":bb(u,_);break;case\"textarea\":ib(u,_);break;case\"select\":var $=u._wrapperState.wasMultiple;u._wrapperState.wasMultiple=!!_.multiple;var V=_.value;null!=V?fb(u,!!_.multiple,V,!1):$!==!!_.multiple&&(null!=_.defaultValue?fb(u,!!_.multiple,_.defaultValue,!0):fb(u,!!_.multiple,_.multiple?[]:\"\",!1))}u[dn]=_}catch(o){W(s,s.return,o)}}break;case 6:if(ck(o,s),ek(s),4&a){if(null===s.stateNode)throw Error(p(162));u=s.stateNode,_=s.memoizedProps;try{u.nodeValue=_}catch(o){W(s,s.return,o)}}break;case 3:if(ck(o,s),ek(s),4&a&&null!==i&&i.memoizedState.isDehydrated)try{bd(o.containerInfo)}catch(o){W(s,s.return,o)}break;case 4:default:ck(o,s),ek(s);break;case 13:ck(o,s),ek(s),8192&(u=s.child).flags&&(_=null!==u.memoizedState,u.stateNode.isHidden=_,!_||null!==u.alternate&&null!==u.alternate.memoizedState||(Ys=ht())),4&a&&ak(s);break;case 22:if(L=null!==i&&null!==i.memoizedState,1&s.mode?(Os=(j=Os)||L,ck(o,s),Os=j):ck(o,s),ek(s),8192&a){if(j=null!==s.memoizedState,(s.stateNode.isHidden=j)&&!L&&1&s.mode)for(As=s,L=s.child;null!==L;){for(B=As=L;null!==As;){switch(V=($=As).child,$.tag){case 0:case 11:case 14:case 15:Pj(4,$,$.return);break;case 1:Lj($,$.return);var U=$.stateNode;if(\"function\"==typeof U.componentWillUnmount){a=$,i=$.return;try{o=a,U.props=o.memoizedProps,U.state=o.memoizedState,U.componentWillUnmount()}catch(s){W(a,i,s)}}break;case 5:Lj($,$.return);break;case 22:if(null!==$.memoizedState){gk(B);continue}}null!==V?(V.return=$,As=V):gk(B)}L=L.sibling}e:for(L=null,B=s;;){if(5===B.tag){if(null===L){L=B;try{u=B.stateNode,j?\"function\"==typeof(_=u.style).setProperty?_.setProperty(\"display\",\"none\",\"important\"):_.display=\"none\":(x=B.stateNode,w=null!=(C=B.memoizedProps.style)&&C.hasOwnProperty(\"display\")?C.display:null,x.style.display=rb(\"display\",w))}catch(o){W(s,s.return,o)}}}else if(6===B.tag){if(null===L)try{B.stateNode.nodeValue=j?\"\":B.memoizedProps}catch(o){W(s,s.return,o)}}else if((22!==B.tag&&23!==B.tag||null===B.memoizedState||B===s)&&null!==B.child){B.child.return=B,B=B.child;continue}if(B===s)break e;for(;null===B.sibling;){if(null===B.return||B.return===s)break e;L===B&&(L=null),B=B.return}L===B&&(L=null),B.sibling.return=B.return,B=B.sibling}}break;case 19:ck(o,s),ek(s),4&a&&ak(s);case 21:}}function ek(s){var o=s.flags;if(2&o){try{e:{for(var i=s.return;null!==i;){if(Tj(i)){var a=i;break e}i=i.return}throw Error(p(160))}switch(a.tag){case 5:var u=a.stateNode;32&a.flags&&(ob(u,\"\"),a.flags&=-33),Wj(s,Uj(s),u);break;case 3:case 4:var _=a.stateNode.containerInfo;Vj(s,Uj(s),_);break;default:throw Error(p(161))}}catch(o){W(s,s.return,o)}s.flags&=-3}4096&o&&(s.flags&=-4097)}function hk(s,o,i){As=s,ik(s,o,i)}function ik(s,o,i){for(var a=!!(1&s.mode);null!==As;){var u=As,_=u.child;if(22===u.tag&&a){var w=null!==u.memoizedState||ks;if(!w){var x=u.alternate,C=null!==x&&null!==x.memoizedState||Os;x=ks;var j=Os;if(ks=w,(Os=C)&&!j)for(As=u;null!==As;)C=(w=As).child,22===w.tag&&null!==w.memoizedState?jk(u):null!==C?(C.return=w,As=C):jk(u);for(;null!==_;)As=_,ik(_,o,i),_=_.sibling;As=u,ks=x,Os=j}kk(s)}else 8772&u.subtreeFlags&&null!==_?(_.return=u,As=_):kk(s)}}function kk(s){for(;null!==As;){var o=As;if(8772&o.flags){var i=o.alternate;try{if(8772&o.flags)switch(o.tag){case 0:case 11:case 15:Os||Qj(5,o);break;case 1:var a=o.stateNode;if(4&o.flags&&!Os)if(null===i)a.componentDidMount();else{var u=o.elementType===o.type?i.memoizedProps:Ci(o.type,i.memoizedProps);a.componentDidUpdate(u,i.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var _=o.updateQueue;null!==_&&sh(o,_,a);break;case 3:var w=o.updateQueue;if(null!==w){if(i=null,null!==o.child)switch(o.child.tag){case 5:case 1:i=o.child.stateNode}sh(o,w,i)}break;case 5:var x=o.stateNode;if(null===i&&4&o.flags){i=x;var C=o.memoizedProps;switch(o.type){case\"button\":case\"input\":case\"select\":case\"textarea\":C.autoFocus&&i.focus();break;case\"img\":C.src&&(i.src=C.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===o.memoizedState){var j=o.alternate;if(null!==j){var L=j.memoizedState;if(null!==L){var B=L.dehydrated;null!==B&&bd(B)}}}break;default:throw Error(p(163))}Os||512&o.flags&&Rj(o)}catch(s){W(o,o.return,s)}}if(o===s){As=null;break}if(null!==(i=o.sibling)){i.return=o.return,As=i;break}As=o.return}}function gk(s){for(;null!==As;){var o=As;if(o===s){As=null;break}var i=o.sibling;if(null!==i){i.return=o.return,As=i;break}As=o.return}}function jk(s){for(;null!==As;){var o=As;try{switch(o.tag){case 0:case 11:case 15:var i=o.return;try{Qj(4,o)}catch(s){W(o,i,s)}break;case 1:var a=o.stateNode;if(\"function\"==typeof a.componentDidMount){var u=o.return;try{a.componentDidMount()}catch(s){W(o,u,s)}}var _=o.return;try{Rj(o)}catch(s){W(o,_,s)}break;case 5:var w=o.return;try{Rj(o)}catch(s){W(o,w,s)}}}catch(s){W(o,o.return,s)}if(o===s){As=null;break}var x=o.sibling;if(null!==x){x.return=o.return,As=x;break}As=o.return}}var Ts,Ns=Math.ceil,Ms=U.ReactCurrentDispatcher,Rs=U.ReactCurrentOwner,Ds=U.ReactCurrentBatchConfig,Ls=0,Fs=null,Bs=null,$s=0,qs=0,Vs=Uf(0),Us=0,zs=null,Ws=0,Js=0,Hs=0,Ks=null,Gs=null,Ys=0,Xs=1/0,Qs=null,Zs=!1,eo=null,to=null,ro=!1,no=null,so=0,oo=0,io=null,ao=-1,co=0;function R(){return 6&Ls?ht():-1!==ao?ao:ao=ht()}function yi(s){return 1&s.mode?2&Ls&&0!==$s?$s&-$s:null!==$n.transition?(0===co&&(co=yc()),co):0!==(s=Ct)?s:s=void 0===(s=window.event)?16:jd(s.type):1}function gi(s,o,i,a){if(50<oo)throw oo=0,io=null,Error(p(185));Ac(s,i,a),2&Ls&&s===Fs||(s===Fs&&(!(2&Ls)&&(Js|=i),4===Us&&Ck(s,$s)),Dk(s,a),1===i&&0===Ls&&!(1&o.mode)&&(Xs=ht()+500,kn&&jg()))}function Dk(s,o){var i=s.callbackNode;!function wc(s,o){for(var i=s.suspendedLanes,a=s.pingedLanes,u=s.expirationTimes,_=s.pendingLanes;0<_;){var w=31-Et(_),x=1<<w,C=u[w];-1===C?x&i&&!(x&a)||(u[w]=vc(x,o)):C<=o&&(s.expiredLanes|=x),_&=~x}}(s,o);var a=uc(s,s===Fs?$s:0);if(0===a)null!==i&&lt(i),s.callbackNode=null,s.callbackPriority=0;else if(o=a&-a,s.callbackPriority!==o){if(null!=i&&lt(i),1===o)0===s.tag?function ig(s){kn=!0,hg(s)}(Ek.bind(null,s)):hg(Ek.bind(null,s)),un((function(){!(6&Ls)&&jg()})),i=null;else{switch(Dc(a)){case 1:i=mt;break;case 4:i=gt;break;case 16:default:i=yt;break;case 536870912:i=bt}i=Fk(i,Gk.bind(null,s))}s.callbackPriority=o,s.callbackNode=i}}function Gk(s,o){if(ao=-1,co=0,6&Ls)throw Error(p(327));var i=s.callbackNode;if(Hk()&&s.callbackNode!==i)return null;var a=uc(s,s===Fs?$s:0);if(0===a)return null;if(30&a||a&s.expiredLanes||o)o=Ik(s,a);else{o=a;var u=Ls;Ls|=2;var _=Jk();for(Fs===s&&$s===o||(Qs=null,Xs=ht()+500,Kk(s,o));;)try{Lk();break}catch(o){Mk(s,o)}$g(),Ms.current=_,Ls=u,null!==Bs?o=0:(Fs=null,$s=0,o=Us)}if(0!==o){if(2===o&&(0!==(u=xc(s))&&(a=u,o=Nk(s,u))),1===o)throw i=zs,Kk(s,0),Ck(s,a),Dk(s,ht()),i;if(6===o)Ck(s,a);else{if(u=s.current.alternate,!(30&a||function Ok(s){for(var o=s;;){if(16384&o.flags){var i=o.updateQueue;if(null!==i&&null!==(i=i.stores))for(var a=0;a<i.length;a++){var u=i[a],_=u.getSnapshot;u=u.value;try{if(!Dr(_(),u))return!1}catch(s){return!1}}}if(i=o.child,16384&o.subtreeFlags&&null!==i)i.return=o,o=i;else{if(o===s)break;for(;null===o.sibling;){if(null===o.return||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}(u)||(o=Ik(s,a),2===o&&(_=xc(s),0!==_&&(a=_,o=Nk(s,_))),1!==o)))throw i=zs,Kk(s,0),Ck(s,a),Dk(s,ht()),i;switch(s.finishedWork=u,s.finishedLanes=a,o){case 0:case 1:throw Error(p(345));case 2:case 5:Pk(s,Gs,Qs);break;case 3:if(Ck(s,a),(130023424&a)===a&&10<(o=Ys+500-ht())){if(0!==uc(s,0))break;if(((u=s.suspendedLanes)&a)!==a){R(),s.pingedLanes|=s.suspendedLanes&u;break}s.timeoutHandle=an(Pk.bind(null,s,Gs,Qs),o);break}Pk(s,Gs,Qs);break;case 4:if(Ck(s,a),(4194240&a)===a)break;for(o=s.eventTimes,u=-1;0<a;){var w=31-Et(a);_=1<<w,(w=o[w])>u&&(u=w),a&=~_}if(a=u,10<(a=(120>(a=ht()-a)?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*Ns(a/1960))-a)){s.timeoutHandle=an(Pk.bind(null,s,Gs,Qs),a);break}Pk(s,Gs,Qs);break;default:throw Error(p(329))}}}return Dk(s,ht()),s.callbackNode===i?Gk.bind(null,s):null}function Nk(s,o){var i=Ks;return s.current.memoizedState.isDehydrated&&(Kk(s,o).flags|=256),2!==(s=Ik(s,o))&&(o=Gs,Gs=i,null!==o&&Fj(o)),s}function Fj(s){null===Gs?Gs=s:Gs.push.apply(Gs,s)}function Ck(s,o){for(o&=~Hs,o&=~Js,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var i=31-Et(o),a=1<<i;s[i]=-1,o&=~a}}function Ek(s){if(6&Ls)throw Error(p(327));Hk();var o=uc(s,0);if(!(1&o))return Dk(s,ht()),null;var i=Ik(s,o);if(0!==s.tag&&2===i){var a=xc(s);0!==a&&(o=a,i=Nk(s,a))}if(1===i)throw i=zs,Kk(s,0),Ck(s,o),Dk(s,ht()),i;if(6===i)throw Error(p(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Pk(s,Gs,Qs),Dk(s,ht()),null}function Qk(s,o){var i=Ls;Ls|=1;try{return s(o)}finally{0===(Ls=i)&&(Xs=ht()+500,kn&&jg())}}function Rk(s){null!==no&&0===no.tag&&!(6&Ls)&&Hk();var o=Ls;Ls|=1;var i=Ds.transition,a=Ct;try{if(Ds.transition=null,Ct=1,s)return s()}finally{Ct=a,Ds.transition=i,!(6&(Ls=o))&&jg()}}function Hj(){qs=Vs.current,E(Vs)}function Kk(s,o){s.finishedWork=null,s.finishedLanes=0;var i=s.timeoutHandle;if(-1!==i&&(s.timeoutHandle=-1,cn(i)),null!==Bs)for(i=Bs.return;null!==i;){var a=i;switch(wg(a),a.tag){case 1:null!=(a=a.type.childContextTypes)&&$f();break;case 3:zh(),E(En),E(Sn),Eh();break;case 5:Bh(a);break;case 4:zh();break;case 13:case 19:E(Zn);break;case 10:ah(a.type._context);break;case 22:case 23:Hj()}i=i.return}if(Fs=s,Bs=s=Pg(s.current,null),$s=qs=o,Us=0,zs=null,Hs=Js=Ws=0,Gs=Ks=null,null!==Hn){for(o=0;o<Hn.length;o++)if(null!==(a=(i=Hn[o]).interleaved)){i.interleaved=null;var u=a.next,_=i.pending;if(null!==_){var w=_.next;_.next=u,a.next=w}i.pending=a}Hn=null}return s}function Mk(s,o){for(;;){var i=Bs;try{if($g(),ts.current=hs,cs){for(var a=ss.memoizedState;null!==a;){var u=a.queue;null!==u&&(u.pending=null),a=a.next}cs=!1}if(ns=0,as=os=ss=null,ls=!1,us=0,Rs.current=null,null===i||null===i.return){Us=1,zs=o,Bs=null;break}e:{var _=s,w=i.return,x=i,C=o;if(o=$s,x.flags|=32768,null!==C&&\"object\"==typeof C&&\"function\"==typeof C.then){var j=C,L=x,B=L.tag;if(!(1&L.mode||0!==B&&11!==B&&15!==B)){var $=L.alternate;$?(L.updateQueue=$.updateQueue,L.memoizedState=$.memoizedState,L.lanes=$.lanes):(L.updateQueue=null,L.memoizedState=null)}var V=Ui(w);if(null!==V){V.flags&=-257,Vi(V,w,x,0,o),1&V.mode&&Si(_,j,o),C=j;var U=(o=V).updateQueue;if(null===U){var z=new Set;z.add(C),o.updateQueue=z}else U.add(C);break e}if(!(1&o)){Si(_,j,o),tj();break e}C=Error(p(426))}else if(Fn&&1&x.mode){var Y=Ui(w);if(null!==Y){!(65536&Y.flags)&&(Y.flags|=256),Vi(Y,w,x,0,o),Jg(Ji(C,x));break e}}_=C=Ji(C,x),4!==Us&&(Us=2),null===Ks?Ks=[_]:Ks.push(_),_=w;do{switch(_.tag){case 3:_.flags|=65536,o&=-o,_.lanes|=o,ph(_,Ni(0,C,o));break e;case 1:x=C;var Z=_.type,ee=_.stateNode;if(!(128&_.flags||\"function\"!=typeof Z.getDerivedStateFromError&&(null===ee||\"function\"!=typeof ee.componentDidCatch||null!==to&&to.has(ee)))){_.flags|=65536,o&=-o,_.lanes|=o,ph(_,Qi(_,x,o));break e}}_=_.return}while(null!==_)}Sk(i)}catch(s){o=s,Bs===i&&null!==i&&(Bs=i=i.return);continue}break}}function Jk(){var s=Ms.current;return Ms.current=hs,null===s?hs:s}function tj(){0!==Us&&3!==Us&&2!==Us||(Us=4),null===Fs||!(268435455&Ws)&&!(268435455&Js)||Ck(Fs,$s)}function Ik(s,o){var i=Ls;Ls|=2;var a=Jk();for(Fs===s&&$s===o||(Qs=null,Kk(s,o));;)try{Tk();break}catch(o){Mk(s,o)}if($g(),Ls=i,Ms.current=a,null!==Bs)throw Error(p(261));return Fs=null,$s=0,Us}function Tk(){for(;null!==Bs;)Uk(Bs)}function Lk(){for(;null!==Bs&&!ut();)Uk(Bs)}function Uk(s){var o=Ts(s.alternate,s,qs);s.memoizedProps=s.pendingProps,null===o?Sk(s):Bs=o,Rs.current=null}function Sk(s){var o=s;do{var i=o.alternate;if(s=o.return,32768&o.flags){if(null!==(i=Ij(i,o)))return i.flags&=32767,void(Bs=i);if(null===s)return Us=6,void(Bs=null);s.flags|=32768,s.subtreeFlags=0,s.deletions=null}else if(null!==(i=Ej(i,o,qs)))return void(Bs=i);if(null!==(o=o.sibling))return void(Bs=o);Bs=o=s}while(null!==o);0===Us&&(Us=5)}function Pk(s,o,i){var a=Ct,u=Ds.transition;try{Ds.transition=null,Ct=1,function Wk(s,o,i,a){do{Hk()}while(null!==no);if(6&Ls)throw Error(p(327));i=s.finishedWork;var u=s.finishedLanes;if(null===i)return null;if(s.finishedWork=null,s.finishedLanes=0,i===s.current)throw Error(p(177));s.callbackNode=null,s.callbackPriority=0;var _=i.lanes|i.childLanes;if(function Bc(s,o){var i=s.pendingLanes&~o;s.pendingLanes=o,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=o,s.mutableReadLanes&=o,s.entangledLanes&=o,o=s.entanglements;var a=s.eventTimes;for(s=s.expirationTimes;0<i;){var u=31-Et(i),_=1<<u;o[u]=0,a[u]=-1,s[u]=-1,i&=~_}}(s,_),s===Fs&&(Bs=Fs=null,$s=0),!(2064&i.subtreeFlags)&&!(2064&i.flags)||ro||(ro=!0,Fk(yt,(function(){return Hk(),null}))),_=!!(15990&i.flags),!!(15990&i.subtreeFlags)||_){_=Ds.transition,Ds.transition=null;var w=Ct;Ct=1;var x=Ls;Ls|=4,Rs.current=null,function Oj(s,o){if(sn=Ut,Ne(s=Me())){if(\"selectionStart\"in s)var i={start:s.selectionStart,end:s.selectionEnd};else e:{var a=(i=(i=s.ownerDocument)&&i.defaultView||window).getSelection&&i.getSelection();if(a&&0!==a.rangeCount){i=a.anchorNode;var u=a.anchorOffset,_=a.focusNode;a=a.focusOffset;try{i.nodeType,_.nodeType}catch(s){i=null;break e}var w=0,x=-1,C=-1,j=0,L=0,B=s,$=null;t:for(;;){for(var V;B!==i||0!==u&&3!==B.nodeType||(x=w+u),B!==_||0!==a&&3!==B.nodeType||(C=w+a),3===B.nodeType&&(w+=B.nodeValue.length),null!==(V=B.firstChild);)$=B,B=V;for(;;){if(B===s)break t;if($===i&&++j===u&&(x=w),$===_&&++L===a&&(C=w),null!==(V=B.nextSibling))break;$=(B=$).parentNode}B=V}i=-1===x||-1===C?null:{start:x,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(on={focusedElem:s,selectionRange:i},Ut=!1,As=o;null!==As;)if(s=(o=As).child,1028&o.subtreeFlags&&null!==s)s.return=o,As=s;else for(;null!==As;){o=As;try{var U=o.alternate;if(1024&o.flags)switch(o.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==U){var z=U.memoizedProps,Y=U.memoizedState,Z=o.stateNode,ee=Z.getSnapshotBeforeUpdate(o.elementType===o.type?z:Ci(o.type,z),Y);Z.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var ie=o.stateNode.containerInfo;1===ie.nodeType?ie.textContent=\"\":9===ie.nodeType&&ie.documentElement&&ie.removeChild(ie.documentElement);break;default:throw Error(p(163))}}catch(s){W(o,o.return,s)}if(null!==(s=o.sibling)){s.return=o.return,As=s;break}As=o.return}return U=js,js=!1,U}(s,i),dk(i,s),Oe(on),Ut=!!sn,on=sn=null,s.current=i,hk(i,s,u),pt(),Ls=x,Ct=w,Ds.transition=_}else s.current=i;if(ro&&(ro=!1,no=s,so=u),_=s.pendingLanes,0===_&&(to=null),function mc(s){if(St&&\"function\"==typeof St.onCommitFiberRoot)try{St.onCommitFiberRoot(_t,s,void 0,!(128&~s.current.flags))}catch(s){}}(i.stateNode),Dk(s,ht()),null!==o)for(a=s.onRecoverableError,i=0;i<o.length;i++)u=o[i],a(u.value,{componentStack:u.stack,digest:u.digest});if(Zs)throw Zs=!1,s=eo,eo=null,s;return!!(1&so)&&0!==s.tag&&Hk(),_=s.pendingLanes,1&_?s===io?oo++:(oo=0,io=s):oo=0,jg(),null}(s,o,i,a)}finally{Ds.transition=u,Ct=a}return null}function Hk(){if(null!==no){var s=Dc(so),o=Ds.transition,i=Ct;try{if(Ds.transition=null,Ct=16>s?16:s,null===no)var a=!1;else{if(s=no,no=null,so=0,6&Ls)throw Error(p(331));var u=Ls;for(Ls|=4,As=s.current;null!==As;){var _=As,w=_.child;if(16&As.flags){var x=_.deletions;if(null!==x){for(var C=0;C<x.length;C++){var j=x[C];for(As=j;null!==As;){var L=As;switch(L.tag){case 0:case 11:case 15:Pj(8,L,_)}var B=L.child;if(null!==B)B.return=L,As=B;else for(;null!==As;){var $=(L=As).sibling,V=L.return;if(Sj(L),L===j){As=null;break}if(null!==$){$.return=V,As=$;break}As=V}}}var U=_.alternate;if(null!==U){var z=U.child;if(null!==z){U.child=null;do{var Y=z.sibling;z.sibling=null,z=Y}while(null!==z)}}As=_}}if(2064&_.subtreeFlags&&null!==w)w.return=_,As=w;else e:for(;null!==As;){if(2048&(_=As).flags)switch(_.tag){case 0:case 11:case 15:Pj(9,_,_.return)}var Z=_.sibling;if(null!==Z){Z.return=_.return,As=Z;break e}As=_.return}}var ee=s.current;for(As=ee;null!==As;){var ie=(w=As).child;if(2064&w.subtreeFlags&&null!==ie)ie.return=w,As=ie;else e:for(w=ee;null!==As;){if(2048&(x=As).flags)try{switch(x.tag){case 0:case 11:case 15:Qj(9,x)}}catch(s){W(x,x.return,s)}if(x===w){As=null;break e}var ae=x.sibling;if(null!==ae){ae.return=x.return,As=ae;break e}As=x.return}}if(Ls=u,jg(),St&&\"function\"==typeof St.onPostCommitFiberRoot)try{St.onPostCommitFiberRoot(_t,s)}catch(s){}a=!0}return a}finally{Ct=i,Ds.transition=o}}return!1}function Xk(s,o,i){s=nh(s,o=Ni(0,o=Ji(i,o),1),1),o=R(),null!==s&&(Ac(s,1,o),Dk(s,o))}function W(s,o,i){if(3===s.tag)Xk(s,s,i);else for(;null!==o;){if(3===o.tag){Xk(o,s,i);break}if(1===o.tag){var a=o.stateNode;if(\"function\"==typeof o.type.getDerivedStateFromError||\"function\"==typeof a.componentDidCatch&&(null===to||!to.has(a))){o=nh(o,s=Qi(o,s=Ji(i,s),1),1),s=R(),null!==o&&(Ac(o,1,s),Dk(o,s));break}}o=o.return}}function Ti(s,o,i){var a=s.pingCache;null!==a&&a.delete(o),o=R(),s.pingedLanes|=s.suspendedLanes&i,Fs===s&&($s&i)===i&&(4===Us||3===Us&&(130023424&$s)===$s&&500>ht()-Ys?Kk(s,0):Hs|=i),Dk(s,o)}function Yk(s,o){0===o&&(1&s.mode?(o=Ot,!(130023424&(Ot<<=1))&&(Ot=4194304)):o=1);var i=R();null!==(s=ih(s,o))&&(Ac(s,o,i),Dk(s,i))}function uj(s){var o=s.memoizedState,i=0;null!==o&&(i=o.retryLane),Yk(s,i)}function bk(s,o){var i=0;switch(s.tag){case 13:var a=s.stateNode,u=s.memoizedState;null!==u&&(i=u.retryLane);break;case 19:a=s.stateNode;break;default:throw Error(p(314))}null!==a&&a.delete(o),Yk(s,i)}function Fk(s,o){return ct(s,o)}function $k(s,o,i,a){this.tag=s,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bg(s,o,i,a){return new $k(s,o,i,a)}function aj(s){return!(!(s=s.prototype)||!s.isReactComponent)}function Pg(s,o){var i=s.alternate;return null===i?((i=Bg(s.tag,o,s.key,s.mode)).elementType=s.elementType,i.type=s.type,i.stateNode=s.stateNode,i.alternate=s,s.alternate=i):(i.pendingProps=o,i.type=s.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=14680064&s.flags,i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,o=s.dependencies,i.dependencies=null===o?null:{lanes:o.lanes,firstContext:o.firstContext},i.sibling=s.sibling,i.index=s.index,i.ref=s.ref,i}function Rg(s,o,i,a,u,_){var w=2;if(a=s,\"function\"==typeof s)aj(s)&&(w=1);else if(\"string\"==typeof s)w=5;else e:switch(s){case Z:return Tg(i.children,u,_,o);case ee:w=8,u|=8;break;case ie:return(s=Bg(12,i,o,2|u)).elementType=ie,s.lanes=_,s;case pe:return(s=Bg(13,i,o,u)).elementType=pe,s.lanes=_,s;case de:return(s=Bg(19,i,o,u)).elementType=de,s.lanes=_,s;case be:return pj(i,u,_,o);default:if(\"object\"==typeof s&&null!==s)switch(s.$$typeof){case ae:w=10;break e;case ce:w=9;break e;case le:w=11;break e;case fe:w=14;break e;case ye:w=16,a=null;break e}throw Error(p(130,null==s?s:typeof s,\"\"))}return(o=Bg(w,i,o,u)).elementType=s,o.type=a,o.lanes=_,o}function Tg(s,o,i,a){return(s=Bg(7,s,a,o)).lanes=i,s}function pj(s,o,i,a){return(s=Bg(22,s,a,o)).elementType=be,s.lanes=i,s.stateNode={isHidden:!1},s}function Qg(s,o,i){return(s=Bg(6,s,null,o)).lanes=i,s}function Sg(s,o,i){return(o=Bg(4,null!==s.children?s.children:[],s.key,o)).lanes=i,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function al(s,o,i,a,u){this.tag=o,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=zc(0),this.expirationTimes=zc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zc(0),this.identifierPrefix=a,this.onRecoverableError=u,this.mutableSourceEagerHydrationData=null}function bl(s,o,i,a,u,_,w,x,C){return s=new al(s,o,i,x,C),1===o?(o=1,!0===_&&(o|=8)):o=0,_=Bg(3,null,null,o),s.current=_,_.stateNode=s,_.memoizedState={element:a,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},kh(_),s}function dl(s){if(!s)return _n;e:{if(Vb(s=s._reactInternals)!==s||1!==s.tag)throw Error(p(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Zf(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(null!==o);throw Error(p(171))}if(1===s.tag){var i=s.type;if(Zf(i))return bg(s,i,o)}return o}function el(s,o,i,a,u,_,w,x,C){return(s=bl(i,a,!0,s,0,_,0,x,C)).context=dl(null),i=s.current,(_=mh(a=R(),u=yi(i))).callback=null!=o?o:null,nh(i,_,u),s.current.lanes=u,Ac(s,u,a),Dk(s,a),s}function fl(s,o,i,a){var u=o.current,_=R(),w=yi(u);return i=dl(i),null===o.context?o.context=i:o.pendingContext=i,(o=mh(_,w)).payload={element:s},null!==(a=void 0===a?null:a)&&(o.callback=a),null!==(s=nh(u,o,w))&&(gi(s,u,w,_),oh(s,u,w)),w}function gl(s){return(s=s.current).child?(s.child.tag,s.child.stateNode):null}function hl(s,o){if(null!==(s=s.memoizedState)&&null!==s.dehydrated){var i=s.retryLane;s.retryLane=0!==i&&i<o?i:o}}function il(s,o){hl(s,o),(s=s.alternate)&&hl(s,o)}Ts=function(s,o,i){if(null!==s)if(s.memoizedProps!==o.pendingProps||En.current)bs=!0;else{if(!(s.lanes&i||128&o.flags))return bs=!1,function yj(s,o,i){switch(o.tag){case 3:kj(o),Ig();break;case 5:Ah(o);break;case 1:Zf(o.type)&&cg(o);break;case 4:yh(o,o.stateNode.containerInfo);break;case 10:var a=o.type._context,u=o.memoizedProps.value;G(Un,a._currentValue),a._currentValue=u;break;case 13:if(null!==(a=o.memoizedState))return null!==a.dehydrated?(G(Zn,1&Zn.current),o.flags|=128,null):i&o.child.childLanes?oj(s,o,i):(G(Zn,1&Zn.current),null!==(s=Zi(s,o,i))?s.sibling:null);G(Zn,1&Zn.current);break;case 19:if(a=!!(i&o.childLanes),128&s.flags){if(a)return xj(s,o,i);o.flags|=128}if(null!==(u=o.memoizedState)&&(u.rendering=null,u.tail=null,u.lastEffect=null),G(Zn,Zn.current),a)break;return null;case 22:case 23:return o.lanes=0,dj(s,o,i)}return Zi(s,o,i)}(s,o,i);bs=!!(131072&s.flags)}else bs=!1,Fn&&1048576&o.flags&&ug(o,Pn,o.index);switch(o.lanes=0,o.tag){case 2:var a=o.type;ij(s,o),s=o.pendingProps;var u=Yf(o,Sn.current);ch(o,i),u=Nh(null,o,a,s,u,i);var _=Sh();return o.flags|=1,\"object\"==typeof u&&null!==u&&\"function\"==typeof u.render&&void 0===u.$$typeof?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Zf(a)?(_=!0,cg(o)):_=!1,o.memoizedState=null!==u.state&&void 0!==u.state?u.state:null,kh(o),u.updater=gs,o.stateNode=u,u._reactInternals=o,Ii(o,a,s,i),o=jj(null,o,a,!0,_,i)):(o.tag=0,Fn&&_&&vg(o),Xi(null,o,u,i),o=o.child),o;case 16:a=o.elementType;e:{switch(ij(s,o),s=o.pendingProps,a=(u=a._init)(a._payload),o.type=a,u=o.tag=function Zk(s){if(\"function\"==typeof s)return aj(s)?1:0;if(null!=s){if((s=s.$$typeof)===le)return 11;if(s===fe)return 14}return 2}(a),s=Ci(a,s),u){case 0:o=cj(null,o,a,s,i);break e;case 1:o=hj(null,o,a,s,i);break e;case 11:o=Yi(null,o,a,s,i);break e;case 14:o=$i(null,o,a,Ci(a.type,s),i);break e}throw Error(p(306,a,\"\"))}return o;case 0:return a=o.type,u=o.pendingProps,cj(s,o,a,u=o.elementType===a?u:Ci(a,u),i);case 1:return a=o.type,u=o.pendingProps,hj(s,o,a,u=o.elementType===a?u:Ci(a,u),i);case 3:e:{if(kj(o),null===s)throw Error(p(387));a=o.pendingProps,u=(_=o.memoizedState).element,lh(s,o),qh(o,a,null,i);var w=o.memoizedState;if(a=w.element,_.isDehydrated){if(_={element:a,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},o.updateQueue.baseState=_,o.memoizedState=_,256&o.flags){o=lj(s,o,a,i,u=Ji(Error(p(423)),o));break e}if(a!==u){o=lj(s,o,a,i,u=Ji(Error(p(424)),o));break e}for(Ln=Lf(o.stateNode.containerInfo.firstChild),Dn=o,Fn=!0,Bn=null,i=Vn(o,null,a,i),o.child=i;i;)i.flags=-3&i.flags|4096,i=i.sibling}else{if(Ig(),a===u){o=Zi(s,o,i);break e}Xi(s,o,a,i)}o=o.child}return o;case 5:return Ah(o),null===s&&Eg(o),a=o.type,u=o.pendingProps,_=null!==s?s.memoizedProps:null,w=u.children,Ef(a,u)?w=null:null!==_&&Ef(a,_)&&(o.flags|=32),gj(s,o),Xi(s,o,w,i),o.child;case 6:return null===s&&Eg(o),null;case 13:return oj(s,o,i);case 4:return yh(o,o.stateNode.containerInfo),a=o.pendingProps,null===s?o.child=qn(o,null,a,i):Xi(s,o,a,i),o.child;case 11:return a=o.type,u=o.pendingProps,Yi(s,o,a,u=o.elementType===a?u:Ci(a,u),i);case 7:return Xi(s,o,o.pendingProps,i),o.child;case 8:case 12:return Xi(s,o,o.pendingProps.children,i),o.child;case 10:e:{if(a=o.type._context,u=o.pendingProps,_=o.memoizedProps,w=u.value,G(Un,a._currentValue),a._currentValue=w,null!==_)if(Dr(_.value,w)){if(_.children===u.children&&!En.current){o=Zi(s,o,i);break e}}else for(null!==(_=o.child)&&(_.return=o);null!==_;){var x=_.dependencies;if(null!==x){w=_.child;for(var C=x.firstContext;null!==C;){if(C.context===a){if(1===_.tag){(C=mh(-1,i&-i)).tag=2;var j=_.updateQueue;if(null!==j){var L=(j=j.shared).pending;null===L?C.next=C:(C.next=L.next,L.next=C),j.pending=C}}_.lanes|=i,null!==(C=_.alternate)&&(C.lanes|=i),bh(_.return,i,o),x.lanes|=i;break}C=C.next}}else if(10===_.tag)w=_.type===o.type?null:_.child;else if(18===_.tag){if(null===(w=_.return))throw Error(p(341));w.lanes|=i,null!==(x=w.alternate)&&(x.lanes|=i),bh(w,i,o),w=_.sibling}else w=_.child;if(null!==w)w.return=_;else for(w=_;null!==w;){if(w===o){w=null;break}if(null!==(_=w.sibling)){_.return=w.return,w=_;break}w=w.return}_=w}Xi(s,o,u.children,i),o=o.child}return o;case 9:return u=o.type,a=o.pendingProps.children,ch(o,i),a=a(u=eh(u)),o.flags|=1,Xi(s,o,a,i),o.child;case 14:return u=Ci(a=o.type,o.pendingProps),$i(s,o,a,u=Ci(a.type,u),i);case 15:return bj(s,o,o.type,o.pendingProps,i);case 17:return a=o.type,u=o.pendingProps,u=o.elementType===a?u:Ci(a,u),ij(s,o),o.tag=1,Zf(a)?(s=!0,cg(o)):s=!1,ch(o,i),Gi(o,a,u),Ii(o,a,u,i),jj(null,o,a,!0,s,i);case 19:return xj(s,o,i);case 22:return dj(s,o,i)}throw Error(p(156,o.tag))};var lo=\"function\"==typeof reportError?reportError:function(s){console.error(s)};function ll(s){this._internalRoot=s}function ml(s){this._internalRoot=s}function nl(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType)}function ol(s){return!(!s||1!==s.nodeType&&9!==s.nodeType&&11!==s.nodeType&&(8!==s.nodeType||\" react-mount-point-unstable \"!==s.nodeValue))}function pl(){}function rl(s,o,i,a,u){var _=i._reactRootContainer;if(_){var w=_;if(\"function\"==typeof u){var x=u;u=function(){var s=gl(w);x.call(s)}}fl(o,w,s,u)}else w=function ql(s,o,i,a,u){if(u){if(\"function\"==typeof a){var _=a;a=function(){var s=gl(w);_.call(s)}}var w=el(o,a,s,0,null,!1,0,\"\",pl);return s._reactRootContainer=w,s[fn]=w.current,sf(8===s.nodeType?s.parentNode:s),Rk(),w}for(;u=s.lastChild;)s.removeChild(u);if(\"function\"==typeof a){var x=a;a=function(){var s=gl(C);x.call(s)}}var C=bl(s,0,!1,null,0,!1,0,\"\",pl);return s._reactRootContainer=C,s[fn]=C.current,sf(8===s.nodeType?s.parentNode:s),Rk((function(){fl(o,C,i,a)})),C}(i,o,s,u,a);return gl(w)}ml.prototype.render=ll.prototype.render=function(s){var o=this._internalRoot;if(null===o)throw Error(p(409));fl(s,o,null,null)},ml.prototype.unmount=ll.prototype.unmount=function(){var s=this._internalRoot;if(null!==s){this._internalRoot=null;var o=s.containerInfo;Rk((function(){fl(null,s,null,null)})),o[fn]=null}},ml.prototype.unstable_scheduleHydration=function(s){if(s){var o=It();s={blockedOn:null,target:s,priority:o};for(var i=0;i<$t.length&&0!==o&&o<$t[i].priority;i++);$t.splice(i,0,s),0===i&&Vc(s)}},At=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var i=tc(o.pendingLanes);0!==i&&(Cc(o,1|i),Dk(o,ht()),!(6&Ls)&&(Xs=ht()+500,jg()))}break;case 13:Rk((function(){var o=ih(s,1);if(null!==o){var i=R();gi(o,s,1,i)}})),il(s,1)}},jt=function(s){if(13===s.tag){var o=ih(s,134217728);if(null!==o)gi(o,s,134217728,R());il(s,134217728)}},Pt=function(s){if(13===s.tag){var o=yi(s),i=ih(s,o);if(null!==i)gi(i,s,o,R());il(s,o)}},It=function(){return Ct},Tt=function(s,o){var i=Ct;try{return Ct=s,o()}finally{Ct=i}},Ye=function(s,o,i){switch(o){case\"input\":if(bb(s,i),o=i.name,\"radio\"===i.type&&null!=o){for(i=s;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll(\"input[name=\"+JSON.stringify(\"\"+o)+'][type=\"radio\"]'),o=0;o<i.length;o++){var a=i[o];if(a!==s&&a.form===s.form){var u=Db(a);if(!u)throw Error(p(90));Wa(a),bb(a,u)}}}break;case\"textarea\":ib(s,i);break;case\"select\":null!=(o=i.value)&&fb(s,!!i.multiple,o,!1)}},Gb=Qk,Hb=Rk;var uo={usingClientEntryPoint:!1,Events:[Cb,ue,Db,Eb,Fb,Qk]},po={findFiberByHostInstance:Wc,bundleType:0,version:\"18.3.1\",rendererPackageName:\"react-dom\"},ho={bundleType:po.bundleType,version:po.version,rendererPackageName:po.rendererPackageName,rendererConfig:po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return null===(s=Zb(s))?null:s.stateNode},findFiberByHostInstance:po.findFiberByHostInstance||function jl(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.3.1-next-f1338f8080-20240426\"};if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var fo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fo.isDisabled&&fo.supportsFiber)try{_t=fo.inject(ho),St=fo}catch(Re){}}o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uo,o.createPortal=function(s,o){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!nl(o))throw Error(p(200));return function cl(s,o,i){var a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Y,key:null==a?null:\"\"+a,children:s,containerInfo:o,implementation:i}}(s,o,null,i)},o.createRoot=function(s,o){if(!nl(s))throw Error(p(299));var i=!1,a=\"\",u=lo;return null!=o&&(!0===o.unstable_strictMode&&(i=!0),void 0!==o.identifierPrefix&&(a=o.identifierPrefix),void 0!==o.onRecoverableError&&(u=o.onRecoverableError)),o=bl(s,1,!1,null,0,i,0,a,u),s[fn]=o.current,sf(8===s.nodeType?s.parentNode:s),new ll(o)},o.findDOMNode=function(s){if(null==s)return null;if(1===s.nodeType)return s;var o=s._reactInternals;if(void 0===o){if(\"function\"==typeof s.render)throw Error(p(188));throw s=Object.keys(s).join(\",\"),Error(p(268,s))}return s=null===(s=Zb(o))?null:s.stateNode},o.flushSync=function(s){return Rk(s)},o.hydrate=function(s,o,i){if(!ol(o))throw Error(p(200));return rl(null,s,o,!0,i)},o.hydrateRoot=function(s,o,i){if(!nl(s))throw Error(p(405));var a=null!=i&&i.hydratedSources||null,u=!1,_=\"\",w=lo;if(null!=i&&(!0===i.unstable_strictMode&&(u=!0),void 0!==i.identifierPrefix&&(_=i.identifierPrefix),void 0!==i.onRecoverableError&&(w=i.onRecoverableError)),o=el(o,null,s,1,null!=i?i:null,u,0,_,w),s[fn]=o.current,sf(s),a)for(s=0;s<a.length;s++)u=(u=(i=a[s])._getVersion)(i._source),null==o.mutableSourceEagerHydrationData?o.mutableSourceEagerHydrationData=[i,u]:o.mutableSourceEagerHydrationData.push(i,u);return new ml(o)},o.render=function(s,o,i){if(!ol(o))throw Error(p(200));return rl(null,s,o,!1,i)},o.unmountComponentAtNode=function(s){if(!ol(s))throw Error(p(40));return!!s._reactRootContainer&&(Rk((function(){rl(null,null,s,!1,(function(){s._reactRootContainer=null,s[fn]=null}))})),!0)},o.unstable_batchedUpdates=Qk,o.unstable_renderSubtreeIntoContainer=function(s,o,i,a){if(!ol(i))throw Error(p(200));if(null==s||void 0===s._reactInternals)throw Error(p(38));return rl(s,o,i,!1,a)},o.version=\"18.3.1-next-f1338f8080-20240426\"},22574:(s,o)=>{\"use strict\";var i={}.propertyIsEnumerable,a=Object.getOwnPropertyDescriptor,u=a&&!i.call({1:2},1);o.f=u?function propertyIsEnumerable(s){var o=a(this,s);return!!o&&o.enumerable}:i},23007:s=>{s.exports=function copyArray(s,o){var i=-1,a=s.length;for(o||(o=Array(a));++i<a;)o[i]=s[i];return o}},23034:(s,o,i)=>{\"use strict\";var a=i(88280),u=i(32567),_=Function.prototype;s.exports=function(s){var o=s.bind;return s===_||a(_,s)&&o===_.bind?u:o}},23045:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(49724),_=i(4993),w=i(74436).indexOf,x=i(38530),C=a([].push);s.exports=function(s,o){var i,a=_(s),j=0,L=[];for(i in a)!u(x,i)&&u(a,i)&&C(L,i);for(;o.length>j;)u(a,i=o[j++])&&(~w(L,i)||C(L,i));return L}},23546:(s,o,i)=>{var a=i(72552),u=i(40346),_=i(11331);s.exports=function isError(s){if(!u(s))return!1;var o=a(s);return\"[object Error]\"==o||\"[object DOMException]\"==o||\"string\"==typeof s.message&&\"string\"==typeof s.name&&!_(s)}},23805:s=>{s.exports=function isObject(s){var o=typeof s;return null!=s&&(\"object\"==o||\"function\"==o)}},23888:(s,o,i)=>{\"use strict\";var a=i(98828),u=i(75817);s.exports=!a((function(){var s=new Error(\"a\");return!(\"stack\"in s)||(Object.defineProperty(s,\"stack\",u(1,7)),7!==s.stack)}))},24107:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],x=new Array(64);function Sha256(){this.init(),this._w=x,u.call(this,64,56)}function ch(s,o,i){return i^s&(o^i)}function maj(s,o,i){return s&o|i&(s|o)}function sigma0(s){return(s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10)}function sigma1(s){return(s>>>6|s<<26)^(s>>>11|s<<21)^(s>>>25|s<<7)}function gamma0(s){return(s>>>7|s<<25)^(s>>>18|s<<14)^s>>>3}a(Sha256,u),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(s){for(var o,i=this._w,a=0|this._a,u=0|this._b,_=0|this._c,x=0|this._d,C=0|this._e,j=0|this._f,L=0|this._g,B=0|this._h,$=0;$<16;++$)i[$]=s.readInt32BE(4*$);for(;$<64;++$)i[$]=0|(((o=i[$-2])>>>17|o<<15)^(o>>>19|o<<13)^o>>>10)+i[$-7]+gamma0(i[$-15])+i[$-16];for(var V=0;V<64;++V){var U=B+sigma1(C)+ch(C,j,L)+w[V]+i[V]|0,z=sigma0(a)+maj(a,u,_)|0;B=L,L=j,j=C,C=x+U|0,x=_,_=u,u=a,a=U+z|0}this._a=a+this._a|0,this._b=u+this._b|0,this._c=_+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0,this._f=j+this._f|0,this._g=L+this._g|0,this._h=B+this._h|0},Sha256.prototype._hash=function(){var s=_.allocUnsafe(32);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s.writeInt32BE(this._h,28),s},s.exports=Sha256},24168:(s,o,i)=>{var a=i(91033),u=i(82819),_=i(9325);s.exports=function createPartial(s,o,i,w){var x=1&o,C=u(s);return function wrapper(){for(var o=-1,u=arguments.length,j=-1,L=w.length,B=Array(L+u),$=this&&this!==_&&this instanceof wrapper?C:s;++j<L;)B[j]=w[j];for(;u--;)B[j++]=arguments[++o];return a($,x?i:this,B)}}},24443:(s,o,i)=>{\"use strict\";var a=i(23045),u=i(80376).concat(\"length\",\"prototype\");o.f=Object.getOwnPropertyNames||function getOwnPropertyNames(s){return a(s,u)}},24647:(s,o,i)=>{var a=i(54552)({À:\"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\",ſ:\"s\"});s.exports=a},24677:(s,o,i)=>{\"use strict\";var a=i(81214).DebounceInput;a.DebounceInput=a,s.exports=a},24713:(s,o,i)=>{var a=i(2523),u=i(15389),_=i(61489),w=Math.max;s.exports=function findIndex(s,o,i){var x=null==s?0:s.length;if(!x)return-1;var C=null==i?0:_(i);return C<0&&(C=w(x+C,0)),a(s,u(o,3),C)}},24739:(s,o,i)=>{var a=i(26025);s.exports=function listCacheGet(s){var o=this.__data__,i=a(o,s);return i<0?void 0:o[i][1]}},24823:(s,o,i)=>{\"use strict\";var a=i(28311),u=i(13930),_=i(36624),w=i(4640),x=i(37812),C=i(20575),j=i(88280),L=i(10300),B=i(73448),$=i(40154),V=TypeError,Result=function(s,o){this.stopped=s,this.result=o},U=Result.prototype;s.exports=function(s,o,i){var z,Y,Z,ee,ie,ae,ce,le=i&&i.that,pe=!(!i||!i.AS_ENTRIES),de=!(!i||!i.IS_RECORD),fe=!(!i||!i.IS_ITERATOR),ye=!(!i||!i.INTERRUPTED),be=a(o,le),stop=function(s){return z&&$(z,\"normal\",s),new Result(!0,s)},callFn=function(s){return pe?(_(s),ye?be(s[0],s[1],stop):be(s[0],s[1])):ye?be(s,stop):be(s)};if(de)z=s.iterator;else if(fe)z=s;else{if(!(Y=B(s)))throw new V(w(s)+\" is not iterable\");if(x(Y)){for(Z=0,ee=C(s);ee>Z;Z++)if((ie=callFn(s[Z]))&&j(U,ie))return ie;return new Result(!1)}z=L(s,Y)}for(ae=de?s.next:z.next;!(ce=u(ae,z)).done;){try{ie=callFn(ce.value)}catch(s){$(z,\"throw\",s)}if(\"object\"==typeof ie&&ie&&j(U,ie))return ie}return new Result(!1)}},25160:s=>{s.exports=function baseSlice(s,o,i){var a=-1,u=s.length;o<0&&(o=-o>u?0:u+o),(i=i>u?u:i)<0&&(i+=u),u=o>i?0:i-o>>>0,o>>>=0;for(var _=Array(u);++a<u;)_[a]=s[a+o];return _}},25264:(s,o,i)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.CopyToClipboard=void 0;var a=_interopRequireDefault(i(96540)),u=_interopRequireDefault(i(17965)),_=[\"text\",\"onCopy\",\"options\",\"children\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=function _objectWithoutPropertiesLoose(s,o){if(null==s)return{};var i,a,u={},_=Object.keys(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||(u[i]=s[i]);return u}(s,o);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(s,i)&&(u[i]=s[i])}return u}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,o){return s.__proto__=o,s},_setPrototypeOf(s,o)}function _createSuper(s){var o=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(s);if(o){var u=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,u)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(s,o){if(o&&(\"object\"===_typeof(o)||\"function\"==typeof o))return o;if(void 0!==o)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,i)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var w=function(s){!function _inherits(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),o&&_setPrototypeOf(s,o)}(CopyToClipboard,s);var o=_createSuper(CopyToClipboard);function CopyToClipboard(){var s;!function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,CopyToClipboard);for(var i=arguments.length,_=new Array(i),w=0;w<i;w++)_[w]=arguments[w];return _defineProperty(_assertThisInitialized(s=o.call.apply(o,[this].concat(_))),\"onClick\",(function(o){var i=s.props,_=i.text,w=i.onCopy,x=i.children,C=i.options,j=a.default.Children.only(x),L=(0,u.default)(_,C);w&&w(_,L),j&&j.props&&\"function\"==typeof j.props.onClick&&j.props.onClick(o)})),s}return function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(CopyToClipboard,[{key:\"render\",value:function render(){var s=this.props,o=(s.text,s.onCopy,s.options,s.children),i=_objectWithoutProperties(s,_),u=a.default.Children.only(o);return a.default.cloneElement(u,_objectSpread(_objectSpread({},i),{},{onClick:this.onClick}))}}]),CopyToClipboard}(a.default.PureComponent);o.CopyToClipboard=w,_defineProperty(w,\"defaultProps\",{onCopy:void 0,options:void 0})},25382:(s,o,i)=>{\"use strict\";var a=i(65606),u=Object.keys||function(s){var o=[];for(var i in s)o.push(i);return o};s.exports=Duplex;var _=i(45412),w=i(16708);i(56698)(Duplex,_);for(var x=u(w.prototype),C=0;C<x.length;C++){var j=x[C];Duplex.prototype[j]||(Duplex.prototype[j]=w.prototype[j])}function Duplex(s){if(!(this instanceof Duplex))return new Duplex(s);_.call(this,s),w.call(this,s),this.allowHalfOpen=!0,s&&(!1===s.readable&&(this.readable=!1),!1===s.writable&&(this.writable=!1),!1===s.allowHalfOpen&&(this.allowHalfOpen=!1,this.once(\"end\",onend)))}function onend(){this._writableState.ended||a.nextTick(onEndNT,this)}function onEndNT(s){s.end()}Object.defineProperty(Duplex.prototype,\"writableHighWaterMark\",{enumerable:!1,get:function get(){return this._writableState.highWaterMark}}),Object.defineProperty(Duplex.prototype,\"writableBuffer\",{enumerable:!1,get:function get(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Duplex.prototype,\"writableLength\",{enumerable:!1,get:function get(){return this._writableState.length}}),Object.defineProperty(Duplex.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function set(s){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=s,this._writableState.destroyed=s)}})},25594:(s,o,i)=>{\"use strict\";var a=i(85582),u=i(62250),_=i(88280),w=i(51175),x=Object;s.exports=w?function(s){return\"symbol\"==typeof s}:function(s){var o=a(\"Symbol\");return u(o)&&_(o.prototype,x(s))}},25911:(s,o,i)=>{var a=i(38859),u=i(14248),_=i(19219);s.exports=function equalArrays(s,o,i,w,x,C){var j=1&i,L=s.length,B=o.length;if(L!=B&&!(j&&B>L))return!1;var $=C.get(s),V=C.get(o);if($&&V)return $==o&&V==s;var U=-1,z=!0,Y=2&i?new a:void 0;for(C.set(s,o),C.set(o,s);++U<L;){var Z=s[U],ee=o[U];if(w)var ie=j?w(ee,Z,U,o,s,C):w(Z,ee,U,s,o,C);if(void 0!==ie){if(ie)continue;z=!1;break}if(Y){if(!u(o,(function(s,o){if(!_(Y,o)&&(Z===s||x(Z,s,i,w,C)))return Y.push(o)}))){z=!1;break}}else if(Z!==ee&&!x(Z,ee,i,w,C)){z=!1;break}}return C.delete(s),C.delete(o),z}},26025:(s,o,i)=>{var a=i(75288);s.exports=function assocIndexOf(s,o){for(var i=s.length;i--;)if(a(s[i][0],o))return i;return-1}},26311:s=>{!function(){var o;function format(s){for(var o,i,a,u,_=1,w=[].slice.call(arguments),x=0,C=s.length,j=\"\",L=!1,B=!1,nextArg=function(){return w[_++]},slurpNumber=function(){for(var i=\"\";/\\d/.test(s[x]);)i+=s[x++],o=s[x];return i.length>0?parseInt(i):null};x<C;++x)if(o=s[x],L)switch(L=!1,\".\"==o?(B=!1,o=s[++x]):\"0\"==o&&\".\"==s[x+1]?(B=!0,o=s[x+=2]):B=!0,u=slurpNumber(),o){case\"b\":j+=parseInt(nextArg(),10).toString(2);break;case\"c\":j+=\"string\"==typeof(i=nextArg())||i instanceof String?i:String.fromCharCode(parseInt(i,10));break;case\"d\":j+=parseInt(nextArg(),10);break;case\"f\":a=String(parseFloat(nextArg()).toFixed(u||6)),j+=B?a:a.replace(/^0/,\"\");break;case\"j\":j+=JSON.stringify(nextArg());break;case\"o\":j+=\"0\"+parseInt(nextArg(),10).toString(8);break;case\"s\":j+=nextArg();break;case\"x\":j+=\"0x\"+parseInt(nextArg(),10).toString(16);break;case\"X\":j+=\"0x\"+parseInt(nextArg(),10).toString(16).toUpperCase();break;default:j+=o}else\"%\"===o?L=!0:j+=o;return j}(o=s.exports=format).format=format,o.vsprintf=function vsprintf(s,o){return format.apply(null,[s].concat(o))},\"undefined\"!=typeof console&&\"function\"==typeof console.log&&(o.printf=function printf(){console.log(format.apply(null,arguments))})}()},26571:s=>{s.exports=function powershell(s){const o={$pattern:/-?[A-z\\.\\-]+\\b/,keyword:\"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter\",built_in:\"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write\"},i={begin:\"`[\\\\s\\\\S]\",relevance:0},a={className:\"variable\",variants:[{begin:/\\$\\B/},{className:\"keyword\",begin:/\\$this/},{begin:/\\$[\\w\\d][\\w\\d_:]*/}]},u={className:\"string\",variants:[{begin:/\"/,end:/\"/},{begin:/@\"/,end:/^\"@/}],contains:[i,a,{className:\"variable\",begin:/\\$[A-z]/,end:/[^A-z]/}]},_={className:\"string\",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},w=s.inherit(s.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[{className:\"doctag\",variants:[{begin:/\\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\\s+\\S+/}]}]}),x={className:\"built_in\",variants:[{begin:\"(\".concat(\"Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where\",\")+(-)[\\\\w\\\\d]+\")}]},C={className:\"class\",beginKeywords:\"class enum\",end:/\\s*[{]/,excludeEnd:!0,relevance:0,contains:[s.TITLE_MODE]},j={className:\"function\",begin:/function\\s+/,end:/\\s*\\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:\"function\",relevance:0,className:\"keyword\"},{className:\"title\",begin:/\\w[\\w\\d]*((-)[\\w\\d]+)*/,relevance:0},{begin:/\\(/,end:/\\)/,className:\"params\",relevance:0,contains:[a]}]},L={begin:/using\\s/,end:/$/,returnBegin:!0,contains:[u,_,{className:\"keyword\",begin:/(using|assembly|command|module|namespace|type)/}]},B={variants:[{className:\"operator\",begin:\"(\".concat(\"-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor\",\")\\\\b\")},{className:\"literal\",begin:/(-)[\\w\\d]+/,relevance:0}]},$={className:\"function\",begin:/\\[.*\\]\\s*[\\w]+[ ]??\\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:\"keyword\",begin:\"(\".concat(o.keyword.toString().replace(/\\s/g,\"|\"),\")\\\\b\"),endsParent:!0,relevance:0},s.inherit(s.TITLE_MODE,{endsParent:!0})]},V=[$,w,i,s.NUMBER_MODE,u,_,x,a,{className:\"literal\",begin:/\\$(null|true|false)\\b/},{className:\"selector-tag\",begin:/@\\B/,relevance:0}],U={begin:/\\[/,end:/\\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat(\"self\",V,{begin:\"(\"+[\"string\",\"char\",\"byte\",\"int\",\"long\",\"bool\",\"decimal\",\"single\",\"double\",\"DateTime\",\"xml\",\"array\",\"hashtable\",\"void\"].join(\"|\")+\")\",className:\"built_in\",relevance:0},{className:\"type\",begin:/[\\.\\w\\d]+/,relevance:0})};return $.contains.unshift(U),{name:\"PowerShell\",aliases:[\"ps\",\"ps1\"],case_insensitive:!0,keywords:o,contains:V.concat(C,j,L,B,U)}}},26657:(s,o,i)=>{\"use strict\";var a=i(75208),u=function isClosingTag(s){return/<\\/+[^>]+>/.test(s)},_=function isSelfClosingTag(s){return/<[^>]+\\/>/.test(s)};function getType(s){return u(s)?\"ClosingTag\":function isOpeningTag(s){return function isTag(s){return/<[^>!]+>/.test(s)}(s)&&!u(s)&&!_(s)}(s)?\"OpeningTag\":_(s)?\"SelfClosingTag\":\"Text\"}s.exports=function(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=o.indentor,u=o.textNodesOnSameLine,_=0,w=[];i=i||\"    \";var x=function lexer(s){return function splitOnTags(s){return s.split(/(<\\/?[^>]+>)/g).filter((function(s){return\"\"!==s.trim()}))}(s).map((function(s){return{value:s,type:getType(s)}}))}(s).map((function(s,o,x){var C=s.value,j=s.type;\"ClosingTag\"===j&&_--;var L=a(i,_),B=L+C;if(\"OpeningTag\"===j&&_++,u){var $=x[o-1],V=x[o-2];\"ClosingTag\"===j&&\"Text\"===$.type&&\"OpeningTag\"===V.type&&(B=\"\"+L+V.value+$.value+C,w.push(o-2,o-1))}return B}));return w.forEach((function(s){return x[s]=null})),x.filter((function(s){return!!s})).join(\"\\n\")}},26710:(s,o,i)=>{var a=i(56698),u=i(24107),_=i(90392),w=i(92861).Buffer,x=new Array(64);function Sha224(){this.init(),this._w=x,_.call(this,64,56)}a(Sha224,u),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var s=w.allocUnsafe(28);return s.writeInt32BE(this._a,0),s.writeInt32BE(this._b,4),s.writeInt32BE(this._c,8),s.writeInt32BE(this._d,12),s.writeInt32BE(this._e,16),s.writeInt32BE(this._f,20),s.writeInt32BE(this._g,24),s},s.exports=Sha224},27096:(s,o,i)=>{const a=i(87586),u=i(6205),_=i(10023),w=i(8048);s.exports=s=>{var o,i,x=0,C={type:u.ROOT,stack:[]},j=C,L=C.stack,B=[],repeatErr=o=>{a.error(s,\"Nothing to repeat at column \"+(o-1))},$=a.strToChars(s);for(o=$.length;x<o;)switch(i=$[x++]){case\"\\\\\":switch(i=$[x++]){case\"b\":L.push(w.wordBoundary());break;case\"B\":L.push(w.nonWordBoundary());break;case\"w\":L.push(_.words());break;case\"W\":L.push(_.notWords());break;case\"d\":L.push(_.ints());break;case\"D\":L.push(_.notInts());break;case\"s\":L.push(_.whitespace());break;case\"S\":L.push(_.notWhitespace());break;default:/\\d/.test(i)?L.push({type:u.REFERENCE,value:parseInt(i,10)}):L.push({type:u.CHAR,value:i.charCodeAt(0)})}break;case\"^\":L.push(w.begin());break;case\"$\":L.push(w.end());break;case\"[\":var V;\"^\"===$[x]?(V=!0,x++):V=!1;var U=a.tokenizeClass($.slice(x),s);x+=U[1],L.push({type:u.SET,set:U[0],not:V});break;case\".\":L.push(_.anyChar());break;case\"(\":var z={type:u.GROUP,stack:[],remember:!0};\"?\"===(i=$[x])&&(i=$[x+1],x+=2,\"=\"===i?z.followedBy=!0:\"!\"===i?z.notFollowedBy=!0:\":\"!==i&&a.error(s,`Invalid group, character '${i}' after '?' at column `+(x-1)),z.remember=!1),L.push(z),B.push(j),j=z,L=z.stack;break;case\")\":0===B.length&&a.error(s,\"Unmatched ) at column \"+(x-1)),L=(j=B.pop()).options?j.options[j.options.length-1]:j.stack;break;case\"|\":j.options||(j.options=[j.stack],delete j.stack);var Y=[];j.options.push(Y),L=Y;break;case\"{\":var Z,ee,ie=/^(\\d+)(,(\\d+)?)?\\}/.exec($.slice(x));null!==ie?(0===L.length&&repeatErr(x),Z=parseInt(ie[1],10),ee=ie[2]?ie[3]?parseInt(ie[3],10):1/0:Z,x+=ie[0].length,L.push({type:u.REPETITION,min:Z,max:ee,value:L.pop()})):L.push({type:u.CHAR,value:123});break;case\"?\":0===L.length&&repeatErr(x),L.push({type:u.REPETITION,min:0,max:1,value:L.pop()});break;case\"+\":0===L.length&&repeatErr(x),L.push({type:u.REPETITION,min:1,max:1/0,value:L.pop()});break;case\"*\":0===L.length&&repeatErr(x),L.push({type:u.REPETITION,min:0,max:1/0,value:L.pop()});break;default:L.push({type:u.CHAR,value:i.charCodeAt(0)})}return 0!==B.length&&a.error(s,\"Unterminated group\"),C},s.exports.types=u},27301:s=>{s.exports=function baseUnary(s){return function(o){return s(o)}}},27374:(s,o)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=function(s,o,i){if(void 0===s)throw new Error('Reducer \"'+o+'\" returned undefined when handling \"'+i.type+'\" action. To ignore an action, you must explicitly return the previous state.')},s.exports=o.default},27534:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function baseIsArguments(s){return u(s)&&\"[object Arguments]\"==a(s)}},27816:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1518500249,1859775393,-1894007588,-899497514],x=new Array(80);function Sha(){this.init(),this._w=x,u.call(this,64,56)}function rotl30(s){return s<<30|s>>>2}function ft(s,o,i,a){return 0===s?o&i|~o&a:2===s?o&i|o&a|i&a:o^i^a}a(Sha,u),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(s){for(var o,i=this._w,a=0|this._a,u=0|this._b,_=0|this._c,x=0|this._d,C=0|this._e,j=0;j<16;++j)i[j]=s.readInt32BE(4*j);for(;j<80;++j)i[j]=i[j-3]^i[j-8]^i[j-14]^i[j-16];for(var L=0;L<80;++L){var B=~~(L/20),$=0|((o=a)<<5|o>>>27)+ft(B,u,_,x)+C+i[L]+w[B];C=x,x=_,_=rotl30(u),u=a,a=$}this._a=a+this._a|0,this._b=u+this._b|0,this._c=_+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0},Sha.prototype._hash=function(){var s=_.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha},28077:s=>{s.exports=function baseHasIn(s,o){return null!=s&&o in Object(s)}},28303:(s,o,i)=>{var a=i(56110)(i(9325),\"WeakMap\");s.exports=a},28311:(s,o,i)=>{\"use strict\";var a=i(92361),u=i(82159),_=i(41505),w=a(a.bind);s.exports=function(s,o){return u(s),void 0===o?s:_?w(s,o):function(){return s.apply(o,arguments)}}},28586:(s,o,i)=>{var a=i(56449),u=i(44394),_=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,w=/^\\w*$/;s.exports=function isKey(s,o){if(a(s))return!1;var i=typeof s;return!(\"number\"!=i&&\"symbol\"!=i&&\"boolean\"!=i&&null!=s&&!u(s))||(w.test(s)||!_.test(s)||null!=o&&s in Object(o))}},28754:(s,o,i)=>{var a=i(25160);s.exports=function castSlice(s,o,i){var u=s.length;return i=void 0===i?u:i,!o&&i>=u?s:a(s,o,i)}},28879:(s,o,i)=>{var a=i(74335)(Object.getPrototypeOf,Object);s.exports=a},29172:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function baseIsMap(s){return u(s)&&\"[object Map]\"==a(s)}},29367:(s,o,i)=>{\"use strict\";var a=i(82159),u=i(87136);s.exports=function(s,o){var i=s[o];return u(i)?void 0:a(i)}},29538:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(1907),_=i(13930),w=i(98828),x=i(2875),C=i(87170),j=i(22574),L=i(39298),B=i(16946),$=Object.assign,V=Object.defineProperty,U=u([].concat);s.exports=!$||w((function(){if(a&&1!==$({b:1},$(V({},\"a\",{enumerable:!0,get:function(){V(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var s={},o={},i=Symbol(\"assign detection\"),u=\"abcdefghijklmnopqrst\";return s[i]=7,u.split(\"\").forEach((function(s){o[s]=s})),7!==$({},s)[i]||x($({},o)).join(\"\")!==u}))?function assign(s,o){for(var i=L(s),u=arguments.length,w=1,$=C.f,V=j.f;u>w;)for(var z,Y=B(arguments[w++]),Z=$?U(x(Y),$(Y)):x(Y),ee=Z.length,ie=0;ee>ie;)z=Z[ie++],a&&!_(V,Y,z)||(i[z]=Y[z]);return i}:$},29817:s=>{s.exports=function stackHas(s){return this.__data__.has(s)}},29844:(s,o)=>{\"use strict\";function f(s,o){var i=s.length;s.push(o);e:for(;0<i;){var a=i-1>>>1,u=s[a];if(!(0<g(u,o)))break e;s[a]=o,s[i]=u,i=a}}function h(s){return 0===s.length?null:s[0]}function k(s){if(0===s.length)return null;var o=s[0],i=s.pop();if(i!==o){s[0]=i;e:for(var a=0,u=s.length,_=u>>>1;a<_;){var w=2*(a+1)-1,x=s[w],C=w+1,j=s[C];if(0>g(x,i))C<u&&0>g(j,x)?(s[a]=j,s[C]=i,a=C):(s[a]=x,s[w]=i,a=w);else{if(!(C<u&&0>g(j,i)))break e;s[a]=j,s[C]=i,a=C}}}return o}function g(s,o){var i=s.sortIndex-o.sortIndex;return 0!==i?i:s.id-o.id}if(\"object\"==typeof performance&&\"function\"==typeof performance.now){var i=performance;o.unstable_now=function(){return i.now()}}else{var a=Date,u=a.now();o.unstable_now=function(){return a.now()-u}}var _=[],w=[],x=1,C=null,j=3,L=!1,B=!1,$=!1,V=\"function\"==typeof setTimeout?setTimeout:null,U=\"function\"==typeof clearTimeout?clearTimeout:null,z=\"undefined\"!=typeof setImmediate?setImmediate:null;function G(s){for(var o=h(w);null!==o;){if(null===o.callback)k(w);else{if(!(o.startTime<=s))break;k(w),o.sortIndex=o.expirationTime,f(_,o)}o=h(w)}}function H(s){if($=!1,G(s),!B)if(null!==h(_))B=!0,I(J);else{var o=h(w);null!==o&&K(H,o.startTime-s)}}function J(s,i){B=!1,$&&($=!1,U(ie),ie=-1),L=!0;var a=j;try{for(G(i),C=h(_);null!==C&&(!(C.expirationTime>i)||s&&!M());){var u=C.callback;if(\"function\"==typeof u){C.callback=null,j=C.priorityLevel;var x=u(C.expirationTime<=i);i=o.unstable_now(),\"function\"==typeof x?C.callback=x:C===h(_)&&k(_),G(i)}else k(_);C=h(_)}if(null!==C)var V=!0;else{var z=h(w);null!==z&&K(H,z.startTime-i),V=!1}return V}finally{C=null,j=a,L=!1}}\"undefined\"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var Y,Z=!1,ee=null,ie=-1,ae=5,ce=-1;function M(){return!(o.unstable_now()-ce<ae)}function R(){if(null!==ee){var s=o.unstable_now();ce=s;var i=!0;try{i=ee(!0,s)}finally{i?Y():(Z=!1,ee=null)}}else Z=!1}if(\"function\"==typeof z)Y=function(){z(R)};else if(\"undefined\"!=typeof MessageChannel){var le=new MessageChannel,pe=le.port2;le.port1.onmessage=R,Y=function(){pe.postMessage(null)}}else Y=function(){V(R,0)};function I(s){ee=s,Z||(Z=!0,Y())}function K(s,i){ie=V((function(){s(o.unstable_now())}),i)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(s){s.callback=null},o.unstable_continueExecution=function(){B||L||(B=!0,I(J))},o.unstable_forceFrameRate=function(s){0>s||125<s?console.error(\"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"):ae=0<s?Math.floor(1e3/s):5},o.unstable_getCurrentPriorityLevel=function(){return j},o.unstable_getFirstCallbackNode=function(){return h(_)},o.unstable_next=function(s){switch(j){case 1:case 2:case 3:var o=3;break;default:o=j}var i=j;j=o;try{return s()}finally{j=i}},o.unstable_pauseExecution=function(){},o.unstable_requestPaint=function(){},o.unstable_runWithPriority=function(s,o){switch(s){case 1:case 2:case 3:case 4:case 5:break;default:s=3}var i=j;j=s;try{return o()}finally{j=i}},o.unstable_scheduleCallback=function(s,i,a){var u=o.unstable_now();switch(\"object\"==typeof a&&null!==a?a=\"number\"==typeof(a=a.delay)&&0<a?u+a:u:a=u,s){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return s={id:x++,callback:i,priorityLevel:s,startTime:a,expirationTime:C=a+C,sortIndex:-1},a>u?(s.sortIndex=a,f(w,s),null===h(_)&&s===h(w)&&($?(U(ie),ie=-1):$=!0,K(H,a-u))):(s.sortIndex=C,f(_,s),B||L||(B=!0,I(J))),s},o.unstable_shouldYield=M,o.unstable_wrapCallback=function(s){var o=j;return function(){var i=j;j=o;try{return s.apply(this,arguments)}finally{j=i}}}},30294:s=>{s.exports=function isLength(s){return\"number\"==typeof s&&s>-1&&s%1==0&&s<=9007199254740991}},30361:s=>{var o=/^(?:0|[1-9]\\d*)$/;s.exports=function isIndex(s,i){var a=typeof s;return!!(i=null==i?9007199254740991:i)&&(\"number\"==a||\"symbol\"!=a&&o.test(s))&&s>-1&&s%1==0&&s<i}},30641:(s,o,i)=>{var a=i(86649),u=i(95950);s.exports=function baseForOwn(s,o){return s&&a(s,o,u)}},30756:(s,o,i)=>{var a=i(23805);s.exports=function isStrictComparable(s){return s==s&&!a(s)}},30980:(s,o,i)=>{var a=i(39344),u=i(94033);function LazyWrapper(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}LazyWrapper.prototype=a(u.prototype),LazyWrapper.prototype.constructor=LazyWrapper,s.exports=LazyWrapper},31175:(s,o,i)=>{var a=i(26025);s.exports=function listCacheSet(s,o){var i=this.__data__,u=a(i,s);return u<0?(++this.size,i.push([s,o])):i[u][1]=o,this}},31380:s=>{s.exports=function setCacheAdd(s){return this.__data__.set(s,\"__lodash_hash_undefined__\"),this}},31499:s=>{var o={\"&\":\"&amp;\",'\"':\"&quot;\",\"'\":\"&apos;\",\"<\":\"&lt;\",\">\":\"&gt;\"};s.exports=function escapeForXML(s){return s&&s.replace?s.replace(/([&\"<>'])/g,(function(s,i){return o[i]})):s}},31769:(s,o,i)=>{var a=i(56449),u=i(28586),_=i(61802),w=i(13222);s.exports=function castPath(s,o){return a(s)?s:u(s,o)?[s]:_(w(s))}},31800:s=>{var o=/\\s/;s.exports=function trimmedEndIndex(s){for(var i=s.length;i--&&o.test(s.charAt(i)););return i}},32096:(s,o,i)=>{\"use strict\";var a=i(90160);s.exports=function(s,o){return void 0===s?arguments.length<2?\"\":o:a(s)}},32567:(s,o,i)=>{\"use strict\";i(79307);var a=i(61747);s.exports=a(\"Function\",\"bind\")},32629:(s,o,i)=>{var a=i(9999);s.exports=function clone(s){return a(s,4)}},32804:(s,o,i)=>{var a=i(56110)(i(9325),\"Promise\");s.exports=a},32827:(s,o,i)=>{var a=i(56698),u=i(82890),_=i(90392),w=i(92861).Buffer,x=new Array(160);function Sha384(){this.init(),this._w=x,_.call(this,128,112)}a(Sha384,u),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var s=w.allocUnsafe(48);function writeInt64BE(o,i,a){s.writeInt32BE(o,a),s.writeInt32BE(i,a+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),s},s.exports=Sha384},32865:(s,o,i)=>{var a=i(19570),u=i(51811)(a);s.exports=u},33855:(s,o,i)=>{var a=i(9999),u=i(15389);s.exports=function iteratee(s){return u(\"function\"==typeof s?s:a(s,1))}},34035:(s,o,i)=>{const a=i(3110),u=i(86804);o.g$=a,o.KeyValuePair=i(55973),o.G6=u.ArraySlice,o.ot=u.ObjectSlice,o.Hg=u.Element,o.Om=u.StringElement,o.kT=u.NumberElement,o.bd=u.BooleanElement,o.Os=u.NullElement,o.wE=u.ArrayElement,o.Sh=u.ObjectElement,o.Pr=u.MemberElement,o.sI=u.RefElement,o.Ft=u.LinkElement,o.e=u.refract,i(85105),i(75147)},34084:(s,o,i)=>{\"use strict\";var a=i(62250),u=i(46285),_=i(79192);s.exports=function(s,o,i){var w,x;return _&&a(w=o.constructor)&&w!==i&&u(x=w.prototype)&&x!==i.prototype&&_(s,x),s}},34840:(s,o,i)=>{var a=\"object\"==typeof i.g&&i.g&&i.g.Object===Object&&i.g;s.exports=a},34849:(s,o,i)=>{\"use strict\";var a=i(65482),u=Math.max,_=Math.min;s.exports=function(s,o){var i=a(s);return i<0?u(i+o,0):_(i,o)}},34932:s=>{s.exports=function arrayMap(s,o){for(var i=-1,a=null==s?0:s.length,u=Array(a);++i<a;)u[i]=o(s[i],i,s);return u}},35344:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function bash(s){const o={},i={begin:/\\$\\{/,end:/\\}/,contains:[\"self\",{begin:/:-/,contains:[o]}]};Object.assign(o,{className:\"variable\",variants:[{begin:concat(/\\$[\\w\\d#@][\\w\\d_]*/,\"(?![\\\\w\\\\d])(?![$])\")},i]});const a={className:\"subst\",begin:/\\$\\(/,end:/\\)/,contains:[s.BACKSLASH_ESCAPE]},u={begin:/<<-?\\s*(?=\\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\\w+)/,end:/(\\w+)/,className:\"string\"})]}},_={className:\"string\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE,o,a]};a.contains.push(_);const w={begin:/\\$\\(\\(/,end:/\\)\\)/,contains:[{begin:/\\d+#[0-9a-f]+/,className:\"number\"},s.NUMBER_MODE,o]},x=s.SHEBANG({binary:`(${[\"fish\",\"bash\",\"zsh\",\"sh\",\"csh\",\"ksh\",\"tcsh\",\"dash\",\"scsh\"].join(\"|\")})`,relevance:10}),C={className:\"function\",begin:/\\w[\\w\\d_]*\\s*\\(\\s*\\)\\s*\\{/,returnBegin:!0,contains:[s.inherit(s.TITLE_MODE,{begin:/\\w[\\w\\d_]*/})],relevance:0};return{name:\"Bash\",aliases:[\"sh\",\"zsh\"],keywords:{$pattern:/\\b[a-z._-]+\\b/,keyword:\"if then else elif fi for while in do done case esac function\",literal:\"true false\",built_in:\"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp\"},contains:[x,s.SHEBANG(),C,w,s.HASH_COMMENT_MODE,u,_,{className:\"\",begin:/\\\\\"/},{className:\"string\",begin:/'/,end:/'/},o]}}},35529:(s,o,i)=>{var a=i(39344),u=i(28879),_=i(55527);s.exports=function initCloneObject(s){return\"function\"!=typeof s.constructor||_(s)?{}:a(u(s))}},35749:(s,o,i)=>{var a=i(81042);s.exports=function hashSet(s,o){var i=this.__data__;return this.size+=this.has(s)?0:1,i[s]=a&&void 0===o?\"__lodash_hash_undefined__\":o,this}},35970:(s,o,i)=>{var a=i(83120);s.exports=function flatten(s){return(null==s?0:s.length)?a(s,1):[]}},36128:(s,o,i)=>{\"use strict\";var a=i(7376),u=i(45951),_=i(2532),w=\"__core-js_shared__\",x=s.exports=u[w]||_(w,{});(x.versions||(x.versions=[])).push({version:\"3.40.0\",mode:a?\"pure\":\"global\",copyright:\"© 2014-2025 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},36306:s=>{var o=\"__lodash_placeholder__\";s.exports=function replaceHolders(s,i){for(var a=-1,u=s.length,_=0,w=[];++a<u;){var x=s[a];x!==i&&x!==o||(s[a]=o,w[_++]=a)}return w}},36371:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(85582),_=i(76024),w=i(98828),x=i(19358),C=\"AggregateError\",j=u(C),L=!w((function(){return 1!==j([1]).errors[0]}))&&w((function(){return 7!==j([1],C,{cause:7}).cause}));a({global:!0,constructor:!0,arity:2,forced:L},{AggregateError:x(C,(function(s){return function AggregateError(o,i){return _(s,this,arguments)}}),L,!0)})},36624:(s,o,i)=>{\"use strict\";var a=i(46285),u=String,_=TypeError;s.exports=function(s){if(a(s))return s;throw new _(u(s)+\" is not an object\")}},36800:(s,o,i)=>{var a=i(75288),u=i(64894),_=i(30361),w=i(23805);s.exports=function isIterateeCall(s,o,i){if(!w(i))return!1;var x=typeof o;return!!(\"number\"==x?u(i)&&_(o,i.length):\"string\"==x&&o in i)&&a(i[o],s)}},36833:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(49724),_=Function.prototype,w=a&&Object.getOwnPropertyDescriptor,x=u(_,\"name\"),C=x&&\"something\"===function something(){}.name,j=x&&(!a||a&&w(_,\"name\").configurable);s.exports={EXISTS:x,PROPER:C,CONFIGURABLE:j}},37007:s=>{\"use strict\";var o,i=\"object\"==typeof Reflect?Reflect:null,a=i&&\"function\"==typeof i.apply?i.apply:function ReflectApply(s,o,i){return Function.prototype.apply.call(s,o,i)};o=i&&\"function\"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:function ReflectOwnKeys(s){return Object.getOwnPropertyNames(s)};var u=Number.isNaN||function NumberIsNaN(s){return s!=s};function EventEmitter(){EventEmitter.init.call(this)}s.exports=EventEmitter,s.exports.once=function once(s,o){return new Promise((function(i,a){function errorListener(i){s.removeListener(o,resolver),a(i)}function resolver(){\"function\"==typeof s.removeListener&&s.removeListener(\"error\",errorListener),i([].slice.call(arguments))}eventTargetAgnosticAddListener(s,o,resolver,{once:!0}),\"error\"!==o&&function addErrorHandlerIfEventEmitter(s,o,i){\"function\"==typeof s.on&&eventTargetAgnosticAddListener(s,\"error\",o,i)}(s,errorListener,{once:!0})}))},EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._eventsCount=0,EventEmitter.prototype._maxListeners=void 0;var _=10;function checkListener(s){if(\"function\"!=typeof s)throw new TypeError('The \"listener\" argument must be of type Function. Received type '+typeof s)}function _getMaxListeners(s){return void 0===s._maxListeners?EventEmitter.defaultMaxListeners:s._maxListeners}function _addListener(s,o,i,a){var u,_,w;if(checkListener(i),void 0===(_=s._events)?(_=s._events=Object.create(null),s._eventsCount=0):(void 0!==_.newListener&&(s.emit(\"newListener\",o,i.listener?i.listener:i),_=s._events),w=_[o]),void 0===w)w=_[o]=i,++s._eventsCount;else if(\"function\"==typeof w?w=_[o]=a?[i,w]:[w,i]:a?w.unshift(i):w.push(i),(u=_getMaxListeners(s))>0&&w.length>u&&!w.warned){w.warned=!0;var x=new Error(\"Possible EventEmitter memory leak detected. \"+w.length+\" \"+String(o)+\" listeners added. Use emitter.setMaxListeners() to increase limit\");x.name=\"MaxListenersExceededWarning\",x.emitter=s,x.type=o,x.count=w.length,function ProcessEmitWarning(s){console&&console.warn&&console.warn(s)}(x)}return s}function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(s,o,i){var a={fired:!1,wrapFn:void 0,target:s,type:o,listener:i},u=onceWrapper.bind(a);return u.listener=i,a.wrapFn=u,u}function _listeners(s,o,i){var a=s._events;if(void 0===a)return[];var u=a[o];return void 0===u?[]:\"function\"==typeof u?i?[u.listener||u]:[u]:i?function unwrapListeners(s){for(var o=new Array(s.length),i=0;i<o.length;++i)o[i]=s[i].listener||s[i];return o}(u):arrayClone(u,u.length)}function listenerCount(s){var o=this._events;if(void 0!==o){var i=o[s];if(\"function\"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function arrayClone(s,o){for(var i=new Array(o),a=0;a<o;++a)i[a]=s[a];return i}function eventTargetAgnosticAddListener(s,o,i,a){if(\"function\"==typeof s.on)a.once?s.once(o,i):s.on(o,i);else{if(\"function\"!=typeof s.addEventListener)throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type '+typeof s);s.addEventListener(o,(function wrapListener(u){a.once&&s.removeEventListener(o,wrapListener),i(u)}))}}Object.defineProperty(EventEmitter,\"defaultMaxListeners\",{enumerable:!0,get:function(){return _},set:function(s){if(\"number\"!=typeof s||s<0||u(s))throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received '+s+\".\");_=s}}),EventEmitter.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},EventEmitter.prototype.setMaxListeners=function setMaxListeners(s){if(\"number\"!=typeof s||s<0||u(s))throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received '+s+\".\");return this._maxListeners=s,this},EventEmitter.prototype.getMaxListeners=function getMaxListeners(){return _getMaxListeners(this)},EventEmitter.prototype.emit=function emit(s){for(var o=[],i=1;i<arguments.length;i++)o.push(arguments[i]);var u=\"error\"===s,_=this._events;if(void 0!==_)u=u&&void 0===_.error;else if(!u)return!1;if(u){var w;if(o.length>0&&(w=o[0]),w instanceof Error)throw w;var x=new Error(\"Unhandled error.\"+(w?\" (\"+w.message+\")\":\"\"));throw x.context=w,x}var C=_[s];if(void 0===C)return!1;if(\"function\"==typeof C)a(C,this,o);else{var j=C.length,L=arrayClone(C,j);for(i=0;i<j;++i)a(L[i],this,o)}return!0},EventEmitter.prototype.addListener=function addListener(s,o){return _addListener(this,s,o,!1)},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.prependListener=function prependListener(s,o){return _addListener(this,s,o,!0)},EventEmitter.prototype.once=function once(s,o){return checkListener(o),this.on(s,_onceWrap(this,s,o)),this},EventEmitter.prototype.prependOnceListener=function prependOnceListener(s,o){return checkListener(o),this.prependListener(s,_onceWrap(this,s,o)),this},EventEmitter.prototype.removeListener=function removeListener(s,o){var i,a,u,_,w;if(checkListener(o),void 0===(a=this._events))return this;if(void 0===(i=a[s]))return this;if(i===o||i.listener===o)0==--this._eventsCount?this._events=Object.create(null):(delete a[s],a.removeListener&&this.emit(\"removeListener\",s,i.listener||o));else if(\"function\"!=typeof i){for(u=-1,_=i.length-1;_>=0;_--)if(i[_]===o||i[_].listener===o){w=i[_].listener,u=_;break}if(u<0)return this;0===u?i.shift():function spliceOne(s,o){for(;o+1<s.length;o++)s[o]=s[o+1];s.pop()}(i,u),1===i.length&&(a[s]=i[0]),void 0!==a.removeListener&&this.emit(\"removeListener\",s,w||o)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function removeAllListeners(s){var o,i,a;if(void 0===(i=this._events))return this;if(void 0===i.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==i[s]&&(0==--this._eventsCount?this._events=Object.create(null):delete i[s]),this;if(0===arguments.length){var u,_=Object.keys(i);for(a=0;a<_.length;++a)\"removeListener\"!==(u=_[a])&&this.removeAllListeners(u);return this.removeAllListeners(\"removeListener\"),this._events=Object.create(null),this._eventsCount=0,this}if(\"function\"==typeof(o=i[s]))this.removeListener(s,o);else if(void 0!==o)for(a=o.length-1;a>=0;a--)this.removeListener(s,o[a]);return this},EventEmitter.prototype.listeners=function listeners(s){return _listeners(this,s,!0)},EventEmitter.prototype.rawListeners=function rawListeners(s){return _listeners(this,s,!1)},EventEmitter.listenerCount=function(s,o){return\"function\"==typeof s.listenerCount?s.listenerCount(o):listenerCount.call(s,o)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function eventNames(){return this._eventsCount>0?o(this._events):[]}},37167:(s,o,i)=>{var a=i(4901),u=i(27301),_=i(86009),w=_&&_.isTypedArray,x=w?u(w):a;s.exports=x},37217:(s,o,i)=>{var a=i(80079),u=i(51420),_=i(90938),w=i(63605),x=i(29817),C=i(80945);function Stack(s){var o=this.__data__=new a(s);this.size=o.size}Stack.prototype.clear=u,Stack.prototype.delete=_,Stack.prototype.get=w,Stack.prototype.has=x,Stack.prototype.set=C,s.exports=Stack},37241:(s,o,i)=>{var a=i(70695),u=i(72903),_=i(64894);s.exports=function keysIn(s){return _(s)?a(s,!0):u(s)}},37257:(s,o,i)=>{\"use strict\";i(96605),i(64502),i(36371),i(99363),i(7057);var a=i(92046);s.exports=a.AggregateError},37334:s=>{s.exports=function constant(s){return function(){return s}}},37381:(s,o,i)=>{var a=i(48152),u=i(63950),_=a?function(s){return a.get(s)}:u;s.exports=_},37471:(s,o,i)=>{var a=i(91596),u=i(53320),_=i(58523),w=i(82819),x=i(18073),C=i(11287),j=i(68294),L=i(36306),B=i(9325);s.exports=function createHybrid(s,o,i,$,V,U,z,Y,Z,ee){var ie=128&o,ae=1&o,ce=2&o,le=24&o,pe=512&o,de=ce?void 0:w(s);return function wrapper(){for(var fe=arguments.length,ye=Array(fe),be=fe;be--;)ye[be]=arguments[be];if(le)var _e=C(wrapper),Se=_(ye,_e);if($&&(ye=a(ye,$,V,le)),U&&(ye=u(ye,U,z,le)),fe-=Se,le&&fe<ee){var we=L(ye,_e);return x(s,o,createHybrid,wrapper.placeholder,i,ye,we,Y,Z,ee-fe)}var xe=ae?i:this,Pe=ce?xe[s]:s;return fe=ye.length,Y?ye=j(ye,Y):pe&&fe>1&&ye.reverse(),ie&&Z<fe&&(ye.length=Z),this&&this!==B&&this instanceof wrapper&&(Pe=de||w(Pe)),Pe.apply(xe,ye)}}},37812:(s,o,i)=>{\"use strict\";var a=i(76264),u=i(93742),_=a(\"iterator\"),w=Array.prototype;s.exports=function(s){return void 0!==s&&(u.Array===s||w[_]===s)}},37828:(s,o,i)=>{var a=i(9325).Uint8Array;s.exports=a},38221:(s,o,i)=>{var a=i(23805),u=i(10124),_=i(99374),w=Math.max,x=Math.min;s.exports=function debounce(s,o,i){var C,j,L,B,$,V,U=0,z=!1,Y=!1,Z=!0;if(\"function\"!=typeof s)throw new TypeError(\"Expected a function\");function invokeFunc(o){var i=C,a=j;return C=j=void 0,U=o,B=s.apply(a,i)}function shouldInvoke(s){var i=s-V;return void 0===V||i>=o||i<0||Y&&s-U>=L}function timerExpired(){var s=u();if(shouldInvoke(s))return trailingEdge(s);$=setTimeout(timerExpired,function remainingWait(s){var i=o-(s-V);return Y?x(i,L-(s-U)):i}(s))}function trailingEdge(s){return $=void 0,Z&&C?invokeFunc(s):(C=j=void 0,B)}function debounced(){var s=u(),i=shouldInvoke(s);if(C=arguments,j=this,V=s,i){if(void 0===$)return function leadingEdge(s){return U=s,$=setTimeout(timerExpired,o),z?invokeFunc(s):B}(V);if(Y)return clearTimeout($),$=setTimeout(timerExpired,o),invokeFunc(V)}return void 0===$&&($=setTimeout(timerExpired,o)),B}return o=_(o)||0,a(i)&&(z=!!i.leading,L=(Y=\"maxWait\"in i)?w(_(i.maxWait)||0,o):L,Z=\"trailing\"in i?!!i.trailing:Z),debounced.cancel=function cancel(){void 0!==$&&clearTimeout($),U=0,C=V=j=$=void 0},debounced.flush=function flush(){return void 0===$?B:trailingEdge(u())},debounced}},38329:(s,o,i)=>{var a=i(64894);s.exports=function createBaseEach(s,o){return function(i,u){if(null==i)return i;if(!a(i))return s(i,u);for(var _=i.length,w=o?_:-1,x=Object(i);(o?w--:++w<_)&&!1!==u(x[w],w,x););return i}}},38440:(s,o,i)=>{var a=i(16038),u=i(27301),_=i(86009),w=_&&_.isSet,x=w?u(w):a;s.exports=x},38530:s=>{\"use strict\";s.exports={}},38816:(s,o,i)=>{var a=i(35970),u=i(56757),_=i(32865);s.exports=function flatRest(s){return _(u(s,void 0,a),s+\"\")}},38859:(s,o,i)=>{var a=i(53661),u=i(31380),_=i(51459);function SetCache(s){var o=-1,i=null==s?0:s.length;for(this.__data__=new a;++o<i;)this.add(s[o])}SetCache.prototype.add=SetCache.prototype.push=u,SetCache.prototype.has=_,s.exports=SetCache},39259:(s,o,i)=>{\"use strict\";var a=i(46285),u=i(61626);s.exports=function(s,o){a(o)&&\"cause\"in o&&u(s,\"cause\",o.cause)}},39298:(s,o,i)=>{\"use strict\";var a=i(74239),u=Object;s.exports=function(s){return u(a(s))}},39344:(s,o,i)=>{var a=i(23805),u=Object.create,_=function(){function object(){}return function(s){if(!a(s))return{};if(u)return u(s);object.prototype=s;var o=new object;return object.prototype=void 0,o}}();s.exports=_},39447:(s,o,i)=>{\"use strict\";var a=i(98828);s.exports=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},40154:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(36624),_=i(29367);s.exports=function(s,o,i){var w,x;u(s);try{if(!(w=_(s,\"return\"))){if(\"throw\"===o)throw i;return i}w=a(w,s)}catch(s){x=!0,w=s}if(\"throw\"===o)throw i;if(x)throw w;return u(w),i}},40239:(s,o,i)=>{const a=i(10316);s.exports=class NumberElement extends a{constructor(s,o,i){super(s,o,i),this.element=\"number\"}primitive(){return\"number\"}}},40345:(s,o,i)=>{s.exports=i(37007).EventEmitter},40346:s=>{s.exports=function isObjectLike(s){return null!=s&&\"object\"==typeof s}},40551:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(62250),_=a.WeakMap;s.exports=u(_)&&/native code/.test(String(_))},40860:(s,o,i)=>{var a=i(40882),u=i(80909),_=i(15389),w=i(85558),x=i(56449);s.exports=function reduce(s,o,i){var C=x(s)?a:w,j=arguments.length<3;return C(s,_(o,4),i,j,u)}},40882:s=>{s.exports=function arrayReduce(s,o,i,a){var u=-1,_=null==s?0:s.length;for(a&&_&&(i=s[++u]);++u<_;)i=o(i,s[u],u,s);return i}},40961:(s,o,i)=>{\"use strict\";!function checkDCE(){if(\"undefined\"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&\"function\"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(s){console.error(s)}}(),s.exports=i(22551)},40975:(s,o,i)=>{\"use strict\";var a=i(9748);s.exports=a},41067:(s,o,i)=>{const a=i(10316);s.exports=class NullElement extends a{constructor(s,o,i){super(s||null,o,i),this.element=\"null\"}primitive(){return\"null\"}set(){return new Error(\"Cannot set the value of null\")}}},41176:s=>{\"use strict\";var o=Math.ceil,i=Math.floor;s.exports=Math.trunc||function trunc(s){var a=+s;return(a>0?i:o)(a)}},41505:(s,o,i)=>{\"use strict\";var a=i(98828);s.exports=!a((function(){var s=function(){}.bind();return\"function\"!=typeof s||s.hasOwnProperty(\"prototype\")}))},41799:(s,o,i)=>{var a=i(37217),u=i(60270);s.exports=function baseIsMatch(s,o,i,_){var w=i.length,x=w,C=!_;if(null==s)return!x;for(s=Object(s);w--;){var j=i[w];if(C&&j[2]?j[1]!==s[j[0]]:!(j[0]in s))return!1}for(;++w<x;){var L=(j=i[w])[0],B=s[L],$=j[1];if(C&&j[2]){if(void 0===B&&!(L in s))return!1}else{var V=new a;if(_)var U=_(B,$,L,s,o,V);if(!(void 0===U?u($,B,3,_,V):U))return!1}}return!0}},41859:(s,o,i)=>{const a=i(27096),u=i(78004),_=a.types;s.exports=class RandExp{constructor(s,o){if(this._setDefaults(s),s instanceof RegExp)this.ignoreCase=s.ignoreCase,this.multiline=s.multiline,s=s.source;else{if(\"string\"!=typeof s)throw new Error(\"Expected a regexp or string\");this.ignoreCase=o&&-1!==o.indexOf(\"i\"),this.multiline=o&&-1!==o.indexOf(\"m\")}this.tokens=a(s)}_setDefaults(s){this.max=null!=s.max?s.max:null!=RandExp.prototype.max?RandExp.prototype.max:100,this.defaultRange=s.defaultRange?s.defaultRange:this.defaultRange.clone(),s.randInt&&(this.randInt=s.randInt)}gen(){return this._gen(this.tokens,[])}_gen(s,o){var i,a,u,w,x;switch(s.type){case _.ROOT:case _.GROUP:if(s.followedBy||s.notFollowedBy)return\"\";for(s.remember&&void 0===s.groupNumber&&(s.groupNumber=o.push(null)-1),a=\"\",w=0,x=(i=s.options?this._randSelect(s.options):s.stack).length;w<x;w++)a+=this._gen(i[w],o);return s.remember&&(o[s.groupNumber]=a),a;case _.POSITION:return\"\";case _.SET:var C=this._expand(s);return C.length?String.fromCharCode(this._randSelect(C)):\"\";case _.REPETITION:for(u=this.randInt(s.min,s.max===1/0?s.min+this.max:s.max),a=\"\",w=0;w<u;w++)a+=this._gen(s.value,o);return a;case _.REFERENCE:return o[s.value-1]||\"\";case _.CHAR:var j=this.ignoreCase&&this._randBool()?this._toOtherCase(s.value):s.value;return String.fromCharCode(j)}}_toOtherCase(s){return s+(97<=s&&s<=122?-32:65<=s&&s<=90?32:0)}_randBool(){return!this.randInt(0,1)}_randSelect(s){return s instanceof u?s.index(this.randInt(0,s.length-1)):s[this.randInt(0,s.length-1)]}_expand(s){if(s.type===a.types.CHAR)return new u(s.value);if(s.type===a.types.RANGE)return new u(s.from,s.to);{let o=new u;for(let i=0;i<s.set.length;i++){let a=this._expand(s.set[i]);if(o.add(a),this.ignoreCase)for(let s=0;s<a.length;s++){let i=a.index(s),u=this._toOtherCase(i);i!==u&&o.add(u)}}return s.not?this.defaultRange.clone().subtract(o):this.defaultRange.clone().intersect(o)}}randInt(s,o){return s+Math.floor(Math.random()*(1+o-s))}get defaultRange(){return this._range=this._range||new u(32,126)}set defaultRange(s){this._range=s}static randexp(s,o){var i;return\"string\"==typeof s&&(s=new RegExp(s,o)),void 0===s._randexp?(i=new RandExp(s,o),s._randexp=i):(i=s._randexp)._setDefaults(s),i.gen()}static sugar(){RegExp.prototype.gen=function(){return RandExp.randexp(this)}}}},42054:s=>{var o=\"\\\\ud800-\\\\udfff\",i=\"[\"+o+\"]\",a=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",u=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",_=\"[^\"+o+\"]\",w=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",x=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",C=\"(?:\"+a+\"|\"+u+\")\"+\"?\",j=\"[\\\\ufe0e\\\\ufe0f]?\",L=j+C+(\"(?:\\\\u200d(?:\"+[_,w,x].join(\"|\")+\")\"+j+C+\")*\"),B=\"(?:\"+[_+a+\"?\",a,w,x,i].join(\"|\")+\")\",$=RegExp(u+\"(?=\"+u+\")|\"+B+L,\"g\");s.exports=function unicodeToArray(s){return s.match($)||[]}},42072:(s,o,i)=>{var a=i(34932),u=i(23007),_=i(56449),w=i(44394),x=i(61802),C=i(77797),j=i(13222);s.exports=function toPath(s){return _(s)?a(s,C):w(s)?[s]:u(x(j(s)))}},42156:s=>{\"use strict\";s.exports=function(){}},42220:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(58661),_=i(74284),w=i(36624),x=i(4993),C=i(2875);o.f=a&&!u?Object.defineProperties:function defineProperties(s,o){w(s);for(var i,a=x(o),u=C(o),j=u.length,L=0;j>L;)_.f(s,i=u[L++],a[i]);return s}},42426:(s,o,i)=>{var a=i(14248),u=i(15389),_=i(90916),w=i(56449),x=i(36800);s.exports=function some(s,o,i){var C=w(s)?a:_;return i&&x(s,o,i)&&(o=void 0),C(s,u(o,3))}},42824:(s,o,i)=>{var a=i(87805),u=i(93290),_=i(71961),w=i(23007),x=i(35529),C=i(72428),j=i(56449),L=i(83693),B=i(3656),$=i(1882),V=i(23805),U=i(11331),z=i(37167),Y=i(14974),Z=i(69884);s.exports=function baseMergeDeep(s,o,i,ee,ie,ae,ce){var le=Y(s,i),pe=Y(o,i),de=ce.get(pe);if(de)a(s,i,de);else{var fe=ae?ae(le,pe,i+\"\",s,o,ce):void 0,ye=void 0===fe;if(ye){var be=j(pe),_e=!be&&B(pe),Se=!be&&!_e&&z(pe);fe=pe,be||_e||Se?j(le)?fe=le:L(le)?fe=w(le):_e?(ye=!1,fe=u(pe,!0)):Se?(ye=!1,fe=_(pe,!0)):fe=[]:U(pe)||C(pe)?(fe=le,C(le)?fe=Z(le):V(le)&&!$(le)||(fe=x(pe))):ye=!1}ye&&(ce.set(pe,fe),ie(fe,pe,ee,ae,ce),ce.delete(pe)),a(s,i,fe)}}},43360:(s,o,i)=>{var a=i(93243);s.exports=function baseAssignValue(s,o,i){\"__proto__\"==o&&a?a(s,o,{configurable:!0,enumerable:!0,value:i,writable:!0}):s[o]=i}},43768:(s,o,i)=>{\"use strict\";var a=i(45981),u=i(85587);o.highlight=highlight,o.highlightAuto=function highlightAuto(s,o){var i,w,x,C,j=o||{},L=j.subset||a.listLanguages(),B=j.prefix,$=L.length,V=-1;null==B&&(B=_);if(\"string\"!=typeof s)throw u(\"Expected `string` for value, got `%s`\",s);w={relevance:0,language:null,value:[]},i={relevance:0,language:null,value:[]};for(;++V<$;)C=L[V],a.getLanguage(C)&&((x=highlight(C,s,o)).language=C,x.relevance>w.relevance&&(w=x),x.relevance>i.relevance&&(w=i,i=x));w.language&&(i.secondBest=w);return i},o.registerLanguage=function registerLanguage(s,o){a.registerLanguage(s,o)},o.listLanguages=function listLanguages(){return a.listLanguages()},o.registerAlias=function registerAlias(s,o){var i,u=s;o&&((u={})[s]=o);for(i in u)a.registerAliases(u[i],{languageName:i})},Emitter.prototype.addText=function text(s){var o,i,a=this.stack;if(\"\"===s)return;o=a[a.length-1],(i=o.children[o.children.length-1])&&\"text\"===i.type?i.value+=s:o.children.push({type:\"text\",value:s})},Emitter.prototype.addKeyword=function addKeyword(s,o){this.openNode(o),this.addText(s),this.closeNode()},Emitter.prototype.addSublanguage=function addSublanguage(s,o){var i=this.stack,a=i[i.length-1],u=s.rootNode.children,_=o?{type:\"element\",tagName:\"span\",properties:{className:[o]},children:u}:u;a.children=a.children.concat(_)},Emitter.prototype.openNode=function open(s){var o=this.stack,i=this.options.classPrefix+s,a=o[o.length-1],u={type:\"element\",tagName:\"span\",properties:{className:[i]},children:[]};a.children.push(u),o.push(u)},Emitter.prototype.closeNode=function close(){this.stack.pop()},Emitter.prototype.closeAllNodes=noop,Emitter.prototype.finalize=noop,Emitter.prototype.toHTML=function toHtmlNoop(){return\"\"};var _=\"hljs-\";function highlight(s,o,i){var w,x=a.configure({}),C=(i||{}).prefix;if(\"string\"!=typeof s)throw u(\"Expected `string` for name, got `%s`\",s);if(!a.getLanguage(s))throw u(\"Unknown language: `%s` is not registered\",s);if(\"string\"!=typeof o)throw u(\"Expected `string` for value, got `%s`\",o);if(null==C&&(C=_),a.configure({__emitter:Emitter,classPrefix:C}),w=a.highlight(o,{language:s,ignoreIllegals:!0}),a.configure(x||{}),w.errorRaised)throw w.errorRaised;return{relevance:w.relevance,language:w.language,value:w.emitter.rootNode.children}}function Emitter(s){this.options=s,this.rootNode={children:[]},this.stack=[this.rootNode]}function noop(){}},43838:(s,o,i)=>{var a=i(21791),u=i(37241);s.exports=function baseAssignIn(s,o){return s&&a(o,u(o),s)}},44394:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function isSymbol(s){return\"symbol\"==typeof s||u(s)&&\"[object Symbol]\"==a(s)}},44673:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(82159),_=i(46285),w=i(49724),x=i(93427),C=i(41505),j=Function,L=a([].concat),B=a([].join),$={};s.exports=C?j.bind:function bind(s){var o=u(this),i=o.prototype,a=x(arguments,1),C=function bound(){var i=L(a,x(arguments));return this instanceof C?function(s,o,i){if(!w($,o)){for(var a=[],u=0;u<o;u++)a[u]=\"a[\"+u+\"]\";$[o]=j(\"C,a\",\"return new C(\"+B(a,\",\")+\")\")}return $[o](s,i)}(o,i.length,i):o.apply(s,i)};return _(i)&&(C.prototype=i),C}},45083:(s,o,i)=>{var a=i(1882),u=i(87296),_=i(23805),w=i(47473),x=/^\\[object .+?Constructor\\]$/,C=Function.prototype,j=Object.prototype,L=C.toString,B=j.hasOwnProperty,$=RegExp(\"^\"+L.call(B).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");s.exports=function baseIsNative(s){return!(!_(s)||u(s))&&(a(s)?$:x).test(w(s))}},45412:(s,o,i)=>{\"use strict\";var a,u=i(65606);s.exports=Readable,Readable.ReadableState=ReadableState;i(37007).EventEmitter;var _=function EElistenerCount(s,o){return s.listeners(o).length},w=i(40345),x=i(48287).Buffer,C=(void 0!==i.g?i.g:\"undefined\"!=typeof window?window:\"undefined\"!=typeof self?self:{}).Uint8Array||function(){};var j,L=i(79838);j=L&&L.debuglog?L.debuglog(\"stream\"):function debug(){};var B,$,V,U=i(80345),z=i(75896),Y=i(65291).getHighWaterMark,Z=i(86048).F,ee=Z.ERR_INVALID_ARG_TYPE,ie=Z.ERR_STREAM_PUSH_AFTER_EOF,ae=Z.ERR_METHOD_NOT_IMPLEMENTED,ce=Z.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;i(56698)(Readable,w);var le=z.errorOrDestroy,pe=[\"error\",\"close\",\"destroy\",\"pause\",\"resume\"];function ReadableState(s,o,u){a=a||i(25382),s=s||{},\"boolean\"!=typeof u&&(u=o instanceof a),this.objectMode=!!s.objectMode,u&&(this.objectMode=this.objectMode||!!s.readableObjectMode),this.highWaterMark=Y(this,s,\"readableHighWaterMark\",u),this.buffer=new U,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==s.emitClose,this.autoDestroy=!!s.autoDestroy,this.destroyed=!1,this.defaultEncoding=s.defaultEncoding||\"utf8\",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,s.encoding&&(B||(B=i(83141).I),this.decoder=new B(s.encoding),this.encoding=s.encoding)}function Readable(s){if(a=a||i(25382),!(this instanceof Readable))return new Readable(s);var o=this instanceof a;this._readableState=new ReadableState(s,this,o),this.readable=!0,s&&(\"function\"==typeof s.read&&(this._read=s.read),\"function\"==typeof s.destroy&&(this._destroy=s.destroy)),w.call(this)}function readableAddChunk(s,o,i,a,u){j(\"readableAddChunk\",o);var _,w=s._readableState;if(null===o)w.reading=!1,function onEofChunk(s,o){if(j(\"onEofChunk\"),o.ended)return;if(o.decoder){var i=o.decoder.end();i&&i.length&&(o.buffer.push(i),o.length+=o.objectMode?1:i.length)}o.ended=!0,o.sync?emitReadable(s):(o.needReadable=!1,o.emittedReadable||(o.emittedReadable=!0,emitReadable_(s)))}(s,w);else if(u||(_=function chunkInvalid(s,o){var i;(function _isUint8Array(s){return x.isBuffer(s)||s instanceof C})(o)||\"string\"==typeof o||void 0===o||s.objectMode||(i=new ee(\"chunk\",[\"string\",\"Buffer\",\"Uint8Array\"],o));return i}(w,o)),_)le(s,_);else if(w.objectMode||o&&o.length>0)if(\"string\"==typeof o||w.objectMode||Object.getPrototypeOf(o)===x.prototype||(o=function _uint8ArrayToBuffer(s){return x.from(s)}(o)),a)w.endEmitted?le(s,new ce):addChunk(s,w,o,!0);else if(w.ended)le(s,new ie);else{if(w.destroyed)return!1;w.reading=!1,w.decoder&&!i?(o=w.decoder.write(o),w.objectMode||0!==o.length?addChunk(s,w,o,!1):maybeReadMore(s,w)):addChunk(s,w,o,!1)}else a||(w.reading=!1,maybeReadMore(s,w));return!w.ended&&(w.length<w.highWaterMark||0===w.length)}function addChunk(s,o,i,a){o.flowing&&0===o.length&&!o.sync?(o.awaitDrain=0,s.emit(\"data\",i)):(o.length+=o.objectMode?1:i.length,a?o.buffer.unshift(i):o.buffer.push(i),o.needReadable&&emitReadable(s)),maybeReadMore(s,o)}Object.defineProperty(Readable.prototype,\"destroyed\",{enumerable:!1,get:function get(){return void 0!==this._readableState&&this._readableState.destroyed},set:function set(s){this._readableState&&(this._readableState.destroyed=s)}}),Readable.prototype.destroy=z.destroy,Readable.prototype._undestroy=z.undestroy,Readable.prototype._destroy=function(s,o){o(s)},Readable.prototype.push=function(s,o){var i,a=this._readableState;return a.objectMode?i=!0:\"string\"==typeof s&&((o=o||a.defaultEncoding)!==a.encoding&&(s=x.from(s,o),o=\"\"),i=!0),readableAddChunk(this,s,o,!1,i)},Readable.prototype.unshift=function(s){return readableAddChunk(this,s,null,!0,!1)},Readable.prototype.isPaused=function(){return!1===this._readableState.flowing},Readable.prototype.setEncoding=function(s){B||(B=i(83141).I);var o=new B(s);this._readableState.decoder=o,this._readableState.encoding=this._readableState.decoder.encoding;for(var a=this._readableState.buffer.head,u=\"\";null!==a;)u+=o.write(a.data),a=a.next;return this._readableState.buffer.clear(),\"\"!==u&&this._readableState.buffer.push(u),this._readableState.length=u.length,this};var de=1073741824;function howMuchToRead(s,o){return s<=0||0===o.length&&o.ended?0:o.objectMode?1:s!=s?o.flowing&&o.length?o.buffer.head.data.length:o.length:(s>o.highWaterMark&&(o.highWaterMark=function computeNewHighWaterMark(s){return s>=de?s=de:(s--,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s++),s}(s)),s<=o.length?s:o.ended?o.length:(o.needReadable=!0,0))}function emitReadable(s){var o=s._readableState;j(\"emitReadable\",o.needReadable,o.emittedReadable),o.needReadable=!1,o.emittedReadable||(j(\"emitReadable\",o.flowing),o.emittedReadable=!0,u.nextTick(emitReadable_,s))}function emitReadable_(s){var o=s._readableState;j(\"emitReadable_\",o.destroyed,o.length,o.ended),o.destroyed||!o.length&&!o.ended||(s.emit(\"readable\"),o.emittedReadable=!1),o.needReadable=!o.flowing&&!o.ended&&o.length<=o.highWaterMark,flow(s)}function maybeReadMore(s,o){o.readingMore||(o.readingMore=!0,u.nextTick(maybeReadMore_,s,o))}function maybeReadMore_(s,o){for(;!o.reading&&!o.ended&&(o.length<o.highWaterMark||o.flowing&&0===o.length);){var i=o.length;if(j(\"maybeReadMore read 0\"),s.read(0),i===o.length)break}o.readingMore=!1}function updateReadableListening(s){var o=s._readableState;o.readableListening=s.listenerCount(\"readable\")>0,o.resumeScheduled&&!o.paused?o.flowing=!0:s.listenerCount(\"data\")>0&&s.resume()}function nReadingNextTick(s){j(\"readable nexttick read 0\"),s.read(0)}function resume_(s,o){j(\"resume\",o.reading),o.reading||s.read(0),o.resumeScheduled=!1,s.emit(\"resume\"),flow(s),o.flowing&&!o.reading&&s.read(0)}function flow(s){var o=s._readableState;for(j(\"flow\",o.flowing);o.flowing&&null!==s.read(););}function fromList(s,o){return 0===o.length?null:(o.objectMode?i=o.buffer.shift():!s||s>=o.length?(i=o.decoder?o.buffer.join(\"\"):1===o.buffer.length?o.buffer.first():o.buffer.concat(o.length),o.buffer.clear()):i=o.buffer.consume(s,o.decoder),i);var i}function endReadable(s){var o=s._readableState;j(\"endReadable\",o.endEmitted),o.endEmitted||(o.ended=!0,u.nextTick(endReadableNT,o,s))}function endReadableNT(s,o){if(j(\"endReadableNT\",s.endEmitted,s.length),!s.endEmitted&&0===s.length&&(s.endEmitted=!0,o.readable=!1,o.emit(\"end\"),s.autoDestroy)){var i=o._writableState;(!i||i.autoDestroy&&i.finished)&&o.destroy()}}function indexOf(s,o){for(var i=0,a=s.length;i<a;i++)if(s[i]===o)return i;return-1}Readable.prototype.read=function(s){j(\"read\",s),s=parseInt(s,10);var o=this._readableState,i=s;if(0!==s&&(o.emittedReadable=!1),0===s&&o.needReadable&&((0!==o.highWaterMark?o.length>=o.highWaterMark:o.length>0)||o.ended))return j(\"read: emitReadable\",o.length,o.ended),0===o.length&&o.ended?endReadable(this):emitReadable(this),null;if(0===(s=howMuchToRead(s,o))&&o.ended)return 0===o.length&&endReadable(this),null;var a,u=o.needReadable;return j(\"need readable\",u),(0===o.length||o.length-s<o.highWaterMark)&&j(\"length less than watermark\",u=!0),o.ended||o.reading?j(\"reading or ended\",u=!1):u&&(j(\"do read\"),o.reading=!0,o.sync=!0,0===o.length&&(o.needReadable=!0),this._read(o.highWaterMark),o.sync=!1,o.reading||(s=howMuchToRead(i,o))),null===(a=s>0?fromList(s,o):null)?(o.needReadable=o.length<=o.highWaterMark,s=0):(o.length-=s,o.awaitDrain=0),0===o.length&&(o.ended||(o.needReadable=!0),i!==s&&o.ended&&endReadable(this)),null!==a&&this.emit(\"data\",a),a},Readable.prototype._read=function(s){le(this,new ae(\"_read()\"))},Readable.prototype.pipe=function(s,o){var i=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=s;break;case 1:a.pipes=[a.pipes,s];break;default:a.pipes.push(s)}a.pipesCount+=1,j(\"pipe count=%d opts=%j\",a.pipesCount,o);var w=(!o||!1!==o.end)&&s!==u.stdout&&s!==u.stderr?onend:unpipe;function onunpipe(o,u){j(\"onunpipe\"),o===i&&u&&!1===u.hasUnpiped&&(u.hasUnpiped=!0,function cleanup(){j(\"cleanup\"),s.removeListener(\"close\",onclose),s.removeListener(\"finish\",onfinish),s.removeListener(\"drain\",x),s.removeListener(\"error\",onerror),s.removeListener(\"unpipe\",onunpipe),i.removeListener(\"end\",onend),i.removeListener(\"end\",unpipe),i.removeListener(\"data\",ondata),C=!0,!a.awaitDrain||s._writableState&&!s._writableState.needDrain||x()}())}function onend(){j(\"onend\"),s.end()}a.endEmitted?u.nextTick(w):i.once(\"end\",w),s.on(\"unpipe\",onunpipe);var x=function pipeOnDrain(s){return function pipeOnDrainFunctionResult(){var o=s._readableState;j(\"pipeOnDrain\",o.awaitDrain),o.awaitDrain&&o.awaitDrain--,0===o.awaitDrain&&_(s,\"data\")&&(o.flowing=!0,flow(s))}}(i);s.on(\"drain\",x);var C=!1;function ondata(o){j(\"ondata\");var u=s.write(o);j(\"dest.write\",u),!1===u&&((1===a.pipesCount&&a.pipes===s||a.pipesCount>1&&-1!==indexOf(a.pipes,s))&&!C&&(j(\"false write response, pause\",a.awaitDrain),a.awaitDrain++),i.pause())}function onerror(o){j(\"onerror\",o),unpipe(),s.removeListener(\"error\",onerror),0===_(s,\"error\")&&le(s,o)}function onclose(){s.removeListener(\"finish\",onfinish),unpipe()}function onfinish(){j(\"onfinish\"),s.removeListener(\"close\",onclose),unpipe()}function unpipe(){j(\"unpipe\"),i.unpipe(s)}return i.on(\"data\",ondata),function prependListener(s,o,i){if(\"function\"==typeof s.prependListener)return s.prependListener(o,i);s._events&&s._events[o]?Array.isArray(s._events[o])?s._events[o].unshift(i):s._events[o]=[i,s._events[o]]:s.on(o,i)}(s,\"error\",onerror),s.once(\"close\",onclose),s.once(\"finish\",onfinish),s.emit(\"pipe\",i),a.flowing||(j(\"pipe resume\"),i.resume()),s},Readable.prototype.unpipe=function(s){var o=this._readableState,i={hasUnpiped:!1};if(0===o.pipesCount)return this;if(1===o.pipesCount)return s&&s!==o.pipes||(s||(s=o.pipes),o.pipes=null,o.pipesCount=0,o.flowing=!1,s&&s.emit(\"unpipe\",this,i)),this;if(!s){var a=o.pipes,u=o.pipesCount;o.pipes=null,o.pipesCount=0,o.flowing=!1;for(var _=0;_<u;_++)a[_].emit(\"unpipe\",this,{hasUnpiped:!1});return this}var w=indexOf(o.pipes,s);return-1===w||(o.pipes.splice(w,1),o.pipesCount-=1,1===o.pipesCount&&(o.pipes=o.pipes[0]),s.emit(\"unpipe\",this,i)),this},Readable.prototype.on=function(s,o){var i=w.prototype.on.call(this,s,o),a=this._readableState;return\"data\"===s?(a.readableListening=this.listenerCount(\"readable\")>0,!1!==a.flowing&&this.resume()):\"readable\"===s&&(a.endEmitted||a.readableListening||(a.readableListening=a.needReadable=!0,a.flowing=!1,a.emittedReadable=!1,j(\"on readable\",a.length,a.reading),a.length?emitReadable(this):a.reading||u.nextTick(nReadingNextTick,this))),i},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.removeListener=function(s,o){var i=w.prototype.removeListener.call(this,s,o);return\"readable\"===s&&u.nextTick(updateReadableListening,this),i},Readable.prototype.removeAllListeners=function(s){var o=w.prototype.removeAllListeners.apply(this,arguments);return\"readable\"!==s&&void 0!==s||u.nextTick(updateReadableListening,this),o},Readable.prototype.resume=function(){var s=this._readableState;return s.flowing||(j(\"resume\"),s.flowing=!s.readableListening,function resume(s,o){o.resumeScheduled||(o.resumeScheduled=!0,u.nextTick(resume_,s,o))}(this,s)),s.paused=!1,this},Readable.prototype.pause=function(){return j(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(j(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this._readableState.paused=!0,this},Readable.prototype.wrap=function(s){var o=this,i=this._readableState,a=!1;for(var u in s.on(\"end\",(function(){if(j(\"wrapped end\"),i.decoder&&!i.ended){var s=i.decoder.end();s&&s.length&&o.push(s)}o.push(null)})),s.on(\"data\",(function(u){(j(\"wrapped data\"),i.decoder&&(u=i.decoder.write(u)),i.objectMode&&null==u)||(i.objectMode||u&&u.length)&&(o.push(u)||(a=!0,s.pause()))})),s)void 0===this[u]&&\"function\"==typeof s[u]&&(this[u]=function methodWrap(o){return function methodWrapReturnFunction(){return s[o].apply(s,arguments)}}(u));for(var _=0;_<pe.length;_++)s.on(pe[_],this.emit.bind(this,pe[_]));return this._read=function(o){j(\"wrapped _read\",o),a&&(a=!1,s.resume())},this},\"function\"==typeof Symbol&&(Readable.prototype[Symbol.asyncIterator]=function(){return void 0===$&&($=i(2955)),$(this)}),Object.defineProperty(Readable.prototype,\"readableHighWaterMark\",{enumerable:!1,get:function get(){return this._readableState.highWaterMark}}),Object.defineProperty(Readable.prototype,\"readableBuffer\",{enumerable:!1,get:function get(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Readable.prototype,\"readableFlowing\",{enumerable:!1,get:function get(){return this._readableState.flowing},set:function set(s){this._readableState&&(this._readableState.flowing=s)}}),Readable._fromList=fromList,Object.defineProperty(Readable.prototype,\"readableLength\",{enumerable:!1,get:function get(){return this._readableState.length}}),\"function\"==typeof Symbol&&(Readable.from=function(s,o){return void 0===V&&(V=i(55157)),V(Readable,s,o)})},45434:s=>{var o=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;s.exports=function hasUnicodeWord(s){return o.test(s)}},45539:(s,o,i)=>{var a=i(40882),u=i(50828),_=i(66645),w=RegExp(\"['’]\",\"g\");s.exports=function createCompounder(s){return function(o){return a(_(u(o).replace(w,\"\")),s,\"\")}}},45807:(s,o,i)=>{\"use strict\";var a=i(1907),u=a({}.toString),_=a(\"\".slice);s.exports=function(s){return _(u(s),8,-1)}},45891:(s,o,i)=>{var a=i(51873),u=i(72428),_=i(56449),w=a?a.isConcatSpreadable:void 0;s.exports=function isFlattenable(s){return _(s)||u(s)||!!(w&&s&&s[w])}},45951:function(s,o,i){\"use strict\";var check=function(s){return s&&s.Math===Math&&s};s.exports=check(\"object\"==typeof globalThis&&globalThis)||check(\"object\"==typeof window&&window)||check(\"object\"==typeof self&&self)||check(\"object\"==typeof i.g&&i.g)||check(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()},45981:s=>{function deepFreeze(s){return s instanceof Map?s.clear=s.delete=s.set=function(){throw new Error(\"map is read-only\")}:s instanceof Set&&(s.add=s.clear=s.delete=function(){throw new Error(\"set is read-only\")}),Object.freeze(s),Object.getOwnPropertyNames(s).forEach((function(o){var i=s[o];\"object\"!=typeof i||Object.isFrozen(i)||deepFreeze(i)})),s}var o=deepFreeze,i=deepFreeze;o.default=i;class Response{constructor(s){void 0===s.data&&(s.data={}),this.data=s.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function escapeHTML(s){return s.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#x27;\")}function inherit(s,...o){const i=Object.create(null);for(const o in s)i[o]=s[o];return o.forEach((function(s){for(const o in s)i[o]=s[o]})),i}const emitsWrappingTags=s=>!!s.kind;class HTMLRenderer{constructor(s,o){this.buffer=\"\",this.classPrefix=o.classPrefix,s.walk(this)}addText(s){this.buffer+=escapeHTML(s)}openNode(s){if(!emitsWrappingTags(s))return;let o=s.kind;s.sublanguage||(o=`${this.classPrefix}${o}`),this.span(o)}closeNode(s){emitsWrappingTags(s)&&(this.buffer+=\"</span>\")}value(){return this.buffer}span(s){this.buffer+=`<span class=\"${s}\">`}}class TokenTree{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(s){this.top.children.push(s)}openNode(s){const o={kind:s,children:[]};this.add(o),this.stack.push(o)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(s){return this.constructor._walk(s,this.rootNode)}static _walk(s,o){return\"string\"==typeof o?s.addText(o):o.children&&(s.openNode(o),o.children.forEach((o=>this._walk(s,o))),s.closeNode(o)),s}static _collapse(s){\"string\"!=typeof s&&s.children&&(s.children.every((s=>\"string\"==typeof s))?s.children=[s.children.join(\"\")]:s.children.forEach((s=>{TokenTree._collapse(s)})))}}class TokenTreeEmitter extends TokenTree{constructor(s){super(),this.options=s}addKeyword(s,o){\"\"!==s&&(this.openNode(o),this.addText(s),this.closeNode())}addText(s){\"\"!==s&&this.add(s)}addSublanguage(s,o){const i=s.root;i.kind=o,i.sublanguage=!0,this.add(i)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return!0}}function source(s){return s?\"string\"==typeof s?s:s.source:null}const a=/\\[(?:[^\\\\\\]]|\\\\.)*\\]|\\(\\??|\\\\([1-9][0-9]*)|\\\\./;const u=\"[a-zA-Z]\\\\w*\",_=\"[a-zA-Z_]\\\\w*\",w=\"\\\\b\\\\d+(\\\\.\\\\d+)?\",x=\"(-?)(\\\\b0[xX][a-fA-F0-9]+|(\\\\b\\\\d+(\\\\.\\\\d*)?|\\\\.\\\\d+)([eE][-+]?\\\\d+)?)\",C=\"\\\\b(0b[01]+)\",j={begin:\"\\\\\\\\[\\\\s\\\\S]\",relevance:0},L={className:\"string\",begin:\"'\",end:\"'\",illegal:\"\\\\n\",contains:[j]},B={className:\"string\",begin:'\"',end:'\"',illegal:\"\\\\n\",contains:[j]},$={begin:/\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b/},COMMENT=function(s,o,i={}){const a=inherit({className:\"comment\",begin:s,end:o,contains:[]},i);return a.contains.push($),a.contains.push({className:\"doctag\",begin:\"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):\",relevance:0}),a},V=COMMENT(\"//\",\"$\"),U=COMMENT(\"/\\\\*\",\"\\\\*/\"),z=COMMENT(\"#\",\"$\"),Y={className:\"number\",begin:w,relevance:0},Z={className:\"number\",begin:x,relevance:0},ee={className:\"number\",begin:C,relevance:0},ie={className:\"number\",begin:w+\"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?\",relevance:0},ae={begin:/(?=\\/[^/\\n]*\\/)/,contains:[{className:\"regexp\",begin:/\\//,end:/\\/[gimuy]*/,illegal:/\\n/,contains:[j,{begin:/\\[/,end:/\\]/,relevance:0,contains:[j]}]}]},ce={className:\"title\",begin:u,relevance:0},le={className:\"title\",begin:_,relevance:0},pe={begin:\"\\\\.\\\\s*\"+_,relevance:0};var de=Object.freeze({__proto__:null,MATCH_NOTHING_RE:/\\b\\B/,IDENT_RE:u,UNDERSCORE_IDENT_RE:_,NUMBER_RE:w,C_NUMBER_RE:x,BINARY_NUMBER_RE:C,RE_STARTERS_RE:\"!|!=|!==|%|%=|&|&&|&=|\\\\*|\\\\*=|\\\\+|\\\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\\\?|\\\\[|\\\\{|\\\\(|\\\\^|\\\\^=|\\\\||\\\\|=|\\\\|\\\\||~\",SHEBANG:(s={})=>{const o=/^#![ ]*\\//;return s.binary&&(s.begin=function concat(...s){return s.map((s=>source(s))).join(\"\")}(o,/.*\\b/,s.binary,/\\b.*/)),inherit({className:\"meta\",begin:o,end:/$/,relevance:0,\"on:begin\":(s,o)=>{0!==s.index&&o.ignoreMatch()}},s)},BACKSLASH_ESCAPE:j,APOS_STRING_MODE:L,QUOTE_STRING_MODE:B,PHRASAL_WORDS_MODE:$,COMMENT,C_LINE_COMMENT_MODE:V,C_BLOCK_COMMENT_MODE:U,HASH_COMMENT_MODE:z,NUMBER_MODE:Y,C_NUMBER_MODE:Z,BINARY_NUMBER_MODE:ee,CSS_NUMBER_MODE:ie,REGEXP_MODE:ae,TITLE_MODE:ce,UNDERSCORE_TITLE_MODE:le,METHOD_GUARD:pe,END_SAME_AS_BEGIN:function(s){return Object.assign(s,{\"on:begin\":(s,o)=>{o.data._beginMatch=s[1]},\"on:end\":(s,o)=>{o.data._beginMatch!==s[1]&&o.ignoreMatch()}})}});function skipIfhasPrecedingDot(s,o){\".\"===s.input[s.index-1]&&o.ignoreMatch()}function beginKeywords(s,o){o&&s.beginKeywords&&(s.begin=\"\\\\b(\"+s.beginKeywords.split(\" \").join(\"|\")+\")(?!\\\\.)(?=\\\\b|\\\\s)\",s.__beforeBegin=skipIfhasPrecedingDot,s.keywords=s.keywords||s.beginKeywords,delete s.beginKeywords,void 0===s.relevance&&(s.relevance=0))}function compileIllegal(s,o){Array.isArray(s.illegal)&&(s.illegal=function either(...s){return\"(\"+s.map((s=>source(s))).join(\"|\")+\")\"}(...s.illegal))}function compileMatch(s,o){if(s.match){if(s.begin||s.end)throw new Error(\"begin & end are not supported with match\");s.begin=s.match,delete s.match}}function compileRelevance(s,o){void 0===s.relevance&&(s.relevance=1)}const fe=[\"of\",\"and\",\"for\",\"in\",\"not\",\"or\",\"if\",\"then\",\"parent\",\"list\",\"value\"];function compileKeywords(s,o,i=\"keyword\"){const a={};return\"string\"==typeof s?compileList(i,s.split(\" \")):Array.isArray(s)?compileList(i,s):Object.keys(s).forEach((function(i){Object.assign(a,compileKeywords(s[i],o,i))})),a;function compileList(s,i){o&&(i=i.map((s=>s.toLowerCase()))),i.forEach((function(o){const i=o.split(\"|\");a[i[0]]=[s,scoreForKeyword(i[0],i[1])]}))}}function scoreForKeyword(s,o){return o?Number(o):function commonKeyword(s){return fe.includes(s.toLowerCase())}(s)?0:1}function compileLanguage(s,{plugins:o}){function langRe(o,i){return new RegExp(source(o),\"m\"+(s.case_insensitive?\"i\":\"\")+(i?\"g\":\"\"))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(s,o){o.position=this.position++,this.matchIndexes[this.matchAt]=o,this.regexes.push([o,s]),this.matchAt+=function countMatchGroups(s){return new RegExp(s.toString()+\"|\").exec(\"\").length-1}(s)+1}compile(){0===this.regexes.length&&(this.exec=()=>null);const s=this.regexes.map((s=>s[1]));this.matcherRe=langRe(function join(s,o=\"|\"){let i=0;return s.map((s=>{i+=1;const o=i;let u=source(s),_=\"\";for(;u.length>0;){const s=a.exec(u);if(!s){_+=u;break}_+=u.substring(0,s.index),u=u.substring(s.index+s[0].length),\"\\\\\"===s[0][0]&&s[1]?_+=\"\\\\\"+String(Number(s[1])+o):(_+=s[0],\"(\"===s[0]&&i++)}return _})).map((s=>`(${s})`)).join(o)}(s),!0),this.lastIndex=0}exec(s){this.matcherRe.lastIndex=this.lastIndex;const o=this.matcherRe.exec(s);if(!o)return null;const i=o.findIndex(((s,o)=>o>0&&void 0!==s)),a=this.matchIndexes[i];return o.splice(0,i),Object.assign(o,a)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(s){if(this.multiRegexes[s])return this.multiRegexes[s];const o=new MultiRegex;return this.rules.slice(s).forEach((([s,i])=>o.addRule(s,i))),o.compile(),this.multiRegexes[s]=o,o}resumingScanAtSamePosition(){return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(s,o){this.rules.push([s,o]),\"begin\"===o.type&&this.count++}exec(s){const o=this.getMatcher(this.regexIndex);o.lastIndex=this.lastIndex;let i=o.exec(s);if(this.resumingScanAtSamePosition())if(i&&i.index===this.lastIndex);else{const o=this.getMatcher(0);o.lastIndex=this.lastIndex+1,i=o.exec(s)}return i&&(this.regexIndex+=i.position+1,this.regexIndex===this.count&&this.considerAll()),i}}if(s.compilerExtensions||(s.compilerExtensions=[]),s.contains&&s.contains.includes(\"self\"))throw new Error(\"ERR: contains `self` is not supported at the top-level of a language.  See documentation.\");return s.classNameAliases=inherit(s.classNameAliases||{}),function compileMode(o,i){const a=o;if(o.isCompiled)return a;[compileMatch].forEach((s=>s(o,i))),s.compilerExtensions.forEach((s=>s(o,i))),o.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach((s=>s(o,i))),o.isCompiled=!0;let u=null;if(\"object\"==typeof o.keywords&&(u=o.keywords.$pattern,delete o.keywords.$pattern),o.keywords&&(o.keywords=compileKeywords(o.keywords,s.case_insensitive)),o.lexemes&&u)throw new Error(\"ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) \");return u=u||o.lexemes||/\\w+/,a.keywordPatternRe=langRe(u,!0),i&&(o.begin||(o.begin=/\\B|\\b/),a.beginRe=langRe(o.begin),o.endSameAsBegin&&(o.end=o.begin),o.end||o.endsWithParent||(o.end=/\\B|\\b/),o.end&&(a.endRe=langRe(o.end)),a.terminatorEnd=source(o.end)||\"\",o.endsWithParent&&i.terminatorEnd&&(a.terminatorEnd+=(o.end?\"|\":\"\")+i.terminatorEnd)),o.illegal&&(a.illegalRe=langRe(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map((function(s){return function expandOrCloneMode(s){s.variants&&!s.cachedVariants&&(s.cachedVariants=s.variants.map((function(o){return inherit(s,{variants:null},o)})));if(s.cachedVariants)return s.cachedVariants;if(dependencyOnParent(s))return inherit(s,{starts:s.starts?inherit(s.starts):null});if(Object.isFrozen(s))return inherit(s);return s}(\"self\"===s?o:s)}))),o.contains.forEach((function(s){compileMode(s,a)})),o.starts&&compileMode(o.starts,i),a.matcher=function buildModeRegex(s){const o=new ResumableMultiRegex;return s.contains.forEach((s=>o.addRule(s.begin,{rule:s,type:\"begin\"}))),s.terminatorEnd&&o.addRule(s.terminatorEnd,{type:\"end\"}),s.illegal&&o.addRule(s.illegal,{type:\"illegal\"}),o}(a),a}(s)}function dependencyOnParent(s){return!!s&&(s.endsWithParent||dependencyOnParent(s.starts))}function BuildVuePlugin(s){const o={props:[\"language\",\"code\",\"autodetect\"],data:function(){return{detectedLanguage:\"\",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?\"\":\"hljs \"+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!s.getLanguage(this.language))return console.warn(`The language \"${this.language}\" you specified could not be found.`),this.unknownLanguage=!0,escapeHTML(this.code);let o={};return this.autoDetect?(o=s.highlightAuto(this.code),this.detectedLanguage=o.language):(o=s.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),o.value},autoDetect(){return!this.language||function hasValueOrEmptyAttribute(s){return Boolean(s||\"\"===s)}(this.autodetect)},ignoreIllegals:()=>!0},render(s){return s(\"pre\",{},[s(\"code\",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:o,VuePlugin:{install(s){s.component(\"highlightjs\",o)}}}}const ye={\"after:highlightElement\":({el:s,result:o,text:i})=>{const a=nodeStream(s);if(!a.length)return;const u=document.createElement(\"div\");u.innerHTML=o.value,o.value=function mergeStreams(s,o,i){let a=0,u=\"\";const _=[];function selectStream(){return s.length&&o.length?s[0].offset!==o[0].offset?s[0].offset<o[0].offset?s:o:\"start\"===o[0].event?s:o:s.length?s:o}function open(s){function attributeString(s){return\" \"+s.nodeName+'=\"'+escapeHTML(s.value)+'\"'}u+=\"<\"+tag(s)+[].map.call(s.attributes,attributeString).join(\"\")+\">\"}function close(s){u+=\"</\"+tag(s)+\">\"}function render(s){(\"start\"===s.event?open:close)(s.node)}for(;s.length||o.length;){let o=selectStream();if(u+=escapeHTML(i.substring(a,o[0].offset)),a=o[0].offset,o===s){_.reverse().forEach(close);do{render(o.splice(0,1)[0]),o=selectStream()}while(o===s&&o.length&&o[0].offset===a);_.reverse().forEach(open)}else\"start\"===o[0].event?_.push(o[0].node):_.pop(),render(o.splice(0,1)[0])}return u+escapeHTML(i.substr(a))}(a,nodeStream(u),i)}};function tag(s){return s.nodeName.toLowerCase()}function nodeStream(s){const o=[];return function _nodeStream(s,i){for(let a=s.firstChild;a;a=a.nextSibling)3===a.nodeType?i+=a.nodeValue.length:1===a.nodeType&&(o.push({event:\"start\",offset:i,node:a}),i=_nodeStream(a,i),tag(a).match(/br|hr|img|input/)||o.push({event:\"stop\",offset:i,node:a}));return i}(s,0),o}const be={},error=s=>{console.error(s)},warn=(s,...o)=>{console.log(`WARN: ${s}`,...o)},deprecated=(s,o)=>{be[`${s}/${o}`]||(console.log(`Deprecated as of ${s}. ${o}`),be[`${s}/${o}`]=!0)},_e=escapeHTML,Se=inherit,we=Symbol(\"nomatch\");var xe=function(s){const i=Object.create(null),a=Object.create(null),u=[];let _=!0;const w=/(^(<[^>]+>|\\t|)+|\\n)/gm,x=\"Could not find the language '{}', did you forget to load/include a language module?\",C={disableAutodetect:!0,name:\"Plain text\",contains:[]};let j={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\\blang(?:uage)?-([\\w-]+)\\b/i,classPrefix:\"hljs-\",tabReplace:null,useBR:!1,languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(s){return j.noHighlightRe.test(s)}function highlight(s,o,i,a){let u=\"\",_=\"\";\"object\"==typeof o?(u=s,i=o.ignoreIllegals,_=o.language,a=void 0):(deprecated(\"10.7.0\",\"highlight(lang, code, ...args) has been deprecated.\"),deprecated(\"10.7.0\",\"Please use highlight(code, options) instead.\\nhttps://github.com/highlightjs/highlight.js/issues/2277\"),_=s,u=o);const w={code:u,language:_};fire(\"before:highlight\",w);const x=w.result?w.result:_highlight(w.language,w.code,i,a);return x.code=w.code,fire(\"after:highlight\",x),x}function _highlight(s,o,a,w){function keywordData(s,o){const i=L.case_insensitive?o[0].toLowerCase():o[0];return Object.prototype.hasOwnProperty.call(s.keywords,i)&&s.keywords[i]}function processBuffer(){null!=V.subLanguage?function processSubLanguage(){if(\"\"===Y)return;let s=null;if(\"string\"==typeof V.subLanguage){if(!i[V.subLanguage])return void z.addText(Y);s=_highlight(V.subLanguage,Y,!0,U[V.subLanguage]),U[V.subLanguage]=s.top}else s=highlightAuto(Y,V.subLanguage.length?V.subLanguage:null);V.relevance>0&&(Z+=s.relevance),z.addSublanguage(s.emitter,s.language)}():function processKeywords(){if(!V.keywords)return void z.addText(Y);let s=0;V.keywordPatternRe.lastIndex=0;let o=V.keywordPatternRe.exec(Y),i=\"\";for(;o;){i+=Y.substring(s,o.index);const a=keywordData(V,o);if(a){const[s,u]=a;if(z.addText(i),i=\"\",Z+=u,s.startsWith(\"_\"))i+=o[0];else{const i=L.classNameAliases[s]||s;z.addKeyword(o[0],i)}}else i+=o[0];s=V.keywordPatternRe.lastIndex,o=V.keywordPatternRe.exec(Y)}i+=Y.substr(s),z.addText(i)}(),Y=\"\"}function startNewMode(s){return s.className&&z.openNode(L.classNameAliases[s.className]||s.className),V=Object.create(s,{parent:{value:V}}),V}function endOfMode(s,o,i){let a=function startsWith(s,o){const i=s&&s.exec(o);return i&&0===i.index}(s.endRe,i);if(a){if(s[\"on:end\"]){const i=new Response(s);s[\"on:end\"](o,i),i.isMatchIgnored&&(a=!1)}if(a){for(;s.endsParent&&s.parent;)s=s.parent;return s}}if(s.endsWithParent)return endOfMode(s.parent,o,i)}function doIgnore(s){return 0===V.matcher.regexIndex?(Y+=s[0],1):(ae=!0,0)}function doBeginMatch(s){const o=s[0],i=s.rule,a=new Response(i),u=[i.__beforeBegin,i[\"on:begin\"]];for(const i of u)if(i&&(i(s,a),a.isMatchIgnored))return doIgnore(o);return i&&i.endSameAsBegin&&(i.endRe=function escape(s){return new RegExp(s.replace(/[-/\\\\^$*+?.()|[\\]{}]/g,\"\\\\$&\"),\"m\")}(o)),i.skip?Y+=o:(i.excludeBegin&&(Y+=o),processBuffer(),i.returnBegin||i.excludeBegin||(Y=o)),startNewMode(i),i.returnBegin?0:o.length}function doEndMatch(s){const i=s[0],a=o.substr(s.index),u=endOfMode(V,s,a);if(!u)return we;const _=V;_.skip?Y+=i:(_.returnEnd||_.excludeEnd||(Y+=i),processBuffer(),_.excludeEnd&&(Y=i));do{V.className&&z.closeNode(),V.skip||V.subLanguage||(Z+=V.relevance),V=V.parent}while(V!==u.parent);return u.starts&&(u.endSameAsBegin&&(u.starts.endRe=u.endRe),startNewMode(u.starts)),_.returnEnd?0:i.length}let C={};function processLexeme(i,u){const w=u&&u[0];if(Y+=i,null==w)return processBuffer(),0;if(\"begin\"===C.type&&\"end\"===u.type&&C.index===u.index&&\"\"===w){if(Y+=o.slice(u.index,u.index+1),!_){const o=new Error(\"0 width match regex\");throw o.languageName=s,o.badRule=C.rule,o}return 1}if(C=u,\"begin\"===u.type)return doBeginMatch(u);if(\"illegal\"===u.type&&!a){const s=new Error('Illegal lexeme \"'+w+'\" for mode \"'+(V.className||\"<unnamed>\")+'\"');throw s.mode=V,s}if(\"end\"===u.type){const s=doEndMatch(u);if(s!==we)return s}if(\"illegal\"===u.type&&\"\"===w)return 1;if(ie>1e5&&ie>3*u.index){throw new Error(\"potential infinite loop, way more iterations than matches\")}return Y+=w,w.length}const L=getLanguage(s);if(!L)throw error(x.replace(\"{}\",s)),new Error('Unknown language: \"'+s+'\"');const B=compileLanguage(L,{plugins:u});let $=\"\",V=w||B;const U={},z=new j.__emitter(j);!function processContinuations(){const s=[];for(let o=V;o!==L;o=o.parent)o.className&&s.unshift(o.className);s.forEach((s=>z.openNode(s)))}();let Y=\"\",Z=0,ee=0,ie=0,ae=!1;try{for(V.matcher.considerAll();;){ie++,ae?ae=!1:V.matcher.considerAll(),V.matcher.lastIndex=ee;const s=V.matcher.exec(o);if(!s)break;const i=processLexeme(o.substring(ee,s.index),s);ee=s.index+i}return processLexeme(o.substr(ee)),z.closeAllNodes(),z.finalize(),$=z.toHTML(),{relevance:Math.floor(Z),value:$,language:s,illegal:!1,emitter:z,top:V}}catch(i){if(i.message&&i.message.includes(\"Illegal\"))return{illegal:!0,illegalBy:{msg:i.message,context:o.slice(ee-100,ee+100),mode:i.mode},sofar:$,relevance:0,value:_e(o),emitter:z};if(_)return{illegal:!1,relevance:0,value:_e(o),emitter:z,language:s,top:V,errorRaised:i};throw i}}function highlightAuto(s,o){o=o||j.languages||Object.keys(i);const a=function justTextHighlightResult(s){const o={relevance:0,emitter:new j.__emitter(j),value:_e(s),illegal:!1,top:C};return o.emitter.addText(s),o}(s),u=o.filter(getLanguage).filter(autoDetection).map((o=>_highlight(o,s,!1)));u.unshift(a);const _=u.sort(((s,o)=>{if(s.relevance!==o.relevance)return o.relevance-s.relevance;if(s.language&&o.language){if(getLanguage(s.language).supersetOf===o.language)return 1;if(getLanguage(o.language).supersetOf===s.language)return-1}return 0})),[w,x]=_,L=w;return L.second_best=x,L}const L={\"before:highlightElement\":({el:s})=>{j.useBR&&(s.innerHTML=s.innerHTML.replace(/\\n/g,\"\").replace(/<br[ /]*>/g,\"\\n\"))},\"after:highlightElement\":({result:s})=>{j.useBR&&(s.value=s.value.replace(/\\n/g,\"<br>\"))}},B=/^(<[^>]+>|\\t)+/gm,$={\"after:highlightElement\":({result:s})=>{j.tabReplace&&(s.value=s.value.replace(B,(s=>s.replace(/\\t/g,j.tabReplace))))}};function highlightElement(s){let o=null;const i=function blockLanguage(s){let o=s.className+\" \";o+=s.parentNode?s.parentNode.className:\"\";const i=j.languageDetectRe.exec(o);if(i){const o=getLanguage(i[1]);return o||(warn(x.replace(\"{}\",i[1])),warn(\"Falling back to no-highlight mode for this block.\",s)),o?i[1]:\"no-highlight\"}return o.split(/\\s+/).find((s=>shouldNotHighlight(s)||getLanguage(s)))}(s);if(shouldNotHighlight(i))return;fire(\"before:highlightElement\",{el:s,language:i}),o=s;const u=o.textContent,_=i?highlight(u,{language:i,ignoreIllegals:!0}):highlightAuto(u);fire(\"after:highlightElement\",{el:s,result:_,text:u}),s.innerHTML=_.value,function updateClassName(s,o,i){const u=o?a[o]:i;s.classList.add(\"hljs\"),u&&s.classList.add(u)}(s,i,_.language),s.result={language:_.language,re:_.relevance,relavance:_.relevance},_.second_best&&(s.second_best={language:_.second_best.language,re:_.second_best.relevance,relavance:_.second_best.relevance})}const initHighlighting=()=>{if(initHighlighting.called)return;initHighlighting.called=!0,deprecated(\"10.6.0\",\"initHighlighting() is deprecated.  Use highlightAll() instead.\");document.querySelectorAll(\"pre code\").forEach(highlightElement)};let V=!1;function highlightAll(){if(\"loading\"===document.readyState)return void(V=!0);document.querySelectorAll(\"pre code\").forEach(highlightElement)}function getLanguage(s){return s=(s||\"\").toLowerCase(),i[s]||i[a[s]]}function registerAliases(s,{languageName:o}){\"string\"==typeof s&&(s=[s]),s.forEach((s=>{a[s.toLowerCase()]=o}))}function autoDetection(s){const o=getLanguage(s);return o&&!o.disableAutodetect}function fire(s,o){const i=s;u.forEach((function(s){s[i]&&s[i](o)}))}\"undefined\"!=typeof window&&window.addEventListener&&window.addEventListener(\"DOMContentLoaded\",(function boot(){V&&highlightAll()}),!1),Object.assign(s,{highlight,highlightAuto,highlightAll,fixMarkup:function deprecateFixMarkup(s){return deprecated(\"10.2.0\",\"fixMarkup will be removed entirely in v11.0\"),deprecated(\"10.2.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2534\"),function fixMarkup(s){return j.tabReplace||j.useBR?s.replace(w,(s=>\"\\n\"===s?j.useBR?\"<br>\":s:j.tabReplace?s.replace(/\\t/g,j.tabReplace):s)):s}(s)},highlightElement,highlightBlock:function deprecateHighlightBlock(s){return deprecated(\"10.7.0\",\"highlightBlock will be removed entirely in v12.0\"),deprecated(\"10.7.0\",\"Please use highlightElement now.\"),highlightElement(s)},configure:function configure(s){s.useBR&&(deprecated(\"10.3.0\",\"'useBR' will be removed entirely in v11.0\"),deprecated(\"10.3.0\",\"Please see https://github.com/highlightjs/highlight.js/issues/2559\")),j=Se(j,s)},initHighlighting,initHighlightingOnLoad:function initHighlightingOnLoad(){deprecated(\"10.6.0\",\"initHighlightingOnLoad() is deprecated.  Use highlightAll() instead.\"),V=!0},registerLanguage:function registerLanguage(o,a){let u=null;try{u=a(s)}catch(s){if(error(\"Language definition for '{}' could not be registered.\".replace(\"{}\",o)),!_)throw s;error(s),u=C}u.name||(u.name=o),i[o]=u,u.rawDefinition=a.bind(null,s),u.aliases&&registerAliases(u.aliases,{languageName:o})},unregisterLanguage:function unregisterLanguage(s){delete i[s];for(const o of Object.keys(a))a[o]===s&&delete a[o]},listLanguages:function listLanguages(){return Object.keys(i)},getLanguage,registerAliases,requireLanguage:function requireLanguage(s){deprecated(\"10.4.0\",\"requireLanguage will be removed entirely in v11.\"),deprecated(\"10.4.0\",\"Please see https://github.com/highlightjs/highlight.js/pull/2844\");const o=getLanguage(s);if(o)return o;throw new Error(\"The '{}' language is required, but not loaded.\".replace(\"{}\",s))},autoDetection,inherit:Se,addPlugin:function addPlugin(s){!function upgradePluginAPI(s){s[\"before:highlightBlock\"]&&!s[\"before:highlightElement\"]&&(s[\"before:highlightElement\"]=o=>{s[\"before:highlightBlock\"](Object.assign({block:o.el},o))}),s[\"after:highlightBlock\"]&&!s[\"after:highlightElement\"]&&(s[\"after:highlightElement\"]=o=>{s[\"after:highlightBlock\"](Object.assign({block:o.el},o))})}(s),u.push(s)},vuePlugin:BuildVuePlugin(s).VuePlugin}),s.debugMode=function(){_=!1},s.safeMode=function(){_=!0},s.versionString=\"10.7.3\";for(const s in de)\"object\"==typeof de[s]&&o(de[s]);return Object.assign(s,de),s.addPlugin(L),s.addPlugin(ye),s.addPlugin($),s}({});s.exports=xe},46028:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(46285),_=i(25594),w=i(29367),x=i(60581),C=i(76264),j=TypeError,L=C(\"toPrimitive\");s.exports=function(s,o){if(!u(s)||_(s))return s;var i,C=w(s,L);if(C){if(void 0===o&&(o=\"default\"),i=a(C,s,o),!u(i)||_(i))return i;throw new j(\"Can't convert object to primitive value\")}return void 0===o&&(o=\"number\"),x(s,o)}},46076:(s,o,i)=>{\"use strict\";i(91599);var a=i(68623);s.exports=a},46285:(s,o,i)=>{\"use strict\";var a=i(62250);s.exports=function(s){return\"object\"==typeof s?null!==s:a(s)}},46942:(s,o)=>{var i;!function(){\"use strict\";var a={}.hasOwnProperty;function classNames(){for(var s=\"\",o=0;o<arguments.length;o++){var i=arguments[o];i&&(s=appendClass(s,parseValue(i)))}return s}function parseValue(s){if(\"string\"==typeof s||\"number\"==typeof s)return s;if(\"object\"!=typeof s)return\"\";if(Array.isArray(s))return classNames.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes(\"[native code]\"))return s.toString();var o=\"\";for(var i in s)a.call(s,i)&&s[i]&&(o=appendClass(o,i));return o}function appendClass(s,o){return o?s?s+\" \"+o:s+o:s}s.exports?(classNames.default=classNames,s.exports=classNames):void 0===(i=function(){return classNames}.apply(o,[]))||(s.exports=i)}()},47181:(s,o,i)=>{\"use strict\";var a=i(95116).IteratorPrototype,u=i(58075),_=i(75817),w=i(14840),x=i(93742),returnThis=function(){return this};s.exports=function(s,o,i,C){var j=o+\" Iterator\";return s.prototype=u(a,{next:_(+!C,i)}),w(s,j,!1,!0),x[j]=returnThis,s}},47237:s=>{s.exports=function baseProperty(s){return function(o){return null==o?void 0:o[s]}}},47248:(s,o,i)=>{var a=i(16547),u=i(51234);s.exports=function zipObject(s,o){return u(s||[],o||[],a)}},47422:(s,o,i)=>{var a=i(31769),u=i(77797);s.exports=function baseGet(s,o){for(var i=0,_=(o=a(o,s)).length;null!=s&&i<_;)s=s[u(o[i++])];return i&&i==_?s:void 0}},47473:s=>{var o=Function.prototype.toString;s.exports=function toSource(s){if(null!=s){try{return o.call(s)}catch(s){}try{return s+\"\"}catch(s){}}return\"\"}},47886:(s,o,i)=>{var a=i(5861),u=i(40346);s.exports=function isWeakMap(s){return u(s)&&\"[object WeakMap]\"==a(s)}},47934:(s,o,i)=>{s.exports={ary:i(64626),assign:i(74733),clone:i(32629),curry:i(49747),forEach:i(83729),isArray:i(56449),isError:i(23546),isFunction:i(1882),isWeakMap:i(47886),iteratee:i(33855),keys:i(88984),rearg:i(84195),toInteger:i(61489),toPath:i(42072)}},48152:(s,o,i)=>{var a=i(28303),u=a&&new a;s.exports=u},48287:(s,o,i)=>{\"use strict\";const a=i(67526),u=i(251),_=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;o.Buffer=Buffer,o.SlowBuffer=function SlowBuffer(s){+s!=s&&(s=0);return Buffer.alloc(+s)},o.INSPECT_MAX_BYTES=50;const w=2147483647;function createBuffer(s){if(s>w)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"');const o=new Uint8Array(s);return Object.setPrototypeOf(o,Buffer.prototype),o}function Buffer(s,o,i){if(\"number\"==typeof s){if(\"string\"==typeof o)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(s)}return from(s,o,i)}function from(s,o,i){if(\"string\"==typeof s)return function fromString(s,o){\"string\"==typeof o&&\"\"!==o||(o=\"utf8\");if(!Buffer.isEncoding(o))throw new TypeError(\"Unknown encoding: \"+o);const i=0|byteLength(s,o);let a=createBuffer(i);const u=a.write(s,o);u!==i&&(a=a.slice(0,u));return a}(s,o);if(ArrayBuffer.isView(s))return function fromArrayView(s){if(isInstance(s,Uint8Array)){const o=new Uint8Array(s);return fromArrayBuffer(o.buffer,o.byteOffset,o.byteLength)}return fromArrayLike(s)}(s);if(null==s)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s);if(isInstance(s,ArrayBuffer)||s&&isInstance(s.buffer,ArrayBuffer))return fromArrayBuffer(s,o,i);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(s,SharedArrayBuffer)||s&&isInstance(s.buffer,SharedArrayBuffer)))return fromArrayBuffer(s,o,i);if(\"number\"==typeof s)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const a=s.valueOf&&s.valueOf();if(null!=a&&a!==s)return Buffer.from(a,o,i);const u=function fromObject(s){if(Buffer.isBuffer(s)){const o=0|checked(s.length),i=createBuffer(o);return 0===i.length||s.copy(i,0,0,o),i}if(void 0!==s.length)return\"number\"!=typeof s.length||numberIsNaN(s.length)?createBuffer(0):fromArrayLike(s);if(\"Buffer\"===s.type&&Array.isArray(s.data))return fromArrayLike(s.data)}(s);if(u)return u;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof s[Symbol.toPrimitive])return Buffer.from(s[Symbol.toPrimitive](\"string\"),o,i);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof s)}function assertSize(s){if(\"number\"!=typeof s)throw new TypeError('\"size\" argument must be of type number');if(s<0)throw new RangeError('The value \"'+s+'\" is invalid for option \"size\"')}function allocUnsafe(s){return assertSize(s),createBuffer(s<0?0:0|checked(s))}function fromArrayLike(s){const o=s.length<0?0:0|checked(s.length),i=createBuffer(o);for(let a=0;a<o;a+=1)i[a]=255&s[a];return i}function fromArrayBuffer(s,o,i){if(o<0||s.byteLength<o)throw new RangeError('\"offset\" is outside of buffer bounds');if(s.byteLength<o+(i||0))throw new RangeError('\"length\" is outside of buffer bounds');let a;return a=void 0===o&&void 0===i?new Uint8Array(s):void 0===i?new Uint8Array(s,o):new Uint8Array(s,o,i),Object.setPrototypeOf(a,Buffer.prototype),a}function checked(s){if(s>=w)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+w.toString(16)+\" bytes\");return 0|s}function byteLength(s,o){if(Buffer.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||isInstance(s,ArrayBuffer))return s.byteLength;if(\"string\"!=typeof s)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof s);const i=s.length,a=arguments.length>2&&!0===arguments[2];if(!a&&0===i)return 0;let u=!1;for(;;)switch(o){case\"ascii\":case\"latin1\":case\"binary\":return i;case\"utf8\":case\"utf-8\":return utf8ToBytes(s).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*i;case\"hex\":return i>>>1;case\"base64\":return base64ToBytes(s).length;default:if(u)return a?-1:utf8ToBytes(s).length;o=(\"\"+o).toLowerCase(),u=!0}}function slowToString(s,o,i){let a=!1;if((void 0===o||o<0)&&(o=0),o>this.length)return\"\";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return\"\";if((i>>>=0)<=(o>>>=0))return\"\";for(s||(s=\"utf8\");;)switch(s){case\"hex\":return hexSlice(this,o,i);case\"utf8\":case\"utf-8\":return utf8Slice(this,o,i);case\"ascii\":return asciiSlice(this,o,i);case\"latin1\":case\"binary\":return latin1Slice(this,o,i);case\"base64\":return base64Slice(this,o,i);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,o,i);default:if(a)throw new TypeError(\"Unknown encoding: \"+s);s=(s+\"\").toLowerCase(),a=!0}}function swap(s,o,i){const a=s[o];s[o]=s[i],s[i]=a}function bidirectionalIndexOf(s,o,i,a,u){if(0===s.length)return-1;if(\"string\"==typeof i?(a=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),numberIsNaN(i=+i)&&(i=u?0:s.length-1),i<0&&(i=s.length+i),i>=s.length){if(u)return-1;i=s.length-1}else if(i<0){if(!u)return-1;i=0}if(\"string\"==typeof o&&(o=Buffer.from(o,a)),Buffer.isBuffer(o))return 0===o.length?-1:arrayIndexOf(s,o,i,a,u);if(\"number\"==typeof o)return o&=255,\"function\"==typeof Uint8Array.prototype.indexOf?u?Uint8Array.prototype.indexOf.call(s,o,i):Uint8Array.prototype.lastIndexOf.call(s,o,i):arrayIndexOf(s,[o],i,a,u);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(s,o,i,a,u){let _,w=1,x=s.length,C=o.length;if(void 0!==a&&(\"ucs2\"===(a=String(a).toLowerCase())||\"ucs-2\"===a||\"utf16le\"===a||\"utf-16le\"===a)){if(s.length<2||o.length<2)return-1;w=2,x/=2,C/=2,i/=2}function read(s,o){return 1===w?s[o]:s.readUInt16BE(o*w)}if(u){let a=-1;for(_=i;_<x;_++)if(read(s,_)===read(o,-1===a?0:_-a)){if(-1===a&&(a=_),_-a+1===C)return a*w}else-1!==a&&(_-=_-a),a=-1}else for(i+C>x&&(i=x-C),_=i;_>=0;_--){let i=!0;for(let a=0;a<C;a++)if(read(s,_+a)!==read(o,a)){i=!1;break}if(i)return _}return-1}function hexWrite(s,o,i,a){i=Number(i)||0;const u=s.length-i;a?(a=Number(a))>u&&(a=u):a=u;const _=o.length;let w;for(a>_/2&&(a=_/2),w=0;w<a;++w){const a=parseInt(o.substr(2*w,2),16);if(numberIsNaN(a))return w;s[i+w]=a}return w}function utf8Write(s,o,i,a){return blitBuffer(utf8ToBytes(o,s.length-i),s,i,a)}function asciiWrite(s,o,i,a){return blitBuffer(function asciiToBytes(s){const o=[];for(let i=0;i<s.length;++i)o.push(255&s.charCodeAt(i));return o}(o),s,i,a)}function base64Write(s,o,i,a){return blitBuffer(base64ToBytes(o),s,i,a)}function ucs2Write(s,o,i,a){return blitBuffer(function utf16leToBytes(s,o){let i,a,u;const _=[];for(let w=0;w<s.length&&!((o-=2)<0);++w)i=s.charCodeAt(w),a=i>>8,u=i%256,_.push(u),_.push(a);return _}(o,s.length-i),s,i,a)}function base64Slice(s,o,i){return 0===o&&i===s.length?a.fromByteArray(s):a.fromByteArray(s.slice(o,i))}function utf8Slice(s,o,i){i=Math.min(s.length,i);const a=[];let u=o;for(;u<i;){const o=s[u];let _=null,w=o>239?4:o>223?3:o>191?2:1;if(u+w<=i){let i,a,x,C;switch(w){case 1:o<128&&(_=o);break;case 2:i=s[u+1],128==(192&i)&&(C=(31&o)<<6|63&i,C>127&&(_=C));break;case 3:i=s[u+1],a=s[u+2],128==(192&i)&&128==(192&a)&&(C=(15&o)<<12|(63&i)<<6|63&a,C>2047&&(C<55296||C>57343)&&(_=C));break;case 4:i=s[u+1],a=s[u+2],x=s[u+3],128==(192&i)&&128==(192&a)&&128==(192&x)&&(C=(15&o)<<18|(63&i)<<12|(63&a)<<6|63&x,C>65535&&C<1114112&&(_=C))}}null===_?(_=65533,w=1):_>65535&&(_-=65536,a.push(_>>>10&1023|55296),_=56320|1023&_),a.push(_),u+=w}return function decodeCodePointsArray(s){const o=s.length;if(o<=x)return String.fromCharCode.apply(String,s);let i=\"\",a=0;for(;a<o;)i+=String.fromCharCode.apply(String,s.slice(a,a+=x));return i}(a)}o.kMaxLength=w,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const s=new Uint8Array(1),o={foo:function(){return 42}};return Object.setPrototypeOf(o,Uint8Array.prototype),Object.setPrototypeOf(s,o),42===s.foo()}catch(s){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(s,o,i){return from(s,o,i)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(s,o,i){return function alloc(s,o,i){return assertSize(s),s<=0?createBuffer(s):void 0!==o?\"string\"==typeof i?createBuffer(s).fill(o,i):createBuffer(s).fill(o):createBuffer(s)}(s,o,i)},Buffer.allocUnsafe=function(s){return allocUnsafe(s)},Buffer.allocUnsafeSlow=function(s){return allocUnsafe(s)},Buffer.isBuffer=function isBuffer(s){return null!=s&&!0===s._isBuffer&&s!==Buffer.prototype},Buffer.compare=function compare(s,o){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),isInstance(o,Uint8Array)&&(o=Buffer.from(o,o.offset,o.byteLength)),!Buffer.isBuffer(s)||!Buffer.isBuffer(o))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(s===o)return 0;let i=s.length,a=o.length;for(let u=0,_=Math.min(i,a);u<_;++u)if(s[u]!==o[u]){i=s[u],a=o[u];break}return i<a?-1:a<i?1:0},Buffer.isEncoding=function isEncoding(s){switch(String(s).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}},Buffer.concat=function concat(s,o){if(!Array.isArray(s))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===s.length)return Buffer.alloc(0);let i;if(void 0===o)for(o=0,i=0;i<s.length;++i)o+=s[i].length;const a=Buffer.allocUnsafe(o);let u=0;for(i=0;i<s.length;++i){let o=s[i];if(isInstance(o,Uint8Array))u+o.length>a.length?(Buffer.isBuffer(o)||(o=Buffer.from(o)),o.copy(a,u)):Uint8Array.prototype.set.call(a,o,u);else{if(!Buffer.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(a,u)}u+=o.length}return a},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const s=this.length;if(s%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let o=0;o<s;o+=2)swap(this,o,o+1);return this},Buffer.prototype.swap32=function swap32(){const s=this.length;if(s%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let o=0;o<s;o+=4)swap(this,o,o+3),swap(this,o+1,o+2);return this},Buffer.prototype.swap64=function swap64(){const s=this.length;if(s%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let o=0;o<s;o+=8)swap(this,o,o+7),swap(this,o+1,o+6),swap(this,o+2,o+5),swap(this,o+3,o+4);return this},Buffer.prototype.toString=function toString(){const s=this.length;return 0===s?\"\":0===arguments.length?utf8Slice(this,0,s):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(s){if(!Buffer.isBuffer(s))throw new TypeError(\"Argument must be a Buffer\");return this===s||0===Buffer.compare(this,s)},Buffer.prototype.inspect=function inspect(){let s=\"\";const i=o.INSPECT_MAX_BYTES;return s=this.toString(\"hex\",0,i).replace(/(.{2})/g,\"$1 \").trim(),this.length>i&&(s+=\" ... \"),\"<Buffer \"+s+\">\"},_&&(Buffer.prototype[_]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(s,o,i,a,u){if(isInstance(s,Uint8Array)&&(s=Buffer.from(s,s.offset,s.byteLength)),!Buffer.isBuffer(s))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof s);if(void 0===o&&(o=0),void 0===i&&(i=s?s.length:0),void 0===a&&(a=0),void 0===u&&(u=this.length),o<0||i>s.length||a<0||u>this.length)throw new RangeError(\"out of range index\");if(a>=u&&o>=i)return 0;if(a>=u)return-1;if(o>=i)return 1;if(this===s)return 0;let _=(u>>>=0)-(a>>>=0),w=(i>>>=0)-(o>>>=0);const x=Math.min(_,w),C=this.slice(a,u),j=s.slice(o,i);for(let s=0;s<x;++s)if(C[s]!==j[s]){_=C[s],w=j[s];break}return _<w?-1:w<_?1:0},Buffer.prototype.includes=function includes(s,o,i){return-1!==this.indexOf(s,o,i)},Buffer.prototype.indexOf=function indexOf(s,o,i){return bidirectionalIndexOf(this,s,o,i,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(s,o,i){return bidirectionalIndexOf(this,s,o,i,!1)},Buffer.prototype.write=function write(s,o,i,a){if(void 0===o)a=\"utf8\",i=this.length,o=0;else if(void 0===i&&\"string\"==typeof o)a=o,i=this.length,o=0;else{if(!isFinite(o))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");o>>>=0,isFinite(i)?(i>>>=0,void 0===a&&(a=\"utf8\")):(a=i,i=void 0)}const u=this.length-o;if((void 0===i||i>u)&&(i=u),s.length>0&&(i<0||o<0)||o>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");a||(a=\"utf8\");let _=!1;for(;;)switch(a){case\"hex\":return hexWrite(this,s,o,i);case\"utf8\":case\"utf-8\":return utf8Write(this,s,o,i);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,s,o,i);case\"base64\":return base64Write(this,s,o,i);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,s,o,i);default:if(_)throw new TypeError(\"Unknown encoding: \"+a);a=(\"\"+a).toLowerCase(),_=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const x=4096;function asciiSlice(s,o,i){let a=\"\";i=Math.min(s.length,i);for(let u=o;u<i;++u)a+=String.fromCharCode(127&s[u]);return a}function latin1Slice(s,o,i){let a=\"\";i=Math.min(s.length,i);for(let u=o;u<i;++u)a+=String.fromCharCode(s[u]);return a}function hexSlice(s,o,i){const a=s.length;(!o||o<0)&&(o=0),(!i||i<0||i>a)&&(i=a);let u=\"\";for(let a=o;a<i;++a)u+=L[s[a]];return u}function utf16leSlice(s,o,i){const a=s.slice(o,i);let u=\"\";for(let s=0;s<a.length-1;s+=2)u+=String.fromCharCode(a[s]+256*a[s+1]);return u}function checkOffset(s,o,i){if(s%1!=0||s<0)throw new RangeError(\"offset is not uint\");if(s+o>i)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(s,o,i,a,u,_){if(!Buffer.isBuffer(s))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(o>u||o<_)throw new RangeError('\"value\" argument is out of bounds');if(i+a>s.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(s,o,i,a,u){checkIntBI(o,a,u,s,i,7);let _=Number(o&BigInt(4294967295));s[i++]=_,_>>=8,s[i++]=_,_>>=8,s[i++]=_,_>>=8,s[i++]=_;let w=Number(o>>BigInt(32)&BigInt(4294967295));return s[i++]=w,w>>=8,s[i++]=w,w>>=8,s[i++]=w,w>>=8,s[i++]=w,i}function wrtBigUInt64BE(s,o,i,a,u){checkIntBI(o,a,u,s,i,7);let _=Number(o&BigInt(4294967295));s[i+7]=_,_>>=8,s[i+6]=_,_>>=8,s[i+5]=_,_>>=8,s[i+4]=_;let w=Number(o>>BigInt(32)&BigInt(4294967295));return s[i+3]=w,w>>=8,s[i+2]=w,w>>=8,s[i+1]=w,w>>=8,s[i]=w,i+8}function checkIEEE754(s,o,i,a,u,_){if(i+a>s.length)throw new RangeError(\"Index out of range\");if(i<0)throw new RangeError(\"Index out of range\")}function writeFloat(s,o,i,a,_){return o=+o,i>>>=0,_||checkIEEE754(s,0,i,4),u.write(s,o,i,a,23,4),i+4}function writeDouble(s,o,i,a,_){return o=+o,i>>>=0,_||checkIEEE754(s,0,i,8),u.write(s,o,i,a,52,8),i+8}Buffer.prototype.slice=function slice(s,o){const i=this.length;(s=~~s)<0?(s+=i)<0&&(s=0):s>i&&(s=i),(o=void 0===o?i:~~o)<0?(o+=i)<0&&(o=0):o>i&&(o=i),o<s&&(o=s);const a=this.subarray(s,o);return Object.setPrototypeOf(a,Buffer.prototype),a},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=this[s],u=1,_=0;for(;++_<o&&(u*=256);)a+=this[s+_]*u;return a},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=this[s+--o],u=1;for(;o>0&&(u*=256);)a+=this[s+--o]*u;return a},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(s,o){return s>>>=0,o||checkOffset(s,1,this.length),this[s]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(s,o){return s>>>=0,o||checkOffset(s,2,this.length),this[s]|this[s+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(s,o){return s>>>=0,o||checkOffset(s,2,this.length),this[s]<<8|this[s+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=o+256*this[++s]+65536*this[++s]+this[++s]*2**24,u=this[++s]+256*this[++s]+65536*this[++s]+i*2**24;return BigInt(a)+(BigInt(u)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=o*2**24+65536*this[++s]+256*this[++s]+this[++s],u=this[++s]*2**24+65536*this[++s]+256*this[++s]+i;return(BigInt(a)<<BigInt(32))+BigInt(u)})),Buffer.prototype.readIntLE=function readIntLE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=this[s],u=1,_=0;for(;++_<o&&(u*=256);)a+=this[s+_]*u;return u*=128,a>=u&&(a-=Math.pow(2,8*o)),a},Buffer.prototype.readIntBE=function readIntBE(s,o,i){s>>>=0,o>>>=0,i||checkOffset(s,o,this.length);let a=o,u=1,_=this[s+--a];for(;a>0&&(u*=256);)_+=this[s+--a]*u;return u*=128,_>=u&&(_-=Math.pow(2,8*o)),_},Buffer.prototype.readInt8=function readInt8(s,o){return s>>>=0,o||checkOffset(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},Buffer.prototype.readInt16LE=function readInt16LE(s,o){s>>>=0,o||checkOffset(s,2,this.length);const i=this[s]|this[s+1]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt16BE=function readInt16BE(s,o){s>>>=0,o||checkOffset(s,2,this.length);const i=this[s+1]|this[s]<<8;return 32768&i?4294901760|i:i},Buffer.prototype.readInt32LE=function readInt32LE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=this[s+4]+256*this[s+5]+65536*this[s+6]+(i<<24);return(BigInt(a)<<BigInt(32))+BigInt(o+256*this[++s]+65536*this[++s]+this[++s]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(s){validateNumber(s>>>=0,\"offset\");const o=this[s],i=this[s+7];void 0!==o&&void 0!==i||boundsError(s,this.length-8);const a=(o<<24)+65536*this[++s]+256*this[++s]+this[++s];return(BigInt(a)<<BigInt(32))+BigInt(this[++s]*2**24+65536*this[++s]+256*this[++s]+i)})),Buffer.prototype.readFloatLE=function readFloatLE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),u.read(this,s,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(s,o){return s>>>=0,o||checkOffset(s,4,this.length),u.read(this,s,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(s,o){return s>>>=0,o||checkOffset(s,8,this.length),u.read(this,s,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(s,o){return s>>>=0,o||checkOffset(s,8,this.length),u.read(this,s,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(s,o,i,a){if(s=+s,o>>>=0,i>>>=0,!a){checkInt(this,s,o,i,Math.pow(2,8*i)-1,0)}let u=1,_=0;for(this[o]=255&s;++_<i&&(u*=256);)this[o+_]=s/u&255;return o+i},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(s,o,i,a){if(s=+s,o>>>=0,i>>>=0,!a){checkInt(this,s,o,i,Math.pow(2,8*i)-1,0)}let u=i-1,_=1;for(this[o+u]=255&s;--u>=0&&(_*=256);)this[o+u]=s/_&255;return o+i},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,1,255,0),this[o]=255&s,o+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,65535,0),this[o]=255&s,this[o+1]=s>>>8,o+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,65535,0),this[o]=s>>>8,this[o+1]=255&s,o+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,4294967295,0),this[o+3]=s>>>24,this[o+2]=s>>>16,this[o+1]=s>>>8,this[o]=255&s,o+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,4294967295,0),this[o]=s>>>24,this[o+1]=s>>>16,this[o+2]=s>>>8,this[o+3]=255&s,o+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(s,o=0){return wrtBigUInt64LE(this,s,o,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(s,o=0){return wrtBigUInt64BE(this,s,o,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(s,o,i,a){if(s=+s,o>>>=0,!a){const a=Math.pow(2,8*i-1);checkInt(this,s,o,i,a-1,-a)}let u=0,_=1,w=0;for(this[o]=255&s;++u<i&&(_*=256);)s<0&&0===w&&0!==this[o+u-1]&&(w=1),this[o+u]=(s/_|0)-w&255;return o+i},Buffer.prototype.writeIntBE=function writeIntBE(s,o,i,a){if(s=+s,o>>>=0,!a){const a=Math.pow(2,8*i-1);checkInt(this,s,o,i,a-1,-a)}let u=i-1,_=1,w=0;for(this[o+u]=255&s;--u>=0&&(_*=256);)s<0&&0===w&&0!==this[o+u+1]&&(w=1),this[o+u]=(s/_|0)-w&255;return o+i},Buffer.prototype.writeInt8=function writeInt8(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,1,127,-128),s<0&&(s=255+s+1),this[o]=255&s,o+1},Buffer.prototype.writeInt16LE=function writeInt16LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,32767,-32768),this[o]=255&s,this[o+1]=s>>>8,o+2},Buffer.prototype.writeInt16BE=function writeInt16BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,2,32767,-32768),this[o]=s>>>8,this[o+1]=255&s,o+2},Buffer.prototype.writeInt32LE=function writeInt32LE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,2147483647,-2147483648),this[o]=255&s,this[o+1]=s>>>8,this[o+2]=s>>>16,this[o+3]=s>>>24,o+4},Buffer.prototype.writeInt32BE=function writeInt32BE(s,o,i){return s=+s,o>>>=0,i||checkInt(this,s,o,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[o]=s>>>24,this[o+1]=s>>>16,this[o+2]=s>>>8,this[o+3]=255&s,o+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(s,o=0){return wrtBigUInt64LE(this,s,o,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(s,o=0){return wrtBigUInt64BE(this,s,o,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(s,o,i){return writeFloat(this,s,o,!0,i)},Buffer.prototype.writeFloatBE=function writeFloatBE(s,o,i){return writeFloat(this,s,o,!1,i)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(s,o,i){return writeDouble(this,s,o,!0,i)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(s,o,i){return writeDouble(this,s,o,!1,i)},Buffer.prototype.copy=function copy(s,o,i,a){if(!Buffer.isBuffer(s))throw new TypeError(\"argument should be a Buffer\");if(i||(i=0),a||0===a||(a=this.length),o>=s.length&&(o=s.length),o||(o=0),a>0&&a<i&&(a=i),a===i)return 0;if(0===s.length||0===this.length)return 0;if(o<0)throw new RangeError(\"targetStart out of bounds\");if(i<0||i>=this.length)throw new RangeError(\"Index out of range\");if(a<0)throw new RangeError(\"sourceEnd out of bounds\");a>this.length&&(a=this.length),s.length-o<a-i&&(a=s.length-o+i);const u=a-i;return this===s&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(o,i,a):Uint8Array.prototype.set.call(s,this.subarray(i,a),o),u},Buffer.prototype.fill=function fill(s,o,i,a){if(\"string\"==typeof s){if(\"string\"==typeof o?(a=o,o=0,i=this.length):\"string\"==typeof i&&(a=i,i=this.length),void 0!==a&&\"string\"!=typeof a)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof a&&!Buffer.isEncoding(a))throw new TypeError(\"Unknown encoding: \"+a);if(1===s.length){const o=s.charCodeAt(0);(\"utf8\"===a&&o<128||\"latin1\"===a)&&(s=o)}}else\"number\"==typeof s?s&=255:\"boolean\"==typeof s&&(s=Number(s));if(o<0||this.length<o||this.length<i)throw new RangeError(\"Out of range index\");if(i<=o)return this;let u;if(o>>>=0,i=void 0===i?this.length:i>>>0,s||(s=0),\"number\"==typeof s)for(u=o;u<i;++u)this[u]=s;else{const _=Buffer.isBuffer(s)?s:Buffer.from(s,a),w=_.length;if(0===w)throw new TypeError('The value \"'+s+'\" is invalid for argument \"value\"');for(u=0;u<i-o;++u)this[u+o]=_[u%w]}return this};const C={};function E(s,o,i){C[s]=class NodeError extends i{constructor(){super(),Object.defineProperty(this,\"message\",{value:o.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${s}]`,this.stack,delete this.name}get code(){return s}set code(s){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:s,writable:!0})}toString(){return`${this.name} [${s}]: ${this.message}`}}}function addNumericalSeparator(s){let o=\"\",i=s.length;const a=\"-\"===s[0]?1:0;for(;i>=a+4;i-=3)o=`_${s.slice(i-3,i)}${o}`;return`${s.slice(0,i)}${o}`}function checkIntBI(s,o,i,a,u,_){if(s>i||s<o){const a=\"bigint\"==typeof o?\"n\":\"\";let u;throw u=_>3?0===o||o===BigInt(0)?`>= 0${a} and < 2${a} ** ${8*(_+1)}${a}`:`>= -(2${a} ** ${8*(_+1)-1}${a}) and < 2 ** ${8*(_+1)-1}${a}`:`>= ${o}${a} and <= ${i}${a}`,new C.ERR_OUT_OF_RANGE(\"value\",u,s)}!function checkBounds(s,o,i){validateNumber(o,\"offset\"),void 0!==s[o]&&void 0!==s[o+i]||boundsError(o,s.length-(i+1))}(a,u,_)}function validateNumber(s,o){if(\"number\"!=typeof s)throw new C.ERR_INVALID_ARG_TYPE(o,\"number\",s)}function boundsError(s,o,i){if(Math.floor(s)!==s)throw validateNumber(s,i),new C.ERR_OUT_OF_RANGE(i||\"offset\",\"an integer\",s);if(o<0)throw new C.ERR_BUFFER_OUT_OF_BOUNDS;throw new C.ERR_OUT_OF_RANGE(i||\"offset\",`>= ${i?1:0} and <= ${o}`,s)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(s){return s?`${s} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(s,o){return`The \"${s}\" argument must be of type number. Received type ${typeof o}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(s,o,i){let a=`The value of \"${s}\" is out of range.`,u=i;return Number.isInteger(i)&&Math.abs(i)>2**32?u=addNumericalSeparator(String(i)):\"bigint\"==typeof i&&(u=String(i),(i>BigInt(2)**BigInt(32)||i<-(BigInt(2)**BigInt(32)))&&(u=addNumericalSeparator(u)),u+=\"n\"),a+=` It must be ${o}. Received ${u}`,a}),RangeError);const j=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(s,o){let i;o=o||1/0;const a=s.length;let u=null;const _=[];for(let w=0;w<a;++w){if(i=s.charCodeAt(w),i>55295&&i<57344){if(!u){if(i>56319){(o-=3)>-1&&_.push(239,191,189);continue}if(w+1===a){(o-=3)>-1&&_.push(239,191,189);continue}u=i;continue}if(i<56320){(o-=3)>-1&&_.push(239,191,189),u=i;continue}i=65536+(u-55296<<10|i-56320)}else u&&(o-=3)>-1&&_.push(239,191,189);if(u=null,i<128){if((o-=1)<0)break;_.push(i)}else if(i<2048){if((o-=2)<0)break;_.push(i>>6|192,63&i|128)}else if(i<65536){if((o-=3)<0)break;_.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error(\"Invalid code point\");if((o-=4)<0)break;_.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return _}function base64ToBytes(s){return a.toByteArray(function base64clean(s){if((s=(s=s.split(\"=\")[0]).trim().replace(j,\"\")).length<2)return\"\";for(;s.length%4!=0;)s+=\"=\";return s}(s))}function blitBuffer(s,o,i,a){let u;for(u=0;u<a&&!(u+i>=o.length||u>=s.length);++u)o[u+i]=s[u];return u}function isInstance(s,o){return s instanceof o||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===o.name}function numberIsNaN(s){return s!=s}const L=function(){const s=\"0123456789abcdef\",o=new Array(256);for(let i=0;i<16;++i){const a=16*i;for(let u=0;u<16;++u)o[a+u]=s[i]+s[u]}return o}();function defineBigIntMethod(s){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:s}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},48590:(s,o)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0}),o.default=function(s){return s&&\"@@redux/INIT\"===s.type?\"initialState argument passed to createStore\":\"previous state received by the reducer\"},s.exports=o.default},48655:(s,o,i)=>{var a=i(26025);s.exports=function listCacheHas(s){return a(this.__data__,s)>-1}},48675:(s,o,i)=>{s.exports=i(20850)},48948:(s,o,i)=>{var a=i(21791),u=i(86375);s.exports=function copySymbolsIn(s,o){return a(s,u(s),o)}},49326:(s,o,i)=>{var a=i(31769),u=i(72428),_=i(56449),w=i(30361),x=i(30294),C=i(77797);s.exports=function hasPath(s,o,i){for(var j=-1,L=(o=a(o,s)).length,B=!1;++j<L;){var $=C(o[j]);if(!(B=null!=s&&i(s,$)))break;s=s[$]}return B||++j!=L?B:!!(L=null==s?0:s.length)&&x(L)&&w($,L)&&(_(s)||u(s))}},49552:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(46285),_=a.document,w=u(_)&&u(_.createElement);s.exports=function(s){return w?_.createElement(s):{}}},49653:(s,o,i)=>{var a=i(37828);s.exports=function cloneArrayBuffer(s){var o=new s.constructor(s.byteLength);return new a(o).set(new a(s)),o}},49698:s=>{var o=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");s.exports=function hasUnicode(s){return o.test(s)}},49724:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(39298),_=a({}.hasOwnProperty);s.exports=Object.hasOwn||function hasOwn(s,o){return _(u(s),o)}},49747:(s,o,i)=>{var a=i(66977);function curry(s,o,i){var u=a(s,8,void 0,void 0,void 0,void 0,void 0,o=i?void 0:o);return u.placeholder=curry.placeholder,u}curry.placeholder={},s.exports=curry},50002:(s,o,i)=>{var a=i(82199),u=i(4664),_=i(95950);s.exports=function getAllKeys(s){return a(s,_,u)}},50104:(s,o,i)=>{var a=i(53661);function memoize(s,o){if(\"function\"!=typeof s||null!=o&&\"function\"!=typeof o)throw new TypeError(\"Expected a function\");var memoized=function(){var i=arguments,a=o?o.apply(this,i):i[0],u=memoized.cache;if(u.has(a))return u.get(a);var _=s.apply(this,i);return memoized.cache=u.set(a,_)||u,_};return memoized.cache=new(memoize.Cache||a),memoized}memoize.Cache=a,s.exports=memoize},50583:(s,o,i)=>{var a=i(47237),u=i(17255),_=i(28586),w=i(77797);s.exports=function property(s){return _(s)?a(w(s)):u(s)}},50689:(s,o,i)=>{var a=i(50002),u=Object.prototype.hasOwnProperty;s.exports=function equalObjects(s,o,i,_,w,x){var C=1&i,j=a(s),L=j.length;if(L!=a(o).length&&!C)return!1;for(var B=L;B--;){var $=j[B];if(!(C?$ in o:u.call(o,$)))return!1}var V=x.get(s),U=x.get(o);if(V&&U)return V==o&&U==s;var z=!0;x.set(s,o),x.set(o,s);for(var Y=C;++B<L;){var Z=s[$=j[B]],ee=o[$];if(_)var ie=C?_(ee,Z,$,o,s,x):_(Z,ee,$,s,o,x);if(!(void 0===ie?Z===ee||w(Z,ee,i,_,x):ie)){z=!1;break}Y||(Y=\"constructor\"==$)}if(z&&!Y){var ae=s.constructor,ce=o.constructor;ae==ce||!(\"constructor\"in s)||!(\"constructor\"in o)||\"function\"==typeof ae&&ae instanceof ae&&\"function\"==typeof ce&&ce instanceof ce||(z=!1)}return x.delete(s),x.delete(o),z}},50828:(s,o,i)=>{var a=i(24647),u=i(13222),_=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,w=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\");s.exports=function deburr(s){return(s=u(s))&&s.replace(_,a).replace(w,\"\")}},51175:(s,o,i)=>{\"use strict\";var a=i(19846);s.exports=a&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},51234:s=>{s.exports=function baseZipObject(s,o,i){for(var a=-1,u=s.length,_=o.length,w={};++a<u;){var x=a<_?o[a]:void 0;i(w,s[a],x)}return w}},51420:(s,o,i)=>{var a=i(80079);s.exports=function stackClear(){this.__data__=new a,this.size=0}},51459:s=>{s.exports=function setCacheHas(s){return this.__data__.has(s)}},51811:s=>{var o=Date.now;s.exports=function shortOut(s){var i=0,a=0;return function(){var u=o(),_=16-(u-a);if(a=u,_>0){if(++i>=800)return arguments[0]}else i=0;return s.apply(void 0,arguments)}}},51871:(s,o,i)=>{\"use strict\";var a=i(1907),u=i(82159);s.exports=function(s,o,i){try{return a(u(Object.getOwnPropertyDescriptor(s,o)[i]))}catch(s){}}},51873:(s,o,i)=>{var a=i(9325).Symbol;s.exports=a},52623:(s,o,i)=>{\"use strict\";var a={};a[i(76264)(\"toStringTag\")]=\"z\",s.exports=\"[object z]\"===String(a)},53138:(s,o,i)=>{var a=i(11331);s.exports=function customOmitClone(s){return a(s)?void 0:s}},53209:(s,o,i)=>{\"use strict\";var a=i(65606),u=65536,_=4294967295;var w=i(92861).Buffer,x=i.g.crypto||i.g.msCrypto;x&&x.getRandomValues?s.exports=function randomBytes(s,o){if(s>_)throw new RangeError(\"requested too many random bytes\");var i=w.allocUnsafe(s);if(s>0)if(s>u)for(var C=0;C<s;C+=u)x.getRandomValues(i.slice(C,C+u));else x.getRandomValues(i);if(\"function\"==typeof o)return a.nextTick((function(){o(null,i)}));return i}:s.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},53320:s=>{var o=Math.max;s.exports=function composeArgsRight(s,i,a,u){for(var _=-1,w=s.length,x=-1,C=a.length,j=-1,L=i.length,B=o(w-C,0),$=Array(B+L),V=!u;++_<B;)$[_]=s[_];for(var U=_;++j<L;)$[U+j]=i[j];for(;++x<C;)(V||_<w)&&($[U+a[x]]=s[_++]);return $}},53375:(s,o,i)=>{\"use strict\";var a=i(93700);s.exports=a},53661:(s,o,i)=>{var a=i(63040),u=i(17670),_=i(90289),w=i(4509),x=i(72949);function MapCache(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){var a=s[o];this.set(a[0],a[1])}}MapCache.prototype.clear=a,MapCache.prototype.delete=u,MapCache.prototype.get=_,MapCache.prototype.has=w,MapCache.prototype.set=x,s.exports=MapCache},53758:(s,o,i)=>{var a=i(30980),u=i(56017),_=i(94033),w=i(56449),x=i(40346),C=i(80257),j=Object.prototype.hasOwnProperty;function lodash(s){if(x(s)&&!w(s)&&!(s instanceof a)){if(s instanceof u)return s;if(j.call(s,\"__wrapped__\"))return C(s)}return new u(s)}lodash.prototype=_.prototype,lodash.prototype.constructor=lodash,s.exports=lodash},53812:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function isBoolean(s){return!0===s||!1===s||u(s)&&\"[object Boolean]\"==a(s)}},54018:(s,o,i)=>{\"use strict\";var a=i(46285);s.exports=function(s){return a(s)||null===s}},54128:(s,o,i)=>{var a=i(31800),u=/^\\s+/;s.exports=function baseTrim(s){return s?s.slice(0,a(s)+1).replace(u,\"\"):s}},54552:s=>{s.exports=function basePropertyOf(s){return function(o){return null==s?void 0:s[o]}}},54641:(s,o,i)=>{var a=i(68882),u=i(51811)(a);s.exports=u},54829:(s,o,i)=>{\"use strict\";var a=i(74284).f;s.exports=function(s,o,i){i in s||a(s,i,{configurable:!0,get:function(){return o[i]},set:function(s){o[i]=s}})}},54878:(s,o,i)=>{\"use strict\";var a=i(52623),u=i(73948);s.exports=a?{}.toString:function toString(){return\"[object \"+u(this)+\"]\"}},55157:s=>{s.exports=function(){throw new Error(\"Readable.from is not available in the browser\")}},55364:(s,o,i)=>{var a=i(85250),u=i(20999)((function(s,o,i){a(s,o,i)}));s.exports=u},55481:(s,o,i)=>{var a=i(9325)[\"__core-js_shared__\"];s.exports=a},55527:s=>{var o=Object.prototype;s.exports=function isPrototype(s){var i=s&&s.constructor;return s===(\"function\"==typeof i&&i.prototype||o)}},55580:(s,o,i)=>{var a=i(56110)(i(9325),\"DataView\");s.exports=a},55674:(s,o,i)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0}),o.validateNextState=o.getUnexpectedInvocationParameterMessage=o.getStateName=void 0;var a=_interopRequireDefault(i(48590)),u=_interopRequireDefault(i(82261)),_=_interopRequireDefault(i(27374));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}o.getStateName=a.default,o.getUnexpectedInvocationParameterMessage=u.default,o.validateNextState=_.default},55808:(s,o,i)=>{var a=i(12507)(\"toUpperCase\");s.exports=a},55973:s=>{class KeyValuePair{constructor(s,o){this.key=s,this.value=o}clone(){const s=new KeyValuePair;return this.key&&(s.key=this.key.clone()),this.value&&(s.value=this.value.clone()),s}}s.exports=KeyValuePair},56017:(s,o,i)=>{var a=i(39344),u=i(94033);function LodashWrapper(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=void 0}LodashWrapper.prototype=a(u.prototype),LodashWrapper.prototype.constructor=LodashWrapper,s.exports=LodashWrapper},56110:(s,o,i)=>{var a=i(45083),u=i(10392);s.exports=function getNative(s,o){var i=u(s,o);return a(i)?i:void 0}},56367:(s,o,i)=>{s.exports=i(77731)},56449:s=>{var o=Array.isArray;s.exports=o},56698:s=>{\"function\"==typeof Object.create?s.exports=function inherits(s,o){o&&(s.super_=o,s.prototype=Object.create(o.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}))}:s.exports=function inherits(s,o){if(o){s.super_=o;var TempCtor=function(){};TempCtor.prototype=o.prototype,s.prototype=new TempCtor,s.prototype.constructor=s}}},56757:(s,o,i)=>{var a=i(91033),u=Math.max;s.exports=function overRest(s,o,i){return o=u(void 0===o?s.length-1:o,0),function(){for(var _=arguments,w=-1,x=u(_.length-o,0),C=Array(x);++w<x;)C[w]=_[o+w];w=-1;for(var j=Array(o+1);++w<o;)j[w]=_[w];return j[o]=i(C),a(s,this,j)}}},57382:(s,o,i)=>{\"use strict\";var a=i(98828);s.exports=!a((function(){function F(){}return F.prototype.constructor=null,Object.getPrototypeOf(new F)!==F.prototype}))},57758:(s,o,i)=>{\"use strict\";var a;var u=i(86048).F,_=u.ERR_MISSING_ARGS,w=u.ERR_STREAM_DESTROYED;function noop(s){if(s)throw s}function call(s){s()}function pipe(s,o){return s.pipe(o)}s.exports=function pipeline(){for(var s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];var x,C=function popCallback(s){return s.length?\"function\"!=typeof s[s.length-1]?noop:s.pop():noop}(o);if(Array.isArray(o[0])&&(o=o[0]),o.length<2)throw new _(\"streams\");var j=o.map((function(s,u){var _=u<o.length-1;return function destroyer(s,o,u,_){_=function once(s){var o=!1;return function(){o||(o=!0,s.apply(void 0,arguments))}}(_);var x=!1;s.on(\"close\",(function(){x=!0})),void 0===a&&(a=i(86238)),a(s,{readable:o,writable:u},(function(s){if(s)return _(s);x=!0,_()}));var C=!1;return function(o){if(!x&&!C)return C=!0,function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?s.abort():\"function\"==typeof s.destroy?s.destroy():void _(o||new w(\"pipe\"))}}(s,_,u>0,(function(s){x||(x=s),s&&j.forEach(call),_||(j.forEach(call),C(x))}))}));return o.reduce(pipe)}},58075:(s,o,i)=>{\"use strict\";var a,u=i(36624),_=i(42220),w=i(80376),x=i(38530),C=i(62416),j=i(49552),L=i(92522),B=\"prototype\",$=\"script\",V=L(\"IE_PROTO\"),EmptyConstructor=function(){},scriptTag=function(s){return\"<\"+$+\">\"+s+\"</\"+$+\">\"},NullProtoObjectViaActiveX=function(s){s.write(scriptTag(\"\")),s.close();var o=s.parentWindow.Object;return s=null,o},NullProtoObject=function(){try{a=new ActiveXObject(\"htmlfile\")}catch(s){}var s,o,i;NullProtoObject=\"undefined\"!=typeof document?document.domain&&a?NullProtoObjectViaActiveX(a):(o=j(\"iframe\"),i=\"java\"+$+\":\",o.style.display=\"none\",C.appendChild(o),o.src=String(i),(s=o.contentWindow.document).open(),s.write(scriptTag(\"document.F=Object\")),s.close(),s.F):NullProtoObjectViaActiveX(a);for(var u=w.length;u--;)delete NullProtoObject[B][w[u]];return NullProtoObject()};x[V]=!0,s.exports=Object.create||function create(s,o){var i;return null!==s?(EmptyConstructor[B]=u(s),i=new EmptyConstructor,EmptyConstructor[B]=null,i[V]=s):i=NullProtoObject(),void 0===o?i:_.f(i,o)}},58156:(s,o,i)=>{var a=i(47422);s.exports=function get(s,o,i){var u=null==s?void 0:a(s,o);return void 0===u?i:u}},58523:s=>{s.exports=function countHolders(s,o){for(var i=s.length,a=0;i--;)s[i]===o&&++a;return a}},58661:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(98828);s.exports=a&&u((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},59350:s=>{var o=Object.prototype.toString;s.exports=function objectToString(s){return o.call(s)}},59399:(s,o,i)=>{\"use strict\";var a=i(25264).CopyToClipboard;a.CopyToClipboard=a,s.exports=a},59550:s=>{\"use strict\";s.exports=function(s,o){return{value:s,done:o}}},60183:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(13930),_=i(7376),w=i(36833),x=i(62250),C=i(47181),j=i(15972),L=i(79192),B=i(14840),$=i(61626),V=i(68055),U=i(76264),z=i(93742),Y=i(95116),Z=w.PROPER,ee=w.CONFIGURABLE,ie=Y.IteratorPrototype,ae=Y.BUGGY_SAFARI_ITERATORS,ce=U(\"iterator\"),le=\"keys\",pe=\"values\",de=\"entries\",returnThis=function(){return this};s.exports=function(s,o,i,w,U,Y,fe){C(i,o,w);var ye,be,_e,getIterationMethod=function(s){if(s===U&&Te)return Te;if(!ae&&s&&s in xe)return xe[s];switch(s){case le:return function keys(){return new i(this,s)};case pe:return function values(){return new i(this,s)};case de:return function entries(){return new i(this,s)}}return function(){return new i(this)}},Se=o+\" Iterator\",we=!1,xe=s.prototype,Pe=xe[ce]||xe[\"@@iterator\"]||U&&xe[U],Te=!ae&&Pe||getIterationMethod(U),Re=\"Array\"===o&&xe.entries||Pe;if(Re&&(ye=j(Re.call(new s)))!==Object.prototype&&ye.next&&(_||j(ye)===ie||(L?L(ye,ie):x(ye[ce])||V(ye,ce,returnThis)),B(ye,Se,!0,!0),_&&(z[Se]=returnThis)),Z&&U===pe&&Pe&&Pe.name!==pe&&(!_&&ee?$(xe,\"name\",pe):(we=!0,Te=function values(){return u(Pe,this)})),U)if(be={values:getIterationMethod(pe),keys:Y?Te:getIterationMethod(le),entries:getIterationMethod(de)},fe)for(_e in be)(ae||we||!(_e in xe))&&V(xe,_e,be[_e]);else a({target:o,proto:!0,forced:ae||we},be);return _&&!fe||xe[ce]===Te||V(xe,ce,Te,{name:U}),z[o]=Te,be}},60270:(s,o,i)=>{var a=i(87068),u=i(40346);s.exports=function baseIsEqual(s,o,i,_,w){return s===o||(null==s||null==o||!u(s)&&!u(o)?s!=s&&o!=o:a(s,o,i,_,baseIsEqual,w))}},60581:(s,o,i)=>{\"use strict\";var a=i(13930),u=i(62250),_=i(46285),w=TypeError;s.exports=function(s,o){var i,x;if(\"string\"===o&&u(i=s.toString)&&!_(x=a(i,s)))return x;if(u(i=s.valueOf)&&!_(x=a(i,s)))return x;if(\"string\"!==o&&u(i=s.toString)&&!_(x=a(i,s)))return x;throw new w(\"Can't convert object to primitive value\")}},60680:(s,o,i)=>{var a=i(13222),u=/[\\\\^$.*+?()[\\]{}|]/g,_=RegExp(u.source);s.exports=function escapeRegExp(s){return(s=a(s))&&_.test(s)?s.replace(u,\"\\\\$&\"):s}},61045:(s,o,i)=>{const a=i(6048),u=i(23805),_=i(6233),w=i(87726),x=i(10866);s.exports=class ObjectElement extends _{constructor(s,o,i){super(s||[],o,i),this.element=\"object\"}primitive(){return\"object\"}toValue(){return this.content.reduce(((s,o)=>(s[o.key.toValue()]=o.value?o.value.toValue():void 0,s)),{})}get(s){const o=this.getMember(s);if(o)return o.value}getMember(s){if(void 0!==s)return this.content.find((o=>o.key.toValue()===s))}remove(s){let o=null;return this.content=this.content.filter((i=>i.key.toValue()!==s||(o=i,!1))),o}getKey(s){const o=this.getMember(s);if(o)return o.key}set(s,o){if(u(s))return Object.keys(s).forEach((o=>{this.set(o,s[o])})),this;const i=s,a=this.getMember(i);return a?a.value=o:this.content.push(new w(i,o)),this}keys(){return this.content.map((s=>s.key.toValue()))}values(){return this.content.map((s=>s.value.toValue()))}hasKey(s){return this.content.some((o=>o.key.equals(s)))}items(){return this.content.map((s=>[s.key.toValue(),s.value.toValue()]))}map(s,o){return this.content.map((i=>s.bind(o)(i.value,i.key,i)))}compactMap(s,o){const i=[];return this.forEach(((a,u,_)=>{const w=s.bind(o)(a,u,_);w&&i.push(w)})),i}filter(s,o){return new x(this.content).filter(s,o)}reject(s,o){return this.filter(a(s),o)}forEach(s,o){return this.content.forEach((i=>s.bind(o)(i.value,i.key,i)))}}},61074:s=>{s.exports=function asciiToArray(s){return s.split(\"\")}},61160:(s,o,i)=>{\"use strict\";var a=i(92063),u=i(73992),_=/^[\\x00-\\x20\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+/,w=/[\\n\\r\\t]/g,x=/^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//,C=/:\\d+$/,j=/^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\\\/]+)?([\\S\\s]*)/i,L=/^[a-zA-Z]:/;function trimLeft(s){return(s||\"\").toString().replace(_,\"\")}var B=[[\"#\",\"hash\"],[\"?\",\"query\"],function sanitize(s,o){return isSpecial(o.protocol)?s.replace(/\\\\/g,\"/\"):s},[\"/\",\"pathname\"],[\"@\",\"auth\",1],[NaN,\"host\",void 0,1,1],[/:(\\d*)$/,\"port\",void 0,1],[NaN,\"hostname\",void 0,1,1]],$={hash:1,query:1};function lolcation(s){var o,a=(\"undefined\"!=typeof window?window:void 0!==i.g?i.g:\"undefined\"!=typeof self?self:{}).location||{},u={},_=typeof(s=s||a);if(\"blob:\"===s.protocol)u=new Url(unescape(s.pathname),{});else if(\"string\"===_)for(o in u=new Url(s,{}),$)delete u[o];else if(\"object\"===_){for(o in s)o in $||(u[o]=s[o]);void 0===u.slashes&&(u.slashes=x.test(s.href))}return u}function isSpecial(s){return\"file:\"===s||\"ftp:\"===s||\"http:\"===s||\"https:\"===s||\"ws:\"===s||\"wss:\"===s}function extractProtocol(s,o){s=(s=trimLeft(s)).replace(w,\"\"),o=o||{};var i,a=j.exec(s),u=a[1]?a[1].toLowerCase():\"\",_=!!a[2],x=!!a[3],C=0;return _?x?(i=a[2]+a[3]+a[4],C=a[2].length+a[3].length):(i=a[2]+a[4],C=a[2].length):x?(i=a[3]+a[4],C=a[3].length):i=a[4],\"file:\"===u?C>=2&&(i=i.slice(2)):isSpecial(u)?i=a[4]:u?_&&(i=i.slice(2)):C>=2&&isSpecial(o.protocol)&&(i=a[4]),{protocol:u,slashes:_||isSpecial(u),slashesCount:C,rest:i}}function Url(s,o,i){if(s=(s=trimLeft(s)).replace(w,\"\"),!(this instanceof Url))return new Url(s,o,i);var _,x,C,j,$,V,U=B.slice(),z=typeof o,Y=this,Z=0;for(\"object\"!==z&&\"string\"!==z&&(i=o,o=null),i&&\"function\"!=typeof i&&(i=u.parse),_=!(x=extractProtocol(s||\"\",o=lolcation(o))).protocol&&!x.slashes,Y.slashes=x.slashes||_&&o.slashes,Y.protocol=x.protocol||o.protocol||\"\",s=x.rest,(\"file:\"===x.protocol&&(2!==x.slashesCount||L.test(s))||!x.slashes&&(x.protocol||x.slashesCount<2||!isSpecial(Y.protocol)))&&(U[3]=[/(.*)/,\"pathname\"]);Z<U.length;Z++)\"function\"!=typeof(j=U[Z])?(C=j[0],V=j[1],C!=C?Y[V]=s:\"string\"==typeof C?~($=\"@\"===C?s.lastIndexOf(C):s.indexOf(C))&&(\"number\"==typeof j[2]?(Y[V]=s.slice(0,$),s=s.slice($+j[2])):(Y[V]=s.slice($),s=s.slice(0,$))):($=C.exec(s))&&(Y[V]=$[1],s=s.slice(0,$.index)),Y[V]=Y[V]||_&&j[3]&&o[V]||\"\",j[4]&&(Y[V]=Y[V].toLowerCase())):s=j(s,Y);i&&(Y.query=i(Y.query)),_&&o.slashes&&\"/\"!==Y.pathname.charAt(0)&&(\"\"!==Y.pathname||\"\"!==o.pathname)&&(Y.pathname=function resolve(s,o){if(\"\"===s)return o;for(var i=(o||\"/\").split(\"/\").slice(0,-1).concat(s.split(\"/\")),a=i.length,u=i[a-1],_=!1,w=0;a--;)\".\"===i[a]?i.splice(a,1):\"..\"===i[a]?(i.splice(a,1),w++):w&&(0===a&&(_=!0),i.splice(a,1),w--);return _&&i.unshift(\"\"),\".\"!==u&&\"..\"!==u||i.push(\"\"),i.join(\"/\")}(Y.pathname,o.pathname)),\"/\"!==Y.pathname.charAt(0)&&isSpecial(Y.protocol)&&(Y.pathname=\"/\"+Y.pathname),a(Y.port,Y.protocol)||(Y.host=Y.hostname,Y.port=\"\"),Y.username=Y.password=\"\",Y.auth&&(~($=Y.auth.indexOf(\":\"))?(Y.username=Y.auth.slice(0,$),Y.username=encodeURIComponent(decodeURIComponent(Y.username)),Y.password=Y.auth.slice($+1),Y.password=encodeURIComponent(decodeURIComponent(Y.password))):Y.username=encodeURIComponent(decodeURIComponent(Y.auth)),Y.auth=Y.password?Y.username+\":\"+Y.password:Y.username),Y.origin=\"file:\"!==Y.protocol&&isSpecial(Y.protocol)&&Y.host?Y.protocol+\"//\"+Y.host:\"null\",Y.href=Y.toString()}Url.prototype={set:function set(s,o,i){var _=this;switch(s){case\"query\":\"string\"==typeof o&&o.length&&(o=(i||u.parse)(o)),_[s]=o;break;case\"port\":_[s]=o,a(o,_.protocol)?o&&(_.host=_.hostname+\":\"+o):(_.host=_.hostname,_[s]=\"\");break;case\"hostname\":_[s]=o,_.port&&(o+=\":\"+_.port),_.host=o;break;case\"host\":_[s]=o,C.test(o)?(o=o.split(\":\"),_.port=o.pop(),_.hostname=o.join(\":\")):(_.hostname=o,_.port=\"\");break;case\"protocol\":_.protocol=o.toLowerCase(),_.slashes=!i;break;case\"pathname\":case\"hash\":if(o){var w=\"pathname\"===s?\"/\":\"#\";_[s]=o.charAt(0)!==w?w+o:o}else _[s]=o;break;case\"username\":case\"password\":_[s]=encodeURIComponent(o);break;case\"auth\":var x=o.indexOf(\":\");~x?(_.username=o.slice(0,x),_.username=encodeURIComponent(decodeURIComponent(_.username)),_.password=o.slice(x+1),_.password=encodeURIComponent(decodeURIComponent(_.password))):_.username=encodeURIComponent(decodeURIComponent(o))}for(var j=0;j<B.length;j++){var L=B[j];L[4]&&(_[L[1]]=_[L[1]].toLowerCase())}return _.auth=_.password?_.username+\":\"+_.password:_.username,_.origin=\"file:\"!==_.protocol&&isSpecial(_.protocol)&&_.host?_.protocol+\"//\"+_.host:\"null\",_.href=_.toString(),_},toString:function toString(s){s&&\"function\"==typeof s||(s=u.stringify);var o,i=this,a=i.host,_=i.protocol;_&&\":\"!==_.charAt(_.length-1)&&(_+=\":\");var w=_+(i.protocol&&i.slashes||isSpecial(i.protocol)?\"//\":\"\");return i.username?(w+=i.username,i.password&&(w+=\":\"+i.password),w+=\"@\"):i.password?(w+=\":\"+i.password,w+=\"@\"):\"file:\"!==i.protocol&&isSpecial(i.protocol)&&!a&&\"/\"!==i.pathname&&(w+=\"@\"),(\":\"===a[a.length-1]||C.test(i.hostname)&&!i.port)&&(a+=\":\"),w+=a+i.pathname,(o=\"object\"==typeof i.query?s(i.query):i.query)&&(w+=\"?\"!==o.charAt(0)?\"?\"+o:o),i.hash&&(w+=i.hash),w}},Url.extractProtocol=extractProtocol,Url.location=lolcation,Url.trimLeft=trimLeft,Url.qs=u,s.exports=Url},61448:(s,o,i)=>{var a=i(20426),u=i(49326);s.exports=function has(s,o){return null!=s&&u(s,o,a)}},61489:(s,o,i)=>{var a=i(17400);s.exports=function toInteger(s){var o=a(s),i=o%1;return o==o?i?o-i:o:0}},61626:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(74284),_=i(75817);s.exports=a?function(s,o,i){return u.f(s,o,_(1,i))}:function(s,o,i){return s[o]=i,s}},61747:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(92046);s.exports=function(s,o){var i=u[s+\"Prototype\"],_=i&&i[o];if(_)return _;var w=a[s],x=w&&w.prototype;return x&&x[o]}},61802:(s,o,i)=>{var a=i(62224),u=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,_=/\\\\(\\\\)?/g,w=a((function(s){var o=[];return 46===s.charCodeAt(0)&&o.push(\"\"),s.replace(u,(function(s,i,a,u){o.push(a?u.replace(_,\"$1\"):i||s)})),o}));s.exports=w},62006:(s,o,i)=>{var a=i(15389),u=i(64894),_=i(95950);s.exports=function createFind(s){return function(o,i,w){var x=Object(o);if(!u(o)){var C=a(i,3);o=_(o),i=function(s){return C(x[s],s,x)}}var j=s(o,i,w);return j>-1?x[C?o[j]:j]:void 0}}},62060:s=>{var o=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/;s.exports=function insertWrapDetails(s,i){var a=i.length;if(!a)return s;var u=a-1;return i[u]=(a>1?\"& \":\"\")+i[u],i=i.join(a>2?\", \":\" \"),s.replace(o,\"{\\n/* [wrapped with \"+i+\"] */\\n\")}},62193:(s,o,i)=>{var a=i(88984),u=i(5861),_=i(72428),w=i(56449),x=i(64894),C=i(3656),j=i(55527),L=i(37167),B=Object.prototype.hasOwnProperty;s.exports=function isEmpty(s){if(null==s)return!0;if(x(s)&&(w(s)||\"string\"==typeof s||\"function\"==typeof s.splice||C(s)||L(s)||_(s)))return!s.length;var o=u(s);if(\"[object Map]\"==o||\"[object Set]\"==o)return!s.size;if(j(s))return!a(s).length;for(var i in s)if(B.call(s,i))return!1;return!0}},62224:(s,o,i)=>{var a=i(50104);s.exports=function memoizeCapped(s){var o=a(s,(function(s){return 500===i.size&&i.clear(),s})),i=o.cache;return o}},62250:s=>{\"use strict\";var o=\"object\"==typeof document&&document.all;s.exports=void 0===o&&void 0!==o?function(s){return\"function\"==typeof s||s===o}:function(s){return\"function\"==typeof s}},62284:(s,o,i)=>{var a=i(84629),u=Object.prototype.hasOwnProperty;s.exports=function getFuncName(s){for(var o=s.name+\"\",i=a[o],_=u.call(a,o)?i.length:0;_--;){var w=i[_],x=w.func;if(null==x||x==s)return w.name}return o}},62416:(s,o,i)=>{\"use strict\";var a=i(85582);s.exports=a(\"document\",\"documentElement\")},62802:(s,o,i)=>{var a=s.exports=function SHA(s){s=s.toLowerCase();var o=a[s];if(!o)throw new Error(s+\" is not supported (we accept pull requests)\");return new o};a.sha=i(27816),a.sha1=i(63737),a.sha224=i(26710),a.sha256=i(24107),a.sha384=i(32827),a.sha512=i(82890)},63040:(s,o,i)=>{var a=i(21549),u=i(80079),_=i(68223);s.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new a,map:new(_||u),string:new a}}},63345:s=>{s.exports=function stubArray(){return[]}},63560:(s,o,i)=>{var a=i(73170);s.exports=function set(s,o,i){return null==s?s:a(s,o,i)}},63600:(s,o,i)=>{\"use strict\";s.exports=PassThrough;var a=i(74610);function PassThrough(s){if(!(this instanceof PassThrough))return new PassThrough(s);a.call(this,s)}i(56698)(PassThrough,a),PassThrough.prototype._transform=function(s,o,i){i(null,s)}},63605:s=>{s.exports=function stackGet(s){return this.__data__.get(s)}},63702:s=>{s.exports=function listCacheClear(){this.__data__=[],this.size=0}},63737:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1518500249,1859775393,-1894007588,-899497514],x=new Array(80);function Sha1(){this.init(),this._w=x,u.call(this,64,56)}function rotl5(s){return s<<5|s>>>27}function rotl30(s){return s<<30|s>>>2}function ft(s,o,i,a){return 0===s?o&i|~o&a:2===s?o&i|o&a|i&a:o^i^a}a(Sha1,u),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(s){for(var o,i=this._w,a=0|this._a,u=0|this._b,_=0|this._c,x=0|this._d,C=0|this._e,j=0;j<16;++j)i[j]=s.readInt32BE(4*j);for(;j<80;++j)i[j]=(o=i[j-3]^i[j-8]^i[j-14]^i[j-16])<<1|o>>>31;for(var L=0;L<80;++L){var B=~~(L/20),$=rotl5(a)+ft(B,u,_,x)+C+i[L]+w[B]|0;C=x,x=_,_=rotl30(u),u=a,a=$}this._a=a+this._a|0,this._b=u+this._b|0,this._c=_+this._c|0,this._d=x+this._d|0,this._e=C+this._e|0},Sha1.prototype._hash=function(){var s=_.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},s.exports=Sha1},63862:s=>{s.exports=function hashDelete(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}},63912:(s,o,i)=>{var a=i(61074),u=i(49698),_=i(42054);s.exports=function stringToArray(s){return u(s)?_(s):a(s)}},63950:s=>{s.exports=function noop(){}},64502:(s,o,i)=>{\"use strict\";i(82048)},64626:(s,o,i)=>{var a=i(66977);s.exports=function ary(s,o,i){return o=i?void 0:o,o=s&&null==o?s.length:o,a(s,128,void 0,void 0,void 0,void 0,o)}},64894:(s,o,i)=>{var a=i(1882),u=i(30294);s.exports=function isArrayLike(s){return null!=s&&u(s.length)&&!a(s)}},64932:(s,o,i)=>{\"use strict\";var a,u,_,w=i(40551),x=i(45951),C=i(46285),j=i(61626),L=i(49724),B=i(36128),$=i(92522),V=i(38530),U=\"Object already initialized\",z=x.TypeError,Y=x.WeakMap;if(w||B.state){var Z=B.state||(B.state=new Y);Z.get=Z.get,Z.has=Z.has,Z.set=Z.set,a=function(s,o){if(Z.has(s))throw new z(U);return o.facade=s,Z.set(s,o),o},u=function(s){return Z.get(s)||{}},_=function(s){return Z.has(s)}}else{var ee=$(\"state\");V[ee]=!0,a=function(s,o){if(L(s,ee))throw new z(U);return o.facade=s,j(s,ee,o),o},u=function(s){return L(s,ee)?s[ee]:{}},_=function(s){return L(s,ee)}}s.exports={set:a,get:u,has:_,enforce:function(s){return _(s)?u(s):a(s,{})},getterFor:function(s){return function(o){var i;if(!C(o)||(i=u(o)).type!==s)throw new z(\"Incompatible receiver, \"+s+\" required\");return i}}}},65291:(s,o,i)=>{\"use strict\";var a=i(86048).F.ERR_INVALID_OPT_VALUE;s.exports={getHighWaterMark:function getHighWaterMark(s,o,i,u){var _=function highWaterMarkFrom(s,o,i){return null!=s.highWaterMark?s.highWaterMark:o?s[i]:null}(o,u,i);if(null!=_){if(!isFinite(_)||Math.floor(_)!==_||_<0)throw new a(u?i:\"highWaterMark\",_);return Math.floor(_)}return s.objectMode?16:16384}}},65482:(s,o,i)=>{\"use strict\";var a=i(41176);s.exports=function(s){var o=+s;return o!=o||0===o?0:a(o)}},65606:s=>{var o,i,a=s.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(s){if(o===setTimeout)return setTimeout(s,0);if((o===defaultSetTimout||!o)&&setTimeout)return o=setTimeout,setTimeout(s,0);try{return o(s,0)}catch(i){try{return o.call(null,s,0)}catch(i){return o.call(this,s,0)}}}!function(){try{o=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(s){o=defaultSetTimout}try{i=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(s){i=defaultClearTimeout}}();var u,_=[],w=!1,x=-1;function cleanUpNextTick(){w&&u&&(w=!1,u.length?_=u.concat(_):x=-1,_.length&&drainQueue())}function drainQueue(){if(!w){var s=runTimeout(cleanUpNextTick);w=!0;for(var o=_.length;o;){for(u=_,_=[];++x<o;)u&&u[x].run();x=-1,o=_.length}u=null,w=!1,function runClearTimeout(s){if(i===clearTimeout)return clearTimeout(s);if((i===defaultClearTimeout||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(s);try{return i(s)}catch(o){try{return i.call(null,s)}catch(o){return i.call(this,s)}}}(s)}}function Item(s,o){this.fun=s,this.array=o}function noop(){}a.nextTick=function(s){var o=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)o[i-1]=arguments[i];_.push(new Item(s,o)),1!==_.length||w||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},a.title=\"browser\",a.browser=!0,a.env={},a.argv=[],a.version=\"\",a.versions={},a.on=noop,a.addListener=noop,a.once=noop,a.off=noop,a.removeListener=noop,a.removeAllListeners=noop,a.emit=noop,a.prependListener=noop,a.prependOnceListener=noop,a.listeners=function(s){return[]},a.binding=function(s){throw new Error(\"process.binding is not supported\")},a.cwd=function(){return\"/\"},a.chdir=function(s){throw new Error(\"process.chdir is not supported\")},a.umask=function(){return 0}},65772:s=>{s.exports=function json(s){const o={literal:\"true false null\"},i=[s.C_LINE_COMMENT_MODE,s.C_BLOCK_COMMENT_MODE],a=[s.QUOTE_STRING_MODE,s.C_NUMBER_MODE],u={end:\",\",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:o},_={begin:/\\{/,end:/\\}/,contains:[{className:\"attr\",begin:/\"/,end:/\"/,contains:[s.BACKSLASH_ESCAPE],illegal:\"\\\\n\"},s.inherit(u,{begin:/:/})].concat(i),illegal:\"\\\\S\"},w={begin:\"\\\\[\",end:\"\\\\]\",contains:[s.inherit(u)],illegal:\"\\\\S\"};return a.push(_,w),i.forEach((function(s){a.push(s)})),{name:\"JSON\",contains:a,keywords:o,illegal:\"\\\\S\"}}},66645:(s,o,i)=>{var a=i(1733),u=i(45434),_=i(13222),w=i(22225);s.exports=function words(s,o,i){return s=_(s),void 0===(o=i?void 0:o)?u(s)?w(s):a(s):s.match(o)||[]}},66721:(s,o,i)=>{var a=i(81042),u=Object.prototype.hasOwnProperty;s.exports=function hashGet(s){var o=this.__data__;if(a){var i=o[s];return\"__lodash_hash_undefined__\"===i?void 0:i}return u.call(o,s)?o[s]:void 0}},66977:(s,o,i)=>{var a=i(68882),u=i(11842),_=i(77078),w=i(37471),x=i(24168),C=i(37381),j=i(3209),L=i(54641),B=i(70981),$=i(61489),V=Math.max;s.exports=function createWrap(s,o,i,U,z,Y,Z,ee){var ie=2&o;if(!ie&&\"function\"!=typeof s)throw new TypeError(\"Expected a function\");var ae=U?U.length:0;if(ae||(o&=-97,U=z=void 0),Z=void 0===Z?Z:V($(Z),0),ee=void 0===ee?ee:$(ee),ae-=z?z.length:0,64&o){var ce=U,le=z;U=z=void 0}var pe=ie?void 0:C(s),de=[s,o,i,U,z,ce,le,Y,Z,ee];if(pe&&j(de,pe),s=de[0],o=de[1],i=de[2],U=de[3],z=de[4],!(ee=de[9]=void 0===de[9]?ie?0:s.length:V(de[9]-ae,0))&&24&o&&(o&=-25),o&&1!=o)fe=8==o||16==o?_(s,o,ee):32!=o&&33!=o||z.length?w.apply(void 0,de):x(s,o,i,U);else var fe=u(s,o,i);return B((pe?a:L)(fe,de),s,o)}},67197:s=>{s.exports=function matchesStrictComparable(s,o){return function(i){return null!=i&&(i[s]===o&&(void 0!==o||s in Object(i)))}}},67526:(s,o)=>{\"use strict\";o.byteLength=function byteLength(s){var o=getLens(s),i=o[0],a=o[1];return 3*(i+a)/4-a},o.toByteArray=function toByteArray(s){var o,i,_=getLens(s),w=_[0],x=_[1],C=new u(function _byteLength(s,o,i){return 3*(o+i)/4-i}(0,w,x)),j=0,L=x>0?w-4:w;for(i=0;i<L;i+=4)o=a[s.charCodeAt(i)]<<18|a[s.charCodeAt(i+1)]<<12|a[s.charCodeAt(i+2)]<<6|a[s.charCodeAt(i+3)],C[j++]=o>>16&255,C[j++]=o>>8&255,C[j++]=255&o;2===x&&(o=a[s.charCodeAt(i)]<<2|a[s.charCodeAt(i+1)]>>4,C[j++]=255&o);1===x&&(o=a[s.charCodeAt(i)]<<10|a[s.charCodeAt(i+1)]<<4|a[s.charCodeAt(i+2)]>>2,C[j++]=o>>8&255,C[j++]=255&o);return C},o.fromByteArray=function fromByteArray(s){for(var o,a=s.length,u=a%3,_=[],w=16383,x=0,C=a-u;x<C;x+=w)_.push(encodeChunk(s,x,x+w>C?C:x+w));1===u?(o=s[a-1],_.push(i[o>>2]+i[o<<4&63]+\"==\")):2===u&&(o=(s[a-2]<<8)+s[a-1],_.push(i[o>>10]+i[o>>4&63]+i[o<<2&63]+\"=\"));return _.join(\"\")};for(var i=[],a=[],u=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,_=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",w=0;w<64;++w)i[w]=_[w],a[_.charCodeAt(w)]=w;function getLens(s){var o=s.length;if(o%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var i=s.indexOf(\"=\");return-1===i&&(i=o),[i,i===o?0:4-i%4]}function encodeChunk(s,o,a){for(var u,_,w=[],x=o;x<a;x+=3)u=(s[x]<<16&16711680)+(s[x+1]<<8&65280)+(255&s[x+2]),w.push(i[(_=u)>>18&63]+i[_>>12&63]+i[_>>6&63]+i[63&_]);return w.join(\"\")}a[\"-\".charCodeAt(0)]=62,a[\"_\".charCodeAt(0)]=63},68055:(s,o,i)=>{\"use strict\";var a=i(61626);s.exports=function(s,o,i,u){return u&&u.enumerable?s[o]=i:a(s,o,i),s}},68090:s=>{s.exports=function last(s){var o=null==s?0:s.length;return o?s[o-1]:void 0}},68223:(s,o,i)=>{var a=i(56110)(i(9325),\"Map\");s.exports=a},68294:(s,o,i)=>{var a=i(23007),u=i(30361),_=Math.min;s.exports=function reorder(s,o){for(var i=s.length,w=_(o.length,i),x=a(s);w--;){var C=o[w];s[w]=u(C,i)?x[C]:void 0}return s}},68623:(s,o,i)=>{\"use strict\";var a=i(694);s.exports=a},68882:(s,o,i)=>{var a=i(83488),u=i(48152),_=u?function(s,o){return u.set(s,o),s}:a;s.exports=_},68969:(s,o,i)=>{var a=i(47422),u=i(25160);s.exports=function parent(s,o){return o.length<2?s:a(s,u(o,0,-1))}},69302:(s,o,i)=>{var a=i(83488),u=i(56757),_=i(32865);s.exports=function baseRest(s,o){return _(u(s,o,a),s+\"\")}},69884:(s,o,i)=>{var a=i(21791),u=i(37241);s.exports=function toPlainObject(s){return a(s,u(s))}},69982:(s,o,i)=>{\"use strict\";s.exports=i(29844)},70080:(s,o,i)=>{var a=i(26025),u=Array.prototype.splice;s.exports=function listCacheDelete(s){var o=this.__data__,i=a(o,s);return!(i<0)&&(i==o.length-1?o.pop():u.call(o,i,1),--this.size,!0)}},70470:(s,o,i)=>{\"use strict\";var a=i(46028),u=i(25594);s.exports=function(s){var o=a(s,\"string\");return u(o)?o:o+\"\"}},70695:(s,o,i)=>{var a=i(78096),u=i(72428),_=i(56449),w=i(3656),x=i(30361),C=i(37167),j=Object.prototype.hasOwnProperty;s.exports=function arrayLikeKeys(s,o){var i=_(s),L=!i&&u(s),B=!i&&!L&&w(s),$=!i&&!L&&!B&&C(s),V=i||L||B||$,U=V?a(s.length,String):[],z=U.length;for(var Y in s)!o&&!j.call(s,Y)||V&&(\"length\"==Y||B&&(\"offset\"==Y||\"parent\"==Y)||$&&(\"buffer\"==Y||\"byteLength\"==Y||\"byteOffset\"==Y)||x(Y,z))||U.push(Y);return U}},70981:(s,o,i)=>{var a=i(75251),u=i(62060),_=i(32865),w=i(75948);s.exports=function setWrapToString(s,o,i){var x=o+\"\";return _(s,u(x,w(a(x),i)))}},71167:(s,o,i)=>{const a=i(10316);s.exports=class StringElement extends a{constructor(s,o,i){super(s,o,i),this.element=\"string\"}primitive(){return\"string\"}get length(){return this.content.length}}},71340:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(29538);a({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==u},{assign:u})},71961:(s,o,i)=>{var a=i(49653);s.exports=function cloneTypedArray(s,o){var i=o?a(s.buffer):s.buffer;return new s.constructor(i,s.byteOffset,s.length)}},72428:(s,o,i)=>{var a=i(27534),u=i(40346),_=Object.prototype,w=_.hasOwnProperty,x=_.propertyIsEnumerable,C=a(function(){return arguments}())?a:function(s){return u(s)&&w.call(s,\"callee\")&&!x.call(s,\"callee\")};s.exports=C},72552:(s,o,i)=>{var a=i(51873),u=i(659),_=i(59350),w=a?a.toStringTag:void 0;s.exports=function baseGetTag(s){return null==s?void 0===s?\"[object Undefined]\":\"[object Null]\":w&&w in Object(s)?u(s):_(s)}},72903:(s,o,i)=>{var a=i(23805),u=i(55527),_=i(90181),w=Object.prototype.hasOwnProperty;s.exports=function baseKeysIn(s){if(!a(s))return _(s);var o=u(s),i=[];for(var x in s)(\"constructor\"!=x||!o&&w.call(s,x))&&i.push(x);return i}},72949:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheSet(s,o){var i=a(this,s),u=i.size;return i.set(s,o),this.size+=i.size==u?0:1,this}},73170:(s,o,i)=>{var a=i(16547),u=i(31769),_=i(30361),w=i(23805),x=i(77797);s.exports=function baseSet(s,o,i,C){if(!w(s))return s;for(var j=-1,L=(o=u(o,s)).length,B=L-1,$=s;null!=$&&++j<L;){var V=x(o[j]),U=i;if(\"__proto__\"===V||\"constructor\"===V||\"prototype\"===V)return s;if(j!=B){var z=$[V];void 0===(U=C?C(z,V,$):void 0)&&(U=w(z)?z:_(o[j+1])?[]:{})}a($,V,U),$=$[V]}return s}},73201:s=>{var o=/\\w*$/;s.exports=function cloneRegExp(s){var i=new s.constructor(s.source,o.exec(s));return i.lastIndex=s.lastIndex,i}},73402:s=>{function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function http(s){const o=\"HTTP/(2|1\\\\.[01])\",i={className:\"attribute\",begin:concat(\"^\",/[A-Za-z][A-Za-z0-9-]*/,\"(?=\\\\:\\\\s)\"),starts:{contains:[{className:\"punctuation\",begin:/: /,relevance:0,starts:{end:\"$\",relevance:0}}]}},a=[i,{begin:\"\\\\n\\\\n\",starts:{subLanguage:[],endsWithParent:!0}}];return{name:\"HTTP\",aliases:[\"https\"],illegal:/\\S/,contains:[{begin:\"^(?=\"+o+\" \\\\d{3})\",end:/$/,contains:[{className:\"meta\",begin:o},{className:\"number\",begin:\"\\\\b\\\\d{3}\\\\b\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:a}},{begin:\"(?=^[A-Z]+ (.*?) \"+o+\"$)\",end:/$/,contains:[{className:\"string\",begin:\" \",end:\" \",excludeBegin:!0,excludeEnd:!0},{className:\"meta\",begin:o},{className:\"keyword\",begin:\"[A-Z]+\"}],starts:{end:/\\b\\B/,illegal:/\\S/,contains:a}},s.inherit(i,{relevance:0})]}}},73424:(s,o,i)=>{var a=i(16962),u=i(2874),_=Array.prototype.push;function baseAry(s,o){return 2==o?function(o,i){return s(o,i)}:function(o){return s(o)}}function cloneArray(s){for(var o=s?s.length:0,i=Array(o);o--;)i[o]=s[o];return i}function wrapImmutable(s,o){return function(){var i=arguments.length;if(i){for(var a=Array(i);i--;)a[i]=arguments[i];var u=a[0]=o.apply(void 0,a);return s.apply(void 0,a),u}}}s.exports=function baseConvert(s,o,i,w){var x=\"function\"==typeof o,C=o===Object(o);if(C&&(w=i,i=o,o=void 0),null==i)throw new TypeError;w||(w={});var j=!(\"cap\"in w)||w.cap,L=!(\"curry\"in w)||w.curry,B=!(\"fixed\"in w)||w.fixed,$=!(\"immutable\"in w)||w.immutable,V=!(\"rearg\"in w)||w.rearg,U=x?i:u,z=\"curry\"in w&&w.curry,Y=\"fixed\"in w&&w.fixed,Z=\"rearg\"in w&&w.rearg,ee=x?i.runInContext():void 0,ie=x?i:{ary:s.ary,assign:s.assign,clone:s.clone,curry:s.curry,forEach:s.forEach,isArray:s.isArray,isError:s.isError,isFunction:s.isFunction,isWeakMap:s.isWeakMap,iteratee:s.iteratee,keys:s.keys,rearg:s.rearg,toInteger:s.toInteger,toPath:s.toPath},ae=ie.ary,ce=ie.assign,le=ie.clone,pe=ie.curry,de=ie.forEach,fe=ie.isArray,ye=ie.isError,be=ie.isFunction,_e=ie.isWeakMap,Se=ie.keys,we=ie.rearg,xe=ie.toInteger,Pe=ie.toPath,Te=Se(a.aryMethod),Re={castArray:function(s){return function(){var o=arguments[0];return fe(o)?s(cloneArray(o)):s.apply(void 0,arguments)}},iteratee:function(s){return function(){var o=arguments[1],i=s(arguments[0],o),a=i.length;return j&&\"number\"==typeof o?(o=o>2?o-2:1,a&&a<=o?i:baseAry(i,o)):i}},mixin:function(s){return function(o){var i=this;if(!be(i))return s(i,Object(o));var a=[];return de(Se(o),(function(s){be(o[s])&&a.push([s,i.prototype[s]])})),s(i,Object(o)),de(a,(function(s){var o=s[1];be(o)?i.prototype[s[0]]=o:delete i.prototype[s[0]]})),i}},nthArg:function(s){return function(o){var i=o<0?1:xe(o)+1;return pe(s(o),i)}},rearg:function(s){return function(o,i){var a=i?i.length:0;return pe(s(o,i),a)}},runInContext:function(o){return function(i){return baseConvert(s,o(i),w)}}};function castCap(s,o){if(j){var i=a.iterateeRearg[s];if(i)return function iterateeRearg(s,o){return overArg(s,(function(s){var i=o.length;return function baseArity(s,o){return 2==o?function(o,i){return s.apply(void 0,arguments)}:function(o){return s.apply(void 0,arguments)}}(we(baseAry(s,i),o),i)}))}(o,i);var u=!x&&a.iterateeAry[s];if(u)return function iterateeAry(s,o){return overArg(s,(function(s){return\"function\"==typeof s?baseAry(s,o):s}))}(o,u)}return o}function castFixed(s,o,i){if(B&&(Y||!a.skipFixed[s])){var u=a.methodSpread[s],w=u&&u.start;return void 0===w?ae(o,i):function flatSpread(s,o){return function(){for(var i=arguments.length,a=i-1,u=Array(i);i--;)u[i]=arguments[i];var w=u[o],x=u.slice(0,o);return w&&_.apply(x,w),o!=a&&_.apply(x,u.slice(o+1)),s.apply(this,x)}}(o,w)}return o}function castRearg(s,o,i){return V&&i>1&&(Z||!a.skipRearg[s])?we(o,a.methodRearg[s]||a.aryRearg[i]):o}function cloneByPath(s,o){for(var i=-1,a=(o=Pe(o)).length,u=a-1,_=le(Object(s)),w=_;null!=w&&++i<a;){var x=o[i],C=w[x];null==C||be(C)||ye(C)||_e(C)||(w[x]=le(i==u?C:Object(C))),w=w[x]}return _}function createConverter(s,o){var i=a.aliasToReal[s]||s,u=a.remap[i]||i,_=w;return function(s){var a=x?ee:ie,w=x?ee[u]:o,C=ce(ce({},_),s);return baseConvert(a,i,w,C)}}function overArg(s,o){return function(){var i=arguments.length;if(!i)return s();for(var a=Array(i);i--;)a[i]=arguments[i];var u=V?0:i-1;return a[u]=o(a[u]),s.apply(void 0,a)}}function wrap(s,o,i){var u,_=a.aliasToReal[s]||s,w=o,x=Re[_];return x?w=x(o):$&&(a.mutate.array[_]?w=wrapImmutable(o,cloneArray):a.mutate.object[_]?w=wrapImmutable(o,function createCloner(s){return function(o){return s({},o)}}(o)):a.mutate.set[_]&&(w=wrapImmutable(o,cloneByPath))),de(Te,(function(s){return de(a.aryMethod[s],(function(o){if(_==o){var i=a.methodSpread[_],x=i&&i.afterRearg;return u=x?castFixed(_,castRearg(_,w,s),s):castRearg(_,castFixed(_,w,s),s),u=function castCurry(s,o,i){return z||L&&i>1?pe(o,i):o}(0,u=castCap(_,u),s),!1}})),!u})),u||(u=w),u==o&&(u=z?pe(u,1):function(){return o.apply(this,arguments)}),u.convert=createConverter(_,o),u.placeholder=o.placeholder=i,u}if(!C)return wrap(o,i,U);var $e=i,qe=[];return de(Te,(function(s){de(a.aryMethod[s],(function(s){var o=$e[a.remap[s]||s];o&&qe.push([s,wrap(s,o,$e)])}))})),de(Se($e),(function(s){var o=$e[s];if(\"function\"==typeof o){for(var i=qe.length;i--;)if(qe[i][0]==s)return;o.convert=createConverter(s,o),qe.push([s,o])}})),de(qe,(function(s){$e[s[0]]=s[1]})),$e.convert=function convertLib(s){return $e.runInContext.convert(s)(void 0)},$e.placeholder=$e,de(Se($e),(function(s){de(a.realToAlias[s]||[],(function(o){$e[o]=$e[s]}))})),$e}},73448:(s,o,i)=>{\"use strict\";var a=i(73948),u=i(29367),_=i(87136),w=i(93742),x=i(76264)(\"iterator\");s.exports=function(s){if(!_(s))return u(s,x)||u(s,\"@@iterator\")||w[a(s)]}},73648:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(98828),_=i(49552);s.exports=!a&&!u((function(){return 7!==Object.defineProperty(_(\"div\"),\"a\",{get:function(){return 7}}).a}))},73948:(s,o,i)=>{\"use strict\";var a=i(52623),u=i(62250),_=i(45807),w=i(76264)(\"toStringTag\"),x=Object,C=\"Arguments\"===_(function(){return arguments}());s.exports=a?_:function(s){var o,i,a;return void 0===s?\"Undefined\":null===s?\"Null\":\"string\"==typeof(i=function(s,o){try{return s[o]}catch(s){}}(o=x(s),w))?i:C?_(o):\"Object\"===(a=_(o))&&u(o.callee)?\"Arguments\":a}},73992:(s,o)=>{\"use strict\";var i=Object.prototype.hasOwnProperty;function decode(s){try{return decodeURIComponent(s.replace(/\\+/g,\" \"))}catch(s){return null}}function encode(s){try{return encodeURIComponent(s)}catch(s){return null}}o.stringify=function querystringify(s,o){o=o||\"\";var a,u,_=[];for(u in\"string\"!=typeof o&&(o=\"?\"),s)if(i.call(s,u)){if((a=s[u])||null!=a&&!isNaN(a)||(a=\"\"),u=encode(u),a=encode(a),null===u||null===a)continue;_.push(u+\"=\"+a)}return _.length?o+_.join(\"&\"):\"\"},o.parse=function querystring(s){for(var o,i=/([^=?#&]+)=?([^&]*)/g,a={};o=i.exec(s);){var u=decode(o[1]),_=decode(o[2]);null===u||null===_||u in a||(a[u]=_)}return a}},74218:s=>{s.exports=function isKeyable(s){var o=typeof s;return\"string\"==o||\"number\"==o||\"symbol\"==o||\"boolean\"==o?\"__proto__\"!==s:null===s}},74239:(s,o,i)=>{\"use strict\";var a=i(87136),u=TypeError;s.exports=function(s){if(a(s))throw new u(\"Can't call method on \"+s);return s}},74284:(s,o,i)=>{\"use strict\";var a=i(39447),u=i(73648),_=i(58661),w=i(36624),x=i(70470),C=TypeError,j=Object.defineProperty,L=Object.getOwnPropertyDescriptor,B=\"enumerable\",$=\"configurable\",V=\"writable\";o.f=a?_?function defineProperty(s,o,i){if(w(s),o=x(o),w(i),\"function\"==typeof s&&\"prototype\"===o&&\"value\"in i&&V in i&&!i[V]){var a=L(s,o);a&&a[V]&&(s[o]=i.value,i={configurable:$ in i?i[$]:a[$],enumerable:B in i?i[B]:a[B],writable:!1})}return j(s,o,i)}:j:function defineProperty(s,o,i){if(w(s),o=x(o),w(i),u)try{return j(s,o,i)}catch(s){}if(\"get\"in i||\"set\"in i)throw new C(\"Accessors not supported\");return\"value\"in i&&(s[o]=i.value),s}},74335:s=>{s.exports=function overArg(s,o){return function(i){return s(o(i))}}},74436:(s,o,i)=>{\"use strict\";var a=i(4993),u=i(34849),_=i(20575),createMethod=function(s){return function(o,i,w){var x=a(o),C=_(x);if(0===C)return!s&&-1;var j,L=u(w,C);if(s&&i!=i){for(;C>L;)if((j=x[L++])!=j)return!0}else for(;C>L;L++)if((s||L in x)&&x[L]===i)return s||L||0;return!s&&-1}};s.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},74610:(s,o,i)=>{\"use strict\";s.exports=Transform;var a=i(86048).F,u=a.ERR_METHOD_NOT_IMPLEMENTED,_=a.ERR_MULTIPLE_CALLBACK,w=a.ERR_TRANSFORM_ALREADY_TRANSFORMING,x=a.ERR_TRANSFORM_WITH_LENGTH_0,C=i(25382);function afterTransform(s,o){var i=this._transformState;i.transforming=!1;var a=i.writecb;if(null===a)return this.emit(\"error\",new _);i.writechunk=null,i.writecb=null,null!=o&&this.push(o),a(s);var u=this._readableState;u.reading=!1,(u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}function Transform(s){if(!(this instanceof Transform))return new Transform(s);C.call(this,s),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,s&&(\"function\"==typeof s.transform&&(this._transform=s.transform),\"function\"==typeof s.flush&&(this._flush=s.flush)),this.on(\"prefinish\",prefinish)}function prefinish(){var s=this;\"function\"!=typeof this._flush||this._readableState.destroyed?done(this,null,null):this._flush((function(o,i){done(s,o,i)}))}function done(s,o,i){if(o)return s.emit(\"error\",o);if(null!=i&&s.push(i),s._writableState.length)throw new x;if(s._transformState.transforming)throw new w;return s.push(null)}i(56698)(Transform,C),Transform.prototype.push=function(s,o){return this._transformState.needTransform=!1,C.prototype.push.call(this,s,o)},Transform.prototype._transform=function(s,o,i){i(new u(\"_transform()\"))},Transform.prototype._write=function(s,o,i){var a=this._transformState;if(a.writecb=i,a.writechunk=s,a.writeencoding=o,!a.transforming){var u=this._readableState;(a.needTransform||u.needReadable||u.length<u.highWaterMark)&&this._read(u.highWaterMark)}},Transform.prototype._read=function(s){var o=this._transformState;null===o.writechunk||o.transforming?o.needTransform=!0:(o.transforming=!0,this._transform(o.writechunk,o.writeencoding,o.afterTransform))},Transform.prototype._destroy=function(s,o){C.prototype._destroy.call(this,s,(function(s){o(s)}))}},74733:(s,o,i)=>{var a=i(21791),u=i(95950);s.exports=function baseAssign(s,o){return s&&a(o,u(o),s)}},75147:(s,o,i)=>{const a=i(85105);s.exports=class JSON06Serialiser extends a{serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);let o;s._attributes&&s.attributes.get(\"variable\")&&(o=s.attributes.get(\"variable\"));const i={element:s.element};s._meta&&s._meta.length>0&&(i.meta=this.serialiseObject(s.meta));const a=\"enum\"===s.element||-1!==s.attributes.keys().indexOf(\"enumerations\");if(a){const o=this.enumSerialiseAttributes(s);o&&(i.attributes=o)}else if(s._attributes&&s._attributes.length>0){let{attributes:a}=s;a.get(\"metadata\")&&(a=a.clone(),a.set(\"meta\",a.get(\"metadata\")),a.remove(\"metadata\")),\"member\"===s.element&&o&&(a=a.clone(),a.remove(\"variable\")),a.length>0&&(i.attributes=this.serialiseObject(a))}if(a)i.content=this.enumSerialiseContent(s,i);else if(this[`${s.element}SerialiseContent`])i.content=this[`${s.element}SerialiseContent`](s,i);else if(void 0!==s.content){let a;o&&s.content.key?(a=s.content.clone(),a.key.attributes.set(\"variable\",o),a=this.serialiseContent(a)):a=this.serialiseContent(s.content),this.shouldSerialiseContent(s,a)&&(i.content=a)}else this.shouldSerialiseContent(s,s.content)&&s instanceof this.namespace.elements.Array&&(i.content=[]);return i}shouldSerialiseContent(s,o){return\"parseResult\"===s.element||\"httpRequest\"===s.element||\"httpResponse\"===s.element||\"category\"===s.element||\"link\"===s.element||void 0!==o&&(!Array.isArray(o)||0!==o.length)}refSerialiseContent(s,o){return delete o.attributes,{href:s.toValue(),path:s.path.toValue()}}sourceMapSerialiseContent(s){return s.toValue()}dataStructureSerialiseContent(s){return[this.serialiseContent(s.content)]}enumSerialiseAttributes(s){const o=s.attributes.clone(),i=o.remove(\"enumerations\")||new this.namespace.elements.Array([]),a=o.get(\"default\");let u=o.get(\"samples\")||new this.namespace.elements.Array([]);if(a&&a.content&&(a.content.attributes&&a.content.attributes.remove(\"typeAttributes\"),o.set(\"default\",new this.namespace.elements.Array([a.content]))),u.forEach((s=>{s.content&&s.content.element&&s.content.attributes.remove(\"typeAttributes\")})),s.content&&0!==i.length&&u.unshift(s.content),u=u.map((s=>s instanceof this.namespace.elements.Array?[s]:new this.namespace.elements.Array([s.content]))),u.length&&o.set(\"samples\",u),o.length>0)return this.serialiseObject(o)}enumSerialiseContent(s){if(s._attributes){const o=s.attributes.get(\"enumerations\");if(o&&o.length>0)return o.content.map((s=>{const o=s.clone();return o.attributes.remove(\"typeAttributes\"),this.serialise(o)}))}if(s.content){const o=s.content.clone();return o.attributes.remove(\"typeAttributes\"),[this.serialise(o)]}return[]}deserialise(s){if(\"string\"==typeof s)return new this.namespace.elements.String(s);if(\"number\"==typeof s)return new this.namespace.elements.Number(s);if(\"boolean\"==typeof s)return new this.namespace.elements.Boolean(s);if(null===s)return new this.namespace.elements.Null;if(Array.isArray(s))return new this.namespace.elements.Array(s.map(this.deserialise,this));const o=this.namespace.getElementClass(s.element),i=new o;i.element!==s.element&&(i.element=s.element),s.meta&&this.deserialiseObject(s.meta,i.meta),s.attributes&&this.deserialiseObject(s.attributes,i.attributes);const a=this.deserialiseContent(s.content);if(void 0===a&&null!==i.content||(i.content=a),\"enum\"===i.element){i.content&&i.attributes.set(\"enumerations\",i.content);let s=i.attributes.get(\"samples\");if(i.attributes.remove(\"samples\"),s){const a=s;s=new this.namespace.elements.Array,a.forEach((a=>{a.forEach((a=>{const u=new o(a);u.element=i.element,s.push(u)}))}));const u=s.shift();i.content=u?u.content:void 0,i.attributes.set(\"samples\",s)}else i.content=void 0;let a=i.attributes.get(\"default\");if(a&&a.length>0){a=a.get(0);const s=new o(a);s.element=i.element,i.attributes.set(\"default\",s)}}else if(\"dataStructure\"===i.element&&Array.isArray(i.content))[i.content]=i.content;else if(\"category\"===i.element){const s=i.attributes.get(\"meta\");s&&(i.attributes.set(\"metadata\",s),i.attributes.remove(\"meta\"))}else\"member\"===i.element&&i.key&&i.key._attributes&&i.key._attributes.getValue(\"variable\")&&(i.attributes.set(\"variable\",i.key.attributes.get(\"variable\")),i.key.attributes.remove(\"variable\"));return i}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const o={key:this.serialise(s.key)};return s.value&&(o.value=this.serialise(s.value)),o}return s&&s.map?s.map(this.serialise,this):s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const o=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(o.value=this.deserialise(s.value)),o}if(s.map)return s.map(this.deserialise,this)}return s}shouldRefract(s){return!!(s._attributes&&s.attributes.keys().length||s._meta&&s.meta.keys().length)||\"enum\"!==s.element&&(s.element!==s.primitive()||\"member\"===s.element)}convertKeyToRefract(s,o){return this.shouldRefract(o)?this.serialise(o):\"enum\"===o.element?this.serialiseEnum(o):\"array\"===o.element?o.map((o=>this.shouldRefract(o)||\"default\"===s?this.serialise(o):\"array\"===o.element||\"object\"===o.element||\"enum\"===o.element?o.children.map((s=>this.serialise(s))):o.toValue())):\"object\"===o.element?(o.content||[]).map(this.serialise,this):o.toValue()}serialiseEnum(s){return s.children.map((s=>this.serialise(s)))}serialiseObject(s){const o={};return s.forEach(((s,i)=>{if(s){const a=i.toValue();o[a]=this.convertKeyToRefract(a,s)}})),o}deserialiseObject(s,o){Object.keys(s).forEach((i=>{o.set(i,this.deserialise(s[i]))}))}}},75208:s=>{\"use strict\";var o,i=\"\";s.exports=function repeat(s,a){if(\"string\"!=typeof s)throw new TypeError(\"expected a string\");if(1===a)return s;if(2===a)return s+s;var u=s.length*a;if(o!==s||void 0===o)o=s,i=\"\";else if(i.length>=u)return i.substr(0,u);for(;u>i.length&&a>1;)1&a&&(i+=s),a>>=1,s+=s;return i=(i+=s).substr(0,u)}},75251:s=>{var o=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,i=/,? & /;s.exports=function getWrapDetails(s){var a=s.match(o);return a?a[1].split(i):[]}},75288:s=>{s.exports=function eq(s,o){return s===o||s!=s&&o!=o}},75817:s=>{\"use strict\";s.exports=function(s,o){return{enumerable:!(1&s),configurable:!(2&s),writable:!(4&s),value:o}}},75896:(s,o,i)=>{\"use strict\";var a=i(65606);function emitErrorAndCloseNT(s,o){emitErrorNT(s,o),emitCloseNT(s)}function emitCloseNT(s){s._writableState&&!s._writableState.emitClose||s._readableState&&!s._readableState.emitClose||s.emit(\"close\")}function emitErrorNT(s,o){s.emit(\"error\",o)}s.exports={destroy:function destroy(s,o){var i=this,u=this._readableState&&this._readableState.destroyed,_=this._writableState&&this._writableState.destroyed;return u||_?(o?o(s):s&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(emitErrorNT,this,s)):a.nextTick(emitErrorNT,this,s)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(s||null,(function(s){!o&&s?i._writableState?i._writableState.errorEmitted?a.nextTick(emitCloseNT,i):(i._writableState.errorEmitted=!0,a.nextTick(emitErrorAndCloseNT,i,s)):a.nextTick(emitErrorAndCloseNT,i,s):o?(a.nextTick(emitCloseNT,i),o(s)):a.nextTick(emitCloseNT,i)})),this)},undestroy:function undestroy(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function errorOrDestroy(s,o){var i=s._readableState,a=s._writableState;i&&i.autoDestroy||a&&a.autoDestroy?s.destroy(o):s.emit(\"error\",o)}}},75948:(s,o,i)=>{var a=i(83729),u=i(15325),_=[[\"ary\",128],[\"bind\",1],[\"bindKey\",2],[\"curry\",8],[\"curryRight\",16],[\"flip\",512],[\"partial\",32],[\"partialRight\",64],[\"rearg\",256]];s.exports=function updateWrapDetails(s,o){return a(_,(function(i){var a=\"_.\"+i[0];o&i[1]&&!u(s,a)&&s.push(a)})),s.sort()}},76024:(s,o,i)=>{\"use strict\";var a=i(41505),u=Function.prototype,_=u.apply,w=u.call;s.exports=\"object\"==typeof Reflect&&Reflect.apply||(a?w.bind(_):function(){return w.apply(_,arguments)})},76169:(s,o,i)=>{var a=i(49653);s.exports=function cloneDataView(s,o){var i=o?a(s.buffer):s.buffer;return new s.constructor(i,s.byteOffset,s.byteLength)}},76189:s=>{var o=Object.prototype.hasOwnProperty;s.exports=function initCloneArray(s){var i=s.length,a=new s.constructor(i);return i&&\"string\"==typeof s[0]&&o.call(s,\"index\")&&(a.index=s.index,a.input=s.input),a}},76264:(s,o,i)=>{\"use strict\";var a=i(45951),u=i(85816),_=i(49724),w=i(6499),x=i(19846),C=i(51175),j=a.Symbol,L=u(\"wks\"),B=C?j.for||j:j&&j.withoutSetter||w;s.exports=function(s){return _(L,s)||(L[s]=x&&_(j,s)?j[s]:B(\"Symbol.\"+s)),L[s]}},76545:(s,o,i)=>{var a=i(56110)(i(9325),\"Set\");s.exports=a},76959:s=>{s.exports=function strictIndexOf(s,o,i){for(var a=i-1,u=s.length;++a<u;)if(s[a]===o)return a;return-1}},77078:(s,o,i)=>{var a=i(91033),u=i(82819),_=i(37471),w=i(18073),x=i(11287),C=i(36306),j=i(9325);s.exports=function createCurry(s,o,i){var L=u(s);return function wrapper(){for(var u=arguments.length,B=Array(u),$=u,V=x(wrapper);$--;)B[$]=arguments[$];var U=u<3&&B[0]!==V&&B[u-1]!==V?[]:C(B,V);return(u-=U.length)<i?w(s,o,_,wrapper.placeholder,void 0,B,U,void 0,void 0,i-u):a(this&&this!==j&&this instanceof wrapper?L:s,this,B)}}},77199:(s,o,i)=>{var a=i(49653),u=i(76169),_=i(73201),w=i(93736),x=i(71961);s.exports=function initCloneByTag(s,o,i){var C=s.constructor;switch(o){case\"[object ArrayBuffer]\":return a(s);case\"[object Boolean]\":case\"[object Date]\":return new C(+s);case\"[object DataView]\":return u(s,i);case\"[object Float32Array]\":case\"[object Float64Array]\":case\"[object Int8Array]\":case\"[object Int16Array]\":case\"[object Int32Array]\":case\"[object Uint8Array]\":case\"[object Uint8ClampedArray]\":case\"[object Uint16Array]\":case\"[object Uint32Array]\":return x(s,i);case\"[object Map]\":case\"[object Set]\":return new C;case\"[object Number]\":case\"[object String]\":return new C(s);case\"[object RegExp]\":return _(s);case\"[object Symbol]\":return w(s)}}},77556:(s,o,i)=>{var a=i(51873),u=i(34932),_=i(56449),w=i(44394),x=a?a.prototype:void 0,C=x?x.toString:void 0;s.exports=function baseToString(s){if(\"string\"==typeof s)return s;if(_(s))return u(s,baseToString)+\"\";if(w(s))return C?C.call(s):\"\";var o=s+\"\";return\"0\"==o&&1/s==-1/0?\"-0\":o}},77731:(s,o,i)=>{var a=i(79920)(\"set\",i(63560));a.placeholder=i(2874),s.exports=a},77797:(s,o,i)=>{var a=i(44394);s.exports=function toKey(s){if(\"string\"==typeof s||a(s))return s;var o=s+\"\";return\"0\"==o&&1/s==-1/0?\"-0\":o}},78004:s=>{\"use strict\";class SubRange{constructor(s,o){this.low=s,this.high=o,this.length=1+o-s}overlaps(s){return!(this.high<s.low||this.low>s.high)}touches(s){return!(this.high+1<s.low||this.low-1>s.high)}add(s){return new SubRange(Math.min(this.low,s.low),Math.max(this.high,s.high))}subtract(s){return s.low<=this.low&&s.high>=this.high?[]:s.low>this.low&&s.high<this.high?[new SubRange(this.low,s.low-1),new SubRange(s.high+1,this.high)]:s.low<=this.low?[new SubRange(s.high+1,this.high)]:[new SubRange(this.low,s.low-1)]}toString(){return this.low==this.high?this.low.toString():this.low+\"-\"+this.high}}class DRange{constructor(s,o){this.ranges=[],this.length=0,null!=s&&this.add(s,o)}_update_length(){this.length=this.ranges.reduce(((s,o)=>s+o.length),0)}add(s,o){var _add=s=>{for(var o=0;o<this.ranges.length&&!s.touches(this.ranges[o]);)o++;for(var i=this.ranges.slice(0,o);o<this.ranges.length&&s.touches(this.ranges[o]);)s=s.add(this.ranges[o]),o++;i.push(s),this.ranges=i.concat(this.ranges.slice(o)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_add):(null==o&&(o=s),_add(new SubRange(s,o))),this}subtract(s,o){var _subtract=s=>{for(var o=0;o<this.ranges.length&&!s.overlaps(this.ranges[o]);)o++;for(var i=this.ranges.slice(0,o);o<this.ranges.length&&s.overlaps(this.ranges[o]);)i=i.concat(this.ranges[o].subtract(s)),o++;this.ranges=i.concat(this.ranges.slice(o)),this._update_length()};return s instanceof DRange?s.ranges.forEach(_subtract):(null==o&&(o=s),_subtract(new SubRange(s,o))),this}intersect(s,o){var i=[],_intersect=s=>{for(var o=0;o<this.ranges.length&&!s.overlaps(this.ranges[o]);)o++;for(;o<this.ranges.length&&s.overlaps(this.ranges[o]);){var a=Math.max(this.ranges[o].low,s.low),u=Math.min(this.ranges[o].high,s.high);i.push(new SubRange(a,u)),o++}};return s instanceof DRange?s.ranges.forEach(_intersect):(null==o&&(o=s),_intersect(new SubRange(s,o))),this.ranges=i,this._update_length(),this}index(s){for(var o=0;o<this.ranges.length&&this.ranges[o].length<=s;)s-=this.ranges[o].length,o++;return this.ranges[o].low+s}toString(){return\"[ \"+this.ranges.join(\", \")+\" ]\"}clone(){return new DRange(this)}numbers(){return this.ranges.reduce(((s,o)=>{for(var i=o.low;i<=o.high;)s.push(i),i++;return s}),[])}subranges(){return this.ranges.map((s=>({low:s.low,high:s.high,length:1+s.high-s.low})))}}s.exports=DRange},78096:s=>{s.exports=function baseTimes(s,o){for(var i=-1,a=Array(s);++i<s;)a[i]=o(i);return a}},78418:(s,o,i)=>{\"use strict\";i(85160)},79192:(s,o,i)=>{\"use strict\";var a=i(51871),u=i(46285),_=i(74239),w=i(10043);s.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var s,o=!1,i={};try{(s=a(Object.prototype,\"__proto__\",\"set\"))(i,[]),o=i instanceof Array}catch(s){}return function setPrototypeOf(i,a){return _(i),w(a),u(i)?(o?s(i,a):i.__proto__=a,i):i}}():void 0)},79307:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(44673);a({target:\"Function\",proto:!0,forced:Function.bind!==u},{bind:u})},79770:s=>{s.exports=function arrayFilter(s,o){for(var i=-1,a=null==s?0:s.length,u=0,_=[];++i<a;){var w=s[i];o(w,i,s)&&(_[u++]=w)}return _}},79838:()=>{},79920:(s,o,i)=>{var a=i(73424),u=i(47934);s.exports=function convert(s,o,i){return a(u,s,o,i)}},80079:(s,o,i)=>{var a=i(63702),u=i(70080),_=i(24739),w=i(48655),x=i(31175);function ListCache(s){var o=-1,i=null==s?0:s.length;for(this.clear();++o<i;){var a=s[o];this.set(a[0],a[1])}}ListCache.prototype.clear=a,ListCache.prototype.delete=u,ListCache.prototype.get=_,ListCache.prototype.has=w,ListCache.prototype.set=x,s.exports=ListCache},80218:(s,o,i)=>{var a=i(13222);s.exports=function toLower(s){return a(s).toLowerCase()}},80257:(s,o,i)=>{var a=i(30980),u=i(56017),_=i(23007);s.exports=function wrapperClone(s){if(s instanceof a)return s.clone();var o=new u(s.__wrapped__,s.__chain__);return o.__actions__=_(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}},80345:(s,o,i)=>{\"use strict\";function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}function _defineProperty(s,o,i){return(o=_toPropertyKey(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,_toPropertyKey(a.key),a)}}function _toPropertyKey(s){var o=function _toPrimitive(s,o){if(\"object\"!=typeof s||null===s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||\"default\");if(\"object\"!=typeof a)return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===o?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof o?o:String(o)}var a=i(48287).Buffer,u=i(15340).inspect,_=u&&u.custom||\"inspect\";s.exports=function(){function BufferList(){!function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,BufferList),this.head=null,this.tail=null,this.length=0}return function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(BufferList,[{key:\"push\",value:function push(s){var o={data:s,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:\"unshift\",value:function unshift(s){var o={data:s,next:this.head};0===this.length&&(this.tail=o),this.head=o,++this.length}},{key:\"shift\",value:function shift(){if(0!==this.length){var s=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,s}}},{key:\"clear\",value:function clear(){this.head=this.tail=null,this.length=0}},{key:\"join\",value:function join(s){if(0===this.length)return\"\";for(var o=this.head,i=\"\"+o.data;o=o.next;)i+=s+o.data;return i}},{key:\"concat\",value:function concat(s){if(0===this.length)return a.alloc(0);for(var o,i,u,_=a.allocUnsafe(s>>>0),w=this.head,x=0;w;)o=w.data,i=_,u=x,a.prototype.copy.call(o,i,u),x+=w.data.length,w=w.next;return _}},{key:\"consume\",value:function consume(s,o){var i;return s<this.head.data.length?(i=this.head.data.slice(0,s),this.head.data=this.head.data.slice(s)):i=s===this.head.data.length?this.shift():o?this._getString(s):this._getBuffer(s),i}},{key:\"first\",value:function first(){return this.head.data}},{key:\"_getString\",value:function _getString(s){var o=this.head,i=1,a=o.data;for(s-=a.length;o=o.next;){var u=o.data,_=s>u.length?u.length:s;if(_===u.length?a+=u:a+=u.slice(0,s),0===(s-=_)){_===u.length?(++i,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(_));break}++i}return this.length-=i,a}},{key:\"_getBuffer\",value:function _getBuffer(s){var o=a.allocUnsafe(s),i=this.head,u=1;for(i.data.copy(o),s-=i.data.length;i=i.next;){var _=i.data,w=s>_.length?_.length:s;if(_.copy(o,o.length-s,0,w),0===(s-=w)){w===_.length?(++u,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=_.slice(w));break}++u}return this.length-=u,o}},{key:_,value:function value(s,o){return u(this,_objectSpread(_objectSpread({},o),{},{depth:0,customInspect:!1}))}}]),BufferList}()},80376:s=>{\"use strict\";s.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},80631:(s,o,i)=>{var a=i(28077),u=i(49326);s.exports=function hasIn(s,o){return null!=s&&u(s,o,a)}},80909:(s,o,i)=>{var a=i(30641),u=i(38329)(a);s.exports=u},80945:(s,o,i)=>{var a=i(80079),u=i(68223),_=i(53661);s.exports=function stackSet(s,o){var i=this.__data__;if(i instanceof a){var w=i.__data__;if(!u||w.length<199)return w.push([s,o]),this.size=++i.size,this;i=this.__data__=new _(w)}return i.set(s,o),this.size=i.size,this}},81042:(s,o,i)=>{var a=i(56110)(Object,\"create\");s.exports=a},81214:(s,o,i)=>{\"use strict\";function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}Object.defineProperty(o,\"__esModule\",{value:!0}),o.DebounceInput=void 0;var a=_interopRequireDefault(i(96540)),u=_interopRequireDefault(i(20181)),_=[\"element\",\"onChange\",\"value\",\"minLength\",\"debounceTimeout\",\"forceNotifyByEnter\",\"forceNotifyOnBlur\",\"onKeyDown\",\"onBlur\",\"inputRef\"];function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=function _objectWithoutPropertiesLoose(s,o){if(null==s)return{};var i,a,u={},_=Object.keys(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||(u[i]=s[i]);return u}(s,o);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(a=0;a<_.length;a++)i=_[a],o.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(s,i)&&(u[i]=s[i])}return u}function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(Object(i),!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,o){return s.__proto__=o,s},_setPrototypeOf(s,o)}function _createSuper(s){var o=function _isNativeReflectConstruct(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(s){return!1}}();return function _createSuperInternal(){var i,a=_getPrototypeOf(s);if(o){var u=_getPrototypeOf(this).constructor;i=Reflect.construct(a,arguments,u)}else i=a.apply(this,arguments);return function _possibleConstructorReturn(s,o){if(o&&(\"object\"===_typeof(o)||\"function\"==typeof o))return o;if(void 0!==o)throw new TypeError(\"Derived constructors may only return object or undefined\");return _assertThisInitialized(s)}(this,i)}}function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}var w=function(s){!function _inherits(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,\"prototype\",{writable:!1}),o&&_setPrototypeOf(s,o)}(DebounceInput,s);var o=_createSuper(DebounceInput);function DebounceInput(s){var i;!function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,DebounceInput),_defineProperty(_assertThisInitialized(i=o.call(this,s)),\"onChange\",(function(s){s.persist();var o=i.state.value,a=i.props.minLength;i.setState({value:s.target.value},(function(){var u=i.state.value;u.length>=a?i.notify(s):o.length>u.length&&i.notify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:\"\"})}))}))})),_defineProperty(_assertThisInitialized(i),\"onKeyDown\",(function(s){\"Enter\"===s.key&&i.forceNotify(s);var o=i.props.onKeyDown;o&&(s.persist(),o(s))})),_defineProperty(_assertThisInitialized(i),\"onBlur\",(function(s){i.forceNotify(s);var o=i.props.onBlur;o&&(s.persist(),o(s))})),_defineProperty(_assertThisInitialized(i),\"createNotifier\",(function(s){if(s<0)i.notify=function(){return null};else if(0===s)i.notify=i.doNotify;else{var o=(0,u.default)((function(s){i.isDebouncing=!1,i.doNotify(s)}),s);i.notify=function(s){i.isDebouncing=!0,o(s)},i.flush=function(){return o.flush()},i.cancel=function(){i.isDebouncing=!1,o.cancel()}}})),_defineProperty(_assertThisInitialized(i),\"doNotify\",(function(){i.props.onChange.apply(void 0,arguments)})),_defineProperty(_assertThisInitialized(i),\"forceNotify\",(function(s){var o=i.props.debounceTimeout;if(i.isDebouncing||!(o>0)){i.cancel&&i.cancel();var a=i.state.value,u=i.props.minLength;a.length>=u?i.doNotify(s):i.doNotify(_objectSpread(_objectSpread({},s),{},{target:_objectSpread(_objectSpread({},s.target),{},{value:a})}))}})),i.isDebouncing=!1,i.state={value:void 0===s.value||null===s.value?\"\":s.value};var a=i.props.debounceTimeout;return i.createNotifier(a),i}return function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),Object.defineProperty(s,\"prototype\",{writable:!1}),s}(DebounceInput,[{key:\"componentDidUpdate\",value:function componentDidUpdate(s){if(!this.isDebouncing){var o=this.props,i=o.value,a=o.debounceTimeout,u=s.debounceTimeout,_=s.value,w=this.state.value;void 0!==i&&_!==i&&w!==i&&this.setState({value:i}),a!==u&&this.createNotifier(a)}}},{key:\"componentWillUnmount\",value:function componentWillUnmount(){this.flush&&this.flush()}},{key:\"render\",value:function render(){var s,o,i=this.props,u=i.element,w=(i.onChange,i.value,i.minLength,i.debounceTimeout,i.forceNotifyByEnter),x=i.forceNotifyOnBlur,C=i.onKeyDown,j=i.onBlur,L=i.inputRef,B=_objectWithoutProperties(i,_),$=this.state.value;s=w?{onKeyDown:this.onKeyDown}:C?{onKeyDown:C}:{},o=x?{onBlur:this.onBlur}:j?{onBlur:j}:{};var V=L?{ref:L}:{};return a.default.createElement(u,_objectSpread(_objectSpread(_objectSpread(_objectSpread({},B),{},{onChange:this.onChange,value:$},s),o),V))}}]),DebounceInput}(a.default.PureComponent);o.DebounceInput=w,_defineProperty(w,\"defaultProps\",{element:\"input\",type:\"text\",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0})},81919:(s,o,i)=>{\"use strict\";var a=i(48287).Buffer;function isSpecificValue(s){return s instanceof a||s instanceof Date||s instanceof RegExp}function cloneSpecificValue(s){if(s instanceof a){var o=a.alloc?a.alloc(s.length):new a(s.length);return s.copy(o),o}if(s instanceof Date)return new Date(s.getTime());if(s instanceof RegExp)return new RegExp(s);throw new Error(\"Unexpected situation\")}function deepCloneArray(s){var o=[];return s.forEach((function(s,i){\"object\"==typeof s&&null!==s?Array.isArray(s)?o[i]=deepCloneArray(s):isSpecificValue(s)?o[i]=cloneSpecificValue(s):o[i]=u({},s):o[i]=s})),o}function safeGetProperty(s,o){return\"__proto__\"===o?void 0:s[o]}var u=s.exports=function(){if(arguments.length<1||\"object\"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var s,o,i=arguments[0];return Array.prototype.slice.call(arguments,1).forEach((function(a){\"object\"!=typeof a||null===a||Array.isArray(a)||Object.keys(a).forEach((function(_){return o=safeGetProperty(i,_),(s=safeGetProperty(a,_))===i?void 0:\"object\"!=typeof s||null===s?void(i[_]=s):Array.isArray(s)?void(i[_]=deepCloneArray(s)):isSpecificValue(s)?void(i[_]=cloneSpecificValue(s)):\"object\"!=typeof o||null===o||Array.isArray(o)?void(i[_]=u({},s)):void(i[_]=u(o,s))}))})),i}},82048:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(88280),_=i(15972),w=i(79192),x=i(19595),C=i(58075),j=i(61626),L=i(75817),B=i(39259),$=i(85884),V=i(24823),U=i(32096),z=i(76264)(\"toStringTag\"),Y=Error,Z=[].push,ee=function AggregateError(s,o){var i,a=u(ie,this);w?i=w(new Y,a?_(this):ie):(i=a?this:C(ie),j(i,z,\"Error\")),void 0!==o&&j(i,\"message\",U(o)),$(i,ee,i.stack,1),arguments.length>2&&B(i,arguments[2]);var x=[];return V(s,Z,{that:x}),j(i,\"errors\",x),i};w?w(ee,Y):x(ee,Y,{name:!0});var ie=ee.prototype=C(Y.prototype,{constructor:L(1,ee),message:L(1,\"\"),name:L(1,\"AggregateError\")});a({global:!0,constructor:!0,arity:2},{AggregateError:ee})},82159:(s,o,i)=>{\"use strict\";var a=i(62250),u=i(4640),_=TypeError;s.exports=function(s){if(a(s))return s;throw new _(u(s)+\" is not a function\")}},82199:(s,o,i)=>{var a=i(14528),u=i(56449);s.exports=function baseGetAllKeys(s,o,i){var _=o(s);return u(s)?_:a(_,i(s))}},82261:(s,o,i)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});var a=_interopRequireDefault(i(9404)),u=_interopRequireDefault(i(48590));function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}o.default=function(s,o,i){var _=Object.keys(o);if(!_.length)return\"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.\";var w=(0,u.default)(i);if(a.default.isImmutable?!a.default.isImmutable(s):!a.default.Iterable.isIterable(s))return\"The \"+w+' is of unexpected type. Expected argument to be an instance of Immutable.Collection or Immutable.Record with the following properties: \"'+_.join('\", \"')+'\".';var x=s.toSeq().keySeq().toArray().filter((function(s){return!o.hasOwnProperty(s)}));return x.length>0?\"Unexpected \"+(1===x.length?\"property\":\"properties\")+' \"'+x.join('\", \"')+'\" found in '+w+'. Expected to find one of the known reducer property names instead: \"'+_.join('\", \"')+'\". Unexpected properties will be ignored.':null},s.exports=o.default},82819:(s,o,i)=>{var a=i(39344),u=i(23805);s.exports=function createCtor(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var i=a(s.prototype),_=s.apply(i,o);return u(_)?_:i}}},82890:(s,o,i)=>{var a=i(56698),u=i(90392),_=i(92861).Buffer,w=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],x=new Array(160);function Sha512(){this.init(),this._w=x,u.call(this,128,112)}function Ch(s,o,i){return i^s&(o^i)}function maj(s,o,i){return s&o|i&(s|o)}function sigma0(s,o){return(s>>>28|o<<4)^(o>>>2|s<<30)^(o>>>7|s<<25)}function sigma1(s,o){return(s>>>14|o<<18)^(s>>>18|o<<14)^(o>>>9|s<<23)}function Gamma0(s,o){return(s>>>1|o<<31)^(s>>>8|o<<24)^s>>>7}function Gamma0l(s,o){return(s>>>1|o<<31)^(s>>>8|o<<24)^(s>>>7|o<<25)}function Gamma1(s,o){return(s>>>19|o<<13)^(o>>>29|s<<3)^s>>>6}function Gamma1l(s,o){return(s>>>19|o<<13)^(o>>>29|s<<3)^(s>>>6|o<<26)}function getCarry(s,o){return s>>>0<o>>>0?1:0}a(Sha512,u),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(s){for(var o=this._w,i=0|this._ah,a=0|this._bh,u=0|this._ch,_=0|this._dh,x=0|this._eh,C=0|this._fh,j=0|this._gh,L=0|this._hh,B=0|this._al,$=0|this._bl,V=0|this._cl,U=0|this._dl,z=0|this._el,Y=0|this._fl,Z=0|this._gl,ee=0|this._hl,ie=0;ie<32;ie+=2)o[ie]=s.readInt32BE(4*ie),o[ie+1]=s.readInt32BE(4*ie+4);for(;ie<160;ie+=2){var ae=o[ie-30],ce=o[ie-30+1],le=Gamma0(ae,ce),pe=Gamma0l(ce,ae),de=Gamma1(ae=o[ie-4],ce=o[ie-4+1]),fe=Gamma1l(ce,ae),ye=o[ie-14],be=o[ie-14+1],_e=o[ie-32],Se=o[ie-32+1],we=pe+be|0,xe=le+ye+getCarry(we,pe)|0;xe=(xe=xe+de+getCarry(we=we+fe|0,fe)|0)+_e+getCarry(we=we+Se|0,Se)|0,o[ie]=xe,o[ie+1]=we}for(var Pe=0;Pe<160;Pe+=2){xe=o[Pe],we=o[Pe+1];var Te=maj(i,a,u),Re=maj(B,$,V),$e=sigma0(i,B),qe=sigma0(B,i),ze=sigma1(x,z),We=sigma1(z,x),He=w[Pe],Ye=w[Pe+1],Xe=Ch(x,C,j),Qe=Ch(z,Y,Z),et=ee+We|0,tt=L+ze+getCarry(et,ee)|0;tt=(tt=(tt=tt+Xe+getCarry(et=et+Qe|0,Qe)|0)+He+getCarry(et=et+Ye|0,Ye)|0)+xe+getCarry(et=et+we|0,we)|0;var rt=qe+Re|0,nt=$e+Te+getCarry(rt,qe)|0;L=j,ee=Z,j=C,Z=Y,C=x,Y=z,x=_+tt+getCarry(z=U+et|0,U)|0,_=u,U=V,u=a,V=$,a=i,$=B,i=tt+nt+getCarry(B=et+rt|0,et)|0}this._al=this._al+B|0,this._bl=this._bl+$|0,this._cl=this._cl+V|0,this._dl=this._dl+U|0,this._el=this._el+z|0,this._fl=this._fl+Y|0,this._gl=this._gl+Z|0,this._hl=this._hl+ee|0,this._ah=this._ah+i+getCarry(this._al,B)|0,this._bh=this._bh+a+getCarry(this._bl,$)|0,this._ch=this._ch+u+getCarry(this._cl,V)|0,this._dh=this._dh+_+getCarry(this._dl,U)|0,this._eh=this._eh+x+getCarry(this._el,z)|0,this._fh=this._fh+C+getCarry(this._fl,Y)|0,this._gh=this._gh+j+getCarry(this._gl,Z)|0,this._hh=this._hh+L+getCarry(this._hl,ee)|0},Sha512.prototype._hash=function(){var s=_.allocUnsafe(64);function writeInt64BE(o,i,a){s.writeInt32BE(o,a),s.writeInt32BE(i,a+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),s},s.exports=Sha512},83120:(s,o,i)=>{var a=i(14528),u=i(45891);s.exports=function baseFlatten(s,o,i,_,w){var x=-1,C=s.length;for(i||(i=u),w||(w=[]);++x<C;){var j=s[x];o>0&&i(j)?o>1?baseFlatten(j,o-1,i,_,w):a(w,j):_||(w[w.length]=j)}return w}},83141:(s,o,i)=>{\"use strict\";var a=i(92861).Buffer,u=a.isEncoding||function(s){switch((s=\"\"+s)&&s.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}};function StringDecoder(s){var o;switch(this.encoding=function normalizeEncoding(s){var o=function _normalizeEncoding(s){if(!s)return\"utf8\";for(var o;;)switch(s){case\"utf8\":case\"utf-8\":return\"utf8\";case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return\"utf16le\";case\"latin1\":case\"binary\":return\"latin1\";case\"base64\":case\"ascii\":case\"hex\":return s;default:if(o)return;s=(\"\"+s).toLowerCase(),o=!0}}(s);if(\"string\"!=typeof o&&(a.isEncoding===u||!u(s)))throw new Error(\"Unknown encoding: \"+s);return o||s}(s),this.encoding){case\"utf16le\":this.text=utf16Text,this.end=utf16End,o=4;break;case\"utf8\":this.fillLast=utf8FillLast,o=4;break;case\"base64\":this.text=base64Text,this.end=base64End,o=3;break;default:return this.write=simpleWrite,void(this.end=simpleEnd)}this.lastNeed=0,this.lastTotal=0,this.lastChar=a.allocUnsafe(o)}function utf8CheckByte(s){return s<=127?0:s>>5==6?2:s>>4==14?3:s>>3==30?4:s>>6==2?-1:-2}function utf8FillLast(s){var o=this.lastTotal-this.lastNeed,i=function utf8CheckExtraBytes(s,o,i){if(128!=(192&o[0]))return s.lastNeed=0,\"�\";if(s.lastNeed>1&&o.length>1){if(128!=(192&o[1]))return s.lastNeed=1,\"�\";if(s.lastNeed>2&&o.length>2&&128!=(192&o[2]))return s.lastNeed=2,\"�\"}}(this,s);return void 0!==i?i:this.lastNeed<=s.length?(s.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(s.copy(this.lastChar,o,0,s.length),void(this.lastNeed-=s.length))}function utf16Text(s,o){if((s.length-o)%2==0){var i=s.toString(\"utf16le\",o);if(i){var a=i.charCodeAt(i.length-1);if(a>=55296&&a<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1],i.slice(0,-1)}return i}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=s[s.length-1],s.toString(\"utf16le\",o,s.length-1)}function utf16End(s){var o=s&&s.length?this.write(s):\"\";if(this.lastNeed){var i=this.lastTotal-this.lastNeed;return o+this.lastChar.toString(\"utf16le\",0,i)}return o}function base64Text(s,o){var i=(s.length-o)%3;return 0===i?s.toString(\"base64\",o):(this.lastNeed=3-i,this.lastTotal=3,1===i?this.lastChar[0]=s[s.length-1]:(this.lastChar[0]=s[s.length-2],this.lastChar[1]=s[s.length-1]),s.toString(\"base64\",o,s.length-i))}function base64End(s){var o=s&&s.length?this.write(s):\"\";return this.lastNeed?o+this.lastChar.toString(\"base64\",0,3-this.lastNeed):o}function simpleWrite(s){return s.toString(this.encoding)}function simpleEnd(s){return s&&s.length?this.write(s):\"\"}o.I=StringDecoder,StringDecoder.prototype.write=function(s){if(0===s.length)return\"\";var o,i;if(this.lastNeed){if(void 0===(o=this.fillLast(s)))return\"\";i=this.lastNeed,this.lastNeed=0}else i=0;return i<s.length?o?o+this.text(s,i):this.text(s,i):o||\"\"},StringDecoder.prototype.end=function utf8End(s){var o=s&&s.length?this.write(s):\"\";return this.lastNeed?o+\"�\":o},StringDecoder.prototype.text=function utf8Text(s,o){var i=function utf8CheckIncomplete(s,o,i){var a=o.length-1;if(a<i)return 0;var u=utf8CheckByte(o[a]);if(u>=0)return u>0&&(s.lastNeed=u-1),u;if(--a<i||-2===u)return 0;if(u=utf8CheckByte(o[a]),u>=0)return u>0&&(s.lastNeed=u-2),u;if(--a<i||-2===u)return 0;if(u=utf8CheckByte(o[a]),u>=0)return u>0&&(2===u?u=0:s.lastNeed=u-3),u;return 0}(this,s,o);if(!this.lastNeed)return s.toString(\"utf8\",o);this.lastTotal=i;var a=s.length-(i-this.lastNeed);return s.copy(this.lastChar,0,a),s.toString(\"utf8\",o,a)},StringDecoder.prototype.fillLast=function(s){if(this.lastNeed<=s.length)return s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);s.copy(this.lastChar,this.lastTotal-this.lastNeed,0,s.length),this.lastNeed-=s.length}},83221:s=>{s.exports=function createBaseFor(s){return function(o,i,a){for(var u=-1,_=Object(o),w=a(o),x=w.length;x--;){var C=w[s?x:++u];if(!1===i(_[C],C,_))break}return o}}},83349:(s,o,i)=>{var a=i(82199),u=i(86375),_=i(37241);s.exports=function getAllKeysIn(s){return a(s,_,u)}},83488:s=>{s.exports=function identity(s){return s}},83693:(s,o,i)=>{var a=i(64894),u=i(40346);s.exports=function isArrayLikeObject(s){return u(s)&&a(s)}},83729:s=>{s.exports=function arrayEach(s,o){for(var i=-1,a=null==s?0:s.length;++i<a&&!1!==o(s[i],i,s););return s}},84058:(s,o,i)=>{var a=i(14792),u=i(45539)((function(s,o,i){return o=o.toLowerCase(),s+(i?a(o):o)}));s.exports=u},84195:(s,o,i)=>{var a=i(66977),u=i(38816),_=u((function(s,o){return a(s,256,void 0,void 0,void 0,o)}));s.exports=_},84247:s=>{s.exports=function setToArray(s){var o=-1,i=Array(s.size);return s.forEach((function(s){i[++o]=s})),i}},84629:s=>{s.exports={}},84851:(s,o,i)=>{\"use strict\";s.exports=i(85401)},84977:(s,o,i)=>{\"use strict\";Object.defineProperty(o,\"__esModule\",{value:!0});var a=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(i(9404)),u=i(55674);o.default=function(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.default.Map,i=Object.keys(s);return function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o(),_=arguments[1];return a.withMutations((function(o){i.forEach((function(i){var a=(0,s[i])(o.get(i),_);(0,u.validateNextState)(a,i,_),o.set(i,a)}))}))}},s.exports=o.default},85015:(s,o,i)=>{var a=i(72552),u=i(56449),_=i(40346);s.exports=function isString(s){return\"string\"==typeof s||!u(s)&&_(s)&&\"[object String]\"==a(s)}},85087:(s,o,i)=>{var a=i(30980),u=i(37381),_=i(62284),w=i(53758);s.exports=function isLaziable(s){var o=_(s),i=w[o];if(\"function\"!=typeof i||!(o in a.prototype))return!1;if(s===i)return!0;var x=u(i);return!!x&&s===x[0]}},85105:s=>{s.exports=class JSONSerialiser{constructor(s){this.namespace=s||new this.Namespace}serialise(s){if(!(s instanceof this.namespace.elements.Element))throw new TypeError(`Given element \\`${s}\\` is not an Element instance`);const o={element:s.element};s._meta&&s._meta.length>0&&(o.meta=this.serialiseObject(s.meta)),s._attributes&&s._attributes.length>0&&(o.attributes=this.serialiseObject(s.attributes));const i=this.serialiseContent(s.content);return void 0!==i&&(o.content=i),o}deserialise(s){if(!s.element)throw new Error(\"Given value is not an object containing an element name\");const o=new(this.namespace.getElementClass(s.element));o.element!==s.element&&(o.element=s.element),s.meta&&this.deserialiseObject(s.meta,o.meta),s.attributes&&this.deserialiseObject(s.attributes,o.attributes);const i=this.deserialiseContent(s.content);return void 0===i&&null!==o.content||(o.content=i),o}serialiseContent(s){if(s instanceof this.namespace.elements.Element)return this.serialise(s);if(s instanceof this.namespace.KeyValuePair){const o={key:this.serialise(s.key)};return s.value&&(o.value=this.serialise(s.value)),o}if(s&&s.map){if(0===s.length)return;return s.map(this.serialise,this)}return s}deserialiseContent(s){if(s){if(s.element)return this.deserialise(s);if(s.key){const o=new this.namespace.KeyValuePair(this.deserialise(s.key));return s.value&&(o.value=this.deserialise(s.value)),o}if(s.map)return s.map(this.deserialise,this)}return s}serialiseObject(s){const o={};if(s.forEach(((s,i)=>{s&&(o[i.toValue()]=this.serialise(s))})),0!==Object.keys(o).length)return o}deserialiseObject(s,o){Object.keys(s).forEach((i=>{o.set(i,this.deserialise(s[i]))}))}}},85160:(s,o,i)=>{\"use strict\";var a=i(96540);var u=\"function\"==typeof Object.is?Object.is:function is(s,o){return s===o&&(0!==s||1/s==1/o)||s!=s&&o!=o},_=a.useSyncExternalStore,w=a.useRef,x=a.useEffect,C=a.useMemo,j=a.useDebugValue},85250:(s,o,i)=>{var a=i(37217),u=i(87805),_=i(86649),w=i(42824),x=i(23805),C=i(37241),j=i(14974);s.exports=function baseMerge(s,o,i,L,B){s!==o&&_(o,(function(_,C){if(B||(B=new a),x(_))w(s,o,C,i,baseMerge,L,B);else{var $=L?L(j(s,C),_,C+\"\",s,o,B):void 0;void 0===$&&($=_),u(s,C,$)}}),C)}},85401:(s,o,i)=>{\"use strict\";var a=i(462);s.exports=a},85463:s=>{s.exports=function baseIsNaN(s){return s!=s}},85558:s=>{s.exports=function baseReduce(s,o,i,a,u){return u(s,(function(s,u,_){i=a?(a=!1,s):o(i,s,u,_)})),i}},85582:(s,o,i)=>{\"use strict\";var a=i(92046),u=i(45951),_=i(62250),aFunction=function(s){return _(s)?s:void 0};s.exports=function(s,o){return arguments.length<2?aFunction(a[s])||aFunction(u[s]):a[s]&&a[s][o]||u[s]&&u[s][o]}},85587:(s,o,i)=>{\"use strict\";var a=i(26311),u=create(Error);function create(s){return FormattedError.displayName=s.displayName||s.name,FormattedError;function FormattedError(o){return o&&(o=a.apply(null,arguments)),new s(o)}}s.exports=u,u.eval=create(EvalError),u.range=create(RangeError),u.reference=create(ReferenceError),u.syntax=create(SyntaxError),u.type=create(TypeError),u.uri=create(URIError),u.create=create},85762:(s,o,i)=>{\"use strict\";var a=i(1907),u=Error,_=a(\"\".replace),w=String(new u(\"zxcasd\").stack),x=/\\n\\s*at [^:]*:[^\\n]*/,C=x.test(w);s.exports=function(s,o){if(C&&\"string\"==typeof s&&!u.prepareStackTrace)for(;o--;)s=_(s,x,\"\");return s}},85816:(s,o,i)=>{\"use strict\";var a=i(36128);s.exports=function(s,o){return a[s]||(a[s]=o||{})}},85884:(s,o,i)=>{\"use strict\";var a=i(61626),u=i(85762),_=i(23888),w=Error.captureStackTrace;s.exports=function(s,o,i,x){_&&(w?w(s,o):a(s,\"stack\",u(i,x)))}},86009:(s,o,i)=>{s=i.nmd(s);var a=i(34840),u=o&&!o.nodeType&&o,_=u&&s&&!s.nodeType&&s,w=_&&_.exports===u&&a.process,x=function(){try{var s=_&&_.require&&_.require(\"util\").types;return s||w&&w.binding&&w.binding(\"util\")}catch(s){}}();s.exports=x},86048:s=>{\"use strict\";var o={};function createErrorType(s,i,a){a||(a=Error);var u=function(s){function NodeError(o,a,u){return s.call(this,function getMessage(s,o,a){return\"string\"==typeof i?i:i(s,o,a)}(o,a,u))||this}return function _inheritsLoose(s,o){s.prototype=Object.create(o.prototype),s.prototype.constructor=s,s.__proto__=o}(NodeError,s),NodeError}(a);u.prototype.name=a.name,u.prototype.code=s,o[s]=u}function oneOf(s,o){if(Array.isArray(s)){var i=s.length;return s=s.map((function(s){return String(s)})),i>2?\"one of \".concat(o,\" \").concat(s.slice(0,i-1).join(\", \"),\", or \")+s[i-1]:2===i?\"one of \".concat(o,\" \").concat(s[0],\" or \").concat(s[1]):\"of \".concat(o,\" \").concat(s[0])}return\"of \".concat(o,\" \").concat(String(s))}createErrorType(\"ERR_INVALID_OPT_VALUE\",(function(s,o){return'The value \"'+o+'\" is invalid for option \"'+s+'\"'}),TypeError),createErrorType(\"ERR_INVALID_ARG_TYPE\",(function(s,o,i){var a,u;if(\"string\"==typeof o&&function startsWith(s,o,i){return s.substr(!i||i<0?0:+i,o.length)===o}(o,\"not \")?(a=\"must not be\",o=o.replace(/^not /,\"\")):a=\"must be\",function endsWith(s,o,i){return(void 0===i||i>s.length)&&(i=s.length),s.substring(i-o.length,i)===o}(s,\" argument\"))u=\"The \".concat(s,\" \").concat(a,\" \").concat(oneOf(o,\"type\"));else{var _=function includes(s,o,i){return\"number\"!=typeof i&&(i=0),!(i+o.length>s.length)&&-1!==s.indexOf(o,i)}(s,\".\")?\"property\":\"argument\";u='The \"'.concat(s,'\" ').concat(_,\" \").concat(a,\" \").concat(oneOf(o,\"type\"))}return u+=\". Received type \".concat(typeof i)}),TypeError),createErrorType(\"ERR_STREAM_PUSH_AFTER_EOF\",\"stream.push() after EOF\"),createErrorType(\"ERR_METHOD_NOT_IMPLEMENTED\",(function(s){return\"The \"+s+\" method is not implemented\"})),createErrorType(\"ERR_STREAM_PREMATURE_CLOSE\",\"Premature close\"),createErrorType(\"ERR_STREAM_DESTROYED\",(function(s){return\"Cannot call \"+s+\" after a stream was destroyed\"})),createErrorType(\"ERR_MULTIPLE_CALLBACK\",\"Callback called multiple times\"),createErrorType(\"ERR_STREAM_CANNOT_PIPE\",\"Cannot pipe, not readable\"),createErrorType(\"ERR_STREAM_WRITE_AFTER_END\",\"write after end\"),createErrorType(\"ERR_STREAM_NULL_VALUES\",\"May not write null values to stream\",TypeError),createErrorType(\"ERR_UNKNOWN_ENCODING\",(function(s){return\"Unknown encoding: \"+s}),TypeError),createErrorType(\"ERR_STREAM_UNSHIFT_AFTER_END_EVENT\",\"stream.unshift() after end event\"),s.exports.F=o},86215:function(s,o){var i,a,u;a=[],i=function(){\"use strict\";var isNativeSmoothScrollEnabledOn=function(s){return s&&\"getComputedStyle\"in window&&\"smooth\"===window.getComputedStyle(s)[\"scroll-behavior\"]};if(\"undefined\"==typeof window||!(\"document\"in window))return{};var makeScroller=function(s,o,i){var a;o=o||999,i||0===i||(i=9);var setScrollTimeoutId=function(s){a=s},stopScroll=function(){clearTimeout(a),setScrollTimeoutId(0)},getTopWithEdgeOffset=function(o){return Math.max(0,s.getTopOf(o)-i)},scrollToY=function(i,a,u){if(stopScroll(),0===a||a&&a<0||isNativeSmoothScrollEnabledOn(s.body))s.toY(i),u&&u();else{var _=s.getY(),w=Math.max(0,i)-_,x=(new Date).getTime();a=a||Math.min(Math.abs(w),o),function loopScroll(){setScrollTimeoutId(setTimeout((function(){var o=Math.min(1,((new Date).getTime()-x)/a),i=Math.max(0,Math.floor(_+w*(o<.5?2*o*o:o*(4-2*o)-1)));s.toY(i),o<1&&s.getHeight()+i<s.body.scrollHeight?loopScroll():(setTimeout(stopScroll,99),u&&u())}),9))}()}},scrollToElem=function(s,o,i){scrollToY(getTopWithEdgeOffset(s),o,i)},scrollIntoView=function(o,a,u){var _=o.getBoundingClientRect().height,w=s.getTopOf(o)+_,x=s.getHeight(),C=s.getY(),j=C+x;getTopWithEdgeOffset(o)<C||_+i>x?scrollToElem(o,a,u):w+i>j?scrollToY(w-x+i,a,u):u&&u()},scrollToCenterOf=function(o,i,a,u){scrollToY(Math.max(0,s.getTopOf(o)-s.getHeight()/2+(a||o.getBoundingClientRect().height/2)),i,u)};return{setup:function(s,a){return(0===s||s)&&(o=s),(0===a||a)&&(i=a),{defaultDuration:o,edgeOffset:i}},to:scrollToElem,toY:scrollToY,intoView:scrollIntoView,center:scrollToCenterOf,stop:stopScroll,moving:function(){return!!a},getY:s.getY,getTopOf:s.getTopOf}},s=document.documentElement,getDocY=function(){return window.scrollY||s.scrollTop},o=makeScroller({body:document.scrollingElement||document.body,toY:function(s){window.scrollTo(0,s)},getY:getDocY,getHeight:function(){return window.innerHeight||s.clientHeight},getTopOf:function(o){return o.getBoundingClientRect().top+getDocY()-s.offsetTop}});if(o.createScroller=function(o,i,a){return makeScroller({body:o,toY:function(s){o.scrollTop=s},getY:function(){return o.scrollTop},getHeight:function(){return Math.min(o.clientHeight,window.innerHeight||s.clientHeight)},getTopOf:function(s){return s.offsetTop}},i,a)},\"addEventListener\"in window&&!window.noZensmooth&&!isNativeSmoothScrollEnabledOn(document.body)){var i=\"history\"in window&&\"pushState\"in history,a=i&&\"scrollRestoration\"in history;a&&(history.scrollRestoration=\"auto\"),window.addEventListener(\"load\",(function(){a&&(setTimeout((function(){history.scrollRestoration=\"manual\"}),9),window.addEventListener(\"popstate\",(function(s){s.state&&\"zenscrollY\"in s.state&&o.toY(s.state.zenscrollY)}),!1)),window.location.hash&&setTimeout((function(){var s=o.setup().edgeOffset;if(s){var i=document.getElementById(window.location.href.split(\"#\")[1]);if(i){var a=Math.max(0,o.getTopOf(i)-s),u=o.getY()-a;0<=u&&u<9&&window.scrollTo(0,a)}}}),9)}),!1);var u=new RegExp(\"(^|\\\\s)noZensmooth(\\\\s|$)\");window.addEventListener(\"click\",(function(s){for(var _=s.target;_&&\"A\"!==_.tagName;)_=_.parentNode;if(!(!_||1!==s.which||s.shiftKey||s.metaKey||s.ctrlKey||s.altKey)){if(a){var w=history.state&&\"object\"==typeof history.state?history.state:{};w.zenscrollY=o.getY();try{history.replaceState(w,\"\")}catch(s){}}var x=_.getAttribute(\"href\")||\"\";if(0===x.indexOf(\"#\")&&!u.test(_.className)){var C=0,j=document.getElementById(x.substring(1));if(\"#\"!==x){if(!j)return;C=o.getTopOf(j)}s.preventDefault();var onDone=function(){window.location=x},L=o.setup().edgeOffset;L&&(C=Math.max(0,C-L),i&&(onDone=function(){history.pushState({},\"\",x)})),o.toY(C,null,onDone)}}}),!1)}return o}(),void 0===(u=\"function\"==typeof i?i.apply(o,a):i)||(s.exports=u)},86238:(s,o,i)=>{\"use strict\";var a=i(86048).F.ERR_STREAM_PREMATURE_CLOSE;function noop(){}s.exports=function eos(s,o,i){if(\"function\"==typeof o)return eos(s,null,o);o||(o={}),i=function once(s){var o=!1;return function(){if(!o){o=!0;for(var i=arguments.length,a=new Array(i),u=0;u<i;u++)a[u]=arguments[u];s.apply(this,a)}}}(i||noop);var u=o.readable||!1!==o.readable&&s.readable,_=o.writable||!1!==o.writable&&s.writable,w=function onlegacyfinish(){s.writable||C()},x=s._writableState&&s._writableState.finished,C=function onfinish(){_=!1,x=!0,u||i.call(s)},j=s._readableState&&s._readableState.endEmitted,L=function onend(){u=!1,j=!0,_||i.call(s)},B=function onerror(o){i.call(s,o)},$=function onclose(){var o;return u&&!j?(s._readableState&&s._readableState.ended||(o=new a),i.call(s,o)):_&&!x?(s._writableState&&s._writableState.ended||(o=new a),i.call(s,o)):void 0},V=function onrequest(){s.req.on(\"finish\",C)};return!function isRequest(s){return s.setHeader&&\"function\"==typeof s.abort}(s)?_&&!s._writableState&&(s.on(\"end\",w),s.on(\"close\",w)):(s.on(\"complete\",C),s.on(\"abort\",$),s.req?V():s.on(\"request\",V)),s.on(\"end\",L),s.on(\"finish\",C),!1!==o.error&&s.on(\"error\",B),s.on(\"close\",$),function(){s.removeListener(\"complete\",C),s.removeListener(\"abort\",$),s.removeListener(\"request\",V),s.req&&s.req.removeListener(\"finish\",C),s.removeListener(\"end\",w),s.removeListener(\"close\",w),s.removeListener(\"finish\",C),s.removeListener(\"end\",L),s.removeListener(\"error\",B),s.removeListener(\"close\",$)}}},86303:(s,o,i)=>{const a=i(10316);s.exports=class LinkElement extends a{constructor(s,o,i){super(s||[],o,i),this.element=\"link\"}get relation(){return this.attributes.get(\"relation\")}set relation(s){this.attributes.set(\"relation\",s)}get href(){return this.attributes.get(\"href\")}set href(s){this.attributes.set(\"href\",s)}}},86375:(s,o,i)=>{var a=i(14528),u=i(28879),_=i(4664),w=i(63345),x=Object.getOwnPropertySymbols?function(s){for(var o=[];s;)a(o,_(s)),s=u(s);return o}:w;s.exports=x},86649:(s,o,i)=>{var a=i(83221)();s.exports=a},86804:(s,o,i)=>{const a=i(10316),u=i(41067),_=i(71167),w=i(40239),x=i(12242),C=i(6233),j=i(87726),L=i(61045),B=i(86303),$=i(14540),V=i(92340),U=i(10866),z=i(55973);function refract(s){if(s instanceof a)return s;if(\"string\"==typeof s)return new _(s);if(\"number\"==typeof s)return new w(s);if(\"boolean\"==typeof s)return new x(s);if(null===s)return new u;if(Array.isArray(s))return new C(s.map(refract));if(\"object\"==typeof s){return new L(s)}return s}a.prototype.ObjectElement=L,a.prototype.RefElement=$,a.prototype.MemberElement=j,a.prototype.refract=refract,V.prototype.refract=refract,s.exports={Element:a,NullElement:u,StringElement:_,NumberElement:w,BooleanElement:x,ArrayElement:C,MemberElement:j,ObjectElement:L,LinkElement:B,RefElement:$,refract,ArraySlice:V,ObjectSlice:U,KeyValuePair:z}},87068:(s,o,i)=>{var a=i(37217),u=i(25911),_=i(21986),w=i(50689),x=i(5861),C=i(56449),j=i(3656),L=i(37167),B=\"[object Arguments]\",$=\"[object Array]\",V=\"[object Object]\",U=Object.prototype.hasOwnProperty;s.exports=function baseIsEqualDeep(s,o,i,z,Y,Z){var ee=C(s),ie=C(o),ae=ee?$:x(s),ce=ie?$:x(o),le=(ae=ae==B?V:ae)==V,pe=(ce=ce==B?V:ce)==V,de=ae==ce;if(de&&j(s)){if(!j(o))return!1;ee=!0,le=!1}if(de&&!le)return Z||(Z=new a),ee||L(s)?u(s,o,i,z,Y,Z):_(s,o,ae,i,z,Y,Z);if(!(1&i)){var fe=le&&U.call(s,\"__wrapped__\"),ye=pe&&U.call(o,\"__wrapped__\");if(fe||ye){var be=fe?s.value():s,_e=ye?o.value():o;return Z||(Z=new a),Y(be,_e,i,z,Z)}}return!!de&&(Z||(Z=new a),w(s,o,i,z,Y,Z))}},87136:s=>{\"use strict\";s.exports=function(s){return null==s}},87170:(s,o)=>{\"use strict\";o.f=Object.getOwnPropertySymbols},87296:(s,o,i)=>{var a,u=i(55481),_=(a=/[^.]+$/.exec(u&&u.keys&&u.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+a:\"\";s.exports=function isMasked(s){return!!_&&_ in s}},87586:(s,o,i)=>{const a=i(6205),u=i(10023),_={0:0,t:9,n:10,v:11,f:12,r:13};o.strToChars=function(s){return s=s.replace(/(\\[\\\\b\\])|(\\\\)?\\\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\\\\]^?])|([0tnvfr]))/g,(function(s,o,i,a,u,w,x,C){if(i)return s;var j=o?8:a?parseInt(a,16):u?parseInt(u,16):w?parseInt(w,8):x?\"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^ ?\".indexOf(x):_[C],L=String.fromCharCode(j);return/[[\\]{}^$.|?*+()]/.test(L)&&(L=\"\\\\\"+L),L}))},o.tokenizeClass=(s,i)=>{for(var _,w,x=[],C=/\\\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\\\)(.)|([^\\]\\\\]))-(?:\\\\)?([^\\]]))|(\\])|(?:\\\\)?([^])/g;null!=(_=C.exec(s));)if(_[1])x.push(u.words());else if(_[2])x.push(u.ints());else if(_[3])x.push(u.whitespace());else if(_[4])x.push(u.notWords());else if(_[5])x.push(u.notInts());else if(_[6])x.push(u.notWhitespace());else if(_[7])x.push({type:a.RANGE,from:(_[8]||_[9]).charCodeAt(0),to:_[10].charCodeAt(0)});else{if(!(w=_[12]))return[x,C.lastIndex];x.push({type:a.CHAR,value:w.charCodeAt(0)})}o.error(i,\"Unterminated character class\")},o.error=(s,o)=>{throw new SyntaxError(\"Invalid regular expression: /\"+s+\"/: \"+o)}},87726:(s,o,i)=>{const a=i(55973),u=i(10316);s.exports=class MemberElement extends u{constructor(s,o,i,u){super(new a,i,u),this.element=\"member\",this.key=s,this.value=o}get key(){return this.content.key}set key(s){this.content.key=this.refract(s)}get value(){return this.content.value}set value(s){this.content.value=this.refract(s)}}},87730:(s,o,i)=>{var a=i(29172),u=i(27301),_=i(86009),w=_&&_.isMap,x=w?u(w):a;s.exports=x},87805:(s,o,i)=>{var a=i(43360),u=i(75288);s.exports=function assignMergeValue(s,o,i){(void 0!==i&&!u(s[o],i)||void 0===i&&!(o in s))&&a(s,o,i)}},87978:(s,o,i)=>{var a=i(60270),u=i(58156),_=i(80631),w=i(28586),x=i(30756),C=i(67197),j=i(77797);s.exports=function baseMatchesProperty(s,o){return w(s)&&x(o)?C(j(s),o):function(i){var w=u(i,s);return void 0===w&&w===o?_(i,s):a(o,w,3)}}},88280:(s,o,i)=>{\"use strict\";var a=i(1907);s.exports=a({}.isPrototypeOf)},88310:(s,o,i)=>{s.exports=Stream;var a=i(37007).EventEmitter;function Stream(){a.call(this)}i(56698)(Stream,a),Stream.Readable=i(45412),Stream.Writable=i(16708),Stream.Duplex=i(25382),Stream.Transform=i(74610),Stream.PassThrough=i(63600),Stream.finished=i(86238),Stream.pipeline=i(57758),Stream.Stream=Stream,Stream.prototype.pipe=function(s,o){var i=this;function ondata(o){s.writable&&!1===s.write(o)&&i.pause&&i.pause()}function ondrain(){i.readable&&i.resume&&i.resume()}i.on(\"data\",ondata),s.on(\"drain\",ondrain),s._isStdio||o&&!1===o.end||(i.on(\"end\",onend),i.on(\"close\",onclose));var u=!1;function onend(){u||(u=!0,s.end())}function onclose(){u||(u=!0,\"function\"==typeof s.destroy&&s.destroy())}function onerror(s){if(cleanup(),0===a.listenerCount(this,\"error\"))throw s}function cleanup(){i.removeListener(\"data\",ondata),s.removeListener(\"drain\",ondrain),i.removeListener(\"end\",onend),i.removeListener(\"close\",onclose),i.removeListener(\"error\",onerror),s.removeListener(\"error\",onerror),i.removeListener(\"end\",cleanup),i.removeListener(\"close\",cleanup),s.removeListener(\"close\",cleanup)}return i.on(\"error\",onerror),s.on(\"error\",onerror),i.on(\"end\",cleanup),i.on(\"close\",cleanup),s.on(\"close\",cleanup),s.emit(\"pipe\",i),s}},88984:(s,o,i)=>{var a=i(55527),u=i(3650),_=Object.prototype.hasOwnProperty;s.exports=function baseKeys(s){if(!a(s))return u(s);var o=[];for(var i in Object(s))_.call(s,i)&&\"constructor\"!=i&&o.push(i);return o}},89593:(s,o,i)=>{\"use strict\";o.H=void 0;var a=function _interopRequireDefault(s){return s&&s.__esModule?s:{default:s}}(i(84977));o.H=a.default},89935:s=>{s.exports=function stubFalse(){return!1}},90160:(s,o,i)=>{\"use strict\";var a=i(73948),u=String;s.exports=function(s){if(\"Symbol\"===a(s))throw new TypeError(\"Cannot convert a Symbol value to a string\");return u(s)}},90179:(s,o,i)=>{var a=i(34932),u=i(9999),_=i(19931),w=i(31769),x=i(21791),C=i(53138),j=i(38816),L=i(83349),B=j((function(s,o){var i={};if(null==s)return i;var j=!1;o=a(o,(function(o){return o=w(o,s),j||(j=o.length>1),o})),x(s,L(s),i),j&&(i=u(i,7,C));for(var B=o.length;B--;)_(i,o[B]);return i}));s.exports=B},90181:s=>{s.exports=function nativeKeysIn(s){var o=[];if(null!=s)for(var i in Object(s))o.push(i);return o}},90289:(s,o,i)=>{var a=i(12651);s.exports=function mapCacheGet(s){return a(this,s).get(s)}},90392:(s,o,i)=>{var a=i(92861).Buffer;function Hash(s,o){this._block=a.alloc(s),this._finalSize=o,this._blockSize=s,this._len=0}Hash.prototype.update=function(s,o){\"string\"==typeof s&&(o=o||\"utf8\",s=a.from(s,o));for(var i=this._block,u=this._blockSize,_=s.length,w=this._len,x=0;x<_;){for(var C=w%u,j=Math.min(_-x,u-C),L=0;L<j;L++)i[C+L]=s[x+L];x+=j,(w+=j)%u==0&&this._update(i)}return this._len+=_,this},Hash.prototype.digest=function(s){var o=this._len%this._blockSize;this._block[o]=128,this._block.fill(0,o+1),o>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var a=(4294967295&i)>>>0,u=(i-a)/4294967296;this._block.writeUInt32BE(u,this._blockSize-8),this._block.writeUInt32BE(a,this._blockSize-4)}this._update(this._block);var _=this._hash();return s?_.toString(s):_},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},s.exports=Hash},90916:(s,o,i)=>{var a=i(80909);s.exports=function baseSome(s,o){var i;return a(s,(function(s,a,u){return!(i=o(s,a,u))})),!!i}},90938:s=>{s.exports=function stackDelete(s){var o=this.__data__,i=o.delete(s);return this.size=o.size,i}},91033:s=>{s.exports=function apply(s,o,i){switch(i.length){case 0:return s.call(o);case 1:return s.call(o,i[0]);case 2:return s.call(o,i[0],i[1]);case 3:return s.call(o,i[0],i[1],i[2])}return s.apply(o,i)}},91596:s=>{var o=Math.max;s.exports=function composeArgs(s,i,a,u){for(var _=-1,w=s.length,x=a.length,C=-1,j=i.length,L=o(w-x,0),B=Array(j+L),$=!u;++C<j;)B[C]=i[C];for(;++_<x;)($||_<w)&&(B[a[_]]=s[_]);for(;L--;)B[C++]=s[_++];return B}},91599:(s,o,i)=>{\"use strict\";i(64502)},92046:s=>{\"use strict\";s.exports={}},92063:s=>{\"use strict\";s.exports=function required(s,o){if(o=o.split(\":\")[0],!(s=+s))return!1;switch(o){case\"http\":case\"ws\":return 80!==s;case\"https\":case\"wss\":return 443!==s;case\"ftp\":return 21!==s;case\"gopher\":return 70!==s;case\"file\":return!1}return 0!==s}},92271:(s,o,i)=>{var a=i(21791),u=i(4664);s.exports=function copySymbols(s,o){return a(s,u(s),o)}},92340:(s,o,i)=>{const a=i(6048);function coerceElementMatchingCallback(s){return\"string\"==typeof s?o=>o.element===s:s.constructor&&s.extend?o=>o instanceof s:s}class ArraySlice{constructor(s){this.elements=s||[]}toValue(){return this.elements.map((s=>s.toValue()))}map(s,o){return this.elements.map(s,o)}flatMap(s,o){return this.map(s,o).reduce(((s,o)=>s.concat(o)),[])}compactMap(s,o){const i=[];return this.forEach((a=>{const u=s.bind(o)(a);u&&i.push(u)})),i}filter(s,o){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(s,o))}reject(s,o){return s=coerceElementMatchingCallback(s),new ArraySlice(this.elements.filter(a(s),o))}find(s,o){return s=coerceElementMatchingCallback(s),this.elements.find(s,o)}forEach(s,o){this.elements.forEach(s,o)}reduce(s,o){return this.elements.reduce(s,o)}includes(s){return this.elements.some((o=>o.equals(s)))}shift(){return this.elements.shift()}unshift(s){this.elements.unshift(this.refract(s))}push(s){return this.elements.push(this.refract(s)),this}add(s){this.push(s)}get(s){return this.elements[s]}getValue(s){const o=this.elements[s];if(o)return o.toValue()}get length(){return this.elements.length}get isEmpty(){return 0===this.elements.length}get first(){return this.elements[0]}}\"undefined\"!=typeof Symbol&&(ArraySlice.prototype[Symbol.iterator]=function symbol(){return this.elements[Symbol.iterator]()}),s.exports=ArraySlice},92361:(s,o,i)=>{\"use strict\";var a=i(45807),u=i(1907);s.exports=function(s){if(\"Function\"===a(s))return u(s)}},92522:(s,o,i)=>{\"use strict\";var a=i(85816),u=i(6499),_=a(\"keys\");s.exports=function(s){return _[s]||(_[s]=u(s))}},92861:(s,o,i)=>{var a=i(48287),u=a.Buffer;function copyProps(s,o){for(var i in s)o[i]=s[i]}function SafeBuffer(s,o,i){return u(s,o,i)}u.from&&u.alloc&&u.allocUnsafe&&u.allocUnsafeSlow?s.exports=a:(copyProps(a,o),o.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(u.prototype),copyProps(u,SafeBuffer),SafeBuffer.from=function(s,o,i){if(\"number\"==typeof s)throw new TypeError(\"Argument must not be a number\");return u(s,o,i)},SafeBuffer.alloc=function(s,o,i){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");var a=u(s);return void 0!==o?\"string\"==typeof i?a.fill(o,i):a.fill(o):a.fill(0),a},SafeBuffer.allocUnsafe=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return u(s)},SafeBuffer.allocUnsafeSlow=function(s){if(\"number\"!=typeof s)throw new TypeError(\"Argument must be a number\");return a.SlowBuffer(s)}},93243:(s,o,i)=>{var a=i(56110),u=function(){try{var s=a(Object,\"defineProperty\");return s({},\"\",{}),s}catch(s){}}();s.exports=u},93290:(s,o,i)=>{s=i.nmd(s);var a=i(9325),u=o&&!o.nodeType&&o,_=u&&s&&!s.nodeType&&s,w=_&&_.exports===u?a.Buffer:void 0,x=w?w.allocUnsafe:void 0;s.exports=function cloneBuffer(s,o){if(o)return s.slice();var i=s.length,a=x?x(i):new s.constructor(i);return s.copy(a),a}},93427:(s,o,i)=>{\"use strict\";var a=i(1907);s.exports=a([].slice)},93663:(s,o,i)=>{var a=i(41799),u=i(10776),_=i(67197);s.exports=function baseMatches(s){var o=u(s);return 1==o.length&&o[0][2]?_(o[0][0],o[0][1]):function(i){return i===s||a(i,s,o)}}},93700:(s,o,i)=>{\"use strict\";var a=i(19709);s.exports=a},93736:(s,o,i)=>{var a=i(51873),u=a?a.prototype:void 0,_=u?u.valueOf:void 0;s.exports=function cloneSymbol(s){return _?Object(_.call(s)):{}}},93742:s=>{\"use strict\";s.exports={}},94033:s=>{s.exports=function baseLodash(){}},94643:(s,o,i)=>{function config(s){try{if(!i.g.localStorage)return!1}catch(s){return!1}var o=i.g.localStorage[s];return null!=o&&\"true\"===String(o).toLowerCase()}s.exports=function deprecate(s,o){if(config(\"noDeprecation\"))return s;var i=!1;return function deprecated(){if(!i){if(config(\"throwDeprecation\"))throw new Error(o);config(\"traceDeprecation\")?console.trace(o):console.warn(o),i=!0}return s.apply(this,arguments)}}},95089:s=>{const o=\"[A-Za-z$_][0-9A-Za-z$_]*\",i=[\"as\",\"in\",\"of\",\"if\",\"for\",\"while\",\"finally\",\"var\",\"new\",\"function\",\"do\",\"return\",\"void\",\"else\",\"break\",\"catch\",\"instanceof\",\"with\",\"throw\",\"case\",\"default\",\"try\",\"switch\",\"continue\",\"typeof\",\"delete\",\"let\",\"yield\",\"const\",\"class\",\"debugger\",\"async\",\"await\",\"static\",\"import\",\"from\",\"export\",\"extends\"],a=[\"true\",\"false\",\"null\",\"undefined\",\"NaN\",\"Infinity\"],u=[].concat([\"setInterval\",\"setTimeout\",\"clearInterval\",\"clearTimeout\",\"require\",\"exports\",\"eval\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\"],[\"arguments\",\"this\",\"super\",\"console\",\"window\",\"document\",\"localStorage\",\"module\",\"global\"],[\"Intl\",\"DataView\",\"Number\",\"Math\",\"Date\",\"String\",\"RegExp\",\"Object\",\"Function\",\"Boolean\",\"Error\",\"Symbol\",\"Set\",\"Map\",\"WeakSet\",\"WeakMap\",\"Proxy\",\"Reflect\",\"JSON\",\"Promise\",\"Float64Array\",\"Int16Array\",\"Int32Array\",\"Int8Array\",\"Uint16Array\",\"Uint32Array\",\"Float32Array\",\"Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"ArrayBuffer\",\"BigInt64Array\",\"BigUint64Array\",\"BigInt\"],[\"EvalError\",\"InternalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\"]);function lookahead(s){return concat(\"(?=\",s,\")\")}function concat(...s){return s.map((s=>function source(s){return s?\"string\"==typeof s?s:s.source:null}(s))).join(\"\")}s.exports=function javascript(s){const _=o,w=\"<>\",x=\"</>\",C={begin:/<[A-Za-z0-9\\\\._:-]+/,end:/\\/[A-Za-z0-9\\\\._:-]+>|\\/>/,isTrulyOpeningTag:(s,o)=>{const i=s[0].length+s.index,a=s.input[i];\"<\"!==a?\">\"===a&&(((s,{after:o})=>{const i=\"</\"+s[0].slice(1);return-1!==s.input.indexOf(i,o)})(s,{after:i})||o.ignoreMatch()):o.ignoreMatch()}},j={$pattern:o,keyword:i,literal:a,built_in:u},L=\"[0-9](_?[0-9])*\",B=`\\\\.(${L})`,$=\"0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*\",V={className:\"number\",variants:[{begin:`(\\\\b(${$})((${B})|\\\\.)?|(${B}))[eE][+-]?(${L})\\\\b`},{begin:`\\\\b(${$})\\\\b((${B})\\\\b|\\\\.)?|(${B})\\\\b`},{begin:\"\\\\b(0|[1-9](_?[0-9])*)n\\\\b\"},{begin:\"\\\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\\\b\"},{begin:\"\\\\b0[bB][0-1](_?[0-1])*n?\\\\b\"},{begin:\"\\\\b0[oO][0-7](_?[0-7])*n?\\\\b\"},{begin:\"\\\\b0[0-7]+n?\\\\b\"}],relevance:0},U={className:\"subst\",begin:\"\\\\$\\\\{\",end:\"\\\\}\",keywords:j,contains:[]},z={begin:\"html`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,U],subLanguage:\"xml\"}},Y={begin:\"css`\",end:\"\",starts:{end:\"`\",returnEnd:!1,contains:[s.BACKSLASH_ESCAPE,U],subLanguage:\"css\"}},Z={className:\"string\",begin:\"`\",end:\"`\",contains:[s.BACKSLASH_ESCAPE,U]},ee={className:\"comment\",variants:[s.COMMENT(/\\/\\*\\*(?!\\/)/,\"\\\\*/\",{relevance:0,contains:[{className:\"doctag\",begin:\"@[A-Za-z]+\",contains:[{className:\"type\",begin:\"\\\\{\",end:\"\\\\}\",relevance:0},{className:\"variable\",begin:_+\"(?=\\\\s*(-)|$)\",endsParent:!0,relevance:0},{begin:/(?=[^\\n])\\s/,relevance:0}]}]}),s.C_BLOCK_COMMENT_MODE,s.C_LINE_COMMENT_MODE]},ie=[s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,z,Y,Z,V,s.REGEXP_MODE];U.contains=ie.concat({begin:/\\{/,end:/\\}/,keywords:j,contains:[\"self\"].concat(ie)});const ae=[].concat(ee,U.contains),ce=ae.concat([{begin:/\\(/,end:/\\)/,keywords:j,contains:[\"self\"].concat(ae)}]),le={className:\"params\",begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:j,contains:ce};return{name:\"Javascript\",aliases:[\"js\",\"jsx\",\"mjs\",\"cjs\"],keywords:j,exports:{PARAMS_CONTAINS:ce},illegal:/#(?![$_A-z])/,contains:[s.SHEBANG({label:\"shebang\",binary:\"node\",relevance:5}),{label:\"use_strict\",className:\"meta\",relevance:10,begin:/^\\s*['\"]use (strict|asm)['\"]/},s.APOS_STRING_MODE,s.QUOTE_STRING_MODE,z,Y,Z,ee,V,{begin:concat(/[{,\\n]\\s*/,lookahead(concat(/(((\\/\\/.*$)|(\\/\\*(\\*[^/]|[^*])*\\*\\/))\\s*)*/,_+\"\\\\s*:\"))),relevance:0,contains:[{className:\"attr\",begin:_+lookahead(\"\\\\s*:\"),relevance:0}]},{begin:\"(\"+s.RE_STARTERS_RE+\"|\\\\b(case|return|throw)\\\\b)\\\\s*\",keywords:\"return throw case\",contains:[ee,s.REGEXP_MODE,{className:\"function\",begin:\"(\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)|\"+s.UNDERSCORE_IDENT_RE+\")\\\\s*=>\",returnBegin:!0,end:\"\\\\s*=>\",contains:[{className:\"params\",variants:[{begin:s.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\\(\\s*\\)/,skip:!0},{begin:/\\(/,end:/\\)/,excludeBegin:!0,excludeEnd:!0,keywords:j,contains:ce}]}]},{begin:/,/,relevance:0},{className:\"\",begin:/\\s/,end:/\\s*/,skip:!0},{variants:[{begin:w,end:x},{begin:C.begin,\"on:begin\":C.isTrulyOpeningTag,end:C.end}],subLanguage:\"xml\",contains:[{begin:C.begin,end:C.end,skip:!0,contains:[\"self\"]}]}],relevance:0},{className:\"function\",beginKeywords:\"function\",end:/[{;]/,excludeEnd:!0,keywords:j,contains:[\"self\",s.inherit(s.TITLE_MODE,{begin:_}),le],illegal:/%/},{beginKeywords:\"while if switch catch for\"},{className:\"function\",begin:s.UNDERSCORE_IDENT_RE+\"\\\\([^()]*(\\\\([^()]*(\\\\([^()]*\\\\)[^()]*)*\\\\)[^()]*)*\\\\)\\\\s*\\\\{\",returnBegin:!0,contains:[le,s.inherit(s.TITLE_MODE,{begin:_})]},{variants:[{begin:\"\\\\.\"+_},{begin:\"\\\\$\"+_}],relevance:0},{className:\"class\",beginKeywords:\"class\",end:/[{;=]/,excludeEnd:!0,illegal:/[:\"[\\]]/,contains:[{beginKeywords:\"extends\"},s.UNDERSCORE_TITLE_MODE]},{begin:/\\b(?=constructor)/,end:/[{;]/,excludeEnd:!0,contains:[s.inherit(s.TITLE_MODE,{begin:_}),\"self\",le]},{begin:\"(get|set)\\\\s+(?=\"+_+\"\\\\()\",end:/\\{/,keywords:\"get set\",contains:[s.inherit(s.TITLE_MODE,{begin:_}),{begin:/\\(\\)/},le]},{begin:/\\$[(.]/}]}}},95116:(s,o,i)=>{\"use strict\";var a,u,_,w=i(98828),x=i(62250),C=i(46285),j=i(58075),L=i(15972),B=i(68055),$=i(76264),V=i(7376),U=$(\"iterator\"),z=!1;[].keys&&(\"next\"in(_=[].keys())?(u=L(L(_)))!==Object.prototype&&(a=u):z=!0),!C(a)||w((function(){var s={};return a[U].call(s)!==s}))?a={}:V&&(a=j(a)),x(a[U])||B(a,U,(function(){return this})),s.exports={IteratorPrototype:a,BUGGY_SAFARI_ITERATORS:z}},95950:(s,o,i)=>{var a=i(70695),u=i(88984),_=i(64894);s.exports=function keys(s){return _(s)?a(s):u(s)}},96131:(s,o,i)=>{var a=i(2523),u=i(85463),_=i(76959);s.exports=function baseIndexOf(s,o,i){return o==o?_(s,o,i):a(s,u,i)}},96540:(s,o,i)=>{\"use strict\";s.exports=i(15287)},96605:(s,o,i)=>{\"use strict\";var a=i(11091),u=i(45951),_=i(76024),w=i(19358),x=\"WebAssembly\",C=u[x],j=7!==new Error(\"e\",{cause:7}).cause,exportGlobalErrorCauseWrapper=function(s,o){var i={};i[s]=w(s,o,j),a({global:!0,constructor:!0,arity:1,forced:j},i)},exportWebAssemblyErrorCauseWrapper=function(s,o){if(C&&C[s]){var i={};i[s]=w(x+\".\"+s,o,j),a({target:x,stat:!0,constructor:!0,arity:1,forced:j},i)}};exportGlobalErrorCauseWrapper(\"Error\",(function(s){return function Error(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"EvalError\",(function(s){return function EvalError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"RangeError\",(function(s){return function RangeError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"ReferenceError\",(function(s){return function ReferenceError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"SyntaxError\",(function(s){return function SyntaxError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"TypeError\",(function(s){return function TypeError(o){return _(s,this,arguments)}})),exportGlobalErrorCauseWrapper(\"URIError\",(function(s){return function URIError(o){return _(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"CompileError\",(function(s){return function CompileError(o){return _(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"LinkError\",(function(s){return function LinkError(o){return _(s,this,arguments)}})),exportWebAssemblyErrorCauseWrapper(\"RuntimeError\",(function(s){return function RuntimeError(o){return _(s,this,arguments)}}))},96794:(s,o,i)=>{\"use strict\";var a=i(45951).navigator,u=a&&a.userAgent;s.exports=u?String(u):\"\"},98023:(s,o,i)=>{var a=i(72552),u=i(40346);s.exports=function isNumber(s){return\"number\"==typeof s||u(s)&&\"[object Number]\"==a(s)}},98828:s=>{\"use strict\";s.exports=function(s){try{return!!s()}catch(s){return!0}}},99363:(s,o,i)=>{\"use strict\";var a=i(4993),u=i(42156),_=i(93742),w=i(64932),x=i(74284).f,C=i(60183),j=i(59550),L=i(7376),B=i(39447),$=\"Array Iterator\",V=w.set,U=w.getterFor($);s.exports=C(Array,\"Array\",(function(s,o){V(this,{type:$,target:a(s),index:0,kind:o})}),(function(){var s=U(this),o=s.target,i=s.index++;if(!o||i>=o.length)return s.target=null,j(void 0,!0);switch(s.kind){case\"keys\":return j(i,!1);case\"values\":return j(o[i],!1)}return j([i,o[i]],!1)}),\"values\");var z=_.Arguments=_.Array;if(u(\"keys\"),u(\"values\"),u(\"entries\"),!L&&B&&\"values\"!==z.name)try{x(z,\"name\",{value:\"values\"})}catch(s){}},99374:(s,o,i)=>{var a=i(54128),u=i(23805),_=i(44394),w=/^[-+]0x[0-9a-f]+$/i,x=/^0b[01]+$/i,C=/^0o[0-7]+$/i,j=parseInt;s.exports=function toNumber(s){if(\"number\"==typeof s)return s;if(_(s))return NaN;if(u(s)){var o=\"function\"==typeof s.valueOf?s.valueOf():s;s=u(o)?o+\"\":o}if(\"string\"!=typeof s)return 0===s?s:+s;s=a(s);var i=x.test(s);return i||C.test(s)?j(s.slice(2),i?2:8):w.test(s)?NaN:+s}}},o={};function __webpack_require__(i){var a=o[i];if(void 0!==a)return a.exports;var u=o[i]={id:i,loaded:!1,exports:{}};return s[i].call(u.exports,u,u.exports,__webpack_require__),u.loaded=!0,u.exports}__webpack_require__.n=s=>{var o=s&&s.__esModule?()=>s.default:()=>s;return __webpack_require__.d(o,{a:o}),o},__webpack_require__.d=(s,o)=>{for(var i in o)__webpack_require__.o(o,i)&&!__webpack_require__.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:o[i]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(s){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(s,o)=>Object.prototype.hasOwnProperty.call(s,o),__webpack_require__.r=s=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(s,\"__esModule\",{value:!0})},__webpack_require__.nmd=s=>(s.paths=[],s.children||(s.children=[]),s);var i={};(()=>{\"use strict\";__webpack_require__.d(i,{default:()=>JT});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{CLEAR:()=>at,CLEAR_BY:()=>ct,NEW_AUTH_ERR:()=>it,NEW_SPEC_ERR:()=>st,NEW_SPEC_ERR_BATCH:()=>ot,NEW_THROWN_ERR:()=>rt,NEW_THROWN_ERR_BATCH:()=>nt,clear:()=>clear,clearBy:()=>clearBy,newAuthErr:()=>newAuthErr,newSpecErr:()=>newSpecErr,newSpecErrBatch:()=>newSpecErrBatch,newThrownErr:()=>newThrownErr,newThrownErrBatch:()=>newThrownErrBatch});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{AUTHORIZE:()=>Rt,AUTHORIZE_OAUTH2:()=>Lt,CONFIGURE_AUTH:()=>Ft,LOGOUT:()=>Dt,RESTORE_AUTHORIZATION:()=>Bt,SHOW_AUTH_POPUP:()=>Mt,authPopup:()=>authPopup,authorize:()=>authorize,authorizeAccessCodeWithBasicAuthentication:()=>authorizeAccessCodeWithBasicAuthentication,authorizeAccessCodeWithFormParams:()=>authorizeAccessCodeWithFormParams,authorizeApplication:()=>authorizeApplication,authorizeOauth2:()=>authorizeOauth2,authorizeOauth2WithPersistOption:()=>authorizeOauth2WithPersistOption,authorizePassword:()=>authorizePassword,authorizeRequest:()=>authorizeRequest,authorizeWithPersistOption:()=>authorizeWithPersistOption,configureAuth:()=>configureAuth,logout:()=>logout,logoutWithPersistOption:()=>logoutWithPersistOption,persistAuthorizationIfNeeded:()=>persistAuthorizationIfNeeded,preAuthorizeImplicit:()=>preAuthorizeImplicit,restoreAuthorization:()=>restoreAuthorization,showDefinitions:()=>showDefinitions});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{authorized:()=>Jt,definitionsForRequirements:()=>definitionsForRequirements,definitionsToAuthorize:()=>Wt,getConfigs:()=>Ht,getDefinitionsByNames:()=>getDefinitionsByNames,isAuthorized:()=>isAuthorized,selectAuthPath:()=>selectAuthPath,shownDefinitions:()=>zt});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{TOGGLE_CONFIGS:()=>gn,UPDATE_CONFIGS:()=>mn,downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl,loaded:()=>actions_loaded,toggle:()=>toggle,update:()=>update});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{get:()=>get});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{transform:()=>transform});var x={};__webpack_require__.r(x),__webpack_require__.d(x,{transform:()=>parameter_oneof_transform});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{allErrors:()=>In,lastError:()=>Tn});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{SHOW:()=>Fn,UPDATE_FILTER:()=>Dn,UPDATE_LAYOUT:()=>Rn,UPDATE_MODE:()=>Ln,changeMode:()=>changeMode,show:()=>actions_show,updateFilter:()=>updateFilter,updateLayout:()=>updateLayout});var L={};__webpack_require__.r(L),__webpack_require__.d(L,{current:()=>current,currentFilter:()=>currentFilter,isShown:()=>isShown,showSummary:()=>$n,whatMode:()=>whatMode});var B={};__webpack_require__.r(B),__webpack_require__.d(B,{taggedOperations:()=>taggedOperations});var $={};__webpack_require__.r($),__webpack_require__.d($,{getActiveLanguage:()=>Un,getDefaultExpanded:()=>zn,getGenerators:()=>Vn,getSnippetGenerators:()=>getSnippetGenerators});var V={};__webpack_require__.r(V),__webpack_require__.d(V,{JsonSchemaArrayItemFile:()=>JsonSchemaArrayItemFile,JsonSchemaArrayItemText:()=>JsonSchemaArrayItemText,JsonSchemaForm:()=>JsonSchemaForm,JsonSchema_array:()=>JsonSchema_array,JsonSchema_boolean:()=>JsonSchema_boolean,JsonSchema_object:()=>JsonSchema_object,JsonSchema_string:()=>JsonSchema_string});var U={};__webpack_require__.r(U),__webpack_require__.d(U,{allowTryItOutFor:()=>allowTryItOutFor,basePath:()=>Hs,canExecuteScheme:()=>canExecuteScheme,consumes:()=>Vs,consumesOptionsFor:()=>consumesOptionsFor,contentTypeValues:()=>contentTypeValues,currentProducesFor:()=>currentProducesFor,definitions:()=>Js,externalDocs:()=>Ds,findDefinition:()=>findDefinition,getOAS3RequiredRequestBodyContentType:()=>getOAS3RequiredRequestBodyContentType,getParameter:()=>getParameter,hasHost:()=>ro,host:()=>Ks,info:()=>Rs,isMediaTypeSchemaPropertiesEqual:()=>isMediaTypeSchemaPropertiesEqual,isOAS3:()=>Ms,lastError:()=>Os,mutatedRequestFor:()=>mutatedRequestFor,mutatedRequests:()=>to,operationScheme:()=>operationScheme,operationWithMeta:()=>operationWithMeta,operations:()=>qs,operationsWithRootInherited:()=>Ys,operationsWithTags:()=>Qs,parameterInclusionSettingFor:()=>parameterInclusionSettingFor,parameterValues:()=>parameterValues,parameterWithMeta:()=>parameterWithMeta,parameterWithMetaByIdentity:()=>parameterWithMetaByIdentity,parametersIncludeIn:()=>parametersIncludeIn,parametersIncludeType:()=>parametersIncludeType,paths:()=>Bs,produces:()=>Us,producesOptionsFor:()=>producesOptionsFor,requestFor:()=>requestFor,requests:()=>eo,responseFor:()=>responseFor,responses:()=>Zs,schemes:()=>Gs,security:()=>zs,securityDefinitions:()=>Ws,semver:()=>Fs,spec:()=>spec,specJS:()=>Is,specJson:()=>Ps,specJsonWithResolvedSubtrees:()=>Ns,specResolved:()=>Ts,specResolvedSubtree:()=>specResolvedSubtree,specSource:()=>js,specStr:()=>As,tagDetails:()=>tagDetails,taggedOperations:()=>selectors_taggedOperations,tags:()=>Xs,url:()=>Cs,validOperationMethods:()=>$s,validateBeforeExecute:()=>validateBeforeExecute,validationErrors:()=>validationErrors,version:()=>Ls});var z={};__webpack_require__.r(z),__webpack_require__.d(z,{CLEAR_REQUEST:()=>wo,CLEAR_RESPONSE:()=>Eo,CLEAR_VALIDATE_PARAMS:()=>xo,LOG_REQUEST:()=>So,SET_MUTATED_REQUEST:()=>_o,SET_REQUEST:()=>bo,SET_RESPONSE:()=>vo,SET_SCHEME:()=>Ao,UPDATE_EMPTY_PARAM_INCLUSION:()=>go,UPDATE_JSON:()=>fo,UPDATE_OPERATION_META_VALUE:()=>ko,UPDATE_PARAM:()=>mo,UPDATE_RESOLVED:()=>Oo,UPDATE_RESOLVED_SUBTREE:()=>Co,UPDATE_SPEC:()=>po,UPDATE_URL:()=>ho,VALIDATE_PARAMS:()=>yo,changeConsumesValue:()=>changeConsumesValue,changeParam:()=>changeParam,changeParamByIdentity:()=>changeParamByIdentity,changeProducesValue:()=>changeProducesValue,clearRequest:()=>clearRequest,clearResponse:()=>clearResponse,clearValidateParams:()=>clearValidateParams,execute:()=>actions_execute,executeRequest:()=>executeRequest,invalidateResolvedSubtreeCache:()=>invalidateResolvedSubtreeCache,logRequest:()=>logRequest,parseToJson:()=>parseToJson,requestResolvedSubtree:()=>requestResolvedSubtree,resolveSpec:()=>resolveSpec,setMutatedRequest:()=>setMutatedRequest,setRequest:()=>setRequest,setResponse:()=>setResponse,setScheme:()=>setScheme,updateEmptyParamInclusion:()=>updateEmptyParamInclusion,updateJsonSpec:()=>updateJsonSpec,updateResolved:()=>updateResolved,updateResolvedSubtree:()=>updateResolvedSubtree,updateSpec:()=>updateSpec,updateUrl:()=>updateUrl,validateParams:()=>validateParams});var Y={};__webpack_require__.r(Y),__webpack_require__.d(Y,{executeRequest:()=>wrap_actions_executeRequest,updateJsonSpec:()=>wrap_actions_updateJsonSpec,updateSpec:()=>wrap_actions_updateSpec,validateParams:()=>wrap_actions_validateParams});var Z={};__webpack_require__.r(Z),__webpack_require__.d(Z,{JsonPatchError:()=>Do,_areEquals:()=>_areEquals,applyOperation:()=>applyOperation,applyPatch:()=>applyPatch,applyReducer:()=>applyReducer,deepClone:()=>Lo,getValueByPointer:()=>getValueByPointer,validate:()=>validate,validator:()=>validator});var ee={};__webpack_require__.r(ee),__webpack_require__.d(ee,{compare:()=>compare,generate:()=>generate,observe:()=>observe,unobserve:()=>unobserve});var ie={};__webpack_require__.r(ie),__webpack_require__.d(ie,{hasElementSourceMap:()=>hasElementSourceMap,includesClasses:()=>includesClasses,includesSymbols:()=>includesSymbols,isAnnotationElement:()=>Bu,isArrayElement:()=>Ru,isBooleanElement:()=>Nu,isCommentElement:()=>$u,isElement:()=>ju,isLinkElement:()=>Lu,isMemberElement:()=>Du,isNullElement:()=>Tu,isNumberElement:()=>Iu,isObjectElement:()=>Mu,isParseResultElement:()=>qu,isPrimitiveElement:()=>isPrimitiveElement,isRefElement:()=>Fu,isSourceMapElement:()=>Vu,isStringElement:()=>Pu});var ae={};__webpack_require__.r(ae),__webpack_require__.d(ae,{isJSONReferenceElement:()=>Bd,isJSONSchemaElement:()=>Fd,isLinkDescriptionElement:()=>Vd,isMediaElement:()=>$d});var ce={};__webpack_require__.r(ce),__webpack_require__.d(ce,{isBooleanJsonSchemaElement:()=>isBooleanJsonSchemaElement,isCallbackElement:()=>Mm,isComponentsElement:()=>Rm,isContactElement:()=>Dm,isExampleElement:()=>Lm,isExternalDocumentationElement:()=>Fm,isHeaderElement:()=>Bm,isInfoElement:()=>$m,isLicenseElement:()=>qm,isLinkElement:()=>Vm,isMediaTypeElement:()=>og,isOpenApi3_0Element:()=>zm,isOpenapiElement:()=>Um,isOperationElement:()=>Wm,isParameterElement:()=>Jm,isPathItemElement:()=>Hm,isPathsElement:()=>Km,isReferenceElement:()=>Gm,isRequestBodyElement:()=>Ym,isResponseElement:()=>Xm,isResponsesElement:()=>Qm,isSchemaElement:()=>Zm,isSecurityRequirementElement:()=>eg,isSecuritySchemeElement:()=>rg,isServerElement:()=>ng,isServerVariableElement:()=>sg,isServersElement:()=>lg});var le={};__webpack_require__.r(le),__webpack_require__.d(le,{isJSONReferenceElement:()=>Bd,isJSONSchemaElement:()=>y_,isLinkDescriptionElement:()=>v_,isMediaElement:()=>$d});var pe={};__webpack_require__.r(pe),__webpack_require__.d(pe,{isJSONReferenceElement:()=>Bd,isJSONSchemaElement:()=>A_,isLinkDescriptionElement:()=>j_});var de={};__webpack_require__.r(de),__webpack_require__.d(de,{isJSONSchemaElement:()=>G_,isLinkDescriptionElement:()=>Y_});var fe={};__webpack_require__.r(fe),__webpack_require__.d(fe,{isJSONSchemaElement:()=>iS,isLinkDescriptionElement:()=>aS});var ye={};__webpack_require__.r(ye),__webpack_require__.d(ye,{isBooleanJsonSchemaElement:()=>predicates_isBooleanJsonSchemaElement,isCallbackElement:()=>WS,isComponentsElement:()=>JS,isContactElement:()=>HS,isExampleElement:()=>KS,isExternalDocumentationElement:()=>GS,isHeaderElement:()=>YS,isInfoElement:()=>XS,isJsonSchemaDialectElement:()=>QS,isLicenseElement:()=>ZS,isLinkElement:()=>eE,isMediaTypeElement:()=>gE,isOpenApi3_1Element:()=>rE,isOpenapiElement:()=>tE,isOperationElement:()=>nE,isParameterElement:()=>sE,isPathItemElement:()=>oE,isPathItemElementExternal:()=>isPathItemElementExternal,isPathsElement:()=>iE,isReferenceElement:()=>aE,isReferenceElementExternal:()=>isReferenceElementExternal,isRequestBodyElement:()=>cE,isResponseElement:()=>lE,isResponsesElement:()=>uE,isSchemaElement:()=>pE,isSecurityRequirementElement:()=>hE,isSecuritySchemeElement:()=>dE,isServerElement:()=>fE,isServerVariableElement:()=>mE});var be={};__webpack_require__.r(be),__webpack_require__.d(be,{cookie:()=>cookie,header:()=>parameter_builders_header,path:()=>parameter_builders_path,query:()=>query});var _e={};__webpack_require__.r(_e),__webpack_require__.d(_e,{Button:()=>Button,Col:()=>Col,Collapse:()=>Collapse,Container:()=>Container,Input:()=>Input,Link:()=>layout_utils_Link,Row:()=>Row,Select:()=>Select,TextArea:()=>TextArea});var Se={};__webpack_require__.r(Se),__webpack_require__.d(Se,{basePath:()=>MP,consumes:()=>RP,definitions:()=>PP,findDefinition:()=>jP,hasHost:()=>IP,host:()=>NP,produces:()=>DP,schemes:()=>LP,securityDefinitions:()=>TP,validOperationMethods:()=>wrap_selectors_validOperationMethods});var we={};__webpack_require__.r(we),__webpack_require__.d(we,{definitionsToAuthorize:()=>FP});var xe={};__webpack_require__.r(xe),__webpack_require__.d(xe,{callbacksOperations:()=>qP,findSchema:()=>findSchema,isOAS3:()=>selectors_isOAS3,isOAS30:()=>selectors_isOAS30,isSwagger2:()=>selectors_isSwagger2,servers:()=>$P});var Pe={};__webpack_require__.r(Pe),__webpack_require__.d(Pe,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>aI,CLEAR_REQUEST_BODY_VALUE:()=>cI,SET_REQUEST_BODY_VALIDATE_ERROR:()=>iI,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>rI,UPDATE_REQUEST_BODY_INCLUSION:()=>tI,UPDATE_REQUEST_BODY_VALUE:()=>ZP,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>eI,UPDATE_REQUEST_CONTENT_TYPE:()=>nI,UPDATE_RESPONSE_CONTENT_TYPE:()=>sI,UPDATE_SELECTED_SERVER:()=>QP,UPDATE_SERVER_VARIABLE_VALUE:()=>oI,clearRequestBodyValidateError:()=>clearRequestBodyValidateError,clearRequestBodyValue:()=>clearRequestBodyValue,initRequestBodyValidateError:()=>initRequestBodyValidateError,setActiveExamplesMember:()=>setActiveExamplesMember,setRequestBodyInclusion:()=>setRequestBodyInclusion,setRequestBodyValidateError:()=>setRequestBodyValidateError,setRequestBodyValue:()=>setRequestBodyValue,setRequestContentType:()=>setRequestContentType,setResponseContentType:()=>setResponseContentType,setRetainRequestBodyValueFlag:()=>setRetainRequestBodyValueFlag,setSelectedServer:()=>setSelectedServer,setServerVariableValue:()=>setServerVariableValue});var Te={};__webpack_require__.r(Te),__webpack_require__.d(Te,{activeExamplesMember:()=>yI,hasUserEditedBody:()=>fI,requestBodyErrors:()=>gI,requestBodyInclusionSetting:()=>mI,requestBodyValue:()=>hI,requestContentType:()=>vI,responseContentType:()=>bI,selectDefaultRequestBodyValue:()=>selectDefaultRequestBodyValue,selectedServer:()=>pI,serverEffectiveValue:()=>EI,serverVariableValue:()=>_I,serverVariables:()=>SI,shouldRetainRequestBodyValue:()=>dI,validOperationMethods:()=>xI,validateBeforeExecute:()=>wI,validateShallowRequired:()=>validateShallowRequired});var Re=__webpack_require__(96540);function formatProdErrorMessage(s){return`Minified Redux error #${s}; visit https://redux.js.org/Errors?code=${s} for the full message or use the non-minified dev environment for full errors. `}var $e=(()=>\"function\"==typeof Symbol&&Symbol.observable||\"@@observable\")(),randomString=()=>Math.random().toString(36).substring(7).split(\"\").join(\".\"),qe={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`};function isPlainObject(s){if(\"object\"!=typeof s||null===s)return!1;let o=s;for(;null!==Object.getPrototypeOf(o);)o=Object.getPrototypeOf(o);return Object.getPrototypeOf(s)===o||null===Object.getPrototypeOf(s)}function createStore(s,o,i){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(2));if(\"function\"==typeof o&&\"function\"==typeof i||\"function\"==typeof i&&\"function\"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if(\"function\"==typeof o&&void 0===i&&(i=o,o=void 0),void 0!==i){if(\"function\"!=typeof i)throw new Error(formatProdErrorMessage(1));return i(createStore)(s,o)}let a=s,u=o,_=new Map,w=_,x=0,C=!1;function ensureCanMutateNextListeners(){w===_&&(w=new Map,_.forEach(((s,o)=>{w.set(o,s)})))}function getState(){if(C)throw new Error(formatProdErrorMessage(3));return u}function subscribe(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(4));if(C)throw new Error(formatProdErrorMessage(5));let o=!0;ensureCanMutateNextListeners();const i=x++;return w.set(i,s),function unsubscribe(){if(o){if(C)throw new Error(formatProdErrorMessage(6));o=!1,ensureCanMutateNextListeners(),w.delete(i),_=null}}}function dispatch(s){if(!isPlainObject(s))throw new Error(formatProdErrorMessage(7));if(void 0===s.type)throw new Error(formatProdErrorMessage(8));if(\"string\"!=typeof s.type)throw new Error(formatProdErrorMessage(17));if(C)throw new Error(formatProdErrorMessage(9));try{C=!0,u=a(u,s)}finally{C=!1}return(_=w).forEach((s=>{s()})),s}dispatch({type:qe.INIT});return{dispatch,subscribe,getState,replaceReducer:function replaceReducer(s){if(\"function\"!=typeof s)throw new Error(formatProdErrorMessage(10));a=s,dispatch({type:qe.REPLACE})},[$e]:function observable(){const s=subscribe;return{subscribe(o){if(\"object\"!=typeof o||null===o)throw new Error(formatProdErrorMessage(11));function observeState(){const s=o;s.next&&s.next(getState())}observeState();return{unsubscribe:s(observeState)}},[$e](){return this}}}}}function bindActionCreator(s,o){return function(...i){return o(s.apply(this,i))}}function compose(...s){return 0===s.length?s=>s:1===s.length?s[0]:s.reduce(((s,o)=>(...i)=>s(o(...i))))}var ze=__webpack_require__(9404),We=__webpack_require__.n(ze),He=__webpack_require__(81919),Ye=__webpack_require__.n(He),Xe=__webpack_require__(89593),Qe=__webpack_require__(20334),et=__webpack_require__(55364),tt=__webpack_require__.n(et);const rt=\"err_new_thrown_err\",nt=\"err_new_thrown_err_batch\",st=\"err_new_spec_err\",ot=\"err_new_spec_err_batch\",it=\"err_new_auth_err\",at=\"err_clear\",ct=\"err_clear_by\";function newThrownErr(s){return{type:rt,payload:(0,Qe.serializeError)(s)}}function newThrownErrBatch(s){return{type:nt,payload:s}}function newSpecErr(s){return{type:st,payload:s}}function newSpecErrBatch(s){return{type:ot,payload:s}}function newAuthErr(s){return{type:it,payload:s}}function clear(s={}){return{type:at,payload:s}}function clearBy(s=()=>!0){return{type:ct,payload:s}}const lt=function makeWindow(){var s={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return s;try{s=window;for(var o of[\"File\",\"Blob\",\"FormData\"])o in window&&(s[o]=window[o])}catch(s){console.error(s)}return s}();__webpack_require__(84058),__webpack_require__(55808);var ut=__webpack_require__(50104),pt=__webpack_require__.n(ut),ht=__webpack_require__(7309),dt=__webpack_require__.n(ht),mt=__webpack_require__(42426),gt=__webpack_require__.n(mt),yt=__webpack_require__(75288),vt=__webpack_require__.n(yt),bt=__webpack_require__(1882),_t=__webpack_require__.n(bt),St=__webpack_require__(2205),Et=__webpack_require__.n(St),wt=__webpack_require__(53209),xt=__webpack_require__.n(wt),kt=__webpack_require__(62802),Ot=__webpack_require__.n(kt);const Ct=We().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(s,{isOAS3:o}={}){if(!We().Map.isMap(s))return{schema:We().Map(),parameterContentMediaType:null};if(!o)return\"body\"===s.get(\"in\")?{schema:s.get(\"schema\",We().Map()),parameterContentMediaType:null}:{schema:s.filter(((s,o)=>Ct.includes(o))),parameterContentMediaType:null};if(s.get(\"content\")){const o=s.get(\"content\",We().Map({})).keySeq().first();return{schema:s.getIn([\"content\",o,\"schema\"],We().Map()),parameterContentMediaType:o}}return{schema:s.get(\"schema\")?s.get(\"schema\",We().Map()):We().Map(),parameterContentMediaType:null}}var At=__webpack_require__(48287).Buffer;const jt=\"default\",isImmutable=s=>We().Iterable.isIterable(s),immutableToJS=s=>isImmutable(s)?s.toJS():s;function objectify(s){return isObject(s)?immutableToJS(s):{}}function fromJSOrdered(s){if(isImmutable(s))return s;if(s instanceof lt.File)return s;if(!isObject(s))return s;if(Array.isArray(s))return We().Seq(s).map(fromJSOrdered).toList();if(_t()(s.entries)){const o=function createObjWithHashedKeys(s){if(!_t()(s.entries))return s;const o={},i=\"_**[]\",a={};for(let u of s.entries())if(o[u[0]]||a[u[0]]&&a[u[0]].containsMultiple){if(!a[u[0]]){a[u[0]]={containsMultiple:!0,length:1},o[`${u[0]}${i}${a[u[0]].length}`]=o[u[0]],delete o[u[0]]}a[u[0]].length+=1,o[`${u[0]}${i}${a[u[0]].length}`]=u[1]}else o[u[0]]=u[1];return o}(s);return We().OrderedMap(o).map(fromJSOrdered)}return We().OrderedMap(s).map(fromJSOrdered)}function normalizeArray(s){return Array.isArray(s)?s:[s]}function isFn(s){return\"function\"==typeof s}function isObject(s){return!!s&&\"object\"==typeof s}function isFunc(s){return\"function\"==typeof s}function isArray(s){return Array.isArray(s)}const Pt=pt();function objMap(s,o){return Object.keys(s).reduce(((i,a)=>(i[a]=o(s[a],a),i)),{})}function objReduce(s,o){return Object.keys(s).reduce(((i,a)=>{let u=o(s[a],a);return u&&\"object\"==typeof u&&Object.assign(i,u),i}),{})}function systemThunkMiddleware(s){return({dispatch:o,getState:i})=>o=>i=>\"function\"==typeof i?i(s()):o(i)}function validateValueBySchema(s,o,i,a,u){if(!o)return[];let _=[],w=o.get(\"nullable\"),x=o.get(\"required\"),C=o.get(\"maximum\"),j=o.get(\"minimum\"),L=o.get(\"type\"),B=o.get(\"format\"),$=o.get(\"maxLength\"),V=o.get(\"minLength\"),U=o.get(\"uniqueItems\"),z=o.get(\"maxItems\"),Y=o.get(\"minItems\"),Z=o.get(\"pattern\");const ee=i||!0===x,ie=null!=s,ae=ee||ie&&\"array\"===L||!(!ee&&!ie),ce=w&&null===s;if(ee&&!ie&&!ce&&!a&&!L)return _.push(\"Required field is not provided\"),_;if(ce||!L||!ae)return[];let le=\"string\"===L&&s,pe=\"array\"===L&&Array.isArray(s)&&s.length,de=\"array\"===L&&We().List.isList(s)&&s.count();const fe=[le,pe,de,\"array\"===L&&\"string\"==typeof s&&s,\"file\"===L&&s instanceof lt.File,\"boolean\"===L&&(s||!1===s),\"number\"===L&&(s||0===s),\"integer\"===L&&(s||0===s),\"object\"===L&&\"object\"==typeof s&&null!==s,\"object\"===L&&\"string\"==typeof s&&s].some((s=>!!s));if(ee&&!fe&&!a)return _.push(\"Required field is not provided\"),_;if(\"object\"===L&&(null===u||\"application/json\"===u)){let i=s;if(\"string\"==typeof s)try{i=JSON.parse(s)}catch(s){return _.push(\"Parameter string value must be valid JSON\"),_}o&&o.has(\"required\")&&isFunc(x.isList)&&x.isList()&&x.forEach((s=>{void 0===i[s]&&_.push({propKey:s,error:\"Required property not found\"})})),o&&o.has(\"properties\")&&o.get(\"properties\").forEach(((s,o)=>{const w=validateValueBySchema(i[o],s,!1,a,u);_.push(...w.map((s=>({propKey:o,error:s}))))}))}if(Z){let o=((s,o)=>{if(!new RegExp(o).test(s))return\"Value must follow pattern \"+o})(s,Z);o&&_.push(o)}if(Y&&\"array\"===L){let o=((s,o)=>{if(!s&&o>=1||s&&s.length<o)return`Array must contain at least ${o} item${1===o?\"\":\"s\"}`})(s,Y);o&&_.push(o)}if(z&&\"array\"===L){let o=((s,o)=>{if(s&&s.length>o)return`Array must not contain more then ${o} item${1===o?\"\":\"s\"}`})(s,z);o&&_.push({needRemove:!0,error:o})}if(U&&\"array\"===L){let o=((s,o)=>{if(s&&(\"true\"===o||!0===o)){const o=(0,ze.fromJS)(s),i=o.toSet();if(s.length>i.size){let s=(0,ze.Set)();if(o.forEach(((i,a)=>{o.filter((s=>isFunc(s.equals)?s.equals(i):s===i)).size>1&&(s=s.add(a))})),0!==s.size)return s.map((s=>({index:s,error:\"No duplicates allowed.\"}))).toArray()}}})(s,U);o&&_.push(...o)}if($||0===$){let o=((s,o)=>{if(s.length>o)return`Value must be no longer than ${o} character${1!==o?\"s\":\"\"}`})(s,$);o&&_.push(o)}if(V){let o=((s,o)=>{if(s.length<o)return`Value must be at least ${o} character${1!==o?\"s\":\"\"}`})(s,V);o&&_.push(o)}if(C||0===C){let o=((s,o)=>{if(s>o)return`Value must be less than or equal to ${o}`})(s,C);o&&_.push(o)}if(j||0===j){let o=((s,o)=>{if(s<o)return`Value must be greater than or equal to ${o}`})(s,j);o&&_.push(o)}if(\"string\"===L){let o;if(o=\"date-time\"===B?(s=>{if(isNaN(Date.parse(s)))return\"Value must be a DateTime\"})(s):\"uuid\"===B?(s=>{if(s=s.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(s))return\"Value must be a Guid\"})(s):(s=>{if(s&&\"string\"!=typeof s)return\"Value must be a string\"})(s),!o)return _;_.push(o)}else if(\"boolean\"===L){let o=(s=>{if(\"true\"!==s&&\"false\"!==s&&!0!==s&&!1!==s)return\"Value must be a boolean\"})(s);if(!o)return _;_.push(o)}else if(\"number\"===L){let o=(s=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(s))return\"Value must be a number\"})(s);if(!o)return _;_.push(o)}else if(\"integer\"===L){let o=(s=>{if(!/^-?\\d+$/.test(s))return\"Value must be an integer\"})(s);if(!o)return _;_.push(o)}else if(\"array\"===L){if(!pe&&!de)return _;s&&s.forEach(((s,i)=>{const w=validateValueBySchema(s,o.get(\"items\"),!1,a,u);_.push(...w.map((s=>({index:i,error:s}))))}))}else if(\"file\"===L){let o=(s=>{if(s&&!(s instanceof lt.File))return\"Value must be a file\"})(s);if(!o)return _;_.push(o)}return _}const utils_btoa=s=>{let o;return o=s instanceof At?s:At.from(s.toString(),\"utf-8\"),o.toString(\"base64\")},It={operationsSorter:{alpha:(s,o)=>s.get(\"path\").localeCompare(o.get(\"path\")),method:(s,o)=>s.get(\"method\").localeCompare(o.get(\"method\"))},tagsSorter:{alpha:(s,o)=>s.localeCompare(o)}},buildFormData=s=>{let o=[];for(let i in s){let a=s[i];void 0!==a&&\"\"!==a&&o.push([i,\"=\",encodeURIComponent(a).replace(/%20/g,\"+\")].join(\"\"))}return o.join(\"&\")},shallowEqualKeys=(s,o,i)=>!!dt()(i,(i=>vt()(s[i],o[i])));function requiresValidationURL(s){return!(!s||s.indexOf(\"localhost\")>=0||s.indexOf(\"127.0.0.1\")>=0||\"none\"===s)}const createDeepLinkPath=s=>\"string\"==typeof s||s instanceof String?s.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=s=>Et()(createDeepLinkPath(s).replace(/%20/g,\"_\")),getExtensions=s=>{const o=/^x-/;return ze.Map.isMap(s)?s.filter(((s,i)=>o.test(i))):Object.keys(s).filter((s=>o.test(s)))},getCommonExtensions=s=>s.filter(((s,o)=>/^pattern|maxLength|minLength|maximum|minimum/.test(o)));function deeplyStripKey(s,o,i=()=>!0){if(\"object\"!=typeof s||Array.isArray(s)||null===s||!o)return s;const a=Object.assign({},s);return Object.keys(a).forEach((s=>{s===o&&i(a[s],s)?delete a[s]:a[s]=deeplyStripKey(a[s],o,i)})),a}function stringify(s){if(\"string\"==typeof s)return s;if(s&&s.toJS&&(s=s.toJS()),\"object\"==typeof s&&null!==s)try{return JSON.stringify(s,null,2)}catch(o){return String(s)}return null==s?\"\":s.toString()}function paramToIdentifier(s,{returnAll:o=!1,allowHashes:i=!0}={}){if(!We().Map.isMap(s))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const a=s.get(\"name\"),u=s.get(\"in\");let _=[];return s&&s.hashCode&&u&&a&&i&&_.push(`${u}.${a}.hash-${s.hashCode()}`),u&&a&&_.push(`${u}.${a}`),_.push(a),o?_:_[0]||\"\"}function paramToValue(s,o){return paramToIdentifier(s,{returnAll:!0}).map((s=>o[s])).filter((s=>void 0!==s))[0]}function b64toB64UrlEncoded(s){return s.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=s=>!s||!(!isImmutable(s)||!s.isEmpty()),idFn=s=>s;function createStoreWithMiddleware(s,o,i){let a=[systemThunkMiddleware(i)];return createStore(s,o,(lt.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||compose)(function applyMiddleware(...s){return o=>(i,a)=>{const u=o(i,a);let dispatch=()=>{throw new Error(formatProdErrorMessage(15))};const _={getState:u.getState,dispatch:(s,...o)=>dispatch(s,...o)},w=s.map((s=>s(_)));return dispatch=compose(...w)(u.dispatch),{...u,dispatch}}}(...a)))}class Store{constructor(s={}){Ye()(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},s),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(s,o,i){return createStoreWithMiddleware(s,o,i)}(idFn,(0,ze.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(s,o=!0){var i=combinePlugins(s,this.getSystem());systemExtend(this.system,i),o&&this.buildSystem();callAfterLoad.call(this.system,s,this.getSystem())&&this.buildSystem()}buildSystem(s=!0){let o=this.getStore().dispatch,i=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(o),this.getWrappedAndBoundSelectors(i,this.getSystem),this.getStateThunks(i),this.getFn(),this.getConfigs()),s&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:We(),React:Re},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(s){this.system.configs=s}rebuildReducer(){this.store.replaceReducer(function buildReducer(s,o){return function allReducers(s,o){let i=Object.keys(s).reduce(((i,a)=>(i[a]=function makeReducer(s,o){return(i=new ze.Map,a)=>{if(!s)return i;let u=s[a.type];if(u){const s=wrapWithTryCatch(u,o)(i,a);return null===s?i:s}return i}}(s[a],o),i)),{});if(!Object.keys(i).length)return idFn;return(0,Xe.H)(i)}(objMap(s,(s=>s.reducers)),o)}(this.system.statePlugins,this.getSystem))}getType(s){let o=s[0].toUpperCase()+s.slice(1);return objReduce(this.system.statePlugins,((i,a)=>{let u=i[s];if(u)return{[a+o]:u}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(s=>objReduce(s,((s,o)=>{if(isFn(s))return{[o]:s}}))))}getWrappedAndBoundActions(s){return objMap(this.getBoundActions(s),((s,o)=>{let i=this.system.statePlugins[o.slice(0,-7)].wrapActions;return i?objMap(s,((s,o)=>{let a=i[o];return a?(Array.isArray(a)||(a=[a]),a.reduce(((s,o)=>{let newAction=(...i)=>o(s,this.getSystem())(...i);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction,this.getSystem)}),s||Function.prototype)):s})):s}))}getWrappedAndBoundSelectors(s,o){return objMap(this.getBoundSelectors(s,o),((o,i)=>{let a=[i.slice(0,-9)],u=this.system.statePlugins[a].wrapSelectors;return u?objMap(o,((o,i)=>{let _=u[i];return _?(Array.isArray(_)||(_=[_]),_.reduce(((o,i)=>{let wrappedSelector=(...u)=>i(o,this.getSystem())(s().getIn(a),...u);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),o||Function.prototype)):o})):o}))}getStates(s){return Object.keys(this.system.statePlugins).reduce(((o,i)=>(o[i]=s.get(i),o)),{})}getStateThunks(s){return Object.keys(this.system.statePlugins).reduce(((o,i)=>(o[i]=()=>s().get(i),o)),{})}getFn(){return{fn:this.system.fn}}getComponents(s){const o=this.system.components[s];return Array.isArray(o)?o.reduce(((s,o)=>o(s,this.getSystem()))):void 0!==s?this.system.components[s]:this.system.components}getBoundSelectors(s,o){return objMap(this.getSelectors(),((i,a)=>{let u=[a.slice(0,-9)];return objMap(i,(i=>(...a)=>{let _=wrapWithTryCatch(i,this.getSystem).apply(null,[s().getIn(u),...a]);return\"function\"==typeof _&&(_=wrapWithTryCatch(_,this.getSystem)(o())),_}))}))}getBoundActions(s){s=s||this.getStore().dispatch;const o=this.getActions(),process=s=>\"function\"!=typeof s?objMap(s,(s=>process(s))):(...o)=>{var i=null;try{i=s(...o)}catch(s){i={type:rt,error:!0,payload:(0,Qe.serializeError)(s)}}finally{return i}};return objMap(o,(o=>function bindActionCreators(s,o){if(\"function\"==typeof s)return bindActionCreator(s,o);if(\"object\"!=typeof s||null===s)throw new Error(formatProdErrorMessage(16));const i={};for(const a in s){const u=s[a];\"function\"==typeof u&&(i[a]=bindActionCreator(u,o))}return i}(process(o),s)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(s){return o=>Ye()({},this.getWrappedAndBoundActions(o),this.getFn(),s)}}function combinePlugins(s,o){return isObject(s)&&!isArray(s)?tt()({},s):isFunc(s)?combinePlugins(s(o),o):isArray(s)?s.map((s=>combinePlugins(s,o))).reduce(systemExtend,{components:o.getComponents()}):{}}function callAfterLoad(s,o,{hasLoaded:i}={}){let a=i;return isObject(s)&&!isArray(s)&&\"function\"==typeof s.afterLoad&&(a=!0,wrapWithTryCatch(s.afterLoad,o.getSystem).call(this,o)),isFunc(s)?callAfterLoad.call(this,s(o),o,{hasLoaded:a}):isArray(s)?s.map((s=>callAfterLoad.call(this,s,o,{hasLoaded:a}))):a}function systemExtend(s={},o={}){if(!isObject(s))return{};if(!isObject(o))return s;o.wrapComponents&&(objMap(o.wrapComponents,((i,a)=>{const u=s.components&&s.components[a];u&&Array.isArray(u)?(s.components[a]=u.concat([i]),delete o.wrapComponents[a]):u&&(s.components[a]=[u,i],delete o.wrapComponents[a])})),Object.keys(o.wrapComponents).length||delete o.wrapComponents);const{statePlugins:i}=s;if(isObject(i))for(let s in i){const a=i[s];if(!isObject(a))continue;const{wrapActions:u,wrapSelectors:_}=a;if(isObject(u))for(let i in u){let a=u[i];Array.isArray(a)||(a=[a],u[i]=a),o&&o.statePlugins&&o.statePlugins[s]&&o.statePlugins[s].wrapActions&&o.statePlugins[s].wrapActions[i]&&(o.statePlugins[s].wrapActions[i]=u[i].concat(o.statePlugins[s].wrapActions[i]))}if(isObject(_))for(let i in _){let a=_[i];Array.isArray(a)||(a=[a],_[i]=a),o&&o.statePlugins&&o.statePlugins[s]&&o.statePlugins[s].wrapSelectors&&o.statePlugins[s].wrapSelectors[i]&&(o.statePlugins[s].wrapSelectors[i]=_[i].concat(o.statePlugins[s].wrapSelectors[i]))}}return Ye()(s,o)}function wrapWithTryCatch(s,o,{logErrors:i=!0}={}){return\"function\"!=typeof s?s:function(...a){try{return s.call(this,...a)}catch(s){if(i){const{uncaughtExceptionHandler:i}=o().getConfigs();\"function\"==typeof i?i(s):console.error(s)}return null}}}var Tt=__webpack_require__(61160),Nt=__webpack_require__.n(Tt);const Mt=\"show_popup\",Rt=\"authorize\",Dt=\"logout\",Lt=\"authorize_oauth2\",Ft=\"configure_auth\",Bt=\"restore_authorization\";function showDefinitions(s){return{type:Mt,payload:s}}function authorize(s){return{type:Rt,payload:s}}const authorizeWithPersistOption=s=>({authActions:o})=>{o.authorize(s),o.persistAuthorizationIfNeeded()};function logout(s){return{type:Dt,payload:s}}const logoutWithPersistOption=s=>({authActions:o})=>{o.logout(s),o.persistAuthorizationIfNeeded()},preAuthorizeImplicit=s=>({authActions:o,errActions:i})=>{let{auth:a,token:u,isValid:_}=s,{schema:w,name:x}=a,C=w.get(\"flow\");delete lt.swaggerUIRedirectOauth2,\"accessCode\"===C||_||i.newAuthErr({authId:x,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),u.error?i.newAuthErr({authId:x,source:\"auth\",level:\"error\",message:JSON.stringify(u)}):o.authorizeOauth2WithPersistOption({auth:a,token:u})};function authorizeOauth2(s){return{type:Lt,payload:s}}const authorizeOauth2WithPersistOption=s=>({authActions:o})=>{o.authorizeOauth2(s),o.persistAuthorizationIfNeeded()},authorizePassword=s=>({authActions:o})=>{let{schema:i,name:a,username:u,password:_,passwordType:w,clientId:x,clientSecret:C}=s,j={grant_type:\"password\",scope:s.scopes.join(\" \"),username:u,password:_},L={};switch(w){case\"request-body\":!function setClientIdAndSecret(s,o,i){o&&Object.assign(s,{client_id:o});i&&Object.assign(s,{client_secret:i})}(j,x,C);break;case\"basic\":L.Authorization=\"Basic \"+utils_btoa(x+\":\"+C);break;default:console.warn(`Warning: invalid passwordType ${w} was passed, not including client id and secret`)}return o.authorizeRequest({body:buildFormData(j),url:i.get(\"tokenUrl\"),name:a,headers:L,query:{},auth:s})};const authorizeApplication=s=>({authActions:o})=>{let{schema:i,scopes:a,name:u,clientId:_,clientSecret:w}=s,x={Authorization:\"Basic \"+utils_btoa(_+\":\"+w)},C={grant_type:\"client_credentials\",scope:a.join(\" \")};return o.authorizeRequest({body:buildFormData(C),name:u,url:i.get(\"tokenUrl\"),auth:s,headers:x})},authorizeAccessCodeWithFormParams=({auth:s,redirectUrl:o})=>({authActions:i})=>{let{schema:a,name:u,clientId:_,clientSecret:w,codeVerifier:x}=s,C={grant_type:\"authorization_code\",code:s.code,client_id:_,client_secret:w,redirect_uri:o,code_verifier:x};return i.authorizeRequest({body:buildFormData(C),name:u,url:a.get(\"tokenUrl\"),auth:s})},authorizeAccessCodeWithBasicAuthentication=({auth:s,redirectUrl:o})=>({authActions:i})=>{let{schema:a,name:u,clientId:_,clientSecret:w,codeVerifier:x}=s,C={Authorization:\"Basic \"+utils_btoa(_+\":\"+w)},j={grant_type:\"authorization_code\",code:s.code,client_id:_,redirect_uri:o,code_verifier:x};return i.authorizeRequest({body:buildFormData(j),name:u,url:a.get(\"tokenUrl\"),auth:s,headers:C})},authorizeRequest=s=>({fn:o,getConfigs:i,authActions:a,errActions:u,oas3Selectors:_,specSelectors:w,authSelectors:x})=>{let C,{body:j,query:L={},headers:B={},name:$,url:V,auth:U}=s,{additionalQueryStringParams:z}=x.getConfigs()||{};if(w.isOAS3()){let s=_.serverEffectiveValue(_.selectedServer());C=Nt()(V,s,!0)}else C=Nt()(V,w.url(),!0);\"object\"==typeof z&&(C.query=Object.assign({},C.query,z));const Y=C.toString();let Z=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},B);o.fetch({url:Y,method:\"post\",headers:Z,query:L,body:j,requestInterceptor:i().requestInterceptor,responseInterceptor:i().responseInterceptor}).then((function(s){let o=JSON.parse(s.data),i=o&&(o.error||\"\"),_=o&&(o.parseError||\"\");s.ok?i||_?u.newAuthErr({authId:$,level:\"error\",source:\"auth\",message:JSON.stringify(o)}):a.authorizeOauth2WithPersistOption({auth:U,token:o}):u.newAuthErr({authId:$,level:\"error\",source:\"auth\",message:s.statusText})})).catch((s=>{let o=new Error(s).message;if(s.response&&s.response.data){const i=s.response.data;try{const s=\"string\"==typeof i?JSON.parse(i):i;s.error&&(o+=`, error: ${s.error}`),s.error_description&&(o+=`, description: ${s.error_description}`)}catch(s){}}u.newAuthErr({authId:$,level:\"error\",source:\"auth\",message:o})}))};function configureAuth(s){return{type:Ft,payload:s}}function restoreAuthorization(s){return{type:Bt,payload:s}}const persistAuthorizationIfNeeded=()=>({authSelectors:s,getConfigs:o})=>{if(!o().persistAuthorization)return;const i=s.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(i))},authPopup=(s,o)=>()=>{lt.swaggerUIRedirectOauth2=o,lt.open(s)},$t={[Mt]:(s,{payload:o})=>s.set(\"showDefinitions\",o),[Rt]:(s,{payload:o})=>{let i=(0,ze.fromJS)(o),a=s.get(\"authorized\")||(0,ze.Map)();return i.entrySeq().forEach((([o,i])=>{if(!isFunc(i.getIn))return s.set(\"authorized\",a);let u=i.getIn([\"schema\",\"type\"]);if(\"apiKey\"===u||\"http\"===u)a=a.set(o,i);else if(\"basic\"===u){let s=i.getIn([\"value\",\"username\"]),u=i.getIn([\"value\",\"password\"]);a=a.setIn([o,\"value\"],{username:s,header:\"Basic \"+utils_btoa(s+\":\"+u)}),a=a.setIn([o,\"schema\"],i.get(\"schema\"))}})),s.set(\"authorized\",a)},[Lt]:(s,{payload:o})=>{let i,{auth:a,token:u}=o;a.token=Object.assign({},u),i=(0,ze.fromJS)(a);let _=s.get(\"authorized\")||(0,ze.Map)();return _=_.set(i.get(\"name\"),i),s.set(\"authorized\",_)},[Dt]:(s,{payload:o})=>{let i=s.get(\"authorized\").withMutations((s=>{o.forEach((o=>{s.delete(o)}))}));return s.set(\"authorized\",i)},[Ft]:(s,{payload:o})=>s.set(\"configs\",o),[Bt]:(s,{payload:o})=>s.set(\"authorized\",(0,ze.fromJS)(o.authorized))};function assertIsFunction(s,o=\"expected a function, instead received \"+typeof s){if(\"function\"!=typeof s)throw new TypeError(o)}var ensureIsArray=s=>Array.isArray(s)?s:[s];function getDependencies(s){const o=Array.isArray(s[0])?s[0]:s;return function assertIsArrayOfFunctions(s,o=\"expected all items to be functions, instead received the following types: \"){if(!s.every((s=>\"function\"==typeof s))){const i=s.map((s=>\"function\"==typeof s?`function ${s.name||\"unnamed\"}()`:typeof s)).join(\", \");throw new TypeError(`${o}[${i}]`)}}(o,\"createSelector expects all input-selectors to be functions, but received the following types: \"),o}Symbol(),Object.getPrototypeOf({});var qt=\"undefined\"!=typeof WeakRef?WeakRef:class{constructor(s){this.value=s}deref(){return this.value}};function weakMapMemoize(s,o={}){let i={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:a}=o;let u,_=0;function memoized(){let o=i;const{length:w}=arguments;for(let s=0,i=w;s<i;s++){const i=arguments[s];if(\"function\"==typeof i||\"object\"==typeof i&&null!==i){let s=o.o;null===s&&(o.o=s=new WeakMap);const a=s.get(i);void 0===a?(o={s:0,v:void 0,o:null,p:null},s.set(i,o)):o=a}else{let s=o.p;null===s&&(o.p=s=new Map);const a=s.get(i);void 0===a?(o={s:0,v:void 0,o:null,p:null},s.set(i,o)):o=a}}const x=o;let C;if(1===o.s)C=o.v;else if(C=s.apply(null,arguments),_++,a){const s=u?.deref?.()??u;null!=s&&a(s,C)&&(C=s,0!==_&&_--);u=\"object\"==typeof C&&null!==C||\"function\"==typeof C?new qt(C):C}return x.s=1,x.v=C,C}return memoized.clearCache=()=>{i={s:0,v:void 0,o:null,p:null},memoized.resetResultsCount()},memoized.resultsCount=()=>_,memoized.resetResultsCount=()=>{_=0},memoized}function createSelectorCreator(s,...o){const i=\"function\"==typeof s?{memoize:s,memoizeOptions:o}:s,createSelector2=(...s)=>{let o,a=0,u=0,_={},w=s.pop();\"object\"==typeof w&&(_=w,w=s.pop()),assertIsFunction(w,`createSelector expects an output function after the inputs, but received: [${typeof w}]`);const x={...i,..._},{memoize:C,memoizeOptions:j=[],argsMemoize:L=weakMapMemoize,argsMemoizeOptions:B=[],devModeChecks:$={}}=x,V=ensureIsArray(j),U=ensureIsArray(B),z=getDependencies(s),Y=C((function recomputationWrapper(){return a++,w.apply(null,arguments)}),...V);const Z=L((function dependenciesChecker(){u++;const s=function collectInputSelectorResults(s,o){const i=[],{length:a}=s;for(let u=0;u<a;u++)i.push(s[u].apply(null,o));return i}(z,arguments);return o=Y.apply(null,s),o}),...U);return Object.assign(Z,{resultFunc:w,memoizedResultFunc:Y,dependencies:z,dependencyRecomputations:()=>u,resetDependencyRecomputations:()=>{u=0},lastResult:()=>o,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:C,argsMemoize:L})};return Object.assign(createSelector2,{withTypes:()=>createSelector2}),createSelector2}var Vt=createSelectorCreator(weakMapMemoize),Ut=Object.assign(((s,o=Vt)=>{!function assertIsObject(s,o=\"expected an object, instead received \"+typeof s){if(\"object\"!=typeof s)throw new TypeError(o)}(s,\"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a \"+typeof s);const i=Object.keys(s);return o(i.map((o=>s[o])),((...s)=>s.reduce(((s,o,a)=>(s[i[a]]=o,s)),{})))}),{withTypes:()=>Ut});const state=s=>s,zt=Vt(state,(s=>s.get(\"showDefinitions\"))),Wt=Vt(state,(()=>({specSelectors:s})=>{let o=s.securityDefinitions()||(0,ze.Map)({}),i=(0,ze.List)();return o.entrySeq().forEach((([s,o])=>{let a=(0,ze.Map)();a=a.set(s,o),i=i.push(a)})),i})),selectAuthPath=(s,o)=>({specSelectors:s})=>(0,ze.List)(s.isOAS3()?[\"components\",\"securitySchemes\",o]:[\"securityDefinitions\",o]),getDefinitionsByNames=(s,o)=>({specSelectors:s})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let i=s.securityDefinitions(),a=(0,ze.List)();return o.valueSeq().forEach((s=>{let o=(0,ze.Map)();s.entrySeq().forEach((([s,a])=>{let u,_=i.get(s);\"oauth2\"===_.get(\"type\")&&a.size&&(u=_.get(\"scopes\"),u.keySeq().forEach((s=>{a.contains(s)||(u=u.delete(s))})),_=_.set(\"allowedScopes\",u)),o=o.set(s,_)})),a=a.push(o)})),a},definitionsForRequirements=(s,o=(0,ze.List)())=>({authSelectors:s})=>{const i=s.definitionsToAuthorize()||(0,ze.List)();let a=(0,ze.List)();return i.forEach((s=>{let i=o.find((o=>o.get(s.keySeq().first())));i&&(s.forEach(((o,a)=>{if(\"oauth2\"===o.get(\"type\")){const u=i.get(a);let _=o.get(\"scopes\");ze.List.isList(u)&&ze.Map.isMap(_)&&(_.keySeq().forEach((s=>{u.contains(s)||(_=_.delete(s))})),s=s.set(a,o.set(\"scopes\",_)))}})),a=a.push(s))})),a},Jt=Vt(state,(s=>s.get(\"authorized\")||(0,ze.Map)())),isAuthorized=(s,o)=>({authSelectors:s})=>{let i=s.authorized();return ze.List.isList(o)?!!o.toJS().filter((s=>-1===Object.keys(s).map((s=>!!i.get(s))).indexOf(!1))).length:null},Ht=Vt(state,(s=>s.get(\"configs\"))),execute=(s,{authSelectors:o,specSelectors:i})=>({path:a,method:u,operation:_,extras:w})=>{let x={authorized:o.authorized()&&o.authorized().toJS(),definitions:i.securityDefinitions()&&i.securityDefinitions().toJS(),specSecurity:i.security()&&i.security().toJS()};return s({path:a,method:u,operation:_,securities:x,...w})},loaded=(s,o)=>i=>{const{getConfigs:a,authActions:u}=o,_=a();if(s(i),_.persistAuthorization){const s=localStorage.getItem(\"authorized\");s&&u.restoreAuthorization({authorized:JSON.parse(s)})}},wrap_actions_authorize=(s,o)=>i=>{s(i);if(o.getConfigs().persistAuthorization)try{const[{schema:s,value:o}]=Object.values(i),a=\"apiKey\"===s.get(\"type\"),u=\"cookie\"===s.get(\"in\");a&&u&&(document.cookie=`${s.get(\"name\")}=${o}; SameSite=None; Secure`)}catch(s){console.error(\"Error persisting cookie based apiKey in document.cookie.\",s)}},wrap_actions_logout=(s,o)=>i=>{const a=o.getConfigs(),u=o.authSelectors.authorized();try{a.persistAuthorization&&Array.isArray(i)&&i.forEach((s=>{const o=u.get(s,{}),i=\"apiKey\"===o.getIn([\"schema\",\"type\"]),a=\"cookie\"===o.getIn([\"schema\",\"in\"]);if(i&&a){const s=o.getIn([\"schema\",\"name\"]);document.cookie=`${s}=; Max-Age=-99999999`}}))}catch(s){console.error(\"Error deleting cookie based apiKey from document.cookie.\",s)}s(i)};var Kt=__webpack_require__(90179),Gt=__webpack_require__.n(Kt);class LockAuthIcon extends Re.Component{mapStateToProps(s,o){return{state:s,ownProps:Gt()(o,Object.keys(o.getSystem()))}}render(){const{getComponent:s,ownProps:o}=this.props,i=s(\"LockIcon\");return Re.createElement(i,o)}}const Yt=LockAuthIcon;class UnlockAuthIcon extends Re.Component{mapStateToProps(s,o){return{state:s,ownProps:Gt()(o,Object.keys(o.getSystem()))}}render(){const{getComponent:s,ownProps:o}=this.props,i=s(\"UnlockIcon\");return Re.createElement(i,o)}}const Xt=UnlockAuthIcon;function auth(){return{afterLoad(s){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=s.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,s),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,s)},components:{LockAuthIcon:Yt,UnlockAuthIcon:Xt,LockAuthOperationIcon:Yt,UnlockAuthOperationIcon:Xt},statePlugins:{auth:{reducers:$t,actions:o,selectors:a,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(s,o,i,a){const{authActions:{authorize:u},specSelectors:{specJson:_,isOAS3:w}}=s,x=w()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],C=_().getIn([...x,o]);return C?u({[o]:{value:{username:i,password:a},schema:C.toJS()}}):null}function preauthorizeApiKey(s,o,i){const{authActions:{authorize:a},specSelectors:{specJson:u,isOAS3:_}}=s,w=_()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],x=u().getIn([...w,o]);return x?a({[o]:{value:i,schema:x.toJS()}}):null}function isNothing(s){return null==s}var Qt=function repeat(s,o){var i,a=\"\";for(i=0;i<o;i+=1)a+=s;return a},Zt=function isNegativeZero(s){return 0===s&&Number.NEGATIVE_INFINITY===1/s},er={isNothing,isObject:function js_yaml_isObject(s){return\"object\"==typeof s&&null!==s},toArray:function toArray(s){return Array.isArray(s)?s:isNothing(s)?[]:[s]},repeat:Qt,isNegativeZero:Zt,extend:function extend(s,o){var i,a,u,_;if(o)for(i=0,a=(_=Object.keys(o)).length;i<a;i+=1)s[u=_[i]]=o[u];return s}};function formatError(s,o){var i=\"\",a=s.reason||\"(unknown reason)\";return s.mark?(s.mark.name&&(i+='in \"'+s.mark.name+'\" '),i+=\"(\"+(s.mark.line+1)+\":\"+(s.mark.column+1)+\")\",!o&&s.mark.snippet&&(i+=\"\\n\\n\"+s.mark.snippet),a+\" \"+i):a}function YAMLException$1(s,o){Error.call(this),this.name=\"YAMLException\",this.reason=s,this.mark=o,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(s){return this.name+\": \"+formatError(this,s)};var tr=YAMLException$1;function getLine(s,o,i,a,u){var _=\"\",w=\"\",x=Math.floor(u/2)-1;return a-o>x&&(o=a-x+(_=\" ... \").length),i-a>x&&(i=a+x-(w=\" ...\").length),{str:_+s.slice(o,i).replace(/\\t/g,\"→\")+w,pos:a-o+_.length}}function padStart(s,o){return er.repeat(\" \",o-s.length)+s}var rr=function makeSnippet(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),\"number\"!=typeof o.indent&&(o.indent=1),\"number\"!=typeof o.linesBefore&&(o.linesBefore=3),\"number\"!=typeof o.linesAfter&&(o.linesAfter=2);for(var i,a=/\\r?\\n|\\r|\\0/g,u=[0],_=[],w=-1;i=a.exec(s.buffer);)_.push(i.index),u.push(i.index+i[0].length),s.position<=i.index&&w<0&&(w=u.length-2);w<0&&(w=u.length-1);var x,C,j=\"\",L=Math.min(s.line+o.linesAfter,_.length).toString().length,B=o.maxLength-(o.indent+L+3);for(x=1;x<=o.linesBefore&&!(w-x<0);x++)C=getLine(s.buffer,u[w-x],_[w-x],s.position-(u[w]-u[w-x]),B),j=er.repeat(\" \",o.indent)+padStart((s.line-x+1).toString(),L)+\" | \"+C.str+\"\\n\"+j;for(C=getLine(s.buffer,u[w],_[w],s.position,B),j+=er.repeat(\" \",o.indent)+padStart((s.line+1).toString(),L)+\" | \"+C.str+\"\\n\",j+=er.repeat(\"-\",o.indent+L+3+C.pos)+\"^\\n\",x=1;x<=o.linesAfter&&!(w+x>=_.length);x++)C=getLine(s.buffer,u[w+x],_[w+x],s.position-(u[w]-u[w+x]),B),j+=er.repeat(\" \",o.indent)+padStart((s.line+x+1).toString(),L)+\" | \"+C.str+\"\\n\";return j.replace(/\\n$/,\"\")},nr=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],sr=[\"scalar\",\"sequence\",\"mapping\"];var ir=function Type$1(s,o){if(o=o||{},Object.keys(o).forEach((function(o){if(-1===nr.indexOf(o))throw new tr('Unknown option \"'+o+'\" is met in definition of \"'+s+'\" YAML type.')})),this.options=o,this.tag=s,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(s){return s},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=function compileStyleAliases(s){var o={};return null!==s&&Object.keys(s).forEach((function(i){s[i].forEach((function(s){o[String(s)]=i}))})),o}(o.styleAliases||null),-1===sr.indexOf(this.kind))throw new tr('Unknown kind \"'+this.kind+'\" is specified for \"'+s+'\" YAML type.')};function compileList(s,o){var i=[];return s[o].forEach((function(s){var o=i.length;i.forEach((function(i,a){i.tag===s.tag&&i.kind===s.kind&&i.multi===s.multi&&(o=a)})),i[o]=s})),i}function Schema$1(s){return this.extend(s)}Schema$1.prototype.extend=function extend(s){var o=[],i=[];if(s instanceof ir)i.push(s);else if(Array.isArray(s))i=i.concat(s);else{if(!s||!Array.isArray(s.implicit)&&!Array.isArray(s.explicit))throw new tr(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");s.implicit&&(o=o.concat(s.implicit)),s.explicit&&(i=i.concat(s.explicit))}o.forEach((function(s){if(!(s instanceof ir))throw new tr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(s.loadKind&&\"scalar\"!==s.loadKind)throw new tr(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(s.multi)throw new tr(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),i.forEach((function(s){if(!(s instanceof ir))throw new tr(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var a=Object.create(Schema$1.prototype);return a.implicit=(this.implicit||[]).concat(o),a.explicit=(this.explicit||[]).concat(i),a.compiledImplicit=compileList(a,\"implicit\"),a.compiledExplicit=compileList(a,\"explicit\"),a.compiledTypeMap=function compileMap(){var s,o,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(s){s.multi?(i.multi[s.kind].push(s),i.multi.fallback.push(s)):i[s.kind][s.tag]=i.fallback[s.tag]=s}for(s=0,o=arguments.length;s<o;s+=1)arguments[s].forEach(collectType);return i}(a.compiledImplicit,a.compiledExplicit),a};var ar=Schema$1,cr=new ir(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(s){return null!==s?s:\"\"}}),lr=new ir(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(s){return null!==s?s:[]}}),ur=new ir(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(s){return null!==s?s:{}}}),pr=new ar({explicit:[cr,lr,ur]});var dr=new ir(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:function resolveYamlNull(s){if(null===s)return!0;var o=s.length;return 1===o&&\"~\"===s||4===o&&(\"null\"===s||\"Null\"===s||\"NULL\"===s)},construct:function constructYamlNull(){return null},predicate:function isNull(s){return null===s},represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});var fr=new ir(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:function resolveYamlBoolean(s){if(null===s)return!1;var o=s.length;return 4===o&&(\"true\"===s||\"True\"===s||\"TRUE\"===s)||5===o&&(\"false\"===s||\"False\"===s||\"FALSE\"===s)},construct:function constructYamlBoolean(s){return\"true\"===s||\"True\"===s||\"TRUE\"===s},predicate:function isBoolean(s){return\"[object Boolean]\"===Object.prototype.toString.call(s)},represent:{lowercase:function(s){return s?\"true\":\"false\"},uppercase:function(s){return s?\"TRUE\":\"FALSE\"},camelcase:function(s){return s?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isOctCode(s){return 48<=s&&s<=55}function isDecCode(s){return 48<=s&&s<=57}var mr=new ir(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:function resolveYamlInteger(s){if(null===s)return!1;var o,i,a=s.length,u=0,_=!1;if(!a)return!1;if(\"-\"!==(o=s[u])&&\"+\"!==o||(o=s[++u]),\"0\"===o){if(u+1===a)return!0;if(\"b\"===(o=s[++u])){for(u++;u<a;u++)if(\"_\"!==(o=s[u])){if(\"0\"!==o&&\"1\"!==o)return!1;_=!0}return _&&\"_\"!==o}if(\"x\"===o){for(u++;u<a;u++)if(\"_\"!==(o=s[u])){if(!(48<=(i=s.charCodeAt(u))&&i<=57||65<=i&&i<=70||97<=i&&i<=102))return!1;_=!0}return _&&\"_\"!==o}if(\"o\"===o){for(u++;u<a;u++)if(\"_\"!==(o=s[u])){if(!isOctCode(s.charCodeAt(u)))return!1;_=!0}return _&&\"_\"!==o}}if(\"_\"===o)return!1;for(;u<a;u++)if(\"_\"!==(o=s[u])){if(!isDecCode(s.charCodeAt(u)))return!1;_=!0}return!(!_||\"_\"===o)},construct:function constructYamlInteger(s){var o,i=s,a=1;if(-1!==i.indexOf(\"_\")&&(i=i.replace(/_/g,\"\")),\"-\"!==(o=i[0])&&\"+\"!==o||(\"-\"===o&&(a=-1),o=(i=i.slice(1))[0]),\"0\"===i)return 0;if(\"0\"===o){if(\"b\"===i[1])return a*parseInt(i.slice(2),2);if(\"x\"===i[1])return a*parseInt(i.slice(2),16);if(\"o\"===i[1])return a*parseInt(i.slice(2),8)}return a*parseInt(i,10)},predicate:function isInteger(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&s%1==0&&!er.isNegativeZero(s)},represent:{binary:function(s){return s>=0?\"0b\"+s.toString(2):\"-0b\"+s.toString(2).slice(1)},octal:function(s){return s>=0?\"0o\"+s.toString(8):\"-0o\"+s.toString(8).slice(1)},decimal:function(s){return s.toString(10)},hexadecimal:function(s){return s>=0?\"0x\"+s.toString(16).toUpperCase():\"-0x\"+s.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),gr=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");var yr=/^[-+]?[0-9]+e/;var vr=new ir(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:function resolveYamlFloat(s){return null!==s&&!(!gr.test(s)||\"_\"===s[s.length-1])},construct:function constructYamlFloat(s){var o,i;return i=\"-\"===(o=s.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(o[0])>=0&&(o=o.slice(1)),\".inf\"===o?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===o?NaN:i*parseFloat(o,10)},predicate:function isFloat(s){return\"[object Number]\"===Object.prototype.toString.call(s)&&(s%1!=0||er.isNegativeZero(s))},represent:function representYamlFloat(s,o){var i;if(isNaN(s))switch(o){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===s)switch(o){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===s)switch(o){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(er.isNegativeZero(s))return\"-0.0\";return i=s.toString(10),yr.test(i)?i.replace(\"e\",\".e\"):i},defaultStyle:\"lowercase\"}),br=pr.extend({implicit:[dr,fr,mr,vr]}),_r=br,Sr=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),Er=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");var wr=new ir(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:function resolveYamlTimestamp(s){return null!==s&&(null!==Sr.exec(s)||null!==Er.exec(s))},construct:function constructYamlTimestamp(s){var o,i,a,u,_,w,x,C,j=0,L=null;if(null===(o=Sr.exec(s))&&(o=Er.exec(s)),null===o)throw new Error(\"Date resolve error\");if(i=+o[1],a=+o[2]-1,u=+o[3],!o[4])return new Date(Date.UTC(i,a,u));if(_=+o[4],w=+o[5],x=+o[6],o[7]){for(j=o[7].slice(0,3);j.length<3;)j+=\"0\";j=+j}return o[9]&&(L=6e4*(60*+o[10]+ +(o[11]||0)),\"-\"===o[9]&&(L=-L)),C=new Date(Date.UTC(i,a,u,_,w,x,j)),L&&C.setTime(C.getTime()-L),C},instanceOf:Date,represent:function representYamlTimestamp(s){return s.toISOString()}});var xr=new ir(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:function resolveYamlMerge(s){return\"<<\"===s||null===s}}),kr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";var Or=new ir(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:function resolveYamlBinary(s){if(null===s)return!1;var o,i,a=0,u=s.length,_=kr;for(i=0;i<u;i++)if(!((o=_.indexOf(s.charAt(i)))>64)){if(o<0)return!1;a+=6}return a%8==0},construct:function constructYamlBinary(s){var o,i,a=s.replace(/[\\r\\n=]/g,\"\"),u=a.length,_=kr,w=0,x=[];for(o=0;o<u;o++)o%4==0&&o&&(x.push(w>>16&255),x.push(w>>8&255),x.push(255&w)),w=w<<6|_.indexOf(a.charAt(o));return 0===(i=u%4*6)?(x.push(w>>16&255),x.push(w>>8&255),x.push(255&w)):18===i?(x.push(w>>10&255),x.push(w>>2&255)):12===i&&x.push(w>>4&255),new Uint8Array(x)},predicate:function isBinary(s){return\"[object Uint8Array]\"===Object.prototype.toString.call(s)},represent:function representYamlBinary(s){var o,i,a=\"\",u=0,_=s.length,w=kr;for(o=0;o<_;o++)o%3==0&&o&&(a+=w[u>>18&63],a+=w[u>>12&63],a+=w[u>>6&63],a+=w[63&u]),u=(u<<8)+s[o];return 0===(i=_%3)?(a+=w[u>>18&63],a+=w[u>>12&63],a+=w[u>>6&63],a+=w[63&u]):2===i?(a+=w[u>>10&63],a+=w[u>>4&63],a+=w[u<<2&63],a+=w[64]):1===i&&(a+=w[u>>2&63],a+=w[u<<4&63],a+=w[64],a+=w[64]),a}}),Cr=Object.prototype.hasOwnProperty,Ar=Object.prototype.toString;var jr=new ir(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:function resolveYamlOmap(s){if(null===s)return!0;var o,i,a,u,_,w=[],x=s;for(o=0,i=x.length;o<i;o+=1){if(a=x[o],_=!1,\"[object Object]\"!==Ar.call(a))return!1;for(u in a)if(Cr.call(a,u)){if(_)return!1;_=!0}if(!_)return!1;if(-1!==w.indexOf(u))return!1;w.push(u)}return!0},construct:function constructYamlOmap(s){return null!==s?s:[]}}),Pr=Object.prototype.toString;var Ir=new ir(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:function resolveYamlPairs(s){if(null===s)return!0;var o,i,a,u,_,w=s;for(_=new Array(w.length),o=0,i=w.length;o<i;o+=1){if(a=w[o],\"[object Object]\"!==Pr.call(a))return!1;if(1!==(u=Object.keys(a)).length)return!1;_[o]=[u[0],a[u[0]]]}return!0},construct:function constructYamlPairs(s){if(null===s)return[];var o,i,a,u,_,w=s;for(_=new Array(w.length),o=0,i=w.length;o<i;o+=1)a=w[o],u=Object.keys(a),_[o]=[u[0],a[u[0]]];return _}}),Tr=Object.prototype.hasOwnProperty;var Nr=new ir(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:function resolveYamlSet(s){if(null===s)return!0;var o,i=s;for(o in i)if(Tr.call(i,o)&&null!==i[o])return!1;return!0},construct:function constructYamlSet(s){return null!==s?s:{}}}),Mr=_r.extend({implicit:[wr,xr],explicit:[Or,jr,Ir,Nr]}),Rr=Object.prototype.hasOwnProperty,Dr=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,Lr=/[\\x85\\u2028\\u2029]/,Fr=/[,\\[\\]\\{\\}]/,Br=/^(?:!|!!|![a-z\\-]+!)$/i,$r=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(s){return Object.prototype.toString.call(s)}function is_EOL(s){return 10===s||13===s}function is_WHITE_SPACE(s){return 9===s||32===s}function is_WS_OR_EOL(s){return 9===s||32===s||10===s||13===s}function is_FLOW_INDICATOR(s){return 44===s||91===s||93===s||123===s||125===s}function fromHexCode(s){var o;return 48<=s&&s<=57?s-48:97<=(o=32|s)&&o<=102?o-97+10:-1}function simpleEscapeSequence(s){return 48===s?\"\\0\":97===s?\"\u0007\":98===s?\"\\b\":116===s||9===s?\"\\t\":110===s?\"\\n\":118===s?\"\\v\":102===s?\"\\f\":114===s?\"\\r\":101===s?\"\u001b\":32===s?\" \":34===s?'\"':47===s?\"/\":92===s?\"\\\\\":78===s?\"\":95===s?\" \":76===s?\"\\u2028\":80===s?\"\\u2029\":\"\"}function charFromCodepoint(s){return s<=65535?String.fromCharCode(s):String.fromCharCode(55296+(s-65536>>10),56320+(s-65536&1023))}for(var qr=new Array(256),Vr=new Array(256),Ur=0;Ur<256;Ur++)qr[Ur]=simpleEscapeSequence(Ur)?1:0,Vr[Ur]=simpleEscapeSequence(Ur);function State$1(s,o){this.input=s,this.filename=o.filename||null,this.schema=o.schema||Mr,this.onWarning=o.onWarning||null,this.legacy=o.legacy||!1,this.json=o.json||!1,this.listener=o.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=s.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(s,o){var i={name:s.filename,buffer:s.input.slice(0,-1),position:s.position,line:s.line,column:s.position-s.lineStart};return i.snippet=rr(i),new tr(o,i)}function throwError(s,o){throw generateError(s,o)}function throwWarning(s,o){s.onWarning&&s.onWarning.call(null,generateError(s,o))}var zr={YAML:function handleYamlDirective(s,o,i){var a,u,_;null!==s.version&&throwError(s,\"duplication of %YAML directive\"),1!==i.length&&throwError(s,\"YAML directive accepts exactly one argument\"),null===(a=/^([0-9]+)\\.([0-9]+)$/.exec(i[0]))&&throwError(s,\"ill-formed argument of the YAML directive\"),u=parseInt(a[1],10),_=parseInt(a[2],10),1!==u&&throwError(s,\"unacceptable YAML version of the document\"),s.version=i[0],s.checkLineBreaks=_<2,1!==_&&2!==_&&throwWarning(s,\"unsupported YAML version of the document\")},TAG:function handleTagDirective(s,o,i){var a,u;2!==i.length&&throwError(s,\"TAG directive accepts exactly two arguments\"),a=i[0],u=i[1],Br.test(a)||throwError(s,\"ill-formed tag handle (first argument) of the TAG directive\"),Rr.call(s.tagMap,a)&&throwError(s,'there is a previously declared suffix for \"'+a+'\" tag handle'),$r.test(u)||throwError(s,\"ill-formed tag prefix (second argument) of the TAG directive\");try{u=decodeURIComponent(u)}catch(o){throwError(s,\"tag prefix is malformed: \"+u)}s.tagMap[a]=u}};function captureSegment(s,o,i,a){var u,_,w,x;if(o<i){if(x=s.input.slice(o,i),a)for(u=0,_=x.length;u<_;u+=1)9===(w=x.charCodeAt(u))||32<=w&&w<=1114111||throwError(s,\"expected valid JSON character\");else Dr.test(x)&&throwError(s,\"the stream contains non-printable characters\");s.result+=x}}function mergeMappings(s,o,i,a){var u,_,w,x;for(er.isObject(i)||throwError(s,\"cannot merge mappings; the provided source object is unacceptable\"),w=0,x=(u=Object.keys(i)).length;w<x;w+=1)_=u[w],Rr.call(o,_)||(o[_]=i[_],a[_]=!0)}function storeMappingPair(s,o,i,a,u,_,w,x,C){var j,L;if(Array.isArray(u))for(j=0,L=(u=Array.prototype.slice.call(u)).length;j<L;j+=1)Array.isArray(u[j])&&throwError(s,\"nested arrays are not supported inside keys\"),\"object\"==typeof u&&\"[object Object]\"===_class(u[j])&&(u[j]=\"[object Object]\");if(\"object\"==typeof u&&\"[object Object]\"===_class(u)&&(u=\"[object Object]\"),u=String(u),null===o&&(o={}),\"tag:yaml.org,2002:merge\"===a)if(Array.isArray(_))for(j=0,L=_.length;j<L;j+=1)mergeMappings(s,o,_[j],i);else mergeMappings(s,o,_,i);else s.json||Rr.call(i,u)||!Rr.call(o,u)||(s.line=w||s.line,s.lineStart=x||s.lineStart,s.position=C||s.position,throwError(s,\"duplicated mapping key\")),\"__proto__\"===u?Object.defineProperty(o,u,{configurable:!0,enumerable:!0,writable:!0,value:_}):o[u]=_,delete i[u];return o}function readLineBreak(s){var o;10===(o=s.input.charCodeAt(s.position))?s.position++:13===o?(s.position++,10===s.input.charCodeAt(s.position)&&s.position++):throwError(s,\"a line break is expected\"),s.line+=1,s.lineStart=s.position,s.firstTabInLine=-1}function skipSeparationSpace(s,o,i){for(var a=0,u=s.input.charCodeAt(s.position);0!==u;){for(;is_WHITE_SPACE(u);)9===u&&-1===s.firstTabInLine&&(s.firstTabInLine=s.position),u=s.input.charCodeAt(++s.position);if(o&&35===u)do{u=s.input.charCodeAt(++s.position)}while(10!==u&&13!==u&&0!==u);if(!is_EOL(u))break;for(readLineBreak(s),u=s.input.charCodeAt(s.position),a++,s.lineIndent=0;32===u;)s.lineIndent++,u=s.input.charCodeAt(++s.position)}return-1!==i&&0!==a&&s.lineIndent<i&&throwWarning(s,\"deficient indentation\"),a}function testDocumentSeparator(s){var o,i=s.position;return!(45!==(o=s.input.charCodeAt(i))&&46!==o||o!==s.input.charCodeAt(i+1)||o!==s.input.charCodeAt(i+2)||(i+=3,0!==(o=s.input.charCodeAt(i))&&!is_WS_OR_EOL(o)))}function writeFoldedLines(s,o){1===o?s.result+=\" \":o>1&&(s.result+=er.repeat(\"\\n\",o-1))}function readBlockSequence(s,o){var i,a,u=s.tag,_=s.anchor,w=[],x=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=w),a=s.input.charCodeAt(s.position);0!==a&&(-1!==s.firstTabInLine&&(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),45===a)&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1));)if(x=!0,s.position++,skipSeparationSpace(s,!0,-1)&&s.lineIndent<=o)w.push(null),a=s.input.charCodeAt(s.position);else if(i=s.line,composeNode(s,o,3,!1,!0),w.push(s.result),skipSeparationSpace(s,!0,-1),a=s.input.charCodeAt(s.position),(s.line===i||s.lineIndent>o)&&0!==a)throwError(s,\"bad indentation of a sequence entry\");else if(s.lineIndent<o)break;return!!x&&(s.tag=u,s.anchor=_,s.kind=\"sequence\",s.result=w,!0)}function readTagProperty(s){var o,i,a,u,_=!1,w=!1;if(33!==(u=s.input.charCodeAt(s.position)))return!1;if(null!==s.tag&&throwError(s,\"duplication of a tag property\"),60===(u=s.input.charCodeAt(++s.position))?(_=!0,u=s.input.charCodeAt(++s.position)):33===u?(w=!0,i=\"!!\",u=s.input.charCodeAt(++s.position)):i=\"!\",o=s.position,_){do{u=s.input.charCodeAt(++s.position)}while(0!==u&&62!==u);s.position<s.length?(a=s.input.slice(o,s.position),u=s.input.charCodeAt(++s.position)):throwError(s,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==u&&!is_WS_OR_EOL(u);)33===u&&(w?throwError(s,\"tag suffix cannot contain exclamation marks\"):(i=s.input.slice(o-1,s.position+1),Br.test(i)||throwError(s,\"named tag handle cannot contain such characters\"),w=!0,o=s.position+1)),u=s.input.charCodeAt(++s.position);a=s.input.slice(o,s.position),Fr.test(a)&&throwError(s,\"tag suffix cannot contain flow indicator characters\")}a&&!$r.test(a)&&throwError(s,\"tag name cannot contain such characters: \"+a);try{a=decodeURIComponent(a)}catch(o){throwError(s,\"tag name is malformed: \"+a)}return _?s.tag=a:Rr.call(s.tagMap,i)?s.tag=s.tagMap[i]+a:\"!\"===i?s.tag=\"!\"+a:\"!!\"===i?s.tag=\"tag:yaml.org,2002:\"+a:throwError(s,'undeclared tag handle \"'+i+'\"'),!0}function readAnchorProperty(s){var o,i;if(38!==(i=s.input.charCodeAt(s.position)))return!1;for(null!==s.anchor&&throwError(s,\"duplication of an anchor property\"),i=s.input.charCodeAt(++s.position),o=s.position;0!==i&&!is_WS_OR_EOL(i)&&!is_FLOW_INDICATOR(i);)i=s.input.charCodeAt(++s.position);return s.position===o&&throwError(s,\"name of an anchor node must contain at least one character\"),s.anchor=s.input.slice(o,s.position),!0}function composeNode(s,o,i,a,u){var _,w,x,C,j,L,B,$,V,U=1,z=!1,Y=!1;if(null!==s.listener&&s.listener(\"open\",s),s.tag=null,s.anchor=null,s.kind=null,s.result=null,_=w=x=4===i||3===i,a&&skipSeparationSpace(s,!0,-1)&&(z=!0,s.lineIndent>o?U=1:s.lineIndent===o?U=0:s.lineIndent<o&&(U=-1)),1===U)for(;readTagProperty(s)||readAnchorProperty(s);)skipSeparationSpace(s,!0,-1)?(z=!0,x=_,s.lineIndent>o?U=1:s.lineIndent===o?U=0:s.lineIndent<o&&(U=-1)):x=!1;if(x&&(x=z||u),1!==U&&4!==i||($=1===i||2===i?o:o+1,V=s.position-s.lineStart,1===U?x&&(readBlockSequence(s,V)||function readBlockMapping(s,o,i){var a,u,_,w,x,C,j,L=s.tag,B=s.anchor,$={},V=Object.create(null),U=null,z=null,Y=null,Z=!1,ee=!1;if(-1!==s.firstTabInLine)return!1;for(null!==s.anchor&&(s.anchorMap[s.anchor]=$),j=s.input.charCodeAt(s.position);0!==j;){if(Z||-1===s.firstTabInLine||(s.position=s.firstTabInLine,throwError(s,\"tab characters must not be used in indentation\")),a=s.input.charCodeAt(s.position+1),_=s.line,63!==j&&58!==j||!is_WS_OR_EOL(a)){if(w=s.line,x=s.lineStart,C=s.position,!composeNode(s,i,2,!1,!0))break;if(s.line===_){for(j=s.input.charCodeAt(s.position);is_WHITE_SPACE(j);)j=s.input.charCodeAt(++s.position);if(58===j)is_WS_OR_EOL(j=s.input.charCodeAt(++s.position))||throwError(s,\"a whitespace character is expected after the key-value separator within a block mapping\"),Z&&(storeMappingPair(s,$,V,U,z,null,w,x,C),U=z=Y=null),ee=!0,Z=!1,u=!1,U=s.tag,z=s.result;else{if(!ee)return s.tag=L,s.anchor=B,!0;throwError(s,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!ee)return s.tag=L,s.anchor=B,!0;throwError(s,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===j?(Z&&(storeMappingPair(s,$,V,U,z,null,w,x,C),U=z=Y=null),ee=!0,Z=!0,u=!0):Z?(Z=!1,u=!0):throwError(s,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),s.position+=1,j=a;if((s.line===_||s.lineIndent>o)&&(Z&&(w=s.line,x=s.lineStart,C=s.position),composeNode(s,o,4,!0,u)&&(Z?z=s.result:Y=s.result),Z||(storeMappingPair(s,$,V,U,z,Y,w,x,C),U=z=Y=null),skipSeparationSpace(s,!0,-1),j=s.input.charCodeAt(s.position)),(s.line===_||s.lineIndent>o)&&0!==j)throwError(s,\"bad indentation of a mapping entry\");else if(s.lineIndent<o)break}return Z&&storeMappingPair(s,$,V,U,z,null,w,x,C),ee&&(s.tag=L,s.anchor=B,s.kind=\"mapping\",s.result=$),ee}(s,V,$))||function readFlowCollection(s,o){var i,a,u,_,w,x,C,j,L,B,$,V,U=!0,z=s.tag,Y=s.anchor,Z=Object.create(null);if(91===(V=s.input.charCodeAt(s.position)))w=93,j=!1,_=[];else{if(123!==V)return!1;w=125,j=!0,_={}}for(null!==s.anchor&&(s.anchorMap[s.anchor]=_),V=s.input.charCodeAt(++s.position);0!==V;){if(skipSeparationSpace(s,!0,o),(V=s.input.charCodeAt(s.position))===w)return s.position++,s.tag=z,s.anchor=Y,s.kind=j?\"mapping\":\"sequence\",s.result=_,!0;U?44===V&&throwError(s,\"expected the node content, but found ','\"):throwError(s,\"missed comma between flow collection entries\"),$=null,x=C=!1,63===V&&is_WS_OR_EOL(s.input.charCodeAt(s.position+1))&&(x=C=!0,s.position++,skipSeparationSpace(s,!0,o)),i=s.line,a=s.lineStart,u=s.position,composeNode(s,o,1,!1,!0),B=s.tag,L=s.result,skipSeparationSpace(s,!0,o),V=s.input.charCodeAt(s.position),!C&&s.line!==i||58!==V||(x=!0,V=s.input.charCodeAt(++s.position),skipSeparationSpace(s,!0,o),composeNode(s,o,1,!1,!0),$=s.result),j?storeMappingPair(s,_,Z,B,L,$,i,a,u):x?_.push(storeMappingPair(s,null,Z,B,L,$,i,a,u)):_.push(L),skipSeparationSpace(s,!0,o),44===(V=s.input.charCodeAt(s.position))?(U=!0,V=s.input.charCodeAt(++s.position)):U=!1}throwError(s,\"unexpected end of the stream within a flow collection\")}(s,$)?Y=!0:(w&&function readBlockScalar(s,o){var i,a,u,_,w,x=1,C=!1,j=!1,L=o,B=0,$=!1;if(124===(_=s.input.charCodeAt(s.position)))a=!1;else{if(62!==_)return!1;a=!0}for(s.kind=\"scalar\",s.result=\"\";0!==_;)if(43===(_=s.input.charCodeAt(++s.position))||45===_)1===x?x=43===_?3:2:throwError(s,\"repeat of a chomping mode identifier\");else{if(!((u=48<=(w=_)&&w<=57?w-48:-1)>=0))break;0===u?throwError(s,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):j?throwError(s,\"repeat of an indentation width identifier\"):(L=o+u-1,j=!0)}if(is_WHITE_SPACE(_)){do{_=s.input.charCodeAt(++s.position)}while(is_WHITE_SPACE(_));if(35===_)do{_=s.input.charCodeAt(++s.position)}while(!is_EOL(_)&&0!==_)}for(;0!==_;){for(readLineBreak(s),s.lineIndent=0,_=s.input.charCodeAt(s.position);(!j||s.lineIndent<L)&&32===_;)s.lineIndent++,_=s.input.charCodeAt(++s.position);if(!j&&s.lineIndent>L&&(L=s.lineIndent),is_EOL(_))B++;else{if(s.lineIndent<L){3===x?s.result+=er.repeat(\"\\n\",C?1+B:B):1===x&&C&&(s.result+=\"\\n\");break}for(a?is_WHITE_SPACE(_)?($=!0,s.result+=er.repeat(\"\\n\",C?1+B:B)):$?($=!1,s.result+=er.repeat(\"\\n\",B+1)):0===B?C&&(s.result+=\" \"):s.result+=er.repeat(\"\\n\",B):s.result+=er.repeat(\"\\n\",C?1+B:B),C=!0,j=!0,B=0,i=s.position;!is_EOL(_)&&0!==_;)_=s.input.charCodeAt(++s.position);captureSegment(s,i,s.position,!1)}}return!0}(s,$)||function readSingleQuotedScalar(s,o){var i,a,u;if(39!==(i=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,a=u=s.position;0!==(i=s.input.charCodeAt(s.position));)if(39===i){if(captureSegment(s,a,s.position,!0),39!==(i=s.input.charCodeAt(++s.position)))return!0;a=s.position,s.position++,u=s.position}else is_EOL(i)?(captureSegment(s,a,u,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,o)),a=u=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a single quoted scalar\"):(s.position++,u=s.position);throwError(s,\"unexpected end of the stream within a single quoted scalar\")}(s,$)||function readDoubleQuotedScalar(s,o){var i,a,u,_,w,x,C;if(34!==(x=s.input.charCodeAt(s.position)))return!1;for(s.kind=\"scalar\",s.result=\"\",s.position++,i=a=s.position;0!==(x=s.input.charCodeAt(s.position));){if(34===x)return captureSegment(s,i,s.position,!0),s.position++,!0;if(92===x){if(captureSegment(s,i,s.position,!0),is_EOL(x=s.input.charCodeAt(++s.position)))skipSeparationSpace(s,!1,o);else if(x<256&&qr[x])s.result+=Vr[x],s.position++;else if((w=120===(C=x)?2:117===C?4:85===C?8:0)>0){for(u=w,_=0;u>0;u--)(w=fromHexCode(x=s.input.charCodeAt(++s.position)))>=0?_=(_<<4)+w:throwError(s,\"expected hexadecimal character\");s.result+=charFromCodepoint(_),s.position++}else throwError(s,\"unknown escape sequence\");i=a=s.position}else is_EOL(x)?(captureSegment(s,i,a,!0),writeFoldedLines(s,skipSeparationSpace(s,!1,o)),i=a=s.position):s.position===s.lineStart&&testDocumentSeparator(s)?throwError(s,\"unexpected end of the document within a double quoted scalar\"):(s.position++,a=s.position)}throwError(s,\"unexpected end of the stream within a double quoted scalar\")}(s,$)?Y=!0:!function readAlias(s){var o,i,a;if(42!==(a=s.input.charCodeAt(s.position)))return!1;for(a=s.input.charCodeAt(++s.position),o=s.position;0!==a&&!is_WS_OR_EOL(a)&&!is_FLOW_INDICATOR(a);)a=s.input.charCodeAt(++s.position);return s.position===o&&throwError(s,\"name of an alias node must contain at least one character\"),i=s.input.slice(o,s.position),Rr.call(s.anchorMap,i)||throwError(s,'unidentified alias \"'+i+'\"'),s.result=s.anchorMap[i],skipSeparationSpace(s,!0,-1),!0}(s)?function readPlainScalar(s,o,i){var a,u,_,w,x,C,j,L,B=s.kind,$=s.result;if(is_WS_OR_EOL(L=s.input.charCodeAt(s.position))||is_FLOW_INDICATOR(L)||35===L||38===L||42===L||33===L||124===L||62===L||39===L||34===L||37===L||64===L||96===L)return!1;if((63===L||45===L)&&(is_WS_OR_EOL(a=s.input.charCodeAt(s.position+1))||i&&is_FLOW_INDICATOR(a)))return!1;for(s.kind=\"scalar\",s.result=\"\",u=_=s.position,w=!1;0!==L;){if(58===L){if(is_WS_OR_EOL(a=s.input.charCodeAt(s.position+1))||i&&is_FLOW_INDICATOR(a))break}else if(35===L){if(is_WS_OR_EOL(s.input.charCodeAt(s.position-1)))break}else{if(s.position===s.lineStart&&testDocumentSeparator(s)||i&&is_FLOW_INDICATOR(L))break;if(is_EOL(L)){if(x=s.line,C=s.lineStart,j=s.lineIndent,skipSeparationSpace(s,!1,-1),s.lineIndent>=o){w=!0,L=s.input.charCodeAt(s.position);continue}s.position=_,s.line=x,s.lineStart=C,s.lineIndent=j;break}}w&&(captureSegment(s,u,_,!1),writeFoldedLines(s,s.line-x),u=_=s.position,w=!1),is_WHITE_SPACE(L)||(_=s.position+1),L=s.input.charCodeAt(++s.position)}return captureSegment(s,u,_,!1),!!s.result||(s.kind=B,s.result=$,!1)}(s,$,1===i)&&(Y=!0,null===s.tag&&(s.tag=\"?\")):(Y=!0,null===s.tag&&null===s.anchor||throwError(s,\"alias node should not have any properties\")),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):0===U&&(Y=x&&readBlockSequence(s,V))),null===s.tag)null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);else if(\"?\"===s.tag){for(null!==s.result&&\"scalar\"!==s.kind&&throwError(s,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+s.kind+'\"'),C=0,j=s.implicitTypes.length;C<j;C+=1)if((B=s.implicitTypes[C]).resolve(s.result)){s.result=B.construct(s.result),s.tag=B.tag,null!==s.anchor&&(s.anchorMap[s.anchor]=s.result);break}}else if(\"!\"!==s.tag){if(Rr.call(s.typeMap[s.kind||\"fallback\"],s.tag))B=s.typeMap[s.kind||\"fallback\"][s.tag];else for(B=null,C=0,j=(L=s.typeMap.multi[s.kind||\"fallback\"]).length;C<j;C+=1)if(s.tag.slice(0,L[C].tag.length)===L[C].tag){B=L[C];break}B||throwError(s,\"unknown tag !<\"+s.tag+\">\"),null!==s.result&&B.kind!==s.kind&&throwError(s,\"unacceptable node kind for !<\"+s.tag+'> tag; it should be \"'+B.kind+'\", not \"'+s.kind+'\"'),B.resolve(s.result,s.tag)?(s.result=B.construct(s.result,s.tag),null!==s.anchor&&(s.anchorMap[s.anchor]=s.result)):throwError(s,\"cannot resolve a node with !<\"+s.tag+\"> explicit tag\")}return null!==s.listener&&s.listener(\"close\",s),null!==s.tag||null!==s.anchor||Y}function readDocument(s){var o,i,a,u,_=s.position,w=!1;for(s.version=null,s.checkLineBreaks=s.legacy,s.tagMap=Object.create(null),s.anchorMap=Object.create(null);0!==(u=s.input.charCodeAt(s.position))&&(skipSeparationSpace(s,!0,-1),u=s.input.charCodeAt(s.position),!(s.lineIndent>0||37!==u));){for(w=!0,u=s.input.charCodeAt(++s.position),o=s.position;0!==u&&!is_WS_OR_EOL(u);)u=s.input.charCodeAt(++s.position);for(a=[],(i=s.input.slice(o,s.position)).length<1&&throwError(s,\"directive name must not be less than one character in length\");0!==u;){for(;is_WHITE_SPACE(u);)u=s.input.charCodeAt(++s.position);if(35===u){do{u=s.input.charCodeAt(++s.position)}while(0!==u&&!is_EOL(u));break}if(is_EOL(u))break;for(o=s.position;0!==u&&!is_WS_OR_EOL(u);)u=s.input.charCodeAt(++s.position);a.push(s.input.slice(o,s.position))}0!==u&&readLineBreak(s),Rr.call(zr,i)?zr[i](s,i,a):throwWarning(s,'unknown document directive \"'+i+'\"')}skipSeparationSpace(s,!0,-1),0===s.lineIndent&&45===s.input.charCodeAt(s.position)&&45===s.input.charCodeAt(s.position+1)&&45===s.input.charCodeAt(s.position+2)?(s.position+=3,skipSeparationSpace(s,!0,-1)):w&&throwError(s,\"directives end mark is expected\"),composeNode(s,s.lineIndent-1,4,!1,!0),skipSeparationSpace(s,!0,-1),s.checkLineBreaks&&Lr.test(s.input.slice(_,s.position))&&throwWarning(s,\"non-ASCII line breaks are interpreted as content\"),s.documents.push(s.result),s.position===s.lineStart&&testDocumentSeparator(s)?46===s.input.charCodeAt(s.position)&&(s.position+=3,skipSeparationSpace(s,!0,-1)):s.position<s.length-1&&throwError(s,\"end of the stream or a document separator is expected\")}function loadDocuments(s,o){o=o||{},0!==(s=String(s)).length&&(10!==s.charCodeAt(s.length-1)&&13!==s.charCodeAt(s.length-1)&&(s+=\"\\n\"),65279===s.charCodeAt(0)&&(s=s.slice(1)));var i=new State$1(s,o),a=s.indexOf(\"\\0\");for(-1!==a&&(i.position=a,throwError(i,\"null byte is not allowed in input\")),i.input+=\"\\0\";32===i.input.charCodeAt(i.position);)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)readDocument(i);return i.documents}var Wr={loadAll:function loadAll$1(s,o,i){null!==o&&\"object\"==typeof o&&void 0===i&&(i=o,o=null);var a=loadDocuments(s,i);if(\"function\"!=typeof o)return a;for(var u=0,_=a.length;u<_;u+=1)o(a[u])},load:function load$1(s,o){var i=loadDocuments(s,o);if(0!==i.length){if(1===i.length)return i[0];throw new tr(\"expected a single document in the stream, but found more\")}}},Jr=Object.prototype.toString,Hr=Object.prototype.hasOwnProperty,Kr=65279,Gr={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},Yr=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Xr=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function encodeHex(s){var o,i,a;if(o=s.toString(16).toUpperCase(),s<=255)i=\"x\",a=2;else if(s<=65535)i=\"u\",a=4;else{if(!(s<=4294967295))throw new tr(\"code point within a string may not be greater than 0xFFFFFFFF\");i=\"U\",a=8}return\"\\\\\"+i+er.repeat(\"0\",a-o.length)+o}function State(s){this.schema=s.schema||Mr,this.indent=Math.max(1,s.indent||2),this.noArrayIndent=s.noArrayIndent||!1,this.skipInvalid=s.skipInvalid||!1,this.flowLevel=er.isNothing(s.flowLevel)?-1:s.flowLevel,this.styleMap=function compileStyleMap(s,o){var i,a,u,_,w,x,C;if(null===o)return{};for(i={},u=0,_=(a=Object.keys(o)).length;u<_;u+=1)w=a[u],x=String(o[w]),\"!!\"===w.slice(0,2)&&(w=\"tag:yaml.org,2002:\"+w.slice(2)),(C=s.compiledTypeMap.fallback[w])&&Hr.call(C.styleAliases,x)&&(x=C.styleAliases[x]),i[w]=x;return i}(this.schema,s.styles||null),this.sortKeys=s.sortKeys||!1,this.lineWidth=s.lineWidth||80,this.noRefs=s.noRefs||!1,this.noCompatMode=s.noCompatMode||!1,this.condenseFlow=s.condenseFlow||!1,this.quotingType='\"'===s.quotingType?2:1,this.forceQuotes=s.forceQuotes||!1,this.replacer=\"function\"==typeof s.replacer?s.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(s,o){for(var i,a=er.repeat(\" \",o),u=0,_=-1,w=\"\",x=s.length;u<x;)-1===(_=s.indexOf(\"\\n\",u))?(i=s.slice(u),u=x):(i=s.slice(u,_+1),u=_+1),i.length&&\"\\n\"!==i&&(w+=a),w+=i;return w}function generateNextLine(s,o){return\"\\n\"+er.repeat(\" \",s.indent*o)}function isWhitespace(s){return 32===s||9===s}function isPrintable(s){return 32<=s&&s<=126||161<=s&&s<=55295&&8232!==s&&8233!==s||57344<=s&&s<=65533&&s!==Kr||65536<=s&&s<=1114111}function isNsCharOrWhitespace(s){return isPrintable(s)&&s!==Kr&&13!==s&&10!==s}function isPlainSafe(s,o,i){var a=isNsCharOrWhitespace(s),u=a&&!isWhitespace(s);return(i?a:a&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s)&&35!==s&&!(58===o&&!u)||isNsCharOrWhitespace(o)&&!isWhitespace(o)&&35===s||58===o&&u}function codePointAt(s,o){var i,a=s.charCodeAt(o);return a>=55296&&a<=56319&&o+1<s.length&&(i=s.charCodeAt(o+1))>=56320&&i<=57343?1024*(a-55296)+i-56320+65536:a}function needIndentIndicator(s){return/^\\n* /.test(s)}function chooseScalarStyle(s,o,i,a,u,_,w,x){var C,j=0,L=null,B=!1,$=!1,V=-1!==a,U=-1,z=function isPlainSafeFirst(s){return isPrintable(s)&&s!==Kr&&!isWhitespace(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s}(codePointAt(s,0))&&function isPlainSafeLast(s){return!isWhitespace(s)&&58!==s}(codePointAt(s,s.length-1));if(o||w)for(C=0;C<s.length;j>=65536?C+=2:C++){if(!isPrintable(j=codePointAt(s,C)))return 5;z=z&&isPlainSafe(j,L,x),L=j}else{for(C=0;C<s.length;j>=65536?C+=2:C++){if(10===(j=codePointAt(s,C)))B=!0,V&&($=$||C-U-1>a&&\" \"!==s[U+1],U=C);else if(!isPrintable(j))return 5;z=z&&isPlainSafe(j,L,x),L=j}$=$||V&&C-U-1>a&&\" \"!==s[U+1]}return B||$?i>9&&needIndentIndicator(s)?5:w?2===_?5:2:$?4:3:!z||w||u(s)?2===_?5:2:1}function writeScalar(s,o,i,a,u){s.dump=function(){if(0===o.length)return 2===s.quotingType?'\"\"':\"''\";if(!s.noCompatMode&&(-1!==Yr.indexOf(o)||Xr.test(o)))return 2===s.quotingType?'\"'+o+'\"':\"'\"+o+\"'\";var _=s.indent*Math.max(1,i),w=-1===s.lineWidth?-1:Math.max(Math.min(s.lineWidth,40),s.lineWidth-_),x=a||s.flowLevel>-1&&i>=s.flowLevel;switch(chooseScalarStyle(o,x,s.indent,w,(function testAmbiguity(o){return function testImplicitResolving(s,o){var i,a;for(i=0,a=s.implicitTypes.length;i<a;i+=1)if(s.implicitTypes[i].resolve(o))return!0;return!1}(s,o)}),s.quotingType,s.forceQuotes&&!a,u)){case 1:return o;case 2:return\"'\"+o.replace(/'/g,\"''\")+\"'\";case 3:return\"|\"+blockHeader(o,s.indent)+dropEndingNewline(indentString(o,_));case 4:return\">\"+blockHeader(o,s.indent)+dropEndingNewline(indentString(function foldString(s,o){var i,a,u=/(\\n+)([^\\n]*)/g,_=(x=s.indexOf(\"\\n\"),x=-1!==x?x:s.length,u.lastIndex=x,foldLine(s.slice(0,x),o)),w=\"\\n\"===s[0]||\" \"===s[0];var x;for(;a=u.exec(s);){var C=a[1],j=a[2];i=\" \"===j[0],_+=C+(w||i||\"\"===j?\"\":\"\\n\")+foldLine(j,o),w=i}return _}(o,w),_));case 5:return'\"'+function escapeString(s){for(var o,i=\"\",a=0,u=0;u<s.length;a>=65536?u+=2:u++)a=codePointAt(s,u),!(o=Gr[a])&&isPrintable(a)?(i+=s[u],a>=65536&&(i+=s[u+1])):i+=o||encodeHex(a);return i}(o)+'\"';default:throw new tr(\"impossible error: invalid scalar style\")}}()}function blockHeader(s,o){var i=needIndentIndicator(s)?String(o):\"\",a=\"\\n\"===s[s.length-1];return i+(a&&(\"\\n\"===s[s.length-2]||\"\\n\"===s)?\"+\":a?\"\":\"-\")+\"\\n\"}function dropEndingNewline(s){return\"\\n\"===s[s.length-1]?s.slice(0,-1):s}function foldLine(s,o){if(\"\"===s||\" \"===s[0])return s;for(var i,a,u=/ [^ ]/g,_=0,w=0,x=0,C=\"\";i=u.exec(s);)(x=i.index)-_>o&&(a=w>_?w:x,C+=\"\\n\"+s.slice(_,a),_=a+1),w=x;return C+=\"\\n\",s.length-_>o&&w>_?C+=s.slice(_,w)+\"\\n\"+s.slice(w+1):C+=s.slice(_),C.slice(1)}function writeBlockSequence(s,o,i,a){var u,_,w,x=\"\",C=s.tag;for(u=0,_=i.length;u<_;u+=1)w=i[u],s.replacer&&(w=s.replacer.call(i,String(u),w)),(writeNode(s,o+1,w,!0,!0,!1,!0)||void 0===w&&writeNode(s,o+1,null,!0,!0,!1,!0))&&(a&&\"\"===x||(x+=generateNextLine(s,o)),s.dump&&10===s.dump.charCodeAt(0)?x+=\"-\":x+=\"- \",x+=s.dump);s.tag=C,s.dump=x||\"[]\"}function detectType(s,o,i){var a,u,_,w,x,C;for(_=0,w=(u=i?s.explicitTypes:s.implicitTypes).length;_<w;_+=1)if(((x=u[_]).instanceOf||x.predicate)&&(!x.instanceOf||\"object\"==typeof o&&o instanceof x.instanceOf)&&(!x.predicate||x.predicate(o))){if(i?x.multi&&x.representName?s.tag=x.representName(o):s.tag=x.tag:s.tag=\"?\",x.represent){if(C=s.styleMap[x.tag]||x.defaultStyle,\"[object Function]\"===Jr.call(x.represent))a=x.represent(o,C);else{if(!Hr.call(x.represent,C))throw new tr(\"!<\"+x.tag+'> tag resolver accepts not \"'+C+'\" style');a=x.represent[C](o,C)}s.dump=a}return!0}return!1}function writeNode(s,o,i,a,u,_,w){s.tag=null,s.dump=i,detectType(s,i,!1)||detectType(s,i,!0);var x,C=Jr.call(s.dump),j=a;a&&(a=s.flowLevel<0||s.flowLevel>o);var L,B,$=\"[object Object]\"===C||\"[object Array]\"===C;if($&&(B=-1!==(L=s.duplicates.indexOf(i))),(null!==s.tag&&\"?\"!==s.tag||B||2!==s.indent&&o>0)&&(u=!1),B&&s.usedDuplicates[L])s.dump=\"*ref_\"+L;else{if($&&B&&!s.usedDuplicates[L]&&(s.usedDuplicates[L]=!0),\"[object Object]\"===C)a&&0!==Object.keys(s.dump).length?(!function writeBlockMapping(s,o,i,a){var u,_,w,x,C,j,L=\"\",B=s.tag,$=Object.keys(i);if(!0===s.sortKeys)$.sort();else if(\"function\"==typeof s.sortKeys)$.sort(s.sortKeys);else if(s.sortKeys)throw new tr(\"sortKeys must be a boolean or a function\");for(u=0,_=$.length;u<_;u+=1)j=\"\",a&&\"\"===L||(j+=generateNextLine(s,o)),x=i[w=$[u]],s.replacer&&(x=s.replacer.call(i,w,x)),writeNode(s,o+1,w,!0,!0,!0)&&((C=null!==s.tag&&\"?\"!==s.tag||s.dump&&s.dump.length>1024)&&(s.dump&&10===s.dump.charCodeAt(0)?j+=\"?\":j+=\"? \"),j+=s.dump,C&&(j+=generateNextLine(s,o)),writeNode(s,o+1,x,!0,C)&&(s.dump&&10===s.dump.charCodeAt(0)?j+=\":\":j+=\": \",L+=j+=s.dump));s.tag=B,s.dump=L||\"{}\"}(s,o,s.dump,u),B&&(s.dump=\"&ref_\"+L+s.dump)):(!function writeFlowMapping(s,o,i){var a,u,_,w,x,C=\"\",j=s.tag,L=Object.keys(i);for(a=0,u=L.length;a<u;a+=1)x=\"\",\"\"!==C&&(x+=\", \"),s.condenseFlow&&(x+='\"'),w=i[_=L[a]],s.replacer&&(w=s.replacer.call(i,_,w)),writeNode(s,o,_,!1,!1)&&(s.dump.length>1024&&(x+=\"? \"),x+=s.dump+(s.condenseFlow?'\"':\"\")+\":\"+(s.condenseFlow?\"\":\" \"),writeNode(s,o,w,!1,!1)&&(C+=x+=s.dump));s.tag=j,s.dump=\"{\"+C+\"}\"}(s,o,s.dump),B&&(s.dump=\"&ref_\"+L+\" \"+s.dump));else if(\"[object Array]\"===C)a&&0!==s.dump.length?(s.noArrayIndent&&!w&&o>0?writeBlockSequence(s,o-1,s.dump,u):writeBlockSequence(s,o,s.dump,u),B&&(s.dump=\"&ref_\"+L+s.dump)):(!function writeFlowSequence(s,o,i){var a,u,_,w=\"\",x=s.tag;for(a=0,u=i.length;a<u;a+=1)_=i[a],s.replacer&&(_=s.replacer.call(i,String(a),_)),(writeNode(s,o,_,!1,!1)||void 0===_&&writeNode(s,o,null,!1,!1))&&(\"\"!==w&&(w+=\",\"+(s.condenseFlow?\"\":\" \")),w+=s.dump);s.tag=x,s.dump=\"[\"+w+\"]\"}(s,o,s.dump),B&&(s.dump=\"&ref_\"+L+\" \"+s.dump));else{if(\"[object String]\"!==C){if(\"[object Undefined]\"===C)return!1;if(s.skipInvalid)return!1;throw new tr(\"unacceptable kind of an object to dump \"+C)}\"?\"!==s.tag&&writeScalar(s,s.dump,o,_,j)}null!==s.tag&&\"?\"!==s.tag&&(x=encodeURI(\"!\"===s.tag[0]?s.tag.slice(1):s.tag).replace(/!/g,\"%21\"),x=\"!\"===s.tag[0]?\"!\"+x:\"tag:yaml.org,2002:\"===x.slice(0,18)?\"!!\"+x.slice(18):\"!<\"+x+\">\",s.dump=x+\" \"+s.dump)}return!0}function getDuplicateReferences(s,o){var i,a,u=[],_=[];for(inspectNode(s,u,_),i=0,a=_.length;i<a;i+=1)o.duplicates.push(u[_[i]]);o.usedDuplicates=new Array(a)}function inspectNode(s,o,i){var a,u,_;if(null!==s&&\"object\"==typeof s)if(-1!==(u=o.indexOf(s)))-1===i.indexOf(u)&&i.push(u);else if(o.push(s),Array.isArray(s))for(u=0,_=s.length;u<_;u+=1)inspectNode(s[u],o,i);else for(u=0,_=(a=Object.keys(s)).length;u<_;u+=1)inspectNode(s[a[u]],o,i)}var Qr=function dump$1(s,o){var i=new State(o=o||{});i.noRefs||getDuplicateReferences(s,i);var a=s;return i.replacer&&(a=i.replacer.call({\"\":a},\"\",a)),writeNode(i,0,a,!0,!0)?i.dump+\"\\n\":\"\"};function renamed(s,o){return function(){throw new Error(\"Function yaml.\"+s+\" is removed in js-yaml 4. Use yaml.\"+o+\" instead, which is now safe by default.\")}}var Zr=ir,en=ar,tn=pr,rn=br,nn=_r,sn=Mr,on=Wr.load,an=Wr.loadAll,cn={dump:Qr}.dump,ln=tr,un={binary:Or,float:vr,map:ur,null:dr,pairs:Ir,set:Nr,timestamp:wr,bool:fr,int:mr,merge:xr,omap:jr,seq:lr,str:cr},pn=renamed(\"safeLoad\",\"load\"),hn=renamed(\"safeLoadAll\",\"loadAll\"),dn=renamed(\"safeDump\",\"dump\");const fn={Type:Zr,Schema:en,FAILSAFE_SCHEMA:tn,JSON_SCHEMA:rn,CORE_SCHEMA:nn,DEFAULT_SCHEMA:sn,load:on,loadAll:an,dump:cn,YAMLException:ln,types:un,safeLoad:pn,safeLoadAll:hn,safeDump:dn},mn=\"configs_update\",gn=\"configs_toggle\";function update(s,o){return{type:mn,payload:{[s]:o}}}function toggle(s){return{type:gn,payload:s}}const actions_loaded=()=>()=>{},downloadConfig=s=>o=>{const{fn:{fetch:i}}=o;return i(s)},getConfigByUrl=(s,o)=>i=>{const{specActions:a,configsActions:u}=i;if(s)return u.downloadConfig(s).then(next,next);function next(u){u instanceof Error||u.status>=400?(a.updateLoadingStatus(\"failedConfig\"),a.updateLoadingStatus(\"failedConfig\"),a.updateUrl(\"\"),console.error(u.statusText+\" \"+s.url),o(null)):o(((s,o)=>{try{return fn.load(s)}catch(s){return o&&o.errActions.newThrownErr(new Error(s)),{}}})(u.text,i))}},get=(s,o)=>s.getIn(Array.isArray(o)?o:[o]),yn={[mn]:(s,o)=>s.merge((0,ze.fromJS)(o.payload)),[gn]:(s,o)=>{const i=o.payload,a=s.get(i);return s.set(i,!a)}};function configsPlugin(){return{statePlugins:{configs:{reducers:yn,actions:u,selectors:_}}}}const setHash=s=>s?history.pushState(null,null,`#${s}`):window.location.hash=\"\";var vn=__webpack_require__(86215),bn=__webpack_require__.n(vn);const _n=\"layout_scroll_to\",Sn=\"layout_clear_scroll\";const En={fn:{getScrollParent:function getScrollParent(s,o){const i=document.documentElement;let a=getComputedStyle(s);const u=\"absolute\"===a.position,_=o?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===a.position)return i;for(let o=s;o=o.parentElement;)if(a=getComputedStyle(o),(!u||\"static\"!==a.position)&&_.test(a.overflow+a.overflowY+a.overflowX))return o;return i}},statePlugins:{layout:{actions:{scrollToElement:(s,o)=>i=>{try{o=o||i.fn.getScrollParent(s),bn().createScroller(o).to(s)}catch(s){console.error(s)}},scrollTo:s=>({type:_n,payload:Array.isArray(s)?s:[s]}),clearScrollTo:()=>({type:Sn}),readyToScroll:(s,o)=>i=>{const a=i.layoutSelectors.getScrollToKey();We().is(a,(0,ze.fromJS)(s))&&(i.layoutActions.scrollToElement(o),i.layoutActions.clearScrollTo())},parseDeepLinkHash:s=>({layoutActions:o,layoutSelectors:i,getConfigs:a})=>{if(a().deepLinking&&s){let a=s.slice(1);\"!\"===a[0]&&(a=a.slice(1)),\"/\"===a[0]&&(a=a.slice(1));const u=a.split(\"/\").map((s=>s||\"\")),_=i.isShownKeyFromUrlHashArray(u),[w,x=\"\",C=\"\"]=_;if(\"operations\"===w){const s=i.isShownKeyFromUrlHashArray([x]);x.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),o.show(s.map((s=>s.replace(/_/g,\" \"))),!0)),o.show(s,!0)}(x.indexOf(\"_\")>-1||C.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),o.show(_.map((s=>s.replace(/_/g,\" \"))),!0)),o.show(_,!0),o.scrollTo(_)}}},selectors:{getScrollToKey:s=>s.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(s,o){const[i,a]=o;return a?[\"operations\",i,a]:i?[\"operations-tag\",i]:[]},urlHashArrayFromIsShownKey(s,o){let[i,a,u]=o;return\"operations\"==i?[a,u]:\"operations-tag\"==i?[a]:[]}},reducers:{[_n]:(s,o)=>s.set(\"scrollToKey\",We().fromJS(o.payload)),[Sn]:s=>s.delete(\"scrollToKey\")},wrapActions:{show:(s,{getConfigs:o,layoutSelectors:i})=>(...a)=>{if(s(...a),o().deepLinking)try{let[s,o]=a;s=Array.isArray(s)?s:[s];const u=i.urlHashArrayFromIsShownKey(s);if(!u.length)return;const[_,w]=u;if(!o)return setHash(\"/\");2===u.length?setHash(createDeepLinkPath(`/${encodeURIComponent(_)}/${encodeURIComponent(w)}`)):1===u.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(_)}`))}catch(s){console.error(s)}}}}}};var wn=__webpack_require__(2209),xn=__webpack_require__.n(wn);const operation_wrapper=(s,o)=>class OperationWrapper extends Re.Component{onLoad=s=>{const{operation:i}=this.props,{tag:a,operationId:u}=i.toObject();let{isShownKey:_}=i.toObject();_=_||[\"operations\",a,u],o.layoutActions.readyToScroll(_,s)};render(){return Re.createElement(\"span\",{ref:this.onLoad},Re.createElement(s,this.props))}},operation_tag_wrapper=(s,o)=>class OperationTagWrapper extends Re.Component{onLoad=s=>{const{tag:i}=this.props,a=[\"operations-tag\",i];o.layoutActions.readyToScroll(a,s)};render(){return Re.createElement(\"span\",{ref:this.onLoad},Re.createElement(s,this.props))}};function deep_linking(){return[En,{statePlugins:{configs:{wrapActions:{loaded:(s,o)=>(...i)=>{s(...i);const a=decodeURIComponent(window.location.hash);o.layoutActions.parseDeepLinkHash(a)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}var kn=__webpack_require__(40860),On=__webpack_require__.n(kn);function transform(s){return s.map((s=>{let o=\"is not of a type(s)\",i=s.get(\"message\").indexOf(o);if(i>-1){let o=s.get(\"message\").slice(i+19).split(\",\");return s.set(\"message\",s.get(\"message\").slice(0,i)+function makeNewMessage(s){return s.reduce(((s,o,i,a)=>i===a.length-1&&a.length>1?s+\"or \"+o:a[i+1]&&a.length>2?s+o+\", \":a[i+1]?s+o+\" \":s+o),\"should be a\")}(o))}return s}))}var Cn=__webpack_require__(58156),An=__webpack_require__.n(Cn);function parameter_oneof_transform(s,{jsSpec:o}){return s}const jn=[w,x];function transformErrors(s){let o={jsSpec:{}},i=On()(jn,((s,i)=>{try{return i.transform(s,o).filter((s=>!!s))}catch(o){return console.error(\"Transformer error:\",o),s}}),s);return i.filter((s=>!!s)).map((s=>(!s.get(\"line\")&&s.get(\"path\"),s)))}let Pn={line:0,level:\"error\",message:\"Unknown error\"};const In=Vt((s=>s),(s=>s.get(\"errors\",(0,ze.List)()))),Tn=Vt(In,(s=>s.last()));function err(o){return{statePlugins:{err:{reducers:{[rt]:(s,{payload:o})=>{let i=Object.assign(Pn,o,{type:\"thrown\"});return s.update(\"errors\",(s=>(s||(0,ze.List)()).push((0,ze.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))},[nt]:(s,{payload:o})=>(o=o.map((s=>(0,ze.fromJS)(Object.assign(Pn,s,{type:\"thrown\"})))),s.update(\"errors\",(s=>(s||(0,ze.List)()).concat((0,ze.fromJS)(o)))).update(\"errors\",(s=>transformErrors(s)))),[st]:(s,{payload:o})=>{let i=(0,ze.fromJS)(o);return i=i.set(\"type\",\"spec\"),s.update(\"errors\",(s=>(s||(0,ze.List)()).push((0,ze.fromJS)(i)).sortBy((s=>s.get(\"line\"))))).update(\"errors\",(s=>transformErrors(s)))},[ot]:(s,{payload:o})=>(o=o.map((s=>(0,ze.fromJS)(Object.assign(Pn,s,{type:\"spec\"})))),s.update(\"errors\",(s=>(s||(0,ze.List)()).concat((0,ze.fromJS)(o)))).update(\"errors\",(s=>transformErrors(s)))),[it]:(s,{payload:o})=>{let i=(0,ze.fromJS)(Object.assign({},o));return i=i.set(\"type\",\"auth\"),s.update(\"errors\",(s=>(s||(0,ze.List)()).push((0,ze.fromJS)(i)))).update(\"errors\",(s=>transformErrors(s)))},[at]:(s,{payload:o})=>{if(!o||!s.get(\"errors\"))return s;let i=s.get(\"errors\").filter((s=>s.keySeq().every((i=>{const a=s.get(i),u=o[i];return!u||a!==u}))));return s.merge({errors:i})},[ct]:(s,{payload:o})=>{if(!o||\"function\"!=typeof o)return s;let i=s.get(\"errors\").filter((s=>o(s)));return s.merge({errors:i})}},actions:s,selectors:C}}}}function opsFilter(s,o){return s.filter(((s,i)=>-1!==i.indexOf(o)))}function filter(){return{fn:{opsFilter}}}var Nn=__webpack_require__(7666),Mn=__webpack_require__.n(Nn);const arrow_up=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),arrow_down=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),arrow=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),components_close=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),copy=({className:s=null,width:o=15,height:i=16,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"g\",{transform:\"translate(2, -1)\"},Re.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))),lock=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),unlock=({className:s=null,width:o=20,height:i=20,...a})=>Re.createElement(\"svg\",Mn()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:s,width:o,height:i,\"aria-hidden\":\"true\",focusable:\"false\"},a),Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}}),Rn=\"layout_update_layout\",Dn=\"layout_update_filter\",Ln=\"layout_update_mode\",Fn=\"layout_show\";function updateLayout(s){return{type:Rn,payload:s}}function updateFilter(s){return{type:Dn,payload:s}}function actions_show(s,o=!0){return s=normalizeArray(s),{type:Fn,payload:{thing:s,shown:o}}}function changeMode(s,o=\"\"){return s=normalizeArray(s),{type:Ln,payload:{thing:s,mode:o}}}const Bn={[Rn]:(s,o)=>s.set(\"layout\",o.payload),[Dn]:(s,o)=>s.set(\"filter\",o.payload),[Fn]:(s,o)=>{const i=o.payload.shown,a=(0,ze.fromJS)(o.payload.thing);return s.update(\"shown\",(0,ze.fromJS)({}),(s=>s.set(a,i)))},[Ln]:(s,o)=>{let i=o.payload.thing,a=o.payload.mode;return s.setIn([\"modes\"].concat(i),(a||\"\")+\"\")}},current=s=>s.get(\"layout\"),currentFilter=s=>s.get(\"filter\"),isShown=(s,o,i)=>(o=normalizeArray(o),s.get(\"shown\",(0,ze.fromJS)({})).get((0,ze.fromJS)(o),i)),whatMode=(s,o,i=\"\")=>(o=normalizeArray(o),s.getIn([\"modes\",...o],i)),$n=Vt((s=>s),(s=>!isShown(s,\"editor\"))),taggedOperations=(s,o)=>(i,...a)=>{let u=s(i,...a);const{fn:_,layoutSelectors:w,getConfigs:x}=o.getSystem(),C=x(),{maxDisplayedTags:j}=C;let L=w.currentFilter();return L&&!0!==L&&(u=_.opsFilter(u,L)),j>=0&&(u=u.slice(0,j)),u};function plugins_layout(){return{statePlugins:{layout:{reducers:Bn,actions:j,selectors:L},spec:{wrapSelectors:B}}}}function logs({configs:s}){const o={debug:0,info:1,log:2,warn:3,error:4},getLevel=s=>o[s]||-1;let{logLevel:i}=s,a=getLevel(i);function log(s,...o){getLevel(s)>=a&&console[s](...o)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let qn=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:s=>(...o)=>(qn=!0,s(...o)),updateJsonSpec:(s,o)=>(...i)=>{const a=o.getConfigs().onComplete;return qn&&\"function\"==typeof a&&(setTimeout(a,0),qn=!1),s(...i)}}}}}}const extractKey=s=>{const o=\"_**[]\";return s.indexOf(o)<0?s:s.split(o)[0].trim()},escapeShell=s=>\"-d \"===s||/^[_\\/-]/g.test(s)?s:\"'\"+s.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=s=>\"-d \"===(s=s.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?s.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(s)?s:'\"'+s+'\"',escapePowershell=s=>{if(\"-d \"===s)return s;if(/\\n/.test(s)){return`@\"\\n${s.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(s)){return`'${s.replace(/'/g,\"''\")}'`}return s};const curlify=(s,o,i,a=\"\")=>{let u=!1,_=\"\";const addWords=(...s)=>_+=\" \"+s.map(o).join(\" \"),addWordsWithoutLeadingSpace=(...s)=>_+=s.map(o).join(\" \"),addNewLine=()=>_+=` ${i}`,addIndent=(s=1)=>_+=\"  \".repeat(s);let w=s.get(\"headers\");_+=\"curl\"+a;const x=s.get(\"curlOptions\");if(ze.List.isList(x)&&!x.isEmpty()&&addWords(...s.get(\"curlOptions\")),addWords(\"-X\",s.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${s.get(\"url\")}`),w&&w.size)for(let o of s.get(\"headers\").entries()){addNewLine(),addIndent();let[s,i]=o;addWordsWithoutLeadingSpace(\"-H\",`${s}: ${i}`),u=u||/^content-type$/i.test(s)&&/^multipart\\/form-data$/i.test(i)}const C=s.get(\"body\");if(C)if(u&&[\"POST\",\"PUT\",\"PATCH\"].includes(s.get(\"method\")))for(let[s,o]of C.entrySeq()){let i=extractKey(s);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),o instanceof lt.File&&\"string\"==typeof o.valueOf()?addWords(`${i}=${o.data}${o.type?`;type=${o.type}`:\"\"}`):o instanceof lt.File?addWords(`${i}=@${o.name}${o.type?`;type=${o.type}`:\"\"}`):addWords(`${i}=${o}`)}else if(C instanceof lt.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${C.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let o=C;ze.Map.isMap(o)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(s){let o=[];for(let[i,a]of s.get(\"body\").entrySeq()){let s=extractKey(i);a instanceof lt.File?o.push(`  \"${s}\": {\\n    \"name\": \"${a.name}\"${a.type?`,\\n    \"type\": \"${a.type}\"`:\"\"}\\n  }`):o.push(`  \"${s}\": ${JSON.stringify(a,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${o.join(\",\\n\")}\\n}`}(s)):(\"string\"!=typeof o&&(o=JSON.stringify(o)),addWordsWithoutLeadingSpace(o))}else C||\"POST\"!==s.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return _},requestSnippetGenerator_curl_powershell=s=>curlify(s,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=s=>curlify(s,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=s=>curlify(s,escapeCMD,\"^\\n\"),request_snippets_selectors_state=s=>s||(0,ze.Map)(),Vn=Vt(request_snippets_selectors_state,(s=>{const o=s.get(\"languages\"),i=s.get(\"generators\",(0,ze.Map)());return!o||o.isEmpty()?i:i.filter(((s,i)=>o.includes(i)))})),getSnippetGenerators=s=>({fn:o})=>Vn(s).map(((s,i)=>{const a=(s=>o[`requestSnippetGenerator_${s}`])(i);return\"function\"!=typeof a?null:s.set(\"fn\",a)})).filter((s=>s)),Un=Vt(request_snippets_selectors_state,(s=>s.get(\"activeLanguage\"))),zn=Vt(request_snippets_selectors_state,(s=>s.get(\"defaultExpanded\")));var Wn=__webpack_require__(46942),Jn=__webpack_require__.n(Wn),Hn=__webpack_require__(59399);const Kn={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},Gn={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"},request_snippets=({request:s,requestSnippetsSelectors:o,getComponent:i})=>{const a=(0,Re.useRef)(null),u=i(\"ArrowUpIcon\"),_=i(\"ArrowDownIcon\"),w=i(\"SyntaxHighlighter\",!0),[x,C]=(0,Re.useState)(o.getSnippetGenerators()?.keySeq().first()),[j,L]=(0,Re.useState)(o?.getDefaultExpanded()),B=o.getSnippetGenerators(),$=B.get(x),V=$.get(\"fn\")(s),handleSetIsExpanded=()=>{L(!j)},handleGetBtnStyle=s=>s===x?Gn:Kn,handlePreventYScrollingBeyondElement=s=>{const{target:o,deltaY:i}=s,{scrollHeight:a,offsetHeight:u,scrollTop:_}=o;a>u&&(0===_&&i<0||u+_>=a&&i>0)&&s.preventDefault()};return(0,Re.useEffect)((()=>{}),[]),(0,Re.useEffect)((()=>{const s=Array.from(a.current.childNodes).filter((s=>!!s.nodeType&&s.classList?.contains(\"curl-command\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[s]),Re.createElement(\"div\",{className:\"request-snippets\",ref:a},Re.createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},Re.createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),Re.createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:j?\"Collapse operation\":\"Expand operation\"},j?Re.createElement(_,{className:\"arrow\",width:\"10\",height:\"10\"}):Re.createElement(u,{className:\"arrow\",width:\"10\",height:\"10\"}))),j&&Re.createElement(\"div\",{className:\"curl-command\"},Re.createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},B.entrySeq().map((([s,o])=>Re.createElement(\"div\",{className:Jn()(\"btn\",{active:s===x}),style:handleGetBtnStyle(s),key:s,onClick:()=>(s=>{x!==s&&C(s)})(s)},Re.createElement(\"h4\",{style:s===x?{color:\"white\"}:{}},o.get(\"title\")))))),Re.createElement(\"div\",{className:\"copy-to-clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:V},Re.createElement(\"button\",null))),Re.createElement(\"div\",null,Re.createElement(w,{language:$.get(\"syntax\"),className:\"curl microlight\",renderPlainText:({children:s,PlainTextViewer:o})=>Re.createElement(o,{className:\"curl\"},s)},V))))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:{requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell},statePlugins:{requestSnippets:{selectors:$}}});class ModelCollapse extends Re.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:We().List([])};constructor(s,o){super(s,o);let{expanded:i,collapsedContent:a}=this.props;this.state={expanded:i,collapsedContent:a||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:s,expanded:o,modelName:i}=this.props;s&&o&&this.props.onToggle(i,o)}UNSAFE_componentWillReceiveProps(s){this.props.expanded!==s.expanded&&this.setState({expanded:s.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=s=>{if(s&&this.props.layoutSelectors){const o=this.props.layoutSelectors.getScrollToKey();We().is(o,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,s.parentElement)}};render(){const{title:s,classes:o}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?Re.createElement(\"span\",{className:o||\"\"},this.props.children):Re.createElement(\"span\",{className:o||\"\",ref:this.onLoad},Re.createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},s&&Re.createElement(\"span\",{className:\"pointer\"},s),Re.createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&Re.createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:s,isExecute:o,schema:i,example:a})=>{const u=(0,Re.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),_=(0,Re.useMemo)((()=>Object.keys(u)),[u]).includes(s)&&i&&!o?s:u.example,w=(s=>{const o=(0,Re.useRef)();return(0,Re.useEffect)((()=>{o.current=s})),o.current})(o),[x,C]=(0,Re.useState)(_),j=(0,Re.useCallback)((s=>{C(s.target.dataset.name)}),[]);return(0,Re.useEffect)((()=>{w&&!o&&a&&C(u.example)}),[w,o,a]),{activeTab:x,onTabChange:j,tabs:u}},model_example=({schema:s,example:o,isExecute:i=!1,specPath:a,includeWriteOnly:u=!1,includeReadOnly:_=!1,getComponent:w,getConfigs:x,specSelectors:C})=>{const{defaultModelRendering:j,defaultModelExpandDepth:L}=x(),B=w(\"ModelWrapper\"),$=w(\"HighlightCode\",!0),V=xt()(5).toString(\"base64\"),U=xt()(5).toString(\"base64\"),z=xt()(5).toString(\"base64\"),Y=xt()(5).toString(\"base64\"),Z=C.isOAS3(),{activeTab:ee,tabs:ie,onTabChange:ae}=useTabs({initialTab:j,isExecute:i,schema:s,example:o});return Re.createElement(\"div\",{className:\"model-example\"},Re.createElement(\"ul\",{className:\"tab\",role:\"tablist\"},Re.createElement(\"li\",{className:Jn()(\"tabitem\",{active:ee===ie.example}),role:\"presentation\"},Re.createElement(\"button\",{\"aria-controls\":U,\"aria-selected\":ee===ie.example,className:\"tablinks\",\"data-name\":\"example\",id:V,onClick:ae,role:\"tab\"},i?\"Edit Value\":\"Example Value\")),s&&Re.createElement(\"li\",{className:Jn()(\"tabitem\",{active:ee===ie.model}),role:\"presentation\"},Re.createElement(\"button\",{\"aria-controls\":Y,\"aria-selected\":ee===ie.model,className:Jn()(\"tablinks\",{inactive:i}),\"data-name\":\"model\",id:z,onClick:ae,role:\"tab\"},Z?\"Schema\":\"Model\"))),ee===ie.example&&Re.createElement(\"div\",{\"aria-hidden\":ee!==ie.example,\"aria-labelledby\":V,\"data-name\":\"examplePanel\",id:U,role:\"tabpanel\",tabIndex:\"0\"},o||Re.createElement($,null,\"(no example available\")),ee===ie.model&&Re.createElement(\"div\",{className:\"model-container\",\"aria-hidden\":ee===ie.example,\"aria-labelledby\":z,\"data-name\":\"modelPanel\",id:Y,role:\"tabpanel\",tabIndex:\"0\"},Re.createElement(B,{schema:s,getComponent:w,getConfigs:x,specSelectors:C,expandDepth:L,specPath:a,includeReadOnly:_,includeWriteOnly:u})))};class ModelWrapper extends Re.Component{onToggle=(s,o)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,o)};render(){let{getComponent:s,getConfigs:o}=this.props;const i=s(\"Model\");let a;return this.props.layoutSelectors&&(a=this.props.layoutSelectors.isShown(this.props.fullPath)),Re.createElement(\"div\",{className:\"model-box\"},Re.createElement(i,Mn()({},this.props,{getConfigs:o,expanded:a,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}function _typeof(s){return _typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},_typeof(s)}function _defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _defineProperty(s,o,i){return o in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}function ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _getPrototypeOf(s){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(s){return s.__proto__||Object.getPrototypeOf(s)},_getPrototypeOf(s)}function _setPrototypeOf(s,o){return _setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(s,o){return s.__proto__=o,s},_setPrototypeOf(s,o)}function _possibleConstructorReturn(s,o){return!o||\"object\"!=typeof o&&\"function\"!=typeof o?function _assertThisInitialized(s){if(void 0===s)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return s}(s):o}var Yn={};function react_immutable_pure_component_es_get(s,o,i){return function isInvalid(s){return null==s}(s)?i:function isMapLike(s){return null!==s&&\"object\"===_typeof(s)&&\"function\"==typeof s.get&&\"function\"==typeof s.has}(s)?s.has(o)?s.get(o):i:hasOwnProperty.call(s,o)?s[o]:i}function getIn(s,o,i){for(var a=0;a!==o.length;)if((s=react_immutable_pure_component_es_get(s,o[a++],Yn))===Yn)return i;return s}function check(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=function createChecker(s,o){return function(i){if(\"string\"==typeof i)return(0,ze.is)(o[i],s[i]);if(Array.isArray(i))return(0,ze.is)(getIn(o,i),getIn(s,i));throw new TypeError(\"Invalid key: expected Array or string: \"+i)}}(o,i),u=s||Object.keys(function _objectSpread2(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?ownKeys(i,!0).forEach((function(o){_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):ownKeys(i).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}({},i,{},o));return u.every(a)}const Xn=function(s){function ImmutablePureComponent(){return function _classCallCheck(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,ImmutablePureComponent),_possibleConstructorReturn(this,_getPrototypeOf(ImmutablePureComponent).apply(this,arguments))}return function _inherits(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Super expression must either be null or a function\");s.prototype=Object.create(o&&o.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),o&&_setPrototypeOf(s,o)}(ImmutablePureComponent,s),function _createClass(s,o,i){return o&&_defineProperties(s.prototype,o),i&&_defineProperties(s,i),s}(ImmutablePureComponent,[{key:\"shouldComponentUpdate\",value:function shouldComponentUpdate(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!check(this.updateOnProps,this.props,s,\"updateOnProps\")||!check(this.updateOnStates,this.state,o,\"updateOnStates\")}}]),ImmutablePureComponent}(Re.Component);var Qn,Zn=__webpack_require__(5556),es=__webpack_require__.n(Zn);function _extends(){return _extends=Object.assign?Object.assign.bind():function(s){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},_extends.apply(null,arguments)}const rolling_load=s=>Re.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},s),Qn||(Qn=Re.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},Re.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"})))),decodeRefName=s=>{const o=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(o)}catch{return o}};class Model extends Xn{static propTypes={schema:xn().map.isRequired,getComponent:es().func.isRequired,getConfigs:es().func.isRequired,specSelectors:es().object.isRequired,name:es().string,displayName:es().string,isRef:es().bool,required:es().bool,expandDepth:es().number,depth:es().number,specPath:xn().list.isRequired,includeReadOnly:es().bool,includeWriteOnly:es().bool};getModelName=s=>-1!==s.indexOf(\"#/definitions/\")?decodeRefName(s.replace(/^.*#\\/definitions\\//,\"\")):-1!==s.indexOf(\"#/components/schemas/\")?decodeRefName(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=s=>{let{specSelectors:o}=this.props;return o.findDefinition(s)};render(){let{getComponent:s,getConfigs:o,specSelectors:i,schema:a,required:u,name:_,isRef:w,specPath:x,displayName:C,includeReadOnly:j,includeWriteOnly:L}=this.props;const B=s(\"ObjectModel\"),$=s(\"ArrayModel\"),V=s(\"PrimitiveModel\");let U=\"object\",z=a&&a.get(\"$$ref\"),Y=a&&a.get(\"$ref\");if(!_&&z&&(_=this.getModelName(z)),Y){const s=this.getModelName(Y),o=this.getRefSchema(s);ze.Map.isMap(o)?(a=o.mergeDeep(a),z||(a=a.set(\"$$ref\",Y),z=Y)):ze.Map.isMap(a)&&1===a.size&&(a=null,_=Y)}if(!a)return Re.createElement(\"span\",{className:\"model model-title\"},Re.createElement(\"span\",{className:\"model-title__text\"},C||_),!Y&&Re.createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const Z=i.isOAS3()&&a.get(\"deprecated\");switch(w=void 0!==w?w:!!z,U=a&&a.get(\"type\")||U,U){case\"object\":return Re.createElement(B,Mn()({className:\"object\"},this.props,{specPath:x,getConfigs:o,schema:a,name:_,deprecated:Z,isRef:w,includeReadOnly:j,includeWriteOnly:L}));case\"array\":return Re.createElement($,Mn()({className:\"array\"},this.props,{getConfigs:o,schema:a,name:_,deprecated:Z,required:u,includeReadOnly:j,includeWriteOnly:L}));default:return Re.createElement(V,Mn()({},this.props,{getComponent:s,getConfigs:o,schema:a,name:_,deprecated:Z,required:u}))}}}class Models extends Re.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(s,o)=>{const{layoutActions:i}=this.props;i.show([...this.getSchemaBasePath(),s],o),o&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),s])};onLoadModels=s=>{s&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),s)};onLoadModel=s=>{if(s){const o=s.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),o],s)}};render(){let{specSelectors:s,getComponent:o,layoutSelectors:i,layoutActions:a,getConfigs:u}=this.props,_=s.definitions(),{docExpansion:w,defaultModelsExpandDepth:x}=u();if(!_.size||x<0)return null;const C=this.getSchemaBasePath();let j=i.isShown(C,x>0&&\"none\"!==w);const L=s.isOAS3(),B=o(\"ModelWrapper\"),$=o(\"Collapse\"),V=o(\"ModelCollapse\"),U=o(\"JumpToPath\",!0),z=o(\"ArrowUpIcon\"),Y=o(\"ArrowDownIcon\");return Re.createElement(\"section\",{className:j?\"models is-open\":\"models\",ref:this.onLoadModels},Re.createElement(\"h4\",null,Re.createElement(\"button\",{\"aria-expanded\":j,className:\"models-control\",onClick:()=>a.show(C,!j)},Re.createElement(\"span\",null,L?\"Schemas\":\"Models\"),j?Re.createElement(z,null):Re.createElement(Y,null))),Re.createElement($,{isOpened:j},_.entrySeq().map((([_])=>{const w=[...C,_],j=We().List(w),L=s.specResolvedSubtree(w),$=s.specJson().getIn(w),z=ze.Map.isMap(L)?L:We().Map(),Y=ze.Map.isMap($)?$:We().Map(),Z=z.get(\"title\")||Y.get(\"title\")||_,ee=i.isShown(w,!1);ee&&0===z.size&&Y.size>0&&this.props.specActions.requestResolvedSubtree(w);const ie=Re.createElement(B,{name:_,expandDepth:x,schema:z||We().Map(),displayName:Z,fullPath:w,specPath:j,getComponent:o,specSelectors:s,getConfigs:u,layoutSelectors:i,layoutActions:a,includeReadOnly:!0,includeWriteOnly:!0}),ae=Re.createElement(\"span\",{className:\"model-box\"},Re.createElement(\"span\",{className:\"model model-title\"},Z));return Re.createElement(\"div\",{id:`model-${_}`,className:\"model-container\",key:`models-section-${_}`,\"data-name\":_,ref:this.onLoadModel},Re.createElement(\"span\",{className:\"models-jump-to-path\"},Re.createElement(U,{path:j})),Re.createElement(V,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(_),onToggle:this.handleToggle,title:ae,displayName:Z,modelName:_,specPath:j,layoutSelectors:i,layoutActions:a,hideSelfOnExpand:!0,expanded:x>0&&ee},ie))})).toArray()))}}const enum_model=({value:s,getComponent:o})=>{let i=o(\"ModelCollapse\"),a=Re.createElement(\"span\",null,\"Array [ \",s.count(),\" ]\");return Re.createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",Re.createElement(\"br\",null),Re.createElement(i,{collapsedContent:a},\"[ \",s.map(String).join(\", \"),\" ]\"))};function isAbsoluteUrl(s){return s.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(s,o){return s?isAbsoluteUrl(s)?function addProtocol(s){return s.match(/^\\/\\//i)?`${window.location.protocol}${s}`:s}(s):new URL(s,o).href:o}function safeBuildUrl(s,o,{selectedServer:i=\"\"}={}){try{return function buildUrl(s,o,{selectedServer:i=\"\"}={}){if(!s)return;if(isAbsoluteUrl(s))return s;const a=buildBaseUrl(i,o);return isAbsoluteUrl(a)?new URL(s,a).href:new URL(s,window.location.href).href}(s,o,{selectedServer:i})}catch{return}}function sanitizeUrl(s){if(\"string\"!=typeof s||\"\"===s.trim())return\"\";const o=s.trim(),i=\"about:blank\";try{const s=`https://base${String(Math.random()).slice(2)}`,a=new URL(o,s),u=a.protocol.slice(0,-1);return[\"javascript\",\"data\",\"vbscript\"].includes(u.toLowerCase())?i:a.origin===s?o.startsWith(\"/\")?`${a.pathname}${a.search}${a.hash}`:o.startsWith(\".\")?`.${a.pathname}${a.search}${a.hash}`:`${a.pathname.substring(1)}${a.search}${a.hash}`:String(a)}catch{return i}}class ObjectModel extends Re.Component{render(){let{schema:s,name:o,displayName:i,isRef:a,getComponent:u,getConfigs:_,depth:w,onToggle:x,expanded:C,specPath:j,...L}=this.props,{specSelectors:B,expandDepth:$,includeReadOnly:V,includeWriteOnly:U}=L;const{isOAS3:z}=B,Y=w>2||2===w&&\"items\"!==j.last();if(!s)return null;const{showExtensions:Z}=_(),ee=Z?getExtensions(s):(0,ze.List)();let ie=s.get(\"description\"),ae=s.get(\"properties\"),ce=s.get(\"additionalProperties\"),le=s.get(\"title\")||i||o,pe=s.get(\"required\"),de=s.filter(((s,o)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(o))),fe=s.get(\"deprecated\"),ye=s.getIn([\"externalDocs\",\"url\"]),be=s.getIn([\"externalDocs\",\"description\"]);const _e=u(\"JumpToPath\",!0),Se=u(\"Markdown\",!0),we=u(\"Model\"),xe=u(\"ModelCollapse\"),Pe=u(\"Property\"),Te=u(\"Link\"),$e=u(\"ModelExtensions\"),JumpToPathSection=()=>Re.createElement(\"span\",{className:\"model-jump-to-path\"},Re.createElement(_e,{path:j})),qe=Re.createElement(\"span\",null,Re.createElement(\"span\",null,\"{\"),\"...\",Re.createElement(\"span\",null,\"}\"),a?Re.createElement(JumpToPathSection,null):\"\"),We=B.isOAS3()?s.get(\"allOf\"):null,He=B.isOAS3()?s.get(\"anyOf\"):null,Ye=B.isOAS3()?s.get(\"oneOf\"):null,Xe=B.isOAS3()?s.get(\"not\"):null,Qe=le&&Re.createElement(\"span\",{className:\"model-title\"},a&&s.get(\"$$ref\")&&Re.createElement(\"span\",{className:Jn()(\"model-hint\",{\"model-hint--embedded\":Y})},s.get(\"$$ref\")),Re.createElement(\"span\",{className:\"model-title__text\"},le));return Re.createElement(\"span\",{className:\"model\"},Re.createElement(xe,{modelName:o,title:Qe,onToggle:x,expanded:!!C||w<=$,collapsedContent:qe},Re.createElement(\"span\",{className:\"brace-open object\"},\"{\"),a?Re.createElement(JumpToPathSection,null):null,Re.createElement(\"span\",{className:\"inner-object\"},Re.createElement(\"table\",{className:\"model\"},Re.createElement(\"tbody\",null,ie?Re.createElement(\"tr\",{className:\"description\"},Re.createElement(\"td\",null,\"description:\"),Re.createElement(\"td\",null,Re.createElement(Se,{source:ie}))):null,ye&&Re.createElement(\"tr\",{className:\"external-docs\"},Re.createElement(\"td\",null,\"externalDocs:\"),Re.createElement(\"td\",null,Re.createElement(Te,{target:\"_blank\",href:sanitizeUrl(ye)},be||ye))),fe?Re.createElement(\"tr\",{className:\"property\"},Re.createElement(\"td\",null,\"deprecated:\"),Re.createElement(\"td\",null,\"true\")):null,ae&&ae.size?ae.entrySeq().filter((([,s])=>(!s.get(\"readOnly\")||V)&&(!s.get(\"writeOnly\")||U))).map((([s,i])=>{let a=z()&&i.get(\"deprecated\"),x=ze.List.isList(pe)&&pe.contains(s),C=[\"property-row\"];return a&&C.push(\"deprecated\"),x&&C.push(\"required\"),Re.createElement(\"tr\",{key:s,className:C.join(\" \")},Re.createElement(\"td\",null,s,x&&Re.createElement(\"span\",{className:\"star\"},\"*\")),Re.createElement(\"td\",null,Re.createElement(we,Mn()({key:`object-${o}-${s}_${i}`},L,{required:x,getComponent:u,specPath:j.push(\"properties\",s),getConfigs:_,schema:i,depth:w+1}))))})).toArray():null,0===ee.size?null:Re.createElement(Re.Fragment,null,Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\" \")),Re.createElement($e,{extensions:ee,propClass:\"extension\"})),ce&&ce.size?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"< * >:\"),Re.createElement(\"td\",null,Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"additionalProperties\"),getConfigs:_,schema:ce,depth:w+1})))):null,We?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"allOf ->\"),Re.createElement(\"td\",null,We.map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"allOf\",o),getConfigs:_,schema:s,depth:w+1}))))))):null,He?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"anyOf ->\"),Re.createElement(\"td\",null,He.map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"anyOf\",o),getConfigs:_,schema:s,depth:w+1}))))))):null,Ye?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"oneOf ->\"),Re.createElement(\"td\",null,Ye.map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"oneOf\",o),getConfigs:_,schema:s,depth:w+1}))))))):null,Xe?Re.createElement(\"tr\",null,Re.createElement(\"td\",null,\"not ->\"),Re.createElement(\"td\",null,Re.createElement(\"div\",null,Re.createElement(we,Mn()({},L,{required:!1,getComponent:u,specPath:j.push(\"not\"),getConfigs:_,schema:Xe,depth:w+1}))))):null))),Re.createElement(\"span\",{className:\"brace-close\"},\"}\")),de.size?de.entrySeq().map((([s,o])=>Re.createElement(Pe,{key:`${s}-${o}`,propKey:s,propVal:o,propClass:\"property\"}))):null)}}class ArrayModel extends Re.Component{render(){let{getComponent:s,getConfigs:o,schema:i,depth:a,expandDepth:u,name:_,displayName:w,specPath:x}=this.props,C=i.get(\"description\"),j=i.get(\"items\"),L=i.get(\"title\")||w||_,B=i.filter(((s,o)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(o))),$=i.getIn([\"externalDocs\",\"url\"]),V=i.getIn([\"externalDocs\",\"description\"]);const U=s(\"Markdown\",!0),z=s(\"ModelCollapse\"),Y=s(\"Model\"),Z=s(\"Property\"),ee=s(\"Link\"),ie=L&&Re.createElement(\"span\",{className:\"model-title\"},Re.createElement(\"span\",{className:\"model-title__text\"},L));return Re.createElement(\"span\",{className:\"model\"},Re.createElement(z,{title:ie,expanded:a<=u,collapsedContent:\"[...]\"},\"[\",B.size?B.entrySeq().map((([s,o])=>Re.createElement(Z,{key:`${s}-${o}`,propKey:s,propVal:o,propClass:\"property\"}))):null,C?Re.createElement(U,{source:C}):B.size?Re.createElement(\"div\",{className:\"markdown\"}):null,$&&Re.createElement(\"div\",{className:\"external-docs\"},Re.createElement(ee,{target:\"_blank\",href:sanitizeUrl($)},V||$)),Re.createElement(\"span\",null,Re.createElement(Y,Mn()({},this.props,{getConfigs:o,specPath:x.push(\"items\"),name:null,schema:j,required:!1,depth:a+1}))),\"]\"))}}const ts=\"property primitive\";class Primitive extends Re.Component{render(){let{schema:s,getComponent:o,getConfigs:i,name:a,displayName:u,depth:_,expandDepth:w}=this.props;const{showExtensions:x}=i();if(!s||!s.get)return Re.createElement(\"div\",null);let C=s.get(\"type\"),j=s.get(\"format\"),L=s.get(\"xml\"),B=s.get(\"enum\"),$=s.get(\"title\")||u||a,V=s.get(\"description\");const U=getExtensions(s);let z=s.filter(((s,o)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(o))).filterNot(((s,o)=>U.has(o))),Y=s.getIn([\"externalDocs\",\"url\"]),Z=s.getIn([\"externalDocs\",\"description\"]);const ee=o(\"Markdown\",!0),ie=o(\"EnumModel\"),ae=o(\"Property\"),ce=o(\"ModelCollapse\"),le=o(\"Link\"),pe=o(\"ModelExtensions\"),de=$&&Re.createElement(\"span\",{className:\"model-title\"},Re.createElement(\"span\",{className:\"model-title__text\"},$));return Re.createElement(\"span\",{className:\"model\"},Re.createElement(ce,{title:de,expanded:_<=w,collapsedContent:\"[...]\"},Re.createElement(\"span\",{className:\"prop\"},a&&_>1&&Re.createElement(\"span\",{className:\"prop-name\"},$),Re.createElement(\"span\",{className:\"prop-type\"},C),j&&Re.createElement(\"span\",{className:\"prop-format\"},\"($\",j,\")\"),z.size?z.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,propKey:s,propVal:o,propClass:ts}))):null,x&&U.size>0?Re.createElement(pe,{extensions:U,propClass:`${ts} extension`}):null,V?Re.createElement(ee,{source:V}):null,Y&&Re.createElement(\"div\",{className:\"external-docs\"},Re.createElement(le,{target:\"_blank\",href:sanitizeUrl(Y)},Z||Y)),L&&L.size?Re.createElement(\"span\",null,Re.createElement(\"br\",null),Re.createElement(\"span\",{className:ts},\"xml:\"),L.entrySeq().map((([s,o])=>Re.createElement(\"span\",{key:`${s}-${o}`,className:ts},Re.createElement(\"br\",null),\"   \",s,\": \",String(o)))).toArray()):null,B&&Re.createElement(ie,{value:B,getComponent:o}))))}}class Schemes extends Re.Component{UNSAFE_componentWillMount(){let{schemes:s}=this.props;this.setScheme(s.first())}UNSAFE_componentWillReceiveProps(s){this.props.currentScheme&&s.schemes.includes(this.props.currentScheme)||this.setScheme(s.schemes.first())}onChange=s=>{this.setScheme(s.target.value)};setScheme=s=>{let{path:o,method:i,specActions:a}=this.props;a.setScheme(s,o,i)};render(){let{schemes:s,currentScheme:o}=this.props;return Re.createElement(\"label\",{htmlFor:\"schemes\"},Re.createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),Re.createElement(\"select\",{onChange:this.onChange,value:o,id:\"schemes\"},s.valueSeq().map((s=>Re.createElement(\"option\",{value:s,key:s},s))).toArray()))}}class SchemesContainer extends Re.Component{render(){const{specActions:s,specSelectors:o,getComponent:i}=this.props,a=o.operationScheme(),u=o.schemes(),_=i(\"schemes\");return u&&u.size?Re.createElement(_,{currentScheme:a,schemes:u,specActions:s}):null}}var rs=__webpack_require__(24677),ns=__webpack_require__.n(rs);const ss={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,ze.List)()};class JsonSchemaForm extends Re.Component{static defaultProps=ss;componentDidMount(){const{dispatchInitialValue:s,value:o,onChange:i}=this.props;s?i(o):!1===s&&i(\"\")}render(){let{schema:s,errors:o,value:i,onChange:a,getComponent:u,fn:_,disabled:w}=this.props;const x=s&&s.get?s.get(\"format\"):null,C=s&&s.get?s.get(\"type\"):null,j=_.getSchemaObjectType(s),L=_.isFileUploadIntended(s);let getComponentSilently=s=>u(s,!1,{failSilently:!0}),B=C?getComponentSilently(x?`JsonSchema_${C}_${x}`:`JsonSchema_${C}`):u(\"JsonSchema_string\");return L||!ze.List.isList(C)||\"array\"!==j&&\"object\"!==j||(B=u(\"JsonSchema_object\")),B||(B=u(\"JsonSchema_string\")),Re.createElement(B,Mn()({},this.props,{errors:o,fn:_,getComponent:u,value:i,onChange:a,schema:s,disabled:w}))}}class JsonSchema_string extends Re.Component{static defaultProps=ss;onChange=s=>{const o=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?s.target.files[0]:s.target.value;this.props.onChange(o,this.props.keyName)};onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:o,schema:i,errors:a,required:u,description:_,disabled:w}=this.props;const x=i&&i.get?i.get(\"enum\"):null,C=i&&i.get?i.get(\"format\"):null,j=i&&i.get?i.get(\"type\"):null,L=i&&i.get?i.get(\"in\"):null;if(o?(isImmutable(o)||\"object\"==typeof o)&&(o=stringify(o)):o=\"\",a=a.toJS?a.toJS():[],x){const i=s(\"Select\");return Re.createElement(i,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",allowedValues:[...x],value:o,allowEmptyValue:!u,disabled:w,onChange:this.onEnumChange})}const B=w||L&&\"formData\"===L&&!(\"FormData\"in window),$=s(\"Input\");return j&&\"file\"===j?Re.createElement($,{type:\"file\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",onChange:this.onChange,disabled:B}):Re.createElement(ns(),{type:C&&\"password\"===C?\"password\":\"text\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",value:o,minLength:0,debounceTimeout:350,placeholder:_,onChange:this.onChange,disabled:B})}}class JsonSchema_array extends Re.PureComponent{static defaultProps=ss;constructor(s,o){super(s,o),this.state={value:valueOrEmptyList(s.value),schema:s.schema}}UNSAFE_componentWillReceiveProps(s){const o=valueOrEmptyList(s.value);o!==this.state.value&&this.setState({value:o}),s.schema!==this.state.schema&&this.setState({schema:s.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(s,o)=>{this.setState((({value:i})=>({value:i.set(o,s)})),this.onChange)};removeItem=s=>{this.setState((({value:o})=>({value:o.delete(s)})),this.onChange)};addItem=()=>{const{fn:s}=this.props;let o=valueOrEmptyList(this.state.value);this.setState((()=>({value:o.push(s.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=s=>{this.setState((()=>({value:s})),this.onChange)};render(){let{getComponent:s,required:o,schema:i,errors:a,fn:u,disabled:_}=this.props;a=a.toJS?a.toJS():Array.isArray(a)?a:[];const w=a.filter((s=>\"string\"==typeof s)),x=a.filter((s=>void 0!==s.needRemove)).map((s=>s.error)),C=this.state.value,j=!!(C&&C.count&&C.count()>0),L=i.getIn([\"items\",\"enum\"]),B=i.get(\"items\"),$=u.getSchemaObjectType(B),V=u.getSchemaObjectTypeLabel(B),U=i.getIn([\"items\",\"format\"]),z=i.get(\"items\");let Y,Z=!1,ee=\"file\"===$||\"string\"===$&&\"binary\"===U;if($&&U?Y=s(`JsonSchema_${$}_${U}`):\"boolean\"!==$&&\"array\"!==$&&\"object\"!==$||(Y=s(`JsonSchema_${$}`)),!ze.List.isList(B?.get(\"type\"))||\"array\"!==$&&\"object\"!==$||(Y=s(\"JsonSchema_object\")),Y||ee||(Z=!0),L){const i=s(\"Select\");return Re.createElement(i,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",multiple:!0,value:C,disabled:_,allowedValues:L,allowEmptyValue:!o,onChange:this.onEnumChange})}const ie=s(\"Button\");return Re.createElement(\"div\",{className:\"json-schema-array\"},j?C.map(((o,i)=>{const w=(0,ze.fromJS)([...a.filter((s=>s.index===i)).map((s=>s.error))]);return Re.createElement(\"div\",{key:i,className:\"json-schema-form-item\"},ee?Re.createElement(JsonSchemaArrayItemFile,{value:o,onChange:s=>this.onItemChange(s,i),disabled:_,errors:w,getComponent:s}):Z?Re.createElement(JsonSchemaArrayItemText,{value:o,onChange:s=>this.onItemChange(s,i),disabled:_,errors:w}):Re.createElement(Y,Mn()({},this.props,{value:o,onChange:s=>this.onItemChange(s,i),disabled:_,errors:w,schema:z,getComponent:s,fn:u})),_?null:Re.createElement(ie,{className:`btn btn-sm json-schema-form-item-remove ${x.length?\"invalid\":null}`,title:x.length?x:\"\",onClick:()=>this.removeItem(i)},\" - \"))})):null,_?null:Re.createElement(ie,{className:`btn btn-sm json-schema-form-item-add ${w.length?\"invalid\":null}`,title:w.length?w:\"\",onClick:this.addItem},\"Add \",V,\" item\"))}}class JsonSchemaArrayItemText extends Re.Component{static defaultProps=ss;onChange=s=>{const o=s.target.value;this.props.onChange(o,this.props.keyName)};render(){let{value:s,errors:o,description:i,disabled:a}=this.props;return s?(isImmutable(s)||\"object\"==typeof s)&&(s=stringify(s)):s=\"\",o=o.toJS?o.toJS():[],Re.createElement(ns(),{type:\"text\",className:o.length?\"invalid\":\"\",title:o.length?o:\"\",value:s,minLength:0,debounceTimeout:350,placeholder:i,onChange:this.onChange,disabled:a})}}class JsonSchemaArrayItemFile extends Re.Component{static defaultProps=ss;onFileChange=s=>{const o=s.target.files[0];this.props.onChange(o,this.props.keyName)};render(){let{getComponent:s,errors:o,disabled:i}=this.props;const a=s(\"Input\"),u=i||!(\"FormData\"in window);return Re.createElement(a,{type:\"file\",className:o.length?\"invalid\":\"\",title:o.length?o:\"\",onChange:this.onFileChange,disabled:u})}}class JsonSchema_boolean extends Re.Component{static defaultProps=ss;onEnumChange=s=>this.props.onChange(s);render(){let{getComponent:s,value:o,errors:i,schema:a,required:u,disabled:_}=this.props;i=i.toJS?i.toJS():[];let w=a&&a.get?a.get(\"enum\"):null,x=!w||!u,C=!w&&[\"true\",\"false\"];const j=s(\"Select\");return Re.createElement(j,{className:i.length?\"invalid\":\"\",title:i.length?i:\"\",value:String(o),disabled:_,allowedValues:w?[...w]:C,allowEmptyValue:x,onChange:this.onEnumChange})}}const stringifyObjectErrors=s=>s.map((s=>{const o=void 0!==s.propKey?s.propKey:s.index;let i=\"string\"==typeof s?s:\"string\"==typeof s.error?s.error:null;if(!o&&i)return i;let a=s.error,u=`/${s.propKey}`;for(;\"object\"==typeof a;){const s=void 0!==a.propKey?a.propKey:a.index;if(void 0===s)break;if(u+=`/${s}`,!a.error)break;a=a.error}return`${u}: ${a}`}));class JsonSchema_object extends Re.PureComponent{constructor(){super()}static defaultProps=ss;onChange=s=>{this.props.onChange(s)};handleOnChange=s=>{const o=s.target.value;this.onChange(o)};render(){let{getComponent:s,value:o,errors:i,disabled:a}=this.props;const u=s(\"TextArea\");return i=i.toJS?i.toJS():Array.isArray(i)?i:[],Re.createElement(\"div\",null,Re.createElement(u,{className:Jn()({invalid:i.length}),title:i.length?stringifyObjectErrors(i).join(\", \"):\"\",value:stringify(o),disabled:a,onChange:this.handleOnChange}))}}function valueOrEmptyList(s){return ze.List.isList(s)?s:Array.isArray(s)?(0,ze.fromJS)(s):(0,ze.List)()}const ModelExtensions=({extensions:s,propClass:o=\"\"})=>s.entrySeq().map((([s,i])=>{const a=immutableToJS(i)??null;return Re.createElement(\"tr\",{key:s,className:o},Re.createElement(\"td\",null,s),Re.createElement(\"td\",null,JSON.stringify(a)))})).toArray();var os=__webpack_require__(11331),as=__webpack_require__.n(os);const hasSchemaType=(s,o)=>{const i=ze.Map.isMap(s);if(!i&&!as()(s))return!1;const a=i?s.get(\"type\"):s.type;return o===a||Array.isArray(o)&&o.includes(a)},getType=(s,o=new WeakSet)=>{if(null==s)return\"any\";if(o.has(s))return\"any\";o.add(s);const{type:i,items:a}=s;return Object.hasOwn(s,\"items\")?(()=>{if(a)return`array<${getType(a,o)}>`;return\"array<any>\"})():i},getSchemaObjectTypeLabel=s=>getType(immutableToJS(s)),json_schema_5=()=>({components:{modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,ModelExtensions,schemes:Schemes,SchemesContainer,...V},fn:{hasSchemaType,getSchemaObjectTypeLabel}});var cs=__webpack_require__(19123),ls=__webpack_require__.n(cs),us=__webpack_require__(41859),ps=__webpack_require__.n(us),hs=__webpack_require__(62193),ds=__webpack_require__.n(hs);const shallowArrayEquals=s=>o=>Array.isArray(s)&&Array.isArray(o)&&s.length===o.length&&s.every(((s,i)=>s===o[i])),list=(...s)=>s;class Cache extends Map{delete(s){const o=Array.from(this.keys()).find(shallowArrayEquals(s));return super.delete(o)}get(s){const o=Array.from(this.keys()).find(shallowArrayEquals(s));return super.get(o)}has(s){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(s))}}const utils_memoizeN=(s,o=list)=>{const{Cache:i}=pt();pt().Cache=Cache;const a=pt()(s,o);return pt().Cache=i,a},fs={string:s=>s.pattern?(s=>{try{const o=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,i=s.replace(o,\"100\"),a=new(ps())(i);return a.max=100,a.gen()}catch(s){return\"string\"}})(s.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_time:()=>(new Date).toISOString().substring(11),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:s=>\"boolean\"!=typeof s.default||s.default},primitive=s=>{s=objectify(s);let{type:o,format:i}=s,a=fs[`${o}_${i}`]||fs[o];return isFunc(a)?a(s):\"Unknown Type: \"+s.type},sanitizeRef=s=>deeplyStripKey(s,\"$$ref\",(s=>\"string\"==typeof s&&s.indexOf(\"#\")>-1)),ms=[\"maxProperties\",\"minProperties\"],gs=[\"minItems\",\"maxItems\"],ys=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],vs=[\"minLength\",\"maxLength\"],mergeJsonSchema=(s,o,i={})=>{const a={...s};if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...ms,...gs,...ys,...vs].forEach((s=>(s=>{void 0===a[s]&&void 0!==o[s]&&(a[s]=o[s])})(s))),void 0!==o.required&&Array.isArray(o.required)&&(void 0!==a.required&&a.required.length||(a.required=[]),o.required.forEach((s=>{a.required.includes(s)||a.required.push(s)}))),o.properties){a.properties||(a.properties={});let s=objectify(o.properties);for(let u in s)Object.prototype.hasOwnProperty.call(s,u)&&(s[u]&&s[u].deprecated||s[u]&&s[u].readOnly&&!i.includeReadOnly||s[u]&&s[u].writeOnly&&!i.includeWriteOnly||a.properties[u]||(a.properties[u]=s[u],!o.required&&Array.isArray(o.required)&&-1!==o.required.indexOf(u)&&(a.required?a.required.push(u):a.required=[u])))}return o.items&&(a.items||(a.items={}),a.items=mergeJsonSchema(a.items,o.items,i)),a},sampleFromSchemaGeneric=(s,o={},i=void 0,a=!1)=>{s&&isFunc(s.toJS)&&(s=s.toJS());let u=void 0!==i||s&&void 0!==s.example||s&&void 0!==s.default;const _=!u&&s&&s.oneOf&&s.oneOf.length>0,w=!u&&s&&s.anyOf&&s.anyOf.length>0;if(!u&&(_||w)){const i=objectify(_?s.oneOf[0]:s.anyOf[0]);if(!(s=mergeJsonSchema(s,i,o)).xml&&i.xml&&(s.xml=i.xml),void 0!==s.example&&void 0!==i.example)u=!0;else if(i.properties){s.properties||(s.properties={});let a=objectify(i.properties);for(let u in a)Object.prototype.hasOwnProperty.call(a,u)&&(a[u]&&a[u].deprecated||a[u]&&a[u].readOnly&&!o.includeReadOnly||a[u]&&a[u].writeOnly&&!o.includeWriteOnly||s.properties[u]||(s.properties[u]=a[u],!i.required&&Array.isArray(i.required)&&-1!==i.required.indexOf(u)&&(s.required?s.required.push(u):s.required=[u])))}}const x={};let{xml:C,type:j,example:L,properties:B,additionalProperties:$,items:V}=s||{},{includeReadOnly:U,includeWriteOnly:z}=o;C=C||{};let Y,{name:Z,prefix:ee,namespace:ie}=C,ae={};if(a&&(Z=Z||\"notagname\",Y=(ee?ee+\":\":\"\")+Z,ie)){x[ee?\"xmlns:\"+ee:\"xmlns\"]=ie}a&&(ae[Y]=[]);const schemaHasAny=o=>o.some((o=>Object.prototype.hasOwnProperty.call(s,o)));s&&!j&&(B||$||schemaHasAny(ms)?j=\"object\":V||schemaHasAny(gs)?j=\"array\":schemaHasAny(ys)?(j=\"number\",s.type=\"number\"):u||s.enum||(j=\"string\",s.type=\"string\"));const handleMinMaxItems=o=>{if(null!=s?.maxItems&&(o=o.slice(0,s?.maxItems)),null!=s?.minItems){let i=0;for(;o.length<s?.minItems;)o.push(o[i++%o.length])}return o},ce=objectify(B);let le,pe=0;const hasExceededMaxProperties=()=>s&&null!==s.maxProperties&&void 0!==s.maxProperties&&pe>=s.maxProperties,canAddProperty=o=>!s||null===s.maxProperties||void 0===s.maxProperties||!hasExceededMaxProperties()&&(!(o=>!(s&&s.required&&s.required.length&&s.required.includes(o)))(o)||s.maxProperties-pe-(()=>{if(!s||!s.required)return 0;let o=0;return a?s.required.forEach((s=>o+=void 0===ae[s]?0:1)):s.required.forEach((s=>o+=void 0===ae[Y]?.find((o=>void 0!==o[s]))?0:1)),s.required.length-o})()>0);if(le=a?(i,u=void 0)=>{if(s&&ce[i]){if(ce[i].xml=ce[i].xml||{},ce[i].xml.attribute){const s=Array.isArray(ce[i].enum)?ce[i].enum[0]:void 0,o=ce[i].example,a=ce[i].default;return void(x[ce[i].xml.name||i]=void 0!==o?o:void 0!==a?a:void 0!==s?s:primitive(ce[i]))}ce[i].xml.name=ce[i].xml.name||i}else ce[i]||!1===$||(ce[i]={xml:{name:i}});let _=sampleFromSchemaGeneric(s&&ce[i]||void 0,o,u,a);canAddProperty(i)&&(pe++,Array.isArray(_)?ae[Y]=ae[Y].concat(_):ae[Y].push(_))}:(i,u)=>{if(canAddProperty(i)){if(Object.prototype.hasOwnProperty.call(s,\"discriminator\")&&s.discriminator&&Object.prototype.hasOwnProperty.call(s.discriminator,\"mapping\")&&s.discriminator.mapping&&Object.prototype.hasOwnProperty.call(s,\"$$ref\")&&s.$$ref&&s.discriminator.propertyName===i){for(let o in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[o])){ae[i]=o;break}}else ae[i]=sampleFromSchemaGeneric(ce[i],o,u,a);pe++}},u){let u;if(u=sanitizeRef(void 0!==i?i:void 0!==L?L:s.default),!a){if(\"number\"==typeof u&&\"string\"===j)return`${u}`;if(\"string\"!=typeof u||\"string\"===j)return u;try{return JSON.parse(u)}catch(s){return u}}if(s||(j=Array.isArray(u)?\"array\":typeof u),\"array\"===j){if(!Array.isArray(u)){if(\"string\"==typeof u)return u;u=[u]}const i=s?s.items:void 0;i&&(i.xml=i.xml||C||{},i.xml.name=i.xml.name||C.name);let _=u.map((s=>sampleFromSchemaGeneric(i,o,s,a)));return _=handleMinMaxItems(_),C.wrapped?(ae[Y]=_,ds()(x)||ae[Y].push({_attr:x})):ae=_,ae}if(\"object\"===j){if(\"string\"==typeof u)return u;for(let o in u)Object.prototype.hasOwnProperty.call(u,o)&&(s&&ce[o]&&ce[o].readOnly&&!U||s&&ce[o]&&ce[o].writeOnly&&!z||(s&&ce[o]&&ce[o].xml&&ce[o].xml.attribute?x[ce[o].xml.name||o]=u[o]:le(o,u[o])));return ds()(x)||ae[Y].push({_attr:x}),ae}return ae[Y]=ds()(x)?u:[{_attr:x},u],ae}if(\"object\"===j){for(let s in ce)Object.prototype.hasOwnProperty.call(ce,s)&&(ce[s]&&ce[s].deprecated||ce[s]&&ce[s].readOnly&&!U||ce[s]&&ce[s].writeOnly&&!z||le(s));if(a&&x&&ae[Y].push({_attr:x}),hasExceededMaxProperties())return ae;if(!0===$)a?ae[Y].push({additionalProp:\"Anything can be here\"}):ae.additionalProp1={},pe++;else if($){const i=objectify($),u=sampleFromSchemaGeneric(i,o,void 0,a);if(a&&i.xml&&i.xml.name&&\"notagname\"!==i.xml.name)ae[Y].push(u);else{const o=null!==s.minProperties&&void 0!==s.minProperties&&pe<s.minProperties?s.minProperties-pe:3;for(let s=1;s<=o;s++){if(hasExceededMaxProperties())return ae;if(a){const o={};o[\"additionalProp\"+s]=u.notagname,ae[Y].push(o)}else ae[\"additionalProp\"+s]=u;pe++}}}return ae}if(\"array\"===j){if(!V)return;let i;if(a&&(V.xml=V.xml||s?.xml||{},V.xml.name=V.xml.name||C.name),Array.isArray(V.anyOf))i=V.anyOf.map((s=>sampleFromSchemaGeneric(mergeJsonSchema(s,V,o),o,void 0,a)));else if(Array.isArray(V.oneOf))i=V.oneOf.map((s=>sampleFromSchemaGeneric(mergeJsonSchema(s,V,o),o,void 0,a)));else{if(!(!a||a&&C.wrapped))return sampleFromSchemaGeneric(V,o,void 0,a);i=[sampleFromSchemaGeneric(V,o,void 0,a)]}return i=handleMinMaxItems(i),a&&C.wrapped?(ae[Y]=i,ds()(x)||ae[Y].push({_attr:x}),ae):i}let de;if(s&&Array.isArray(s.enum))de=normalizeArray(s.enum)[0];else{if(!s)return;if(de=primitive(s),\"number\"==typeof de){let o=s.minimum;null!=o&&(s.exclusiveMinimum&&o++,de=o);let i=s.maximum;null!=i&&(s.exclusiveMaximum&&i--,de=i)}if(\"string\"==typeof de&&(null!==s.maxLength&&void 0!==s.maxLength&&(de=de.slice(0,s.maxLength)),null!==s.minLength&&void 0!==s.minLength)){let o=0;for(;de.length<s.minLength;)de+=de[o++%de.length]}}if(\"file\"!==j)return a?(ae[Y]=ds()(x)?de:[{_attr:x},de],ae):de},inferSchema=s=>(s.schema&&(s=s.schema),s.properties&&(s.type=\"object\"),s),createXMLExample=(s,o,i)=>{const a=sampleFromSchemaGeneric(s,o,i,!0);if(a)return\"string\"==typeof a?a:ls()(a,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(s,o,i)=>sampleFromSchemaGeneric(s,o,i,!1),resolver=(s,o,i)=>[s,JSON.stringify(o),JSON.stringify(i)],bs=utils_memoizeN(createXMLExample,resolver),_s=utils_memoizeN(sampleFromSchema,resolver),getSchemaObjectType=s=>immutableToJS(s)?.type??\"string\",Ss=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Es=[\"object\"],get_json_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.memoizedSampleFromSchema(o,i,u),x=typeof w,C=Ss.reduce(((s,o)=>o.when.test(a)?[...s,...o.shouldStringifyTypes]:s),Es);return gt()(C,(s=>s===x))?JSON.stringify(w,null,2):w},get_yaml_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.getJsonSampleSchema(o,i,a,u);let x;try{x=fn.dump(fn.load(w),{lineWidth:-1},{schema:rn}),\"\\n\"===x[x.length-1]&&(x=x.slice(0,x.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return x.replace(/\\t/g,\"  \")},get_xml_sample_schema=s=>(o,i,a)=>{const{fn:u}=s();if(o&&!o.xml&&(o.xml={}),o&&!o.xml.name){if(!o.$$ref&&(o.type||o.items||o.properties||o.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(o.$$ref){let s=o.$$ref.match(/\\S*\\/(\\S+)$/);o.xml.name=s[1]}}return u.memoizedCreateXMLExample(o,i,a)},get_sample_schema=s=>(o,i=\"\",a={},u=void 0)=>{const{fn:_}=s();return\"function\"==typeof o?.toJS&&(o=o.toJS()),\"function\"==typeof u?.toJS&&(u=u.toJS()),/xml/.test(i)?_.getXmlSampleSchema(o,a,u):/(yaml|yml)/.test(i)?_.getYamlSampleSchema(o,a,i,u):_.getJsonSampleSchema(o,a,i,u)},json_schema_5_samples=({getSystem:s})=>{const o=get_json_sample_schema(s),i=get_yaml_sample_schema(s),a=get_xml_sample_schema(s),u=get_sample_schema(s);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:_s,memoizedCreateXMLExample:bs,getJsonSampleSchema:o,getYamlSampleSchema:i,getXmlSampleSchema:a,getSampleSchema:u,mergeJsonSchema},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:_s,memoizedCreateXMLExample:bs,getJsonSampleSchema:o,getYamlSampleSchema:i,getXmlSampleSchema:a,getSampleSchema:u,mergeJsonSchema,getSchemaObjectType}}};var ws=__webpack_require__(37334),xs=__webpack_require__.n(ws);const ks=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=s=>s||(0,ze.Map)(),Os=Vt(spec_selectors_state,(s=>s.get(\"lastError\"))),Cs=Vt(spec_selectors_state,(s=>s.get(\"url\"))),As=Vt(spec_selectors_state,(s=>s.get(\"spec\")||\"\")),js=Vt(spec_selectors_state,(s=>s.get(\"specSource\")||\"not-editor\")),Ps=Vt(spec_selectors_state,(s=>s.get(\"json\",(0,ze.Map)()))),Is=Vt(Ps,(s=>s.toJS())),Ts=Vt(spec_selectors_state,(s=>s.get(\"resolved\",(0,ze.Map)()))),specResolvedSubtree=(s,o)=>s.getIn([\"resolvedSubtrees\",...o],void 0),mergerFn=(s,o)=>ze.Map.isMap(s)&&ze.Map.isMap(o)?o.get(\"$$ref\")?o:(0,ze.OrderedMap)().mergeWith(mergerFn,s,o):o,Ns=Vt(spec_selectors_state,(s=>(0,ze.OrderedMap)().mergeWith(mergerFn,s.get(\"json\"),s.get(\"resolvedSubtrees\")))),spec=s=>Ps(s),Ms=Vt(spec,(()=>!1)),Rs=Vt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"info\")))),Ds=Vt(spec,(s=>returnSelfOrNewMap(s&&s.get(\"externalDocs\")))),Ls=Vt(Rs,(s=>s&&s.get(\"version\"))),Fs=Vt(Ls,(s=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(s).slice(1))),Bs=Vt(Ns,(s=>s.get(\"paths\"))),$s=xs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),qs=Vt(Bs,(s=>{let o=(0,ze.List)();return!ze.Map.isMap(s)||s.isEmpty()||s.forEach(((s,i)=>{if(!s||!s.forEach)return{};s.forEach(((s,a)=>{ks.indexOf(a)<0||(o=o.push((0,ze.fromJS)({path:i,method:a,operation:s,id:`${a}-${i}`})))}))})),o})),Vs=Vt(spec,(s=>(0,ze.Set)(s.get(\"consumes\")))),Us=Vt(spec,(s=>(0,ze.Set)(s.get(\"produces\")))),zs=Vt(spec,(s=>s.get(\"security\",(0,ze.List)()))),Ws=Vt(spec,(s=>s.get(\"securityDefinitions\"))),findDefinition=(s,o)=>{const i=s.getIn([\"resolvedSubtrees\",\"definitions\",o],null),a=s.getIn([\"json\",\"definitions\",o],null);return i||a||null},Js=Vt(spec,(s=>{const o=s.get(\"definitions\");return ze.Map.isMap(o)?o:(0,ze.Map)()})),Hs=Vt(spec,(s=>s.get(\"basePath\"))),Ks=Vt(spec,(s=>s.get(\"host\"))),Gs=Vt(spec,(s=>s.get(\"schemes\",(0,ze.Map)()))),Ys=Vt([qs,Vs,Us],((s,o,i)=>s.map((s=>s.update(\"operation\",(s=>ze.Map.isMap(s)?s.withMutations((s=>(s.get(\"consumes\")||s.update(\"consumes\",(s=>(0,ze.Set)(s).merge(o))),s.get(\"produces\")||s.update(\"produces\",(s=>(0,ze.Set)(s).merge(i))),s))):(0,ze.Map)())))))),Xs=Vt(spec,(s=>{const o=s.get(\"tags\",(0,ze.List)());return ze.List.isList(o)?o.filter((s=>ze.Map.isMap(s))):(0,ze.List)()})),tagDetails=(s,o)=>(Xs(s)||(0,ze.List)()).filter(ze.Map.isMap).find((s=>s.get(\"name\")===o),(0,ze.Map)()),Qs=Vt(Ys,Xs,((s,o)=>s.reduce(((s,o)=>{let i=(0,ze.Set)(o.getIn([\"operation\",\"tags\"]));return i.count()<1?s.update(\"default\",(0,ze.List)(),(s=>s.push(o))):i.reduce(((s,i)=>s.update(i,(0,ze.List)(),(s=>s.push(o)))),s)}),o.reduce(((s,o)=>s.set(o.get(\"name\"),(0,ze.List)())),(0,ze.OrderedMap)())))),selectors_taggedOperations=s=>({getConfigs:o})=>{let{tagsSorter:i,operationsSorter:a}=o();return Qs(s).sortBy(((s,o)=>o),((s,o)=>{let a=\"function\"==typeof i?i:It.tagsSorter[i];return a?a(s,o):null})).map(((o,i)=>{let u=\"function\"==typeof a?a:It.operationsSorter[a],_=u?o.sort(u):o;return(0,ze.Map)({tagDetails:tagDetails(s,i),operations:_})}))},Zs=Vt(spec_selectors_state,(s=>s.get(\"responses\",(0,ze.Map)()))),eo=Vt(spec_selectors_state,(s=>s.get(\"requests\",(0,ze.Map)()))),to=Vt(spec_selectors_state,(s=>s.get(\"mutatedRequests\",(0,ze.Map)()))),responseFor=(s,o,i)=>Zs(s).getIn([o,i],null),requestFor=(s,o,i)=>eo(s).getIn([o,i],null),mutatedRequestFor=(s,o,i)=>to(s).getIn([o,i],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(s,o,i)=>{const a=Ns(s).getIn([\"paths\",...o,\"parameters\"],(0,ze.OrderedMap)()),u=s.getIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.OrderedMap)());return a.map((s=>{const o=u.get(`${i.get(\"in\")}.${i.get(\"name\")}`),a=u.get(`${i.get(\"in\")}.${i.get(\"name\")}.hash-${i.hashCode()}`);return(0,ze.OrderedMap)().merge(s,o,a)})).find((s=>s.get(\"in\")===i.get(\"in\")&&s.get(\"name\")===i.get(\"name\")),(0,ze.OrderedMap)())},parameterInclusionSettingFor=(s,o,i,a)=>{const u=`${a}.${i}`;return s.getIn([\"meta\",\"paths\",...o,\"parameter_inclusions\",u],!1)},parameterWithMeta=(s,o,i,a)=>{const u=Ns(s).getIn([\"paths\",...o,\"parameters\"],(0,ze.OrderedMap)()).find((s=>s.get(\"in\")===a&&s.get(\"name\")===i),(0,ze.OrderedMap)());return parameterWithMetaByIdentity(s,o,u)},operationWithMeta=(s,o,i)=>{const a=Ns(s).getIn([\"paths\",o,i],(0,ze.OrderedMap)()),u=s.getIn([\"meta\",\"paths\",o,i],(0,ze.OrderedMap)()),_=a.get(\"parameters\",(0,ze.List)()).map((a=>parameterWithMetaByIdentity(s,[o,i],a)));return(0,ze.OrderedMap)().merge(a,u).set(\"parameters\",_)};function getParameter(s,o,i,a){return o=o||[],s.getIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)([])).find((s=>ze.Map.isMap(s)&&s.get(\"name\")===i&&s.get(\"in\")===a))||(0,ze.Map)()}const ro=Vt(spec,(s=>{const o=s.get(\"host\");return\"string\"==typeof o&&o.length>0&&\"/\"!==o[0]}));function parameterValues(s,o,i){return o=o||[],operationWithMeta(s,...o).get(\"parameters\",(0,ze.List)()).reduce(((s,o)=>{let a=i&&\"body\"===o.get(\"in\")?o.get(\"value_xml\"):o.get(\"value\");return ze.List.isList(a)&&(a=a.filter((s=>\"\"!==s))),s.set(paramToIdentifier(o,{allowHashes:!1}),a)}),(0,ze.fromJS)({}))}function parametersIncludeIn(s,o=\"\"){if(ze.List.isList(s))return s.some((s=>ze.Map.isMap(s)&&s.get(\"in\")===o))}function parametersIncludeType(s,o=\"\"){if(ze.List.isList(s))return s.some((s=>ze.Map.isMap(s)&&s.get(\"type\")===o))}function contentTypeValues(s,o){o=o||[];let i=Ns(s).getIn([\"paths\",...o],(0,ze.fromJS)({})),a=s.getIn([\"meta\",\"paths\",...o],(0,ze.fromJS)({})),u=currentProducesFor(s,o);const _=i.get(\"parameters\")||new ze.List,w=a.get(\"consumes_value\")?a.get(\"consumes_value\"):parametersIncludeType(_,\"file\")?\"multipart/form-data\":parametersIncludeType(_,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,ze.fromJS)({requestContentType:w,responseContentType:u})}function currentProducesFor(s,o){o=o||[];const i=Ns(s).getIn([\"paths\",...o],null);if(null===i)return;const a=s.getIn([\"meta\",\"paths\",...o,\"produces_value\"],null),u=i.getIn([\"produces\",0],null);return a||u||\"application/json\"}function producesOptionsFor(s,o){o=o||[];const i=Ns(s),a=i.getIn([\"paths\",...o],null);if(null===a)return;const[u]=o,_=a.get(\"produces\",null),w=i.getIn([\"paths\",u,\"produces\"],null),x=i.getIn([\"produces\"],null);return _||w||x}function consumesOptionsFor(s,o){o=o||[];const i=Ns(s),a=i.getIn([\"paths\",...o],null);if(null===a)return;const[u]=o,_=a.get(\"consumes\",null),w=i.getIn([\"paths\",u,\"consumes\"],null),x=i.getIn([\"consumes\"],null);return _||w||x}const operationScheme=(s,o,i)=>{let a=s.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),u=Array.isArray(a)?a[1]:null;return s.getIn([\"scheme\",o,i])||s.getIn([\"scheme\",\"_defaultScheme\"])||u||\"\"},canExecuteScheme=(s,o,i)=>[\"http\",\"https\"].indexOf(operationScheme(s,o,i))>-1,validationErrors=(s,o)=>{o=o||[];const i=s.getIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)([])),a=[];if(0===i.length)return a;const getErrorsWithPaths=(s,o=[])=>{const getNestedErrorsWithPaths=(s,o)=>{const i=[...o,s.get(\"propKey\")||s.get(\"index\")];return ze.Map.isMap(s.get(\"error\"))?getErrorsWithPaths(s.get(\"error\"),i):{error:s.get(\"error\"),path:i}};return ze.List.isList(s)?s.map((s=>ze.Map.isMap(s)?getNestedErrorsWithPaths(s,o):{error:s,path:o})):getNestedErrorsWithPaths(s,o)};return i.forEach(((s,o)=>{const i=o.split(\".\").slice(1,-1).join(\".\"),u=s.get(\"errors\");if(u&&u.count()){getErrorsWithPaths(u).forEach((({error:s,path:o})=>{a.push(((s,o,i)=>`For '${i}'${(o=o.reduce(((s,o)=>\"number\"==typeof o?`${s}[${o}]`:s?`${s}.${o}`:o),\"\"))?` at path '${o}'`:\"\"}: ${s}.`)(s,o,i))}))}})),a},validateBeforeExecute=(s,o)=>0===validationErrors(s,o).length,getOAS3RequiredRequestBodyContentType=(s,o)=>{let i={requestBody:!1,requestContentType:{}},a=s.getIn([\"resolvedSubtrees\",\"paths\",...o,\"requestBody\"],(0,ze.fromJS)([]));return a.size<1||(a.getIn([\"required\"])&&(i.requestBody=a.getIn([\"required\"])),a.getIn([\"content\"]).entrySeq().forEach((s=>{const o=s[0];if(s[1].getIn([\"schema\",\"required\"])){const a=s[1].getIn([\"schema\",\"required\"]).toJS();i.requestContentType[o]=a}}))),i},isMediaTypeSchemaPropertiesEqual=(s,o,i,a)=>{if((i||a)&&i===a)return!0;let u=s.getIn([\"resolvedSubtrees\",\"paths\",...o,\"requestBody\",\"content\"],(0,ze.fromJS)([]));if(u.size<2||!i||!a)return!1;let _=u.getIn([i,\"schema\",\"properties\"],(0,ze.fromJS)([])),w=u.getIn([a,\"schema\",\"properties\"],(0,ze.fromJS)([]));return!!_.equals(w)};function returnSelfOrNewMap(s){return ze.Map.isMap(s)?s:new ze.Map}var no=__webpack_require__(85015),so=__webpack_require__.n(no),oo=__webpack_require__(38221),io=__webpack_require__.n(oo),ao=__webpack_require__(63560),co=__webpack_require__.n(ao),lo=__webpack_require__(56367),uo=__webpack_require__.n(lo);const po=\"spec_update_spec\",ho=\"spec_update_url\",fo=\"spec_update_json\",mo=\"spec_update_param\",go=\"spec_update_empty_param_inclusion\",yo=\"spec_validate_param\",vo=\"spec_set_response\",bo=\"spec_set_request\",_o=\"spec_set_mutated_request\",So=\"spec_log_request\",Eo=\"spec_clear_response\",wo=\"spec_clear_request\",xo=\"spec_clear_validate_param\",ko=\"spec_update_operation_meta_value\",Oo=\"spec_update_resolved\",Co=\"spec_update_resolved_subtree\",Ao=\"set_scheme\",toStr=s=>so()(s)?s:\"\";function updateSpec(s){const o=toStr(s).replace(/\\t/g,\"  \");if(\"string\"==typeof s)return{type:po,payload:o}}function updateResolved(s){return{type:Oo,payload:s}}function updateUrl(s){return{type:ho,payload:s}}function updateJsonSpec(s){return{type:fo,payload:s}}const parseToJson=s=>({specActions:o,specSelectors:i,errActions:a})=>{let{specStr:u}=i,_=null;try{s=s||u(),a.clear({source:\"parser\"}),_=fn.load(s,{schema:rn})}catch(s){return console.error(s),a.newSpecErr({source:\"parser\",level:\"error\",message:s.reason,line:s.mark&&s.mark.line?s.mark.line+1:void 0})}return _&&\"object\"==typeof _?o.updateJsonSpec(_):o.updateJsonSpec({})};let jo=!1;const resolveSpec=(s,o)=>({specActions:i,specSelectors:a,errActions:u,fn:{fetch:_,resolve:w,AST:x={}},getConfigs:C})=>{jo||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),jo=!0);const{modelPropertyMacro:j,parameterMacro:L,requestInterceptor:B,responseInterceptor:$}=C();void 0===s&&(s=a.specJson()),void 0===o&&(o=a.url());let V=x.getLineNumberForPath?x.getLineNumberForPath:()=>{},U=a.specStr();return w({fetch:_,spec:s,baseDoc:String(new URL(o,document.baseURI)),modelPropertyMacro:j,parameterMacro:L,requestInterceptor:B,responseInterceptor:$}).then((({spec:s,errors:o})=>{if(u.clear({type:\"thrown\"}),Array.isArray(o)&&o.length>0){let s=o.map((s=>(console.error(s),s.line=s.fullPath?V(U,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));u.newThrownErrBatch(s)}return i.updateResolved(s)}))};let Po=[];const Io=io()((()=>{const s=Po.reduce(((s,{path:o,system:i})=>(s.has(i)||s.set(i,[]),s.get(i).push(o),s)),new Map);Po=[],s.forEach((async(s,o)=>{if(!o)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!o.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:i,errSelectors:a,fn:{resolveSubtree:u,fetch:_,AST:w={}},specSelectors:x,specActions:C}=o,j=w.getLineNumberForPath??xs()(void 0),L=x.specStr(),{modelPropertyMacro:B,parameterMacro:$,requestInterceptor:V,responseInterceptor:U}=o.getConfigs();try{const o=await s.reduce((async(s,o)=>{let{resultMap:w,specWithCurrentSubtrees:C}=await s;const{errors:z,spec:Y}=await u(C,o,{baseDoc:String(new URL(x.url(),document.baseURI)),modelPropertyMacro:B,parameterMacro:$,requestInterceptor:V,responseInterceptor:U});if(a.allErrors().size&&i.clearBy((s=>\"thrown\"!==s.get(\"type\")||\"resolver\"!==s.get(\"source\")||!s.get(\"fullPath\")?.every(((s,i)=>s===o[i]||void 0===o[i])))),Array.isArray(z)&&z.length>0){let s=z.map((s=>(s.line=s.fullPath?j(L,s.fullPath):null,s.path=s.fullPath?s.fullPath.join(\".\"):null,s.level=\"error\",s.type=\"thrown\",s.source=\"resolver\",Object.defineProperty(s,\"message\",{enumerable:!0,value:s.message}),s)));i.newThrownErrBatch(s)}return Y&&x.isOAS3()&&\"components\"===o[0]&&\"securitySchemes\"===o[1]&&await Promise.all(Object.values(Y).filter((s=>\"openIdConnect\"===s?.type)).map((async s=>{const o={url:s.openIdConnectUrl,requestInterceptor:V,responseInterceptor:U};try{const i=await _(o);i instanceof Error||i.status>=400?console.error(i.statusText+\" \"+o.url):s.openIdConnectData=JSON.parse(i.text)}catch(s){console.error(s)}}))),co()(w,o,Y),C=uo()(o,Y,C),{resultMap:w,specWithCurrentSubtrees:C}}),Promise.resolve({resultMap:(x.specResolvedSubtree([])||(0,ze.Map)()).toJS(),specWithCurrentSubtrees:x.specJS()}));C.updateResolvedSubtree([],o.resultMap)}catch(s){console.error(s)}}))}),35),requestResolvedSubtree=s=>o=>{Po.find((({path:i,system:a})=>a===o&&i.toString()===s.toString()))||(Po.push({path:s,system:o}),Io())};function changeParam(s,o,i,a,u){return{type:mo,payload:{path:s,value:a,paramName:o,paramIn:i,isXml:u}}}function changeParamByIdentity(s,o,i,a){return{type:mo,payload:{path:s,param:o,value:i,isXml:a}}}const updateResolvedSubtree=(s,o)=>({type:Co,payload:{path:s,value:o}}),invalidateResolvedSubtreeCache=()=>({type:Co,payload:{path:[],value:(0,ze.Map)()}}),validateParams=(s,o)=>({type:yo,payload:{pathMethod:s,isOAS3:o}}),updateEmptyParamInclusion=(s,o,i,a)=>({type:go,payload:{pathMethod:s,paramName:o,paramIn:i,includeEmptyValue:a}});function clearValidateParams(s){return{type:xo,payload:{pathMethod:s}}}function changeConsumesValue(s,o){return{type:ko,payload:{path:s,value:o,key:\"consumes_value\"}}}function changeProducesValue(s,o){return{type:ko,payload:{path:s,value:o,key:\"produces_value\"}}}const setResponse=(s,o,i)=>({payload:{path:s,method:o,res:i},type:vo}),setRequest=(s,o,i)=>({payload:{path:s,method:o,req:i},type:bo}),setMutatedRequest=(s,o,i)=>({payload:{path:s,method:o,req:i},type:_o}),logRequest=s=>({payload:s,type:So}),executeRequest=s=>({fn:o,specActions:i,specSelectors:a,getConfigs:u,oas3Selectors:_})=>{let{pathName:w,method:x,operation:C}=s,{requestInterceptor:j,responseInterceptor:L}=u(),B=C.toJS();if(C&&C.get(\"parameters\")&&C.get(\"parameters\").filter((s=>s&&!0===s.get(\"allowEmptyValue\"))).forEach((o=>{if(a.parameterInclusionSettingFor([w,x],o.get(\"name\"),o.get(\"in\"))){s.parameters=s.parameters||{};const i=paramToValue(o,s.parameters);(!i||i&&0===i.size)&&(s.parameters[o.get(\"name\")]=\"\")}})),s.contextUrl=Nt()(a.url()).toString(),B&&B.operationId?s.operationId=B.operationId:B&&w&&x&&(s.operationId=o.opId(B,w,x)),a.isOAS3()){const o=`${w}:${x}`;s.server=_.selectedServer(o)||_.selectedServer();const i=_.serverVariables({server:s.server,namespace:o}).toJS(),a=_.serverVariables({server:s.server}).toJS();s.serverVariables=Object.keys(i).length?i:a,s.requestContentType=_.requestContentType(w,x),s.responseContentType=_.responseContentType(w,x)||\"*/*\";const u=_.requestBodyValue(w,x),C=_.requestBodyInclusionSetting(w,x);u&&u.toJS?s.requestBody=u.map((s=>ze.Map.isMap(s)?s.get(\"value\"):s)).filter(((s,o)=>(Array.isArray(s)?0!==s.length:!isEmptyValue(s))||C.get(o))).toJS():s.requestBody=u}let $=Object.assign({},s);$=o.buildRequest($),i.setRequest(s.pathName,s.method,$);s.requestInterceptor=async o=>{let a=await j.apply(void 0,[o]),u=Object.assign({},a);return i.setMutatedRequest(s.pathName,s.method,u),a},s.responseInterceptor=L;const V=Date.now();return o.execute(s).then((o=>{o.duration=Date.now()-V,i.setResponse(s.pathName,s.method,o)})).catch((o=>{\"Failed to fetch\"===o.message&&(o.name=\"\",o.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),i.setResponse(s.pathName,s.method,{error:!0,err:o})}))},actions_execute=({path:s,method:o,...i}={})=>a=>{let{fn:{fetch:u},specSelectors:_,specActions:w}=a,x=_.specJsonWithResolvedSubtrees().toJS(),C=_.operationScheme(s,o),{requestContentType:j,responseContentType:L}=_.contentTypeValues([s,o]).toJS(),B=/xml/i.test(j),$=_.parameterValues([s,o],B).toJS();return w.executeRequest({...i,fetch:u,spec:x,pathName:s,method:o,parameters:$,requestContentType:j,scheme:C,responseContentType:L})};function clearResponse(s,o){return{type:Eo,payload:{path:s,method:o}}}function clearRequest(s,o){return{type:wo,payload:{path:s,method:o}}}function setScheme(s,o,i){return{type:Ao,payload:{scheme:s,path:o,method:i}}}const To={[po]:(s,o)=>\"string\"==typeof o.payload?s.set(\"spec\",o.payload):s,[ho]:(s,o)=>s.set(\"url\",o.payload+\"\"),[fo]:(s,o)=>s.set(\"json\",fromJSOrdered(o.payload)),[Oo]:(s,o)=>s.setIn([\"resolved\"],fromJSOrdered(o.payload)),[Co]:(s,o)=>{const{value:i,path:a}=o.payload;return s.setIn([\"resolvedSubtrees\",...a],fromJSOrdered(i))},[mo]:(s,{payload:o})=>{let{path:i,paramName:a,paramIn:u,param:_,value:w,isXml:x}=o,C=_?paramToIdentifier(_):`${u}.${a}`;const j=x?\"value_xml\":\"value\";return s.setIn([\"meta\",\"paths\",...i,\"parameters\",C,j],(0,ze.fromJS)(w))},[go]:(s,{payload:o})=>{let{pathMethod:i,paramName:a,paramIn:u,includeEmptyValue:_}=o;if(!a||!u)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),s;const w=`${u}.${a}`;return s.setIn([\"meta\",\"paths\",...i,\"parameter_inclusions\",w],_)},[yo]:(s,{payload:{pathMethod:o,isOAS3:i}})=>{const a=Ns(s).getIn([\"paths\",...o]),u=parameterValues(s,o).toJS();return s.updateIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)({}),(_=>a.get(\"parameters\",(0,ze.List)()).reduce(((a,_)=>{const w=paramToValue(_,u),x=parameterInclusionSettingFor(s,o,_.get(\"name\"),_.get(\"in\")),C=((s,o,{isOAS3:i=!1,bypassRequiredCheck:a=!1}={})=>{let u=s.get(\"required\"),{schema:_,parameterContentMediaType:w}=getParameterSchema(s,{isOAS3:i});return validateValueBySchema(o,_,u,a,w)})(_,w,{bypassRequiredCheck:x,isOAS3:i});return a.setIn([paramToIdentifier(_),\"errors\"],(0,ze.fromJS)(C))}),_)))},[xo]:(s,{payload:{pathMethod:o}})=>s.updateIn([\"meta\",\"paths\",...o,\"parameters\"],(0,ze.fromJS)([]),(s=>s.map((s=>s.set(\"errors\",(0,ze.fromJS)([])))))),[vo]:(s,{payload:{res:o,path:i,method:a}})=>{let u;u=o.error?Object.assign({error:!0,name:o.err.name,message:o.err.message,statusCode:o.err.statusCode},o.err.response):o,u.headers=u.headers||{};let _=s.setIn([\"responses\",i,a],fromJSOrdered(u));return lt.Blob&&u.data instanceof lt.Blob&&(_=_.setIn([\"responses\",i,a,\"text\"],u.data)),_},[bo]:(s,{payload:{req:o,path:i,method:a}})=>s.setIn([\"requests\",i,a],fromJSOrdered(o)),[_o]:(s,{payload:{req:o,path:i,method:a}})=>s.setIn([\"mutatedRequests\",i,a],fromJSOrdered(o)),[ko]:(s,{payload:{path:o,value:i,key:a}})=>{let u=[\"paths\",...o],_=[\"meta\",\"paths\",...o];return s.getIn([\"json\",...u])||s.getIn([\"resolved\",...u])||s.getIn([\"resolvedSubtrees\",...u])?s.setIn([..._,a],(0,ze.fromJS)(i)):s},[Eo]:(s,{payload:{path:o,method:i}})=>s.deleteIn([\"responses\",o,i]),[wo]:(s,{payload:{path:o,method:i}})=>s.deleteIn([\"requests\",o,i]),[Ao]:(s,{payload:{scheme:o,path:i,method:a}})=>i&&a?s.setIn([\"scheme\",i,a],o):i||a?void 0:s.setIn([\"scheme\",\"_defaultScheme\"],o)},wrap_actions_updateSpec=(s,{specActions:o})=>(...i)=>{s(...i),o.parseToJson(...i)},wrap_actions_updateJsonSpec=(s,{specActions:o})=>(...i)=>{s(...i),o.invalidateResolvedSubtreeCache();const[a]=i,u=An()(a,[\"paths\"])||{};Object.keys(u).forEach((s=>{const i=An()(u,[s]);as()(i)&&i.$ref&&o.requestResolvedSubtree([\"paths\",s])})),o.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(s,{specActions:o})=>i=>(o.logRequest(i),s(i)),wrap_actions_validateParams=(s,{specSelectors:o})=>i=>s(i,o.isOAS3()),plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...Y},reducers:{...To},actions:{...z},selectors:{...U}}}});var No=function(){var extendStatics=function(s,o){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var i in o)o.hasOwnProperty(i)&&(s[i]=o[i])},extendStatics(s,o)};return function(s,o){function __(){this.constructor=s}extendStatics(s,o),s.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}}(),Mo=Object.prototype.hasOwnProperty;function module_helpers_hasOwnProperty(s,o){return Mo.call(s,o)}function _objectKeys(s){if(Array.isArray(s)){for(var o=new Array(s.length),i=0;i<o.length;i++)o[i]=\"\"+i;return o}if(Object.keys)return Object.keys(s);var a=[];for(var u in s)module_helpers_hasOwnProperty(s,u)&&a.push(u);return a}function _deepClone(s){switch(typeof s){case\"object\":return JSON.parse(JSON.stringify(s));case\"undefined\":return null;default:return s}}function helpers_isInteger(s){for(var o,i=0,a=s.length;i<a;){if(!((o=s.charCodeAt(i))>=48&&o<=57))return!1;i++}return!0}function escapePathComponent(s){return-1===s.indexOf(\"/\")&&-1===s.indexOf(\"~\")?s:s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")}function unescapePathComponent(s){return s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}function hasUndefined(s){if(void 0===s)return!0;if(s)if(Array.isArray(s)){for(var o=0,i=s.length;o<i;o++)if(hasUndefined(s[o]))return!0}else if(\"object\"==typeof s)for(var a=_objectKeys(s),u=a.length,_=0;_<u;_++)if(hasUndefined(s[a[_]]))return!0;return!1}function patchErrorMessageFormatter(s,o){var i=[s];for(var a in o){var u=\"object\"==typeof o[a]?JSON.stringify(o[a],null,2):o[a];void 0!==u&&i.push(a+\": \"+u)}return i.join(\"\\n\")}var Ro=function(s){function PatchError(o,i,a,u,_){var w=this.constructor,x=s.call(this,patchErrorMessageFormatter(o,{name:i,index:a,operation:u,tree:_}))||this;return x.name=i,x.index=a,x.operation=u,x.tree=_,Object.setPrototypeOf(x,w.prototype),x.message=patchErrorMessageFormatter(o,{name:i,index:a,operation:u,tree:_}),x}return No(PatchError,s),PatchError}(Error),Do=Ro,Lo=_deepClone,Fo={add:function(s,o,i){return s[o]=this.value,{newDocument:i}},remove:function(s,o,i){var a=s[o];return delete s[o],{newDocument:i,removed:a}},replace:function(s,o,i){var a=s[o];return s[o]=this.value,{newDocument:i,removed:a}},move:function(s,o,i){var a=getValueByPointer(i,this.path);a&&(a=_deepClone(a));var u=applyOperation(i,{op:\"remove\",path:this.from}).removed;return applyOperation(i,{op:\"add\",path:this.path,value:u}),{newDocument:i,removed:a}},copy:function(s,o,i){var a=getValueByPointer(i,this.from);return applyOperation(i,{op:\"add\",path:this.path,value:_deepClone(a)}),{newDocument:i}},test:function(s,o,i){return{newDocument:i,test:_areEquals(s[o],this.value)}},_get:function(s,o,i){return this.value=s[o],{newDocument:i}}},Bo={add:function(s,o,i){return helpers_isInteger(o)?s.splice(o,0,this.value):s[o]=this.value,{newDocument:i,index:o}},remove:function(s,o,i){return{newDocument:i,removed:s.splice(o,1)[0]}},replace:function(s,o,i){var a=s[o];return s[o]=this.value,{newDocument:i,removed:a}},move:Fo.move,copy:Fo.copy,test:Fo.test,_get:Fo._get};function getValueByPointer(s,o){if(\"\"==o)return s;var i={op:\"_get\",path:o};return applyOperation(s,i),i.value}function applyOperation(s,o,i,a,u,_){if(void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===u&&(u=!0),void 0===_&&(_=0),i&&(\"function\"==typeof i?i(o,0,s,o.path):validator(o,0)),\"\"===o.path){var w={newDocument:s};if(\"add\"===o.op)return w.newDocument=o.value,w;if(\"replace\"===o.op)return w.newDocument=o.value,w.removed=s,w;if(\"move\"===o.op||\"copy\"===o.op)return w.newDocument=getValueByPointer(s,o.from),\"move\"===o.op&&(w.removed=s),w;if(\"test\"===o.op){if(w.test=_areEquals(s,o.value),!1===w.test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",_,o,s);return w.newDocument=s,w}if(\"remove\"===o.op)return w.removed=s,w.newDocument=null,w;if(\"_get\"===o.op)return o.value=s,w;if(i)throw new Do(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",_,o,s);return w}a||(s=_deepClone(s));var x=(o.path||\"\").split(\"/\"),C=s,j=1,L=x.length,B=void 0,$=void 0,V=void 0;for(V=\"function\"==typeof i?i:validator;;){if(($=x[j])&&-1!=$.indexOf(\"~\")&&($=unescapePathComponent($)),u&&(\"__proto__\"==$||\"prototype\"==$&&j>0&&\"constructor\"==x[j-1]))throw new TypeError(\"JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README\");if(i&&void 0===B&&(void 0===C[$]?B=x.slice(0,j).join(\"/\"):j==L-1&&(B=o.path),void 0!==B&&V(o,0,s,B)),j++,Array.isArray(C)){if(\"-\"===$)$=C.length;else{if(i&&!helpers_isInteger($))throw new Do(\"Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index\",\"OPERATION_PATH_ILLEGAL_ARRAY_INDEX\",_,o,s);helpers_isInteger($)&&($=~~$)}if(j>=L){if(i&&\"add\"===o.op&&$>C.length)throw new Do(\"The specified index MUST NOT be greater than the number of elements in the array\",\"OPERATION_VALUE_OUT_OF_BOUNDS\",_,o,s);if(!1===(w=Bo[o.op].call(o,C,$,s)).test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",_,o,s);return w}}else if(j>=L){if(!1===(w=Fo[o.op].call(o,C,$,s)).test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",_,o,s);return w}if(C=C[$],i&&j<L&&(!C||\"object\"!=typeof C))throw new Do(\"Cannot perform operation at the desired path\",\"OPERATION_PATH_UNRESOLVABLE\",_,o,s)}}function applyPatch(s,o,i,a,u){if(void 0===a&&(a=!0),void 0===u&&(u=!0),i&&!Array.isArray(o))throw new Do(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");a||(s=_deepClone(s));for(var _=new Array(o.length),w=0,x=o.length;w<x;w++)_[w]=applyOperation(s,o[w],i,!0,u,w),s=_[w].newDocument;return _.newDocument=s,_}function applyReducer(s,o,i){var a=applyOperation(s,o);if(!1===a.test)throw new Do(\"Test operation failed\",\"TEST_OPERATION_FAILED\",i,o,s);return a.newDocument}function validator(s,o,i,a){if(\"object\"!=typeof s||null===s||Array.isArray(s))throw new Do(\"Operation is not an object\",\"OPERATION_NOT_AN_OBJECT\",o,s,i);if(!Fo[s.op])throw new Do(\"Operation `op` property is not one of operations defined in RFC-6902\",\"OPERATION_OP_INVALID\",o,s,i);if(\"string\"!=typeof s.path)throw new Do(\"Operation `path` property is not a string\",\"OPERATION_PATH_INVALID\",o,s,i);if(0!==s.path.indexOf(\"/\")&&s.path.length>0)throw new Do('Operation `path` property must start with \"/\"',\"OPERATION_PATH_INVALID\",o,s,i);if((\"move\"===s.op||\"copy\"===s.op)&&\"string\"!=typeof s.from)throw new Do(\"Operation `from` property is not present (applicable in `move` and `copy` operations)\",\"OPERATION_FROM_REQUIRED\",o,s,i);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&void 0===s.value)throw new Do(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_REQUIRED\",o,s,i);if((\"add\"===s.op||\"replace\"===s.op||\"test\"===s.op)&&hasUndefined(s.value))throw new Do(\"Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)\",\"OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED\",o,s,i);if(i)if(\"add\"==s.op){var u=s.path.split(\"/\").length,_=a.split(\"/\").length;if(u!==_+1&&u!==_)throw new Do(\"Cannot perform an `add` operation at the desired path\",\"OPERATION_PATH_CANNOT_ADD\",o,s,i)}else if(\"replace\"===s.op||\"remove\"===s.op||\"_get\"===s.op){if(s.path!==a)throw new Do(\"Cannot perform the operation at a path that does not exist\",\"OPERATION_PATH_UNRESOLVABLE\",o,s,i)}else if(\"move\"===s.op||\"copy\"===s.op){var w=validate([{op:\"_get\",path:s.from,value:void 0}],i);if(w&&\"OPERATION_PATH_UNRESOLVABLE\"===w.name)throw new Do(\"Cannot perform the operation from a path that does not exist\",\"OPERATION_FROM_UNRESOLVABLE\",o,s,i)}}function validate(s,o,i){try{if(!Array.isArray(s))throw new Do(\"Patch sequence must be an array\",\"SEQUENCE_NOT_AN_ARRAY\");if(o)applyPatch(_deepClone(o),_deepClone(s),i||!0);else{i=i||validator;for(var a=0;a<s.length;a++)i(s[a],a,o,void 0)}}catch(s){if(s instanceof Do)return s;throw s}}function _areEquals(s,o){if(s===o)return!0;if(s&&o&&\"object\"==typeof s&&\"object\"==typeof o){var i,a,u,_=Array.isArray(s),w=Array.isArray(o);if(_&&w){if((a=s.length)!=o.length)return!1;for(i=a;0!=i--;)if(!_areEquals(s[i],o[i]))return!1;return!0}if(_!=w)return!1;var x=Object.keys(s);if((a=x.length)!==Object.keys(o).length)return!1;for(i=a;0!=i--;)if(!o.hasOwnProperty(x[i]))return!1;for(i=a;0!=i--;)if(!_areEquals(s[u=x[i]],o[u]))return!1;return!0}return s!=s&&o!=o}var $o=new WeakMap,qo=function qo(s){this.observers=new Map,this.obj=s},Vo=function Vo(s,o){this.callback=s,this.observer=o};function unobserve(s,o){o.unobserve()}function observe(s,o){var i,a=function getMirror(s){return $o.get(s)}(s);if(a){var u=function getObserverFromMirror(s,o){return s.observers.get(o)}(a,o);i=u&&u.observer}else a=new qo(s),$o.set(s,a);if(i)return i;if(i={},a.value=_deepClone(s),o){i.callback=o,i.next=null;var dirtyCheck=function(){generate(i)},fastCheck=function(){clearTimeout(i.next),i.next=setTimeout(dirtyCheck)};\"undefined\"!=typeof window&&(window.addEventListener(\"mouseup\",fastCheck),window.addEventListener(\"keyup\",fastCheck),window.addEventListener(\"mousedown\",fastCheck),window.addEventListener(\"keydown\",fastCheck),window.addEventListener(\"change\",fastCheck))}return i.patches=[],i.object=s,i.unobserve=function(){generate(i),clearTimeout(i.next),function removeObserverFromMirror(s,o){s.observers.delete(o.callback)}(a,i),\"undefined\"!=typeof window&&(window.removeEventListener(\"mouseup\",fastCheck),window.removeEventListener(\"keyup\",fastCheck),window.removeEventListener(\"mousedown\",fastCheck),window.removeEventListener(\"keydown\",fastCheck),window.removeEventListener(\"change\",fastCheck))},a.observers.set(o,new Vo(o,i)),i}function generate(s,o){void 0===o&&(o=!1);var i=$o.get(s.object);_generate(i.value,s.object,s.patches,\"\",o),s.patches.length&&applyPatch(i.value,s.patches);var a=s.patches;return a.length>0&&(s.patches=[],s.callback&&s.callback(a)),a}function _generate(s,o,i,a,u){if(o!==s){\"function\"==typeof o.toJSON&&(o=o.toJSON());for(var _=_objectKeys(o),w=_objectKeys(s),x=!1,C=w.length-1;C>=0;C--){var j=s[B=w[C]];if(!module_helpers_hasOwnProperty(o,B)||void 0===o[B]&&void 0!==j&&!1===Array.isArray(o))Array.isArray(s)===Array.isArray(o)?(u&&i.push({op:\"test\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(j)}),i.push({op:\"remove\",path:a+\"/\"+escapePathComponent(B)}),x=!0):(u&&i.push({op:\"test\",path:a,value:s}),i.push({op:\"replace\",path:a,value:o}),!0);else{var L=o[B];\"object\"==typeof j&&null!=j&&\"object\"==typeof L&&null!=L&&Array.isArray(j)===Array.isArray(L)?_generate(j,L,i,a+\"/\"+escapePathComponent(B),u):j!==L&&(u&&i.push({op:\"test\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(j)}),i.push({op:\"replace\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(L)}))}}if(x||_.length!=w.length)for(C=0;C<_.length;C++){var B;module_helpers_hasOwnProperty(s,B=_[C])||void 0===o[B]||i.push({op:\"add\",path:a+\"/\"+escapePathComponent(B),value:_deepClone(o[B])})}}}function compare(s,o,i){void 0===i&&(i=!1);var a=[];return _generate(s,o,a,\"\",i),a}Object.assign({},Z,ee,{JsonPatchError:Ro,deepClone:_deepClone,escapePathComponent,unescapePathComponent});var Uo=__webpack_require__(14744),zo=__webpack_require__.n(Uo);const Wo={add:function add(s,o){return{op:\"add\",path:s,value:o}},replace,remove:function remove(s){return{op:\"remove\",path:s}},merge:function lib_merge(s,o){return{type:\"mutation\",op:\"merge\",path:s,value:o}},mergeDeep:function mergeDeep(s,o){return{type:\"mutation\",op:\"mergeDeep\",path:s,value:o}},context:function context(s,o){return{type:\"context\",path:s,value:o}},getIn:function lib_getIn(s,o){return o.reduce(((s,o)=>void 0!==o&&s?s[o]:s),s)},applyPatch:function lib_applyPatch(s,o,i){if(i=i||{},\"merge\"===(o={...o,path:o.path&&normalizeJSONPath(o.path)}).op){const i=getInByJsonPath(s,o.path);Object.assign(i,o.value),applyPatch(s,[replace(o.path,i)])}else if(\"mergeDeep\"===o.op){const i=getInByJsonPath(s,o.path),a=zo()(i,o.value,{customMerge:s=>{if(\"enum\"===s)return(s,o)=>Array.isArray(s)&&Array.isArray(o)?[...new Set([...s,...o])]:zo()(s,o)}});s=applyPatch(s,[replace(o.path,a)]).newDocument}else if(\"add\"===o.op&&\"\"===o.path&&lib_isObject(o.value)){applyPatch(s,Object.keys(o.value).reduce(((s,i)=>(s.push({op:\"add\",path:`/${normalizeJSONPath(i)}`,value:o.value[i]}),s)),[]))}else if(\"replace\"===o.op&&\"\"===o.path){let{value:a}=o;i.allowMetaPatches&&o.meta&&isAdditiveMutation(o)&&(Array.isArray(o.value)||lib_isObject(o.value))&&(a={...a,...o.meta}),s=a}else if(applyPatch(s,[o]),i.allowMetaPatches&&o.meta&&isAdditiveMutation(o)&&(Array.isArray(o.value)||lib_isObject(o.value))){const i={...getInByJsonPath(s,o.path),...o.meta};applyPatch(s,[replace(o.path,i)])}return s},parentPathMatch:function parentPathMatch(s,o){if(!Array.isArray(o))return!1;for(let i=0,a=o.length;i<a;i+=1)if(o[i]!==s[i])return!1;return!0},flatten,fullyNormalizeArray:function fullyNormalizeArray(s){return cleanArray(flatten(lib_normalizeArray(s)))},normalizeArray:lib_normalizeArray,isPromise:function isPromise(s){return lib_isObject(s)&&lib_isFunction(s.then)},forEachNew:function forEachNew(s,o){try{return forEachNewPatch(s,forEach,o)}catch(s){return s}},forEachNewPrimitive:function forEachNewPrimitive(s,o){try{return forEachNewPatch(s,forEachPrimitive,o)}catch(s){return s}},isJsonPatch,isContextPatch:function isContextPatch(s){return isPatch(s)&&\"context\"===s.type},isPatch,isMutation,isAdditiveMutation,isGenerator:function isGenerator(s){return\"[object GeneratorFunction]\"===Object.prototype.toString.call(s)},isFunction:lib_isFunction,isObject:lib_isObject,isError:function lib_isError(s){return s instanceof Error}};function normalizeJSONPath(s){return Array.isArray(s)?s.length<1?\"\":`/${s.map((s=>(s+\"\").replace(/~/g,\"~0\").replace(/\\//g,\"~1\"))).join(\"/\")}`:s}function replace(s,o,i){return{op:\"replace\",path:s,value:o,meta:i}}function forEachNewPatch(s,o,i){return cleanArray(flatten(s.filter(isAdditiveMutation).map((s=>o(s.value,i,s.path)))||[]))}function forEachPrimitive(s,o,i){return i=i||[],Array.isArray(s)?s.map(((s,a)=>forEachPrimitive(s,o,i.concat(a)))):lib_isObject(s)?Object.keys(s).map((a=>forEachPrimitive(s[a],o,i.concat(a)))):o(s,i[i.length-1],i)}function forEach(s,o,i){let a=[];if((i=i||[]).length>0){const u=o(s,i[i.length-1],i);u&&(a=a.concat(u))}if(Array.isArray(s)){const u=s.map(((s,a)=>forEach(s,o,i.concat(a))));u&&(a=a.concat(u))}else if(lib_isObject(s)){const u=Object.keys(s).map((a=>forEach(s[a],o,i.concat(a))));u&&(a=a.concat(u))}return a=flatten(a),a}function lib_normalizeArray(s){return Array.isArray(s)?s:[s]}function flatten(s){return[].concat(...s.map((s=>Array.isArray(s)?flatten(s):s)))}function cleanArray(s){return s.filter((s=>void 0!==s))}function lib_isObject(s){return s&&\"object\"==typeof s}function lib_isFunction(s){return s&&\"function\"==typeof s}function isJsonPatch(s){if(isPatch(s)){const{op:o}=s;return\"add\"===o||\"remove\"===o||\"replace\"===o}return!1}function isMutation(s){return isJsonPatch(s)||isPatch(s)&&\"mutation\"===s.type}function isAdditiveMutation(s){return isMutation(s)&&(\"add\"===s.op||\"replace\"===s.op||\"merge\"===s.op||\"mergeDeep\"===s.op)}function isPatch(s){return s&&\"object\"==typeof s}function getInByJsonPath(s,o){try{return getValueByPointer(s,o)}catch(s){return console.error(s),{}}}var Jo=__webpack_require__(48675);const Ho=class ApiDOMAggregateError extends Jo{constructor(s,o,i){if(super(s,o,i),this.name=this.constructor.name,\"string\"==typeof o&&(this.message=o),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(o).stack,null!=i&&\"object\"==typeof i&&Object.hasOwn(i,\"cause\")&&!(\"cause\"in this)){const{cause:s}=i;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}};class ApiDOMError extends Error{static[Symbol.hasInstance](s){return super[Symbol.hasInstance](s)||Function.prototype[Symbol.hasInstance].call(Ho,s)}constructor(s,o){if(super(s,o),this.name=this.constructor.name,\"string\"==typeof s&&(this.message=s),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack,null!=o&&\"object\"==typeof o&&Object.hasOwn(o,\"cause\")&&!(\"cause\"in this)){const{cause:s}=o;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}}}const Ko=ApiDOMError;const Go=class ApiDOMStructuredError extends Ko{constructor(s,o){if(super(s,o),null!=o&&\"object\"==typeof o){const{cause:s,...i}=o;Object.assign(this,i)}}};var Yo=__webpack_require__(65606);function _isPlaceholder(s){return null!=s&&\"object\"==typeof s&&!0===s[\"@@functional/placeholder\"]}function _curry1(s){return function f1(o){return 0===arguments.length||_isPlaceholder(o)?f1:s.apply(this,arguments)}}function _curry2(s){return function f2(o,i){switch(arguments.length){case 0:return f2;case 1:return _isPlaceholder(o)?f2:_curry1((function(i){return s(o,i)}));default:return _isPlaceholder(o)&&_isPlaceholder(i)?f2:_isPlaceholder(o)?_curry1((function(o){return s(o,i)})):_isPlaceholder(i)?_curry1((function(i){return s(o,i)})):s(o,i)}}}function _curry3(s){return function f3(o,i,a){switch(arguments.length){case 0:return f3;case 1:return _isPlaceholder(o)?f3:_curry2((function(i,a){return s(o,i,a)}));case 2:return _isPlaceholder(o)&&_isPlaceholder(i)?f3:_isPlaceholder(o)?_curry2((function(o,a){return s(o,i,a)})):_isPlaceholder(i)?_curry2((function(i,a){return s(o,i,a)})):_curry1((function(a){return s(o,i,a)}));default:return _isPlaceholder(o)&&_isPlaceholder(i)&&_isPlaceholder(a)?f3:_isPlaceholder(o)&&_isPlaceholder(i)?_curry2((function(o,i){return s(o,i,a)})):_isPlaceholder(o)&&_isPlaceholder(a)?_curry2((function(o,a){return s(o,i,a)})):_isPlaceholder(i)&&_isPlaceholder(a)?_curry2((function(i,a){return s(o,i,a)})):_isPlaceholder(o)?_curry1((function(o){return s(o,i,a)})):_isPlaceholder(i)?_curry1((function(i){return s(o,i,a)})):_isPlaceholder(a)?_curry1((function(a){return s(o,i,a)})):s(o,i,a)}}}const Xo=Number.isInteger||function _isInteger(s){return(s|0)===s};function _isString(s){return\"[object String]\"===Object.prototype.toString.call(s)}function _nth(s,o){var i=s<0?o.length+s:s;return _isString(o)?o.charAt(i):o[i]}function _path(s,o){for(var i=o,a=0;a<s.length;a+=1){if(null==i)return;var u=s[a];i=Xo(u)?_nth(u,i):i[u]}return i}const Qo=_curry3((function pathSatisfies(s,o,i){return s(_path(o,i))}));function _cloneRegExp(s){return new RegExp(s.source,s.flags?s.flags:(s.global?\"g\":\"\")+(s.ignoreCase?\"i\":\"\")+(s.multiline?\"m\":\"\")+(s.sticky?\"y\":\"\")+(s.unicode?\"u\":\"\")+(s.dotAll?\"s\":\"\"))}function _arrayFromIterator(s){for(var o,i=[];!(o=s.next()).done;)i.push(o.value);return i}function _includesWith(s,o,i){for(var a=0,u=i.length;a<u;){if(s(o,i[a]))return!0;a+=1}return!1}function _has(s,o){return Object.prototype.hasOwnProperty.call(o,s)}const Zo=\"function\"==typeof Object.is?Object.is:function _objectIs(s,o){return s===o?0!==s||1/s==1/o:s!=s&&o!=o};var _i=Object.prototype.toString;const Ei=function(){return\"[object Arguments]\"===_i.call(arguments)?function _isArguments(s){return\"[object Arguments]\"===_i.call(s)}:function _isArguments(s){return _has(\"callee\",s)}}();var Oi=!{toString:null}.propertyIsEnumerable(\"toString\"),Pi=[\"constructor\",\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"],Mi=function(){return arguments.propertyIsEnumerable(\"length\")}(),Ri=function contains(s,o){for(var i=0;i<s.length;){if(s[i]===o)return!0;i+=1}return!1},Wi=\"function\"!=typeof Object.keys||Mi?_curry1((function keys(s){if(Object(s)!==s)return[];var o,i,a=[],u=Mi&&Ei(s);for(o in s)!_has(o,s)||u&&\"length\"===o||(a[a.length]=o);if(Oi)for(i=Pi.length-1;i>=0;)_has(o=Pi[i],s)&&!Ri(a,o)&&(a[a.length]=o),i-=1;return a})):_curry1((function keys(s){return Object(s)!==s?[]:Object.keys(s)}));const ea=Wi;const ra=_curry1((function type(s){return null===s?\"Null\":void 0===s?\"Undefined\":Object.prototype.toString.call(s).slice(8,-1)}));function _uniqContentEquals(s,o,i,a){var u=_arrayFromIterator(s);function eq(s,o){return _equals(s,o,i.slice(),a.slice())}return!_includesWith((function(s,o){return!_includesWith(eq,o,s)}),_arrayFromIterator(o),u)}function _equals(s,o,i,a){if(Zo(s,o))return!0;var u=ra(s);if(u!==ra(o))return!1;if(\"function\"==typeof s[\"fantasy-land/equals\"]||\"function\"==typeof o[\"fantasy-land/equals\"])return\"function\"==typeof s[\"fantasy-land/equals\"]&&s[\"fantasy-land/equals\"](o)&&\"function\"==typeof o[\"fantasy-land/equals\"]&&o[\"fantasy-land/equals\"](s);if(\"function\"==typeof s.equals||\"function\"==typeof o.equals)return\"function\"==typeof s.equals&&s.equals(o)&&\"function\"==typeof o.equals&&o.equals(s);switch(u){case\"Arguments\":case\"Array\":case\"Object\":if(\"function\"==typeof s.constructor&&\"Promise\"===function _functionName(s){var o=String(s).match(/^function (\\w*)/);return null==o?\"\":o[1]}(s.constructor))return s===o;break;case\"Boolean\":case\"Number\":case\"String\":if(typeof s!=typeof o||!Zo(s.valueOf(),o.valueOf()))return!1;break;case\"Date\":if(!Zo(s.valueOf(),o.valueOf()))return!1;break;case\"Error\":return s.name===o.name&&s.message===o.message;case\"RegExp\":if(s.source!==o.source||s.global!==o.global||s.ignoreCase!==o.ignoreCase||s.multiline!==o.multiline||s.sticky!==o.sticky||s.unicode!==o.unicode)return!1}for(var _=i.length-1;_>=0;){if(i[_]===s)return a[_]===o;_-=1}switch(u){case\"Map\":return s.size===o.size&&_uniqContentEquals(s.entries(),o.entries(),i.concat([s]),a.concat([o]));case\"Set\":return s.size===o.size&&_uniqContentEquals(s.values(),o.values(),i.concat([s]),a.concat([o]));case\"Arguments\":case\"Array\":case\"Object\":case\"Boolean\":case\"Number\":case\"String\":case\"Date\":case\"Error\":case\"RegExp\":case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"ArrayBuffer\":break;default:return!1}var w=ea(s);if(w.length!==ea(o).length)return!1;var x=i.concat([s]),C=a.concat([o]);for(_=w.length-1;_>=0;){var j=w[_];if(!_has(j,o)||!_equals(o[j],s[j],x,C))return!1;_-=1}return!0}const na=_curry2((function equals(s,o){return _equals(s,o,[],[])}));function _includes(s,o){return function _indexOf(s,o,i){var a,u;if(\"function\"==typeof s.indexOf)switch(typeof o){case\"number\":if(0===o){for(a=1/o;i<s.length;){if(0===(u=s[i])&&1/u===a)return i;i+=1}return-1}if(o!=o){for(;i<s.length;){if(\"number\"==typeof(u=s[i])&&u!=u)return i;i+=1}return-1}return s.indexOf(o,i);case\"string\":case\"boolean\":case\"function\":case\"undefined\":return s.indexOf(o,i);case\"object\":if(null===o)return s.indexOf(o,i)}for(;i<s.length;){if(na(s[i],o))return i;i+=1}return-1}(o,s,0)>=0}function _map(s,o){for(var i=0,a=o.length,u=Array(a);i<a;)u[i]=s(o[i]),i+=1;return u}function _quote(s){return'\"'+s.replace(/\\\\/g,\"\\\\\\\\\").replace(/[\\b]/g,\"\\\\b\").replace(/\\f/g,\"\\\\f\").replace(/\\n/g,\"\\\\n\").replace(/\\r/g,\"\\\\r\").replace(/\\t/g,\"\\\\t\").replace(/\\v/g,\"\\\\v\").replace(/\\0/g,\"\\\\0\").replace(/\"/g,'\\\\\"')+'\"'}var ia=function pad(s){return(s<10?\"0\":\"\")+s};const aa=\"function\"==typeof Date.prototype.toISOString?function _toISOString(s){return s.toISOString()}:function _toISOString(s){return s.getUTCFullYear()+\"-\"+ia(s.getUTCMonth()+1)+\"-\"+ia(s.getUTCDate())+\"T\"+ia(s.getUTCHours())+\":\"+ia(s.getUTCMinutes())+\":\"+ia(s.getUTCSeconds())+\".\"+(s.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+\"Z\"};function _complement(s){return function(){return!s.apply(this,arguments)}}function _arrayReduce(s,o,i){for(var a=0,u=i.length;a<u;)o=s(o,i[a]),a+=1;return o}const ca=Array.isArray||function _isArray(s){return null!=s&&s.length>=0&&\"[object Array]\"===Object.prototype.toString.call(s)};function _dispatchable(s,o,i){return function(){if(0===arguments.length)return i();var a=arguments[arguments.length-1];if(!ca(a)){for(var u=0;u<s.length;){if(\"function\"==typeof a[s[u]])return a[s[u]].apply(a,Array.prototype.slice.call(arguments,0,-1));u+=1}if(function _isTransformer(s){return null!=s&&\"function\"==typeof s[\"@@transducer/step\"]}(a))return o.apply(null,Array.prototype.slice.call(arguments,0,-1))(a)}return i.apply(this,arguments)}}function _isObject(s){return\"[object Object]\"===Object.prototype.toString.call(s)}const _xfBase_init=function(){return this.xf[\"@@transducer/init\"]()},_xfBase_result=function(s){return this.xf[\"@@transducer/result\"](s)};var la=function(){function XFilter(s,o){this.xf=o,this.f=s}return XFilter.prototype[\"@@transducer/init\"]=_xfBase_init,XFilter.prototype[\"@@transducer/result\"]=_xfBase_result,XFilter.prototype[\"@@transducer/step\"]=function(s,o){return this.f(o)?this.xf[\"@@transducer/step\"](s,o):s},XFilter}();function _xfilter(s){return function(o){return new la(s,o)}}var ua=_curry2(_dispatchable([\"fantasy-land/filter\",\"filter\"],_xfilter,(function(s,o){return _isObject(o)?_arrayReduce((function(i,a){return s(o[a])&&(i[a]=o[a]),i}),{},ea(o)):function _filter(s,o){for(var i=0,a=o.length,u=[];i<a;)s(o[i])&&(u[u.length]=o[i]),i+=1;return u}(s,o)})));const da=ua;const ma=_curry2((function reject(s,o){return da(_complement(s),o)}));function _toString_toString(s,o){var i=function recur(i){var a=o.concat([s]);return _includes(i,a)?\"<Circular>\":_toString_toString(i,a)},mapPairs=function(s,o){return _map((function(o){return _quote(o)+\": \"+i(s[o])}),o.slice().sort())};switch(Object.prototype.toString.call(s)){case\"[object Arguments]\":return\"(function() { return arguments; }(\"+_map(i,s).join(\", \")+\"))\";case\"[object Array]\":return\"[\"+_map(i,s).concat(mapPairs(s,ma((function(s){return/^\\d+$/.test(s)}),ea(s)))).join(\", \")+\"]\";case\"[object Boolean]\":return\"object\"==typeof s?\"new Boolean(\"+i(s.valueOf())+\")\":s.toString();case\"[object Date]\":return\"new Date(\"+(isNaN(s.valueOf())?i(NaN):_quote(aa(s)))+\")\";case\"[object Map]\":return\"new Map(\"+i(Array.from(s))+\")\";case\"[object Null]\":return\"null\";case\"[object Number]\":return\"object\"==typeof s?\"new Number(\"+i(s.valueOf())+\")\":1/s==-1/0?\"-0\":s.toString(10);case\"[object Set]\":return\"new Set(\"+i(Array.from(s).sort())+\")\";case\"[object String]\":return\"object\"==typeof s?\"new String(\"+i(s.valueOf())+\")\":_quote(s);case\"[object Undefined]\":return\"undefined\";default:if(\"function\"==typeof s.toString){var a=s.toString();if(\"[object Object]\"!==a)return a}return\"{\"+mapPairs(s,ea(s)).join(\", \")+\"}\"}}const ga=_curry1((function toString(s){return _toString_toString(s,[])}));var ya=_curry2((function test(s,o){if(!function _isRegExp(s){return\"[object RegExp]\"===Object.prototype.toString.call(s)}(s))throw new TypeError(\"‘test’ requires a value of type RegExp as its first argument; received \"+ga(s));return _cloneRegExp(s).test(o)}));const va=ya;function _arity(s,o){switch(s){case 0:return function(){return o.apply(this,arguments)};case 1:return function(s){return o.apply(this,arguments)};case 2:return function(s,i){return o.apply(this,arguments)};case 3:return function(s,i,a){return o.apply(this,arguments)};case 4:return function(s,i,a,u){return o.apply(this,arguments)};case 5:return function(s,i,a,u,_){return o.apply(this,arguments)};case 6:return function(s,i,a,u,_,w){return o.apply(this,arguments)};case 7:return function(s,i,a,u,_,w,x){return o.apply(this,arguments)};case 8:return function(s,i,a,u,_,w,x,C){return o.apply(this,arguments)};case 9:return function(s,i,a,u,_,w,x,C,j){return o.apply(this,arguments)};case 10:return function(s,i,a,u,_,w,x,C,j,L){return o.apply(this,arguments)};default:throw new Error(\"First argument to _arity must be a non-negative integer no greater than ten\")}}function _pipe(s,o){return function(){return o.call(this,s.apply(this,arguments))}}const ba=_curry1((function isArrayLike(s){return!!ca(s)||!!s&&(\"object\"==typeof s&&(!_isString(s)&&(0===s.length||s.length>0&&(s.hasOwnProperty(0)&&s.hasOwnProperty(s.length-1)))))}));var _a=\"undefined\"!=typeof Symbol?Symbol.iterator:\"@@iterator\";function _createReduce(s,o,i){return function _reduce(a,u,_){if(ba(_))return s(a,u,_);if(null==_)return u;if(\"function\"==typeof _[\"fantasy-land/reduce\"])return o(a,u,_,\"fantasy-land/reduce\");if(null!=_[_a])return i(a,u,_[_a]());if(\"function\"==typeof _.next)return i(a,u,_);if(\"function\"==typeof _.reduce)return o(a,u,_,\"reduce\");throw new TypeError(\"reduce: list must be array or iterable\")}}function _xArrayReduce(s,o,i){for(var a=0,u=i.length;a<u;){if((o=s[\"@@transducer/step\"](o,i[a]))&&o[\"@@transducer/reduced\"]){o=o[\"@@transducer/value\"];break}a+=1}return s[\"@@transducer/result\"](o)}const Ea=_curry2((function bind(s,o){return _arity(s.length,(function(){return s.apply(o,arguments)}))}));function _xIterableReduce(s,o,i){for(var a=i.next();!a.done;){if((o=s[\"@@transducer/step\"](o,a.value))&&o[\"@@transducer/reduced\"]){o=o[\"@@transducer/value\"];break}a=i.next()}return s[\"@@transducer/result\"](o)}function _xMethodReduce(s,o,i,a){return s[\"@@transducer/result\"](i[a](Ea(s[\"@@transducer/step\"],s),o))}const wa=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce);var xa=function(){function XWrap(s){this.f=s}return XWrap.prototype[\"@@transducer/init\"]=function(){throw new Error(\"init not implemented on XWrap\")},XWrap.prototype[\"@@transducer/result\"]=function(s){return s},XWrap.prototype[\"@@transducer/step\"]=function(s,o){return this.f(s,o)},XWrap}();function _xwrap(s){return new xa(s)}var ka=_curry3((function(s,o,i){return wa(\"function\"==typeof s?_xwrap(s):s,o,i)}));const Ca=ka;function _checkForMethod(s,o){return function(){var i=arguments.length;if(0===i)return o();var a=arguments[i-1];return ca(a)||\"function\"!=typeof a[s]?o.apply(this,arguments):a[s].apply(a,Array.prototype.slice.call(arguments,0,i-1))}}var Aa=_curry3(_checkForMethod(\"slice\",(function slice(s,o,i){return Array.prototype.slice.call(i,s,o)})));const ja=Aa;const Ia=_curry1(_checkForMethod(\"tail\",ja(1,1/0)));function pipe(){if(0===arguments.length)throw new Error(\"pipe requires at least one argument\");return _arity(arguments[0].length,Ca(_pipe,arguments[0],Ia(arguments)))}const Na=_curry2((function defaultTo(s,o){return null==o||o!=o?s:o}));const Da=_curry2((function prop(s,o){if(null!=o)return Xo(s)?_nth(s,o):o[s]}));const La=_curry3((function propOr(s,o,i){return Na(s,Da(o,i))}));var Fa=_curry1((function(s){return _nth(-1,s)}));const Ba=Fa;function _curryN(s,o,i){return function(){for(var a=[],u=0,_=s,w=0,x=!1;w<o.length||u<arguments.length;){var C;w<o.length&&(!_isPlaceholder(o[w])||u>=arguments.length)?C=o[w]:(C=arguments[u],u+=1),a[w]=C,_isPlaceholder(C)?x=!0:_-=1,w+=1}return!x&&_<=0?i.apply(this,a):_arity(Math.max(0,_),_curryN(s,a,i))}}const $a=_curry2((function curryN(s,o){return 1===s?_curry1(o):_arity(s,_curryN(s,[],o))}));const za=_curry1((function curry(s){return $a(s.length,s)}));function _isFunction(s){var o=Object.prototype.toString.call(s);return\"[object Function]\"===o||\"[object AsyncFunction]\"===o||\"[object GeneratorFunction]\"===o||\"[object AsyncGeneratorFunction]\"===o}const Ja=_curry2((function invoker(s,o){return $a(s+1,(function(){var i=arguments[s];if(null!=i&&_isFunction(i[o]))return i[o].apply(i,Array.prototype.slice.call(arguments,0,s));throw new TypeError(ga(i)+' does not have a method named \"'+o+'\"')}))}));const Ha=Ja(1,\"split\");function dropLastWhile(s,o){for(var i=o.length-1;i>=0&&s(o[i]);)i-=1;return ja(0,i+1,o)}var Ga=function(){function XDropLastWhile(s,o){this.f=s,this.retained=[],this.xf=o}return XDropLastWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropLastWhile.prototype[\"@@transducer/result\"]=function(s){return this.retained=null,this.xf[\"@@transducer/result\"](s)},XDropLastWhile.prototype[\"@@transducer/step\"]=function(s,o){return this.f(o)?this.retain(s,o):this.flush(s,o)},XDropLastWhile.prototype.flush=function(s,o){return s=wa(this.xf,s,this.retained),this.retained=[],this.xf[\"@@transducer/step\"](s,o)},XDropLastWhile.prototype.retain=function(s,o){return this.retained.push(o),s},XDropLastWhile}();function _xdropLastWhile(s){return function(o){return new Ga(s,o)}}const ec=_curry2(_dispatchable([],_xdropLastWhile,dropLastWhile));const rc=Ja(1,\"join\");const sc=_curry1((function flip(s){return $a(s.length,(function(o,i){var a=Array.prototype.slice.call(arguments,0);return a[0]=i,a[1]=o,s.apply(this,a)}))}))(_curry2(_includes));const oc=za((function(s,o){return pipe(Ha(\"\"),ec(sc(s)),rc(\"\"))(o)}));function _iterableReduce(s,o,i){for(var a=i.next();!a.done;)o=s(o,a.value),a=i.next();return o}function _methodReduce(s,o,i,a){return i[a](s,o)}const ic=_createReduce(_arrayReduce,_methodReduce,_iterableReduce);var ac=function(){function XMap(s,o){this.xf=o,this.f=s}return XMap.prototype[\"@@transducer/init\"]=_xfBase_init,XMap.prototype[\"@@transducer/result\"]=_xfBase_result,XMap.prototype[\"@@transducer/step\"]=function(s,o){return this.xf[\"@@transducer/step\"](s,this.f(o))},XMap}();const cc=_curry2(_dispatchable([\"fantasy-land/map\",\"map\"],(function _xmap(s){return function(o){return new ac(s,o)}}),(function map(s,o){switch(Object.prototype.toString.call(o)){case\"[object Function]\":return $a(o.length,(function(){return s.call(this,o.apply(this,arguments))}));case\"[object Object]\":return _arrayReduce((function(i,a){return i[a]=s(o[a]),i}),{},ea(o));default:return _map(s,o)}})));const lc=_curry2((function ap(s,o){return\"function\"==typeof o[\"fantasy-land/ap\"]?o[\"fantasy-land/ap\"](s):\"function\"==typeof s.ap?s.ap(o):\"function\"==typeof s?function(i){return s(i)(o(i))}:ic((function(s,i){return function _concat(s,o){var i;o=o||[];var a=(s=s||[]).length,u=o.length,_=[];for(i=0;i<a;)_[_.length]=s[i],i+=1;for(i=0;i<u;)_[_.length]=o[i],i+=1;return _}(s,cc(i,o))}),[],s)}));const pc=_curry2((function liftN(s,o){var i=$a(s,o);return $a(s,(function(){return _arrayReduce(lc,cc(i,arguments[0]),Array.prototype.slice.call(arguments,1))}))}));const hc=_curry1((function lift(s){return pc(s.length,s)}));const dc=hc(_curry1((function not(s){return!s})));const fc=_curry1((function always(s){return function(){return s}}));const gc=fc(void 0);const bc=na(gc());const _c=dc(bc);const Ec=_curry2((function max(s,o){if(s===o)return o;function safeMax(s,o){if(s>o!=o>s)return o>s?o:s}var i=safeMax(s,o);if(void 0!==i)return i;var a=safeMax(typeof s,typeof o);if(void 0!==a)return a===typeof s?s:o;var u=ga(s),_=safeMax(u,ga(o));return void 0!==_&&_===u?s:o}));var kc=_curry2((function pluck(s,o){return cc(Da(s),o)}));const Oc=kc;const jc=_curry1((function anyPass(s){return $a(Ca(Ec,0,Oc(\"length\",s)),(function(){for(var o=0,i=s.length;o<i;){if(s[o].apply(this,arguments))return!0;o+=1}return!1}))}));var identical=function(s,o){switch(arguments.length){case 0:return identical;case 1:return function unaryIdentical(o){return 0===arguments.length?unaryIdentical:Zo(s,o)};default:return Zo(s,o)}};const Pc=identical;const Ic=$a(1,pipe(ra,Pc(\"GeneratorFunction\")));const Nc=$a(1,pipe(ra,Pc(\"AsyncFunction\")));const Mc=jc([pipe(ra,Pc(\"Function\")),Ic,Nc]);var Rc=_curry3((function replace(s,o,i){return i.replace(s,o)}));const Lc=Rc;const Fc=$a(1,pipe(ra,Pc(\"RegExp\")));const qc=_curry3((function when(s,o,i){return s(i)?o(i):i}));const Jc=$a(1,pipe(ra,Pc(\"String\")));const Hc=qc(Jc,Lc(/[.*+?^${}()|[\\]\\\\-]/g,\"\\\\$&\"));var Kc=function checkValue(s,o){if(\"string\"!=typeof s&&!(s instanceof String))throw TypeError(\"`\".concat(o,\"` must be a string\"))};const Gc=function replaceAll(s,o,i){!function checkArguments(s,o,i){if(null==i||null==s||null==o)throw TypeError(\"Input values must not be `null` or `undefined`\")}(s,o,i),Kc(i,\"str\"),Kc(o,\"replaceValue\"),function checkSearchValue(s){if(!(\"string\"==typeof s||s instanceof String||s instanceof RegExp))throw TypeError(\"`searchValue` must be a string or an regexp\")}(s);var a=new RegExp(Fc(s)?s:Hc(s),\"g\");return Lc(a,o,i)};var Qc=$a(3,Gc),tl=Ja(2,\"replaceAll\");const sl=Mc(String.prototype.replaceAll)?tl:Qc,isWindows=()=>Qo(va(/^win/),[\"platform\"],Yo),getProtocol=s=>{try{const o=new URL(s);return oc(\":\",o.protocol)}catch{return}},ul=(pipe(getProtocol,_c),s=>{if(Yo.browser)return!1;const o=getProtocol(s);return bc(o)||\"file\"===o||/^[a-zA-Z]$/.test(o)}),isHttpUrl=s=>{const o=getProtocol(s);return\"http\"===o||\"https\"===o},toFileSystemPath=(s,o)=>{const i=[/%23/g,\"#\",/%24/g,\"$\",/%26/g,\"&\",/%2C/g,\",\",/%40/g,\"@\"],a=La(!1,\"keepFileProtocol\",o),u=La(isWindows,\"isWindows\",o);let _=decodeURI(s);for(let s=0;s<i.length;s+=2)_=_.replace(i[s],i[s+1]);let w=\"file://\"===_.substring(0,7).toLowerCase();return w&&(_=\"/\"===_[7]?_.substring(8):_.substring(7),u()&&\"/\"===_[1]&&(_=`${_[0]}:${_.substring(1)}`),a?_=`file:///${_}`:(w=!1,_=u()?_:`/${_}`)),u()&&!w&&(_=sl(\"/\",\"\\\\\",_),\":\\\\\"===_.substring(1,3)&&(_=_[0].toUpperCase()+_.substring(1))),_},getHash=s=>{const o=s.indexOf(\"#\");return-1!==o?s.substring(o):\"#\"},stripHash=s=>{const o=s.indexOf(\"#\");let i=s;return o>=0&&(i=s.substring(0,o)),i},url_cwd=()=>{if(Yo.browser)return stripHash(globalThis.location.href);const s=Yo.cwd(),o=Ba(s);return[\"/\",\"\\\\\"].includes(o)?s:s+(isWindows()?\"\\\\\":\"/\")},resolve=(s,o)=>{const i=new URL(o,new URL(s,\"resolve://\"));if(\"resolve:\"===i.protocol){const{pathname:s,search:o,hash:a}=i;return s+o+a}return i.toString()},sanitize=s=>{if(ul(s))return(s=>{const o=[/\\?/g,\"%3F\",/#/g,\"%23\"];let i=s;isWindows()&&(i=i.replace(/\\\\/g,\"/\")),i=encodeURI(i);for(let s=0;s<o.length;s+=2)i=i.replace(o[s],o[s+1]);return i})(toFileSystemPath(s));try{return new URL(s).toString()}catch{return encodeURI(decodeURI(s)).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\")}},unsanitize=s=>ul(s)?toFileSystemPath(s):decodeURI(s),{fetch:yl,Response:vl,Headers:_l,Request:Sl,FormData:El,File:wl,Blob:xl}=globalThis;function _array_like_to_array(s,o){(null==o||o>s.length)&&(o=s.length);for(var i=0,a=new Array(o);i<o;i++)a[i]=s[i];return a}function legacy_defineProperties(s,o){for(var i=0;i<o.length;i++){var a=o[i];a.enumerable=a.enumerable||!1,a.configurable=!0,\"value\"in a&&(a.writable=!0),Object.defineProperty(s,a.key,a)}}function _instanceof(s,o){return null!=o&&\"undefined\"!=typeof Symbol&&o[Symbol.hasInstance]?!!o[Symbol.hasInstance](s):s instanceof o}function _sliced_to_array(s,o){return function _array_with_holes(s){if(Array.isArray(s))return s}(s)||function _iterable_to_array_limit(s,o){var i=null==s?null:\"undefined\"!=typeof Symbol&&s[Symbol.iterator]||s[\"@@iterator\"];if(null!=i){var a,u,_=[],w=!0,x=!1;try{for(i=i.call(s);!(w=(a=i.next()).done)&&(_.push(a.value),!o||_.length!==o);w=!0);}catch(s){x=!0,u=s}finally{try{w||null==i.return||i.return()}finally{if(x)throw u}}return _}}(s,o)||function _unsupported_iterable_to_array(s,o){if(!s)return;if(\"string\"==typeof s)return _array_like_to_array(s,o);var i=Object.prototype.toString.call(s).slice(8,-1);\"Object\"===i&&s.constructor&&(i=s.constructor.name);if(\"Map\"===i||\"Set\"===i)return Array.from(i);if(\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return _array_like_to_array(s,o)}(s,o)||function _non_iterable_rest(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function _type_of(s){return s&&\"undefined\"!=typeof Symbol&&s.constructor===Symbol?\"symbol\":typeof s}void 0===globalThis.fetch&&(globalThis.fetch=yl),void 0===globalThis.Headers&&(globalThis.Headers=_l),void 0===globalThis.Request&&(globalThis.Request=Sl),void 0===globalThis.Response&&(globalThis.Response=vl),void 0===globalThis.FormData&&(globalThis.FormData=El),void 0===globalThis.File&&(globalThis.File=wl),void 0===globalThis.Blob&&(globalThis.Blob=xl);var __typeError=function(s){throw TypeError(s)},__accessCheck=function(s,o,i){return o.has(s)||__typeError(\"Cannot \"+i)},__privateGet=function(s,o,i){return __accessCheck(s,o,\"read from private field\"),i?i.call(s):o.get(s)},__privateAdd=function(s,o,i){return o.has(s)?__typeError(\"Cannot add the same private member more than once\"):_instanceof(o,WeakSet)?o.add(s):o.set(s,i)},__privateSet=function(s,o,i,a){return __accessCheck(s,o,\"write to private field\"),a?a.call(s,i):o.set(s,i),i},to_string=function(s){return Object.prototype.toString.call(s)},is_typed_array=function(s){return ArrayBuffer.isView(s)&&!_instanceof(s,DataView)},kl=Array.isArray,Ol=Object.getOwnPropertyDescriptor,Cl=Object.prototype.propertyIsEnumerable,Al=Object.getOwnPropertySymbols,Pl=Object.prototype.hasOwnProperty;function own_enumerable_keys(s){for(var o=Object.keys(s),i=Al(s),a=0;a<i.length;a++)Cl.call(s,i[a])&&o.push(i[a]);return o}function is_writable(s,o){var i;return!(null===(i=Ol(s,o))||void 0===i?void 0:i.writable)}function legacy_copy(s,o){if(\"object\"===(void 0===s?\"undefined\":_type_of(s))&&null!==s){var i;if(kl(s))i=[];else if(\"[object Date]\"===to_string(s))i=new Date(s.getTime?s.getTime():s);else if(function(s){return\"[object RegExp]\"===to_string(s)}(s))i=new RegExp(s);else if(function(s){return\"[object Error]\"===to_string(s)}(s))i={message:s.message};else if(function(s){return\"[object Boolean]\"===to_string(s)}(s)||function(s){return\"[object Number]\"===to_string(s)}(s)||function(s){return\"[object String]\"===to_string(s)}(s))i=Object(s);else{if(is_typed_array(s))return s.slice();i=Object.create(Object.getPrototypeOf(s))}var a=o.includeSymbols?own_enumerable_keys:Object.keys,u=!0,_=!1,w=void 0;try{for(var x,C=a(s)[Symbol.iterator]();!(u=(x=C.next()).done);u=!0){var j=x.value;i[j]=s[j]}}catch(s){_=!0,w=s}finally{try{u||null==C.return||C.return()}finally{if(_)throw w}}return i}return s}var Il,Tl,Nl={includeSymbols:!1,immutable:!1};function walk(s,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nl,a=[],u=[],_=!0,w=i.includeSymbols?own_enumerable_keys:Object.keys,x=!!i.immutable;return function walker(s){var C=x?legacy_copy(s,i):s,j={},L=!0,B={node:C,node_:s,path:[].concat(a),parent:u[u.length-1],parents:u,key:a[a.length-1],isRoot:0===a.length,level:a.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function update(s){var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];B.isRoot||(B.parent.node[B.key]=s),B.node=s,o&&(L=!1)},delete:function _delete(s){delete B.parent.node[B.key],s&&(L=!1)},remove:function remove(s){kl(B.parent.node)?B.parent.node.splice(B.key,1):delete B.parent.node[B.key],s&&(L=!1)},keys:null,before:function before(s){j.before=s},after:function after(s){j.after=s},pre:function pre(s){j.pre=s},post:function post(s){j.post=s},stop:function stop(){_=!1},block:function block(){L=!1}};if(!_)return B;function update_state(){if(\"object\"===_type_of(B.node)&&null!==B.node){B.keys&&B.node_===B.node||(B.keys=w(B.node)),B.isLeaf=0===B.keys.length;for(var o=0;o<u.length;o++)if(u[o].node_===s){B.circular=u[o];break}}else B.isLeaf=!0,B.keys=null;B.notLeaf=!B.isLeaf,B.notRoot=!B.isRoot}update_state();var $=o.call(B,B.node);if(void 0!==$&&B.update&&B.update($),j.before&&j.before.call(B,B.node),!L)return B;if(\"object\"===_type_of(B.node)&&null!==B.node&&!B.circular){var V;u.push(B),update_state();var U=!0,z=!1,Y=void 0;try{for(var Z,ee=Object.entries(null!==(V=B.keys)&&void 0!==V?V:[])[Symbol.iterator]();!(U=(Z=ee.next()).done);U=!0){var ie,ae=_sliced_to_array(Z.value,2),ce=ae[0],le=ae[1];a.push(le),j.pre&&j.pre.call(B,B.node[le],le);var pe=walker(B.node[le]);x&&Pl.call(B.node,le)&&!is_writable(B.node,le)&&(B.node[le]=pe.node),pe.isLast=!!(null===(ie=B.keys)||void 0===ie?void 0:ie.length)&&+ce==B.keys.length-1,pe.isFirst=0==+ce,j.post&&j.post.call(B,pe),a.pop()}}catch(s){z=!0,Y=s}finally{try{U||null==ee.return||ee.return()}finally{if(z)throw Y}}u.pop()}return j.after&&j.after.call(B,B.node),B}(s).node}var Ml=function(){function Traverse(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nl;!function _class_call_check(s,o){if(!(s instanceof o))throw new TypeError(\"Cannot call a class as a function\")}(this,Traverse),__privateAdd(this,Il),__privateAdd(this,Tl),__privateSet(this,Il,s),__privateSet(this,Tl,o)}return function _create_class(s,o,i){return o&&legacy_defineProperties(s.prototype,o),i&&legacy_defineProperties(s,i),s}(Traverse,[{key:\"get\",value:function get(s){for(var o=__privateGet(this,Il),i=0;o&&i<s.length;i++){var a=s[i];if(!Pl.call(o,a)||!__privateGet(this,Tl).includeSymbols&&\"symbol\"===(void 0===a?\"undefined\":_type_of(a)))return;o=o[a]}return o}},{key:\"has\",value:function has(s){for(var o=__privateGet(this,Il),i=0;o&&i<s.length;i++){var a=s[i];if(!Pl.call(o,a)||!__privateGet(this,Tl).includeSymbols&&\"symbol\"===(void 0===a?\"undefined\":_type_of(a)))return!1;o=o[a]}return!0}},{key:\"set\",value:function set(s,o){var i=__privateGet(this,Il),a=0;for(a=0;a<s.length-1;a++){var u=s[a];Pl.call(i,u)||(i[u]={}),i=i[u]}return i[s[a]]=o,o}},{key:\"map\",value:function map(s){return walk(__privateGet(this,Il),s,{immutable:!0,includeSymbols:!!__privateGet(this,Tl).includeSymbols})}},{key:\"forEach\",value:function forEach(s){return __privateSet(this,Il,walk(__privateGet(this,Il),s,__privateGet(this,Tl))),__privateGet(this,Il)}},{key:\"reduce\",value:function reduce(s,o){var i=1===arguments.length,a=i?__privateGet(this,Il):o;return this.forEach((function(o){this.isRoot&&i||(a=s.call(this,a,o))})),a}},{key:\"paths\",value:function paths(){var s=[];return this.forEach((function(){s.push(this.path)})),s}},{key:\"nodes\",value:function nodes(){var s=[];return this.forEach((function(){s.push(this.node)})),s}},{key:\"clone\",value:function clone(){var s=[],o=[],i=__privateGet(this,Tl);return is_typed_array(__privateGet(this,Il))?__privateGet(this,Il).slice():function clone(a){for(var u=0;u<s.length;u++)if(s[u]===a)return o[u];if(\"object\"===(void 0===a?\"undefined\":_type_of(a))&&null!==a){var _=legacy_copy(a,i);s.push(a),o.push(_);var w=i.includeSymbols?own_enumerable_keys:Object.keys,x=!0,C=!1,j=void 0;try{for(var L,B=w(a)[Symbol.iterator]();!(x=(L=B.next()).done);x=!0){var $=L.value;_[$]=clone(a[$])}}catch(s){C=!0,j=s}finally{try{x||null==B.return||B.return()}finally{if(C)throw j}}return s.pop(),o.pop(),_}return a}(__privateGet(this,Il))}}]),Traverse}();Il=new WeakMap,Tl=new WeakMap;var traverse=function(s,o){return new Ml(s,o)};traverse.get=function(s,o,i){return new Ml(s,i).get(o)},traverse.set=function(s,o,i,a){return new Ml(s,a).set(o,i)},traverse.has=function(s,o,i){return new Ml(s,i).has(o)},traverse.map=function(s,o,i){return new Ml(s,i).map(o)},traverse.forEach=function(s,o,i){return new Ml(s,i).forEach(o)},traverse.reduce=function(s,o,i,a){return new Ml(s,a).reduce(o,i)},traverse.paths=function(s,o){return new Ml(s,o).paths()},traverse.nodes=function(s,o){return new Ml(s,o).nodes()},traverse.clone=function(s,o){return new Ml(s,o).clone()};var Rl=traverse;const Dl=\"application/json, application/yaml\",Ll=\"https://swagger.io\",Fl=Object.freeze({url:\"/\"}),Bl=3e3,$l=[\"properties\"],Vl=[\"properties\"],Ul=[\"definitions\",\"parameters\",\"responses\",\"securityDefinitions\",\"components/schemas\",\"components/responses\",\"components/parameters\",\"components/securitySchemes\"],zl=[\"schema/example\",\"items/example\"];function isFreelyNamed(s){const o=s[s.length-1],i=s[s.length-2],a=s.join(\"/\");return $l.indexOf(o)>-1&&-1===Vl.indexOf(i)||Ul.indexOf(a)>-1||zl.some((s=>a.indexOf(s)>-1))}function absolutifyPointer(s,o){const[i,a]=s.split(\"#\"),u=null!=o?o:\"\",_=null!=i?i:\"\";let w;if(isHttpUrl(u))w=resolve(u,_);else{const s=resolve(Ll,u),o=resolve(s,_).replace(Ll,\"\");w=_.startsWith(\"/\")?o:o.substring(1)}return a?`${w}#${a}`:w}const Wl=/^([a-z]+:\\/\\/|\\/\\/)/i;class JSONRefError extends Go{}const Jl={},Hl=new WeakMap,Kl=[s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"examples\"===s[5],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"responses\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"requestBody\"===s[3]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"example\"===s[4],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"example\"===s[5],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"examples\"===s[4]&&\"value\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"examples\"===s[5]&&\"value\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"example\"===s[6],s=>\"paths\"===s[0]&&\"parameters\"===s[2]&&\"content\"===s[4]&&\"examples\"===s[6]&&\"value\"===s[8],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[4]&&\"example\"===s[7],s=>\"paths\"===s[0]&&\"parameters\"===s[3]&&\"content\"===s[5]&&\"examples\"===s[7]&&\"value\"===s[9]],Gl={key:\"$ref\",plugin:(s,o,i,a)=>{const u=a.getInstance(),_=i.slice(0,-1);if(isFreelyNamed(_)||(s=>Kl.some((o=>o(s))))(_))return;const{baseDoc:w}=a.getContext(i);if(\"string\"!=typeof s)return new JSONRefError(\"$ref: must be a string (JSON-Ref)\",{$ref:s,baseDoc:w,fullPath:i});const x=refs_split(s),C=x[0],j=x[1]||\"\";let L,B,$;try{L=w||C?absoluteify(C,w):null}catch(o){return wrapError(o,{pointer:j,$ref:s,basePath:L,fullPath:i})}if(function pointerAlreadyInPath(s,o,i,a){let u=Hl.get(a);u||(u={},Hl.set(a,u));const _=function arrayToJsonPointer(s){if(0===s.length)return\"\";return`/${s.map(escapeJsonPointerToken).join(\"/\")}`}(i),w=`${o||\"<specmap-base>\"}#${s}`,x=_.replace(/allOf\\/\\d+\\/?/g,\"\"),C=a.contextTree.get([]).baseDoc;if(o===C&&pointerIsAParent(x,s))return!0;let j=\"\";const L=i.some((s=>(j=`${j}/${escapeJsonPointerToken(s)}`,u[j]&&u[j].some((s=>pointerIsAParent(s,w)||pointerIsAParent(w,s))))));if(L)return!0;return void(u[x]=(u[x]||[]).concat(w))}(j,L,_,a)&&!u.useCircularStructures){const o=absolutifyPointer(s,L);return s===o?null:Wo.replace(i,o)}if(null==L?($=jsonPointerToArray(j),B=a.get($),void 0===B&&(B=new JSONRefError(`Could not resolve reference: ${s}`,{pointer:j,$ref:s,baseDoc:w,fullPath:i}))):(B=extractFromDoc(L,j),B=null!=B.__value?B.__value:B.catch((o=>{throw wrapError(o,{pointer:j,$ref:s,baseDoc:w,fullPath:i})}))),B instanceof Error)return[Wo.remove(i),B];const V=absolutifyPointer(s,L),U=Wo.replace(_,B,{$$ref:V});if(L&&L!==w)return[U,Wo.context(_,{baseDoc:L})];try{if(!function patchValueAlreadyInPath(s,o){const i=[s];return o.path.reduce(((s,o)=>(i.push(s[o]),s[o])),s),pointToAncestor(o.value);function pointToAncestor(s){return Wo.isObject(s)&&(i.indexOf(s)>=0||Object.keys(s).some((o=>pointToAncestor(s[o]))))}}(a.state,U)||u.useCircularStructures)return U}catch(s){return null}}},Yl=Object.assign(Gl,{docCache:Jl,absoluteify,clearCache:function clearCache(s){void 0!==s?delete Jl[s]:Object.keys(Jl).forEach((s=>{delete Jl[s]}))},JSONRefError,wrapError,getDoc,split:refs_split,extractFromDoc,fetchJSON:function fetchJSON(s){return fetch(s,{headers:{Accept:Dl},loadSpec:!0}).then((s=>s.text())).then((s=>fn.load(s)))},extract,jsonPointerToArray,unescapeJsonPointerToken}),Xl=Yl;function absoluteify(s,o){if(!Wl.test(s)){if(!o)throw new JSONRefError(`Tried to resolve a relative URL, without having a basePath. path: '${s}' basePath: '${o}'`);return resolve(o,s)}return s}function wrapError(s,o){let i;return i=s&&s.response&&s.response.body?`${s.response.body.code} ${s.response.body.message}`:s.message,new JSONRefError(`Could not resolve reference: ${i}`,{...o,cause:s})}function refs_split(s){return(s+\"\").split(\"#\")}function extractFromDoc(s,o){const i=Jl[s];if(i&&!Wo.isPromise(i))try{const s=extract(o,i);return Object.assign(Promise.resolve(s),{__value:s})}catch(s){return Promise.reject(s)}return getDoc(s).then((s=>extract(o,s)))}function getDoc(s){const o=Jl[s];return o?Wo.isPromise(o)?o:Promise.resolve(o):(Jl[s]=Yl.fetchJSON(s).then((o=>(Jl[s]=o,o))),Jl[s])}function extract(s,o){const i=jsonPointerToArray(s);if(i.length<1)return o;const a=Wo.getIn(o,i);if(void 0===a)throw new JSONRefError(`Could not resolve pointer: ${s} does not exist in document`,{pointer:s});return a}function jsonPointerToArray(s){if(\"string\"!=typeof s)throw new TypeError(\"Expected a string, got a \"+typeof s);return\"/\"===s[0]&&(s=s.substr(1)),\"\"===s?[]:s.split(\"/\").map(unescapeJsonPointerToken)}function unescapeJsonPointerToken(s){if(\"string\"!=typeof s)return s;return new URLSearchParams(`=${s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")}`).get(\"\")}function escapeJsonPointerToken(s){return new URLSearchParams([[\"\",s.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")]]).toString().slice(1)}const pointerBoundaryChar=s=>!s||\"/\"===s||\"#\"===s;function pointerIsAParent(s,o){if(pointerBoundaryChar(o))return!0;const i=s.charAt(o.length),a=o.slice(-1);return 0===s.indexOf(o)&&(!i||\"/\"===i||\"#\"===i)&&\"#\"!==a}const Ql={key:\"allOf\",plugin:(s,o,i,a,u)=>{if(u.meta&&u.meta.$$ref)return;const _=i.slice(0,-1);if(isFreelyNamed(_))return;if(!Array.isArray(s)){const s=new TypeError(\"allOf must be an array\");return s.fullPath=i,s}let w=!1,x=u.value;if(_.forEach((s=>{x&&(x=x[s])})),x={...x},0===Object.keys(x).length)return;delete x.allOf;const C=[];return C.push(a.replace(_,{})),s.forEach(((s,o)=>{if(!a.isObject(s)){if(w)return null;w=!0;const s=new TypeError(\"Elements in allOf must be objects\");return s.fullPath=i,C.push(s)}C.push(a.mergeDeep(_,s));const u=function generateAbsoluteRefPatches(s,o,{specmap:i,getBaseUrlForNodePath:a=s=>i.getContext([...o,...s]).baseDoc,targetKeys:u=[\"$ref\",\"$$ref\"]}={}){const _=[];return Rl(s).forEach((function callback(){if(u.includes(this.key)&&\"string\"==typeof this.node){const s=this.path,u=o.concat(this.path),w=absolutifyPointer(this.node,a(s));_.push(i.replace(u,w))}})),_}(s,i.slice(0,-1),{getBaseUrlForNodePath:s=>a.getContext([...i,o,...s]).baseDoc,specmap:a});C.push(...u)})),x.example&&C.push(a.remove([].concat(_,\"example\"))),C.push(a.mergeDeep(_,x)),x.$$ref||C.push(a.remove([].concat(_,\"$$ref\"))),C}},Zl={key:\"parameters\",plugin:(s,o,i,a)=>{if(Array.isArray(s)&&s.length){const o=Object.assign([],s),u=i.slice(0,-1),_={...Wo.getIn(a.spec,u)};for(let u=0;u<s.length;u+=1){const w=s[u];try{o[u].default=a.parameterMacro(_,w)}catch(s){const o=new Error(s);return o.fullPath=i,o}}return Wo.replace(i,o)}return Wo.replace(i,s)}},eu={key:\"properties\",plugin:(s,o,i,a)=>{const u={...s};for(const o in s)try{u[o].default=a.modelPropertyMacro(u[o])}catch(s){const o=new Error(s);return o.fullPath=i,o}return Wo.replace(i,u)}};class ContextTree{constructor(s){this.root=context_tree_createNode(s||{})}set(s,o){const i=this.getParent(s,!0);if(!i)return void context_tree_updateNode(this.root,o,null);const a=s[s.length-1],{children:u}=i;u[a]?context_tree_updateNode(u[a],o,i):u[a]=context_tree_createNode(o,i)}get(s){if((s=s||[]).length<1)return this.root.value;let o,i,a=this.root;for(let u=0;u<s.length&&(i=s[u],o=a.children,o[i]);u+=1)a=o[i];return a&&a.protoValue}getParent(s,o){return!s||s.length<1?null:s.length<2?this.root:s.slice(0,-1).reduce(((s,i)=>{if(!s)return s;const{children:a}=s;return!a[i]&&o&&(a[i]=context_tree_createNode(null,s)),a[i]}),this.root)}}function context_tree_createNode(s,o){return context_tree_updateNode({children:{}},s,o)}function context_tree_updateNode(s,o,i){return s.value=o||{},s.protoValue=i?{...i.protoValue,...s.value}:s.value,Object.keys(s.children).forEach((o=>{const i=s.children[o];s.children[o]=context_tree_updateNode(i,i.value,s)})),s}const specmap_noop=()=>{};class SpecMap{static getPluginName(s){return s.pluginName}static getPatchesOfType(s,o){return s.filter(o)}constructor(s){Object.assign(this,{spec:\"\",debugLevel:\"info\",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ContextTree,showDebug:!1,allPatches:[],pluginProp:\"specMap\",libMethods:Object.assign(Object.create(this),Wo,{getInstance:()=>this}),allowMetaPatches:!1},s),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(Wo.isFunction),this.patches.push(Wo.add([],this.spec)),this.patches.push(Wo.context([],this.context)),this.updatePatches(this.patches)}debug(s,...o){this.debugLevel===s&&console.log(...o)}verbose(s,...o){\"verbose\"===this.debugLevel&&console.log(`[${s}]   `,...o)}wrapPlugin(s,o){const{pathDiscriminator:i}=this;let a,u=null;return s[this.pluginProp]?(u=s,a=s[this.pluginProp]):Wo.isFunction(s)?a=s:Wo.isObject(s)&&(a=function createKeyBasedPlugin(s){const isSubPath=(s,o)=>!Array.isArray(s)||s.every(((s,i)=>s===o[i]));return function*generator(o,a){const u={};for(const[s,i]of o.filter(Wo.isAdditiveMutation).entries()){if(!(s<Bl))return;yield*traverse(i.value,i.path,i)}function*traverse(o,_,w){if(Wo.isObject(o)){const x=_.length-1,C=_[x],j=_.indexOf(\"properties\"),L=\"properties\"===C&&x===j,B=a.allowMetaPatches&&u[o.$$ref];for(const x of Object.keys(o)){const C=o[x],j=_.concat(x),$=Wo.isObject(C),V=o.$$ref;if(B||$&&(a.allowMetaPatches&&V&&isSubPath(i,j)&&(u[V]=!0),yield*traverse(C,j,w)),!L&&x===s.key){const o=isSubPath(i,_);i&&!o||(yield s.plugin(C,x,j,a,w))}}}else s.key===_[_.length-1]&&(yield s.plugin(o,s.key,_,a))}}}(s)),Object.assign(a.bind(u),{pluginName:s.name||o,isGenerator:Wo.isGenerator(a)})}nextPlugin(){return this.wrappedPlugins.find((s=>this.getMutationsForPlugin(s).length>0))}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map((s=>s.value)))}getPluginHistory(s){const o=this.constructor.getPluginName(s);return this.pluginHistory[o]||[]}getPluginRunCount(s){return this.getPluginHistory(s).length}getPluginHistoryTip(s){const o=this.getPluginHistory(s);return o&&o[o.length-1]||{}}getPluginMutationIndex(s){const o=this.getPluginHistoryTip(s).mutationIndex;return\"number\"!=typeof o?-1:o}updatePluginHistory(s,o){const i=this.constructor.getPluginName(s);this.pluginHistory[i]=this.pluginHistory[i]||[],this.pluginHistory[i].push(o)}updatePatches(s){Wo.normalizeArray(s).forEach((s=>{if(s instanceof Error)this.errors.push(s);else try{if(!Wo.isObject(s))return void this.debug(\"updatePatches\",\"Got a non-object patch\",s);if(this.showDebug&&this.allPatches.push(s),Wo.isPromise(s.value))return this.promisedPatches.push(s),void this.promisedPatchThen(s);if(Wo.isContextPatch(s))return void this.setContext(s.path,s.value);Wo.isMutation(s)&&this.updateMutations(s)}catch(s){console.error(s),this.errors.push(s)}}))}updateMutations(s){\"object\"==typeof s.value&&!Array.isArray(s.value)&&this.allowMetaPatches&&(s.value={...s.value});const o=Wo.applyPatch(this.state,s,{allowMetaPatches:this.allowMetaPatches});o&&(this.mutations.push(s),this.state=o)}removePromisedPatch(s){const o=this.promisedPatches.indexOf(s);o<0?this.debug(\"Tried to remove a promisedPatch that isn't there!\"):this.promisedPatches.splice(o,1)}promisedPatchThen(s){return s.value=s.value.then((o=>{const i={...s,value:o};this.removePromisedPatch(s),this.updatePatches(i)})).catch((o=>{this.removePromisedPatch(s),this.updatePatches(o)})),s.value}getMutations(s,o){return s=s||0,\"number\"!=typeof o&&(o=this.mutations.length),this.mutations.slice(s,o)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(s){const o=this.getPluginMutationIndex(s);return this.getMutations(o+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(s){return Wo.getIn(this.state,s)}_getContext(s){return this.contextTree.get(s)}setContext(s,o){return this.contextTree.set(s,o)}_hasRun(s){return this.getPluginRunCount(this.getCurrentPlugin())>(s||0)}dispatch(){const s=this,o=this.nextPlugin();if(!o){const s=this.nextPromisedPatch();if(s)return s.then((()=>this.dispatch())).catch((()=>this.dispatch()));const o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),Promise.resolve(o)}if(s.pluginCount=s.pluginCount||new WeakMap,s.pluginCount.set(o,(s.pluginCount.get(o)||0)+1),s.pluginCount[o]>100)return Promise.resolve({spec:s.state,errors:s.errors.concat(new Error(\"We've reached a hard limit of 100 plugin runs\"))});if(o!==this.currentPlugin&&this.promisedPatches.length){const s=this.promisedPatches.map((s=>s.value));return Promise.all(s.map((s=>s.then(specmap_noop,specmap_noop)))).then((()=>this.dispatch()))}return function executePlugin(){s.currentPlugin=o;const i=s.getCurrentMutations(),a=s.mutations.length-1;try{if(o.isGenerator)for(const a of o(i,s.getLib()))updatePatches(a);else{updatePatches(o(i,s.getLib()))}}catch(s){console.error(s),updatePatches([Object.assign(Object.create(s),{plugin:o})])}finally{s.updatePluginHistory(o,{mutationIndex:a})}return s.dispatch()}();function updatePatches(i){i&&(i=Wo.fullyNormalizeArray(i),s.updatePatches(i,o))}}}const tu={refs:Xl,allOf:Ql,parameters:Zl,properties:eu};function makeFetchJSON(s,o={}){const{requestInterceptor:i,responseInterceptor:a}=o,u=s.withCredentials?\"include\":\"same-origin\";return o=>s({url:o,loadSpec:!0,requestInterceptor:i,responseInterceptor:a,headers:{Accept:Dl},credentials:u}).then((s=>s.body))}function isFile(s,o){return o||\"undefined\"==typeof navigator||(o=navigator),o&&\"ReactNative\"===o.product?!(!s||\"object\"!=typeof s||\"string\"!=typeof s.uri):\"undefined\"!=typeof File&&s instanceof File||(\"undefined\"!=typeof Blob&&s instanceof Blob||(!!ArrayBuffer.isView(s)||null!==s&&\"object\"==typeof s&&\"function\"==typeof s.pipe))}function isArrayOfFile(s,o){return Array.isArray(s)&&s.some((s=>isFile(s,o)))}class FileWithData extends File{constructor(s,o=\"\",i={}){super([s],o,i),this.data=s}valueOf(){return this.data}toString(){return this.valueOf()}}const isRfc3986Reserved=s=>\":/?#[]@!$&'()*+,;=\".indexOf(s)>-1,isRfc3986Unreserved=s=>/^[a-z0-9\\-._~]+$/i.test(s);function encodeCharacters(s,o=\"reserved\"){return[...s].map((s=>{if(isRfc3986Unreserved(s))return s;if(isRfc3986Reserved(s)&&\"unsafe\"===o)return s;const i=new TextEncoder;return Array.from(i.encode(s)).map((s=>`0${s.toString(16).toUpperCase()}`.slice(-2))).map((s=>`%${s}`)).join(\"\")})).join(\"\")}function stylize(s){const{value:o}=s;return Array.isArray(o)?function encodeArray({key:s,value:o,style:i,explode:a,escape:u}){if(\"simple\"===i)return o.map((s=>valueEncoder(s,u))).join(\",\");if(\"label\"===i)return`.${o.map((s=>valueEncoder(s,u))).join(\".\")}`;if(\"matrix\"===i)return o.map((s=>valueEncoder(s,u))).reduce(((o,i)=>!o||a?`${o||\"\"};${s}=${i}`:`${o},${i}`),\"\");if(\"form\"===i){const i=a?`&${s}=`:\",\";return o.map((s=>valueEncoder(s,u))).join(i)}if(\"spaceDelimited\"===i){const i=a?`${s}=`:\"\";return o.map((s=>valueEncoder(s,u))).join(` ${i}`)}if(\"pipeDelimited\"===i){const i=a?`${s}=`:\"\";return o.map((s=>valueEncoder(s,u))).join(`|${i}`)}return}(s):\"object\"==typeof o?function encodeObject({key:s,value:o,style:i,explode:a,escape:u}){const _=Object.keys(o);if(\"simple\"===i)return _.reduce(((s,i)=>{const _=valueEncoder(o[i],u);return`${s?`${s},`:\"\"}${i}${a?\"=\":\",\"}${_}`}),\"\");if(\"label\"===i)return _.reduce(((s,i)=>{const _=valueEncoder(o[i],u);return`${s?`${s}.`:\".\"}${i}${a?\"=\":\".\"}${_}`}),\"\");if(\"matrix\"===i&&a)return _.reduce(((s,i)=>`${s?`${s};`:\";\"}${i}=${valueEncoder(o[i],u)}`),\"\");if(\"matrix\"===i)return _.reduce(((i,a)=>{const _=valueEncoder(o[a],u);return`${i?`${i},`:`;${s}=`}${a},${_}`}),\"\");if(\"form\"===i)return _.reduce(((s,i)=>{const _=valueEncoder(o[i],u);return`${s?`${s}${a?\"&\":\",\"}`:\"\"}${i}${a?\"=\":\",\"}${_}`}),\"\");return}(s):function encodePrimitive({key:s,value:o,style:i,escape:a}){if(\"simple\"===i)return valueEncoder(o,a);if(\"label\"===i)return`.${valueEncoder(o,a)}`;if(\"matrix\"===i)return`;${s}=${valueEncoder(o,a)}`;if(\"form\"===i)return valueEncoder(o,a);if(\"deepObject\"===i)return valueEncoder(o,a);return}(s)}function valueEncoder(s,o=!1){return Array.isArray(s)||null!==s&&\"object\"==typeof s?s=JSON.stringify(s):\"number\"!=typeof s&&\"boolean\"!=typeof s||(s=String(s)),o&&\"string\"==typeof s&&s.length>0?encodeCharacters(s,o):null!=s?s:\"\"}const ru={form:\",\",spaceDelimited:\"%20\",pipeDelimited:\"|\"},nu={csv:\",\",ssv:\"%20\",tsv:\"%09\",pipes:\"|\"};function formatKeyValue(s,o,i=!1){const{collectionFormat:a,allowEmptyValue:u,serializationOption:_,encoding:w}=o,x=\"object\"!=typeof o||Array.isArray(o)?o:o.value,C=i?s=>s.toString():s=>encodeURIComponent(s),j=C(s);if(void 0===x&&u)return[[j,\"\"]];if(isFile(x)||isArrayOfFile(x))return[[j,x]];if(_)return formatKeyValueBySerializationOption(s,x,i,_);if(w){if([typeof w.style,typeof w.explode,typeof w.allowReserved].some((s=>\"undefined\"!==s))){const{style:o,explode:a,allowReserved:u}=w;return formatKeyValueBySerializationOption(s,x,i,{style:o,explode:a,allowReserved:u})}if(\"string\"==typeof w.contentType){if(w.contentType.startsWith(\"application/json\")){const s=C(\"string\"==typeof x?x:JSON.stringify(x));return[[j,new FileWithData(s,\"blob\",{type:w.contentType})]]}const s=C(String(x));return[[j,new FileWithData(s,\"blob\",{type:w.contentType})]]}return\"object\"!=typeof x?[[j,C(x)]]:Array.isArray(x)&&x.every((s=>\"object\"!=typeof s))?[[j,x.map(C).join(\",\")]]:[[j,C(JSON.stringify(x))]]}return\"object\"!=typeof x?[[j,C(x)]]:Array.isArray(x)?\"multi\"===a?[[j,x.map(C)]]:[[j,x.map(C).join(nu[a||\"csv\"])]]:[[j,\"\"]]}function formatKeyValueBySerializationOption(s,o,i,a){const u=a.style||\"form\",_=void 0===a.explode?\"form\"===u:a.explode,w=!i&&(a&&a.allowReserved?\"unsafe\":\"reserved\"),encodeFn=s=>valueEncoder(s,w),x=i?s=>s:s=>encodeFn(s);return\"object\"!=typeof o?[[x(s),encodeFn(o)]]:Array.isArray(o)?_?[[x(s),o.map(encodeFn)]]:[[x(s),o.map(encodeFn).join(ru[u])]]:\"deepObject\"===u?Object.keys(o).map((i=>[x(`${s}[${i}]`),encodeFn(o[i])])):_?Object.keys(o).map((s=>[x(s),encodeFn(o[s])])):[[x(s),Object.keys(o).map((s=>[`${x(s)},${encodeFn(o[s])}`])).join(\",\")]]}function encodeFormOrQuery(s){return((s,{encode:o=!0}={})=>{const buildNestedParams=(s,o,i)=>(Array.isArray(i)?i.reduce(((i,a)=>buildNestedParams(s,o,a)),s):i instanceof Date?s.append(o,i.toISOString()):\"object\"==typeof i?Object.entries(i).reduce(((i,[a,u])=>buildNestedParams(s,`${o}[${a}]`,u)),s):s.append(o,i),s),i=Object.entries(s).reduce(((s,[o,i])=>buildNestedParams(s,o,i)),new URLSearchParams),a=String(i);return o?a:decodeURIComponent(a)})(Object.keys(s).reduce(((o,i)=>{for(const[a,u]of formatKeyValue(i,s[i]))o[a]=u instanceof FileWithData?u.valueOf():u;return o}),{}),{encode:!1})}function serializeRequest(s={}){const{url:o=\"\",query:i,form:a}=s;if(a){const o=Object.keys(a).some((s=>{const{value:o}=a[s];return isFile(o)||isArrayOfFile(o)})),i=s.headers[\"content-type\"]||s.headers[\"Content-Type\"];if(o||/multipart\\/form-data/i.test(i)){const o=function request_buildFormData(s){return Object.entries(s).reduce(((s,[o,i])=>{for(const[a,u]of formatKeyValue(o,i,!0))if(Array.isArray(u))for(const o of u)if(ArrayBuffer.isView(o)){const i=new Blob([o]);s.append(a,i)}else s.append(a,o);else if(ArrayBuffer.isView(u)){const o=new Blob([u]);s.append(a,o)}else s.append(a,u);return s}),new FormData)}(s.form);s.formdata=o,s.body=o}else s.body=encodeFormOrQuery(a);delete s.form}if(i){const[a,u]=o.split(\"?\");let _=\"\";if(u){const s=new URLSearchParams(u);Object.keys(i).forEach((o=>s.delete(o))),_=String(s)}const w=((...s)=>{const o=s.filter((s=>s)).join(\"&\");return o?`?${o}`:\"\"})(_,encodeFormOrQuery(i));s.url=a+w,delete s.query}return s}function serializeHeaders(s={}){return\"function\"!=typeof s.entries?{}:Array.from(s.entries()).reduce(((s,[o,i])=>(s[o]=function serializeHeaderValue(s){return s.includes(\", \")?s.split(\", \"):s}(i),s)),{})}function serializeResponse(s,o,{loadSpec:i=!1}={}){const a={ok:s.ok,url:s.url||o,status:s.status,statusText:s.statusText,headers:serializeHeaders(s.headers)},u=a.headers[\"content-type\"],_=i||((s=\"\")=>/(json|xml|yaml|text)\\b/.test(s))(u);return(_?s.text:s.blob||s.buffer).call(s).then((s=>{if(a.text=s,a.data=s,_)try{const o=function parseBody(s,o){return o&&(0===o.indexOf(\"application/json\")||o.indexOf(\"+json\")>0)?JSON.parse(s):fn.load(s)}(s,u);a.body=o,a.obj=o}catch(s){a.parseError=s}return a}))}async function http_http(s,o={}){\"object\"==typeof s&&(s=(o=s).url),o.headers=o.headers||{},(o=serializeRequest(o)).headers&&Object.keys(o.headers).forEach((s=>{const i=o.headers[s];\"string\"==typeof i&&(o.headers[s]=i.replace(/\\n+/g,\" \"))})),o.requestInterceptor&&(o=await o.requestInterceptor(o)||o);const i=o.headers[\"content-type\"]||o.headers[\"Content-Type\"];let a;/multipart\\/form-data/i.test(i)&&(delete o.headers[\"content-type\"],delete o.headers[\"Content-Type\"]);try{a=await(o.userFetch||fetch)(o.url,o),a=await serializeResponse(a,s,o),o.responseInterceptor&&(a=await o.responseInterceptor(a)||a)}catch(s){if(!a)throw s;const o=new Error(a.statusText||`response status is ${a.status}`);throw o.status=a.status,o.statusCode=a.status,o.responseError=s,o}if(!a.ok){const s=new Error(a.statusText||`response status is ${a.status}`);throw s.status=a.status,s.statusCode=a.status,s.response=a,s}return a}const options_retrievalURI=s=>{var o,i;const{baseDoc:a,url:u}=s,_=null!==(o=null!=a?a:u)&&void 0!==o?o:\"\";return\"string\"==typeof(null===(i=globalThis.document)||void 0===i?void 0:i.baseURI)?String(new URL(_,globalThis.document.baseURI)):_},options_httpClient=s=>{const{fetch:o,http:i}=s;return o||i||http_http};async function resolveGenericStrategy(s){const{spec:o,mode:i,allowMetaPatches:a=!0,pathDiscriminator:u,modelPropertyMacro:_,parameterMacro:w,requestInterceptor:x,responseInterceptor:C,skipNormalization:j=!1,useCircularStructures:L,strategies:B}=s,$=options_retrievalURI(s),V=options_httpClient(s),U=B.find((s=>s.match(o)));return async function doResolve(s){$&&(tu.refs.docCache[$]=s);tu.refs.fetchJSON=makeFetchJSON(V,{requestInterceptor:x,responseInterceptor:C});const o=[tu.refs];\"function\"==typeof w&&o.push(tu.parameters);\"function\"==typeof _&&o.push(tu.properties);\"strict\"!==i&&o.push(tu.allOf);const B=await function mapSpec(s){return new SpecMap(s).dispatch()}({spec:s,context:{baseDoc:$},plugins:o,allowMetaPatches:a,pathDiscriminator:u,parameterMacro:w,modelPropertyMacro:_,useCircularStructures:L});j||(B.spec=U.normalize(B.spec));return B}(o)}const su=_curry2((function and(s,o){return s&&o}));const ou=_curry2((function both(s,o){return _isFunction(s)?function _both(){return s.apply(this,arguments)&&o.apply(this,arguments)}:hc(su)(s,o)}));const iu=na(null);const au=dc(iu);function isOfTypeObject_typeof(s){return isOfTypeObject_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},isOfTypeObject_typeof(s)}const cu=function isOfTypeObject(s){return\"object\"===isOfTypeObject_typeof(s)};const lu=$a(1,ou(au,cu));var uu=pipe(ra,Pc(\"Object\")),pu=pipe(ga,na(ga(Object))),hu=Qo(ou(Mc,pu),[\"constructor\"]),du=$a(1,(function(s){if(!lu(s)||!uu(s))return!1;var o=Object.getPrototypeOf(s);return!!iu(o)||hu(o)}));const fu=du,replace_special_chars_with_underscore=s=>s.replace(/\\W/gi,\"_\");function opId(s,o,i=\"\",{v2OperationIdCompatibilityMode:a}={}){if(!s||\"object\"!=typeof s)return null;return(s.operationId||\"\").replace(/\\s/g,\"\").length?replace_special_chars_with_underscore(s.operationId):function idFromPathMethod(s,o,{v2OperationIdCompatibilityMode:i}={}){if(i){let i=`${o.toLowerCase()}_${s}`.replace(/[\\s!@#$%^&*()_+=[{\\]};:<>|./?,\\\\'\"\"-]/g,\"_\");return i=i||`${s.substring(1)}_${o}`,i.replace(/((_){2,})/g,\"_\").replace(/^(_)*/g,\"\").replace(/([_])*$/g,\"\")}return`${o.toLowerCase()}${replace_special_chars_with_underscore(s)}`}(o,i,{v2OperationIdCompatibilityMode:a})}function normalize_normalize(s){const{spec:o}=s,{paths:i}=o,a={};if(!i||o.$$normalized)return s;for(const s in i){const u=i[s];if(null==u||![\"object\",\"function\"].includes(typeof u))continue;const _=u.parameters;for(const i in u){const w=u[i];if(null==w||![\"object\",\"function\"].includes(typeof w))continue;const x=opId(w,s,i);if(x){a[x]?a[x].push(w):a[x]=[w];const s=a[x];if(s.length>1)s.forEach(((s,o)=>{s.__originalOperationId=s.__originalOperationId||s.operationId,s.operationId=`${x}${o+1}`}));else if(void 0!==w.operationId){const o=s[0];o.__originalOperationId=o.__originalOperationId||w.operationId,o.operationId=x}}if(\"parameters\"!==i){const s=[],i={};for(const a in o)\"produces\"!==a&&\"consumes\"!==a&&\"security\"!==a||(i[a]=o[a],s.push(i));if(_&&(i.parameters=_,s.push(i)),s.length)for(const o of s)for(const s in o)if(Array.isArray(w[s])){if(\"parameters\"===s)for(const i of o[s]){w[s].some((s=>!(!fu(s)&&!fu(i))&&(s===i||[\"name\",\"$ref\",\"$$ref\"].some((o=>\"string\"==typeof s[o]&&\"string\"==typeof i[o]&&s[o]===i[o])))))||w[s].push(i)}}else w[s]=o[s]}}}return o.$$normalized=!0,s}const mu={name:\"generic\",match:()=>!0,normalize(s){const{spec:o}=normalize_normalize({spec:s});return o},resolve:async s=>resolveGenericStrategy(s)},gu=mu;const isOpenAPI30=s=>{try{const{openapi:o}=s;return\"string\"==typeof o&&/^3\\.0\\.(?:[1-9]\\d*|0)$/.test(o)}catch{return!1}},isOpenAPI31=s=>{try{const{openapi:o}=s;return\"string\"==typeof o&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(o)}catch{return!1}},isOpenAPI3=s=>isOpenAPI30(s)||isOpenAPI31(s),yu={name:\"openapi-2\",match:s=>(s=>{try{const{swagger:o}=s;return\"2.0\"===o}catch{return!1}})(s),normalize(s){const{spec:o}=normalize_normalize({spec:s});return o},resolve:async s=>async function resolveOpenAPI2Strategy(s){return resolveGenericStrategy(s)}(s)},vu=yu;const bu={name:\"openapi-3-0\",match:s=>isOpenAPI30(s),normalize(s){const{spec:o}=normalize_normalize({spec:s});return o},resolve:async s=>async function resolveOpenAPI30Strategy(s){return resolveGenericStrategy(s)}(s)},_u=bu;var Su=__webpack_require__(34035);function _reduced(s){return s&&s[\"@@transducer/reduced\"]?s:{\"@@transducer/value\":s,\"@@transducer/reduced\":!0}}var Eu=function(){function XAll(s,o){this.xf=o,this.f=s,this.all=!0}return XAll.prototype[\"@@transducer/init\"]=_xfBase_init,XAll.prototype[\"@@transducer/result\"]=function(s){return this.all&&(s=this.xf[\"@@transducer/step\"](s,!0)),this.xf[\"@@transducer/result\"](s)},XAll.prototype[\"@@transducer/step\"]=function(s,o){return this.f(o)||(this.all=!1,s=_reduced(this.xf[\"@@transducer/step\"](s,!1))),s},XAll}();function _xall(s){return function(o){return new Eu(s,o)}}var wu=_curry2(_dispatchable([\"all\"],_xall,(function all(s,o){for(var i=0;i<o.length;){if(!s(o[i]))return!1;i+=1}return!0})));const xu=wu;class Annotation extends Su.Om{constructor(s,o,i){super(s,o,i),this.element=\"annotation\"}get code(){return this.attributes.get(\"code\")}set code(s){this.attributes.set(\"code\",s)}}const ku=Annotation;class Comment extends Su.Om{constructor(s,o,i){super(s,o,i),this.element=\"comment\"}}const Ou=Comment;class ParseResult extends Su.wE{constructor(s,o,i){super(s,o,i),this.element=\"parseResult\"}get api(){return this.children.filter((s=>s.classes.contains(\"api\"))).first}get results(){return this.children.filter((s=>s.classes.contains(\"result\")))}get result(){return this.results.first}get annotations(){return this.children.filter((s=>\"annotation\"===s.element))}get warnings(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"warning\")))}get errors(){return this.children.filter((s=>\"annotation\"===s.element&&s.classes.contains(\"error\")))}get isEmpty(){return this.children.reject((s=>\"annotation\"===s.element)).isEmpty}replaceResult(s){const{result:o}=this;if(bc(o))return!1;const i=this.content.findIndex((s=>s===o));return-1!==i&&(this.content[i]=s,!0)}}const Cu=ParseResult;class SourceMap extends Su.wE{constructor(s,o,i){super(s,o,i),this.element=\"sourceMap\"}get positionStart(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(0)}get positionEnd(){return this.children.filter((s=>s.classes.contains(\"position\"))).get(1)}set position(s){if(void 0===s)return;const o=new Su.wE([s.start.row,s.start.column,s.start.char]),i=new Su.wE([s.end.row,s.end.column,s.end.char]);o.classes.push(\"position\"),i.classes.push(\"position\"),this.push(o).push(i)}}const Au=SourceMap,hasMethod=(s,o)=>\"object\"==typeof o&&null!==o&&s in o&&\"function\"==typeof o[s],hasBasicElementProps=s=>\"object\"==typeof s&&null!=s&&\"_storedElement\"in s&&\"string\"==typeof s._storedElement&&\"_content\"in s,primitiveEq=(s,o)=>\"object\"==typeof o&&null!==o&&\"primitive\"in o&&(\"function\"==typeof o.primitive&&o.primitive()===s),hasClass=(s,o)=>\"object\"==typeof o&&null!==o&&\"classes\"in o&&(Array.isArray(o.classes)||o.classes instanceof Su.wE)&&o.classes.includes(s),isElementType=(s,o)=>\"object\"==typeof o&&null!==o&&\"element\"in o&&o.element===s,helpers=s=>s({hasMethod,hasBasicElementProps,primitiveEq,isElementType,hasClass}),ju=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.Hg||s(i)&&o(void 0,i))),Pu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.Om||s(i)&&o(\"string\",i))),Iu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.kT||s(i)&&o(\"number\",i))),Tu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.Os||s(i)&&o(\"null\",i))),Nu=helpers((({hasBasicElementProps:s,primitiveEq:o})=>i=>i instanceof Su.bd||s(i)&&o(\"boolean\",i))),Mu=helpers((({hasBasicElementProps:s,primitiveEq:o,hasMethod:i})=>a=>a instanceof Su.Sh||s(a)&&o(\"object\",a)&&i(\"keys\",a)&&i(\"values\",a)&&i(\"items\",a))),Ru=helpers((({hasBasicElementProps:s,primitiveEq:o,hasMethod:i})=>a=>a instanceof Su.wE&&!(a instanceof Su.Sh)||s(a)&&o(\"array\",a)&&i(\"push\",a)&&i(\"unshift\",a)&&i(\"map\",a)&&i(\"reduce\",a))),Du=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Su.Pr||s(a)&&o(\"member\",a)&&i(void 0,a))),Lu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Su.Ft||s(a)&&o(\"link\",a)&&i(void 0,a))),Fu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Su.sI||s(a)&&o(\"ref\",a)&&i(void 0,a))),Bu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof ku||s(a)&&o(\"annotation\",a)&&i(\"array\",a))),$u=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ou||s(a)&&o(\"comment\",a)&&i(\"string\",a))),qu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Cu||s(a)&&o(\"parseResult\",a)&&i(\"array\",a))),Vu=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Au||s(a)&&o(\"sourceMap\",a)&&i(\"array\",a))),isPrimitiveElement=s=>isElementType(\"object\",s)||isElementType(\"array\",s)||isElementType(\"boolean\",s)||isElementType(\"number\",s)||isElementType(\"string\",s)||isElementType(\"null\",s)||isElementType(\"member\",s),hasElementSourceMap=s=>Vu(s.meta.get(\"sourceMap\")),includesSymbols=(s,o)=>{if(0===s.length)return!0;const i=o.attributes.get(\"symbols\");return!!Ru(i)&&xu(sc(i.toValue()),s)},includesClasses=(s,o)=>0===s.length||xu(sc(o.classes.toValue()),s);const es_T=function(){return!0};const es_F=function(){return!1},getVisitFn=(s,o,i)=>{const a=s[o];if(null!=a){if(!i&&\"function\"==typeof a)return a;const s=i?a.leave:a.enter;if(\"function\"==typeof s)return s}else{const a=i?s.leave:s.enter;if(null!=a){if(\"function\"==typeof a)return a;const s=a[o];if(\"function\"==typeof s)return s}}return null},Uu={},getNodeType=s=>null==s?void 0:s.type,isNode=s=>\"string\"==typeof getNodeType(s),cloneNode=s=>Object.create(Object.getPrototypeOf(s),Object.getOwnPropertyDescriptors(s)),mergeAll=(s,{visitFnGetter:o=getVisitFn,nodeTypeGetter:i=getNodeType,breakSymbol:a=Uu,deleteNodeSymbol:u=null,skipVisitingNodeSymbol:_=!1,exposeEdits:w=!1}={})=>{const x=Symbol(\"skip\"),C=new Array(s.length).fill(x);return{enter(j,L,B,$,V,U){let z=j,Y=!1;const Z={...U,replaceWith(s,o){U.replaceWith(s,o),z=s}};for(let j=0;j<s.length;j+=1)if(C[j]===x){const x=o(s[j],i(z),!1);if(\"function\"==typeof x){const o=x.call(s[j],z,L,B,$,V,Z);if(\"function\"==typeof(null==o?void 0:o.then))throw new Go(\"Async visitor not supported in sync mode\",{visitor:s[j],visitFn:x});if(o===_)C[j]=z;else if(o===a)C[j]=a;else{if(o===u)return o;if(void 0!==o){if(!w)return o;z=o,Y=!0}}}}return Y?z:void 0},leave(u,w,j,L,B,$){let V=u;const U={...$,replaceWith(s,o){$.replaceWith(s,o),V=s}};for(let u=0;u<s.length;u+=1)if(C[u]===x){const x=o(s[u],i(V),!0);if(\"function\"==typeof x){const o=x.call(s[u],V,w,j,L,B,U);if(\"function\"==typeof(null==o?void 0:o.then))throw new Go(\"Async visitor not supported in sync mode\",{visitor:s[u],visitFn:x});if(o===a)C[u]=a;else if(void 0!==o&&o!==_)return o}}else C[u]===V&&(C[u]=x)}}};mergeAll[Symbol.for(\"nodejs.util.promisify.custom\")]=(s,{visitFnGetter:o=getVisitFn,nodeTypeGetter:i=getNodeType,breakSymbol:a=Uu,deleteNodeSymbol:u=null,skipVisitingNodeSymbol:_=!1,exposeEdits:w=!1}={})=>{const x=Symbol(\"skip\"),C=new Array(s.length).fill(x);return{async enter(j,L,B,$,V,U){let z=j,Y=!1;const Z={...U,replaceWith(s,o){U.replaceWith(s,o),z=s}};for(let j=0;j<s.length;j+=1)if(C[j]===x){const x=o(s[j],i(z),!1);if(\"function\"==typeof x){const o=await x.call(s[j],z,L,B,$,V,Z);if(o===_)C[j]=z;else if(o===a)C[j]=a;else{if(o===u)return o;if(void 0!==o){if(!w)return o;z=o,Y=!0}}}}return Y?z:void 0},async leave(u,w,j,L,B,$){let V=u;const U={...$,replaceWith(s,o){$.replaceWith(s,o),V=s}};for(let u=0;u<s.length;u+=1)if(C[u]===x){const x=o(s[u],i(V),!0);if(\"function\"==typeof x){const o=await x.call(s[u],V,w,j,L,B,U);if(o===a)C[u]=a;else if(void 0!==o&&o!==_)return o}}else C[u]===V&&(C[u]=x)}}};const visit=(s,o,{keyMap:i=null,state:a={},breakSymbol:u=Uu,deleteNodeSymbol:_=null,skipVisitingNodeSymbol:w=!1,visitFnGetter:x=getVisitFn,nodeTypeGetter:C=getNodeType,nodePredicate:j=isNode,nodeCloneFn:L=cloneNode,detectCycles:B=!0}={})=>{const $=i||{};let V,U,z=Array.isArray(s),Y=[s],Z=-1,ee=[],ie=s;const ae=[],ce=[];do{Z+=1;const s=Z===Y.length;let i;const de=s&&0!==ee.length;if(s){if(i=0===ce.length?void 0:ae.pop(),ie=U,U=ce.pop(),de)if(z){ie=ie.slice();let s=0;for(const[o,i]of ee){const a=o-s;i===_?(ie.splice(a,1),s+=1):ie[a]=i}}else{ie=L(ie);for(const[s,o]of ee)ie[s]=o}Z=V.index,Y=V.keys,ee=V.edits,z=V.inArray,V=V.prev}else if(U!==_&&void 0!==U){if(i=z?Z:Y[Z],ie=U[i],ie===_||void 0===ie)continue;ae.push(i)}let fe;if(!Array.isArray(ie)){var le;if(!j(ie))throw new Go(`Invalid AST Node:  ${String(ie)}`,{node:ie});if(B&&ce.includes(ie)){ae.pop();continue}const _=x(o,C(ie),s);if(_){for(const[s,i]of Object.entries(a))o[s]=i;const u={replaceWith(o,a){\"function\"==typeof a?a(o,ie,i,U,ae,ce):U&&(U[i]=o),s||(ie=o)}};fe=_.call(o,ie,i,U,ae,ce,u)}if(\"function\"==typeof(null===(le=fe)||void 0===le?void 0:le.then))throw new Go(\"Async visitor not supported in sync mode\",{visitor:o,visitFn:_});if(fe===u)break;if(fe===w){if(!s){ae.pop();continue}}else if(void 0!==fe&&(ee.push([i,fe]),!s)){if(!j(fe)){ae.pop();continue}ie=fe}}var pe;if(void 0===fe&&de&&ee.push([i,ie]),!s)V={inArray:z,index:Z,keys:Y,edits:ee,prev:V},z=Array.isArray(ie),Y=z?ie:null!==(pe=$[C(ie)])&&void 0!==pe?pe:[],Z=-1,ee=[],U!==_&&void 0!==U&&ce.push(U),U=ie}while(void 0!==V);return 0!==ee.length?ee[ee.length-1][1]:s};visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,o,{keyMap:i=null,state:a={},breakSymbol:u=Uu,deleteNodeSymbol:_=null,skipVisitingNodeSymbol:w=!1,visitFnGetter:x=getVisitFn,nodeTypeGetter:C=getNodeType,nodePredicate:j=isNode,nodeCloneFn:L=cloneNode,detectCycles:B=!0}={})=>{const $=i||{};let V,U,z=Array.isArray(s),Y=[s],Z=-1,ee=[],ie=s;const ae=[],ce=[];do{Z+=1;const s=Z===Y.length;let i;const pe=s&&0!==ee.length;if(s){if(i=0===ce.length?void 0:ae.pop(),ie=U,U=ce.pop(),pe)if(z){ie=ie.slice();let s=0;for(const[o,i]of ee){const a=o-s;i===_?(ie.splice(a,1),s+=1):ie[a]=i}}else{ie=L(ie);for(const[s,o]of ee)ie[s]=o}Z=V.index,Y=V.keys,ee=V.edits,z=V.inArray,V=V.prev}else if(U!==_&&void 0!==U){if(i=z?Z:Y[Z],ie=U[i],ie===_||void 0===ie)continue;ae.push(i)}let de;if(!Array.isArray(ie)){if(!j(ie))throw new Go(`Invalid AST Node: ${String(ie)}`,{node:ie});if(B&&ce.includes(ie)){ae.pop();continue}const _=x(o,C(ie),s);if(_){for(const[s,i]of Object.entries(a))o[s]=i;const u={replaceWith(o,a){\"function\"==typeof a?a(o,ie,i,U,ae,ce):U&&(U[i]=o),s||(ie=o)}};de=await _.call(o,ie,i,U,ae,ce,u)}if(de===u)break;if(de===w){if(!s){ae.pop();continue}}else if(void 0!==de&&(ee.push([i,de]),!s)){if(!j(de)){ae.pop();continue}ie=de}}var le;if(void 0===de&&pe&&ee.push([i,ie]),!s)V={inArray:z,index:Z,keys:Y,edits:ee,prev:V},z=Array.isArray(ie),Y=z?ie:null!==(le=$[C(ie)])&&void 0!==le?le:[],Z=-1,ee=[],U!==_&&void 0!==U&&ce.push(U),U=ie}while(void 0!==V);return 0!==ee.length?ee[ee.length-1][1]:s};const zu=class CloneError extends Go{value;constructor(s,o){super(s,o),void 0!==o&&(this.value=o.value)}};const Wu=class DeepCloneError extends zu{};const Ju=class ShallowCloneError extends zu{},cloneDeep=(s,o={})=>{const{visited:i=new WeakMap}=o,a={...o,visited:i};if(i.has(s))return i.get(s);if(s instanceof Su.KeyValuePair){const{key:o,value:u}=s,_=ju(o)?cloneDeep(o,a):o,w=ju(u)?cloneDeep(u,a):u,x=new Su.KeyValuePair(_,w);return i.set(s,x),x}if(s instanceof Su.ot){const mapper=s=>cloneDeep(s,a),o=[...s].map(mapper),u=new Su.ot(o);return i.set(s,u),u}if(s instanceof Su.G6){const mapper=s=>cloneDeep(s,a),o=[...s].map(mapper),u=new Su.G6(o);return i.set(s,u),u}if(ju(s)){const o=cloneShallow(s);if(i.set(s,o),s.content)if(ju(s.content))o.content=cloneDeep(s.content,a);else if(s.content instanceof Su.KeyValuePair)o.content=cloneDeep(s.content,a);else if(Array.isArray(s.content)){const mapper=s=>cloneDeep(s,a);o.content=s.content.map(mapper)}else o.content=s.content;else o.content=s.content;return o}throw new Wu(\"Value provided to cloneDeep function couldn't be cloned\",{value:s})};cloneDeep.safe=s=>{try{return cloneDeep(s)}catch{return s}};const cloneShallowKeyValuePair=s=>{const{key:o,value:i}=s;return new Su.KeyValuePair(o,i)},cloneShallowElement=s=>{const o=new s.constructor;if(o.element=s.element,s.meta.length>0&&(o._meta=cloneDeep(s.meta)),s.attributes.length>0&&(o._attributes=cloneDeep(s.attributes)),ju(s.content)){const i=s.content;o.content=cloneShallowElement(i)}else Array.isArray(s.content)?o.content=[...s.content]:s.content instanceof Su.KeyValuePair?o.content=cloneShallowKeyValuePair(s.content):o.content=s.content;return o},cloneShallow=s=>{if(s instanceof Su.KeyValuePair)return cloneShallowKeyValuePair(s);if(s instanceof Su.ot)return(s=>{const o=[...s];return new Su.ot(o)})(s);if(s instanceof Su.G6)return(s=>{const o=[...s];return new Su.G6(o)})(s);if(ju(s))return cloneShallowElement(s);throw new Ju(\"Value provided to cloneShallow function couldn't be cloned\",{value:s})};cloneShallow.safe=s=>{try{return cloneShallow(s)}catch{return s}};const visitor_getNodeType=s=>Mu(s)?\"ObjectElement\":Ru(s)?\"ArrayElement\":Du(s)?\"MemberElement\":Pu(s)?\"StringElement\":Nu(s)?\"BooleanElement\":Iu(s)?\"NumberElement\":Tu(s)?\"NullElement\":Lu(s)?\"LinkElement\":Fu(s)?\"RefElement\":void 0,visitor_cloneNode=s=>ju(s)?cloneShallow(s):cloneNode(s),Hu=pipe(visitor_getNodeType,Jc),Ku={ObjectElement:[\"content\"],ArrayElement:[\"content\"],MemberElement:[\"key\",\"value\"],StringElement:[],BooleanElement:[],NumberElement:[],NullElement:[],RefElement:[],LinkElement:[],Annotation:[],Comment:[],ParseResultElement:[\"content\"],SourceMap:[\"content\"]};class PredicateVisitor{result;predicate;returnOnTrue;returnOnFalse;constructor({predicate:s=es_F,returnOnTrue:o,returnOnFalse:i}={}){this.result=[],this.predicate=s,this.returnOnTrue=o,this.returnOnFalse=i}enter(s){return this.predicate(s)?(this.result.push(s),this.returnOnTrue):this.returnOnFalse}}const visitor_visit=(s,o,{keyMap:i=Ku,...a}={})=>visit(s,o,{keyMap:i,nodeTypeGetter:visitor_getNodeType,nodePredicate:Hu,nodeCloneFn:visitor_cloneNode,...a});visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,o,{keyMap:i=Ku,...a}={})=>visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,o,{keyMap:i,nodeTypeGetter:visitor_getNodeType,nodePredicate:Hu,nodeCloneFn:visitor_cloneNode,...a});const nodeTypeGetter=s=>\"string\"==typeof(null==s?void 0:s.type)?s.type:visitor_getNodeType(s),Gu={EphemeralObject:[\"content\"],EphemeralArray:[\"content\"],...Ku},value_visitor_visit=(s,o,{keyMap:i=Gu,...a}={})=>visitor_visit(s,o,{keyMap:i,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),...a});value_visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,{keyMap:o=Gu,...i}={})=>visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")](s,visitor,{keyMap:o,nodeTypeGetter,nodePredicate:es_T,detectCycles:!1,deleteNodeSymbol:Symbol.for(\"delete-node\"),skipVisitingNodeSymbol:Symbol.for(\"skip-visiting-node\"),...i});const Yu=class EphemeralArray{type=\"EphemeralArray\";content=[];reference=void 0;constructor(s){this.content=s,this.reference=[]}toReference(){return this.reference}toArray(){return this.reference.push(...this.content),this.reference}};const Xu=class EphemeralObject{type=\"EphemeralObject\";content=[];reference=void 0;constructor(s){this.content=s,this.reference={}}toReference(){return this.reference}toObject(){return Object.assign(this.reference,Object.fromEntries(this.content))}};class Visitor{ObjectElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const o=new Xu(s.content);return this.references.set(s,o),o}};EphemeralObject={leave:s=>s.toObject()};MemberElement={enter:s=>[s.key,s.value]};ArrayElement={enter:s=>{if(this.references.has(s))return this.references.get(s).toReference();const o=new Yu(s.content);return this.references.set(s,o),o}};EphemeralArray={leave:s=>s.toArray()};references=new WeakMap;BooleanElement(s){return s.toValue()}NumberElement(s){return s.toValue()}StringElement(s){return s.toValue()}NullElement(){return null}RefElement(s,...o){var i;const a=o[3];return\"EphemeralObject\"===(null===(i=a[a.length-1])||void 0===i?void 0:i.type)?Symbol.for(\"delete-node\"):String(s.toValue())}LinkElement(s){return Pu(s.href)?s.href.toValue():\"\"}}const serializers_value=s=>ju(s)?Pu(s)||Iu(s)||Nu(s)||Tu(s)?s.toValue():value_visitor_visit(s,new Visitor):s;const Qu=_curry3((function mergeWithKey(s,o,i){var a,u={};for(a in i=i||{},o=o||{})_has(a,o)&&(u[a]=_has(a,i)?s(a,o[a],i[a]):o[a]);for(a in i)_has(a,i)&&!_has(a,u)&&(u[a]=i[a]);return u}));const Zu=_curry3((function mergeDeepWithKey(s,o,i){return Qu((function(o,i,a){return _isObject(i)&&_isObject(a)?mergeDeepWithKey(s,i,a):s(o,i,a)}),o,i)}));const ep=_curry2((function mergeDeepRight(s,o){return Zu((function(s,o,i){return i}),s,o)}));const tp=_curry2(_path);const rp=ja(0,-1);const np=_curry2((function apply(s,o){return s.apply(this,o)}));const sp=dc(Mc);var op=_curry1((function empty(s){return null!=s&&\"function\"==typeof s[\"fantasy-land/empty\"]?s[\"fantasy-land/empty\"]():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor[\"fantasy-land/empty\"]?s.constructor[\"fantasy-land/empty\"]():null!=s&&\"function\"==typeof s.empty?s.empty():null!=s&&null!=s.constructor&&\"function\"==typeof s.constructor.empty?s.constructor.empty():ca(s)?[]:_isString(s)?\"\":_isObject(s)?{}:Ei(s)?function(){return arguments}():function _isTypedArray(s){var o=Object.prototype.toString.call(s);return\"[object Uint8ClampedArray]\"===o||\"[object Int8Array]\"===o||\"[object Uint8Array]\"===o||\"[object Int16Array]\"===o||\"[object Uint16Array]\"===o||\"[object Int32Array]\"===o||\"[object Uint32Array]\"===o||\"[object Float32Array]\"===o||\"[object Float64Array]\"===o||\"[object BigInt64Array]\"===o||\"[object BigUint64Array]\"===o}(s)?s.constructor.from(\"\"):void 0}));const ip=op;const cp=_curry1((function isEmpty(s){return null!=s&&na(s,ip(s))}));const lp=$a(1,Mc(Array.isArray)?Array.isArray:pipe(ra,Pc(\"Array\")));const up=ou(lp,cp);var pp=$a(3,(function(s,o,i){var a=tp(s,i),u=tp(rp(s),i);if(!sp(a)&&!up(s)){var _=Ea(a,u);return np(_,o)}}));const hp=pp;class Namespace extends Su.g${constructor(){super(),this.register(\"annotation\",ku),this.register(\"comment\",Ou),this.register(\"parseResult\",Cu),this.register(\"sourceMap\",Au)}}const dp=new Namespace,createNamespace=s=>{const o=new Namespace;return fu(s)&&o.use(s),o},fp=dp,toolbox=()=>({predicates:{...ie},namespace:fp}),mp={toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType,exposeEdits:!0}},dispatchPluginsSync=(s,o,i={})=>{if(0===o.length)return s;const a=ep(mp,i),{toolboxCreator:u,visitorOptions:_}=a,w=u(),x=o.map((s=>s(w))),C=mergeAll(x.map(La({},\"visitor\")),{..._});x.forEach(hp([\"pre\"],[]));const j=visitor_visit(s,C,_);return x.forEach(hp([\"post\"],[])),j};dispatchPluginsSync[Symbol.for(\"nodejs.util.promisify.custom\")]=async(s,o,i={})=>{if(0===o.length)return s;const a=ep(mp,i),{toolboxCreator:u,visitorOptions:_}=a,w=u(),x=o.map((s=>s(w))),C=mergeAll[Symbol.for(\"nodejs.util.promisify.custom\")],j=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],L=C(x.map(La({},\"visitor\")),{..._});await Promise.allSettled(x.map(hp([\"pre\"],[])));const B=await j(s,L,_);return await Promise.allSettled(x.map(hp([\"post\"],[]))),B};const refract=(s,{Type:o,plugins:i=[]})=>{const a=new o(s);return ju(s)&&(s.meta.length>0&&(a.meta=cloneDeep(s.meta)),s.attributes.length>0&&(a.attributes=cloneDeep(s.attributes))),dispatchPluginsSync(a,i,{toolboxCreator:toolbox,visitorOptions:{nodeTypeGetter:visitor_getNodeType}})},createRefractor=s=>(o,i={})=>refract(o,{...i,Type:s});Su.Sh.refract=createRefractor(Su.Sh),Su.wE.refract=createRefractor(Su.wE),Su.Om.refract=createRefractor(Su.Om),Su.bd.refract=createRefractor(Su.bd),Su.Os.refract=createRefractor(Su.Os),Su.kT.refract=createRefractor(Su.kT),Su.Ft.refract=createRefractor(Su.Ft),Su.sI.refract=createRefractor(Su.sI),ku.refract=createRefractor(ku),Ou.refract=createRefractor(Ou),Cu.refract=createRefractor(Cu),Au.refract=createRefractor(Au);const computeEdges=(s,o=new WeakMap)=>(Du(s)?(o.set(s.key,s),computeEdges(s.key,o),o.set(s.value,s),computeEdges(s.value,o)):s.children.forEach((i=>{o.set(i,s),computeEdges(i,o)})),o);const gp=class Transcluder_Transcluder{element;edges;constructor({element:s}){this.element=s}transclude(s,o){var i;if(s===this.element)return o;if(s===o)return this.element;this.edges=null!==(i=this.edges)&&void 0!==i?i:computeEdges(this.element);const a=this.edges.get(s);return bc(a)?void 0:(Mu(a)?((s,o,i)=>{const a=i.get(s);Mu(a)&&(a.content=a.map(((u,_,w)=>w===s?(i.delete(s),i.set(o,a),o):w)))})(s,o,this.edges):Ru(a)?((s,o,i)=>{const a=i.get(s);Ru(a)&&(a.content=a.map((u=>u===s?(i.delete(s),i.set(o,a),o):u)))})(s,o,this.edges):Du(a)&&((s,o,i)=>{const a=i.get(s);Du(a)&&(a.key===s&&(a.key=o,i.delete(s),i.set(o,a)),a.value===s&&(a.value=o,i.delete(s),i.set(o,a)))})(s,o,this.edges),this.element)}},fromURIReference=s=>{const o=s.indexOf(\"#\");return(s=>{try{const o=s.startsWith(\"#\")?s.slice(1):s;return decodeURIComponent(o)}catch{return s}})(-1===o?\"#\":s.substring(o))},yp=function fnparser(){const s=Ep,o=Sp,i=this,a=\"parser.js: Parser(): \";i.ast=void 0,i.stats=void 0,i.trace=void 0,i.callbacks=[];let u,_,w,x,C,j,L,B=0,$=0,V=0,U=0,z=0,Y=new function systemData(){this.state=s.ACTIVE,this.phraseLength=0,this.refresh=()=>{this.state=s.ACTIVE,this.phraseLength=0}};i.parse=(Z,ee,ie,ae)=>{const ce=`${a}parse(): `;B=0,$=0,V=0,U=0,z=0,u=void 0,_=void 0,w=void 0,x=void 0,Y.refresh(),C=void 0,j=void 0,L=void 0,x=o.stringToChars(ie),u=Z.rules,_=Z.udts;const le=ee.toLowerCase();let pe;for(const s in u)if(u.hasOwnProperty(s)&&le===u[s].lower){pe=u[s].index;break}if(void 0===pe)throw new Error(`${ce}start rule name '${startRule}' not recognized`);(()=>{const s=`${a}initializeCallbacks(): `;let o,w;for(C=[],j=[],o=0;o<u.length;o+=1)C[o]=void 0;for(o=0;o<_.length;o+=1)j[o]=void 0;const x=[];for(o=0;o<u.length;o+=1)x.push(u[o].lower);for(o=0;o<_.length;o+=1)x.push(_[o].lower);for(const a in i.callbacks)if(i.callbacks.hasOwnProperty(a)){if(o=x.indexOf(a.toLowerCase()),o<0)throw new Error(`${s}syntax callback '${a}' not a rule or udt name`);if(w=i.callbacks[a]?i.callbacks[a]:void 0,\"function\"!=typeof w&&void 0!==w)throw new Error(`${s}syntax callback[${a}] must be function reference or falsy)`);o<u.length?C[o]=w:j[o-u.length]=w}})(),i.trace&&i.trace.init(u,_,x),i.stats&&i.stats.init(u,_),i.ast&&i.ast.init(u,_,x),L=ae,w=[{type:s.RNM,index:pe}],opExecute(0,0),w=void 0;let de=!1;switch(Y.state){case s.ACTIVE:throw new Error(`${ce}final state should never be 'ACTIVE'`);case s.NOMATCH:de=!1;break;case s.EMPTY:case s.MATCH:de=Y.phraseLength===x.length;break;default:throw new Error(\"unrecognized state\")}return{success:de,state:Y.state,stateName:s.idName(Y.state),length:x.length,matched:Y.phraseLength,maxMatched:z,maxTreeDepth:V,nodeHits:U}};const validateRnmCallbackResult=(o,i,u,_)=>{if(i.phraseLength>u){let s=`${a}opRNM(${o.name}): callback function error: `;throw s+=`sysData.phraseLength: ${i.phraseLength}`,s+=` must be <= remaining chars: ${u}`,new Error(s)}switch(i.state){case s.ACTIVE:if(!_)throw new Error(`${a}opRNM(${o.name}): callback function return error. ACTIVE state not allowed.`);break;case s.EMPTY:i.phraseLength=0;break;case s.MATCH:0===i.phraseLength&&(i.state=s.EMPTY);break;case s.NOMATCH:i.phraseLength=0;break;default:throw new Error(`${a}opRNM(${o.name}): callback function return error. Unrecognized return state: ${i.state}`)}},opUDT=(o,C)=>{let $,V,U;const z=w[o],Z=_[z.index];Y.UdtIndex=Z.index,B||(U=i.ast&&i.ast.udtDefined(z.index),U&&(V=u.length+z.index,$=i.ast.getLength(),i.ast.down(V,Z.name)));const ee=x.length-C;j[z.index](Y,x,C,L),((o,i,u)=>{if(i.phraseLength>u){let s=`${a}opUDT(${o.name}): callback function error: `;throw s+=`sysData.phraseLength: ${i.phraseLength}`,s+=` must be <= remaining chars: ${u}`,new Error(s)}switch(i.state){case s.ACTIVE:throw new Error(`${a}opUDT(${o.name}) ACTIVE state return not allowed.`);case s.EMPTY:if(!o.empty)throw new Error(`${a}opUDT(${o.name}) may not return EMPTY.`);i.phraseLength=0;break;case s.MATCH:if(0===i.phraseLength){if(!o.empty)throw new Error(`${a}opUDT(${o.name}) may not return EMPTY.`);i.state=s.EMPTY}break;case s.NOMATCH:i.phraseLength=0;break;default:throw new Error(`${a}opUDT(${o.name}): callback function return error. Unrecognized return state: ${i.state}`)}})(Z,Y,ee),B||U&&(Y.state===s.NOMATCH?i.ast.setLength($):i.ast.up(V,Z.name,C,Y.phraseLength))},opExecute=(o,_)=>{const j=`${a}opExecute(): `,Z=w[o];switch(U+=1,$>V&&(V=$),$+=1,Y.refresh(),i.trace&&i.trace.down(Z,_),Z.type){case s.ALT:((o,i)=>{const a=w[o];for(let o=0;o<a.children.length&&(opExecute(a.children[o],i),Y.state===s.NOMATCH);o+=1);})(o,_);break;case s.CAT:((o,a)=>{let u,_,x,C;const j=w[o];i.ast&&(_=i.ast.getLength()),u=!0,x=a,C=0;for(let o=0;o<j.children.length;o+=1){if(opExecute(j.children[o],x),Y.state===s.NOMATCH){u=!1;break}x+=Y.phraseLength,C+=Y.phraseLength}u?(Y.state=0===C?s.EMPTY:s.MATCH,Y.phraseLength=C):(Y.state=s.NOMATCH,Y.phraseLength=0,i.ast&&i.ast.setLength(_))})(o,_);break;case s.REP:((o,a)=>{let u,_,C,j;const L=w[o];if(0===L.max)return Y.state=s.EMPTY,void(Y.phraseLength=0);for(_=a,C=0,j=0,i.ast&&(u=i.ast.getLength());!(_>=x.length)&&(opExecute(o+1,_),Y.state!==s.NOMATCH)&&Y.state!==s.EMPTY&&(j+=1,C+=Y.phraseLength,_+=Y.phraseLength,j!==L.max););Y.state===s.EMPTY||j>=L.min?(Y.state=0===C?s.EMPTY:s.MATCH,Y.phraseLength=C):(Y.state=s.NOMATCH,Y.phraseLength=0,i.ast&&i.ast.setLength(u))})(o,_);break;case s.RNM:((o,a)=>{let _,j,$;const V=w[o],U=u[V.index],z=C[U.index];if(B||(j=i.ast&&i.ast.ruleDefined(V.index),j&&(_=i.ast.getLength(),i.ast.down(V.index,u[V.index].name))),z){const o=x.length-a;z(Y,x,a,L),validateRnmCallbackResult(U,Y,o,!0),Y.state===s.ACTIVE&&($=w,w=U.opcodes,opExecute(0,a),w=$,z(Y,x,a,L),validateRnmCallbackResult(U,Y,o,!1))}else $=w,w=U.opcodes,opExecute(0,a,Y),w=$;B||j&&(Y.state===s.NOMATCH?i.ast.setLength(_):i.ast.up(V.index,U.name,a,Y.phraseLength))})(o,_);break;case s.TRG:((o,i)=>{const a=w[o];Y.state=s.NOMATCH,i<x.length&&a.min<=x[i]&&x[i]<=a.max&&(Y.state=s.MATCH,Y.phraseLength=1)})(o,_);break;case s.TBS:((o,i)=>{const a=w[o],u=a.string.length;if(Y.state=s.NOMATCH,i+u<=x.length){for(let s=0;s<u;s+=1)if(x[i+s]!==a.string[s])return;Y.state=s.MATCH,Y.phraseLength=u}})(o,_);break;case s.TLS:((o,i)=>{let a;const u=w[o];Y.state=s.NOMATCH;const _=u.string.length;if(0!==_){if(i+_<=x.length){for(let s=0;s<_;s+=1)if(a=x[i+s],a>=65&&a<=90&&(a+=32),a!==u.string[s])return;Y.state=s.MATCH,Y.phraseLength=_}}else Y.state=s.EMPTY})(o,_);break;case s.UDT:opUDT(o,_);break;case s.AND:((o,i)=>{switch(B+=1,opExecute(o+1,i),B-=1,Y.phraseLength=0,Y.state){case s.EMPTY:case s.MATCH:Y.state=s.EMPTY;break;case s.NOMATCH:Y.state=s.NOMATCH;break;default:throw new Error(`opAND: invalid state ${Y.state}`)}})(o,_);break;case s.NOT:((o,i)=>{switch(B+=1,opExecute(o+1,i),B-=1,Y.phraseLength=0,Y.state){case s.EMPTY:case s.MATCH:Y.state=s.NOMATCH;break;case s.NOMATCH:Y.state=s.EMPTY;break;default:throw new Error(`opNOT: invalid state ${Y.state}`)}})(o,_);break;default:throw new Error(`${j}unrecognized operator`)}B||_+Y.phraseLength>z&&(z=_+Y.phraseLength),i.stats&&i.stats.collect(Z,Y),i.trace&&i.trace.up(Z,Y.state,_,Y.phraseLength),$-=1}},vp=function fnast(){const s=Ep,o=Sp,i=this;let a,u,_,w=0;const x=[],C=[],j=[];function indent(s){let o=\"\";for(;s-- >0;)o+=\" \";return o}i.callbacks=[],i.init=(s,o,L)=>{let B;C.length=0,j.length=0,w=0,a=s,u=o,_=L;const $=[];for(B=0;B<a.length;B+=1)$.push(a[B].lower);for(B=0;B<u.length;B+=1)$.push(u[B].lower);for(w=a.length+u.length,B=0;B<w;B+=1)x[B]=void 0;for(const s in i.callbacks)if(i.callbacks.hasOwnProperty(s)){const o=s.toLowerCase();if(B=$.indexOf(o),B<0)throw new Error(`parser.js: Ast()): init: node '${s}' not a rule or udt name`);x[B]=i.callbacks[s]}},i.ruleDefined=s=>!!x[s],i.udtDefined=s=>!!x[a.length+s],i.down=(o,i)=>{const a=j.length;return C.push(a),j.push({name:i,thisIndex:a,thatIndex:void 0,state:s.SEM_PRE,callbackIndex:o,phraseIndex:void 0,phraseLength:void 0,stack:C.length}),a},i.up=(o,i,a,u)=>{const _=j.length,w=C.pop();return j.push({name:i,thisIndex:_,thatIndex:w,state:s.SEM_POST,callbackIndex:o,phraseIndex:a,phraseLength:u,stack:C.length}),j[w].thatIndex=_,j[w].phraseIndex=a,j[w].phraseLength=u,_},i.translate=o=>{let i,a;for(let u=0;u<j.length;u+=1)a=j[u],i=x[a.callbackIndex],i&&(a.state===s.SEM_PRE?i(s.SEM_PRE,_,a.phraseIndex,a.phraseLength,o):i&&i(s.SEM_POST,_,a.phraseIndex,a.phraseLength,o))},i.setLength=s=>{j.length=s,C.length=s>0?j[s-1].stack:0},i.getLength=()=>j.length,i.toXml=()=>{let i=\"\",a=0;return i+='<?xml version=\"1.0\" encoding=\"utf-8\"?>\\n',i+=`<root nodes=\"${j.length/2}\" characters=\"${_.length}\">\\n`,i+=\"\\x3c!-- input string --\\x3e\\n\",i+=indent(a+2),i+=o.charsToString(_),i+=\"\\n\",j.forEach((u=>{u.state===s.SEM_PRE?(a+=1,i+=indent(a),i+=`<node name=\"${u.name}\" index=\"${u.phraseIndex}\" length=\"${u.phraseLength}\">\\n`,i+=indent(a+2),i+=o.charsToString(_,u.phraseIndex,u.phraseLength),i+=\"\\n\"):(i+=indent(a),i+=`</node>\\x3c!-- name=\"${u.name}\" --\\x3e\\n`,a-=1)})),i+=\"</root>\\n\",i}},bp=function fntrace(){const s=Ep,o=Sp,i=\"parser.js: Trace(): \";let a,u,_,w=\"\",x=0;const C=this,indent=s=>{let o=\"\",i=0;if(s>=0)for(;s--;)i+=1,5===i?(o+=\"|\",i=0):o+=\".\";return o};C.init=(s,o,i)=>{u=s,_=o,a=i};const opName=a=>{let w;switch(a.type){case s.ALT:w=\"ALT\";break;case s.CAT:w=\"CAT\";break;case s.REP:w=a.max===1/0?`REP(${a.min},inf)`:`REP(${a.min},${a.max})`;break;case s.RNM:w=`RNM(${u[a.index].name})`;break;case s.TRG:w=`TRG(${a.min},${a.max})`;break;case s.TBS:w=a.string.length>6?`TBS(${o.charsToString(a.string,0,3)}...)`:`TBS(${o.charsToString(a.string,0,6)})`;break;case s.TLS:w=a.string.length>6?`TLS(${o.charsToString(a.string,0,3)}...)`:`TLS(${o.charsToString(a.string,0,6)})`;break;case s.UDT:w=`UDT(${_[a.index].name})`;break;case s.AND:w=\"AND\";break;case s.NOT:w=\"NOT\";break;default:throw new Error(`${i}Trace: opName: unrecognized opcode`)}return w};C.down=(s,i)=>{const u=indent(x),_=Math.min(100,a.length-i);let C=o.charsToString(a,i,_);_<a.length-i&&(C+=\"...\"),C=`${u}|-|[${opName(s)}]${C}\\n`,w+=C,x+=1},C.up=(u,_,C,j)=>{const L=`${i}trace.up: `;x-=1;const B=indent(x);let $,V,U;switch(_){case s.EMPTY:U=\"|E|\",V=\"''\";break;case s.MATCH:U=\"|M|\",$=Math.min(100,j),V=$<j?`'${o.charsToString(a,C,$)}...'`:`'${o.charsToString(a,C,$)}'`;break;case s.NOMATCH:U=\"|N|\",V=\"\";break;default:throw new Error(`${L} unrecognized state`)}V=`${B}${U}[${opName(u)}]${V}\\n`,w+=V},C.displayTrace=()=>w},_p=function fnstats(){const s=Ep;let o,i,a;const u=[],_=[],w=[];this.init=(s,a)=>{o=s,i=a,clear()},this.collect=(o,i)=>{incStat(a,i.state,i.phraseLength),incStat(u[o.type],i.state,i.phraseLength),o.type===s.RNM&&incStat(_[o.index],i.state,i.phraseLength),o.type===s.UDT&&incStat(w[o.index],i.state,i.phraseLength)},this.displayStats=()=>{let o=\"\";const i={match:0,empty:0,nomatch:0,total:0},displayRow=(s,o,a,u,_)=>{i.match+=o,i.empty+=a,i.nomatch+=u,i.total+=_;return`${s} | ${normalize(o)} | ${normalize(a)} | ${normalize(u)} | ${normalize(_)} |\\n`};return o+=\"          OPERATOR STATS\\n\",o+=\"      |   MATCH |   EMPTY | NOMATCH |   TOTAL |\\n\",o+=displayRow(\"  ALT\",u[s.ALT].match,u[s.ALT].empty,u[s.ALT].nomatch,u[s.ALT].total),o+=displayRow(\"  CAT\",u[s.CAT].match,u[s.CAT].empty,u[s.CAT].nomatch,u[s.CAT].total),o+=displayRow(\"  REP\",u[s.REP].match,u[s.REP].empty,u[s.REP].nomatch,u[s.REP].total),o+=displayRow(\"  RNM\",u[s.RNM].match,u[s.RNM].empty,u[s.RNM].nomatch,u[s.RNM].total),o+=displayRow(\"  TRG\",u[s.TRG].match,u[s.TRG].empty,u[s.TRG].nomatch,u[s.TRG].total),o+=displayRow(\"  TBS\",u[s.TBS].match,u[s.TBS].empty,u[s.TBS].nomatch,u[s.TBS].total),o+=displayRow(\"  TLS\",u[s.TLS].match,u[s.TLS].empty,u[s.TLS].nomatch,u[s.TLS].total),o+=displayRow(\"  UDT\",u[s.UDT].match,u[s.UDT].empty,u[s.UDT].nomatch,u[s.UDT].total),o+=displayRow(\"  AND\",u[s.AND].match,u[s.AND].empty,u[s.AND].nomatch,u[s.AND].total),o+=displayRow(\"  NOT\",u[s.NOT].match,u[s.NOT].empty,u[s.NOT].nomatch,u[s.NOT].total),o+=displayRow(\"TOTAL\",i.match,i.empty,i.nomatch,i.total),o},this.displayHits=s=>{let o=\"\";const displayRow=(s,o,i,u,_)=>{a.match+=s,a.empty+=o,a.nomatch+=i,a.total+=u;return`| ${normalize(s)} | ${normalize(o)} | ${normalize(i)} | ${normalize(u)} | ${_}\\n`};\"string\"==typeof s&&\"a\"===s.toLowerCase()[0]?(_.sort(sortAlpha),w.sort(sortAlpha),o+=\"    RULES/UDTS ALPHABETICALLY\\n\"):\"string\"==typeof s&&\"i\"===s.toLowerCase()[0]?(_.sort(sortIndex),w.sort(sortIndex),o+=\"    RULES/UDTS BY INDEX\\n\"):(_.sort(sortHits),w.sort(sortHits),o+=\"    RULES/UDTS BY HIT COUNT\\n\"),o+=\"|   MATCH |   EMPTY | NOMATCH |   TOTAL | NAME\\n\";for(let s=0;s<_.length;s+=1){let i=_[s];i.total&&(o+=displayRow(i.match,i.empty,i.nomatch,i.total,i.name))}for(let s=0;s<w.length;s+=1){let i=w[s];i.total&&(o+=displayRow(i.match,i.empty,i.nomatch,i.total,i.name))}return o};const normalize=s=>s<10?`      ${s}`:s<100?`     ${s}`:s<1e3?`    ${s}`:s<1e4?`   ${s}`:s<1e5?`  ${s}`:s<1e6?` ${s}`:`${s}`,sortAlpha=(s,o)=>s.lower<o.lower?-1:s.lower>o.lower?1:0,sortHits=(s,o)=>s.total<o.total?1:s.total>o.total?-1:sortAlpha(s,o),sortIndex=(s,o)=>s.index<o.index?-1:s.index>o.index?1:0,x=function fnempty(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},clear=()=>{u.length=0,a=new x,u[s.ALT]=new x,u[s.CAT]=new x,u[s.REP]=new x,u[s.RNM]=new x,u[s.TRG]=new x,u[s.TBS]=new x,u[s.TLS]=new x,u[s.UDT]=new x,u[s.AND]=new x,u[s.NOT]=new x,_.length=0;for(let s=0;s<o.length;s+=1)_.push({empty:0,match:0,nomatch:0,total:0,name:o[s].name,lower:o[s].lower,index:o[s].index});if(i.length>0){w.length=0;for(let s=0;s<i.length;s+=1)w.push({empty:0,match:0,nomatch:0,total:0,name:i[s].name,lower:i[s].lower,index:i[s].index})}},incStat=(o,i)=>{switch(o.total+=1,i){case s.EMPTY:o.empty+=1;break;case s.MATCH:o.match+=1;break;case s.NOMATCH:o.nomatch+=1;break;default:throw new Error(`parser.js: Stats(): collect(): incStat(): unrecognized state: ${i}`)}}},Sp={stringToChars:s=>[...s].map((s=>s.codePointAt(0))),charsToString:(s,o,i)=>{let a=s;for(;!(void 0===o||o<0);){if(void 0===i){a=s.slice(o);break}if(i<=0)return\"\";a=s.slice(o,o+i);break}return String.fromCodePoint(...a)}},Ep={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:s=>{switch(s){case Ep.ALT:return\"ALT\";case Ep.CAT:return\"CAT\";case Ep.REP:return\"REP\";case Ep.RNM:return\"RNM\";case Ep.TRG:return\"TRG\";case Ep.TBS:return\"TBS\";case Ep.TLS:return\"TLS\";case Ep.UDT:return\"UDT\";case Ep.AND:return\"AND\";case Ep.NOT:return\"NOT\";case Ep.ACTIVE:return\"ACTIVE\";case Ep.EMPTY:return\"EMPTY\";case Ep.MATCH:return\"MATCH\";case Ep.NOMATCH:return\"NOMATCH\";case Ep.SEM_PRE:return\"SEM_PRE\";case Ep.SEM_POST:return\"SEM_POST\";case Ep.SEM_OK:return\"SEM_OK\";default:return\"UNRECOGNIZED STATE\"}}};function grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"json-pointer\",lower:\"json-pointer\",index:0,isBkr:!1},this.rules[1]={name:\"reference-token\",lower:\"reference-token\",index:1,isBkr:!1},this.rules[2]={name:\"unescaped\",lower:\"unescaped\",index:2,isBkr:!1},this.rules[3]={name:\"escaped\",lower:\"escaped\",index:3,isBkr:!1},this.rules[4]={name:\"array-location\",lower:\"array-location\",index:4,isBkr:!1},this.rules[5]={name:\"array-index\",lower:\"array-index\",index:5,isBkr:!1},this.rules[6]={name:\"array-dash\",lower:\"array-dash\",index:6,isBkr:!1},this.rules[7]={name:\"slash\",lower:\"slash\",index:7,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:7},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:0,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:1,children:[1,2,3]},this.rules[2].opcodes[1]={type:5,min:0,max:46},this.rules[2].opcodes[2]={type:5,min:48,max:125},this.rules[2].opcodes[3]={type:5,min:127,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2]},this.rules[3].opcodes[1]={type:7,string:[126]},this.rules[3].opcodes[2]={type:1,children:[3,4]},this.rules[3].opcodes[3]={type:7,string:[48]},this.rules[3].opcodes[4]={type:7,string:[49]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2]},this.rules[5].opcodes[1]={type:6,string:[48]},this.rules[5].opcodes[2]={type:2,children:[3,4]},this.rules[5].opcodes[3]={type:5,min:49,max:57},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:5,min:48,max:57},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:7,string:[45]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:7,string:[47]},this.toString=function toString(){let s=\"\";return s+=\"; JavaScript Object Notation (JSON) Pointer ABNF syntax\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6901\\n\",s+=\"json-pointer    = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\\n\",s+=\"reference-token = *( unescaped / escaped )\\n\",s+=\"unescaped       = %x00-2E / %x30-7D / %x7F-10FFFF\\n\",s+=\"                ; %x2F ('/') and %x7E ('~') are excluded from 'unescaped'\\n\",s+='escaped         = \"~\" ( \"0\" / \"1\" )\\n',s+=\"                ; representing '~' and '/', respectively\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6901#section-4\\n\",s+=\"array-location  = array-index / array-dash\\n\",s+=\"array-index     = %x30 / ( %x31-39 *(%x30-39) )\\n\",s+='                ; \"0\", or digits without a leading \"0\"\\n',s+='array-dash      = \"-\"\\n',s+=\"\\n\",s+=\"; Surrogate named rules\\n\",s+='slash           = \"/\"\\n','; JavaScript Object Notation (JSON) Pointer ABNF syntax\\n; https://datatracker.ietf.org/doc/html/rfc6901\\njson-pointer    = *( slash reference-token ) ; MODIFICATION: surrogate text rule used\\nreference-token = *( unescaped / escaped )\\nunescaped       = %x00-2E / %x30-7D / %x7F-10FFFF\\n                ; %x2F (\\'/\\') and %x7E (\\'~\\') are excluded from \\'unescaped\\'\\nescaped         = \"~\" ( \"0\" / \"1\" )\\n                ; representing \\'~\\' and \\'/\\', respectively\\n\\n; https://datatracker.ietf.org/doc/html/rfc6901#section-4\\narray-location  = array-index / array-dash\\narray-index     = %x30 / ( %x31-39 *(%x30-39) )\\n                ; \"0\", or digits without a leading \"0\"\\narray-dash      = \"-\"\\n\\n; Surrogate named rules\\nslash           = \"/\"\\n'}}class JSONPointerError extends Error{constructor(s,o=void 0){if(super(s,o),this.name=this.constructor.name,\"string\"==typeof s&&(this.message=s),\"function\"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(s).stack,null!=o&&\"object\"==typeof o&&Object.prototype.hasOwnProperty.call(o,\"cause\")&&!(\"cause\"in this)){const{cause:s}=o;this.cause=s,s instanceof Error&&\"stack\"in s&&(this.stack=`${this.stack}\\nCAUSE: ${s.stack}`)}if(null!=o&&\"object\"==typeof o){const{cause:s,...i}=o;Object.assign(this,i)}}}const wp=JSONPointerError;const xp=class JSONPointerParseError extends wp{},callbacks_cst=s=>(o,i,a,u,_)=>{if(\"object\"!=typeof _||null===_||Array.isArray(_))throw new xp(\"parser's user data must be an object\");if(o===Ep.SEM_PRE){const o={type:s,text:Sp.charsToString(i,a,u),start:a,length:u,children:[]};if(_.stack.length>0){_.stack[_.stack.length-1].children.push(o)}else _.root=o;_.stack.push(o)}o===Ep.SEM_POST&&_.stack.pop()};const kp=class CSTTranslator_CSTTranslator extends vp{constructor(){super(),this.callbacks[\"json-pointer\"]=callbacks_cst(\"json-pointer\"),this.callbacks[\"reference-token\"]=callbacks_cst(\"reference-token\"),this.callbacks.slash=callbacks_cst(\"text\")}getTree(){const s={stack:[],root:null};return this.translate(s),delete s.stack,s}},es_unescape=s=>{if(\"string\"!=typeof s)throw new TypeError(\"Reference token must be a string\");return s.replace(/~1/g,\"/\").replace(/~0/g,\"~\")};const Op=class ASTTranslator extends kp{getTree(){const{root:s}=super.getTree();return s.children.filter((({type:s})=>\"reference-token\"===s)).map((({text:s})=>es_unescape(s)))}};const Cp=class Expectations extends Array{toString(){return this.map((s=>`\"${String(s)}\"`)).join(\", \")}};const Ap=class Trace extends bp{inferExpectations(){const s=this.displayTrace().split(\"\\n\"),o=new Set;let i=-1;for(let a=0;a<s.length;a++){const u=s[a];if(u.includes(\"M|\")){const s=u.match(/]'(.*)'$/);s&&s[1]&&(i=a)}if(a>i){const s=u.match(/N\\|\\[TLS\\(([^)]+)\\)]/);s&&o.add(s[1])}}return new Cp(...o)}},jp=new grammar,es_parse=(s,{translator:o=new Op,stats:i=!1,trace:a=!1}={})=>{if(\"string\"!=typeof s)throw new TypeError(\"JSON Pointer must be a string\");try{const u=new yp;o&&(u.ast=o),i&&(u.stats=new _p),a&&(u.trace=new Ap);const _=u.parse(jp,\"json-pointer\",s);return{result:_,tree:_.success&&o?u.ast.getTree():void 0,stats:u.stats,trace:u.trace}}catch(o){throw new xp(\"Unexpected error during JSON Pointer parsing\",{cause:o,jsonPointer:s})}};new grammar,new yp,new grammar,new yp;const Pp=new grammar,Ip=new yp,array_index=s=>{if(\"string\"!=typeof s)return!1;try{return Ip.parse(Pp,\"array-index\",s).success}catch{return!1}},Tp=new grammar,Np=new yp,array_dash=s=>{if(\"string\"!=typeof s)return!1;try{return Np.parse(Tp,\"array-dash\",s).success}catch{return!1}},es_escape=s=>{if(\"string\"!=typeof s&&\"number\"!=typeof s)throw new TypeError(\"Reference token must be a string or number\");return String(s).replace(/~/g,\"~0\").replace(/\\//g,\"~1\")};const Mp=class JSONPointerCompileError extends wp{},es_compile=s=>{if(!Array.isArray(s))throw new TypeError(\"Reference tokens must be a list of strings or numbers\");try{return 0===s.length?\"\":`/${s.map((s=>{if(\"string\"!=typeof s&&\"number\"!=typeof s)throw new TypeError(\"Reference token must be a string or number\");return es_escape(String(s))})).join(\"/\")}`}catch(o){throw new Mp(\"Unexpected error during JSON Pointer compilation\",{cause:o,referenceTokens:s})}};const Rp=class TraceBuilder{#e;#t;#r;constructor(s,o={}){this.#e=s,this.#e.steps=[],this.#e.failed=!1,this.#e.failedAt=-1,this.#e.message=`JSON Pointer \"${o.jsonPointer}\" was successfully evaluated against the provided value`,this.#e.context={...o,realm:o.realm.name},this.#t=[],this.#r=o.realm}step({referenceToken:s,input:o,output:i,success:a=!0,reason:u}){const _=this.#t.length;this.#t.push(s);const w={referenceToken:s,referenceTokenPosition:_,input:o,inputType:this.#r.isObject(o)?\"object\":this.#r.isArray(o)?\"array\":\"unrecognized\",output:i,success:a};u&&(w.reason=u),this.#e.steps.push(w),a||(this.#e.failed=!0,this.#e.failedAt=_,this.#e.message=u)}};const Dp=class EvaluationRealm{name=\"\";isArray(s){throw new wp(\"Realm.isArray(node) must be implemented in a subclass\")}isObject(s){throw new wp(\"Realm.isObject(node) must be implemented in a subclass\")}sizeOf(s){throw new wp(\"Realm.sizeOf(node) must be implemented in a subclass\")}has(s,o){throw new wp(\"Realm.has(node) must be implemented in a subclass\")}evaluate(s,o){throw new wp(\"Realm.evaluate(node) must be implemented in a subclass\")}};const Lp=class JSONPointerEvaluateError extends wp{};const Fp=class JSONPointerIndexError extends Lp{};const Bp=class JSONEvaluationRealm extends Dp{name=\"json\";isArray(s){return Array.isArray(s)}isObject(s){return\"object\"==typeof s&&null!==s&&!this.isArray(s)}sizeOf(s){return this.isArray(s)?s.length:this.isObject(s)?Object.keys(s).length:0}has(s,o){if(this.isArray(s)){const i=Number(o),a=i>>>0;if(i!==a)throw new Fp(`Invalid array index \"${o}\": index must be an unsinged 32-bit integer`,{referenceToken:o,currentValue:s,realm:this.name});return a<this.sizeOf(s)&&Object.prototype.hasOwnProperty.call(s,i)}return!!this.isObject(s)&&Object.prototype.hasOwnProperty.call(s,o)}evaluate(s,o){return this.isArray(s)?s[Number(o)]:s[o]}};const $p=class JSONPointerTypeError extends Lp{};const qp=class JSONPointerKeyError extends Lp{},es_evaluate=(s,o,{strictArrays:i=!0,strictObjects:a=!0,realm:u=new Bp,trace:_=!0}={})=>{const{result:w,tree:x,trace:C}=es_parse(o,{trace:!!_}),j=\"object\"==typeof _&&null!==_?new Rp(_,{jsonPointer:o,referenceTokens:x,strictArrays:i,strictObjects:a,realm:u,value:s}):null;try{let _;if(!w.success){let i=`Invalid JSON Pointer: \"${o}\". Syntax error at position ${w.maxMatched}`;throw i+=C?`, expected ${C.inferExpectations()}`:\"\",new Lp(i,{jsonPointer:o,currentValue:s,realm:u.name})}return x.reduce(((s,w,C)=>{if(u.isArray(s)){if(array_dash(w)){if(i)throw new Fp(`Invalid array index \"-\" at position ${C} in \"${o}\". The \"-\" token always refers to a nonexistent element during evaluation`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});return _=u.evaluate(s,String(u.sizeOf(s))),null==j||j.step({referenceToken:w,input:s,output:_}),_}if(!array_index(w))throw new Fp(`Invalid array index \"${w}\" at position ${C} in \"${o}\": index MUST be \"0\", or digits without a leading \"0\"`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});const a=Number(w);if(!Number.isSafeInteger(a))throw new Fp(`Invalid array index \"${w}\" at position ${C} in \"${o}\": index must be a safe integer`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});if(!u.has(s,w)&&i)throw new Fp(`Invalid array index \"${w}\" at position ${C} in \"${o}\": index not found in array`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});return _=u.evaluate(s,w),null==j||j.step({referenceToken:w,input:s,output:_}),_}if(u.isObject(s)){if(!u.has(s,w)&&a)throw new qp(`Invalid object key \"${w}\" at position ${C} in \"${o}\": key not found in object`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name});return _=u.evaluate(s,w),null==j||j.step({referenceToken:w,input:s,output:_}),_}throw new $p(`Invalid reference token \"${w}\" at position ${C} in \"${o}\": cannot be applied to a non-object/non-array value`,{jsonPointer:o,referenceTokens:x,referenceToken:w,referenceTokenPosition:C,currentValue:s,realm:u.name})}),s)}catch(s){if(null==j||j.step({referenceToken:s.referenceToken,input:s.currentValue,success:!1,reason:s.message}),s instanceof Lp)throw s;throw new Lp(\"Unexpected error during JSON Pointer evaluation\",{cause:s,jsonPointer:o,referenceTokens:x})}};const Vp=class ApiDOMEvaluationRealm extends Dp{name=\"apidom\";isArray(s){return Ru(s)}isObject(s){return Mu(s)}sizeOf(s){return this.isArray(s)||this.isObject(s)?s.length:0}has(s,o){if(this.isArray(s)){const i=Number(o),a=i>>>0;if(i!==a)throw new Fp(`Invalid array index \"${o}\": index must be an unsinged 32-bit integer`,{referenceToken:o,currentValue:s,realm:this.name});return a<this.sizeOf(s)}if(this.isObject(s)){const i=s.keys(),a=new Set(i);if(i.length!==a.size)throw new qp(`Object key \"${o}\" is not unique — JSON Pointer requires unique member names`,{referenceToken:o,currentValue:s,realm:this.name});return s.hasKey(o)}return!1}evaluate(s,o){return this.isArray(s)?s.get(Number(o)):s.get(o)}},apidom_evaluate=(s,o,i={})=>es_evaluate(s,o,{...i,realm:new Vp});class Callback extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"callback\"}}const Up=Callback;class Components extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"components\"}get schemas(){return this.get(\"schemas\")}set schemas(s){this.set(\"schemas\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get requestBodies(){return this.get(\"requestBodies\")}set requestBodies(s){this.set(\"requestBodies\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get securitySchemes(){return this.get(\"securitySchemes\")}set securitySchemes(s){this.set(\"securitySchemes\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}}const zp=Components;class Contact extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"contact\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get email(){return this.get(\"email\")}set email(s){this.set(\"email\",s)}}const Wp=Contact;class Discriminator extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"discriminator\"}get propertyName(){return this.get(\"propertyName\")}set propertyName(s){this.set(\"propertyName\",s)}get mapping(){return this.get(\"mapping\")}set mapping(s){this.set(\"mapping\",s)}}const Jp=Discriminator;class Encoding extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"encoding\"}get contentType(){return this.get(\"contentType\")}set contentType(s){this.set(\"contentType\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowedReserved(){return this.get(\"allowedReserved\")}set allowedReserved(s){this.set(\"allowedReserved\",s)}}const Hp=Encoding;class Example extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"example\"}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get value(){return this.get(\"value\")}set value(s){this.set(\"value\",s)}get externalValue(){return this.get(\"externalValue\")}set externalValue(s){this.set(\"externalValue\",s)}}const Kp=Example;class ExternalDocumentation extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"externalDocumentation\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Gp=ExternalDocumentation;class Header extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"header\"}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new Su.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new Su.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Header.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const Yp=Header;class Info extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"info\",this.classes.push(\"info\")}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get termsOfService(){return this.get(\"termsOfService\")}set termsOfService(s){this.set(\"termsOfService\",s)}get contact(){return this.get(\"contact\")}set contact(s){this.set(\"contact\",s)}get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get version(){return this.get(\"version\")}set version(s){this.set(\"version\",s)}}const Xp=Info;class License extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"license\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}}const Qp=License;class Link extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"link\"}get operationRef(){return this.get(\"operationRef\")}set operationRef(s){this.set(\"operationRef\",s)}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get operation(){var s,o;return Pu(this.operationRef)?null===(s=this.operationRef)||void 0===s?void 0:s.meta.get(\"operation\"):Pu(this.operationId)?null===(o=this.operationId)||void 0===o?void 0:o.meta.get(\"operation\"):void 0}set operation(s){this.set(\"operation\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get server(){return this.get(\"server\")}set server(s){this.set(\"server\",s)}}const Zp=Link;class MediaType extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"mediaType\"}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get encoding(){return this.get(\"encoding\")}set encoding(s){this.set(\"encoding\",s)}}const th=MediaType;class OAuthFlow extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"oAuthFlow\"}get authorizationUrl(){return this.get(\"authorizationUrl\")}set authorizationUrl(s){this.set(\"authorizationUrl\",s)}get tokenUrl(){return this.get(\"tokenUrl\")}set tokenUrl(s){this.set(\"tokenUrl\",s)}get refreshUrl(){return this.get(\"refreshUrl\")}set refreshUrl(s){this.set(\"refreshUrl\",s)}get scopes(){return this.get(\"scopes\")}set scopes(s){this.set(\"scopes\",s)}}const rh=OAuthFlow;class OAuthFlows extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"oAuthFlows\"}get implicit(){return this.get(\"implicit\")}set implicit(s){this.set(\"implicit\",s)}get password(){return this.get(\"password\")}set password(s){this.set(\"password\",s)}get clientCredentials(){return this.get(\"clientCredentials\")}set clientCredentials(s){this.set(\"clientCredentials\",s)}get authorizationCode(){return this.get(\"authorizationCode\")}set authorizationCode(s){this.set(\"authorizationCode\",s)}}const uh=OAuthFlows;class Openapi extends Su.Om{constructor(s,o,i){super(s,o,i),this.element=\"openapi\",this.classes.push(\"spec-version\"),this.classes.push(\"version\")}}const dh=Openapi;class OpenApi3_0 extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"openApi3_0\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const fh=OpenApi3_0;class Operation extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"operation\"}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}set externalDocs(s){this.set(\"externalDocs\",s)}get externalDocs(){return this.get(\"externalDocs\")}get operationId(){return this.get(\"operationId\")}set operationId(s){this.set(\"operationId\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}get responses(){return this.get(\"responses\")}set responses(s){this.set(\"responses\",s)}get callbacks(){return this.get(\"callbacks\")}set callbacks(s){this.set(\"callbacks\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new Su.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get servers(){return this.get(\"severs\")}set servers(s){this.set(\"servers\",s)}}const vh=Operation;class Parameter extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"parameter\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new Su.bd(!1)}set required(s){this.set(\"required\",s)}get deprecated(){return this.hasKey(\"deprecated\")?this.get(\"deprecated\"):new Su.bd(!1)}set deprecated(s){this.set(\"deprecated\",s)}get allowEmptyValue(){return this.get(\"allowEmptyValue\")}set allowEmptyValue(s){this.set(\"allowEmptyValue\",s)}get style(){return this.get(\"style\")}set style(s){this.set(\"style\",s)}get explode(){return this.get(\"explode\")}set explode(s){this.set(\"explode\",s)}get allowReserved(){return this.get(\"allowReserved\")}set allowReserved(s){this.set(\"allowReserved\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}}Object.defineProperty(Parameter.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0});const _h=Parameter;class PathItem extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"pathItem\"}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get parameters(){return this.get(\"parameters\")}set parameters(s){this.set(\"parameters\",s)}}const wh=PathItem;class Paths extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"paths\"}}const Oh=Paths;class Reference extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"reference\",this.classes.push(\"openapi-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const jh=Reference;class RequestBody extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"requestBody\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get required(){return this.hasKey(\"required\")?this.get(\"required\"):new Su.bd(!1)}set required(s){this.set(\"required\",s)}}const Ph=RequestBody;class Response_Response extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"response\"}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get headers(){return this.get(\"headers\")}set headers(s){this.set(\"headers\",s)}get contentProp(){return this.get(\"content\")}set contentProp(s){this.set(\"content\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}}const Ih=Response_Response;class Responses extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"responses\"}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}}const Rh=Responses;const Dh=class UnsupportedOperationError extends Ko{};class JSONSchema extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchemaDraft4\"}get idProp(){return this.get(\"id\")}set idProp(s){this.set(\"id\",s)}get $schema(){return this.get(\"$schema\")}set $schema(s){this.set(\"$schema\",s)}get multipleOf(){return this.get(\"multipleOf\")}set multipleOf(s){this.set(\"multipleOf\",s)}get maximum(){return this.get(\"maximum\")}set maximum(s){this.set(\"maximum\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get minimum(){return this.get(\"minimum\")}set minimum(s){this.set(\"minimum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get maxLength(){return this.get(\"maxLength\")}set maxLength(s){this.set(\"maxLength\",s)}get minLength(){return this.get(\"minLength\")}set minLength(s){this.set(\"minLength\",s)}get pattern(){return this.get(\"pattern\")}set pattern(s){this.set(\"pattern\",s)}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get maxItems(){return this.get(\"maxItems\")}set maxItems(s){this.set(\"maxItems\",s)}get minItems(){return this.get(\"minItems\")}set minItems(s){this.set(\"minItems\",s)}get uniqueItems(){return this.get(\"uniqueItems\")}set uniqueItems(s){this.set(\"uniqueItems\",s)}get maxProperties(){return this.get(\"maxProperties\")}set maxProperties(s){this.set(\"maxProperties\",s)}get minProperties(){return this.get(\"minProperties\")}set minProperties(s){this.set(\"minProperties\",s)}get required(){return this.get(\"required\")}set required(s){this.set(\"required\",s)}get properties(){return this.get(\"properties\")}set properties(s){this.set(\"properties\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){return this.get(\"patternProperties\")}set patternProperties(s){this.set(\"patternProperties\",s)}get dependencies(){return this.get(\"dependencies\")}set dependencies(s){this.set(\"dependencies\",s)}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get allOf(){return this.get(\"allOf\")}set allOf(s){this.set(\"allOf\",s)}get anyOf(){return this.get(\"anyOf\")}set anyOf(s){this.set(\"anyOf\",s)}get oneOf(){return this.get(\"oneOf\")}set oneOf(s){this.set(\"oneOf\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){return this.get(\"definitions\")}set definitions(s){this.set(\"definitions\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get format(){return this.get(\"format\")}set format(s){this.set(\"format\",s)}get base(){return this.get(\"base\")}set base(s){this.set(\"base\",s)}get links(){return this.get(\"links\")}set links(s){this.set(\"links\",s)}get media(){return this.get(\"media\")}set media(s){this.set(\"media\",s)}get readOnly(){return this.get(\"readOnly\")}set readOnly(s){this.set(\"readOnly\",s)}}const Lh=JSONSchema;class JSONReference extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"JSONReference\",this.classes.push(\"json-reference\")}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}}const Fh=JSONReference;class Media extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"media\"}get binaryEncoding(){return this.get(\"binaryEncoding\")}set binaryEncoding(s){this.set(\"binaryEncoding\",s)}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}}const Jh=Media;class LinkDescription extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"linkDescription\"}get href(){return this.get(\"href\")}set href(s){this.set(\"href\",s)}get rel(){return this.get(\"rel\")}set rel(s){this.set(\"rel\",s)}get title(){return this.get(\"title\")}set title(s){this.set(\"title\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get mediaType(){return this.get(\"mediaType\")}set mediaType(s){this.set(\"mediaType\",s)}get method(){return this.get(\"method\")}set method(s){this.set(\"method\",s)}get encType(){return this.get(\"encType\")}set encType(s){this.set(\"encType\",s)}get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}}const Hh=LinkDescription;const Kh=_curry2((function mapObjIndexed(s,o){return _arrayReduce((function(i,a){return i[a]=s(o[a],a,o),i}),{},ea(o))}));const Gh=_curry1((function isNil(s){return null==s}));var Qh=_curry2((function hasPath(s,o){if(0===s.length||Gh(o))return!1;for(var i=o,a=0;a<s.length;){if(Gh(i)||!_has(s[a],i))return!1;i=i[s[a]],a+=1}return!0}));const td=Qh;var sd=_curry2((function has(s,o){return td([s],o)}));const id=sd;const cd=_curry3((function propSatisfies(s,o,i){return s(Da(o,i))}));var ld=function(){function XDropWhile(s,o){this.xf=o,this.f=s}return XDropWhile.prototype[\"@@transducer/init\"]=_xfBase_init,XDropWhile.prototype[\"@@transducer/result\"]=_xfBase_result,XDropWhile.prototype[\"@@transducer/step\"]=function(s,o){if(this.f){if(this.f(o))return s;this.f=null}return this.xf[\"@@transducer/step\"](s,o)},XDropWhile}();function _xdropWhile(s){return function(o){return new ld(s,o)}}const ud=_curry2(_dispatchable([\"dropWhile\"],_xdropWhile,(function dropWhile(s,o){for(var i=0,a=o.length;i<a&&s(o[i]);)i+=1;return ja(i,1/0,o)})));const dd=za((function(s,o){return pipe(Ha(\"\"),ud(sc(s)),rc(\"\"))(o)})),dereference=(s,o)=>{const i=Na(s,o);return Kh((s=>{if(fu(s)&&id(\"$ref\",s)&&cd(Jc,\"$ref\",s)){const o=tp([\"$ref\"],s),a=dd(\"#/\",o);return tp(a.split(\"/\"),i)}return fu(s)?dereference(s,i):s}),s)},emptyElement=s=>{const o=s.meta.length>0?cloneDeep(s.meta):void 0,i=s.attributes.length>0?cloneDeep(s.attributes):void 0;return new s.constructor(void 0,o,i)},cloneUnlessOtherwiseSpecified=(s,o)=>o.clone&&o.isMergeableElement(s)?deepmerge(emptyElement(s),s,o):s,md={clone:!0,isMergeableElement:s=>Mu(s)||Ru(s),arrayElementMerge:(s,o,i)=>s.concat(o)[\"fantasy-land/map\"]((s=>cloneUnlessOtherwiseSpecified(s,i))),objectElementMerge:(s,o,i)=>{const a=Mu(s)?emptyElement(s):emptyElement(o);return Mu(s)&&s.forEach(((s,o,u)=>{const _=cloneShallow(u);_.value=cloneUnlessOtherwiseSpecified(s,i),a.content.push(_)})),o.forEach(((o,u,_)=>{const w=serializers_value(u);let x;if(Mu(s)&&s.hasKey(w)&&i.isMergeableElement(o)){const a=s.get(w);x=cloneShallow(_),x.value=((s,o)=>{if(\"function\"!=typeof o.customMerge)return deepmerge;const i=o.customMerge(s,o);return\"function\"==typeof i?i:deepmerge})(u,i)(a,o,i)}else x=cloneShallow(_),x.value=cloneUnlessOtherwiseSpecified(o,i);a.remove(w),a.content.push(x)})),a},customMerge:void 0,customMetaMerge:void 0,customAttributesMerge:void 0},deepmerge=(s,o,i)=>{var a,u,_;const w={...md,...i};w.isMergeableElement=null!==(a=w.isMergeableElement)&&void 0!==a?a:md.isMergeableElement,w.arrayElementMerge=null!==(u=w.arrayElementMerge)&&void 0!==u?u:md.arrayElementMerge,w.objectElementMerge=null!==(_=w.objectElementMerge)&&void 0!==_?_:md.objectElementMerge;const x=Ru(o);if(!(x===Ru(s)))return cloneUnlessOtherwiseSpecified(o,w);const C=x&&\"function\"==typeof w.arrayElementMerge?w.arrayElementMerge(s,o,w):w.objectElementMerge(s,o,w);return C.meta=(s=>\"function\"!=typeof s.customMetaMerge?s=>cloneDeep(s):s.customMetaMerge)(w)(s.meta,o.meta),C.attributes=(s=>\"function\"!=typeof s.customAttributesMerge?s=>cloneDeep(s):s.customAttributesMerge)(w)(s.attributes,o.attributes),C};deepmerge.all=(s,o)=>{if(!Array.isArray(s))throw new TypeError(\"First argument of deepmerge should be an array.\");return 0===s.length?new Su.Sh:s.reduce(((s,i)=>deepmerge(s,i,o)),emptyElement(s[0]))};const yd=deepmerge;const vd=class Visitor_Visitor{element;constructor(s){Object.assign(this,s)}copyMetaAndAttributes(s,o){(s.meta.length>0||o.meta.length>0)&&(o.meta=yd(o.meta,s.meta),hasElementSourceMap(s)&&o.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(o.attributes=yd(o.attributes,s.attributes))}};const _d=class FallbackVisitor extends vd{enter(s){return this.element=cloneDeep(s),Uu}},copyProps=(s,o,i=[])=>{const a=Object.getOwnPropertyDescriptors(o);for(let s of i)delete a[s];Object.defineProperties(s,a)},protoChain=(s,o=[s])=>{const i=Object.getPrototypeOf(s);return null===i?o:protoChain(i,[...o,i])},hardMixProtos=(s,o,i=[])=>{var a;const u=null!==(a=((...s)=>{if(0===s.length)return;let o;const i=s.map((s=>protoChain(s)));for(;i.every((s=>s.length>0));){const s=i.map((s=>s.pop())),a=s[0];if(!s.every((s=>s===a)))break;o=a}return o})(...s))&&void 0!==a?a:Object.prototype,_=Object.create(u),w=protoChain(u);for(let o of s){let s=protoChain(o);for(let o=s.length-1;o>=0;o--){let a=s[o];-1===w.indexOf(a)&&(copyProps(_,a,[\"constructor\",...i]),w.push(a))}}return _.constructor=o,_},unique=s=>s.filter(((o,i)=>s.indexOf(o)==i)),getIngredientWithProp=(s,o)=>{const i=o.map((s=>protoChain(s)));let a=0,u=!0;for(;u;){u=!1;for(let _=o.length-1;_>=0;_--){const o=i[_][a];if(null!=o&&(u=!0,null!=Object.getOwnPropertyDescriptor(o,s)))return i[_][0]}a++}},proxyMix=(s,o=Object.prototype)=>new Proxy({},{getPrototypeOf:()=>o,setPrototypeOf(){throw Error(\"Cannot set prototype of Proxies created by ts-mixer\")},getOwnPropertyDescriptor:(o,i)=>Object.getOwnPropertyDescriptor(getIngredientWithProp(i,s)||{},i),defineProperty(){throw new Error(\"Cannot define new properties on Proxies created by ts-mixer\")},has:(i,a)=>void 0!==getIngredientWithProp(a,s)||void 0!==o[a],get:(i,a)=>(getIngredientWithProp(a,s)||o)[a],set(o,i,a){const u=getIngredientWithProp(i,s);if(void 0===u)throw new Error(\"Cannot set new properties on Proxies created by ts-mixer\");return u[i]=a,!0},deleteProperty(){throw new Error(\"Cannot delete properties on Proxies created by ts-mixer\")},ownKeys:()=>s.map(Object.getOwnPropertyNames).reduce(((s,o)=>o.concat(s.filter((s=>o.indexOf(s)<0)))))}),Sd=null,Ed=\"copy\",wd=\"copy\",xd=\"deep\",kd=new WeakMap,getMixinsForClass=s=>kd.get(s),mergeObjectsOfDecorators=(s,o)=>{var i,a;const u=unique([...Object.getOwnPropertyNames(s),...Object.getOwnPropertyNames(o)]),_={};for(let w of u)_[w]=unique([...null!==(i=null==s?void 0:s[w])&&void 0!==i?i:[],...null!==(a=null==o?void 0:o[w])&&void 0!==a?a:[]]);return _},mergePropertyAndMethodDecorators=(s,o)=>{var i,a,u,_;return{property:mergeObjectsOfDecorators(null!==(i=null==s?void 0:s.property)&&void 0!==i?i:{},null!==(a=null==o?void 0:o.property)&&void 0!==a?a:{}),method:mergeObjectsOfDecorators(null!==(u=null==s?void 0:s.method)&&void 0!==u?u:{},null!==(_=null==o?void 0:o.method)&&void 0!==_?_:{})}},mergeDecorators=(s,o)=>{var i,a,u,_,w,x;return{class:unique([...null!==(i=null==s?void 0:s.class)&&void 0!==i?i:[],...null!==(a=null==o?void 0:o.class)&&void 0!==a?a:[]]),static:mergePropertyAndMethodDecorators(null!==(u=null==s?void 0:s.static)&&void 0!==u?u:{},null!==(_=null==o?void 0:o.static)&&void 0!==_?_:{}),instance:mergePropertyAndMethodDecorators(null!==(w=null==s?void 0:s.instance)&&void 0!==w?w:{},null!==(x=null==o?void 0:o.instance)&&void 0!==x?x:{})}},Od=new Map,deepDecoratorSearch=(...s)=>{const o=((...s)=>{var o;const i=new Set,a=new Set([...s]);for(;a.size>0;)for(let s of a){const u=protoChain(s.prototype).map((s=>s.constructor)),_=[...u,...null!==(o=getMixinsForClass(s))&&void 0!==o?o:[]].filter((s=>!i.has(s)));for(let s of _)a.add(s);i.add(s),a.delete(s)}return[...i]})(...s).map((s=>Od.get(s))).filter((s=>!!s));return 0==o.length?{}:1==o.length?o[0]:o.reduce(((s,o)=>mergeDecorators(s,o)))},getDecoratorsForClass=s=>{let o=Od.get(s);return o||(o={},Od.set(s,o)),o};function Mixin(...s){var o,i,a;const u=s.map((s=>s.prototype)),_=Sd;if(null!==_){const s=u.map((s=>s[_])).filter((s=>\"function\"==typeof s)),combinedInitFunction=function(...o){for(let i of s)i.apply(this,o)},o={[_]:combinedInitFunction};u.push(o)}function MixedClass(...o){for(const i of s)copyProps(this,new i(...o));null!==_&&\"function\"==typeof this[_]&&this[_].apply(this,o)}var w,x;MixedClass.prototype=\"copy\"===wd?hardMixProtos(u,MixedClass):(w=u,x=MixedClass,proxyMix([...w,{constructor:x}])),Object.setPrototypeOf(MixedClass,\"copy\"===Ed?hardMixProtos(s,null,[\"prototype\"]):proxyMix(s,Function.prototype));let C=MixedClass;if(\"none\"!==xd){const u=\"deep\"===xd?deepDecoratorSearch(...s):((...s)=>{const o=s.map((s=>getDecoratorsForClass(s)));return 0===o.length?{}:1===o.length?o[0]:o.reduce(((s,o)=>mergeDecorators(s,o)))})(...s);for(let s of null!==(o=null==u?void 0:u.class)&&void 0!==o?o:[]){const o=s(C);o&&(C=o)}applyPropAndMethodDecorators(null!==(i=null==u?void 0:u.static)&&void 0!==i?i:{},C),applyPropAndMethodDecorators(null!==(a=null==u?void 0:u.instance)&&void 0!==a?a:{},C.prototype)}var j,L;return j=C,L=s,kd.set(j,L),C}const applyPropAndMethodDecorators=(s,o)=>{const i=s.property,a=s.method;if(i)for(let s in i)for(let a of i[s])a(o,s);if(a)for(let s in a)for(let i of a[s])i(o,s,Object.getOwnPropertyDescriptor(o,s))};const Cd=_curry1((function allPass(s){return $a(Ca(Ec,0,Oc(\"length\",s)),(function(){for(var o=0,i=s.length;o<i;){if(!s[o].apply(this,arguments))return!1;o+=1}return!0}))}));const Ad=_curry1((function isNotEmpty(s){return!cp(s)}));const Id=_curry2((function or(s,o){return s||o}));var Td=dc($a(1,ou(au,_curry2((function either(s,o){return _isFunction(s)?function _either(){return s.apply(this,arguments)||o.apply(this,arguments)}:hc(Id)(s,o)}))(cu,Mc))));const Nd=Cd([Jc,Td,Ad]);const Md=_curry2((function pick(s,o){for(var i={},a=0;a<s.length;)s[a]in o&&(i[s[a]]=o[s[a]]),a+=1;return i}));const Rd=class SpecificationVisitor extends vd{specObj;passingOptionsNames=[\"specObj\",\"parent\"];constructor({specObj:s,...o}){super({...o}),this.specObj=s}retrievePassingOptions(){return Md(this.passingOptionsNames,this)}retrieveFixedFields(s){const o=tp([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof o&&null!==o?Object.keys(o):[]}retrieveVisitor(s){return Qo(Mc,[\"visitors\",...s],this.specObj)?tp([\"visitors\",...s],this.specObj):tp([\"visitors\",...s,\"$visitor\"],this.specObj)}retrieveVisitorInstance(s,o={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...i,...o})}toRefractedElement(s,o,i={}){const a=this.retrieveVisitorInstance(s,i);return a instanceof _d&&(null==a?void 0:a.constructor)===_d?cloneDeep(o):(visitor_visit(o,a,i),a.element)}};const Dd=class FixedFieldsVisitor extends Rd{specPath;ignoredFields;constructor({specPath:s,ignoredFields:o,...i}){super({...i}),this.specPath=s,this.ignoredFields=o||[]}ObjectElement(s){const o=this.specPath(s),i=this.retrieveFixedFields(o);return s.forEach(((s,a,u)=>{if(Pu(a)&&i.includes(serializers_value(a))&&!this.ignoredFields.includes(serializers_value(a))){const i=this.toRefractedElement([...o,\"fixedFields\",serializers_value(a)],s),_=new Su.Pr(cloneDeep(a),i);this.copyMetaAndAttributes(u,_),_.classes.push(\"fixed-field\"),this.element.content.push(_)}else this.ignoredFields.includes(serializers_value(a))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Uu}};const Ld=class ParentSchemaAwareVisitor{parent;constructor({parent:s}){this.parent=s}},Fd=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Lh||s(a)&&o(\"JSONSchemaDraft4\",a)&&i(\"object\",a))),Bd=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Fh||s(a)&&o(\"JSONReference\",a)&&i(\"object\",a))),$d=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Jh||s(a)&&o(\"media\",a)&&i(\"object\",a))),Vd=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Hh||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a)));class JSONSchemaVisitor extends(Mixin(Dd,Ld,_d)){constructor(s){super(s),this.element=new Lh,this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}get defaultDialectIdentifier(){return\"http://json-schema.org/draft-04/schema#\"}ObjectElement(s){return this.handleDialectIdentifier(s),this.handleSchemaIdentifier(s),this.parent=this.element,Dd.prototype.ObjectElement.call(this,s)}handleDialectIdentifier(s){if(bc(this.parent)&&!Pu(s.get(\"$schema\")))this.element.setMetaProperty(\"inheritedDialectIdentifier\",this.defaultDialectIdentifier);else if(Fd(this.parent)&&!Pu(s.get(\"$schema\"))){const s=Na(serializers_value(this.parent.meta.get(\"inheritedDialectIdentifier\")),serializers_value(this.parent.$schema));this.element.setMetaProperty(\"inheritedDialectIdentifier\",s)}}handleSchemaIdentifier(s,o=\"id\"){const i=void 0!==this.parent?cloneDeep(this.parent.getMetaProperty(\"ancestorsSchemaIdentifiers\",[])):new Su.wE,a=serializers_value(s.get(o));Nd(a)&&i.push(a),this.element.setMetaProperty(\"ancestorsSchemaIdentifiers\",i)}}const Ud=JSONSchemaVisitor,isJSONReferenceLikeElement=s=>Mu(s)&&s.hasKey(\"$ref\");class ItemsVisitor extends(Mixin(Rd,Ld,_d)){ObjectElement(s){const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"];return this.element=this.toRefractedElement(o,s),Uu}ArrayElement(s){return this.element=new Su.wE,this.element.classes.push(\"json-schema-items\"),s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Wd=ItemsVisitor;const Jd=class RequiredVisitor extends _d{ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-required\"),o}};const Hd=class PatternedFieldsVisitor extends Rd{specPath;ignoredFields;fieldPatternPredicate=es_F;constructor({specPath:s,ignoredFields:o,fieldPatternPredicate:i,...a}){super({...a}),this.specPath=s,this.ignoredFields=o||[],\"function\"==typeof i&&(this.fieldPatternPredicate=i)}ObjectElement(s){return s.forEach(((s,o,i)=>{if(!this.ignoredFields.includes(serializers_value(o))&&this.fieldPatternPredicate(serializers_value(o))){const a=this.specPath(s),u=this.toRefractedElement(a,s),_=new Su.Pr(cloneDeep(o),u);this.copyMetaAndAttributes(i,_),_.classes.push(\"patterned-field\"),this.element.content.push(_)}else this.ignoredFields.includes(serializers_value(o))||this.element.content.push(cloneDeep(i))})),this.copyMetaAndAttributes(s,this.element),Uu}};const Kd=class MapVisitor extends Hd{constructor(s){super(s),this.fieldPatternPredicate=Nd}};class PropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-properties\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const Gd=PropertiesVisitor;class PatternPropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-patternProperties\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const Yd=PatternPropertiesVisitor;class DependenciesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-dependencies\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const Xd=DependenciesVisitor;const Qd=class EnumVisitor extends _d{ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-enum\"),o}};const Zd=class TypeVisitor extends _d{StringElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-type\"),o}ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-type\"),o}};class AllOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-allOf\")}ArrayElement(s){return s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const ef=AllOfVisitor;class AnyOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-anyOf\")}ArrayElement(s){return s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const rf=AnyOfVisitor;class OneOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-oneOf\")}ArrayElement(s){return s.forEach((s=>{const o=isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const of=OneOfVisitor;class DefinitionsVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-definitions\"),this.specPath=s=>isJSONReferenceLikeElement(s)?[\"document\",\"objects\",\"JSONReference\"]:[\"document\",\"objects\",\"JSONSchema\"]}}const af=DefinitionsVisitor;class LinksVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-links\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"LinkDescription\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const cf=LinksVisitor;class JSONReferenceVisitor extends(Mixin(Dd,_d)){constructor(s){super(s),this.element=new Fh,this.specPath=fc([\"document\",\"objects\",\"JSONReference\"])}ObjectElement(s){const o=Dd.prototype.ObjectElement.call(this,s);return Pu(this.element.$ref)&&this.element.classes.push(\"reference-element\"),o}}const lf=JSONReferenceVisitor;const uf=class $RefVisitor extends _d{StringElement(s){const o=this.enter(s);return this.element.classes.push(\"reference-value\"),o}};const hf=_curry3((function ifElse(s,o,i){return $a(Math.max(s.length,o.length,i.length),(function _ifElse(){return s.apply(this,arguments)?o.apply(this,arguments):i.apply(this,arguments)}))}));const df=_curry1((function comparator(s){return function(o,i){return s(o,i)?-1:s(i,o)?1:0}}));var mf=_curry2((function sort(s,o){return Array.prototype.slice.call(o,0).sort(s)}));const gf=mf;var yf=_curry1((function(s){return _nth(0,s)}));const bf=yf;const _f=_curry1(_reduced);const Sf=dc(Gh);const xf=ou(lp,Ad);function _toConsumableArray(s){return function _arrayWithoutHoles(s){if(Array.isArray(s))return _arrayLikeToArray(s)}(s)||function _iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function _unsupportedIterableToArray(s,o){if(s){if(\"string\"==typeof s)return _arrayLikeToArray(s,o);var i={}.toString.call(s).slice(8,-1);return\"Object\"===i&&s.constructor&&(i=s.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(s):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(s,o):void 0}}(s)||function _nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function _arrayLikeToArray(s,o){(null==o||o>s.length)&&(o=s.length);for(var i=0,a=Array(o);i<o;i++)a[i]=s[i];return a}var kf=pipe(gf(df((function(s,o){return s.length>o.length}))),bf,Da(\"length\")),Of=za((function(s,o,i){var a=i.apply(void 0,_toConsumableArray(s));return Sf(a)?_f(a):o}));const Cf=hf(xf,(function dispatchImpl(s){var o=kf(s);return $a(o,(function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return Ca(Of(i),void 0,s)}))}),gc);const jf=class AlternatingVisitor extends Rd{alternator;constructor({alternator:s,...o}){super({...o}),this.alternator=s}enter(s){const o=this.alternator.map((({predicate:s,specPath:o})=>hf(s,fc(o),gc))),i=Cf(o)(s);return this.element=this.toRefractedElement(i,s),Uu}};const Pf=class SchemaOrReferenceVisitor extends jf{constructor(s){super(s),this.alternator=[{predicate:isJSONReferenceLikeElement,specPath:[\"document\",\"objects\",\"JSONReference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"JSONSchema\"]}]}};class MediaVisitor extends(Mixin(Dd,_d)){constructor(s){super(s),this.element=new Jh,this.specPath=fc([\"document\",\"objects\",\"Media\"])}}const Tf=MediaVisitor;class LinkDescriptionVisitor extends(Mixin(Dd,_d)){constructor(s){super(s),this.element=new Hh,this.specPath=fc([\"document\",\"objects\",\"LinkDescription\"])}}const Nf=LinkDescriptionVisitor,Rf={visitors:{value:_d,JSONSchemaOrJSONReferenceVisitor:Pf,document:{objects:{JSONSchema:{$visitor:Ud,fixedFields:{id:{$ref:\"#/visitors/value\"},$schema:{$ref:\"#/visitors/value\"},multipleOf:{$ref:\"#/visitors/value\"},maximum:{$ref:\"#/visitors/value\"},exclusiveMaximum:{$ref:\"#/visitors/value\"},minimum:{$ref:\"#/visitors/value\"},exclusiveMinimum:{$ref:\"#/visitors/value\"},maxLength:{$ref:\"#/visitors/value\"},minLength:{$ref:\"#/visitors/value\"},pattern:{$ref:\"#/visitors/value\"},additionalItems:Pf,items:Wd,maxItems:{$ref:\"#/visitors/value\"},minItems:{$ref:\"#/visitors/value\"},uniqueItems:{$ref:\"#/visitors/value\"},maxProperties:{$ref:\"#/visitors/value\"},minProperties:{$ref:\"#/visitors/value\"},required:Jd,properties:Gd,additionalProperties:Pf,patternProperties:Yd,dependencies:Xd,enum:Qd,type:Zd,allOf:ef,anyOf:rf,oneOf:of,not:Pf,definitions:af,title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},format:{$ref:\"#/visitors/value\"},base:{$ref:\"#/visitors/value\"},links:cf,media:{$ref:\"#/visitors/document/objects/Media\"},readOnly:{$ref:\"#/visitors/value\"}}},JSONReference:{$visitor:lf,fixedFields:{$ref:uf}},Media:{$visitor:Tf,fixedFields:{binaryEncoding:{$ref:\"#/visitors/value\"},type:{$ref:\"#/visitors/value\"}}},LinkDescription:{$visitor:Nf,fixedFields:{href:{$ref:\"#/visitors/value\"},rel:{$ref:\"#/visitors/value\"},title:{$ref:\"#/visitors/value\"},targetSchema:Pf,mediaType:{$ref:\"#/visitors/value\"},method:{$ref:\"#/visitors/value\"},encType:{$ref:\"#/visitors/value\"},schema:Pf}}}}}},traversal_visitor_getNodeType=s=>{if(ju(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},Df={JSONSchemaDraft4Element:[\"content\"],JSONReferenceElement:[\"content\"],MediaElement:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},Ff={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchemaDraft4\",Lh),o.register(\"jSONReference\",Fh),o.register(\"media\",Jh),o.register(\"linkDescription\",Hh),o}},Vf=Ff,refractor_toolbox=()=>{const s=createNamespace(Vf);return{predicates:{...ae,isStringElement:Pu},namespace:s}},refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=Rf}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:refractor_toolbox,visitorOptions:{keyMap:Df,nodeTypeGetter:traversal_visitor_getNodeType}})},refractor_createRefractor=s=>(o,i={})=>refractor_refract(o,{specPath:s,...i});Lh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),Fh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONReference\",\"$visitor\"]),Jh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Media\",\"$visitor\"]),Hh.refract=refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const Wf=class Schema_Schema extends Lh{constructor(s,o,i){super(s,o,i),this.element=\"schema\",this.classes.push(\"json-schema-draft-4\")}get idProp(){throw new Dh(\"idProp getter in Schema class is not not supported.\")}set idProp(s){throw new Dh(\"idProp setter in Schema class is not not supported.\")}get $schema(){throw new Dh(\"$schema getter in Schema class is not not supported.\")}set $schema(s){throw new Dh(\"$schema setter in Schema class is not not supported.\")}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get patternProperties(){throw new Dh(\"patternProperties getter in Schema class is not not supported.\")}set patternProperties(s){throw new Dh(\"patternProperties setter in Schema class is not not supported.\")}get dependencies(){throw new Dh(\"dependencies getter in Schema class is not not supported.\")}set dependencies(s){throw new Dh(\"dependencies setter in Schema class is not not supported.\")}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get definitions(){throw new Dh(\"definitions getter in Schema class is not not supported.\")}set definitions(s){throw new Dh(\"definitions setter in Schema class is not not supported.\")}get base(){throw new Dh(\"base getter in Schema class is not not supported.\")}set base(s){throw new Dh(\"base setter in Schema class is not not supported.\")}get links(){throw new Dh(\"links getter in Schema class is not not supported.\")}set links(s){throw new Dh(\"links setter in Schema class is not not supported.\")}get media(){throw new Dh(\"media getter in Schema class is not not supported.\")}set media(s){throw new Dh(\"media setter in Schema class is not not supported.\")}get nullable(){return this.get(\"nullable\")}set nullable(s){this.set(\"nullable\",s)}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}};class SecurityRequirement extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"securityRequirement\"}}const Jf=SecurityRequirement;class SecurityScheme extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"securityScheme\"}get type(){return this.get(\"type\")}set type(s){this.set(\"type\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get in(){return this.get(\"in\")}set in(s){this.set(\"in\",s)}get scheme(){return this.get(\"scheme\")}set scheme(s){this.set(\"scheme\",s)}get bearerFormat(){return this.get(\"bearerFormat\")}set bearerFormat(s){this.set(\"bearerFormat\",s)}get flows(){return this.get(\"flows\")}set flows(s){this.set(\"flows\",s)}get openIdConnectUrl(){return this.get(\"openIdConnectUrl\")}set openIdConnectUrl(s){this.set(\"openIdConnectUrl\",s)}}const Hf=SecurityScheme;class Server extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"server\"}get url(){return this.get(\"url\")}set url(s){this.set(\"url\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get variables(){return this.get(\"variables\")}set variables(s){this.set(\"variables\",s)}}const Gf=Server;class ServerVariable extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"serverVariable\"}get enum(){return this.get(\"enum\")}set enum(s){this.set(\"enum\",s)}get default(){return this.get(\"default\")}set default(s){this.set(\"default\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}}const Xf=ServerVariable;class Tag extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"tag\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}}const Qf=Tag;class Xml extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"xml\"}get name(){return this.get(\"name\")}set name(s){this.set(\"name\",s)}get namespace(){return this.get(\"namespace\")}set namespace(s){this.set(\"namespace\",s)}get prefix(){return this.get(\"prefix\")}set prefix(s){this.set(\"prefix\",s)}get attribute(){return this.get(\"attribute\")}set attribute(s){this.set(\"attribute\",s)}get wrapped(){return this.get(\"wrapped\")}set wrapped(s){this.set(\"wrapped\",s)}}const em=Xml;const tm=class visitors_Visitor_Visitor{element;constructor(s={}){Object.assign(this,s)}copyMetaAndAttributes(s,o){(s.meta.length>0||o.meta.length>0)&&(o.meta=yd(o.meta,s.meta),hasElementSourceMap(s)&&o.meta.set(\"sourceMap\",s.meta.get(\"sourceMap\"))),(s.attributes.length>0||s.meta.length>0)&&(o.attributes=yd(o.attributes,s.attributes))}};const rm=class FallbackVisitor_FallbackVisitor extends tm{enter(s){return this.element=cloneDeep(s),Uu}};const nm=class SpecificationVisitor_SpecificationVisitor extends tm{specObj;passingOptionsNames=[\"specObj\",\"openApiGenericElement\",\"openApiSemanticElement\"];openApiGenericElement;openApiSemanticElement;constructor({specObj:s,passingOptionsNames:o,openApiGenericElement:i,openApiSemanticElement:a,...u}){super({...u}),this.specObj=s,this.openApiGenericElement=i,this.openApiSemanticElement=a,Array.isArray(o)&&(this.passingOptionsNames=o)}retrievePassingOptions(){return Md(this.passingOptionsNames,this)}retrieveFixedFields(s){const o=tp([\"visitors\",...s,\"fixedFields\"],this.specObj);return\"object\"==typeof o&&null!==o?Object.keys(o):[]}retrieveVisitor(s){return Qo(Mc,[\"visitors\",...s],this.specObj)?tp([\"visitors\",...s],this.specObj):tp([\"visitors\",...s,\"$visitor\"],this.specObj)}retrieveVisitorInstance(s,o={}){const i=this.retrievePassingOptions();return new(this.retrieveVisitor(s))({...i,...o})}toRefractedElement(s,o,i={}){const a=this.retrieveVisitorInstance(s,i);return a instanceof rm&&(null==a?void 0:a.constructor)===rm?cloneDeep(o):(visitor_visit(o,a,i),a.element)}};var sm=function(){function XTake(s,o){this.xf=o,this.n=s,this.i=0}return XTake.prototype[\"@@transducer/init\"]=_xfBase_init,XTake.prototype[\"@@transducer/result\"]=_xfBase_result,XTake.prototype[\"@@transducer/step\"]=function(s,o){this.i+=1;var i=0===this.n?s:this.xf[\"@@transducer/step\"](s,o);return this.n>=0&&this.i>=this.n?_reduced(i):i},XTake}();function _xtake(s){return function(o){return new sm(s,o)}}const om=_curry2(_dispatchable([\"take\"],_xtake,(function take(s,o){return ja(0,s<0?1/0:s,o)})));var im=_curry2((function(s,o){return na(om(s.length,o),s)}));const am=im,isReferenceLikeElement=s=>Mu(s)&&s.hasKey(\"$ref\"),cm=Mu,lm=Mu,isOpenApiExtension=s=>Pu(s.key)&&am(\"x-\",serializers_value(s.key));const um=class FixedFieldsVisitor_FixedFieldsVisitor extends nm{specPath;ignoredFields;canSupportSpecificationExtensions=!0;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:o,canSupportSpecificationExtensions:i,specificationExtensionPredicate:a,...u}){super({...u}),this.specPath=s,this.ignoredFields=o||[],\"boolean\"==typeof i&&(this.canSupportSpecificationExtensions=i),\"function\"==typeof a&&(this.specificationExtensionPredicate=a)}ObjectElement(s){const o=this.specPath(s),i=this.retrieveFixedFields(o);return s.forEach(((s,a,u)=>{if(Pu(a)&&i.includes(serializers_value(a))&&!this.ignoredFields.includes(serializers_value(a))){const i=this.toRefractedElement([...o,\"fixedFields\",serializers_value(a)],s),_=new Su.Pr(cloneDeep(a),i);this.copyMetaAndAttributes(u,_),_.classes.push(\"fixed-field\"),this.element.content.push(_)}else if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(u)){const s=this.toRefractedElement([\"document\",\"extension\"],u);this.element.content.push(s)}else this.ignoredFields.includes(serializers_value(a))||this.element.content.push(cloneDeep(u))})),this.copyMetaAndAttributes(s,this.element),Uu}};class OpenApi3_0Visitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new fh,this.specPath=fc([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){return um.prototype.ObjectElement.call(this,s)}}const pm=OpenApi3_0Visitor;class OpenapiVisitor extends(Mixin(nm,rm)){StringElement(s){const o=new dh(serializers_value(s));return this.copyMetaAndAttributes(s,o),this.element=o,Uu}}const hm=OpenapiVisitor;const dm=class SpecificationExtensionVisitor extends nm{MemberElement(s){return this.element=cloneDeep(s),this.element.classes.push(\"specification-extension\"),Uu}};class InfoVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Xp,this.specPath=fc([\"document\",\"objects\",\"Info\"]),this.canSupportSpecificationExtensions=!0}}const fm=InfoVisitor;const mm=class VersionVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"api-version\"),this.element.classes.push(\"version\"),o}};class ContactVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Wp,this.specPath=fc([\"document\",\"objects\",\"Contact\"]),this.canSupportSpecificationExtensions=!0}}const gm=ContactVisitor;class LicenseVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Qp,this.specPath=fc([\"document\",\"objects\",\"License\"]),this.canSupportSpecificationExtensions=!0}}const ym=LicenseVisitor;class LinkVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Zp,this.specPath=fc([\"document\",\"objects\",\"Link\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return(Pu(this.element.operationId)||Pu(this.element.operationRef))&&this.element.classes.push(\"reference-element\"),o}}const vm=LinkVisitor;const bm=class OperationRefVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};const _m=class OperationIdVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};const Sm=class PatternedFieldsVisitor_PatternedFieldsVisitor extends nm{specPath;ignoredFields;fieldPatternPredicate=es_F;canSupportSpecificationExtensions=!1;specificationExtensionPredicate=isOpenApiExtension;constructor({specPath:s,ignoredFields:o,fieldPatternPredicate:i,canSupportSpecificationExtensions:a,specificationExtensionPredicate:u,..._}){super({..._}),this.specPath=s,this.ignoredFields=o||[],\"function\"==typeof i&&(this.fieldPatternPredicate=i),\"boolean\"==typeof a&&(this.canSupportSpecificationExtensions=a),\"function\"==typeof u&&(this.specificationExtensionPredicate=u)}ObjectElement(s){return s.forEach(((s,o,i)=>{if(this.canSupportSpecificationExtensions&&this.specificationExtensionPredicate(i)){const s=this.toRefractedElement([\"document\",\"extension\"],i);this.element.content.push(s)}else if(!this.ignoredFields.includes(serializers_value(o))&&this.fieldPatternPredicate(serializers_value(o))){const a=this.specPath(s),u=this.toRefractedElement(a,s),_=new Su.Pr(cloneDeep(o),u);this.copyMetaAndAttributes(i,_),_.classes.push(\"patterned-field\"),this.element.content.push(_)}else this.ignoredFields.includes(serializers_value(o))||this.element.content.push(cloneDeep(i))})),this.copyMetaAndAttributes(s,this.element),Uu}};const Em=class MapVisitor_MapVisitor extends Sm{constructor(s){super(s),this.fieldPatternPredicate=Nd}};class LinkParameters extends Su.Sh{static primaryClass=\"link-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(LinkParameters.primaryClass)}}const wm=LinkParameters;class ParametersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new wm,this.specPath=fc([\"value\"])}}const xm=ParametersVisitor;class ServerVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Gf,this.specPath=fc([\"document\",\"objects\",\"Server\"]),this.canSupportSpecificationExtensions=!0}}const km=ServerVisitor;const Om=class UrlVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"server-url\"),o}};class Servers extends Su.wE{static primaryClass=\"servers\";constructor(s,o,i){super(s,o,i),this.classes.push(Servers.primaryClass)}}const Cm=Servers;class ServersVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Cm}ArrayElement(s){return s.forEach((s=>{const o=cm(s)?[\"document\",\"objects\",\"Server\"]:[\"value\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Am=ServersVisitor;class ServerVariableVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Xf,this.specPath=fc([\"document\",\"objects\",\"ServerVariable\"]),this.canSupportSpecificationExtensions=!0}}const jm=ServerVariableVisitor;class ServerVariables extends Su.Sh{static primaryClass=\"server-variables\";constructor(s,o,i){super(s,o,i),this.classes.push(ServerVariables.primaryClass)}}const Pm=ServerVariables;class VariablesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Pm,this.specPath=fc([\"document\",\"objects\",\"ServerVariable\"])}}const Im=VariablesVisitor;class MediaTypeVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new th,this.specPath=fc([\"document\",\"objects\",\"MediaType\"]),this.canSupportSpecificationExtensions=!0}}const Tm=MediaTypeVisitor;const Nm=class AlternatingVisitor_AlternatingVisitor extends nm{alternator;constructor({alternator:s,...o}){super({...o}),this.alternator=s||[]}enter(s){const o=this.alternator.map((({predicate:s,specPath:o})=>hf(s,fc(o),gc))),i=Cf(o)(s);return this.element=this.toRefractedElement(i,s),Uu}},Mm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Up||s(a)&&o(\"callback\",a)&&i(\"object\",a))),Rm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof zp||s(a)&&o(\"components\",a)&&i(\"object\",a))),Dm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Wp||s(a)&&o(\"contact\",a)&&i(\"object\",a))),Lm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Kp||s(a)&&o(\"example\",a)&&i(\"object\",a))),Fm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Gp||s(a)&&o(\"externalDocumentation\",a)&&i(\"object\",a))),Bm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Yp||s(a)&&o(\"header\",a)&&i(\"object\",a))),$m=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Xp||s(a)&&o(\"info\",a)&&i(\"object\",a))),qm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Qp||s(a)&&o(\"license\",a)&&i(\"object\",a))),Vm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Zp||s(a)&&o(\"link\",a)&&i(\"object\",a))),Um=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof dh||s(a)&&o(\"openapi\",a)&&i(\"string\",a))),zm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i,hasClass:a})=>u=>u instanceof fh||s(u)&&o(\"openApi3_0\",u)&&i(\"object\",u)&&a(\"api\",u))),Wm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof vh||s(a)&&o(\"operation\",a)&&i(\"object\",a))),Jm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof _h||s(a)&&o(\"parameter\",a)&&i(\"object\",a))),Hm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof wh||s(a)&&o(\"pathItem\",a)&&i(\"object\",a))),Km=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Oh||s(a)&&o(\"paths\",a)&&i(\"object\",a))),Gm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof jh||s(a)&&o(\"reference\",a)&&i(\"object\",a))),Ym=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ph||s(a)&&o(\"requestBody\",a)&&i(\"object\",a))),Xm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ih||s(a)&&o(\"response\",a)&&i(\"object\",a))),Qm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Rh||s(a)&&o(\"responses\",a)&&i(\"object\",a))),Zm=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Wf||s(a)&&o(\"schema\",a)&&i(\"object\",a))),isBooleanJsonSchemaElement=s=>Nu(s)&&s.classes.includes(\"boolean-json-schema\"),eg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Jf||s(a)&&o(\"securityRequirement\",a)&&i(\"object\",a))),rg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Hf||s(a)&&o(\"securityScheme\",a)&&i(\"object\",a))),ng=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Gf||s(a)&&o(\"server\",a)&&i(\"object\",a))),sg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Xf||s(a)&&o(\"serverVariable\",a)&&i(\"object\",a))),og=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof th||s(a)&&o(\"mediaType\",a)&&i(\"object\",a))),lg=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i,hasClass:a})=>u=>u instanceof Cm||s(u)&&o(\"array\",u)&&i(\"array\",u)&&a(\"servers\",u)));class SchemaVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}}const pg=SchemaVisitor;class ExamplesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"examples\"),this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"],this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),o}}const fg=ExamplesVisitor;class MediaTypeExamples extends Su.Sh{static primaryClass=\"media-type-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(MediaTypeExamples.primaryClass),this.classes.push(\"examples\")}}const mg=MediaTypeExamples;const gg=class ExamplesVisitor_ExamplesVisitor extends fg{constructor(s){super(s),this.element=new mg}};class MediaTypeEncoding extends Su.Sh{static primaryClass=\"media-type-encoding\";constructor(s,o,i){super(s,o,i),this.classes.push(MediaTypeEncoding.primaryClass)}}const yg=MediaTypeEncoding;class EncodingVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new yg,this.specPath=fc([\"document\",\"objects\",\"Encoding\"])}}const _g=EncodingVisitor;class SecurityRequirementVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Jf,this.specPath=fc([\"value\"])}}const xg=SecurityRequirementVisitor;class Security extends Su.wE{static primaryClass=\"security\";constructor(s,o,i){super(s,o,i),this.classes.push(Security.primaryClass)}}const kg=Security;class SecurityVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new kg}ArrayElement(s){return s.forEach((s=>{if(Mu(s)){const o=this.toRefractedElement([\"document\",\"objects\",\"SecurityRequirement\"],s);this.element.push(o)}else this.element.push(cloneDeep(s))})),this.copyMetaAndAttributes(s,this.element),Uu}}const qg=SecurityVisitor;class ComponentsVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new zp,this.specPath=fc([\"document\",\"objects\",\"Components\"]),this.canSupportSpecificationExtensions=!0}}const Vg=ComponentsVisitor;class TagVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Qf,this.specPath=fc([\"document\",\"objects\",\"Tag\"]),this.canSupportSpecificationExtensions=!0}}const Ug=TagVisitor;class ReferenceVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new jh,this.specPath=fc([\"document\",\"objects\",\"Reference\"]),this.canSupportSpecificationExtensions=!1}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Pu(this.element.$ref)&&this.element.classes.push(\"reference-element\"),o}}const zg=ReferenceVisitor;const Wg=class $RefVisitor_$RefVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class ParameterVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new _h,this.specPath=fc([\"document\",\"objects\",\"Parameter\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.contentProp)&&this.element.contentProp.filter(og).forEach(((s,o)=>{s.setMetaProperty(\"media-type\",serializers_value(o))})),o}}const Kg=ParameterVisitor;class SchemaVisitor_SchemaVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}}const Yg=SchemaVisitor_SchemaVisitor;class HeaderVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Yp,this.specPath=fc([\"document\",\"objects\",\"Header\"]),this.canSupportSpecificationExtensions=!0}}const Xg=HeaderVisitor;class header_SchemaVisitor_SchemaVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Schema\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}}const Zg=header_SchemaVisitor_SchemaVisitor;class HeaderExamples extends Su.Sh{static primaryClass=\"header-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(HeaderExamples.primaryClass),this.classes.push(\"examples\")}}const ey=HeaderExamples;const ty=class header_ExamplesVisitor_ExamplesVisitor extends fg{constructor(s){super(s),this.element=new ey}};class ContentVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"content\"),this.specPath=fc([\"document\",\"objects\",\"MediaType\"])}}const ry=ContentVisitor;class HeaderContent extends Su.Sh{static primaryClass=\"header-content\";constructor(s,o,i){super(s,o,i),this.classes.push(HeaderContent.primaryClass),this.classes.push(\"content\")}}const ny=HeaderContent;const sy=class ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new ny}};class schema_SchemaVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Wf,this.specPath=fc([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0}}const oy=schema_SchemaVisitor,iy=Rf.visitors.document.objects.JSONSchema.fixedFields.allOf;const ay=class AllOfVisitor_AllOfVisitor extends iy{ArrayElement(s){const o=iy.prototype.ArrayElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},cy=Rf.visitors.document.objects.JSONSchema.fixedFields.anyOf;const ly=class AnyOfVisitor_AnyOfVisitor extends cy{ArrayElement(s){const o=cy.prototype.ArrayElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},uy=Rf.visitors.document.objects.JSONSchema.fixedFields.oneOf;const py=class OneOfVisitor_OneOfVisitor extends uy{ArrayElement(s){const o=uy.prototype.ArrayElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},hy=Rf.visitors.document.objects.JSONSchema.fixedFields.items;const dy=class ItemsVisitor_ItemsVisitor extends hy{ObjectElement(s){const o=hy.prototype.ObjectElement.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}ArrayElement(s){return this.enter(s)}},fy=Rf.visitors.document.objects.JSONSchema.fixedFields.properties;const my=class PropertiesVisitor_PropertiesVisitor extends fy{ObjectElement(s){const o=fy.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}},gy=Rf.visitors.document.objects.JSONSchema.fixedFields.type;const yy=class TypeVisitor_TypeVisitor extends gy{ArrayElement(s){return this.enter(s)}},vy=Rf.visitors.JSONSchemaOrJSONReferenceVisitor;const by=class SchemaOrReferenceVisitor_SchemaOrReferenceVisitor extends vy{ObjectElement(s){const o=vy.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"schema\"),o}};class DiscriminatorVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Jp,this.specPath=fc([\"document\",\"objects\",\"Discriminator\"]),this.canSupportSpecificationExtensions=!1}}const _y=DiscriminatorVisitor;class DiscriminatorMapping extends Su.Sh{static primaryClass=\"discriminator-mapping\";constructor(s,o,i){super(s,o,i),this.classes.push(DiscriminatorMapping.primaryClass)}}const Sy=DiscriminatorMapping;class MappingVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Sy,this.specPath=fc([\"value\"])}}const Ey=MappingVisitor;class XmlVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new em,this.specPath=fc([\"document\",\"objects\",\"XML\"]),this.canSupportSpecificationExtensions=!0}}const wy=XmlVisitor;class ParameterExamples extends Su.Sh{static primaryClass=\"parameter-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(ParameterExamples.primaryClass),this.classes.push(\"examples\")}}const xy=ParameterExamples;const ky=class parameter_ExamplesVisitor_ExamplesVisitor extends fg{constructor(s){super(s),this.element=new xy}};class ParameterContent extends Su.Sh{static primaryClass=\"parameter-content\";constructor(s,o,i){super(s,o,i),this.classes.push(ParameterContent.primaryClass),this.classes.push(\"content\")}}const Oy=ParameterContent;const Cy=class parameter_ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new Oy}};class ComponentsSchemas extends Su.Sh{static primaryClass=\"components-schemas\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsSchemas.primaryClass)}}const Ay=ComponentsSchemas;class SchemasVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Ay,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Schema\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"schema\")})),o}}const jy=SchemasVisitor;class ComponentsResponses extends Su.Sh{static primaryClass=\"components-responses\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsResponses.primaryClass)}}const Py=ComponentsResponses;class ResponsesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Py,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Xm).forEach(((s,o)=>{s.setMetaProperty(\"http-status-code\",serializers_value(o))})),o}}const Iy=ResponsesVisitor;class ComponentsParameters extends Su.Sh{static primaryClass=\"components-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsParameters.primaryClass),this.classes.push(\"parameters\")}}const Ty=ComponentsParameters;class ParametersVisitor_ParametersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Ty,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"parameter\")})),o}}const Ny=ParametersVisitor_ParametersVisitor;class ComponentsExamples extends Su.Sh{static primaryClass=\"components-examples\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsExamples.primaryClass),this.classes.push(\"examples\")}}const My=ComponentsExamples;class components_ExamplesVisitor_ExamplesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new My,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Example\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"example\")})),o}}const Ry=components_ExamplesVisitor_ExamplesVisitor;class ComponentsRequestBodies extends Su.Sh{static primaryClass=\"components-request-bodies\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsRequestBodies.primaryClass)}}const Dy=ComponentsRequestBodies;class RequestBodiesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Dy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"RequestBody\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"requestBody\")})),o}}const Ly=RequestBodiesVisitor;class ComponentsHeaders extends Su.Sh{static primaryClass=\"components-headers\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsHeaders.primaryClass)}}const Fy=ComponentsHeaders;class HeadersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Fy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.filter(Bm).forEach(((s,o)=>{s.setMetaProperty(\"header-name\",serializers_value(o))})),o}}const By=HeadersVisitor;class ComponentsSecuritySchemes extends Su.Sh{static primaryClass=\"components-security-schemes\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsSecuritySchemes.primaryClass)}}const $y=ComponentsSecuritySchemes;class SecuritySchemesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new $y,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"SecurityScheme\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"securityScheme\")})),o}}const qy=SecuritySchemesVisitor;class ComponentsLinks extends Su.Sh{static primaryClass=\"components-links\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsLinks.primaryClass)}}const Vy=ComponentsLinks;class LinksVisitor_LinksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Vy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),o}}const Uy=LinksVisitor_LinksVisitor;class ComponentsCallbacks extends Su.Sh{static primaryClass=\"components-callbacks\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsCallbacks.primaryClass)}}const zy=ComponentsCallbacks;class CallbacksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new zy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),o}}const Wy=CallbacksVisitor;class ExampleVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Kp,this.specPath=fc([\"document\",\"objects\",\"Example\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Pu(this.element.externalValue)&&this.element.classes.push(\"reference-element\"),o}}const Jy=ExampleVisitor;const Hy=class ExternalValueVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class ExternalDocumentationVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Gp,this.specPath=fc([\"document\",\"objects\",\"ExternalDocumentation\"]),this.canSupportSpecificationExtensions=!0}}const Ky=ExternalDocumentationVisitor;class encoding_EncodingVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Hp,this.specPath=fc([\"document\",\"objects\",\"Encoding\"]),this.canSupportSpecificationExtensions=!0}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.headers)&&this.element.headers.filter(Bm).forEach(((s,o)=>{s.setMetaProperty(\"header-name\",serializers_value(o))})),o}}const Gy=encoding_EncodingVisitor;class EncodingHeaders extends Su.Sh{static primaryClass=\"encoding-headers\";constructor(s,o,i){super(s,o,i),this.classes.push(EncodingHeaders.primaryClass)}}const Yy=EncodingHeaders;class HeadersVisitor_HeadersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Yy,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,o)=>{if(!Bm(s))return;const i=serializers_value(o);s.setMetaProperty(\"headerName\",i)})),o}}const Xy=HeadersVisitor_HeadersVisitor;class PathsVisitor extends(Mixin(Sm,rm)){constructor(s){super(s),this.element=new Oh,this.specPath=fc([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=es_T}ObjectElement(s){const o=Sm.prototype.ObjectElement.call(this,s);return this.element.filter(Hm).forEach(((s,o)=>{o.classes.push(\"openapi-path-template\"),o.classes.push(\"path-template\"),s.setMetaProperty(\"path\",cloneDeep(o))})),o}}const Qy=PathsVisitor;class RequestBodyVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Ph,this.specPath=fc([\"document\",\"objects\",\"RequestBody\"])}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.contentProp)&&this.element.contentProp.filter(og).forEach(((s,o)=>{s.setMetaProperty(\"media-type\",serializers_value(o))})),o}}const Zy=RequestBodyVisitor;class RequestBodyContent extends Su.Sh{static primaryClass=\"request-body-content\";constructor(s,o,i){super(s,o,i),this.classes.push(RequestBodyContent.primaryClass),this.classes.push(\"content\")}}const ev=RequestBodyContent;const tv=class request_body_ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new ev}};class CallbackVisitor extends(Mixin(Sm,rm)){constructor(s){super(s),this.element=new Up,this.specPath=fc([\"document\",\"objects\",\"PathItem\"]),this.canSupportSpecificationExtensions=!0,this.fieldPatternPredicate=s=>/{(?<expression>[^}]{1,2083})}/.test(String(s))}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Hm).forEach(((s,o)=>{s.setMetaProperty(\"runtime-expression\",serializers_value(o))})),o}}const rv=CallbackVisitor;class ResponseVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Ih,this.specPath=fc([\"document\",\"objects\",\"Response\"])}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return Mu(this.element.contentProp)&&this.element.contentProp.filter(og).forEach(((s,o)=>{s.setMetaProperty(\"media-type\",serializers_value(o))})),Mu(this.element.headers)&&this.element.headers.filter(Bm).forEach(((s,o)=>{s.setMetaProperty(\"header-name\",serializers_value(o))})),o}}const nv=ResponseVisitor;class ResponseHeaders extends Su.Sh{static primaryClass=\"response-headers\";constructor(s,o,i){super(s,o,i),this.classes.push(ResponseHeaders.primaryClass)}}const sv=ResponseHeaders;class response_HeadersVisitor_HeadersVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new sv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Header\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"header\")})),this.element.forEach(((s,o)=>{if(!Bm(s))return;const i=serializers_value(o);s.setMetaProperty(\"header-name\",i)})),o}}const ov=response_HeadersVisitor_HeadersVisitor;class ResponseContent extends Su.Sh{static primaryClass=\"response-content\";constructor(s,o,i){super(s,o,i),this.classes.push(ResponseContent.primaryClass),this.classes.push(\"content\")}}const iv=ResponseContent;const av=class response_ContentVisitor_ContentVisitor extends ry{constructor(s){super(s),this.element=new iv}};class ResponseLinks extends Su.Sh{static primaryClass=\"response-links\";constructor(s,o,i){super(s,o,i),this.classes.push(ResponseLinks.primaryClass)}}const cv=ResponseLinks;class response_LinksVisitor_LinksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new cv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Link\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"link\")})),o}}const lv=response_LinksVisitor_LinksVisitor;function _isNumber(s){return\"[object Number]\"===Object.prototype.toString.call(s)}var uv=_curry2((function range(s,o){if(!_isNumber(s)||!_isNumber(o))throw new TypeError(\"Both arguments to range must be numbers\");for(var i=Array(s<o?o-s:0),a=s<0?o+Math.abs(s):o-s,u=0;u<a;)i[u]=u+s,u+=1;return i}));const pv=uv;function hasOrAdd(s,o,i){var a,u=typeof s;switch(u){case\"string\":case\"number\":return 0===s&&1/s==-1/0?!!i._items[\"-0\"]||(o&&(i._items[\"-0\"]=!0),!1):null!==i._nativeSet?o?(a=i._nativeSet.size,i._nativeSet.add(s),i._nativeSet.size===a):i._nativeSet.has(s):u in i._items?s in i._items[u]||(o&&(i._items[u][s]=!0),!1):(o&&(i._items[u]={},i._items[u][s]=!0),!1);case\"boolean\":if(u in i._items){var _=s?1:0;return!!i._items[u][_]||(o&&(i._items[u][_]=!0),!1)}return o&&(i._items[u]=s?[!1,!0]:[!0,!1]),!1;case\"function\":return null!==i._nativeSet?o?(a=i._nativeSet.size,i._nativeSet.add(s),i._nativeSet.size===a):i._nativeSet.has(s):u in i._items?!!_includes(s,i._items[u])||(o&&i._items[u].push(s),!1):(o&&(i._items[u]=[s]),!1);case\"undefined\":return!!i._items[u]||(o&&(i._items[u]=!0),!1);case\"object\":if(null===s)return!!i._items.null||(o&&(i._items.null=!0),!1);default:return(u=Object.prototype.toString.call(s))in i._items?!!_includes(s,i._items[u])||(o&&i._items[u].push(s),!1):(o&&(i._items[u]=[s]),!1)}}const hv=function(){function _Set(){this._nativeSet=\"function\"==typeof Set?new Set:null,this._items={}}return _Set.prototype.add=function(s){return!hasOrAdd(s,!0,this)},_Set.prototype.has=function(s){return hasOrAdd(s,!1,this)},_Set}();var dv=_curry2((function difference(s,o){for(var i=[],a=0,u=s.length,_=o.length,w=new hv,x=0;x<_;x+=1)w.add(o[x]);for(;a<u;)w.add(s[a])&&(i[i.length]=s[a]),a+=1;return i}));const fv=dv;class MixedFieldsVisitor extends(Mixin(um,Sm)){specPathFixedFields;specPathPatternedFields;constructor({specPathFixedFields:s,specPathPatternedFields:o,...i}){super({...i}),this.specPathFixedFields=s,this.specPathPatternedFields=o}ObjectElement(s){const{specPath:o,ignoredFields:i}=this;try{this.specPath=this.specPathFixedFields;const o=this.retrieveFixedFields(this.specPath(s));this.ignoredFields=[...i,...fv(s.keys(),o)],um.prototype.ObjectElement.call(this,s),this.specPath=this.specPathPatternedFields,this.ignoredFields=o,Sm.prototype.ObjectElement.call(this,s)}catch(s){throw this.specPath=o,s}return Uu}}const mv=MixedFieldsVisitor;class responses_ResponsesVisitor extends(Mixin(mv,rm)){constructor(s){super(s),this.element=new Rh,this.specPathFixedFields=fc([\"document\",\"objects\",\"Responses\"]),this.canSupportSpecificationExtensions=!0,this.specPathPatternedFields=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Response\"],this.fieldPatternPredicate=s=>new RegExp(`^(1XX|2XX|3XX|4XX|5XX|${pv(100,600).join(\"|\")})$`).test(String(s))}ObjectElement(s){const o=mv.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"response\")})),this.element.filter(Xm).forEach(((s,o)=>{const i=cloneDeep(o);this.fieldPatternPredicate(serializers_value(i))&&s.setMetaProperty(\"http-status-code\",i)})),o}}const gv=responses_ResponsesVisitor;class DefaultVisitor extends(Mixin(Nm,rm)){constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"Response\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)?this.element.setMetaProperty(\"referenced-element\",\"response\"):Xm(this.element)&&this.element.setMetaProperty(\"http-status-code\",\"default\"),o}}const yv=DefaultVisitor;class OperationVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new vh,this.specPath=fc([\"document\",\"objects\",\"Operation\"])}}const vv=OperationVisitor;class OperationTags extends Su.wE{static primaryClass=\"operation-tags\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationTags.primaryClass)}}const bv=OperationTags;const _v=class TagsVisitor extends rm{constructor(s){super(s),this.element=new bv}ArrayElement(s){return this.element=this.element.concat(cloneDeep(s)),Uu}};class OperationParameters extends Su.wE{static primaryClass=\"operation-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationParameters.primaryClass),this.classes.push(\"parameters\")}}const Sv=OperationParameters;class open_api_3_0_ParametersVisitor_ParametersVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"parameters\")}ArrayElement(s){return s.forEach((s=>{const o=isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Parameter\"],i=this.toRefractedElement(o,s);Gm(i)&&i.setMetaProperty(\"referenced-element\",\"parameter\"),this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Ev=open_api_3_0_ParametersVisitor_ParametersVisitor;const wv=class operation_ParametersVisitor_ParametersVisitor extends Ev{constructor(s){super(s),this.element=new Sv}};const xv=class RequestBodyVisitor_RequestBodyVisitor extends Nm{constructor(s){super(s),this.alternator=[{predicate:isReferenceLikeElement,specPath:[\"document\",\"objects\",\"Reference\"]},{predicate:es_T,specPath:[\"document\",\"objects\",\"RequestBody\"]}]}ObjectElement(s){const o=Nm.prototype.enter.call(this,s);return Gm(this.element)&&this.element.setMetaProperty(\"referenced-element\",\"requestBody\"),o}};class OperationCallbacks extends Su.Sh{static primaryClass=\"operation-callbacks\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationCallbacks.primaryClass)}}const kv=OperationCallbacks;class CallbacksVisitor_CallbacksVisitor extends(Mixin(Em,rm)){specPath;constructor(s){super(s),this.element=new kv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"Callback\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(Gm).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"callback\")})),o}}const Ov=CallbacksVisitor_CallbacksVisitor;class OperationSecurity extends Su.wE{static primaryClass=\"operation-security\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationSecurity.primaryClass),this.classes.push(\"security\")}}const Cv=OperationSecurity;class SecurityVisitor_SecurityVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Cv}ArrayElement(s){return s.forEach((s=>{const o=Mu(s)?[\"document\",\"objects\",\"SecurityRequirement\"]:[\"value\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Av=SecurityVisitor_SecurityVisitor;class OperationServers extends Su.wE{static primaryClass=\"operation-servers\";constructor(s,o,i){super(s,o,i),this.classes.push(OperationServers.primaryClass),this.classes.push(\"servers\")}}const jv=OperationServers;const Pv=class ServersVisitor_ServersVisitor extends Am{constructor(s){super(s),this.element=new jv}};class PathItemVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new wh,this.specPath=fc([\"document\",\"objects\",\"PathItem\"])}ObjectElement(s){const o=um.prototype.ObjectElement.call(this,s);return this.element.filter(Wm).forEach(((s,o)=>{const i=cloneDeep(o);i.content=serializers_value(i).toUpperCase(),s.setMetaProperty(\"http-method\",i)})),Pu(this.element.$ref)&&this.element.classes.push(\"reference-element\"),o}}const Iv=PathItemVisitor;const Tv=class path_item_$RefVisitor_$RefVisitor extends rm{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class PathItemServers extends Su.wE{static primaryClass=\"path-item-servers\";constructor(s,o,i){super(s,o,i),this.classes.push(PathItemServers.primaryClass),this.classes.push(\"servers\")}}const Nv=PathItemServers;const Mv=class path_item_ServersVisitor_ServersVisitor extends Am{constructor(s){super(s),this.element=new Nv}};class PathItemParameters extends Su.wE{static primaryClass=\"path-item-parameters\";constructor(s,o,i){super(s,o,i),this.classes.push(PathItemParameters.primaryClass),this.classes.push(\"parameters\")}}const Rv=PathItemParameters;const Dv=class path_item_ParametersVisitor_ParametersVisitor extends Ev{constructor(s){super(s),this.element=new Rv}};class SecuritySchemeVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Hf,this.specPath=fc([\"document\",\"objects\",\"SecurityScheme\"]),this.canSupportSpecificationExtensions=!0}}const Lv=SecuritySchemeVisitor;class OAuthFlowsVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new uh,this.specPath=fc([\"document\",\"objects\",\"OAuthFlows\"]),this.canSupportSpecificationExtensions=!0}}const Fv=OAuthFlowsVisitor;class OAuthFlowVisitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new rh,this.specPath=fc([\"document\",\"objects\",\"OAuthFlow\"]),this.canSupportSpecificationExtensions=!0}}const Bv=OAuthFlowVisitor;class OAuthFlowScopes extends Su.Sh{static primaryClass=\"oauth-flow-scopes\";constructor(s,o,i){super(s,o,i),this.classes.push(OAuthFlowScopes.primaryClass)}}const $v=OAuthFlowScopes;class ScopesVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new $v,this.specPath=fc([\"value\"])}}const qv=ScopesVisitor;class Tags extends Su.wE{static primaryClass=\"tags\";constructor(s,o,i){super(s,o,i),this.classes.push(Tags.primaryClass)}}const Vv=Tags;class TagsVisitor_TagsVisitor extends(Mixin(nm,rm)){constructor(s){super(s),this.element=new Vv}ArrayElement(s){return s.forEach((s=>{const o=lm(s)?[\"document\",\"objects\",\"Tag\"]:[\"value\"],i=this.toRefractedElement(o,s);this.element.push(i)})),this.copyMetaAndAttributes(s,this.element),Uu}}const Uv=TagsVisitor_TagsVisitor,{fixedFields:zv}=Rf.visitors.document.objects.JSONSchema,Wv={visitors:{value:rm,document:{objects:{OpenApi:{$visitor:pm,fixedFields:{openapi:hm,info:{$ref:\"#/visitors/document/objects/Info\"},servers:Am,paths:{$ref:\"#/visitors/document/objects/Paths\"},components:{$ref:\"#/visitors/document/objects/Components\"},security:qg,tags:Uv,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:fm,fixedFields:{title:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},termsOfService:{$ref:\"#/visitors/value\"},contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:mm}},Contact:{$visitor:gm,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"},email:{$ref:\"#/visitors/value\"}}},License:{$visitor:ym,fixedFields:{name:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Server:{$visitor:km,fixedFields:{url:Om,description:{$ref:\"#/visitors/value\"},variables:Im}},ServerVariable:{$visitor:jm,fixedFields:{enum:{$ref:\"#/visitors/value\"},default:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},Components:{$visitor:Vg,fixedFields:{schemas:jy,responses:Iy,parameters:Ny,examples:Ry,requestBodies:Ly,headers:By,securitySchemes:qy,links:Uy,callbacks:Wy}},Paths:{$visitor:Qy},PathItem:{$visitor:Iv,fixedFields:{$ref:Tv,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:Mv,parameters:Dv}},Operation:{$visitor:vv,fixedFields:{tags:_v,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:{$ref:\"#/visitors/value\"},parameters:wv,requestBody:xv,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:Ov,deprecated:{$ref:\"#/visitors/value\"},security:Av,servers:Pv}},ExternalDocumentation:{$visitor:Ky,fixedFields:{description:{$ref:\"#/visitors/value\"},url:{$ref:\"#/visitors/value\"}}},Parameter:{$visitor:Kg,fixedFields:{name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:Yg,example:{$ref:\"#/visitors/value\"},examples:ky,content:Cy}},RequestBody:{$visitor:Zy,fixedFields:{description:{$ref:\"#/visitors/value\"},content:tv,required:{$ref:\"#/visitors/value\"}}},MediaType:{$visitor:Tm,fixedFields:{schema:pg,example:{$ref:\"#/visitors/value\"},examples:gg,encoding:_g}},Encoding:{$visitor:Gy,fixedFields:{contentType:{$ref:\"#/visitors/value\"},headers:Xy,style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"}}},Responses:{$visitor:gv,fixedFields:{default:yv}},Response:{$visitor:nv,fixedFields:{description:{$ref:\"#/visitors/value\"},headers:ov,content:av,links:lv}},Callback:{$visitor:rv},Example:{$visitor:Jy,fixedFields:{summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},value:{$ref:\"#/visitors/value\"},externalValue:Hy}},Link:{$visitor:vm,fixedFields:{operationRef:bm,operationId:_m,parameters:xm,requestBody:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:Xg,fixedFields:{description:{$ref:\"#/visitors/value\"},required:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"},allowEmptyValue:{$ref:\"#/visitors/value\"},style:{$ref:\"#/visitors/value\"},explode:{$ref:\"#/visitors/value\"},allowReserved:{$ref:\"#/visitors/value\"},schema:Zg,example:{$ref:\"#/visitors/value\"},examples:ty,content:sy}},Tag:{$visitor:Ug,fixedFields:{name:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:zg,fixedFields:{$ref:Wg}},JSONSchema:{$ref:\"#/visitors/document/objects/Schema\"},JSONReference:{$ref:\"#/visitors/document/objects/Reference\"},Schema:{$visitor:oy,fixedFields:{title:zv.title,multipleOf:zv.multipleOf,maximum:zv.maximum,exclusiveMaximum:zv.exclusiveMaximum,minimum:zv.minimum,exclusiveMinimum:zv.exclusiveMinimum,maxLength:zv.maxLength,minLength:zv.minLength,pattern:zv.pattern,maxItems:zv.maxItems,minItems:zv.minItems,uniqueItems:zv.uniqueItems,maxProperties:zv.maxProperties,minProperties:zv.minProperties,required:zv.required,enum:zv.enum,type:yy,allOf:ay,anyOf:ly,oneOf:py,not:by,items:dy,properties:my,additionalProperties:by,description:zv.description,format:zv.format,default:zv.default,nullable:{$ref:\"#/visitors/value\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},writeOnly:{$ref:\"#/visitors/value\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"},deprecated:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:_y,fixedFields:{propertyName:{$ref:\"#/visitors/value\"},mapping:Ey}},XML:{$visitor:wy,fixedFields:{name:{$ref:\"#/visitors/value\"},namespace:{$ref:\"#/visitors/value\"},prefix:{$ref:\"#/visitors/value\"},attribute:{$ref:\"#/visitors/value\"},wrapped:{$ref:\"#/visitors/value\"}}},SecurityScheme:{$visitor:Lv,fixedFields:{type:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"},name:{$ref:\"#/visitors/value\"},in:{$ref:\"#/visitors/value\"},scheme:{$ref:\"#/visitors/value\"},bearerFormat:{$ref:\"#/visitors/value\"},flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:{$ref:\"#/visitors/value\"}}},OAuthFlows:{$visitor:Fv,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:Bv,fixedFields:{authorizationUrl:{$ref:\"#/visitors/value\"},tokenUrl:{$ref:\"#/visitors/value\"},refreshUrl:{$ref:\"#/visitors/value\"},scopes:qv}},SecurityRequirement:{$visitor:xg}},extension:{$visitor:dm}}}},src_traversal_visitor_getNodeType=s=>{if(ju(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},Jv={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_0Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...Ku},Hv={namespace:s=>{const{base:o}=s;return o.register(\"callback\",Up),o.register(\"components\",zp),o.register(\"contact\",Wp),o.register(\"discriminator\",Jp),o.register(\"encoding\",Hp),o.register(\"example\",Kp),o.register(\"externalDocumentation\",Gp),o.register(\"header\",Yp),o.register(\"info\",Xp),o.register(\"license\",Qp),o.register(\"link\",Zp),o.register(\"mediaType\",th),o.register(\"oAuthFlow\",rh),o.register(\"oAuthFlows\",uh),o.register(\"openapi\",dh),o.register(\"openApi3_0\",fh),o.register(\"operation\",vh),o.register(\"parameter\",_h),o.register(\"pathItem\",wh),o.register(\"paths\",Oh),o.register(\"reference\",jh),o.register(\"requestBody\",Ph),o.register(\"response\",Ih),o.register(\"responses\",Rh),o.register(\"schema\",Wf),o.register(\"securityRequirement\",Jf),o.register(\"securityScheme\",Hf),o.register(\"server\",Gf),o.register(\"serverVariable\",Xf),o.register(\"tag\",Qf),o.register(\"xml\",em),o}},Kv=Hv,src_refractor_toolbox=()=>{const s=createNamespace(Kv);return{predicates:{...ce,isElement:ju,isStringElement:Pu,isArrayElement:Ru,isObjectElement:Mu,isMemberElement:Du,includesClasses,hasElementSourceMap},namespace:s}},src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:i=[]}={})=>{const a=(0,Su.e)(s),u=dereference(Wv),_=new(tp(o,u))({specObj:u});return visitor_visit(a,_),dispatchPluginsSync(_.element,i,{toolboxCreator:src_refractor_toolbox,visitorOptions:{keyMap:Jv,nodeTypeGetter:src_traversal_visitor_getNodeType}})},src_refractor_createRefractor=s=>(o,i={})=>src_refractor_refract(o,{specPath:s,...i});Up.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),zp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Wp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),Kp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),Jp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),Hp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),Gp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),Yp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),Xp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),Qp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),Zp.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),th.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),rh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),uh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),dh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),fh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),vh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),_h.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),wh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),Oh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),jh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),Ph.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),Ih.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),Rh.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),Wf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),Jf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),Hf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),Gf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),Xf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),Qf.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),em.refract=src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const Gv=class Callback_Callback extends Up{};const Yv=class Components_Components extends zp{get pathItems(){return this.get(\"pathItems\")}set pathItems(s){this.set(\"pathItems\",s)}};const Xv=class Contact_Contact extends Wp{};const Qv=class Discriminator_Discriminator extends Jp{};const Zv=class Encoding_Encoding extends Hp{};const eb=class Example_Example extends Kp{};const tb=class ExternalDocumentation_ExternalDocumentation extends Gp{};const nb=class Header_Header extends Yp{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const pb=class Info_Info extends Xp{get license(){return this.get(\"license\")}set license(s){this.set(\"license\",s)}get summary(){return this.get(\"summary\")}set summary(s){this.set(\"summary\",s)}};class JsonSchemaDialect extends Su.Om{static default=new JsonSchemaDialect(\"https://spec.openapis.org/oas/3.1/dialect/base\");constructor(s,o,i){super(s,o,i),this.element=\"jsonSchemaDialect\"}}const mb=JsonSchemaDialect;const yb=class License_License extends Qp{get identifier(){return this.get(\"identifier\")}set identifier(s){this.set(\"identifier\",s)}};const _b=class Link_Link extends Zp{};const Sb=class MediaType_MediaType extends th{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const wb=class OAuthFlow_OAuthFlow extends rh{};const Ob=class OAuthFlows_OAuthFlows extends uh{};const Ab=class Openapi_Openapi extends dh{};class OpenApi3_1 extends Su.Sh{constructor(s,o,i){super(s,o,i),this.element=\"openApi3_1\",this.classes.push(\"api\")}get openapi(){return this.get(\"openapi\")}set openapi(s){this.set(\"openapi\",s)}get info(){return this.get(\"info\")}set info(s){this.set(\"info\",s)}get jsonSchemaDialect(){return this.get(\"jsonSchemaDialect\")}set jsonSchemaDialect(s){this.set(\"jsonSchemaDialect\",s)}get servers(){return this.get(\"servers\")}set servers(s){this.set(\"servers\",s)}get paths(){return this.get(\"paths\")}set paths(s){this.set(\"paths\",s)}get components(){return this.get(\"components\")}set components(s){this.set(\"components\",s)}get security(){return this.get(\"security\")}set security(s){this.set(\"security\",s)}get tags(){return this.get(\"tags\")}set tags(s){this.set(\"tags\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get webhooks(){return this.get(\"webhooks\")}set webhooks(s){this.set(\"webhooks\",s)}}const Pb=OpenApi3_1;const Ib=class Operation_Operation extends vh{get requestBody(){return this.get(\"requestBody\")}set requestBody(s){this.set(\"requestBody\",s)}};const Mb=class Parameter_Parameter extends _h{get schema(){return this.get(\"schema\")}set schema(s){this.set(\"schema\",s)}};const Rb=class PathItem_PathItem extends wh{get GET(){return this.get(\"get\")}set GET(s){this.set(\"GET\",s)}get PUT(){return this.get(\"put\")}set PUT(s){this.set(\"PUT\",s)}get POST(){return this.get(\"post\")}set POST(s){this.set(\"POST\",s)}get DELETE(){return this.get(\"delete\")}set DELETE(s){this.set(\"DELETE\",s)}get OPTIONS(){return this.get(\"options\")}set OPTIONS(s){this.set(\"OPTIONS\",s)}get HEAD(){return this.get(\"head\")}set HEAD(s){this.set(\"HEAD\",s)}get PATCH(){return this.get(\"patch\")}set PATCH(s){this.set(\"PATCH\",s)}get TRACE(){return this.get(\"trace\")}set TRACE(s){this.set(\"TRACE\",s)}};const Lb=class Paths_Paths extends Oh{};class Reference_Reference extends jh{}Object.defineProperty(Reference_Reference.prototype,\"description\",{get(){return this.get(\"description\")},set(s){this.set(\"description\",s)},enumerable:!0}),Object.defineProperty(Reference_Reference.prototype,\"summary\",{get(){return this.get(\"summary\")},set(s){this.set(\"summary\",s)},enumerable:!0});const qb=Reference_Reference;const zb=class RequestBody_RequestBody extends Ph{};const Qb=class elements_Response_Response extends Ih{};const e_=class Responses_Responses extends Rh{};const t_=class JSONSchema_JSONSchema extends Lh{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchemaDraft6\"}get idProp(){throw new Dh(\"id keyword from Core vocabulary has been renamed to $id.\")}set idProp(s){throw new Dh(\"id keyword from Core vocabulary has been renamed to $id.\")}get $id(){return this.get(\"$id\")}set $id(s){this.set(\"$id\",s)}get exclusiveMaximum(){return this.get(\"exclusiveMaximum\")}set exclusiveMaximum(s){this.set(\"exclusiveMaximum\",s)}get exclusiveMinimum(){return this.get(\"exclusiveMinimum\")}set exclusiveMinimum(s){this.set(\"exclusiveMinimum\",s)}get containsProp(){return this.get(\"contains\")}set containsProp(s){this.set(\"contains\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get propertyNames(){return this.get(\"propertyNames\")}set propertyNames(s){this.set(\"propertyNames\",s)}get const(){return this.get(\"const\")}set const(s){this.set(\"const\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get examples(){return this.get(\"examples\")}set examples(s){this.set(\"examples\",s)}};const r_=class LinkDescription_LinkDescription extends Hh{get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get schema(){throw new Dh(\"schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.\")}set schema(s){throw new Dh(\"schema keyword from Hyper-Schema vocabulary has been renamed to submissionSchema.\")}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}get method(){throw new Dh(\"method keyword from Hyper-Schema vocabulary has been removed.\")}set method(s){throw new Dh(\"method keyword from Hyper-Schema vocabulary has been removed.\")}get encType(){throw new Dh(\"encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.\")}set encType(s){throw new Dh(\"encType keyword from Hyper-Schema vocabulary has been renamed to submissionEncType.\")}get submissionEncType(){return this.get(\"submissionEncType\")}set submissionEncType(s){this.set(\"submissionEncType\",s)}};var n_=_curry3((function assocPath(s,o,i){if(0===s.length)return o;var a=s[0];if(s.length>1){var u=!Gh(i)&&_has(a,i)&&\"object\"==typeof i[a]?i[a]:Xo(s[1])?[]:{};o=assocPath(Array.prototype.slice.call(s,1),o,u)}return function _assoc(s,o,i){if(Xo(s)&&ca(i)){var a=[].concat(i);return a[s]=o,a}var u={};for(var _ in i)u[_]=i[_];return u[s]=o,u}(a,o,i)}));const s_=n_;var o_=_curry3((function remove(s,o,i){var a=Array.prototype.slice.call(i,0);return a.splice(s,o),a}));const i_=o_;var a_=_curry3((function assoc(s,o,i){return s_([s],o,i)}));const c_=a_;var l_=_curry2((function dissocPath(s,o){if(null==o)return o;switch(s.length){case 0:return o;case 1:return function _dissoc(s,o){if(null==o)return o;if(Xo(s)&&ca(o))return i_(s,1,o);var i={};for(var a in o)i[a]=o[a];return delete i[s],i}(s[0],o);default:var i=s[0],a=Array.prototype.slice.call(s,1);return null==o[i]?function _shallowCloneObject(s,o){if(Xo(s)&&ca(o))return[].concat(o);var i={};for(var a in o)i[a]=o[a];return i}(i,o):c_(i,dissocPath(a,o[i]),o)}}));const u_=l_;const p_=class json_schema_JSONSchemaVisitor extends Ud{constructor(s){super(s),this.element=new t_}get defaultDialectIdentifier(){return\"http://json-schema.org/draft-06/schema#\"}BooleanElement(s){const o=this.enter(s);return this.element.classes.push(\"boolean-json-schema\"),o}handleSchemaIdentifier(s,o=\"$id\"){return super.handleSchemaIdentifier(s,o)}};const h_=class json_schema_ItemsVisitor_ItemsVisitor extends Wd{BooleanElement(s){return this.element=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s),Uu}};const d_=class json_schema_ExamplesVisitor_ExamplesVisitor extends _d{ArrayElement(s){const o=this.enter(s);return this.element.classes.push(\"json-schema-examples\"),o}};const f_=class link_description_LinkDescriptionVisitor extends Nf{constructor(s){super(s),this.element=new r_}},m_=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],p_),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"id\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$id\"],Rf.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contains\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"items\"],h_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"propertyNames\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"const\"],Rf.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"examples\"],d_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],f_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"hrefSchema\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"schema\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionSchema\"],Rf.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"method\"]),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"encType\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionEncType\"],Rf.visitors.value))(Rf),g_={JSONSchemaDraft6Element:[\"content\"],JSONReferenceElement:[\"content\"],MediaElement:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},y_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof t_||s(a)&&o(\"JSONSchemaDraft6\",a)&&i(\"object\",a))),v_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof r_||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),b_={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchemaDraft6\",t_),o.register(\"jSONReference\",Fh),o.register(\"media\",Jh),o.register(\"linkDescription\",r_),o}},S_=b_,apidom_ns_json_schema_draft_6_src_refractor_toolbox=()=>{const s=createNamespace(S_);return{predicates:{...le,isStringElement:Pu},namespace:s}},apidom_ns_json_schema_draft_6_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=m_}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_draft_6_src_refractor_toolbox,visitorOptions:{keyMap:g_,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_draft_6_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_draft_6_src_refractor_refract(o,{specPath:s,...i});t_.refract=apidom_ns_json_schema_draft_6_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),r_.refract=apidom_ns_json_schema_draft_6_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const E_=class elements_JSONSchema_JSONSchema extends t_{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchemaDraft7\"}get $comment(){return this.get(\"$comment\")}set $comment(s){this.set(\"$comment\",s)}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get if(){return this.get(\"if\")}set if(s){this.set(\"if\",s)}get then(){return this.get(\"then\")}set then(s){this.set(\"then\",s)}get else(){return this.get(\"else\")}set else(s){this.set(\"else\",s)}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get contentEncoding(){return this.get(\"contentEncoding\")}set contentEncoding(s){this.set(\"contentEncoding\",s)}get contentMediaType(){return this.get(\"contentMediaType\")}set contentMediaType(s){this.set(\"contentMediaType\",s)}get media(){throw new Dh('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as \"contentMediaType\" / \"contentEncoding\"')}set media(s){throw new Dh('media keyword from Hyper-Schema vocabulary has been moved to validation vocabulary as \"contentMediaType\" / \"contentEncoding\"')}get writeOnly(){return this.get(\"writeOnly\")}set writeOnly(s){this.set(\"writeOnly\",s)}};const w_=class elements_LinkDescription_LinkDescription extends r_{get anchor(){return this.get(\"anchor\")}set anchor(s){this.set(\"anchor\",s)}get anchorPointer(){return this.get(\"anchorPointer\")}set anchorPointer(s){this.set(\"anchorPointer\",s)}get templatePointers(){return this.get(\"templatePointers\")}set templatePointers(s){this.set(\"templatePointers\",s)}get templateRequired(){return this.get(\"templateRequired\")}set templateRequired(s){this.set(\"templateRequired\",s)}get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get mediaType(){throw new Dh(\"mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.\")}set mediaType(s){throw new Dh(\"mediaType keyword from Hyper-Schema vocabulary has been renamed to targetMediaType.\")}get targetMediaType(){return this.get(\"targetMediaType\")}set targetMediaType(s){this.set(\"targetMediaType\",s)}get targetHints(){return this.get(\"targetHints\")}set targetHints(s){this.set(\"targetHints\",s)}get description(){return this.get(\"description\")}set description(s){this.set(\"description\",s)}get $comment(){return this.get(\"$comment\")}set $comment(s){this.set(\"$comment\",s)}get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get headerSchema(){return this.get(\"headerSchema\")}set headerSchema(s){this.set(\"headerSchema\",s)}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}get submissionEncType(){throw new Dh(\"submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.\")}set submissionEncType(s){throw new Dh(\"submissionEncType keyword from Hyper-Schema vocabulary has been renamed to submissionMediaType.\")}get submissionMediaType(){return this.get(\"submissionMediaType\")}set submissionMediaType(s){this.set(\"submissionMediaType\",s)}};const x_=class visitors_json_schema_JSONSchemaVisitor extends p_{constructor(s){super(s),this.element=new E_}get defaultDialectIdentifier(){return\"http://json-schema.org/draft-07/schema#\"}};const k_=class json_schema_link_description_LinkDescriptionVisitor extends f_{constructor(s){super(s),this.element=new w_}},O_=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],x_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$comment\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"if\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"then\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"else\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"media\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentEncoding\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentMediaType\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"writeOnly\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],k_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"anchor\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"anchorPointer\"],m_.visitors.value),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"mediaType\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetMediaType\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetHints\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"description\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"$comment\"],m_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"headerSchema\"],m_.visitors.JSONSchemaOrJSONReferenceVisitor),u_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionEncType\"]),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionMediaType\"],m_.visitors.value))(m_),C_={JSONSchemaDraft7Element:[\"content\"],JSONReferenceElement:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},A_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof E_||s(a)&&o(\"JSONSchemaDraft7\",a)&&i(\"object\",a))),j_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof w_||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),P_={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchemaDraft7\",E_),o.register(\"jSONReference\",Fh),o.register(\"linkDescription\",w_),o}},I_=P_,apidom_ns_json_schema_draft_7_src_refractor_toolbox=()=>{const s=createNamespace(I_);return{predicates:{...pe,isStringElement:Pu},namespace:s}},apidom_ns_json_schema_draft_7_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=O_}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_draft_7_src_refractor_toolbox,visitorOptions:{keyMap:C_,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_draft_7_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_draft_7_src_refractor_refract(o,{specPath:s,...i});E_.refract=apidom_ns_json_schema_draft_7_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),w_.refract=apidom_ns_json_schema_draft_7_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const T_=class src_elements_JSONSchema_JSONSchema extends E_{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchema201909\"}get $vocabulary(){return this.get(\"$vocabulary\")}set $vocabulary(s){this.set(\"$vocabulary\",s)}get $anchor(){return this.get(\"$anchor\")}set $anchor(s){this.set(\"$anchor\",s)}get $recursiveAnchor(){return this.get(\"$recursiveAnchor\")}set $recursiveAnchor(s){this.set(\"$recursiveAnchor\",s)}get $recursiveRef(){return this.get(\"$recursiveRef\")}set $recursiveRef(s){this.set(\"$recursiveRef\",s)}get $ref(){return this.get(\"$ref\")}set $ref(s){this.set(\"$ref\",s)}get $defs(){return this.get(\"$defs\")}set $defs(s){this.set(\"$defs\",s)}get definitions(){throw new Dh(\"definitions keyword from Validation vocabulary has been renamed to $defs.\")}set definitions(s){throw new Dh(\"definitions keyword from Validation vocabulary has been renamed to $defs.\")}get not(){return this.get(\"not\")}set not(s){this.set(\"not\",s)}get if(){return this.get(\"if\")}set if(s){this.set(\"if\",s)}get then(){return this.get(\"then\")}set then(s){this.set(\"then\",s)}get else(){return this.get(\"else\")}set else(s){this.set(\"else\",s)}get dependentSchemas(){return this.get(\"dependentSchemas\")}set dependentSchemas(s){this.set(\"dependentSchemas\",s)}get dependencies(){throw new Dh(\"dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.\")}set dependencies(s){throw new Dh(\"dependencies keyword from Validation vocabulary has been renamed to dependentSchemas.\")}get items(){return this.get(\"items\")}set items(s){this.set(\"items\",s)}get containsProp(){return this.get(\"contains\")}set containsProp(s){this.set(\"contains\",s)}get additionalProperties(){return this.get(\"additionalProperties\")}set additionalProperties(s){this.set(\"additionalProperties\",s)}get additionalItems(){return this.get(\"additionalItems\")}set additionalItems(s){this.set(\"additionalItems\",s)}get propertyNames(){return this.get(\"propertyNames\")}set propertyNames(s){this.set(\"propertyNames\",s)}get unevaluatedItems(){return this.get(\"unevaluatedItems\")}set unevaluatedItems(s){this.set(\"unevaluatedItems\",s)}get unevaluatedProperties(){return this.get(\"unevaluatedProperties\")}set unevaluatedProperties(s){this.set(\"unevaluatedProperties\",s)}get maxContains(){return this.get(\"maxContains\")}set maxContains(s){this.set(\"maxContains\",s)}get minContains(){return this.get(\"minContains\")}set minContains(s){this.set(\"minContains\",s)}get dependentRequired(){return this.get(\"dependentRequired\")}set dependentRequired(s){this.set(\"dependentRequired\",s)}get deprecated(){return this.get(\"deprecated\")}set deprecated(s){this.set(\"deprecated\",s)}get contentSchema(){return this.get(\"contentSchema\")}set contentSchema(s){this.set(\"contentSchema\",s)}};const N_=class src_elements_LinkDescription_LinkDescription extends w_{get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get headerSchema(){return this.get(\"headerSchema\")}set headerSchema(s){this.set(\"headerSchema\",s)}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}};const M_=class refractor_visitors_json_schema_JSONSchemaVisitor extends x_{constructor(s){super(s),this.element=new T_}get defaultDialectIdentifier(){return\"https://json-schema.org/draft/2019-09/schema\"}ObjectElement(s){this.handleDialectIdentifier(s),this.handleSchemaIdentifier(s),this.parent=this.element;const o=Dd.prototype.ObjectElement.call(this,s);return Pu(this.element.$ref)&&(this.element.classes.push(\"reference-element\"),this.element.setMetaProperty(\"referenced-element\",\"schema\")),o}};const R_=class $vocabularyVisitor extends _d{ObjectElement(s){const o=super.enter(s);return this.element.classes.push(\"json-schema-$vocabulary\"),o}};const D_=class $refVisitor extends _d{StringElement(s){const o=super.enter(s);return this.element.classes.push(\"reference-value\"),o}};class $defsVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-$defs\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const L_=$defsVisitor;class json_schema_AllOfVisitor_AllOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-allOf\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const F_=json_schema_AllOfVisitor_AllOfVisitor;class json_schema_AnyOfVisitor_AnyOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-anyOf\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const B_=json_schema_AnyOfVisitor_AnyOfVisitor;class json_schema_OneOfVisitor_OneOfVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-oneOf\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const $_=json_schema_OneOfVisitor_OneOfVisitor;class DependentSchemasVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-dependentSchemas\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const q_=DependentSchemasVisitor;class visitors_json_schema_ItemsVisitor_ItemsVisitor extends(Mixin(Rd,Ld,_d)){ObjectElement(s){return this.element=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s),Uu}ArrayElement(s){return this.element=new Su.wE,this.element.classes.push(\"json-schema-items\"),s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}BooleanElement(s){return this.element=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s),Uu}}const V_=visitors_json_schema_ItemsVisitor_ItemsVisitor;class json_schema_PropertiesVisitor_PropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-properties\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const U_=json_schema_PropertiesVisitor_PropertiesVisitor;class PatternPropertiesVisitor_PatternPropertiesVisitor extends(Mixin(Kd,Ld,_d)){constructor(s){super(s),this.element=new Su.Sh,this.element.classes.push(\"json-schema-patternProperties\"),this.specPath=fc([\"document\",\"objects\",\"JSONSchema\"])}}const z_=PatternPropertiesVisitor_PatternPropertiesVisitor;const W_=class DependentRequiredVisitor extends _d{ObjectElement(s){const o=super.enter(s);return this.element.classes.push(\"json-schema-dependentRequired\"),o}};const J_=class visitors_json_schema_link_description_LinkDescriptionVisitor extends k_{constructor(s){super(s),this.element=new N_}},H_=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$vocabulary\"],R_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$anchor\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveAnchor\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveRef\"],O_.visitors.value),u_([\"visitors\",\"document\",\"objects\",\"JSONReference\",\"$visitor\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$ref\"],D_),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"definitions\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$defs\"],L_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"allOf\"],F_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"anyOf\"],B_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"oneOf\"],$_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"not\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"if\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"then\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"else\"],M_),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"dependencies\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"dependentSchemas\"],q_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"items\"],V_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contains\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"properties\"],U_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"patternProperties\"],z_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalProperties\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalItems\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"propertyNames\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedItems\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedProperties\"],M_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"maxContains\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"minContains\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"dependentRequired\"],W_),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"deprecated\"],O_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],J_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"hrefSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"headerSchema\"],M_),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionSchema\"],M_))(O_),K_={JSONSchema201909Element:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},G_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof T_||s(a)&&o(\"JSONSchema201909\",a)&&i(\"object\",a))),Y_=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof N_||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),X_={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchema201909\",T_),o.register(\"linkDescription\",N_),o}},Q_=X_,apidom_ns_json_schema_2019_09_src_refractor_toolbox=()=>{const s=createNamespace(Q_);return{predicates:{...de,isStringElement:Pu},namespace:s}},apidom_ns_json_schema_2019_09_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=H_}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_2019_09_src_refractor_toolbox,visitorOptions:{keyMap:K_,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_2019_09_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_2019_09_src_refractor_refract(o,{specPath:s,...i});T_.refract=apidom_ns_json_schema_2019_09_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),N_.refract=apidom_ns_json_schema_2019_09_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const Z_=class apidom_ns_json_schema_2020_12_src_elements_JSONSchema_JSONSchema extends T_{constructor(s,o,i){super(s,o,i),this.element=\"JSONSchema202012\"}get $dynamicAnchor(){return this.get(\"$dynamicAnchor\")}set $dynamicAnchor(s){this.set(\"$dynamicAnchor\",s)}get $recursiveAnchor(){throw new Dh(\"$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.\")}set $recursiveAnchor(s){throw new Dh(\"$recursiveAnchor keyword from Core vocabulary has been renamed to $dynamicAnchor.\")}get $dynamicRef(){return this.get(\"$dynamicRef\")}set $dynamicRef(s){this.set(\"$dynamicRef\",s)}get $recursiveRef(){throw new Dh(\"$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.\")}set $recursiveRef(s){throw new Dh(\"$recursiveRef keyword from Core vocabulary has been renamed to $dynamicRef.\")}get prefixItems(){return this.get(\"prefixItems\")}set prefixItems(s){this.set(\"prefixItems\",s)}};const eS=class apidom_ns_json_schema_2020_12_src_elements_LinkDescription_LinkDescription extends N_{get targetSchema(){return this.get(\"targetSchema\")}set targetSchema(s){this.set(\"targetSchema\",s)}get hrefSchema(){return this.get(\"hrefSchema\")}set hrefSchema(s){this.set(\"hrefSchema\",s)}get headerSchema(){return this.get(\"headerSchema\")}set headerSchema(s){this.set(\"headerSchema\",s)}get submissionSchema(){return this.get(\"submissionSchema\")}set submissionSchema(s){this.set(\"submissionSchema\",s)}};const tS=class src_refractor_visitors_json_schema_JSONSchemaVisitor extends M_{constructor(s){super(s),this.element=new Z_}get defaultDialectIdentifier(){return\"https://json-schema.org/draft/2020-12/schema\"}};class PrefixItemsVisitor extends(Mixin(Rd,Ld,_d)){constructor(s){super(s),this.element=new Su.wE,this.element.classes.push(\"json-schema-prefixItems\")}ArrayElement(s){return s.forEach((s=>{const o=this.toRefractedElement([\"document\",\"objects\",\"JSONSchema\"],s);this.element.push(o)})),this.copyMetaAndAttributes(s,this.element),Uu}}const rS=PrefixItemsVisitor;const nS=class refractor_visitors_json_schema_link_description_LinkDescriptionVisitor extends J_{constructor(s){super(s),this.element=new eS}},sS=pipe(s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],tS),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveAnchor\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$dynamicAnchor\"],H_.visitors.value),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$recursiveRef\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"$dynamicRef\"],H_.visitors.value),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"not\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"if\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"then\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"else\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"prefixItems\"],rS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"items\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contains\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalProperties\"],tS),u_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"additionalItems\"]),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"propertyNames\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedItems\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"unevaluatedProperties\"],tS),s_([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"fixedFields\",\"contentSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"],nS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"targetSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"hrefSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"headerSchema\"],tS),s_([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"fixedFields\",\"submissionSchema\"],tS))(H_),oS={JSONSchema202012Element:[\"content\"],LinkDescriptionElement:[\"content\"],...Ku},iS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Z_||s(a)&&o(\"JSONSchema202012\",a)&&i(\"object\",a))),aS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof eS||s(a)&&o(\"linkDescription\",a)&&i(\"object\",a))),cS={namespace:s=>{const{base:o}=s;return o.register(\"jSONSchema202012\",Z_),o.register(\"linkDescription\",eS),o}},lS=cS,apidom_ns_json_schema_2020_12_src_refractor_toolbox=()=>{const s=createNamespace(lS);return{predicates:{...fe,isStringElement:Pu},namespace:s}},apidom_ns_json_schema_2020_12_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"],plugins:i=[],specificationObj:a=sS}={})=>{const u=(0,Su.e)(s),_=dereference(a),w=new(tp(o,_))({specObj:_});return visitor_visit(u,w),dispatchPluginsSync(w.element,i,{toolboxCreator:apidom_ns_json_schema_2020_12_src_refractor_toolbox,visitorOptions:{keyMap:oS,nodeTypeGetter:traversal_visitor_getNodeType}})},apidom_ns_json_schema_2020_12_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_json_schema_2020_12_src_refractor_refract(o,{specPath:s,...i});Z_.refract=apidom_ns_json_schema_2020_12_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"JSONSchema\",\"$visitor\"]),eS.refract=apidom_ns_json_schema_2020_12_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"LinkDescription\",\"$visitor\"]);const uS=class elements_Schema_Schema extends Z_{constructor(s,o,i){super(s,o,i),this.element=\"schema\"}get discriminator(){return this.get(\"discriminator\")}set discriminator(s){this.set(\"discriminator\",s)}get xml(){return this.get(\"xml\")}set xml(s){this.set(\"xml\",s)}get externalDocs(){return this.get(\"externalDocs\")}set externalDocs(s){this.set(\"externalDocs\",s)}get example(){return this.get(\"example\")}set example(s){this.set(\"example\",s)}};const pS=class SecurityRequirement_SecurityRequirement extends Jf{};const hS=class SecurityScheme_SecurityScheme extends Hf{};const dS=class Server_Server extends Gf{};const fS=class ServerVariable_ServerVariable extends Xf{};const mS=class Tag_Tag extends Qf{};const gS=class Xml_Xml extends em{};class OpenApi3_1Visitor extends(Mixin(um,rm)){constructor(s){super(s),this.element=new Pb,this.specPath=fc([\"document\",\"objects\",\"OpenApi\"]),this.canSupportSpecificationExtensions=!0,this.openApiSemanticElement=this.element}ObjectElement(s){return this.openApiGenericElement=s,um.prototype.ObjectElement.call(this,s)}}const yS=OpenApi3_1Visitor,vS=Wv.visitors.document.objects.Info.$visitor;const bS=class info_InfoVisitor extends vS{constructor(s){super(s),this.element=new pb}},_S=Wv.visitors.document.objects.Contact.$visitor;const SS=class contact_ContactVisitor extends _S{constructor(s){super(s),this.element=new Xv}},ES=Wv.visitors.document.objects.License.$visitor;const wS=class license_LicenseVisitor extends ES{constructor(s){super(s),this.element=new yb}},xS=Wv.visitors.document.objects.Link.$visitor;const kS=class link_LinkVisitor extends xS{constructor(s){super(s),this.element=new _b}};class JsonSchemaDialectVisitor extends(Mixin(nm,rm)){StringElement(s){const o=new mb(serializers_value(s));return this.copyMetaAndAttributes(s,o),this.element=o,Uu}}const OS=JsonSchemaDialectVisitor,CS=Wv.visitors.document.objects.Server.$visitor;const AS=class server_ServerVisitor extends CS{constructor(s){super(s),this.element=new dS}},jS=Wv.visitors.document.objects.ServerVariable.$visitor;const PS=class server_variable_ServerVariableVisitor extends jS{constructor(s){super(s),this.element=new fS}},IS=Wv.visitors.document.objects.MediaType.$visitor;const TS=class media_type_MediaTypeVisitor extends IS{constructor(s){super(s),this.element=new Sb}},NS=Wv.visitors.document.objects.SecurityRequirement.$visitor;const MS=class security_requirement_SecurityRequirementVisitor extends NS{constructor(s){super(s),this.element=new pS}},RS=Wv.visitors.document.objects.Components.$visitor;const DS=class components_ComponentsVisitor extends RS{constructor(s){super(s),this.element=new Yv}},LS=Wv.visitors.document.objects.Tag.$visitor;const FS=class tag_TagVisitor extends LS{constructor(s){super(s),this.element=new mS}},BS=Wv.visitors.document.objects.Reference.$visitor;const $S=class reference_ReferenceVisitor extends BS{constructor(s){super(s),this.element=new qb}},qS=Wv.visitors.document.objects.Parameter.$visitor;const VS=class parameter_ParameterVisitor extends qS{constructor(s){super(s),this.element=new Mb}},US=Wv.visitors.document.objects.Header.$visitor;const zS=class header_HeaderVisitor extends US{constructor(s){super(s),this.element=new nb}},WS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Gv||s(a)&&o(\"callback\",a)&&i(\"object\",a))),JS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Yv||s(a)&&o(\"components\",a)&&i(\"object\",a))),HS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Xv||s(a)&&o(\"contact\",a)&&i(\"object\",a))),KS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof eb||s(a)&&o(\"example\",a)&&i(\"object\",a))),GS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof tb||s(a)&&o(\"externalDocumentation\",a)&&i(\"object\",a))),YS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof nb||s(a)&&o(\"header\",a)&&i(\"object\",a))),XS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof pb||s(a)&&o(\"info\",a)&&i(\"object\",a))),QS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof mb||s(a)&&o(\"jsonSchemaDialect\",a)&&i(\"string\",a))),ZS=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof yb||s(a)&&o(\"license\",a)&&i(\"object\",a))),eE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof _b||s(a)&&o(\"link\",a)&&i(\"object\",a))),tE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ab||s(a)&&o(\"openapi\",a)&&i(\"string\",a))),rE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i,hasClass:a})=>u=>u instanceof Pb||s(u)&&o(\"openApi3_1\",u)&&i(\"object\",u)&&a(\"api\",u))),nE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Ib||s(a)&&o(\"operation\",a)&&i(\"object\",a))),sE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Mb||s(a)&&o(\"parameter\",a)&&i(\"object\",a))),oE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Rb||s(a)&&o(\"pathItem\",a)&&i(\"object\",a))),isPathItemElementExternal=s=>{if(!oE(s))return!1;if(!Pu(s.$ref))return!1;const o=serializers_value(s.$ref);return\"string\"==typeof o&&o.length>0&&!o.startsWith(\"#\")},iE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Lb||s(a)&&o(\"paths\",a)&&i(\"object\",a))),aE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof qb||s(a)&&o(\"reference\",a)&&i(\"object\",a))),isReferenceElementExternal=s=>{if(!aE(s))return!1;if(!Pu(s.$ref))return!1;const o=serializers_value(s.$ref);return\"string\"==typeof o&&o.length>0&&!o.startsWith(\"#\")},cE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof zb||s(a)&&o(\"requestBody\",a)&&i(\"object\",a))),lE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Qb||s(a)&&o(\"response\",a)&&i(\"object\",a))),uE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof e_||s(a)&&o(\"responses\",a)&&i(\"object\",a))),pE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof uS||s(a)&&o(\"schema\",a)&&i(\"object\",a))),predicates_isBooleanJsonSchemaElement=s=>Nu(s)&&s.classes.includes(\"boolean-json-schema\"),hE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof pS||s(a)&&o(\"securityRequirement\",a)&&i(\"object\",a))),dE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof hS||s(a)&&o(\"securityScheme\",a)&&i(\"object\",a))),fE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof dS||s(a)&&o(\"server\",a)&&i(\"object\",a))),mE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof fS||s(a)&&o(\"serverVariable\",a)&&i(\"object\",a))),gE=helpers((({hasBasicElementProps:s,isElementType:o,primitiveEq:i})=>a=>a instanceof Sb||s(a)&&o(\"mediaType\",a)&&i(\"object\",a)));class open_api_3_1_schema_SchemaVisitor extends(Mixin(um,Ld,rm)){constructor(s){super(s),this.element=new uS,this.specPath=fc([\"document\",\"objects\",\"Schema\"]),this.canSupportSpecificationExtensions=!0,this.jsonSchemaDefaultDialect=mb.default,this.passingOptionsNames.push(\"parent\")}ObjectElement(s){this.handleDialectIdentifier(s),this.handleSchemaIdentifier(s),this.parent=this.element;const o=um.prototype.ObjectElement.call(this,s);return Pu(this.element.$ref)&&(this.element.classes.push(\"reference-element\"),this.element.setMetaProperty(\"referenced-element\",\"schema\")),o}BooleanElement(s){return tS.prototype.BooleanElement.call(this,s)}get defaultDialectIdentifier(){let s;return s=void 0!==this.openApiSemanticElement&&QS(this.openApiSemanticElement.jsonSchemaDialect)?serializers_value(this.openApiSemanticElement.jsonSchemaDialect):void 0!==this.openApiGenericElement&&Pu(this.openApiGenericElement.get(\"jsonSchemaDialect\"))?serializers_value(this.openApiGenericElement.get(\"jsonSchemaDialect\")):serializers_value(this.jsonSchemaDefaultDialect),s}handleDialectIdentifier(s){return tS.prototype.handleDialectIdentifier.call(this,s)}handleSchemaIdentifier(s){return tS.prototype.handleSchemaIdentifier.call(this,s)}}const yE=open_api_3_1_schema_SchemaVisitor;const vE=class $defsVisitor_$defsVisitor extends L_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const bE=class schema_AllOfVisitor_AllOfVisitor extends F_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const _E=class schema_AnyOfVisitor_AnyOfVisitor extends B_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const SE=class schema_OneOfVisitor_OneOfVisitor extends $_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const EE=class DependentSchemasVisitor_DependentSchemasVisitor extends q_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const wE=class PrefixItemsVisitor_PrefixItemsVisitor extends rS{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const xE=class schema_PropertiesVisitor_PropertiesVisitor extends U_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}};const kE=class schema_PatternPropertiesVisitor_PatternPropertiesVisitor extends z_{constructor(s){super(s),this.passingOptionsNames.push(\"parent\")}},OE=Wv.visitors.document.objects.Discriminator.$visitor;const CE=class distriminator_DiscriminatorVisitor extends OE{constructor(s){super(s),this.element=new Qv,this.canSupportSpecificationExtensions=!0}},AE=Wv.visitors.document.objects.XML.$visitor;const jE=class xml_XmlVisitor extends AE{constructor(s){super(s),this.element=new gS}};class SchemasVisitor_SchemasVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new Ay,this.specPath=fc([\"document\",\"objects\",\"Schema\"])}}const PE=SchemasVisitor_SchemasVisitor;class ComponentsPathItems extends Su.Sh{static primaryClass=\"components-path-items\";constructor(s,o,i){super(s,o,i),this.classes.push(ComponentsPathItems.primaryClass)}}const IE=ComponentsPathItems;class PathItemsVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new IE,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(aE).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),o}}const TE=PathItemsVisitor,NE=Wv.visitors.document.objects.Example.$visitor;const ME=class example_ExampleVisitor extends NE{constructor(s){super(s),this.element=new eb}},RE=Wv.visitors.document.objects.ExternalDocumentation.$visitor;const DE=class external_documentation_ExternalDocumentationVisitor extends RE{constructor(s){super(s),this.element=new tb}},LE=Wv.visitors.document.objects.Encoding.$visitor;const FE=class open_api_3_1_encoding_EncodingVisitor extends LE{constructor(s){super(s),this.element=new Zv}},BE=Wv.visitors.document.objects.Paths.$visitor;const $E=class paths_PathsVisitor extends BE{constructor(s){super(s),this.element=new Lb}},qE=Wv.visitors.document.objects.RequestBody.$visitor;const VE=class request_body_RequestBodyVisitor extends qE{constructor(s){super(s),this.element=new zb}},UE=Wv.visitors.document.objects.Callback.$visitor;const zE=class callback_CallbackVisitor extends UE{constructor(s){super(s),this.element=new Gv,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const o=UE.prototype.ObjectElement.call(this,s);return this.element.filter(aE).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),o}},WE=Wv.visitors.document.objects.Response.$visitor;const JE=class response_ResponseVisitor extends WE{constructor(s){super(s),this.element=new Qb}},HE=Wv.visitors.document.objects.Responses.$visitor;const KE=class open_api_3_1_responses_ResponsesVisitor extends HE{constructor(s){super(s),this.element=new e_}},GE=Wv.visitors.document.objects.Operation.$visitor;const YE=class operation_OperationVisitor extends GE{constructor(s){super(s),this.element=new Ib}},XE=Wv.visitors.document.objects.PathItem.$visitor;const QE=class path_item_PathItemVisitor extends XE{constructor(s){super(s),this.element=new Rb}},ZE=Wv.visitors.document.objects.SecurityScheme.$visitor;const ew=class security_scheme_SecuritySchemeVisitor extends ZE{constructor(s){super(s),this.element=new hS}},tw=Wv.visitors.document.objects.OAuthFlows.$visitor;const rw=class oauth_flows_OAuthFlowsVisitor extends tw{constructor(s){super(s),this.element=new Ob}},nw=Wv.visitors.document.objects.OAuthFlow.$visitor;const sw=class oauth_flow_OAuthFlowVisitor extends nw{constructor(s){super(s),this.element=new wb}};class Webhooks extends Su.Sh{static primaryClass=\"webhooks\";constructor(s,o,i){super(s,o,i),this.classes.push(Webhooks.primaryClass)}}const ow=Webhooks;class WebhooksVisitor extends(Mixin(Em,rm)){constructor(s){super(s),this.element=new ow,this.specPath=s=>isReferenceLikeElement(s)?[\"document\",\"objects\",\"Reference\"]:[\"document\",\"objects\",\"PathItem\"]}ObjectElement(s){const o=Em.prototype.ObjectElement.call(this,s);return this.element.filter(aE).forEach((s=>{s.setMetaProperty(\"referenced-element\",\"pathItem\")})),this.element.filter(oE).forEach(((s,o)=>{s.setMetaProperty(\"webhook-name\",serializers_value(o))})),o}}const iw=WebhooksVisitor,{JSONSchema:aw,LinkDescription:cw}=sS.visitors.document.objects,lw={visitors:{value:Wv.visitors.value,document:{objects:{OpenApi:{$visitor:yS,fixedFields:{openapi:Wv.visitors.document.objects.OpenApi.fixedFields.openapi,info:{$ref:\"#/visitors/document/objects/Info\"},jsonSchemaDialect:OS,servers:Wv.visitors.document.objects.OpenApi.fixedFields.servers,paths:{$ref:\"#/visitors/document/objects/Paths\"},webhooks:iw,components:{$ref:\"#/visitors/document/objects/Components\"},security:Wv.visitors.document.objects.OpenApi.fixedFields.security,tags:Wv.visitors.document.objects.OpenApi.fixedFields.tags,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Info:{$visitor:bS,fixedFields:{title:Wv.visitors.document.objects.Info.fixedFields.title,description:Wv.visitors.document.objects.Info.fixedFields.description,summary:{$ref:\"#/visitors/value\"},termsOfService:Wv.visitors.document.objects.Info.fixedFields.termsOfService,contact:{$ref:\"#/visitors/document/objects/Contact\"},license:{$ref:\"#/visitors/document/objects/License\"},version:Wv.visitors.document.objects.Info.fixedFields.version}},Contact:{$visitor:SS,fixedFields:{name:Wv.visitors.document.objects.Contact.fixedFields.name,url:Wv.visitors.document.objects.Contact.fixedFields.url,email:Wv.visitors.document.objects.Contact.fixedFields.email}},License:{$visitor:wS,fixedFields:{name:Wv.visitors.document.objects.License.fixedFields.name,identifier:{$ref:\"#/visitors/value\"},url:Wv.visitors.document.objects.License.fixedFields.url}},Server:{$visitor:AS,fixedFields:{url:Wv.visitors.document.objects.Server.fixedFields.url,description:Wv.visitors.document.objects.Server.fixedFields.description,variables:Wv.visitors.document.objects.Server.fixedFields.variables}},ServerVariable:{$visitor:PS,fixedFields:{enum:Wv.visitors.document.objects.ServerVariable.fixedFields.enum,default:Wv.visitors.document.objects.ServerVariable.fixedFields.default,description:Wv.visitors.document.objects.ServerVariable.fixedFields.description}},Components:{$visitor:DS,fixedFields:{schemas:PE,responses:Wv.visitors.document.objects.Components.fixedFields.responses,parameters:Wv.visitors.document.objects.Components.fixedFields.parameters,examples:Wv.visitors.document.objects.Components.fixedFields.examples,requestBodies:Wv.visitors.document.objects.Components.fixedFields.requestBodies,headers:Wv.visitors.document.objects.Components.fixedFields.headers,securitySchemes:Wv.visitors.document.objects.Components.fixedFields.securitySchemes,links:Wv.visitors.document.objects.Components.fixedFields.links,callbacks:Wv.visitors.document.objects.Components.fixedFields.callbacks,pathItems:TE}},Paths:{$visitor:$E},PathItem:{$visitor:QE,fixedFields:{$ref:Wv.visitors.document.objects.PathItem.fixedFields.$ref,summary:Wv.visitors.document.objects.PathItem.fixedFields.summary,description:Wv.visitors.document.objects.PathItem.fixedFields.description,get:{$ref:\"#/visitors/document/objects/Operation\"},put:{$ref:\"#/visitors/document/objects/Operation\"},post:{$ref:\"#/visitors/document/objects/Operation\"},delete:{$ref:\"#/visitors/document/objects/Operation\"},options:{$ref:\"#/visitors/document/objects/Operation\"},head:{$ref:\"#/visitors/document/objects/Operation\"},patch:{$ref:\"#/visitors/document/objects/Operation\"},trace:{$ref:\"#/visitors/document/objects/Operation\"},servers:Wv.visitors.document.objects.PathItem.fixedFields.servers,parameters:Wv.visitors.document.objects.PathItem.fixedFields.parameters}},Operation:{$visitor:YE,fixedFields:{tags:Wv.visitors.document.objects.Operation.fixedFields.tags,summary:Wv.visitors.document.objects.Operation.fixedFields.summary,description:Wv.visitors.document.objects.Operation.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},operationId:Wv.visitors.document.objects.Operation.fixedFields.operationId,parameters:Wv.visitors.document.objects.Operation.fixedFields.parameters,requestBody:Wv.visitors.document.objects.Operation.fixedFields.requestBody,responses:{$ref:\"#/visitors/document/objects/Responses\"},callbacks:Wv.visitors.document.objects.Operation.fixedFields.callbacks,deprecated:Wv.visitors.document.objects.Operation.fixedFields.deprecated,security:Wv.visitors.document.objects.Operation.fixedFields.security,servers:Wv.visitors.document.objects.Operation.fixedFields.servers}},ExternalDocumentation:{$visitor:DE,fixedFields:{description:Wv.visitors.document.objects.ExternalDocumentation.fixedFields.description,url:Wv.visitors.document.objects.ExternalDocumentation.fixedFields.url}},Parameter:{$visitor:VS,fixedFields:{name:Wv.visitors.document.objects.Parameter.fixedFields.name,in:Wv.visitors.document.objects.Parameter.fixedFields.in,description:Wv.visitors.document.objects.Parameter.fixedFields.description,required:Wv.visitors.document.objects.Parameter.fixedFields.required,deprecated:Wv.visitors.document.objects.Parameter.fixedFields.deprecated,allowEmptyValue:Wv.visitors.document.objects.Parameter.fixedFields.allowEmptyValue,style:Wv.visitors.document.objects.Parameter.fixedFields.style,explode:Wv.visitors.document.objects.Parameter.fixedFields.explode,allowReserved:Wv.visitors.document.objects.Parameter.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:Wv.visitors.document.objects.Parameter.fixedFields.example,examples:Wv.visitors.document.objects.Parameter.fixedFields.examples,content:Wv.visitors.document.objects.Parameter.fixedFields.content}},RequestBody:{$visitor:VE,fixedFields:{description:Wv.visitors.document.objects.RequestBody.fixedFields.description,content:Wv.visitors.document.objects.RequestBody.fixedFields.content,required:Wv.visitors.document.objects.RequestBody.fixedFields.required}},MediaType:{$visitor:TS,fixedFields:{schema:{$ref:\"#/visitors/document/objects/Schema\"},example:Wv.visitors.document.objects.MediaType.fixedFields.example,examples:Wv.visitors.document.objects.MediaType.fixedFields.examples,encoding:Wv.visitors.document.objects.MediaType.fixedFields.encoding}},Encoding:{$visitor:FE,fixedFields:{contentType:Wv.visitors.document.objects.Encoding.fixedFields.contentType,headers:Wv.visitors.document.objects.Encoding.fixedFields.headers,style:Wv.visitors.document.objects.Encoding.fixedFields.style,explode:Wv.visitors.document.objects.Encoding.fixedFields.explode,allowReserved:Wv.visitors.document.objects.Encoding.fixedFields.allowReserved}},Responses:{$visitor:KE,fixedFields:{default:Wv.visitors.document.objects.Responses.fixedFields.default}},Response:{$visitor:JE,fixedFields:{description:Wv.visitors.document.objects.Response.fixedFields.description,headers:Wv.visitors.document.objects.Response.fixedFields.headers,content:Wv.visitors.document.objects.Response.fixedFields.content,links:Wv.visitors.document.objects.Response.fixedFields.links}},Callback:{$visitor:zE},Example:{$visitor:ME,fixedFields:{summary:Wv.visitors.document.objects.Example.fixedFields.summary,description:Wv.visitors.document.objects.Example.fixedFields.description,value:Wv.visitors.document.objects.Example.fixedFields.value,externalValue:Wv.visitors.document.objects.Example.fixedFields.externalValue}},Link:{$visitor:kS,fixedFields:{operationRef:Wv.visitors.document.objects.Link.fixedFields.operationRef,operationId:Wv.visitors.document.objects.Link.fixedFields.operationId,parameters:Wv.visitors.document.objects.Link.fixedFields.parameters,requestBody:Wv.visitors.document.objects.Link.fixedFields.requestBody,description:Wv.visitors.document.objects.Link.fixedFields.description,server:{$ref:\"#/visitors/document/objects/Server\"}}},Header:{$visitor:zS,fixedFields:{description:Wv.visitors.document.objects.Header.fixedFields.description,required:Wv.visitors.document.objects.Header.fixedFields.required,deprecated:Wv.visitors.document.objects.Header.fixedFields.deprecated,allowEmptyValue:Wv.visitors.document.objects.Header.fixedFields.allowEmptyValue,style:Wv.visitors.document.objects.Header.fixedFields.style,explode:Wv.visitors.document.objects.Header.fixedFields.explode,allowReserved:Wv.visitors.document.objects.Header.fixedFields.allowReserved,schema:{$ref:\"#/visitors/document/objects/Schema\"},example:Wv.visitors.document.objects.Header.fixedFields.example,examples:Wv.visitors.document.objects.Header.fixedFields.examples,content:Wv.visitors.document.objects.Header.fixedFields.content}},Tag:{$visitor:FS,fixedFields:{name:Wv.visitors.document.objects.Tag.fixedFields.name,description:Wv.visitors.document.objects.Tag.fixedFields.description,externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"}}},Reference:{$visitor:$S,fixedFields:{$ref:Wv.visitors.document.objects.Reference.fixedFields.$ref,summary:{$ref:\"#/visitors/value\"},description:{$ref:\"#/visitors/value\"}}},JSONSchema:{$ref:\"#/visitors/document/objects/Schema\"},LinkDescription:{...cw},Schema:{$visitor:yE,fixedFields:{...aw.fixedFields,$defs:vE,allOf:bE,anyOf:_E,oneOf:SE,not:{$ref:\"#/visitors/document/objects/Schema\"},if:{$ref:\"#/visitors/document/objects/Schema\"},then:{$ref:\"#/visitors/document/objects/Schema\"},else:{$ref:\"#/visitors/document/objects/Schema\"},dependentSchemas:EE,prefixItems:wE,items:{$ref:\"#/visitors/document/objects/Schema\"},contains:{$ref:\"#/visitors/document/objects/Schema\"},properties:xE,patternProperties:kE,additionalProperties:{$ref:\"#/visitors/document/objects/Schema\"},propertyNames:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedItems:{$ref:\"#/visitors/document/objects/Schema\"},unevaluatedProperties:{$ref:\"#/visitors/document/objects/Schema\"},contentSchema:{$ref:\"#/visitors/document/objects/Schema\"},discriminator:{$ref:\"#/visitors/document/objects/Discriminator\"},xml:{$ref:\"#/visitors/document/objects/XML\"},externalDocs:{$ref:\"#/visitors/document/objects/ExternalDocumentation\"},example:{$ref:\"#/visitors/value\"}}},Discriminator:{$visitor:CE,fixedFields:{propertyName:Wv.visitors.document.objects.Discriminator.fixedFields.propertyName,mapping:Wv.visitors.document.objects.Discriminator.fixedFields.mapping}},XML:{$visitor:jE,fixedFields:{name:Wv.visitors.document.objects.XML.fixedFields.name,namespace:Wv.visitors.document.objects.XML.fixedFields.namespace,prefix:Wv.visitors.document.objects.XML.fixedFields.prefix,attribute:Wv.visitors.document.objects.XML.fixedFields.attribute,wrapped:Wv.visitors.document.objects.XML.fixedFields.wrapped}},SecurityScheme:{$visitor:ew,fixedFields:{type:Wv.visitors.document.objects.SecurityScheme.fixedFields.type,description:Wv.visitors.document.objects.SecurityScheme.fixedFields.description,name:Wv.visitors.document.objects.SecurityScheme.fixedFields.name,in:Wv.visitors.document.objects.SecurityScheme.fixedFields.in,scheme:Wv.visitors.document.objects.SecurityScheme.fixedFields.scheme,bearerFormat:Wv.visitors.document.objects.SecurityScheme.fixedFields.bearerFormat,flows:{$ref:\"#/visitors/document/objects/OAuthFlows\"},openIdConnectUrl:Wv.visitors.document.objects.SecurityScheme.fixedFields.openIdConnectUrl}},OAuthFlows:{$visitor:rw,fixedFields:{implicit:{$ref:\"#/visitors/document/objects/OAuthFlow\"},password:{$ref:\"#/visitors/document/objects/OAuthFlow\"},clientCredentials:{$ref:\"#/visitors/document/objects/OAuthFlow\"},authorizationCode:{$ref:\"#/visitors/document/objects/OAuthFlow\"}}},OAuthFlow:{$visitor:sw,fixedFields:{authorizationUrl:Wv.visitors.document.objects.OAuthFlow.fixedFields.authorizationUrl,tokenUrl:Wv.visitors.document.objects.OAuthFlow.fixedFields.tokenUrl,refreshUrl:Wv.visitors.document.objects.OAuthFlow.fixedFields.refreshUrl,scopes:Wv.visitors.document.objects.OAuthFlow.fixedFields.scopes}},SecurityRequirement:{$visitor:MS}},extension:{$visitor:Wv.visitors.document.extension.$visitor}}}},apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType=s=>{if(ju(s))return`${s.element.charAt(0).toUpperCase()+s.element.slice(1)}Element`},uw={CallbackElement:[\"content\"],ComponentsElement:[\"content\"],ContactElement:[\"content\"],DiscriminatorElement:[\"content\"],Encoding:[\"content\"],Example:[\"content\"],ExternalDocumentationElement:[\"content\"],HeaderElement:[\"content\"],InfoElement:[\"content\"],LicenseElement:[\"content\"],MediaTypeElement:[\"content\"],OAuthFlowElement:[\"content\"],OAuthFlowsElement:[\"content\"],OpenApi3_1Element:[\"content\"],OperationElement:[\"content\"],ParameterElement:[\"content\"],PathItemElement:[\"content\"],PathsElement:[\"content\"],ReferenceElement:[\"content\"],RequestBodyElement:[\"content\"],ResponseElement:[\"content\"],ResponsesElement:[\"content\"],SchemaElement:[\"content\"],SecurityRequirementElement:[\"content\"],SecuritySchemeElement:[\"content\"],ServerElement:[\"content\"],ServerVariableElement:[\"content\"],TagElement:[\"content\"],...Ku},pw={namespace:s=>{const{base:o}=s;return o.register(\"callback\",Gv),o.register(\"components\",Yv),o.register(\"contact\",Xv),o.register(\"discriminator\",Qv),o.register(\"encoding\",Zv),o.register(\"example\",eb),o.register(\"externalDocumentation\",tb),o.register(\"header\",nb),o.register(\"info\",pb),o.register(\"jsonSchemaDialect\",mb),o.register(\"license\",yb),o.register(\"link\",_b),o.register(\"mediaType\",Sb),o.register(\"oAuthFlow\",wb),o.register(\"oAuthFlows\",Ob),o.register(\"openapi\",Ab),o.register(\"openApi3_1\",Pb),o.register(\"operation\",Ib),o.register(\"parameter\",Mb),o.register(\"pathItem\",Rb),o.register(\"paths\",Lb),o.register(\"reference\",qb),o.register(\"requestBody\",zb),o.register(\"response\",Qb),o.register(\"responses\",e_),o.register(\"schema\",uS),o.register(\"securityRequirement\",pS),o.register(\"securityScheme\",hS),o.register(\"server\",dS),o.register(\"serverVariable\",fS),o.register(\"tag\",mS),o.register(\"xml\",gS),o}},hw=pw,ancestorLineageToJSONPointer=s=>{const o=s.reduce(((o,i,a)=>{if(Du(i)){const s=String(serializers_value(i.key));o.push(s)}else if(Ru(s[a-2])){const u=String(s[a-2].content.indexOf(i));o.push(u)}return o}),[]);return es_compile(o)},apidom_ns_openapi_3_1_src_refractor_toolbox=()=>{const s=createNamespace(hw);return{predicates:{...ye,isElement:ju,isStringElement:Pu,isArrayElement:Ru,isObjectElement:Mu,isMemberElement:Du,isServersElement:lg,includesClasses,hasElementSourceMap},ancestorLineageToJSONPointer,namespace:s}},apidom_ns_openapi_3_1_src_refractor_refract=(s,{specPath:o=[\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"],plugins:i=[]}={})=>{const a=(0,Su.e)(s),u=dereference(lw),_=new(tp(o,u))({specObj:u});return visitor_visit(a,_),dispatchPluginsSync(_.element,i,{toolboxCreator:apidom_ns_openapi_3_1_src_refractor_toolbox,visitorOptions:{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}})},apidom_ns_openapi_3_1_src_refractor_createRefractor=s=>(o,i={})=>apidom_ns_openapi_3_1_src_refractor_refract(o,{specPath:s,...i});Gv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Callback\",\"$visitor\"]),Yv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Components\",\"$visitor\"]),Xv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Contact\",\"$visitor\"]),eb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Example\",\"$visitor\"]),Qv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Discriminator\",\"$visitor\"]),Zv.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Encoding\",\"$visitor\"]),tb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ExternalDocumentation\",\"$visitor\"]),nb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Header\",\"$visitor\"]),pb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Info\",\"$visitor\"]),mb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"jsonSchemaDialect\"]),yb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"License\",\"$visitor\"]),_b.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Link\",\"$visitor\"]),Sb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"MediaType\",\"$visitor\"]),wb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlow\",\"$visitor\"]),Ob.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OAuthFlows\",\"$visitor\"]),Ab.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"fixedFields\",\"openapi\"]),Pb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"OpenApi\",\"$visitor\"]),Ib.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Operation\",\"$visitor\"]),Mb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Parameter\",\"$visitor\"]),Rb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"PathItem\",\"$visitor\"]),Lb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Paths\",\"$visitor\"]),qb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Reference\",\"$visitor\"]),zb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"RequestBody\",\"$visitor\"]),Qb.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Response\",\"$visitor\"]),e_.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Responses\",\"$visitor\"]),uS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Schema\",\"$visitor\"]),pS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityRequirement\",\"$visitor\"]),hS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"SecurityScheme\",\"$visitor\"]),dS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Server\",\"$visitor\"]),fS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"ServerVariable\",\"$visitor\"]),mS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"Tag\",\"$visitor\"]),gS.refract=apidom_ns_openapi_3_1_src_refractor_createRefractor([\"visitors\",\"document\",\"objects\",\"XML\",\"$visitor\"]);const dw=class NotImplementedError extends Dh{};const fw=class MediaTypes extends Array{unknownMediaType=\"application/octet-stream\";filterByFormat(){throw new dw(\"filterByFormat method in MediaTypes class is not yet implemented.\")}findBy(){throw new dw(\"findBy method in MediaTypes class is not yet implemented.\")}latest(){throw new dw(\"latest method in MediaTypes class is not yet implemented.\")}};class OpenAPIMediaTypes extends fw{filterByFormat(s=\"generic\"){const o=\"generic\"===s?\"openapi;version\":s;return this.filter((s=>s.includes(o)))}findBy(s=\"3.1.0\",o=\"generic\"){const i=\"generic\"===o?`vnd.oai.openapi;version=${s}`:`vnd.oai.openapi+${o};version=${s}`;return this.find((s=>s.includes(i)))||this.unknownMediaType}latest(s=\"generic\"){return Ba(this.filterByFormat(s))}}const mw=new OpenAPIMediaTypes(\"application/vnd.oai.openapi;version=3.1.0\",\"application/vnd.oai.openapi+json;version=3.1.0\",\"application/vnd.oai.openapi+yaml;version=3.1.0\");const gw=class src_Reference_Reference{uri;depth;value;refSet;errors;constructor({uri:s,depth:o=0,refSet:i,value:a}){this.uri=s,this.value=a,this.depth=o,this.refSet=i,this.errors=[]}};const yw=class ReferenceSet{rootRef;refs;circular;constructor({refs:s=[],circular:o=!1}={}){this.refs=[],this.circular=o,s.forEach(this.add.bind(this))}get size(){return this.refs.length}add(s){return this.has(s)||(this.refs.push(s),this.rootRef=void 0===this.rootRef?s:this.rootRef,s.refSet=this),this}merge(s){for(const o of s.values())this.add(o);return this}has(s){const o=Jc(s)?s:s.uri;return _c(this.find((s=>s.uri===o)))}find(s){return this.refs.find(s)}*values(){yield*this.refs}clean(){this.refs.forEach((s=>{s.refSet=void 0})),this.rootRef=void 0,this.refs.length=0}};function _identity(s){return s}const vw=_curry1(_identity),bw={parse:{mediaType:\"text/plain\",parsers:[],parserOpts:{}},resolve:{baseURI:\"\",resolvers:[],resolverOpts:{},strategies:[],strategyOpts:{},internal:!0,external:!0,maxDepth:1/0},dereference:{strategies:[],strategyOpts:{},refSet:null,maxDepth:1/0,circular:\"ignore\",circularReplacer:vw,immutable:!0},bundle:{strategies:[],refSet:null,maxDepth:1/0}};const _w=_curry2((function lens(s,o){return function(i){return function(a){return cc((function(s){return o(s,a)}),i(s(a)))}}}));var Identity=function(s){return{value:s,map:function(o){return Identity(o(s))}}},Sw=_curry3((function over(s,o,i){return s((function(s){return Identity(o(s))}))(i).value}));const Ew=Sw;const ww=na(\"\"),xw=_w(tp([\"resolve\",\"baseURI\"]),s_([\"resolve\",\"baseURI\"])),baseURIDefault=s=>ww(s)?url_cwd():s,util_merge=(s,o)=>{const i=ep(s,o);return Ew(xw,baseURIDefault,i)};const kw=class File_File{uri;mediaType;data;parseResult;constructor({uri:s,mediaType:o=\"text/plain\",data:i,parseResult:a}){this.uri=s,this.mediaType=o,this.data=i,this.parseResult=a}get extension(){return Jc(this.uri)?(s=>{const o=s.lastIndexOf(\".\");return o>=0?s.substring(o).toLowerCase():\"\"})(this.uri):\"\"}toString(){if(\"string\"==typeof this.data)return this.data;if(this.data instanceof ArrayBuffer||[\"ArrayBuffer\"].includes(ra(this.data))||ArrayBuffer.isView(this.data)){return new TextDecoder(\"utf-8\").decode(this.data)}return String(this.data)}};const Ow=class PluginError extends Ko{plugin;constructor(s,o){super(s,{cause:o.cause}),this.plugin=o.plugin}},plugins_filter=async(s,o,i)=>{const a=await Promise.all(i.map(hp([s],o)));return i.filter(((s,o)=>a[o]))},run=async(s,o,i)=>{let a;for(const u of i)try{const i=await u[s].call(u,...o);return{plugin:u,result:i}}catch(s){a=new Ow(\"Error while running plugin\",{cause:s,plugin:u})}return Promise.reject(a)};const Cw=class DereferenceError extends Ko{};const Aw=class UnmatchedDereferenceStrategyError extends Cw{},dereferenceApiDOM=async(s,o)=>{let i=s,a=!1;if(!qu(s)){const o=cloneShallow(s);o.classes.push(\"result\"),i=new Cu([o]),a=!0}const u=new kw({uri:o.resolve.baseURI,parseResult:i,mediaType:o.parse.mediaType}),_=await plugins_filter(\"canDereference\",[u,o],o.dereference.strategies);if(cp(_))throw new Aw(u.uri);try{const{result:s}=await run(\"dereference\",[u,o],_);return a?s.get(0):s}catch(s){throw new Cw(`Error while dereferencing file \"${u.uri}\"`,{cause:s})}};const jw=class ParseError extends Ko{};const Pw=class ParserError extends jw{};const Iw=class Parser_Parser{name;allowEmpty;sourceMap;fileExtensions;mediaTypes;constructor({name:s,allowEmpty:o=!0,sourceMap:i=!1,fileExtensions:a=[],mediaTypes:u=[]}){this.name=s,this.allowEmpty=o,this.sourceMap=i,this.fileExtensions=a,this.mediaTypes=u}};const Tw=class BinaryParser extends Iw{constructor(s){super({...null!=s?s:{},name:\"binary\"})}canParse(s){return 0===this.fileExtensions.length||this.fileExtensions.includes(s.extension)}parse(s){try{const o=unescape(encodeURIComponent(s.toString())),i=btoa(o),a=new Cu;if(0!==i.length){const s=new Su.Om(i);s.classes.push(\"result\"),a.push(s)}return a}catch(o){throw new Pw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Nw=class ResolveStrategy{name;constructor({name:s}){this.name=s}};const Mw=class OpenAPI3_1ResolveStrategy extends Nw{constructor(s){super({...null!=s?s:{},name:\"openapi-3-1\"})}canResolve(s,o){const i=o.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));return void 0!==i&&i.canDereference(s,o)}async resolve(s,o){const i=o.dereference.strategies.find((s=>\"openapi-3-1\"===s.name));if(void 0===i)throw new Aw('\"openapi-3-1\" dereference strategy is not available.');const a=new yw,u=util_merge(o,{resolve:{internal:!1},dereference:{refSet:a}});return await i.dereference(s,u),a}};const Rw=class Resolver{name;constructor({name:s}){this.name=s}};const Dw=class HTTPResolver extends Rw{timeout;redirects;withCredentials;constructor(s){const{name:o=\"http-resolver\",timeout:i=5e3,redirects:a=5,withCredentials:u=!1}=null!=s?s:{};super({name:o}),this.timeout=i,this.redirects=a,this.withCredentials=u}canRead(s){return isHttpUrl(s.uri)}};const Lw=class ResolveError extends Ko{};const Fw=class ResolverError extends Lw{},{AbortController:Bw,AbortSignal:$w}=globalThis;void 0===globalThis.AbortController&&(globalThis.AbortController=Bw),void 0===globalThis.AbortSignal&&(globalThis.AbortSignal=$w);const qw=class HTTPResolverSwaggerClient extends Dw{swaggerHTTPClient=http_http;swaggerHTTPClientConfig;constructor({swaggerHTTPClient:s=http_http,swaggerHTTPClientConfig:o={},...i}={}){super({...i,name:\"http-swagger-client\"}),this.swaggerHTTPClient=s,this.swaggerHTTPClientConfig=o}getHttpClient(){return this.swaggerHTTPClient}async read(s){const o=this.getHttpClient(),i=new AbortController,{signal:a}=i,u=setTimeout((()=>{i.abort()}),this.timeout),_=this.getHttpClient().withCredentials||this.withCredentials?\"include\":\"same-origin\",w=0===this.redirects?\"error\":\"follow\",x=this.redirects>0?this.redirects:void 0;try{return(await o({url:s.uri,signal:a,userFetch:async(s,o)=>{let i=await fetch(s,o);try{i.headers.delete(\"Content-Type\")}catch{i=new Response(i.body,{...i,headers:new Headers(i.headers)}),i.headers.delete(\"Content-Type\")}return i},credentials:_,redirect:w,follow:x,...this.swaggerHTTPClientConfig})).text.arrayBuffer()}catch(o){throw new Fw(`Error downloading \"${s.uri}\"`,{cause:o})}finally{clearTimeout(u)}}},transformers_from=(s,o=fp)=>{if(Jc(s))try{return o.fromRefract(JSON.parse(s))}catch{}return fu(s)&&id(\"element\",s)?o.fromRefract(s):o.toElement(s)};const Vw=class JSONParser extends Iw{constructor(s={}){super({name:\"json-swagger-client\",mediaTypes:[\"application/json\"],...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{return JSON.parse(s.toString()),!0}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Pw(\"json-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();if(this.allowEmpty&&\"\"===i.trim())return o;try{const s=transformers_from(JSON.parse(i));return s.classes.push(\"result\"),o.push(s),o}catch(o){throw new Pw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Uw=class YAMLParser extends Iw{constructor(s={}){super({name:\"yaml-1-2-swagger-client\",mediaTypes:[\"text/yaml\",\"application/yaml\"],...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{return fn.load(s.toString(),{schema:rn}),!0}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Pw(\"yaml-1-2-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();try{const s=fn.load(i,{schema:rn});if(this.allowEmpty&&void 0===s)return o;const a=transformers_from(s);return a.classes.push(\"result\"),o.push(a),o}catch(o){throw new Pw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const zw=class OpenAPIJSON3_1Parser extends Iw{detectionRegExp=/\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\"/;constructor(s={}){super({name:\"openapi-json-3-1-swagger-client\",mediaTypes:new OpenAPIMediaTypes(...mw.filterByFormat(\"generic\"),...mw.filterByFormat(\"json\")),...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{const o=s.toString();return JSON.parse(o),this.detectionRegExp.test(o)}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Pw(\"openapi-json-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();if(this.allowEmpty&&\"\"===i.trim())return o;try{const s=JSON.parse(i),a=Pb.refract(s,this.refractorOpts);return a.classes.push(\"result\"),o.push(a),o}catch(o){throw new Pw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Ww=class OpenAPIYAML31Parser extends Iw{detectionRegExp=/(?<YAML>^([\"']?)openapi\\2\\s*:\\s*([\"']?)(?<version_yaml>3\\.1\\.(?:[1-9]\\d*|0))\\3(?:\\s+|$))|(?<JSON>\"openapi\"\\s*:\\s*\"(?<version_json>3\\.1\\.(?:[1-9]\\d*|0))\")/m;constructor(s={}){super({name:\"openapi-yaml-3-1-swagger-client\",mediaTypes:new OpenAPIMediaTypes(...mw.filterByFormat(\"generic\"),...mw.filterByFormat(\"yaml\")),...s})}async canParse(s){const o=0===this.fileExtensions.length||this.fileExtensions.includes(s.extension),i=this.mediaTypes.includes(s.mediaType);if(!o)return!1;if(i)return!0;if(!i)try{const o=s.toString();return fn.load(o),this.detectionRegExp.test(o)}catch(s){return!1}return!1}async parse(s){if(this.sourceMap)throw new Pw(\"openapi-yaml-3-1-swagger-client parser plugin doesn't support sourceMaps option\");const o=new Cu,i=s.toString();try{const s=fn.load(i,{schema:rn});if(this.allowEmpty&&void 0===s)return o;const a=Pb.refract(s,this.refractorOpts);return a.classes.push(\"result\"),o.push(a),o}catch(o){throw new Pw(`Error parsing \"${s.uri}\"`,{cause:o})}}};const Jw=_curry3((function propEq(s,o,i){return na(s,Da(o,i))}));const Hw=class DereferenceStrategy{name;constructor({name:s}){this.name=s}};const Kw=_curry2((function none(s,o){return xu(_complement(s),o)}));var Gw=__webpack_require__(8068);const Yw=class ElementIdentityError extends Go{value;constructor(s,o){super(s,o),void 0!==o&&(this.value=o.value)}};class IdentityManager{uuid;identityMap;constructor({length:s=6}={}){this.uuid=new Gw({length:s}),this.identityMap=new WeakMap}identify(s){if(!ju(s))throw new Yw(\"Cannot not identify the element. `element` is neither structurally compatible nor a subclass of an Element class.\",{value:s});if(s.meta.hasKey(\"id\")&&Pu(s.meta.get(\"id\"))&&!s.meta.get(\"id\").equals(\"\"))return s.id;if(this.identityMap.has(s))return this.identityMap.get(s);const o=new Su.Om(this.generateId());return this.identityMap.set(s,o),o}forget(s){return!!this.identityMap.has(s)&&(this.identityMap.delete(s),!0)}generateId(){return this.uuid.randomUUID()}}new IdentityManager;const Xw=_curry3((function pathOr(s,o,i){return Na(s,_path(o,i))})),traversal_find=(s,o)=>{const i=new PredicateVisitor({predicate:s,returnOnTrue:Uu});return visitor_visit(o,i),Xw(void 0,[0],i.result)};const Qw=class JsonSchema$anchorError extends Ko{};const Zw=class EvaluationJsonSchema$anchorError extends Qw{};const ex=class InvalidJsonSchema$anchorError extends Qw{constructor(s){super(`Invalid JSON Schema $anchor \"${s}\".`)}},isAnchor=s=>/^[A-Za-z_][A-Za-z_0-9.-]*$/.test(s),uriToAnchor=s=>{const o=getHash(s);return dd(\"#\",o)},$anchor_evaluate=(s,o)=>{const i=(s=>{if(!isAnchor(s))throw new ex(s);return s})(s),a=traversal_find((s=>pE(s)&&serializers_value(s.$anchor)===i),o);if(bc(a))throw new Zw(`Evaluation failed on token: \"${i}\"`);return a},traversal_filter=(s,o)=>{const i=new PredicateVisitor({predicate:s});return visitor_visit(o,i),new Su.G6(i.result)};const tx=class JsonSchemaUriError extends Ko{};const rx=class EvaluationJsonSchemaUriError extends tx{},resolveSchema$refField=(s,o)=>{if(void 0===o.$ref)return;const i=getHash(serializers_value(o.$ref)),a=serializers_value(o.meta.get(\"ancestorsSchemaIdentifiers\")),u=Ca(((s,o)=>resolve(s,sanitize(stripHash(o)))),s,[...a,serializers_value(o.$ref)]);return`${u}${\"#\"===i?\"\":i}`},refractToSchemaElement=s=>{if(refractToSchemaElement.cache.has(s))return refractToSchemaElement.cache.get(s);const o=uS.refract(s);return refractToSchemaElement.cache.set(s,o),o};refractToSchemaElement.cache=new WeakMap;const maybeRefractToSchemaElement=s=>isPrimitiveElement(s)?refractToSchemaElement(s):s,uri_evaluate=(s,o)=>{const{cache:i}=uri_evaluate,a=stripHash(s),isSchemaElementWith$id=s=>pE(s)&&void 0!==s.$id;if(!i.has(o)){const s=traversal_filter(isSchemaElementWith$id,o);i.set(o,Array.from(s))}const u=i.get(o).find((s=>{const o=((s,o)=>{if(void 0===o.$id)return;const i=serializers_value(o.meta.get(\"ancestorsSchemaIdentifiers\"));return Ca(((s,o)=>resolve(s,sanitize(stripHash(o)))),s,i)})(a,s);return o===a}));if(bc(u))throw new rx(`Evaluation failed on URI: \"${s}\"`);return isAnchor(uriToAnchor(s))?$anchor_evaluate(uriToAnchor(s),u):apidom_evaluate(u,fromURIReference(s))};uri_evaluate.cache=new WeakMap;const nx=class MaximumDereferenceDepthError extends Cw{};const sx=class MaximumResolveDepthError extends Lw{};const ox=class UnmatchedResolverError extends Fw{},apidom_reference_src_parse=async(s,o)=>{const i=new kw({uri:sanitize(stripHash(s)),mediaType:o.parse.mediaType}),a=await(async(s,o)=>{const i=o.resolve.resolvers.map((s=>{const i=Object.create(s);return Object.assign(i,o.resolve.resolverOpts)})),a=await plugins_filter(\"canRead\",[s,o],i);if(cp(a))throw new ox(s.uri);try{const{result:o}=await run(\"read\",[s],a);return o}catch(o){throw new Lw(`Error while reading file \"${s.uri}\"`,{cause:o})}})(i,o);return(async(s,o)=>{const i=o.parse.parsers.map((s=>{const i=Object.create(s);return Object.assign(i,o.parse.parserOpts)})),a=await plugins_filter(\"canParse\",[s,o],i);if(cp(a))throw new ox(s.uri);try{const{plugin:i,result:u}=await run(\"parse\",[s,o],a);return!i.allowEmpty&&u.isEmpty?Promise.reject(new jw(`Error while parsing file \"${s.uri}\". File is empty.`)):u}catch(o){throw new jw(`Error while parsing file \"${s.uri}\"`,{cause:o})}})(new kw({...i,data:a}),o)};class AncestorLineage extends Array{includesCycle(s){return this.filter((o=>o.has(s))).length>1}includes(s,o){return s instanceof Set?super.includes(s,o):this.some((o=>o.has(s)))}findItem(s){for(const o of this)for(const i of o)if(ju(i)&&s(i))return i}}const ix=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],ax=new IdentityManager,mutationReplacer=(s,o,i,a)=>{Du(a)?a.value=s:Array.isArray(a)&&(a[i]=s)};class OpenAPI3_1DereferenceVisitor{indirections;namespace;reference;options;ancestors;refractCache;constructor({reference:s,namespace:o,options:i,indirections:a=[],ancestors:u=new AncestorLineage,refractCache:_=new Map}){this.indirections=a,this.namespace=o,this.reference=s,this.options=i,this.ancestors=new AncestorLineage(...u),this.refractCache=_}toBaseURI(s){return resolve(this.reference.uri,sanitize(stripHash(s)))}async toReference(s){if(this.reference.depth>=this.options.resolve.maxDepth)throw new sx(`Maximum resolution depth of ${this.options.resolve.maxDepth} has been exceeded by file \"${this.reference.uri}\"`);const o=this.toBaseURI(s),{refSet:i}=this.reference;if(i.has(o))return i.find(Jw(o,\"uri\"));const a=await apidom_reference_src_parse(unsanitize(o),{...this.options,parse:{...this.options.parse,mediaType:\"text/plain\"}}),u=new gw({uri:o,value:cloneDeep(a),depth:this.reference.depth+1});if(i.add(u),this.options.dereference.immutable){const s=new gw({uri:`immutable://${o}`,value:a,depth:this.reference.depth+1});i.add(s)}return u}toAncestorLineage(s){const o=new Set(s.filter(ju));return[new AncestorLineage(...this.ancestors,o),o]}async ReferenceElement(s,o,i,a,u,_){if(this.indirections.includes(s))return!1;const[w,x]=this.toAncestorLineage([...u,i]),C=this.toBaseURI(serializers_value(s.$ref)),j=stripHash(this.reference.uri)===C,L=!j;if(!this.options.resolve.internal&&j)return!1;if(!this.options.resolve.external&&L)return!1;const B=await this.toReference(serializers_value(s.$ref)),$=resolve(C,serializers_value(s.$ref));this.indirections.push(s);const V=fromURIReference($);let U=apidom_evaluate(B.value.result,V);if(U.id=ax.identify(U),isPrimitiveElement(U)){const o=serializers_value(s.meta.get(\"referenced-element\")),i=`${o}-${serializers_value(ax.identify(U))}`;if(this.refractCache.has(i))U=this.refractCache.get(i);else if(isReferenceLikeElement(U))U=qb.refract(U),U.setMetaProperty(\"referenced-element\",o),this.refractCache.set(i,U);else{U=this.namespace.getElementClass(o).refract(U),this.refractCache.set(i,U)}}if(s===U)throw new Ko(\"Recursive Reference Object detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(w.includes(U)){if(B.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var z,Y;const o=new Su.sI(U.id,{type:\"reference\",uri:B.uri,$ref:serializers_value(s.$ref)}),a=(null!==(z=null===(Y=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===Y?void 0:Y.circularReplacer)&&void 0!==z?z:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,mutationReplacer),!i&&a}}const Z=stripHash(B.refSet.rootRef.uri)!==B.uri,ee=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((L||Z||aE(U)||ee)&&!w.includesCycle(U)){x.add(s);const o=new OpenAPI3_1DereferenceVisitor({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});U=await ix(U,o,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),x.delete(s)}this.indirections.pop();const ie=cloneShallow(U);return ie.setMetaProperty(\"id\",ax.generateId()),ie.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),ie.setMetaProperty(\"ref-origin\",B.uri),ie.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),Mu(U)&&Mu(ie)&&(s.hasKey(\"description\")&&\"description\"in U&&(ie.remove(\"description\"),ie.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in U&&(ie.remove(\"summary\"),ie.set(\"summary\",s.get(\"summary\")))),_.replaceWith(ie,mutationReplacer),!i&&ie}async PathItemElement(s,o,i,a,u,_){if(!Pu(s.$ref))return;if(this.indirections.includes(s))return!1;const[w,x]=this.toAncestorLineage([...u,i]),C=this.toBaseURI(serializers_value(s.$ref)),j=stripHash(this.reference.uri)===C,L=!j;if(!this.options.resolve.internal&&j)return;if(!this.options.resolve.external&&L)return;const B=await this.toReference(serializers_value(s.$ref)),$=resolve(C,serializers_value(s.$ref));this.indirections.push(s);const V=fromURIReference($);let U=apidom_evaluate(B.value.result,V);if(U.id=ax.identify(U),isPrimitiveElement(U)){const s=`path-item-${serializers_value(ax.identify(U))}`;this.refractCache.has(s)?U=this.refractCache.get(s):(U=Rb.refract(U),this.refractCache.set(s,U))}if(s===U)throw new Ko(\"Recursive Path Item Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(w.includes(U)){if(B.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var z,Y;const o=new Su.sI(U.id,{type:\"path-item\",uri:B.uri,$ref:serializers_value(s.$ref)}),a=(null!==(z=null===(Y=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===Y?void 0:Y.circularReplacer)&&void 0!==z?z:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,mutationReplacer),!i&&a}}const Z=stripHash(B.refSet.rootRef.uri)!==B.uri,ee=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((L||Z||oE(U)&&Pu(U.$ref)||ee)&&!w.includesCycle(U)){x.add(s);const o=new OpenAPI3_1DereferenceVisitor({reference:B,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});U=await ix(U,o,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),x.delete(s)}if(this.indirections.pop(),oE(U)){const o=new Rb([...U.content],cloneDeep(U.meta),cloneDeep(U.attributes));o.setMetaProperty(\"id\",ax.generateId()),s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",B.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),U=o}return _.replaceWith(U,mutationReplacer),i?void 0:U}async LinkElement(s,o,i,a,u,_){if(!Pu(s.operationRef)&&!Pu(s.operationId))return;if(Pu(s.operationRef)&&Pu(s.operationId))throw new Ko(\"LinkElement operationRef and operationId fields are mutually exclusive.\");let w;if(Pu(s.operationRef)){var x;const o=fromURIReference(serializers_value(s.operationRef)),a=this.toBaseURI(serializers_value(s.operationRef)),u=stripHash(this.reference.uri)===a,C=!u;if(!this.options.resolve.internal&&u)return;if(!this.options.resolve.external&&C)return;const j=await this.toReference(serializers_value(s.operationRef));if(w=apidom_evaluate(j.value.result,o),isPrimitiveElement(w)){const s=`operation-${serializers_value(ax.identify(w))}`;this.refractCache.has(s)?w=this.refractCache.get(s):(w=Ib.refract(w),this.refractCache.set(s,w))}w=cloneShallow(w),w.setMetaProperty(\"ref-origin\",j.uri);const L=cloneShallow(s);return null===(x=L.operationRef)||void 0===x||x.meta.set(\"operation\",w),_.replaceWith(L,mutationReplacer),i?void 0:L}if(Pu(s.operationId)){var C;const o=serializers_value(s.operationId),a=await this.toReference(unsanitize(this.reference.uri));if(w=traversal_find((s=>nE(s)&&ju(s.operationId)&&s.operationId.equals(o)),a.value.result),bc(w))throw new Ko(`OperationElement(operationId=${o}) not found.`);const u=cloneShallow(s);return null===(C=u.operationId)||void 0===C||C.meta.set(\"operation\",w),_.replaceWith(u,mutationReplacer),i?void 0:u}}async ExampleElement(s,o,i,a,u,_){if(!Pu(s.externalValue))return;if(s.hasKey(\"value\")&&Pu(s.externalValue))throw new Ko(\"ExampleElement value and externalValue fields are mutually exclusive.\");const w=this.toBaseURI(serializers_value(s.externalValue)),x=stripHash(this.reference.uri)===w,C=!x;if(!this.options.resolve.internal&&x)return;if(!this.options.resolve.external&&C)return;const j=await this.toReference(serializers_value(s.externalValue)),L=cloneShallow(j.value.result);L.setMetaProperty(\"ref-origin\",j.uri);const B=cloneShallow(s);return B.value=L,_.replaceWith(B,mutationReplacer),i?void 0:B}async SchemaElement(s,o,i,a,u,_){if(!Pu(s.$ref))return;if(this.indirections.includes(s))return!1;const[w,x]=this.toAncestorLineage([...u,i]);let C=await this.toReference(unsanitize(this.reference.uri)),{uri:j}=C;const L=resolveSchema$refField(j,s),B=stripHash(L),$=new kw({uri:B}),V=Kw((s=>s.canRead($)),this.options.resolve.resolvers),U=!V;let z,Y=stripHash(this.reference.uri)===L,Z=!Y;this.indirections.push(s);try{if(V||U){j=this.toBaseURI(L);const s=L,o=maybeRefractToSchemaElement(C.value.result);if(z=uri_evaluate(s,o),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z),!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return}else{if(j=this.toBaseURI(L),Y=stripHash(this.reference.uri)===j,Z=!Y,!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return;C=await this.toReference(unsanitize(L));const s=fromURIReference(L),o=maybeRefractToSchemaElement(C.value.result);z=apidom_evaluate(o,s),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z)}}catch(s){if(!(U&&s instanceof rx))throw s;if(isAnchor(uriToAnchor(L))){if(Y=stripHash(this.reference.uri)===j,Z=!Y,!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return;C=await this.toReference(unsanitize(L));const s=uriToAnchor(L),o=maybeRefractToSchemaElement(C.value.result);z=$anchor_evaluate(s,o),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z)}else{if(j=this.toBaseURI(L),Y=stripHash(this.reference.uri)===j,Z=!Y,!this.options.resolve.internal&&Y)return;if(!this.options.resolve.external&&Z)return;C=await this.toReference(unsanitize(L));const s=fromURIReference(L),o=maybeRefractToSchemaElement(C.value.result);z=apidom_evaluate(o,s),z=maybeRefractToSchemaElement(z),z.id=ax.identify(z)}}if(s===z)throw new Ko(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(w.includes(z)){if(C.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var ee,ie;const o=new Su.sI(z.id,{type:\"json-schema\",uri:C.uri,$ref:serializers_value(s.$ref)}),a=(null!==(ee=null===(ie=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===ie?void 0:ie.circularReplacer)&&void 0!==ee?ee:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,mutationReplacer),!i&&a}}const ae=stripHash(C.refSet.rootRef.uri)!==C.uri,ce=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((Z||ae||pE(z)&&Pu(z.$ref)||ce)&&!w.includesCycle(z)){x.add(s);const o=new OpenAPI3_1DereferenceVisitor({reference:C,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:w});z=await ix(z,o,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),x.delete(s)}if(this.indirections.pop(),predicates_isBooleanJsonSchemaElement(z)){const o=cloneDeep(z);return o.setMetaProperty(\"id\",ax.generateId()),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",C.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),_.replaceWith(o,mutationReplacer),!i&&o}if(pE(z)){const o=new uS([...z.content],cloneDeep(z.meta),cloneDeep(z.attributes));o.setMetaProperty(\"id\",ax.generateId()),s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",C.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(ax.identify(s))),z=o}return _.replaceWith(z,mutationReplacer),i?void 0:z}}const cx=OpenAPI3_1DereferenceVisitor,lx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")];const ux=class OpenAPI3_1DereferenceStrategy extends Hw{constructor(s){super({...null!=s?s:{},name:\"openapi-3-1\"})}canDereference(s){var o;return\"text/plain\"!==s.mediaType?mw.includes(s.mediaType):rE(null===(o=s.parseResult)||void 0===o?void 0:o.result)}async dereference(s,o){var i;const a=createNamespace(hw),u=null!==(i=o.dereference.refSet)&&void 0!==i?i:new yw,_=new yw;let w,x=u;u.has(s.uri)?w=u.find(Jw(s.uri,\"uri\")):(w=new gw({uri:s.uri,value:s.parseResult}),u.add(w)),o.dereference.immutable&&(u.refs.map((s=>new gw({...s,value:cloneDeep(s.value)}))).forEach((s=>_.add(s))),w=_.find((o=>o.uri===s.uri)),x=_);const C=new cx({reference:w,namespace:a,options:o}),j=await lx(x.rootRef.value,C,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType});return o.dereference.immutable&&_.refs.filter((s=>s.uri.startsWith(\"immutable://\"))).map((s=>new gw({...s,uri:s.uri.replace(/^immutable:\\/\\//,\"\")}))).forEach((s=>u.add(s))),null===o.dereference.refSet&&u.clean(),_.clean(),j}},to_path=s=>{const o=(s=>s.slice(2))(s);return o.reduce(((s,i,a)=>{if(Du(i)){const o=String(serializers_value(i.key));s.push(o)}else if(Ru(o[a-2])){const u=o[a-2].content.indexOf(i);s.push(u)}return s}),[])};const px=class ModelPropertyMacroVisitor{modelPropertyMacro;options;SchemaElement={leave:(s,o,i,a,u)=>{void 0!==s.properties&&Mu(s.properties)&&s.properties.forEach((o=>{if(Mu(o))try{const s=this.modelPropertyMacro(serializers_value(o));o.set(\"default\",s)}catch(o){var a,_;const w=new Error(o,{cause:o});w.fullPath=[...to_path([...u,i,s]),\"properties\"],null===(a=this.options.dereference.dereferenceOpts)||void 0===a||null===(a=a.errors)||void 0===a||null===(_=a.push)||void 0===_||_.call(a,w)}}))}};constructor({modelPropertyMacro:s,options:o}){this.modelPropertyMacro=s,this.options=o}};var hx=function(){function XUniqWith(s,o){this.xf=o,this.pred=s,this.items=[]}return XUniqWith.prototype[\"@@transducer/init\"]=_xfBase_init,XUniqWith.prototype[\"@@transducer/result\"]=_xfBase_result,XUniqWith.prototype[\"@@transducer/step\"]=function(s,o){return _includesWith(this.pred,o,this.items)?s:(this.items.push(o),this.xf[\"@@transducer/step\"](s,o))},XUniqWith}();function _xuniqWith(s){return function(o){return new hx(s,o)}}var dx=_curry2(_dispatchable([],_xuniqWith,(function(s,o){for(var i,a=0,u=o.length,_=[];a<u;)_includesWith(s,i=o[a],_)||(_[_.length]=i),a+=1;return _})));const fx=dx;const mx=class all_of_AllOfVisitor{options;SchemaElement={leave(s,o,i,a,u){if(void 0===s.allOf)return;if(!Ru(s.allOf)){var _,w;const o=new TypeError(\"allOf must be an array\");return o.fullPath=[...to_path([...u,i,s]),\"allOf\"],void(null===(_=this.options.dereference.dereferenceOpts)||void 0===_||null===(_=_.errors)||void 0===_||null===(w=_.push)||void 0===w||w.call(_,o))}if(s.allOf.isEmpty)return void s.remove(\"allOf\");if(!s.allOf.content.every(pE)){var x,C;const o=new TypeError(\"Elements in allOf must be objects\");return o.fullPath=[...to_path([...u,i,s]),\"allOf\"],void(null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(C=x.push)||void 0===C||C.call(x,o))}for(;s.hasKey(\"allOf\");){const{allOf:o}=s;s.remove(\"allOf\");const i=yd.all([...o.content,s],{customMerge:s=>\"enum\"===serializers_value(s)?(s,o)=>{if(includesClasses([\"json-schema-enum\"],s)&&includesClasses([\"json-schema-enum\"],o)){const areElementsEqual=(s,o)=>!(Ru(s)||Ru(o)||Mu(s)||Mu(o))&&s.equals(serializers_value(o)),i=cloneShallow(s);return i.content=fx(areElementsEqual)([...s.content,...o.content]),i}return yd(s,o)}:yd});if(s.hasKey(\"$$ref\")||i.remove(\"$$ref\"),s.hasKey(\"example\")){const o=i.getMember(\"example\");o&&(o.value=s.get(\"example\"))}if(s.hasKey(\"examples\")){const o=i.getMember(\"examples\");o&&(o.value=s.get(\"examples\"))}s.content=i.content}}};constructor({options:s}){this.options=s}};const gx=class ParameterMacroVisitor{parameterMacro;options;#n;OperationElement={enter:s=>{this.#n=s},leave:()=>{this.#n=void 0}};ParameterElement={leave:(s,o,i,a,u)=>{const _=this.#n?serializers_value(this.#n):null,w=serializers_value(s);try{const o=this.parameterMacro(_,w);s.set(\"default\",o)}catch(s){var x,C;const o=new Error(s,{cause:s});o.fullPath=to_path([...u,i]),null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(C=x.push)||void 0===C||C.call(x,o)}}};constructor({parameterMacro:s,options:o}){this.parameterMacro=s,this.options=o}},get_root_cause=s=>{if(null==s.cause)return s;let{cause:o}=s;for(;null!=o.cause;)o=o.cause;return o};const yx=class SchemaRefError extends Go{},{wrapError:vx}=Xl,bx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")],_x=new IdentityManager,dereference_mutationReplacer=(s,o,i,a)=>{Du(a)?a.value=s:Array.isArray(a)&&(a[i]=s)};class OpenAPI3_1SwaggerClientDereferenceVisitor extends cx{useCircularStructures;allowMetaPatches;basePath;constructor({allowMetaPatches:s=!0,useCircularStructures:o=!1,basePath:i=null,...a}){super(a),this.allowMetaPatches=s,this.useCircularStructures=o,this.basePath=i}async ReferenceElement(s,o,i,a,u,_){try{if(this.indirections.includes(s))return!1;const[o,a]=this.toAncestorLineage([...u,i]),j=this.toBaseURI(serializers_value(s.$ref)),L=stripHash(this.reference.uri)===j,B=!L;if(!this.options.resolve.internal&&L)return!1;if(!this.options.resolve.external&&B)return!1;const $=await this.toReference(serializers_value(s.$ref)),V=resolve(j,serializers_value(s.$ref));this.indirections.push(s);const U=fromURIReference(V);let z=apidom_evaluate($.value.result,U);if(z.id=_x.identify(z),isPrimitiveElement(z)){const o=serializers_value(s.meta.get(\"referenced-element\")),i=`${o}-${serializers_value(_x.identify(z))}`;if(this.refractCache.has(i))z=this.refractCache.get(i);else if(isReferenceLikeElement(z))z=qb.refract(z),z.setMetaProperty(\"referenced-element\",o),this.refractCache.set(i,z);else{z=this.namespace.getElementClass(o).refract(z),this.refractCache.set(i,z)}}if(s===z)throw new Ko(\"Recursive Reference Object detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(o.includes(z)){if($.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var w,x;const o=new Su.sI(z.id,{type:\"reference\",uri:$.uri,$ref:serializers_value(s.$ref),baseURI:V,referencingElement:s}),a=(null!==(w=null===(x=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===x?void 0:x.circularReplacer)&&void 0!==w?w:this.options.dereference.circularReplacer)(o);return _.replaceWith(o,dereference_mutationReplacer),!i&&a}}const Y=stripHash($.refSet.rootRef.uri)!==$.uri,Z=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((B||Y||aE(z)||Z)&&!o.includesCycle(z)){var C;a.add(s);const _=new OpenAPI3_1SwaggerClientDereferenceVisitor({reference:$,namespace:this.namespace,indirections:[...this.indirections],options:this.options,refractCache:this.refractCache,ancestors:o,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(C=this.basePath)&&void 0!==C?C:[...to_path([...u,i,s]),\"$ref\"]});z=await bx(z,_,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),a.delete(s)}this.indirections.pop();const ee=cloneShallow(z);if(ee.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref),description:serializers_value(s.description),summary:serializers_value(s.summary)}),ee.setMetaProperty(\"ref-origin\",$.uri),ee.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),Mu(z)&&(s.hasKey(\"description\")&&\"description\"in z&&(ee.remove(\"description\"),ee.set(\"description\",s.get(\"description\"))),s.hasKey(\"summary\")&&\"summary\"in z&&(ee.remove(\"summary\"),ee.set(\"summary\",s.get(\"summary\")))),this.allowMetaPatches&&Mu(ee)&&!ee.hasKey(\"$$ref\")){const s=resolve(j,V);ee.set(\"$$ref\",s)}return _.replaceWith(ee,dereference_mutationReplacer),!i&&ee}catch(o){var j,L,B;const a=get_root_cause(o),_=vx(a,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:fromURIReference(serializers_value(s.$ref)),fullPath:null!==(j=this.basePath)&&void 0!==j?j:[...to_path([...u,i,s]),\"$ref\"]});return void(null===(L=this.options.dereference.dereferenceOpts)||void 0===L||null===(L=L.errors)||void 0===L||null===(B=L.push)||void 0===B||B.call(L,_))}}async PathItemElement(s,o,i,a,u,_){try{if(!Pu(s.$ref))return;if(this.indirections.includes(s))return!1;if(includesClasses([\"cycle\"],s.$ref))return!1;const[o,a]=this.toAncestorLineage([...u,i]),j=this.toBaseURI(serializers_value(s.$ref)),L=stripHash(this.reference.uri)===j,B=!L;if(!this.options.resolve.internal&&L)return;if(!this.options.resolve.external&&B)return;const $=await this.toReference(serializers_value(s.$ref)),V=resolve(j,serializers_value(s.$ref));this.indirections.push(s);const U=fromURIReference(V);let z=apidom_evaluate($.value.result,U);if(z.id=_x.identify(z),isPrimitiveElement(z)){const s=`path-item-${serializers_value(_x.identify(z))}`;this.refractCache.has(s)?z=this.refractCache.get(s):(z=Rb.refract(z),this.refractCache.set(s,z))}if(s===z)throw new Ko(\"Recursive Path Item Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(o.includes(z)){if($.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var w,x;const o=new Su.sI(z.id,{type:\"path-item\",uri:$.uri,$ref:serializers_value(s.$ref),baseURI:V,referencingElement:s}),a=(null!==(w=null===(x=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===x?void 0:x.circularReplacer)&&void 0!==w?w:this.options.dereference.circularReplacer)(o);return _.replaceWith(o,dereference_mutationReplacer),!i&&a}}const Y=stripHash($.refSet.rootRef.uri)!==$.uri,Z=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((B||Y||oE(z)&&Pu(z.$ref)||Z)&&!o.includesCycle(z)){var C;a.add(s);const _=new OpenAPI3_1SwaggerClientDereferenceVisitor({reference:$,namespace:this.namespace,indirections:[...this.indirections],options:this.options,ancestors:o,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,basePath:null!==(C=this.basePath)&&void 0!==C?C:[...to_path([...u,i,s]),\"$ref\"]});z=await bx(z,_,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),a.delete(s)}if(this.indirections.pop(),oE(z)){const o=new Rb([...z.content],cloneDeep(z.meta),cloneDeep(z.attributes));if(s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",$.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),this.allowMetaPatches&&void 0===o.get(\"$$ref\")){const s=resolve(j,V);o.set(\"$$ref\",s)}z=o}return _.replaceWith(z,dereference_mutationReplacer),i?void 0:z}catch(o){var j,L,B;const a=get_root_cause(o),_=vx(a,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),pointer:fromURIReference(serializers_value(s.$ref)),fullPath:null!==(j=this.basePath)&&void 0!==j?j:[...to_path([...u,i,s]),\"$ref\"]});return void(null===(L=this.options.dereference.dereferenceOpts)||void 0===L||null===(L=L.errors)||void 0===L||null===(B=L.push)||void 0===B||B.call(L,_))}}async SchemaElement(s,o,i,a,u,_){try{if(!Pu(s.$ref))return;if(this.indirections.includes(s))return!1;const[o,a]=this.toAncestorLineage([...u,i]);let j=await this.toReference(unsanitize(this.reference.uri)),{uri:L}=j;const B=resolveSchema$refField(L,s),$=stripHash(B),V=new kw({uri:$}),U=!this.options.resolve.resolvers.some((s=>s.canRead(V))),z=!U;let Y,Z=stripHash(this.reference.uri)===B,ee=!Z;this.indirections.push(s);try{if(U||z){L=this.toBaseURI(B);const s=B,o=maybeRefractToSchemaElement(j.value.result);if(Y=uri_evaluate(s,o),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y),!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return}else{if(L=this.toBaseURI(B),Z=stripHash(this.reference.uri)===L,ee=!Z,!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return;j=await this.toReference(unsanitize(B));const s=fromURIReference(B),o=maybeRefractToSchemaElement(j.value.result);Y=apidom_evaluate(o,s),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y)}}catch(s){if(!(z&&s instanceof rx))throw s;if(isAnchor(uriToAnchor(B))){if(Z=stripHash(this.reference.uri)===L,ee=!Z,!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return;j=await this.toReference(unsanitize(B));const s=uriToAnchor(B),o=maybeRefractToSchemaElement(j.value.result);Y=$anchor_evaluate(s,o),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y)}else{if(L=this.toBaseURI(serializers_value(B)),Z=stripHash(this.reference.uri)===L,ee=!Z,!this.options.resolve.internal&&Z)return;if(!this.options.resolve.external&&ee)return;j=await this.toReference(unsanitize(B));const s=fromURIReference(B),o=maybeRefractToSchemaElement(j.value.result);Y=apidom_evaluate(o,s),Y=maybeRefractToSchemaElement(Y),Y.id=_x.identify(Y)}}if(s===Y)throw new Ko(\"Recursive Schema Object reference detected\");if(this.indirections.length>this.options.dereference.maxDepth)throw new nx(`Maximum dereference depth of \"${this.options.dereference.maxDepth}\" has been exceeded in file \"${this.reference.uri}\"`);if(o.includes(Y)){if(j.refSet.circular=!0,\"error\"===this.options.dereference.circular)throw new Ko(\"Circular reference detected\");if(\"replace\"===this.options.dereference.circular){var w,x;const o=new Su.sI(Y.id,{type:\"json-schema\",uri:j.uri,$ref:serializers_value(s.$ref),baseURI:resolve(L,B),referencingElement:s}),a=(null!==(w=null===(x=this.options.dereference.strategyOpts[\"openapi-3-1\"])||void 0===x?void 0:x.circularReplacer)&&void 0!==w?w:this.options.dereference.circularReplacer)(o);return _.replaceWith(a,dereference_mutationReplacer),!i&&a}}const ie=stripHash(j.refSet.rootRef.uri)!==j.uri,ae=[\"error\",\"replace\"].includes(this.options.dereference.circular);if((ee||ie||pE(Y)&&Pu(Y.$ref)||ae)&&!o.includesCycle(Y)){var C;a.add(s);const _=new OpenAPI3_1SwaggerClientDereferenceVisitor({reference:j,namespace:this.namespace,indirections:[...this.indirections],options:this.options,useCircularStructures:this.useCircularStructures,allowMetaPatches:this.allowMetaPatches,ancestors:o,basePath:null!==(C=this.basePath)&&void 0!==C?C:[...to_path([...u,i,s]),\"$ref\"]});Y=await bx(Y,_,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}),a.delete(s)}if(this.indirections.pop(),predicates_isBooleanJsonSchemaElement(Y)){const o=cloneDeep(Y);return o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",j.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),_.replaceWith(o,dereference_mutationReplacer),!i&&o}if(pE(Y)){const o=new uS([...Y.content],cloneDeep(Y.meta),cloneDeep(Y.attributes));if(s.forEach(((s,i,a)=>{o.remove(serializers_value(i)),o.content.push(a)})),o.remove(\"$ref\"),o.setMetaProperty(\"ref-fields\",{$ref:serializers_value(s.$ref)}),o.setMetaProperty(\"ref-origin\",j.uri),o.setMetaProperty(\"ref-referencing-element-id\",cloneDeep(_x.identify(s))),this.allowMetaPatches&&void 0===o.get(\"$$ref\")){const s=resolve(L,B);o.set(\"$$ref\",s)}Y=o}return _.replaceWith(Y,dereference_mutationReplacer),i?void 0:Y}catch(o){var j,L,B;const a=get_root_cause(o),_=new yx(`Could not resolve reference: ${a.message}`,{baseDoc:this.reference.uri,$ref:serializers_value(s.$ref),fullPath:null!==(j=this.basePath)&&void 0!==j?j:[...to_path([...u,i,s]),\"$ref\"],cause:a});return void(null===(L=this.options.dereference.dereferenceOpts)||void 0===L||null===(L=L.errors)||void 0===L||null===(B=L.push)||void 0===B||B.call(L,_))}}async LinkElement(){}async ExampleElement(s,o,i,a,u,_){try{return await super.ExampleElement(s,o,i,a,u,_)}catch(o){var w,x,C;const a=get_root_cause(o),_=vx(a,{baseDoc:this.reference.uri,externalValue:serializers_value(s.externalValue),fullPath:null!==(w=this.basePath)&&void 0!==w?w:[...to_path([...u,i,s]),\"externalValue\"]});return void(null===(x=this.options.dereference.dereferenceOpts)||void 0===x||null===(x=x.errors)||void 0===x||null===(C=x.push)||void 0===C||C.call(x,_))}}}const Sx=OpenAPI3_1SwaggerClientDereferenceVisitor,Ex=mergeAll[Symbol.for(\"nodejs.util.promisify.custom\")];const wx=class RootVisitor{constructor({parameterMacro:s,modelPropertyMacro:o,mode:i,options:a,...u}){const _=[];_.push(new Sx({...u,options:a})),\"function\"==typeof o&&_.push(new px({modelPropertyMacro:o,options:a})),\"strict\"!==i&&_.push(new mx({options:a})),\"function\"==typeof s&&_.push(new gx({parameterMacro:s,options:a}));const w=Ex(_,{nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType});Object.assign(this,w)}},xx=visitor_visit[Symbol.for(\"nodejs.util.promisify.custom\")];const kx=class OpenAPI3_1SwaggerClientDereferenceStrategy extends ux{allowMetaPatches;parameterMacro;modelPropertyMacro;mode;ancestors;constructor({allowMetaPatches:s=!1,parameterMacro:o=null,modelPropertyMacro:i=null,mode:a=\"non-strict\",ancestors:u=[],..._}={}){super({..._}),this.name=\"openapi-3-1-swagger-client\",this.allowMetaPatches=s,this.parameterMacro=o,this.modelPropertyMacro=i,this.mode=a,this.ancestors=[...u]}async dereference(s,o){var i;const a=createNamespace(hw),u=null!==(i=o.dereference.refSet)&&void 0!==i?i:new yw,_=new yw;let w,x=u;u.has(s.uri)?w=u.find((o=>o.uri===s.uri)):(w=new gw({uri:s.uri,value:s.parseResult}),u.add(w)),o.dereference.immutable&&(u.refs.map((s=>new gw({...s,value:cloneDeep(s.value)}))).forEach((s=>_.add(s))),w=_.find((o=>o.uri===s.uri)),x=_);const C=new wx({reference:w,namespace:a,options:o,allowMetaPatches:this.allowMetaPatches,ancestors:this.ancestors,modelPropertyMacro:this.modelPropertyMacro,mode:this.mode,parameterMacro:this.parameterMacro}),j=await xx(x.rootRef.value,C,{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType});return o.dereference.immutable&&_.refs.filter((s=>s.uri.startsWith(\"immutable://\"))).map((s=>new gw({...s,uri:s.uri.replace(/^immutable:\\/\\//,\"\")}))).forEach((s=>u.add(s))),null===o.dereference.refSet&&u.clean(),_.clean(),j}},circularReplacer=s=>{const o=serializers_value(s.meta.get(\"baseURI\")),i=s.meta.get(\"referencingElement\");return new Su.Sh({$ref:o},cloneDeep(i.meta),cloneDeep(i.attributes))},resolveOpenAPI31Strategy=async s=>{const{spec:o,timeout:i,redirects:a,requestInterceptor:u,responseInterceptor:_,pathDiscriminator:w=[],allowMetaPatches:x=!1,useCircularStructures:C=!1,skipNormalization:j=!1,parameterMacro:L=null,modelPropertyMacro:B=null,mode:$=\"non-strict\",strategies:V}=s;try{const{cache:U}=resolveOpenAPI31Strategy,z=V.find((s=>s.match(o))),Y=isHttpUrl(url_cwd())?url_cwd():Ll,Z=options_retrievalURI(s),ee=resolve(Y,Z);let ie;U.has(o)?ie=U.get(o):(ie=Pb.refract(o),ie.classes.push(\"result\"),U.set(o,ie));const ae=new Cu([ie]),ce=es_compile(w),le=\"\"===ce?\"\":`#${ce}`,pe=apidom_evaluate(ie,ce),de=new gw({uri:ee,value:ae}),fe=new yw({refs:[de]});\"\"!==ce&&(fe.rootRef=void 0);const ye=[new Set([pe])],be=[],_e=await(async(s,o={})=>{const i=util_merge(bw,o);return dereferenceApiDOM(s,i)})(pe,{resolve:{baseURI:`${ee}${le}`,resolvers:[new qw({timeout:i||1e4,redirects:a||10})],resolverOpts:{swaggerHTTPClientConfig:{requestInterceptor:u,responseInterceptor:_}},strategies:[new Mw]},parse:{mediaType:mw.latest(),parsers:[new zw({allowEmpty:!1,sourceMap:!1}),new Ww({allowEmpty:!1,sourceMap:!1}),new Vw({allowEmpty:!1,sourceMap:!1}),new Uw({allowEmpty:!1,sourceMap:!1}),new Tw({allowEmpty:!1,sourceMap:!1})]},dereference:{maxDepth:100,strategies:[new kx({allowMetaPatches:x,useCircularStructures:C,parameterMacro:L,modelPropertyMacro:B,mode:$,ancestors:ye})],refSet:fe,dereferenceOpts:{errors:be},immutable:!1,circular:C?\"ignore\":\"replace\",circularReplacer:C?bw.dereference.circularReplacer:circularReplacer}}),Se=((s,o,i)=>new gp({element:i}).transclude(s,o))(pe,_e,ie),we=j?Se:z.normalize(Se);return{spec:serializers_value(we),errors:be}}catch(s){if(s instanceof Lp)return{spec:o,errors:[]};throw s}};resolveOpenAPI31Strategy.cache=new WeakMap;const Ox=resolveOpenAPI31Strategy;function _clone(s,o,i){if(i||(i=new Cx),function _isPrimitive(s){var o=typeof s;return null==s||\"object\"!=o&&\"function\"!=o}(s))return s;var a=function copy(a){var u=i.get(s);if(u)return u;for(var _ in i.set(s,a),s)Object.prototype.hasOwnProperty.call(s,_)&&(a[_]=o?_clone(s[_],!0,i):s[_]);return a};switch(ra(s)){case\"Object\":return a(Object.create(Object.getPrototypeOf(s)));case\"Array\":return a(Array(s.length));case\"Date\":return new Date(s.valueOf());case\"RegExp\":return _cloneRegExp(s);case\"Int8Array\":case\"Uint8Array\":case\"Uint8ClampedArray\":case\"Int16Array\":case\"Uint16Array\":case\"Int32Array\":case\"Uint32Array\":case\"Float32Array\":case\"Float64Array\":case\"BigInt64Array\":case\"BigUint64Array\":return s.slice();default:return s}}var Cx=function(){function _ObjectMap(){this.map={},this.length=0}return _ObjectMap.prototype.set=function(s,o){var i=this.hash(s),a=this.map[i];a||(this.map[i]=a=[]),a.push([s,o]),this.length+=1},_ObjectMap.prototype.hash=function(s){var o=[];for(var i in s)o.push(Object.prototype.toString.call(s[i]));return o.join()},_ObjectMap.prototype.get=function(s){if(this.length<=180)for(var o in this.map)for(var i=this.map[o],a=0;a<i.length;a+=1){if((_=i[a])[0]===s)return _[1]}else{var u=this.hash(s);if(i=this.map[u])for(a=0;a<i.length;a+=1){var _;if((_=i[a])[0]===s)return _[1]}}},_ObjectMap}(),Ax=function(){function XReduceBy(s,o,i,a){this.valueFn=s,this.valueAcc=o,this.keyFn=i,this.xf=a,this.inputs={}}return XReduceBy.prototype[\"@@transducer/init\"]=_xfBase_init,XReduceBy.prototype[\"@@transducer/result\"]=function(s){var o;for(o in this.inputs)if(_has(o,this.inputs)&&(s=this.xf[\"@@transducer/step\"](s,this.inputs[o]))[\"@@transducer/reduced\"]){s=s[\"@@transducer/value\"];break}return this.inputs=null,this.xf[\"@@transducer/result\"](s)},XReduceBy.prototype[\"@@transducer/step\"]=function(s,o){var i=this.keyFn(o);return this.inputs[i]=this.inputs[i]||[i,_clone(this.valueAcc,!1)],this.inputs[i][1]=this.valueFn(this.inputs[i][1],o),s},XReduceBy}();function _xreduceBy(s,o,i){return function(a){return new Ax(s,o,i,a)}}var jx=_curryN(4,[],_dispatchable([],_xreduceBy,(function reduceBy(s,o,i,a){var u=_xwrap((function(a,u){var _=i(u),w=s(_has(_,a)?a[_]:_clone(o,!1),u);return w&&w[\"@@transducer/reduced\"]?_reduced(a):(a[_]=w,a)}));return wa(u,{},a)})));const Px=_curry2(_checkForMethod(\"groupBy\",jx((function(s,o){return s.push(o),s}),[])));const Ix=class NormalizeStorage{internalStore;constructor(s,o,i){this.storageElement=s,this.storageField=o,this.storageSubField=i}get store(){if(!this.internalStore){let s=this.storageElement.get(this.storageField);Mu(s)||(s=new Su.Sh,this.storageElement.set(this.storageField,s));let o=s.get(this.storageSubField);Ru(o)||(o=new Su.wE,s.set(this.storageSubField,o)),this.internalStore=o}return this.internalStore}append(s){this.includes(s)||this.store.push(s)}includes(s){return this.store.includes(s)}},removeSpaces=s=>s.replace(/\\s/g,\"\"),normalize_operation_ids_replaceSpecialCharsWithUnderscore=s=>s.replace(/\\W/gi,\"_\"),normalizeOperationId=(s,o,i)=>{const a=removeSpaces(s);return a.length>0?normalize_operation_ids_replaceSpecialCharsWithUnderscore(a):((s,o)=>`${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(o.toLowerCase()))}${normalize_operation_ids_replaceSpecialCharsWithUnderscore(removeSpaces(s))}`)(o,i)},normalize_operation_ids=({storageField:s=\"x-normalized\",operationIdNormalizer:o=normalizeOperationId}={})=>i=>{const{predicates:a,ancestorLineageToJSONPointer:u,namespace:_}=i,w=[],x=[],C=[];let j;return{visitor:{OpenApi3_1Element:{enter(o){j=new Ix(o,s,\"operation-ids\")},leave(){const s=Px((s=>serializers_value(s.operationId)),x);Object.entries(s).forEach((([s,o])=>{Array.isArray(o)&&(o.length<=1||o.forEach(((o,i)=>{const a=`${s}${i+1}`;o.operationId=new _.elements.String(a)})))})),C.forEach((s=>{if(void 0===s.operationId)return;const o=String(serializers_value(s.operationId)),i=x.find((s=>serializers_value(s.meta.get(\"originalOperationId\"))===o));void 0!==i&&(s.operationId=cloneDeep.safe(i.operationId),s.meta.set(\"originalOperationId\",o),s.set(\"__originalOperationId\",o))})),x.length=0,C.length=0,j=void 0}},PathItemElement:{enter(s){const o=Na(\"path\",serializers_value(s.meta.get(\"path\")));w.push(o)},leave(){w.pop()}},OperationElement:{enter(s,i,a,C,L){if(void 0===s.operationId)return;const B=u([...L,a,s]);if(j.includes(B))return;const $=String(serializers_value(s.operationId)),V=Ba(w),U=Na(\"method\",serializers_value(s.meta.get(\"http-method\"))),z=o($,V,U);$!==z&&(s.operationId=new _.elements.String(z),s.set(\"__originalOperationId\",$),s.meta.set(\"originalOperationId\",$),x.push(s),j.append(B))}},LinkElement:{leave(s){a.isLinkElement(s)&&void 0!==s.operationId&&C.push(s)}}}}},normalize_parameters=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o,parameterEquals=(s,o)=>!!i.isParameterElement(s)&&(!!i.isParameterElement(o)&&(!!i.isStringElement(s.name)&&(!!i.isStringElement(s.in)&&(!!i.isStringElement(o.name)&&(!!i.isStringElement(o.in)&&(serializers_value(s.name)===serializers_value(o.name)&&serializers_value(s.in)===serializers_value(o.in))))))),u=[];let _;return{visitor:{OpenApi3_1Element:{enter(o){_=new Ix(o,s,\"parameters\")},leave(){_=void 0}},PathItemElement:{enter(s,o,a,_,w){if(w.some(i.isComponentsElement))return;const{parameters:x}=s;i.isArrayElement(x)?u.push([...x.content]):u.push([])},leave(){u.pop()}},OperationElement:{leave(s,o,i,w,x){const C=Ba(u);if(!Array.isArray(C)||0===C.length)return;const j=a([...x,i,s]);if(_.includes(j))return;const L=Xw([],[\"parameters\",\"content\"],s),B=fx(parameterEquals,[...L,...C]);s.parameters=new Sv(B),_.append(j)}}}}},normalize_security_requirements=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o;let u,_;return{visitor:{OpenApi3_1Element:{enter(o){_=new Ix(o,s,\"security-requirements\"),i.isArrayElement(o.security)&&(u=o.security)},leave(){_=void 0,u=void 0}},OperationElement:{leave(s,o,w,x,C){if(C.some(i.isComponentsElement))return;const j=a([...C,w,s]);if(_.includes(j))return;var L;void 0===s.security&&void 0!==u&&(s.security=new Cv(null===(L=u)||void 0===L?void 0:L.content),_.append(j))}}}}},normalize_parameter_examples=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o;let u;return{visitor:{OpenApi3_1Element:{enter(o){u=new Ix(o,s,\"parameter-examples\")},leave(){u=void 0}},ParameterElement:{leave(s,o,_,w,x){var C,j;if(x.some(i.isComponentsElement))return;if(void 0===s.schema||!i.isSchemaElement(s.schema))return;if(void 0===(null===(C=s.schema)||void 0===C?void 0:C.example)&&void 0===(null===(j=s.schema)||void 0===j?void 0:j.examples))return;const L=a([...x,_,s]);if(!u.includes(L)){if(void 0!==s.examples&&i.isObjectElement(s.examples)){const o=s.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==s.schema.examples&&(s.schema.set(\"examples\",o),u.append(L)),void(void 0!==s.schema.example&&(s.schema.set(\"example\",o[0]),u.append(L)))}void 0!==s.example&&(void 0!==s.schema.examples&&(s.schema.set(\"examples\",[cloneDeep(s.example)]),u.append(L)),void 0!==s.schema.example&&(s.schema.set(\"example\",cloneDeep(s.example)),u.append(L)))}}}}}},normalize_header_examples=({storageField:s=\"x-normalized\"}={})=>o=>{const{predicates:i,ancestorLineageToJSONPointer:a}=o;let u;return{visitor:{OpenApi3_1Element:{enter(o){u=new Ix(o,s,\"header-examples\")},leave(){u=void 0}},HeaderElement:{leave(s,o,_,w,x){var C,j;if(x.some(i.isComponentsElement))return;if(void 0===s.schema||!i.isSchemaElement(s.schema))return;if(void 0===(null===(C=s.schema)||void 0===C?void 0:C.example)&&void 0===(null===(j=s.schema)||void 0===j?void 0:j.examples))return;const L=a([...x,_,s]);if(!u.includes(L)){if(void 0!==s.examples&&i.isObjectElement(s.examples)){const o=s.examples.map((s=>cloneDeep.safe(s.value)));return void 0!==s.schema.examples&&(s.schema.set(\"examples\",o),u.append(L)),void(void 0!==s.schema.example&&(s.schema.set(\"example\",o[0]),u.append(L)))}void 0!==s.example&&(void 0!==s.schema.examples&&(s.schema.set(\"examples\",[cloneDeep(s.example)]),u.append(L)),void 0!==s.schema.example&&(s.schema.set(\"example\",cloneDeep(s.example)),u.append(L)))}}}}}},openapi_3_1_apidom_normalize=s=>{if(!Mu(s))return s;const o=[normalize_operation_ids({operationIdNormalizer:(s,o,i)=>opId({operationId:s},o,i,{v2OperationIdCompatibilityMode:!1})}),normalize_parameters(),normalize_security_requirements(),normalize_parameter_examples(),normalize_header_examples()];return dispatchPluginsSync(s,o,{toolboxCreator:apidom_ns_openapi_3_1_src_refractor_toolbox,visitorOptions:{keyMap:uw,nodeTypeGetter:apidom_ns_openapi_3_1_src_traversal_visitor_getNodeType}})},Tx={name:\"openapi-3-1-apidom\",match:s=>isOpenAPI31(s),normalize(s){if(!ju(s)&&fu(s)&&!s.$$normalized){const i=(o=openapi_3_1_apidom_normalize,s=>{const i=Pb.refract(s);i.classes.push(\"result\");const a=o(i),u=serializers_value(a);return Ox.cache.set(u,a),serializers_value(a)})(s);return i.$$normalized=!0,i}var o;return ju(s)?openapi_3_1_apidom_normalize(s):s},resolve:async s=>Ox(s)},Nx=Tx,makeResolve=s=>async o=>(async s=>{const{spec:o,requestInterceptor:i,responseInterceptor:a}=s,u=options_retrievalURI(s),_=options_httpClient(s),w=o||await makeFetchJSON(_,{requestInterceptor:i,responseInterceptor:a})(u),x={...s,spec:w};return s.strategies.find((s=>s.match(w))).resolve(x)})({...s,...o}),Mx=makeResolve({strategies:[_u,vu,gu]});const server_url_template=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"server-url-template\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},callbacks_server_variable=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"server-variable\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},server_variable_name=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"server-variable-name\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},callbacks_literals=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"literals\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},Rx=new function server_url_templating_grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"server-url-template\",lower:\"server-url-template\",index:0,isBkr:!1},this.rules[1]={name:\"server-variable\",lower:\"server-variable\",index:1,isBkr:!1},this.rules[2]={name:\"server-variable-name\",lower:\"server-variable-name\",index:2,isBkr:!1},this.rules[3]={name:\"literals\",lower:\"literals\",index:3,isBkr:!1},this.rules[4]={name:\"DIGIT\",lower:\"digit\",index:4,isBkr:!1},this.rules[5]={name:\"HEXDIG\",lower:\"hexdig\",index:5,isBkr:!1},this.rules[6]={name:\"pct-encoded\",lower:\"pct-encoded\",index:6,isBkr:!1},this.rules[7]={name:\"ucschar\",lower:\"ucschar\",index:7,isBkr:!1},this.rules[8]={name:\"iprivate\",lower:\"iprivate\",index:8,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4]},this.rules[2].opcodes[2]={type:5,min:0,max:122},this.rules[2].opcodes[3]={type:6,string:[124]},this.rules[2].opcodes[4]={type:5,min:126,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:5,min:38,max:59},this.rules[3].opcodes[5]={type:6,string:[61]},this.rules[3].opcodes[6]={type:5,min:63,max:91},this.rules[3].opcodes[7]={type:6,string:[93]},this.rules[3].opcodes[8]={type:6,string:[95]},this.rules[3].opcodes[9]={type:5,min:97,max:122},this.rules[3].opcodes[10]={type:6,string:[126]},this.rules[3].opcodes[11]={type:4,index:7},this.rules[3].opcodes[12]={type:4,index:8},this.rules[3].opcodes[13]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:5,min:48,max:57},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[5].opcodes[1]={type:4,index:4},this.rules[5].opcodes[2]={type:7,string:[97]},this.rules[5].opcodes[3]={type:7,string:[98]},this.rules[5].opcodes[4]={type:7,string:[99]},this.rules[5].opcodes[5]={type:7,string:[100]},this.rules[5].opcodes[6]={type:7,string:[101]},this.rules[5].opcodes[7]={type:7,string:[102]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,3]},this.rules[6].opcodes[1]={type:7,string:[37]},this.rules[6].opcodes[2]={type:4,index:5},this.rules[6].opcodes[3]={type:4,index:5},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[7].opcodes[1]={type:5,min:160,max:55295},this.rules[7].opcodes[2]={type:5,min:63744,max:64975},this.rules[7].opcodes[3]={type:5,min:65008,max:65519},this.rules[7].opcodes[4]={type:5,min:65536,max:131069},this.rules[7].opcodes[5]={type:5,min:131072,max:196605},this.rules[7].opcodes[6]={type:5,min:196608,max:262141},this.rules[7].opcodes[7]={type:5,min:262144,max:327677},this.rules[7].opcodes[8]={type:5,min:327680,max:393213},this.rules[7].opcodes[9]={type:5,min:393216,max:458749},this.rules[7].opcodes[10]={type:5,min:458752,max:524285},this.rules[7].opcodes[11]={type:5,min:524288,max:589821},this.rules[7].opcodes[12]={type:5,min:589824,max:655357},this.rules[7].opcodes[13]={type:5,min:655360,max:720893},this.rules[7].opcodes[14]={type:5,min:720896,max:786429},this.rules[7].opcodes[15]={type:5,min:786432,max:851965},this.rules[7].opcodes[16]={type:5,min:851968,max:917501},this.rules[7].opcodes[17]={type:5,min:921600,max:983037},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:57344,max:63743},this.rules[8].opcodes[2]={type:5,min:983040,max:1048573},this.rules[8].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function toString(){let s=\"\";return s+=\"; OpenAPI Server URL templating ABNF syntax\\n\",s+=\"server-url-template    = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\\n\",s+='server-variable        = \"{\" server-variable-name \"}\"\\n',s+=\"server-variable-name   = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\",s+=\"\\n\",s+=\"; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\\n\",s+=\"; https://www.rfc-editor.org/errata/eid6937\\n\",s+=\"literals               = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\\n\",s+=\"                       / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\\n\",s+=\"                       / pct-encoded)\\n\",s+=\"                            ; any Unicode character except: CTL, SP,\\n\",s+='                            ;  DQUOTE, \"%\" (aside from pct-encoded),\\n',s+='                            ;  \"<\", \">\", \"\\\\\", \"^\", \"`\", \"{\", \"|\", \"}\"\\n',s+=\"\\n\",s+=\"; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\\n\",s+=\"DIGIT          =  %x30-39             ; 0-9\\n\",s+='HEXDIG         =  DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\" ; case-insensitive\\n',s+=\"\\n\",s+='pct-encoded    =  \"%\" HEXDIG HEXDIG\\n',s+=\"\\n\",s+=\"ucschar        =  %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\\n\",s+=\"               /  %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\\n\",s+=\"               /  %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\\n\",s+=\"               /  %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\\n\",s+=\"               /  %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\\n\",s+=\"               /  %xD0000-DFFFD / %xE1000-EFFFD\\n\",s+=\"\\n\",s+=\"iprivate       =  %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\\n\",'; OpenAPI Server URL templating ABNF syntax\\nserver-url-template    = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\\nserver-variable        = \"{\" server-variable-name \"}\"\\nserver-variable-name   = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\\n; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\\n; https://www.rfc-editor.org/errata/eid6937\\nliterals               = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\\n                       / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\\n                       / pct-encoded)\\n                            ; any Unicode character except: CTL, SP,\\n                            ;  DQUOTE, \"%\" (aside from pct-encoded),\\n                            ;  \"<\", \">\", \"\\\\\", \"^\", \"`\", \"{\", \"|\", \"}\"\\n\\n; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\\nDIGIT          =  %x30-39             ; 0-9\\nHEXDIG         =  DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\" ; case-insensitive\\n\\npct-encoded    =  \"%\" HEXDIG HEXDIG\\n\\nucschar        =  %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\\n               /  %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\\n               /  %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\\n               /  %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\\n               /  %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\\n               /  %xD0000-DFFFD / %xE1000-EFFFD\\n\\niprivate       =  %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\\n'}},openapi_server_url_templating_es_parse=s=>{const o=new yp;o.ast=new vp,o.ast.callbacks[\"server-url-template\"]=server_url_template,o.ast.callbacks[\"server-variable\"]=callbacks_server_variable,o.ast.callbacks[\"server-variable-name\"]=server_variable_name,o.ast.callbacks.literals=callbacks_literals;return{result:o.parse(Rx,\"server-url-template\",s),ast:o.ast}},openapi_server_url_templating_es_test=(s,{strict:o=!1}={})=>{try{const i=openapi_server_url_templating_es_parse(s);if(!i.result.success)return!1;const a=[];i.ast.translate(a);const u=a.some((([s])=>\"server-variable\"===s));if(!o&&!u)try{return new URL(s,\"https://vladimirgorej.com\"),!0}catch{return!1}return!o||u}catch{return!1}},encodeServerVariable=s=>(s=>{try{return\"string\"==typeof s&&decodeURIComponent(s)!==s}catch{return!1}})(s)?s:encodeURIComponent(s).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\"),Dx=[\"literals\",\"server-variable-name\"],es_substitute=(s,o,i={})=>{const a={...{encoder:encodeServerVariable},...i},u=openapi_server_url_templating_es_parse(s);if(!u.result.success)return s;const _=[];u.ast.translate(_);const w=_.filter((([s])=>Dx.includes(s))).map((([s,i])=>\"server-variable-name\"===s?Object.hasOwn(o,i)?a.encoder(o[i],i):`{${i}}`:i));return w.join(\"\")};function path_templating_grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"path-template\",lower:\"path-template\",index:0,isBkr:!1},this.rules[1]={name:\"path-segment\",lower:\"path-segment\",index:1,isBkr:!1},this.rules[2]={name:\"slash\",lower:\"slash\",index:2,isBkr:!1},this.rules[3]={name:\"path-literal\",lower:\"path-literal\",index:3,isBkr:!1},this.rules[4]={name:\"template-expression\",lower:\"template-expression\",index:4,isBkr:!1},this.rules[5]={name:\"template-expression-param-name\",lower:\"template-expression-param-name\",index:5,isBkr:!1},this.rules[6]={name:\"pchar\",lower:\"pchar\",index:6,isBkr:!1},this.rules[7]={name:\"unreserved\",lower:\"unreserved\",index:7,isBkr:!1},this.rules[8]={name:\"pct-encoded\",lower:\"pct-encoded\",index:8,isBkr:!1},this.rules[9]={name:\"sub-delims\",lower:\"sub-delims\",index:9,isBkr:!1},this.rules[10]={name:\"ALPHA\",lower:\"alpha\",index:10,isBkr:!1},this.rules[11]={name:\"DIGIT\",lower:\"digit\",index:11,isBkr:!1},this.rules[12]={name:\"HEXDIG\",lower:\"hexdig\",index:12,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:2},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:1},this.rules[0].opcodes[5]={type:4,index:2},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:1,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:4},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:7,string:[47]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:2,children:[1,2,3]},this.rules[4].opcodes[1]={type:7,string:[123]},this.rules[4].opcodes[2]={type:4,index:5},this.rules[4].opcodes[3]={type:7,string:[125]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:3,min:1,max:1/0},this.rules[5].opcodes[1]={type:1,children:[2,3,4]},this.rules[5].opcodes[2]={type:5,min:0,max:122},this.rules[5].opcodes[3]={type:6,string:[124]},this.rules[5].opcodes[4]={type:5,min:126,max:1114111},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[6].opcodes[4]={type:7,string:[58]},this.rules[6].opcodes[5]={type:7,string:[64]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[7].opcodes[1]={type:4,index:10},this.rules[7].opcodes[2]={type:4,index:11},this.rules[7].opcodes[3]={type:7,string:[45]},this.rules[7].opcodes[4]={type:7,string:[46]},this.rules[7].opcodes[5]={type:7,string:[95]},this.rules[7].opcodes[6]={type:7,string:[126]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:2,children:[1,2,3]},this.rules[8].opcodes[1]={type:7,string:[37]},this.rules[8].opcodes[2]={type:4,index:12},this.rules[8].opcodes[3]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2]},this.rules[10].opcodes[1]={type:5,min:65,max:90},this.rules[10].opcodes[2]={type:5,min:97,max:122},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:5,min:48,max:57},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[12].opcodes[1]={type:4,index:11},this.rules[12].opcodes[2]={type:7,string:[97]},this.rules[12].opcodes[3]={type:7,string:[98]},this.rules[12].opcodes[4]={type:7,string:[99]},this.rules[12].opcodes[5]={type:7,string:[100]},this.rules[12].opcodes[6]={type:7,string:[101]},this.rules[12].opcodes[7]={type:7,string:[102]},this.toString=function toString(){let s=\"\";return s+=\"; OpenAPI Path Templating ABNF syntax\\n\",s+=\"; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\n\",s+=\"path-template                  = slash *( path-segment slash ) [ path-segment ]\\n\",s+=\"path-segment                   = 1*( path-literal / template-expression )\\n\",s+='slash                          = \"/\"\\n',s+=\"path-literal                   = 1*pchar\\n\",s+='template-expression            = \"{\" template-expression-param-name \"}\"\\n',s+=\"template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\n\",s+='pchar               = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\\n',s+='unreserved          = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\\n',s+=\"                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\\n\",s+='pct-encoded         = \"%\" HEXDIG HEXDIG\\n',s+=\"                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\\n\",s+='sub-delims          = \"!\" / \"$\" / \"&\" / \"\\'\" / \"(\" / \")\"\\n',s+='                    / \"*\" / \"+\" / \",\" / \";\" / \"=\"\\n',s+=\"                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\n\",s+=\"ALPHA               = %x41-5A / %x61-7A   ; A-Z / a-z\\n\",s+=\"DIGIT               = %x30-39            ; 0-9\\n\",s+='HEXDIG              = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\\n','; OpenAPI Path Templating ABNF syntax\\n; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\npath-template                  = slash *( path-segment slash ) [ path-segment ]\\npath-segment                   = 1*( path-literal / template-expression )\\nslash                          = \"/\"\\npath-literal                   = 1*pchar\\ntemplate-expression            = \"{\" template-expression-param-name \"}\"\\ntemplate-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\\n\\n; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\\npchar               = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\\nunreserved          = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\\n                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\\npct-encoded         = \"%\" HEXDIG HEXDIG\\n                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\\nsub-delims          = \"!\" / \"$\" / \"&\" / \"\\'\" / \"(\" / \")\"\\n                    / \"*\" / \"+\" / \",\" / \";\" / \"=\"\\n                    ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\\n\\n; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\nALPHA               = %x41-5A / %x61-7A   ; A-Z / a-z\\nDIGIT               = %x30-39            ; 0-9\\nHEXDIG              = DIGIT / \"A\" / \"B\" / \"C\" / \"D\" / \"E\" / \"F\"\\n'}}const callbacks_slash=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"slash\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),path_template=(s,o,i,a,u)=>{if(s===Ep.SEM_PRE){if(!1===Array.isArray(u))throw new Error(\"parser's user data must be an array\");u.push([\"path-template\",Sp.charsToString(o,i,a)])}return Ep.SEM_OK},path_literal=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"path-literal\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),template_expression=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"template-expression\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),template_expression_param_name=(s,o,i,a,u)=>(s===Ep.SEM_PRE?u.push([\"template-expression-param-name\",Sp.charsToString(o,i,a)]):Ep.SEM_POST,Ep.SEM_OK),Lx=new path_templating_grammar,openapi_path_templating_es_parse=s=>{const o=new yp;o.ast=new vp,o.ast.callbacks[\"path-template\"]=path_template,o.ast.callbacks.slash=callbacks_slash,o.ast.callbacks[\"path-literal\"]=path_literal,o.ast.callbacks[\"template-expression\"]=template_expression,o.ast.callbacks[\"template-expression-param-name\"]=template_expression_param_name;return{result:o.parse(Lx,\"path-template\",s),ast:o.ast}},encodePathComponent=s=>(s=>{try{return\"string\"==typeof s&&decodeURIComponent(s)!==s}catch{return!1}})(s)?s:encodeURIComponent(s).replace(/%5B/g,\"[\").replace(/%5D/g,\"]\"),Fx=[\"slash\",\"path-literal\",\"template-expression-param-name\"],es_resolve=(s,o,i={})=>{const a={...{encoder:encodePathComponent},...i},u=openapi_path_templating_es_parse(s);if(!u.result.success)return s;const _=[];u.ast.translate(_);const w=_.filter((([s])=>Fx.includes(s))).map((([s,i])=>\"template-expression-param-name\"===s?Object.prototype.hasOwnProperty.call(o,i)?a.encoder(o[i],i):`{${i}}`:i));return w.join(\"\")},Bx=(new path_templating_grammar,new yp,{body:function bodyBuilder({req:s,value:o}){void 0!==o&&(s.body=o)},header:function headerBuilder({req:s,parameter:o,value:i}){s.headers=s.headers||{},void 0!==i&&(s.headers[o.name]=i)},query:function queryBuilder({req:s,value:o,parameter:i}){s.query=s.query||{},!1===o&&\"boolean\"===i.type&&(o=\"false\");0===o&&[\"number\",\"integer\"].indexOf(i.type)>-1&&(o=\"0\");if(o)s.query[i.name]={collectionFormat:i.collectionFormat,value:o};else if(i.allowEmptyValue&&void 0!==o){const o=i.name;s.query[o]=s.query[o]||{},s.query[o].allowEmptyValue=!0}},path:function pathBuilder({req:s,value:o,parameter:i,baseURL:a}){if(void 0!==o){const u=s.url.replace(a,\"\"),_=es_resolve(u,{[i.name]:o});s.url=a+_}},formData:function formDataBuilder({req:s,value:o,parameter:i}){!1===o&&\"boolean\"===i.type&&(o=\"false\");0===o&&[\"number\",\"integer\"].indexOf(i.type)>-1&&(o=\"0\");if(o)s.form=s.form||{},s.form[i.name]={collectionFormat:i.collectionFormat,value:o};else if(i.allowEmptyValue&&void 0!==o){s.form=s.form||{};const o=i.name;s.form[o]=s.form[o]||{},s.form[o].allowEmptyValue=!0}}});function serialize(s,o){return o.includes(\"application/json\")?\"string\"==typeof s?s:(Array.isArray(s)&&(s=s.map((s=>{try{return JSON.parse(s)}catch(o){return s}}))),JSON.stringify(s)):String(s)}function grammar_grammar(){this.grammarObject=\"grammarObject\",this.rules=[],this.rules[0]={name:\"lenient-cookie-string\",lower:\"lenient-cookie-string\",index:0,isBkr:!1},this.rules[1]={name:\"lenient-cookie-entry\",lower:\"lenient-cookie-entry\",index:1,isBkr:!1},this.rules[2]={name:\"lenient-cookie-pair\",lower:\"lenient-cookie-pair\",index:2,isBkr:!1},this.rules[3]={name:\"lenient-cookie-pair-invalid\",lower:\"lenient-cookie-pair-invalid\",index:3,isBkr:!1},this.rules[4]={name:\"lenient-cookie-name\",lower:\"lenient-cookie-name\",index:4,isBkr:!1},this.rules[5]={name:\"lenient-cookie-value\",lower:\"lenient-cookie-value\",index:5,isBkr:!1},this.rules[6]={name:\"lenient-quoted-value\",lower:\"lenient-quoted-value\",index:6,isBkr:!1},this.rules[7]={name:\"lenient-quoted-char\",lower:\"lenient-quoted-char\",index:7,isBkr:!1},this.rules[8]={name:\"lenient-cookie-octet\",lower:\"lenient-cookie-octet\",index:8,isBkr:!1},this.rules[9]={name:\"cookie-string\",lower:\"cookie-string\",index:9,isBkr:!1},this.rules[10]={name:\"cookie-pair\",lower:\"cookie-pair\",index:10,isBkr:!1},this.rules[11]={name:\"cookie-name\",lower:\"cookie-name\",index:11,isBkr:!1},this.rules[12]={name:\"cookie-value\",lower:\"cookie-value\",index:12,isBkr:!1},this.rules[13]={name:\"cookie-octet\",lower:\"cookie-octet\",index:13,isBkr:!1},this.rules[14]={name:\"OWS\",lower:\"ows\",index:14,isBkr:!1},this.rules[15]={name:\"token\",lower:\"token\",index:15,isBkr:!1},this.rules[16]={name:\"tchar\",lower:\"tchar\",index:16,isBkr:!1},this.rules[17]={name:\"CHAR\",lower:\"char\",index:17,isBkr:!1},this.rules[18]={name:\"CTL\",lower:\"ctl\",index:18,isBkr:!1},this.rules[19]={name:\"separators\",lower:\"separators\",index:19,isBkr:!1},this.rules[20]={name:\"SP\",lower:\"sp\",index:20,isBkr:!1},this.rules[21]={name:\"HT\",lower:\"ht\",index:21,isBkr:!1},this.rules[22]={name:\"ALPHA\",lower:\"alpha\",index:22,isBkr:!1},this.rules[23]={name:\"DIGIT\",lower:\"digit\",index:23,isBkr:!1},this.rules[24]={name:\"DQUOTE\",lower:\"dquote\",index:24,isBkr:!1},this.rules[25]={name:\"WSP\",lower:\"wsp\",index:25,isBkr:!1},this.rules[26]={name:\"HTAB\",lower:\"htab\",index:26,isBkr:!1},this.rules[27]={name:\"CRLF\",lower:\"crlf\",index:27,isBkr:!1},this.rules[28]={name:\"CR\",lower:\"cr\",index:28,isBkr:!1},this.rules[29]={name:\"LF\",lower:\"lf\",index:29,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5,6]},this.rules[0].opcodes[4]={type:7,string:[59]},this.rules[0].opcodes[5]={type:4,index:14},this.rules[0].opcodes[6]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:1,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4,5,6,7]},this.rules[2].opcodes[1]={type:4,index:14},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:7,string:[61]},this.rules[2].opcodes[5]={type:4,index:14},this.rules[2].opcodes[6]={type:4,index:5},this.rules[2].opcodes[7]={type:4,index:14},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,4]},this.rules[3].opcodes[1]={type:4,index:14},this.rules[3].opcodes[2]={type:3,min:1,max:1/0},this.rules[3].opcodes[3]={type:4,index:16},this.rules[3].opcodes[4]={type:4,index:14},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4]},this.rules[4].opcodes[2]={type:5,min:33,max:58},this.rules[4].opcodes[3]={type:6,string:[60]},this.rules[4].opcodes[4]={type:5,min:62,max:126},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,6]},this.rules[5].opcodes[1]={type:2,children:[2,3]},this.rules[5].opcodes[2]={type:4,index:6},this.rules[5].opcodes[3]={type:3,min:0,max:1},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:4,index:8},this.rules[5].opcodes[6]={type:3,min:0,max:1/0},this.rules[5].opcodes[7]={type:4,index:8},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,4]},this.rules[6].opcodes[1]={type:4,index:24},this.rules[6].opcodes[2]={type:3,min:0,max:1/0},this.rules[6].opcodes[3]={type:4,index:7},this.rules[6].opcodes[4]={type:4,index:24},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:5,min:32,max:33},this.rules[7].opcodes[2]={type:5,min:35,max:126},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:33,max:43},this.rules[8].opcodes[2]={type:5,min:45,max:58},this.rules[8].opcodes[3]={type:5,min:60,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:2,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:10},this.rules[9].opcodes[2]={type:3,min:0,max:1/0},this.rules[9].opcodes[3]={type:2,children:[4,5,6]},this.rules[9].opcodes[4]={type:7,string:[59]},this.rules[9].opcodes[5]={type:4,index:20},this.rules[9].opcodes[6]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:2,children:[1,2,3]},this.rules[10].opcodes[1]={type:4,index:11},this.rules[10].opcodes[2]={type:7,string:[61]},this.rules[10].opcodes[3]={type:4,index:12},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:4,index:15},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,6]},this.rules[12].opcodes[1]={type:2,children:[2,3,5]},this.rules[12].opcodes[2]={type:4,index:24},this.rules[12].opcodes[3]={type:3,min:0,max:1/0},this.rules[12].opcodes[4]={type:4,index:13},this.rules[12].opcodes[5]={type:4,index:24},this.rules[12].opcodes[6]={type:3,min:0,max:1/0},this.rules[12].opcodes[7]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[13].opcodes[1]={type:6,string:[33]},this.rules[13].opcodes[2]={type:5,min:35,max:43},this.rules[13].opcodes[3]={type:5,min:45,max:58},this.rules[13].opcodes[4]={type:5,min:60,max:91},this.rules[13].opcodes[5]={type:5,min:93,max:126},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:3,min:0,max:1/0},this.rules[14].opcodes[1]={type:2,children:[2,4]},this.rules[14].opcodes[2]={type:3,min:0,max:1},this.rules[14].opcodes[3]={type:4,index:27},this.rules[14].opcodes[4]={type:4,index:25},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:3,min:1,max:1/0},this.rules[15].opcodes[1]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[16].opcodes[1]={type:7,string:[33]},this.rules[16].opcodes[2]={type:7,string:[35]},this.rules[16].opcodes[3]={type:7,string:[36]},this.rules[16].opcodes[4]={type:7,string:[37]},this.rules[16].opcodes[5]={type:7,string:[38]},this.rules[16].opcodes[6]={type:7,string:[39]},this.rules[16].opcodes[7]={type:7,string:[42]},this.rules[16].opcodes[8]={type:7,string:[43]},this.rules[16].opcodes[9]={type:7,string:[45]},this.rules[16].opcodes[10]={type:7,string:[46]},this.rules[16].opcodes[11]={type:7,string:[94]},this.rules[16].opcodes[12]={type:7,string:[95]},this.rules[16].opcodes[13]={type:7,string:[96]},this.rules[16].opcodes[14]={type:7,string:[124]},this.rules[16].opcodes[15]={type:7,string:[126]},this.rules[16].opcodes[16]={type:4,index:23},this.rules[16].opcodes[17]={type:4,index:22},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:1,max:127},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2]},this.rules[18].opcodes[1]={type:5,min:0,max:31},this.rules[18].opcodes[2]={type:6,string:[127]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},this.rules[19].opcodes[1]={type:7,string:[40]},this.rules[19].opcodes[2]={type:7,string:[41]},this.rules[19].opcodes[3]={type:7,string:[60]},this.rules[19].opcodes[4]={type:7,string:[62]},this.rules[19].opcodes[5]={type:7,string:[64]},this.rules[19].opcodes[6]={type:7,string:[44]},this.rules[19].opcodes[7]={type:7,string:[59]},this.rules[19].opcodes[8]={type:7,string:[58]},this.rules[19].opcodes[9]={type:7,string:[92]},this.rules[19].opcodes[10]={type:6,string:[34]},this.rules[19].opcodes[11]={type:7,string:[47]},this.rules[19].opcodes[12]={type:7,string:[91]},this.rules[19].opcodes[13]={type:7,string:[93]},this.rules[19].opcodes[14]={type:7,string:[63]},this.rules[19].opcodes[15]={type:7,string:[61]},this.rules[19].opcodes[16]={type:7,string:[123]},this.rules[19].opcodes[17]={type:7,string:[125]},this.rules[19].opcodes[18]={type:4,index:20},this.rules[19].opcodes[19]={type:4,index:21},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:6,string:[32]},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:6,string:[9]},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:1,children:[1,2]},this.rules[22].opcodes[1]={type:5,min:65,max:90},this.rules[22].opcodes[2]={type:5,min:97,max:122},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:5,min:48,max:57},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:6,string:[34]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:1,children:[1,2]},this.rules[25].opcodes[1]={type:4,index:20},this.rules[25].opcodes[2]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:6,string:[9]},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:4,index:28},this.rules[27].opcodes[2]={type:4,index:29},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:6,string:[13]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:6,string:[10]},this.toString=function toString(){let s=\"\";return s+=\"; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\n\",s+='lenient-cookie-string        = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\\n',s+=\"lenient-cookie-entry         = lenient-cookie-pair / lenient-cookie-pair-invalid\\n\",s+='lenient-cookie-pair          = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\\n',s+='lenient-cookie-pair-invalid  = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\\n',s+='lenient-cookie-name          = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\\n',s+=\"lenient-cookie-value         = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\\n\",s+=\"lenient-quoted-value         = DQUOTE *( lenient-quoted-char ) DQUOTE\\n\",s+=\"lenient-quoted-char          = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\\n\",s+=\"lenient-cookie-octet         = %x21-2B / %x2D-3A / %x3C-7E\\n\",s+=\"                             ; Allow all printable characters except CTLs, semicolon and SP\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\n\",s+='cookie-string     = cookie-pair *( \";\" SP cookie-pair )\\n',s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\\n\",s+=\"; https://www.rfc-editor.org/errata/eid5518\\n\",s+='cookie-pair       = cookie-name \"=\" cookie-value\\n',s+=\"cookie-name       = token\\n\",s+=\"cookie-value      = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\\n\",s+=\"                  ; https://www.rfc-editor.org/errata/eid8242\\n\",s+=\"cookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\\n\",s+=\"                       ; US-ASCII characters excluding CTLs,\\n\",s+=\"                       ; whitespace, DQUOTE, comma, semicolon,\\n\",s+=\"                       ; and backslash\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\\n\",s+='OWS            = *( [ CRLF ] WSP ) ; \"optional\" whitespace\\n',s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\\n\",s+=\"token          = 1*(tchar)\\n\",s+='tchar          = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"\\'\" / \"*\"\\n',s+='                 / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\\n',s+=\"                 / DIGIT / ALPHA\\n\",s+=\"                 ; any VCHAR, except delimiters\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\\n\",s+=\"CHAR           = %x01-7F ; any US-ASCII character (octets 0 - 127)\\n\",s+=\"CTL            = %x00-1F / %x7F ; any US-ASCII control character\\n\",s+='separators     = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\\n',s+=\"SP             = %x20 ; US-ASCII SP, space (32)\\n\",s+=\"HT             = %x09 ; US-ASCII HT, horizontal-tab (9)\\n\",s+=\"\\n\",s+=\"; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\n\",s+=\"ALPHA          =  %x41-5A / %x61-7A ; A-Z / a-z\\n\",s+=\"DIGIT          =  %x30-39 ; 0-9\\n\",s+='DQUOTE         =  %x22 ; \" (Double Quote)\\n',s+=\"WSP            =  SP / HTAB ; white space\\n\",s+=\"HTAB           =  %x09 ; horizontal tab\\n\",s+=\"CRLF           =  CR LF ; Internet standard newline\\n\",s+=\"CR             =  %x0D ; carriage return\\n\",s+=\"LF             =  %x0A ; linefeed\\n\",'; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\nlenient-cookie-string        = lenient-cookie-entry *( \";\" OWS lenient-cookie-entry )\\nlenient-cookie-entry         = lenient-cookie-pair / lenient-cookie-pair-invalid\\nlenient-cookie-pair          = OWS lenient-cookie-name OWS \"=\" OWS lenient-cookie-value OWS\\nlenient-cookie-pair-invalid  = OWS 1*tchar OWS ; Allow for standalone entries like \"fizz\" to be ignored\\nlenient-cookie-name          = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except \"=\"\\nlenient-cookie-value         = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\\nlenient-quoted-value         = DQUOTE *( lenient-quoted-char ) DQUOTE\\nlenient-quoted-char          = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\\nlenient-cookie-octet         = %x21-2B / %x2D-3A / %x3C-7E\\n                             ; Allow all printable characters except CTLs, semicolon and SP\\n\\n; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\\ncookie-string     = cookie-pair *( \";\" SP cookie-pair )\\n\\n; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\\n; https://www.rfc-editor.org/errata/eid5518\\ncookie-pair       = cookie-name \"=\" cookie-value\\ncookie-name       = token\\ncookie-value      = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\\n                  ; https://www.rfc-editor.org/errata/eid8242\\ncookie-octet      = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\\n                       ; US-ASCII characters excluding CTLs,\\n                       ; whitespace, DQUOTE, comma, semicolon,\\n                       ; and backslash\\n\\n; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\\nOWS            = *( [ CRLF ] WSP ) ; \"optional\" whitespace\\n\\n; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\\ntoken          = 1*(tchar)\\ntchar          = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"\\'\" / \"*\"\\n                 / \"+\" / \"-\" / \".\" / \"^\" / \"_\" / \"`\" / \"|\" / \"~\"\\n                 / DIGIT / ALPHA\\n                 ; any VCHAR, except delimiters\\n\\n; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\\nCHAR           = %x01-7F ; any US-ASCII character (octets 0 - 127)\\nCTL            = %x00-1F / %x7F ; any US-ASCII control character\\nseparators     = \"(\" / \")\" / \"<\" / \">\" / \"@\" / \",\" / \";\" / \":\" / \"\\\\\" / %x22 / \"/\" / \"[\" / \"]\" / \"?\" / \"=\" / \"{\" / \"}\" / SP / HT\\nSP             = %x20 ; US-ASCII SP, space (32)\\nHT             = %x09 ; US-ASCII HT, horizontal-tab (9)\\n\\n; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\\nALPHA          =  %x41-5A / %x61-7A ; A-Z / a-z\\nDIGIT          =  %x30-39 ; 0-9\\nDQUOTE         =  %x22 ; \" (Double Quote)\\nWSP            =  SP / HTAB ; white space\\nHTAB           =  %x09 ; horizontal tab\\nCRLF           =  CR LF ; Internet standard newline\\nCR             =  %x0D ; carriage return\\nLF             =  %x0A ; linefeed\\n'}}new grammar_grammar;const utils_percentEncodeChar=s=>{if(\"string\"!=typeof s||1!==[...s].length)throw new TypeError(\"Input must be a single character string.\");const o=s.codePointAt(0);return o<=127?`%${o.toString(16).toUpperCase().padStart(2,\"0\")}`:encodeURIComponent(s)},utils_isQuoted=s=>s.length>=2&&s.startsWith('\"')&&s.endsWith('\"'),utils_unquote=s=>utils_isQuoted(s)?s.slice(1,-1):s,utils_quote=s=>`\"${s}\"`,utils_identity=s=>s,$x=new yp,qx=new grammar_grammar,test_cookie_value=(s,{strict:o=!0,quoted:i=null}={})=>{try{const a=o?\"cookie-value\":\"lenient-cookie-value\",u=$x.parse(qx,a,s);return\"boolean\"==typeof i?u.success&&i===utils_isQuoted(s):u.success}catch{return!1}},base64_browser=s=>{const o=(new TextEncoder).encode(s).reduce(((s,o)=>s+String.fromCharCode(o)),\"\");return btoa(o)},cookie_value_strict_base64=(s,o=base64_browser)=>{const i=String(s);if(test_cookie_value(i))return i;const a=utils_isQuoted(i),u=o(a?utils_unquote(i):i);return a?utils_quote(u):u},base64url_browser=s=>(s=>s.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=+$/g,\"\"))(base64_browser(s)),cookie_value_strict_base64url=s=>cookie_value_strict_base64(s,base64url_browser),Vx=new yp,Ux=new grammar_grammar,test_cookie_name=(s,{strict:o=!0}={})=>{try{const i=o?\"cookie-name\":\"lenient-cookie-name\";return Vx.parse(Ux,i,s).success}catch{return!1}},cookie_name_strict=s=>{if(!test_cookie_name(s))throw new TypeError(`Invalid cookie name: ${s}`)},cookie_value_strict=s=>{if(!test_cookie_value(s))throw new TypeError(`Invalid cookie value: ${s}`)},zx={encoders:{name:utils_identity,value:cookie_value_strict_base64url},validators:{name:cookie_name_strict,value:cookie_value_strict}},set_cookie_serialize=(s,o,i={})=>{const a={...zx,...i,encoders:{...zx.encoders,...i.encoders},validators:{...zx.validators,...i.validators}},u=a.encoders.name(s),_=a.encoders.value(o);return a.validators.name(u),a.validators.value(_),`${u}=${_}`},cookie_serialize=(s,o={})=>(Array.isArray(s)?s:\"object\"==typeof s&&null!==s?Object.entries(s):[]).map((([s,i])=>set_cookie_serialize(s,i,o))).join(\"; \"),Wx=new yp,Jx=new grammar_grammar,cookie_value_strict_percent=s=>{const o=String(s);if(test_cookie_value(o))return o;const i=utils_isQuoted(o),a=i?utils_unquote(o):o;let u=\"\";for(const s of a)u+=Wx.parse(Jx,\"cookie-octet\",s).success?s:utils_percentEncodeChar(s);return i?utils_quote(u):u},Hx=(new yp,new grammar_grammar,s=>{if(!test_cookie_name(s,{strict:!1}))throw new TypeError(`Invalid cookie name: ${s}`)}),valuePercentEncoder=s=>cookie_value_strict_percent(s).replace(/[=&]/gu,(s=>\"=\"===s?\"%3D\":\"%26\")),helpers_cookie_serialize=(s,o={})=>cookie_serialize(s,ep({encoders:{name:utils_identity,value:valuePercentEncoder},validators:{name:Hx,value:cookie_value_strict}},o));function parameter_builders_path({req:s,value:o,parameter:i,baseURL:a}){const{name:u,style:_,explode:w,content:x}=i;if(void 0===o)return;const C=s.url.replace(a,\"\");let j;if(x){const s=Object.keys(x)[0];j=es_resolve(C,{[u]:o},{encoder:o=>encodeCharacters(serialize(o,s))})}else j=es_resolve(C,{[u]:o},{encoder:s=>stylize({key:i.name,value:s,style:_||\"simple\",explode:null!=w&&w,escape:\"reserved\"})});s.url=a+j}function query({req:s,value:o,parameter:i}){if(s.query=s.query||{},void 0!==o&&i.content){const a=serialize(o,Object.keys(i.content)[0]);if(a)s.query[i.name]=a;else if(i.allowEmptyValue){const o=i.name;s.query[o]=s.query[o]||{},s.query[o].allowEmptyValue=!0}}else if(!1===o&&(o=\"false\"),0===o&&(o=\"0\"),o){const{style:a,explode:u,allowReserved:_}=i;s.query[i.name]={value:o,serializationOption:{style:a,explode:u,allowReserved:_}}}else if(i.allowEmptyValue&&void 0!==o){const o=i.name;s.query[o]=s.query[o]||{},s.query[o].allowEmptyValue=!0}}const Kx=[\"accept\",\"authorization\",\"content-type\"];function parameter_builders_header({req:s,parameter:o,value:i}){if(s.headers=s.headers||{},!(Kx.indexOf(o.name.toLowerCase())>-1))if(void 0!==i&&o.content){const a=Object.keys(o.content)[0];s.headers[o.name]=serialize(i,a)}else void 0===i||Array.isArray(i)&&0===i.length||(s.headers[o.name]=stylize({key:o.name,value:i,style:o.style||\"simple\",explode:void 0!==o.explode&&o.explode,escape:!1}))}function cookie({req:s,parameter:o,value:i}){const{name:a}=o;if(s.headers=s.headers||{},void 0!==i&&o.content){const u=serialize(i,Object.keys(o.content)[0]);s.headers.Cookie=helpers_cookie_serialize({[a]:u})}else if(void 0!==i&&(!Array.isArray(i)||0!==i.length)){var u;const _=stylize({key:o.name,value:i,escape:!1,style:o.style||\"form\",explode:null!==(u=o.explode)&&void 0!==u&&u}),w=Array.isArray(i)&&o.explode?`${a}=${_}`:_;s.headers.Cookie=helpers_cookie_serialize({[a]:w})}}const Gx=\"undefined\"!=typeof globalThis?globalThis:\"undefined\"!=typeof self?self:window,{btoa:Yx}=Gx,Xx=Yx;function buildRequest(s,o){const{operation:i,requestBody:a,securities:u,spec:_,attachContentTypeForEmptyPayload:w}=s;let{requestContentType:x}=s;o=function applySecurities({request:s,securities:o={},operation:i={},spec:a}){var u;const _={...s},{authorized:w={}}=o,x=i.security||a.security||[],C=w&&!!Object.keys(w).length,j=(null==a||null===(u=a.components)||void 0===u?void 0:u.securitySchemes)||{};if(_.headers=_.headers||{},_.query=_.query||{},!Object.keys(o).length||!C||!x||Array.isArray(i.security)&&!i.security.length)return s;return x.forEach((s=>{Object.keys(s).forEach((s=>{const o=w[s],i=j[s];if(!o)return;const a=o.value||o,{type:u}=i;if(o)if(\"apiKey\"===u)\"query\"===i.in&&(_.query[i.name]=a),\"header\"===i.in&&(_.headers[i.name]=a),\"cookie\"===i.in&&(_.cookies[i.name]=a);else if(\"http\"===u){if(/^basic$/i.test(i.scheme)){const s=a.username||\"\",o=a.password||\"\",i=Xx(`${s}:${o}`);_.headers.Authorization=`Basic ${i}`}/^bearer$/i.test(i.scheme)&&(_.headers.Authorization=`Bearer ${a}`)}else if(\"oauth2\"===u||\"openIdConnect\"===u){const s=o.token||{},a=s[i[\"x-tokenName\"]||\"access_token\"];let u=s.token_type;u&&\"bearer\"!==u.toLowerCase()||(u=\"Bearer\"),_.headers.Authorization=`${u} ${a}`}}))})),_}({request:o,securities:u,operation:i,spec:_});const C=i.requestBody||{},j=Object.keys(C.content||{}),L=x&&j.indexOf(x)>-1;if(a||w){if(x&&L)o.headers[\"Content-Type\"]=x;else if(!x){const s=j[0];s&&(o.headers[\"Content-Type\"]=s,x=s)}}else x&&L&&(o.headers[\"Content-Type\"]=x);if(!s.responseContentType&&i.responses){const s=Object.entries(i.responses).filter((([s,o])=>{const i=parseInt(s,10);return i>=200&&i<300&&fu(o.content)})).reduce(((s,[,o])=>s.concat(Object.keys(o.content))),[]);s.length>0&&(o.headers.accept=s.join(\", \"))}if(a)if(x){if(j.indexOf(x)>-1)if(\"application/x-www-form-urlencoded\"===x||\"multipart/form-data\"===x)if(\"object\"==typeof a){var B,$;const s=null!==(B=null===($=C.content[x])||void 0===$?void 0:$.encoding)&&void 0!==B?B:{};o.form={},Object.keys(a).forEach((i=>{let u;try{u=JSON.parse(a[i])}catch{u=a[i]}o.form[i]={value:u,encoding:s[i]||{}}}))}else if(\"string\"==typeof a){var V,U;const s=null!==(V=null===(U=C.content[x])||void 0===U?void 0:U.encoding)&&void 0!==V?V:{};try{o.form={};const i=JSON.parse(a);Object.entries(i).forEach((([i,a])=>{o.form[i]={value:a,encoding:s[i]||{}}}))}catch{o.form=a}}else o.form=a;else o.body=a}else o.body=a;return o}function build_request_buildRequest(s,o){const{spec:i,operation:a,securities:u,requestContentType:_,responseContentType:w,attachContentTypeForEmptyPayload:x}=s;if(o=function build_request_applySecurities({request:s,securities:o={},operation:i={},spec:a}){const u={...s},{authorized:_={},specSecurity:w=[]}=o,x=i.security||w,C=_&&!!Object.keys(_).length,j=a.securityDefinitions;if(u.headers=u.headers||{},u.query=u.query||{},!Object.keys(o).length||!C||!x||Array.isArray(i.security)&&!i.security.length)return s;return x.forEach((s=>{Object.keys(s).forEach((s=>{const o=_[s];if(!o)return;const{token:i}=o,a=o.value||o,w=j[s],{type:x}=w,C=w[\"x-tokenName\"]||\"access_token\",L=i&&i[C];let B=i&&i.token_type;if(o)if(\"apiKey\"===x){const s=\"query\"===w.in?\"query\":\"headers\";u[s]=u[s]||{},u[s][w.name]=a}else if(\"basic\"===x)if(a.header)u.headers.authorization=a.header;else{const s=a.username||\"\",o=a.password||\"\";a.base64=Xx(`${s}:${o}`),u.headers.authorization=`Basic ${a.base64}`}else\"oauth2\"===x&&L&&(B=B&&\"bearer\"!==B.toLowerCase()?B:\"Bearer\",u.headers.authorization=`${B} ${L}`)}))})),u}({request:o,securities:u,operation:a,spec:i}),o.body||o.form||x)_?o.headers[\"Content-Type\"]=_:Array.isArray(a.consumes)?[o.headers[\"Content-Type\"]]=a.consumes:Array.isArray(i.consumes)?[o.headers[\"Content-Type\"]]=i.consumes:a.parameters&&a.parameters.filter((s=>\"file\"===s.type)).length?o.headers[\"Content-Type\"]=\"multipart/form-data\":a.parameters&&a.parameters.filter((s=>\"formData\"===s.in)).length&&(o.headers[\"Content-Type\"]=\"application/x-www-form-urlencoded\");else if(_){const s=a.parameters&&a.parameters.filter((s=>\"body\"===s.in)).length>0,i=a.parameters&&a.parameters.filter((s=>\"formData\"===s.in)).length>0;(s||i)&&(o.headers[\"Content-Type\"]=_)}return!w&&Array.isArray(a.produces)&&a.produces.length>0&&(o.headers.accept=a.produces.join(\", \")),o}function idFromPathMethodLegacy(s,o){return`${o.toLowerCase()}-${s}`}const arrayOrEmpty=s=>Array.isArray(s)?s:[],findObjectOrArraySchema=(s,{recurse:o=!0,depth:i=1}={})=>{if(fu(s)){if(\"object\"===s.type||\"array\"===s.type||Array.isArray(s.type)&&(s.type.includes(\"object\")||s.type.includes(\"array\")))return s;if(!(i>Bl)&&o){const a=Array.isArray(s.oneOf)?s.oneOf.find((s=>findObjectOrArraySchema(s,{recurse:o,depth:i+1}))):void 0;if(a)return a;const u=Array.isArray(s.anyOf)?s.anyOf.find((s=>findObjectOrArraySchema(s,{recurse:o,depth:i+1}))):void 0;if(u)return u}}},parseJsonObjectOrArray=({value:s,silentFail:o=!1})=>{try{const i=JSON.parse(s);if(fu(i)||Array.isArray(i))return i;if(!o)throw new Error(\"Expected JSON serialized object or array\")}catch{if(!o)throw new Error(\"Could not parse parameter value string as JSON Object or JSON Array\")}return s},parseURIReference=s=>{try{return new URL(s)}catch{const o=new URL(s,Ll),i=String(s).startsWith(\"/\")?o.pathname:o.pathname.substring(1);return{hash:o.hash,host:\"\",hostname:\"\",href:\"\",origin:\"\",password:\"\",pathname:i,port:\"\",protocol:\"\",search:o.search,searchParams:o.searchParams}}};class OperationNotFoundError extends Go{}const Qx={buildRequest:execute_buildRequest};function execute_execute({http:s,fetch:o,spec:i,operationId:a,pathName:u,method:_,parameters:w,securities:x,...C}){const j=s||o||http_http;u&&_&&!a&&(a=idFromPathMethodLegacy(u,_));const L=Qx.buildRequest({spec:i,operationId:a,parameters:w,securities:x,http:j,...C});return L.body&&(fu(L.body)||Array.isArray(L.body))&&(L.body=JSON.stringify(L.body)),j(L)}function execute_buildRequest(s){const{spec:o,operationId:i,responseContentType:a,scheme:u,requestInterceptor:_,responseInterceptor:w,contextUrl:x,userFetch:C,server:j,serverVariables:L,http:B,signal:$,serverVariableEncoder:V}=s;let{parameters:U,parameterBuilders:z,baseURL:Y}=s;const Z=isOpenAPI3(o);z||(z=Z?be:Bx);let ee={url:\"\",credentials:B&&B.withCredentials?\"include\":\"same-origin\",headers:{},cookies:{}};$&&(ee.signal=$),_&&(ee.requestInterceptor=_),w&&(ee.responseInterceptor=w),C&&(ee.userFetch=C);const ie=function getOperationRaw(s,o){return s&&s.paths?function findOperation(s,o){return function eachOperation(s,o,i){if(!s||\"object\"!=typeof s||!s.paths||\"object\"!=typeof s.paths)return null;const{paths:a}=s;for(const u in a)for(const _ in a[u]){if(\"PARAMETERS\"===_.toUpperCase())continue;const w=a[u][_];if(!w||\"object\"!=typeof w)continue;const x={spec:s,pathName:u,method:_.toUpperCase(),operation:w},C=o(x);if(i&&C)return x}}(s,o,!0)||null}(s,(({pathName:s,method:i,operation:a})=>{if(!a||\"object\"!=typeof a)return!1;const u=a.operationId;return[opId(a,s,i),idFromPathMethodLegacy(s,i),u].some((s=>s&&s===o))})):null}(o,i);if(!ie)throw new OperationNotFoundError(`Operation ${i} not found`);const{operation:ae={},method:ce,pathName:le}=ie;if(Y=null!=Y?Y:function baseUrl(s){const o=isOpenAPI3(s.spec);return o?function oas3BaseUrl({spec:s,pathName:o,method:i,server:a,contextUrl:u,serverVariables:_={},serverVariableEncoder:w}){var x,C;let j,L=[],B=\"\";const $=null==s||null===(x=s.paths)||void 0===x||null===(x=x[o])||void 0===x||null===(x=x[(i||\"\").toLowerCase()])||void 0===x?void 0:x.servers,V=null==s||null===(C=s.paths)||void 0===C||null===(C=C[o])||void 0===C?void 0:C.servers,U=null==s?void 0:s.servers;L=isNonEmptyServerList($)?$:isNonEmptyServerList(V)?V:isNonEmptyServerList(U)?U:[Fl],a&&(j=L.find((s=>s.url===a)),j&&(B=a));B||([j]=L,B=j.url);if(openapi_server_url_templating_es_test(B,{strict:!0})){const s=Object.entries({...j.variables}).reduce(((s,[o,i])=>(s[o]=i.default,s)),{});B=es_substitute(B,{...s,..._},{encoder:\"function\"==typeof w?w:vw})}return function buildOas3UrlWithContext(s=\"\",o=\"\"){const i=parseURIReference(s&&o?resolve(o,s):s),a=parseURIReference(o),u=stripNonAlpha(i.protocol)||stripNonAlpha(a.protocol),_=i.host||a.host,w=i.pathname;let x;x=u&&_?`${u}://${_+w}`:w;return\"/\"===x[x.length-1]?x.slice(0,-1):x}(B,u)}(s):function swagger2BaseUrl({spec:s,scheme:o,contextUrl:i=\"\"}){const a=parseURIReference(i),u=Array.isArray(s.schemes)?s.schemes[0]:null,_=o||u||stripNonAlpha(a.protocol)||\"http\",w=s.host||a.host||\"\",x=s.basePath||\"\";let C;C=_&&w?`${_}://${w+x}`:x;return\"/\"===C[C.length-1]?C.slice(0,-1):C}(s)}({spec:o,scheme:u,contextUrl:x,server:j,serverVariables:L,pathName:le,method:ce,serverVariableEncoder:V}),ee.url+=Y,!i)return delete ee.cookies,ee;ee.url+=le,ee.method=`${ce}`.toUpperCase(),U=U||{};const pe=o.paths[le]||{};a&&(ee.headers.accept=a);const de=(s=>{const o={};s.forEach((s=>{o[s.in]||(o[s.in]={}),o[s.in][s.name]=s}));const i=[];return Object.keys(o).forEach((s=>{Object.keys(o[s]).forEach((a=>{i.push(o[s][a])}))})),i})([].concat(arrayOrEmpty(ae.parameters)).concat(arrayOrEmpty(pe.parameters)));de.forEach((s=>{const i=z[s.in];let a;if(\"body\"===s.in&&s.schema&&s.schema.properties&&(a=U),a=s&&s.name&&U[s.name],void 0===a?a=s&&s.name&&U[`${s.in}.${s.name}`]:((s,o)=>o.filter((o=>o.name===s)))(s.name,de).length>1&&console.warn(`Parameter '${s.name}' is ambiguous because the defined spec has more than one parameter with the name: '${s.name}' and the passed-in parameter values did not define an 'in' value.`),null!==a){if(void 0!==s.default&&void 0===a&&(a=s.default),void 0===a&&s.required&&!s.allowEmptyValue)throw new Error(`Required parameter ${s.name} is not provided`);Z&&\"string\"==typeof a&&(id(\"type\",s.schema)&&\"string\"==typeof s.schema.type&&findObjectOrArraySchema(s.schema,{recurse:!1})?a=parseJsonObjectOrArray({value:a,silentFail:!1}):(id(\"type\",s.schema)&&Array.isArray(s.schema.type)&&findObjectOrArraySchema(s.schema,{recurse:!1})||!id(\"type\",s.schema)&&findObjectOrArraySchema(s.schema,{recurse:!0}))&&(a=parseJsonObjectOrArray({value:a,silentFail:!0}))),i&&i({req:ee,parameter:s,value:a,operation:ae,spec:o,baseURL:Y})}}));const fe={...s,operation:ae};if(ee=Z?buildRequest(fe,ee):build_request_buildRequest(fe,ee),ee.cookies&&Object.keys(ee.cookies).length>0){const s=helpers_cookie_serialize(ee.cookies);Nd(ee.headers.Cookie)?ee.headers.Cookie+=`; ${s}`:ee.headers.Cookie=s}return ee.cookies&&delete ee.cookies,serializeRequest(ee)}const stripNonAlpha=s=>s?s.replace(/\\W/g,\"\"):null;const isNonEmptyServerList=s=>Array.isArray(s)&&s.length>0;const makeResolveSubtree=s=>async(o,i,a={})=>(async(s,o,i={})=>{const{returnEntireTree:a,baseDoc:u,requestInterceptor:_,responseInterceptor:w,parameterMacro:x,modelPropertyMacro:C,useCircularStructures:j,strategies:L}=i,B={spec:s,pathDiscriminator:o,baseDoc:u,requestInterceptor:_,responseInterceptor:w,parameterMacro:x,modelPropertyMacro:C,useCircularStructures:j,strategies:L},$=L.find((o=>o.match(s))).normalize(s),V=await Mx({spec:$,...B,allowMetaPatches:!0,skipNormalization:!isOpenAPI31(s)});return!a&&Array.isArray(o)&&o.length&&(V.spec=o.reduce(((s,o)=>null==s?void 0:s[o]),V.spec)||null),V})(o,i,{...s,...a}),Zx=(makeResolveSubtree({strategies:[_u,vu,gu]}),(s,o)=>(...i)=>{s(...i);const a=o.getConfigs().withCredentials;o.fn.fetch.withCredentials=a});function swagger_client({configs:s,getConfigs:o}){return{fn:{fetch:(i=http_http,a=s.preFetch,u=s.postFetch,u=u||(s=>s),a=a||(s=>s),s=>(\"string\"==typeof s&&(s={url:s}),s=serializeRequest(s),s=a(s),u(i(s)))),buildRequest:execute_buildRequest,execute:execute_execute,resolve:makeResolve({strategies:[Nx,_u,vu,gu]}),resolveSubtree:async(s,i,a={})=>{const u=o(),_={modelPropertyMacro:u.modelPropertyMacro,parameterMacro:u.parameterMacro,requestInterceptor:u.requestInterceptor,responseInterceptor:u.responseInterceptor,strategies:[Nx,_u,vu,gu]};return makeResolveSubtree(_)(s,i,a)},serializeRes:serializeResponse,opId},statePlugins:{configs:{wrapActions:{loaded:Zx}}}};var i,a,u}function util(){return{fn:{shallowEqualKeys,sanitizeUrl}}}var tk=__webpack_require__(40961),rk=(__webpack_require__(78418),Re.version.startsWith(\"19\")),nk=Symbol.for(rk?\"react.transitional.element\":\"react.element\"),sk=Symbol.for(\"react.portal\"),ok=Symbol.for(\"react.fragment\"),lk=Symbol.for(\"react.strict_mode\"),uk=Symbol.for(\"react.profiler\"),pk=Symbol.for(\"react.consumer\"),fk=Symbol.for(\"react.context\"),mk=Symbol.for(\"react.forward_ref\"),yk=Symbol.for(\"react.suspense\"),vk=Symbol.for(\"react.suspense_list\"),_k=Symbol.for(\"react.memo\"),wk=Symbol.for(\"react.lazy\"),xk=mk,Ak=_k;function typeOf(s){if(\"object\"==typeof s&&null!==s){const{$$typeof:o}=s;switch(o){case nk:switch(s=s.type){case ok:case uk:case lk:case yk:case vk:return s;default:switch(s=s&&s.$$typeof){case fk:case mk:case wk:case _k:case pk:return s;default:return o}}case sk:return o}}}function pureFinalPropsSelectorFactory(s,o,i,a,{areStatesEqual:u,areOwnPropsEqual:_,areStatePropsEqual:w}){let x,C,j,L,B,$=!1;function handleSubsequentCalls($,V){const U=!_(V,C),z=!u($,x,V,C);return x=$,C=V,U&&z?function handleNewPropsAndNewState(){return j=s(x,C),o.dependsOnOwnProps&&(L=o(a,C)),B=i(j,L,C),B}():U?function handleNewProps(){return s.dependsOnOwnProps&&(j=s(x,C)),o.dependsOnOwnProps&&(L=o(a,C)),B=i(j,L,C),B}():z?function handleNewState(){const o=s(x,C),a=!w(o,j);return j=o,a&&(B=i(j,L,C)),B}():B}return function pureFinalPropsSelector(u,_){return $?handleSubsequentCalls(u,_):function handleFirstCall(u,_){return x=u,C=_,j=s(x,C),L=o(a,C),B=i(j,L,C),$=!0,B}(u,_)}}function wrapMapToPropsConstant(s){return function initConstantSelector(o){const i=s(o);function constantSelector(){return i}return constantSelector.dependsOnOwnProps=!1,constantSelector}}function getDependsOnOwnProps(s){return s.dependsOnOwnProps?Boolean(s.dependsOnOwnProps):1!==s.length}function wrapMapToPropsFunc(s,o){return function initProxySelector(o,{displayName:i}){const a=function mapToPropsProxy(s,o){return a.dependsOnOwnProps?a.mapToProps(s,o):a.mapToProps(s,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function detectFactoryAndVerify(o,i){a.mapToProps=s,a.dependsOnOwnProps=getDependsOnOwnProps(s);let u=a(o,i);return\"function\"==typeof u&&(a.mapToProps=u,a.dependsOnOwnProps=getDependsOnOwnProps(u),u=a(o,i)),u},a}}function createInvalidArgFactory(s,o){return(i,a)=>{throw new Error(`Invalid value of type ${typeof s} for ${o} argument when connecting component ${a.wrappedComponentName}.`)}}function defaultMergeProps(s,o,i){return{...i,...s,...o}}function defaultNoopBatch(s){s()}var Bk={notify(){},get:()=>[]};function createSubscription(s,o){let i,a=Bk,u=0,_=!1;function handleChangeWrapper(){w.onStateChange&&w.onStateChange()}function trySubscribe(){u++,i||(i=o?o.addNestedSub(handleChangeWrapper):s.subscribe(handleChangeWrapper),a=function createListenerCollection(){let s=null,o=null;return{clear(){s=null,o=null},notify(){defaultNoopBatch((()=>{let o=s;for(;o;)o.callback(),o=o.next}))},get(){const o=[];let i=s;for(;i;)o.push(i),i=i.next;return o},subscribe(i){let a=!0;const u=o={callback:i,next:null,prev:o};return u.prev?u.prev.next=u:s=u,function unsubscribe(){a&&null!==s&&(a=!1,u.next?u.next.prev=u.prev:o=u.prev,u.prev?u.prev.next=u.next:s=u.next)}}}}())}function tryUnsubscribe(){u--,i&&0===u&&(i(),i=void 0,a.clear(),a=Bk)}const w={addNestedSub:function addNestedSub(s){trySubscribe();const o=a.subscribe(s);let i=!1;return()=>{i||(i=!0,o(),tryUnsubscribe())}},notifyNestedSubs:function notifyNestedSubs(){a.notify()},handleChangeWrapper,isSubscribed:function isSubscribed(){return _},trySubscribe:function trySubscribeSelf(){_||(_=!0,trySubscribe())},tryUnsubscribe:function tryUnsubscribeSelf(){_&&(_=!1,tryUnsubscribe())},getListeners:()=>a};return w}var qk=(()=>!(\"undefined\"==typeof window||void 0===window.document||void 0===window.document.createElement))(),Vk=(()=>\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product)(),zk=(()=>qk||Vk?Re.useLayoutEffect:Re.useEffect)();function is(s,o){return s===o?0!==s||0!==o||1/s==1/o:s!=s&&o!=o}function shallowEqual(s,o){if(is(s,o))return!0;if(\"object\"!=typeof s||null===s||\"object\"!=typeof o||null===o)return!1;const i=Object.keys(s),a=Object.keys(o);if(i.length!==a.length)return!1;for(let a=0;a<i.length;a++)if(!Object.prototype.hasOwnProperty.call(o,i[a])||!is(s[i[a]],o[i[a]]))return!1;return!0}var eO={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},tO={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},rO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},nO={[xk]:{$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},[Ak]:rO};function getStatics(s){return function isMemo(s){return typeOf(s)===_k}(s)?rO:nO[s.$$typeof]||eO}var sO=Object.defineProperty,oO=Object.getOwnPropertyNames,iO=Object.getOwnPropertySymbols,aO=Object.getOwnPropertyDescriptor,cO=Object.getPrototypeOf,lO=Object.prototype;function hoistNonReactStatics(s,o){if(\"string\"!=typeof o){if(lO){const i=cO(o);i&&i!==lO&&hoistNonReactStatics(s,i)}let i=oO(o);iO&&(i=i.concat(iO(o)));const a=getStatics(s),u=getStatics(o);for(let _=0;_<i.length;++_){const w=i[_];if(!(tO[w]||u&&u[w]||a&&a[w])){const i=aO(o,w);try{sO(s,w,i)}catch(s){}}}}return s}var uO=Symbol.for(\"react-redux-context\"),pO=\"undefined\"!=typeof globalThis?globalThis:{};function getContext(){if(!Re.createContext)return{};const s=pO[uO]??=new Map;let o=s.get(Re.createContext);return o||(o=Re.createContext(null),s.set(Re.createContext,o)),o}var hO=getContext(),dO=[null,null];function captureWrapperProps(s,o,i,a,u,_){s.current=a,i.current=!1,u.current&&(u.current=null,_())}function strictEqual(s,o){return s===o}var fO=function connect(s,o,i,{pure:a,areStatesEqual:u=strictEqual,areOwnPropsEqual:_=shallowEqual,areStatePropsEqual:w=shallowEqual,areMergedPropsEqual:x=shallowEqual,forwardRef:C=!1,context:j=hO}={}){const L=j,B=function mapStateToPropsFactory(s){return s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapStateToProps\"):wrapMapToPropsConstant((()=>({})))}(s),$=function mapDispatchToPropsFactory(s){return s&&\"object\"==typeof s?wrapMapToPropsConstant((o=>function react_redux_bindActionCreators(s,o){const i={};for(const a in s){const u=s[a];\"function\"==typeof u&&(i[a]=(...s)=>o(u(...s)))}return i}(s,o))):s?\"function\"==typeof s?wrapMapToPropsFunc(s):createInvalidArgFactory(s,\"mapDispatchToProps\"):wrapMapToPropsConstant((s=>({dispatch:s})))}(o),V=function mergePropsFactory(s){return s?\"function\"==typeof s?function wrapMergePropsFunc(s){return function initMergePropsProxy(o,{displayName:i,areMergedPropsEqual:a}){let u,_=!1;return function mergePropsProxy(o,i,w){const x=s(o,i,w);return _?a(x,u)||(u=x):(_=!0,u=x),u}}}(s):createInvalidArgFactory(s,\"mergeProps\"):()=>defaultMergeProps}(i),U=Boolean(s);return s=>{const o=s.displayName||s.name||\"Component\",i=`Connect(${o})`,a={shouldHandleStateChanges:U,displayName:i,wrappedComponentName:o,WrappedComponent:s,initMapStateToProps:B,initMapDispatchToProps:$,initMergeProps:V,areStatesEqual:u,areStatePropsEqual:w,areOwnPropsEqual:_,areMergedPropsEqual:x};function ConnectFunction(o){const[i,u,_]=Re.useMemo((()=>{const{reactReduxForwardedRef:s,...i}=o;return[o.context,s,i]}),[o]),w=Re.useMemo((()=>L),[i,L]),x=Re.useContext(w),C=Boolean(o.store)&&Boolean(o.store.getState)&&Boolean(o.store.dispatch),j=Boolean(x)&&Boolean(x.store);const B=C?o.store:x.store,$=j?x.getServerState:B.getState,V=Re.useMemo((()=>function finalPropsSelectorFactory(s,{initMapStateToProps:o,initMapDispatchToProps:i,initMergeProps:a,...u}){return pureFinalPropsSelectorFactory(o(s,u),i(s,u),a(s,u),s,u)}(B.dispatch,a)),[B]),[z,Y]=Re.useMemo((()=>{if(!U)return dO;const s=createSubscription(B,C?void 0:x.subscription),o=s.notifyNestedSubs.bind(s);return[s,o]}),[B,C,x]),Z=Re.useMemo((()=>C?x:{...x,subscription:z}),[C,x,z]),ee=Re.useRef(void 0),ie=Re.useRef(_),ae=Re.useRef(void 0),ce=Re.useRef(!1),le=Re.useRef(!1),pe=Re.useRef(void 0);zk((()=>(le.current=!0,()=>{le.current=!1})),[]);const de=Re.useMemo((()=>()=>ae.current&&_===ie.current?ae.current:V(B.getState(),_)),[B,_]),fe=Re.useMemo((()=>s=>z?function subscribeUpdates(s,o,i,a,u,_,w,x,C,j,L){if(!s)return()=>{};let B=!1,$=null;const checkForUpdates=()=>{if(B||!x.current)return;const s=o.getState();let i,V;try{i=a(s,u.current)}catch(s){V=s,$=s}V||($=null),i===_.current?w.current||j():(_.current=i,C.current=i,w.current=!0,L())};return i.onStateChange=checkForUpdates,i.trySubscribe(),checkForUpdates(),()=>{if(B=!0,i.tryUnsubscribe(),i.onStateChange=null,$)throw $}}(U,B,z,V,ie,ee,ce,le,ae,Y,s):()=>{}),[z]);let ye;!function useIsomorphicLayoutEffectWithArgs(s,o,i){zk((()=>s(...o)),i)}(captureWrapperProps,[ie,ee,ce,_,ae,Y]);try{ye=Re.useSyncExternalStore(fe,de,$?()=>V($(),_):de)}catch(s){throw pe.current&&(s.message+=`\\nThe error may be correlated with this previous error:\\n${pe.current.stack}\\n\\n`),s}zk((()=>{pe.current=void 0,ae.current=void 0,ee.current=ye}));const be=Re.useMemo((()=>Re.createElement(s,{...ye,ref:u})),[u,s,ye]);return Re.useMemo((()=>U?Re.createElement(w.Provider,{value:Z},be):be),[w,be,Z])}const j=Re.memo(ConnectFunction);if(j.WrappedComponent=s,j.displayName=ConnectFunction.displayName=i,C){const o=Re.forwardRef((function forwardConnectRef(s,o){return Re.createElement(j,{...s,reactReduxForwardedRef:o})}));return o.displayName=i,o.WrappedComponent=s,hoistNonReactStatics(o,s)}return hoistNonReactStatics(j,s)}};var mO=function Provider(s){const{children:o,context:i,serverState:a,store:u}=s,_=Re.useMemo((()=>{const s=createSubscription(u);return{store:u,subscription:s,getServerState:a?()=>a:void 0}}),[u,a]),w=Re.useMemo((()=>u.getState()),[u]);zk((()=>{const{subscription:s}=_;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),w!==u.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}}),[_,w]);const x=i||hO;return Re.createElement(x.Provider,{value:_},o)};var gO=__webpack_require__(83488),yO=__webpack_require__.n(gO);const withSystem=s=>o=>{const{fn:i}=s();class WithSystem extends Re.Component{render(){return Re.createElement(o,Mn()({},s(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${i.getDisplayName(o)})`,WithSystem},withRoot=(s,o)=>i=>{const{fn:a}=s();class WithRoot extends Re.Component{render(){return Re.createElement(mO,{store:o},Re.createElement(i,Mn()({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${a.getDisplayName(i)})`,WithRoot},withConnect=(s,o,i)=>compose(i?withRoot(s,i):yO(),fO(((i,a)=>{const u={...a,...s()},_=o.prototype?.mapStateToProps||(s=>({state:s}));return _(i,u)})),withSystem(s))(o),handleProps=(s,o,i,a)=>{for(const u in o){const _=o[u];\"function\"==typeof _&&_(i[u],a[u],s())}},withMappedContainer=(s,o,i)=>(o,a)=>{const{fn:u}=s(),_=i(o,\"root\");class WithMappedContainer extends Re.Component{constructor(o,i){super(o,i),handleProps(s,a,o,{})}UNSAFE_componentWillReceiveProps(o){handleProps(s,a,o,this.props)}render(){const s=Gt()(this.props,a?Object.keys(a):[]);return Re.createElement(_,s)}}return WithMappedContainer.displayName=`WithMappedContainer(${u.getDisplayName(_)})`,WithMappedContainer},render=(s,o,i,a)=>u=>{const _=i(s,o,a)(\"App\",\"root\"),{createRoot:w}=tk;w(u).render(Re.createElement(_,null))},getComponent=(s,o,i)=>(a,u,_={})=>{if(\"string\"!=typeof a)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof a);const w=i(a);return w?u?\"root\"===u?withConnect(s,w,o()):withConnect(s,w):w:(_.failSilently||s().log.warn(\"Could not find component:\",a),null)},getDisplayName=s=>s.displayName||s.name||\"Component\",view=({getComponents:s,getStore:o,getSystem:i})=>{const a=(u=getComponent(i,o,s),Pt(u,((...s)=>JSON.stringify(s))));var u;const _=(s=>utils_memoizeN(s,((...s)=>s)))(withMappedContainer(i,0,a));return{rootInjects:{getComponent:a,makeMappedContainer:_,render:render(i,o,getComponent,s)},fn:{getDisplayName}}},view_legacy=({React:s,getSystem:o,getStore:i,getComponents:a})=>{const u={},_=parseInt(s?.version,10);return _>=16&&_<18&&(u.render=((s,o,i,a)=>u=>{const _=i(s,o,a)(\"App\",\"root\");tk.render(Re.createElement(_,null),u)})(o,i,getComponent,a)),{rootInjects:u}};function downloadUrlPlugin(s){let{fn:o}=s;const i={download:s=>({errActions:i,specSelectors:a,specActions:u,getConfigs:_})=>{let{fetch:w}=o;const x=_();function next(o){if(o instanceof Error||o.status>=400)return u.updateLoadingStatus(\"failed\"),i.newThrownErr(Object.assign(new Error((o.message||o.statusText)+\" \"+s),{source:\"fetch\"})),void(!o.status&&o instanceof Error&&function checkPossibleFailReasons(){try{let o;if(\"URL\"in lt?o=new URL(s):(o=document.createElement(\"a\"),o.href=s),\"https:\"!==o.protocol&&\"https:\"===lt.location.protocol){const s=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${o.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void i.newThrownErr(s)}if(o.origin!==lt.location.origin){const s=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${o.origin}) does not match the page (${lt.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});i.newThrownErr(s)}}catch(s){return}}());u.updateLoadingStatus(\"success\"),u.updateSpec(o.text),a.url()!==s&&u.updateUrl(s)}s=s||a.url(),u.updateLoadingStatus(\"loading\"),i.clear({source:\"fetch\"}),w({url:s,loadSpec:!0,requestInterceptor:x.requestInterceptor||(s=>s),responseInterceptor:x.responseInterceptor||(s=>s),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:s=>{let o=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===o.indexOf(s)&&console.error(`Error: ${s} is not one of ${JSON.stringify(o)}`),{type:\"spec_update_loading_status\",payload:s}}};let a={loadingStatus:Vt((s=>s||(0,ze.Map)()),(s=>s.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:i,reducers:{spec_update_loading_status:(s,o)=>\"string\"==typeof o.payload?s.set(\"loadingStatus\",o.payload):s},selectors:a}}}}function arrayLikeToArray_arrayLikeToArray(s,o){(null==o||o>s.length)&&(o=s.length);for(var i=0,a=Array(o);i<o;i++)a[i]=s[i];return a}function toConsumableArray_toConsumableArray(s){return function arrayWithoutHoles_arrayWithoutHoles(s){if(Array.isArray(s))return arrayLikeToArray_arrayLikeToArray(s)}(s)||function iterableToArray_iterableToArray(s){if(\"undefined\"!=typeof Symbol&&null!=s[Symbol.iterator]||null!=s[\"@@iterator\"])return Array.from(s)}(s)||function unsupportedIterableToArray_unsupportedIterableToArray(s,o){if(s){if(\"string\"==typeof s)return arrayLikeToArray_arrayLikeToArray(s,o);var i={}.toString.call(s).slice(8,-1);return\"Object\"===i&&s.constructor&&(i=s.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(s):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?arrayLikeToArray_arrayLikeToArray(s,o):void 0}}(s)||function nonIterableSpread_nonIterableSpread(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function typeof_typeof(s){return typeof_typeof=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&\"function\"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?\"symbol\":typeof s},typeof_typeof(s)}function toPropertyKey(s){var o=function toPrimitive(s,o){if(\"object\"!=typeof_typeof(s)||!s)return s;var i=s[Symbol.toPrimitive];if(void 0!==i){var a=i.call(s,o||\"default\");if(\"object\"!=typeof_typeof(a))return a;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===o?String:Number)(s)}(s,\"string\");return\"symbol\"==typeof_typeof(o)?o:o+\"\"}function defineProperty_defineProperty(s,o,i){return(o=toPropertyKey(o))in s?Object.defineProperty(s,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):s[o]=i,s}function extends_extends(){return extends_extends=Object.assign?Object.assign.bind():function(s){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var a in i)({}).hasOwnProperty.call(i,a)&&(s[a]=i[a])}return s},extends_extends.apply(null,arguments)}function create_element_ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function _objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?create_element_ownKeys(Object(i),!0).forEach((function(o){defineProperty_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):create_element_ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var vO={};function createStyleObject(s){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;return function getClassNameCombinations(s){if(0===s.length||1===s.length)return s;var o=s.join(\".\");return vO[o]||(vO[o]=function powerSetPermutations(s){var o=s.length;return 0===o||1===o?s:2===o?[s[0],s[1],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0])]:3===o?[s[0],s[1],s[2],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:o>=4?[s[0],s[1],s[2],s[3],\"\".concat(s[0],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3]),\"\".concat(s[3],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[0],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[0],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[1],\".\").concat(s[2],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[1],\".\").concat(s[3],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[0],\".\").concat(s[3],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[3]),\"\".concat(s[2],\".\").concat(s[1],\".\").concat(s[3],\".\").concat(s[0]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[2],\".\").concat(s[3],\".\").concat(s[1],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[1],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[0],\".\").concat(s[2],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[0],\".\").concat(s[2]),\"\".concat(s[3],\".\").concat(s[1],\".\").concat(s[2],\".\").concat(s[0]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[0],\".\").concat(s[1]),\"\".concat(s[3],\".\").concat(s[2],\".\").concat(s[1],\".\").concat(s[0])]:void 0}(s)),vO[o]}(s.filter((function(s){return\"token\"!==s}))).reduce((function(s,o){return _objectSpread(_objectSpread({},s),i[o])}),o)}function createClassNameString(s){return s.join(\" \")}function createElement(s){var o=s.node,i=s.stylesheet,a=s.style,u=void 0===a?{}:a,_=s.useInlineStyles,w=s.key,x=o.properties,C=o.type,j=o.tagName,L=o.value;if(\"text\"===C)return L;if(j){var B,$=function createChildren(s,o){var i=0;return function(a){return i+=1,a.map((function(a,u){return createElement({node:a,stylesheet:s,useInlineStyles:o,key:\"code-segment-\".concat(i,\"-\").concat(u)})}))}}(i,_);if(_){var V=Object.keys(i).reduce((function(s,o){return o.split(\".\").forEach((function(o){s.includes(o)||s.push(o)})),s}),[]),U=x.className&&x.className.includes(\"token\")?[\"token\"]:[],z=x.className&&U.concat(x.className.filter((function(s){return!V.includes(s)})));B=_objectSpread(_objectSpread({},x),{},{className:createClassNameString(z)||void 0,style:createStyleObject(x.className,Object.assign({},x.style,u),i)})}else B=_objectSpread(_objectSpread({},x),{},{className:createClassNameString(x.className)});var Y=$(o.children);return Re.createElement(j,extends_extends({key:w},B),Y)}}var bO=[\"language\",\"children\",\"style\",\"customStyle\",\"codeTagProps\",\"useInlineStyles\",\"showLineNumbers\",\"showInlineLineNumbers\",\"startingLineNumber\",\"lineNumberContainerStyle\",\"lineNumberStyle\",\"wrapLines\",\"wrapLongLines\",\"lineProps\",\"renderer\",\"PreTag\",\"CodeTag\",\"code\",\"astGenerator\"];function highlight_ownKeys(s,o){var i=Object.keys(s);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(s);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(s,o).enumerable}))),i.push.apply(i,a)}return i}function highlight_objectSpread(s){for(var o=1;o<arguments.length;o++){var i=null!=arguments[o]?arguments[o]:{};o%2?highlight_ownKeys(Object(i),!0).forEach((function(o){defineProperty_defineProperty(s,o,i[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(i)):highlight_ownKeys(Object(i)).forEach((function(o){Object.defineProperty(s,o,Object.getOwnPropertyDescriptor(i,o))}))}return s}var _O=/\\n/g;function AllLineNumbers(s){var o=s.codeString,i=s.codeStyle,a=s.containerStyle,u=void 0===a?{float:\"left\",paddingRight:\"10px\"}:a,_=s.numberStyle,w=void 0===_?{}:_,x=s.startingLineNumber;return Re.createElement(\"code\",{style:Object.assign({},i,u)},function getAllLineNumbers(s){var o=s.lines,i=s.startingLineNumber,a=s.style;return o.map((function(s,o){var u=o+i;return Re.createElement(\"span\",{key:\"line-\".concat(o),className:\"react-syntax-highlighter-line-number\",style:\"function\"==typeof a?a(u):a},\"\".concat(u,\"\\n\"))}))}({lines:o.replace(/\\n$/,\"\").split(\"\\n\"),style:w,startingLineNumber:x}))}function getInlineLineNumber(s,o){return{type:\"element\",tagName:\"span\",properties:{key:\"line-number--\".concat(s),className:[\"comment\",\"linenumber\",\"react-syntax-highlighter-line-number\"],style:o},children:[{type:\"text\",value:s}]}}function assembleLineNumberStyles(s,o,i){var a,u={display:\"inline-block\",minWidth:(a=i,\"\".concat(a.toString().length,\".25em\")),paddingRight:\"1em\",textAlign:\"right\",userSelect:\"none\"},_=\"function\"==typeof s?s(o):s;return highlight_objectSpread(highlight_objectSpread({},u),_)}function createLineElement(s){var o=s.children,i=s.lineNumber,a=s.lineNumberStyle,u=s.largestLineNumber,_=s.showInlineLineNumbers,w=s.lineProps,x=void 0===w?{}:w,C=s.className,j=void 0===C?[]:C,L=s.showLineNumbers,B=s.wrapLongLines,$=s.wrapLines,V=void 0!==$&&$?highlight_objectSpread({},\"function\"==typeof x?x(i):x):{};if(V.className=V.className?[].concat(toConsumableArray_toConsumableArray(V.className.trim().split(/\\s+/)),toConsumableArray_toConsumableArray(j)):j,i&&_){var U=assembleLineNumberStyles(a,i,u);o.unshift(getInlineLineNumber(i,U))}return B&L&&(V.style=highlight_objectSpread({display:\"flex\"},V.style)),{type:\"element\",tagName:\"span\",properties:V,children:o}}function flattenCodeTree(s){for(var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=0;a<s.length;a++){var u=s[a];if(\"text\"===u.type)i.push(createLineElement({children:[u],className:toConsumableArray_toConsumableArray(new Set(o))}));else if(u.children){var _=o.concat(u.properties.className);flattenCodeTree(u.children,_).forEach((function(s){return i.push(s)}))}}return i}function processLines(s,o,i,a,u,_,w,x,C){var j,L=flattenCodeTree(s.value),B=[],$=-1,V=0;function createLine(s,_){var j=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return o||j.length>0?function createWrappedLine(s,_){return createLineElement({children:s,lineNumber:_,lineNumberStyle:x,largestLineNumber:w,showInlineLineNumbers:u,lineProps:i,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:a,wrapLongLines:C,wrapLines:o})}(s,_,j):function createUnwrappedLine(s,o){if(a&&o&&u){var i=assembleLineNumberStyles(x,o,w);s.unshift(getInlineLineNumber(o,i))}return s}(s,_)}for(var U=function _loop(){var s=L[V],o=s.children[0].value,i=function getNewLines(s){return s.match(_O)}(o);if(i){var u=o.split(\"\\n\");u.forEach((function(o,i){var w=a&&B.length+_,x={type:\"text\",value:\"\".concat(o,\"\\n\")};if(0===i){var C=createLine(L.slice($+1,V).concat(createLineElement({children:[x],className:s.properties.className})),w);B.push(C)}else if(i===u.length-1){var j=L[V+1]&&L[V+1].children&&L[V+1].children[0],U={type:\"text\",value:\"\".concat(o)};if(j){var z=createLineElement({children:[U],className:s.properties.className});L.splice(V+1,0,z)}else{var Y=createLine([U],w,s.properties.className);B.push(Y)}}else{var Z=createLine([x],w,s.properties.className);B.push(Z)}})),$=V}V++};V<L.length;)U();if($!==L.length-1){var z=L.slice($+1,L.length);if(z&&z.length){var Y=createLine(z,a&&B.length+_);B.push(Y)}}return o?B:(j=[]).concat.apply(j,B)}function defaultRenderer(s){var o=s.rows,i=s.stylesheet,a=s.useInlineStyles;return o.map((function(s,o){return createElement({node:s,stylesheet:i,useInlineStyles:a,key:\"code-segement\".concat(o)})}))}function isHighlightJs(s){return s&&void 0!==s.highlightAuto}var SO=__webpack_require__(43768),EO=function highlight(s,o){return function SyntaxHighlighter(i){var a=i.language,u=i.children,_=i.style,w=void 0===_?o:_,x=i.customStyle,C=void 0===x?{}:x,j=i.codeTagProps,L=void 0===j?{className:a?\"language-\".concat(a):void 0,style:highlight_objectSpread(highlight_objectSpread({},w['code[class*=\"language-\"]']),w['code[class*=\"language-'.concat(a,'\"]')])}:j,B=i.useInlineStyles,$=void 0===B||B,V=i.showLineNumbers,U=void 0!==V&&V,z=i.showInlineLineNumbers,Y=void 0===z||z,Z=i.startingLineNumber,ee=void 0===Z?1:Z,ie=i.lineNumberContainerStyle,ae=i.lineNumberStyle,ce=void 0===ae?{}:ae,le=i.wrapLines,pe=i.wrapLongLines,de=void 0!==pe&&pe,fe=i.lineProps,ye=void 0===fe?{}:fe,be=i.renderer,_e=i.PreTag,Se=void 0===_e?\"pre\":_e,we=i.CodeTag,xe=void 0===we?\"code\":we,Pe=i.code,Te=void 0===Pe?(Array.isArray(u)?u[0]:u)||\"\":Pe,$e=i.astGenerator,qe=function _objectWithoutProperties(s,o){if(null==s)return{};var i,a,u=function _objectWithoutPropertiesLoose(s,o){if(null==s)return{};var i={};for(var a in s)if({}.hasOwnProperty.call(s,a)){if(-1!==o.indexOf(a))continue;i[a]=s[a]}return i}(s,o);if(Object.getOwnPropertySymbols){var _=Object.getOwnPropertySymbols(s);for(a=0;a<_.length;a++)i=_[a],-1===o.indexOf(i)&&{}.propertyIsEnumerable.call(s,i)&&(u[i]=s[i])}return u}(i,bO);$e=$e||s;var ze=U?Re.createElement(AllLineNumbers,{containerStyle:ie,codeStyle:L.style||{},numberStyle:ce,startingLineNumber:ee,codeString:Te}):null,We=w.hljs||w['pre[class*=\"language-\"]']||{backgroundColor:\"#fff\"},He=isHighlightJs($e)?\"hljs\":\"prismjs\",Ye=$?Object.assign({},qe,{style:Object.assign({},We,C)}):Object.assign({},qe,{className:qe.className?\"\".concat(He,\" \").concat(qe.className):He,style:Object.assign({},C)});if(L.style=highlight_objectSpread(de?{whiteSpace:\"pre-wrap\"}:{whiteSpace:\"pre\"},L.style),!$e)return Re.createElement(Se,Ye,ze,Re.createElement(xe,L,Te));(void 0===le&&be||de)&&(le=!0),be=be||defaultRenderer;var Xe=[{type:\"text\",value:Te}],Qe=function getCodeTree(s){var o=s.astGenerator,i=s.language,a=s.code,u=s.defaultCodeValue;if(isHighlightJs(o)){var _=function(s,o){return-1!==s.listLanguages().indexOf(o)}(o,i);return\"text\"===i?{value:u,language:\"text\"}:_?o.highlight(i,a):o.highlightAuto(a)}try{return i&&\"text\"!==i?{value:o.highlight(a,i)}:{value:u}}catch(s){return{value:u}}}({astGenerator:$e,language:a,code:Te,defaultCodeValue:Xe});null===Qe.language&&(Qe.value=Xe);var et=Qe.value.length;1===et&&\"text\"===Qe.value[0].type&&(et=Qe.value[0].value.split(\"\\n\").length);var tt=processLines(Qe,le,ye,U,Y,ee,et+ee,ce,de);return Re.createElement(Se,Ye,Re.createElement(xe,L,!Y&&ze,be({rows:tt,stylesheet:w,useInlineStyles:$})))}}(SO,{});EO.registerLanguage=SO.registerLanguage;const wO=EO;var xO=__webpack_require__(95089);const kO=__webpack_require__.n(xO)();var OO=__webpack_require__(65772);const CO=__webpack_require__.n(OO)();var AO=__webpack_require__(17285);const jO=__webpack_require__.n(AO)();var PO=__webpack_require__(35344);const IO=__webpack_require__.n(PO)();var TO=__webpack_require__(17533);const NO=__webpack_require__.n(TO)();var MO=__webpack_require__(73402);const RO=__webpack_require__.n(MO)();var DO=__webpack_require__(26571);const LO=__webpack_require__.n(DO)(),after_load=()=>{wO.registerLanguage(\"json\",CO),wO.registerLanguage(\"js\",kO),wO.registerLanguage(\"xml\",jO),wO.registerLanguage(\"yaml\",NO),wO.registerLanguage(\"http\",RO),wO.registerLanguage(\"bash\",IO),wO.registerLanguage(\"powershell\",LO),wO.registerLanguage(\"javascript\",kO)},FO={hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#333\",color:\"white\"},\"hljs-name\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-code\":{fontStyle:\"italic\",color:\"#888\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-tag\":{color:\"#62c8f3\"},\"hljs-variable\":{color:\"#ade5fc\"},\"hljs-template-variable\":{color:\"#ade5fc\"},\"hljs-selector-id\":{color:\"#ade5fc\"},\"hljs-selector-class\":{color:\"#ade5fc\"},\"hljs-string\":{color:\"#a2fca2\"},\"hljs-bullet\":{color:\"#d36363\"},\"hljs-type\":{color:\"#ffa\"},\"hljs-title\":{color:\"#ffa\"},\"hljs-section\":{color:\"#ffa\"},\"hljs-attribute\":{color:\"#ffa\"},\"hljs-quote\":{color:\"#ffa\"},\"hljs-built_in\":{color:\"#ffa\"},\"hljs-builtin-name\":{color:\"#ffa\"},\"hljs-number\":{color:\"#d36363\"},\"hljs-symbol\":{color:\"#d36363\"},\"hljs-keyword\":{color:\"#fcc28c\"},\"hljs-selector-tag\":{color:\"#fcc28c\"},\"hljs-literal\":{color:\"#fcc28c\"},\"hljs-comment\":{color:\"#888\"},\"hljs-deletion\":{color:\"#333\",backgroundColor:\"#fc9b9b\"},\"hljs-regexp\":{color:\"#c6b4f0\"},\"hljs-link\":{color:\"#c6b4f0\"},\"hljs-meta\":{color:\"#fc9b9b\"},\"hljs-addition\":{backgroundColor:\"#a2fca2\",color:\"#333\"}},BO={agate:FO,arta:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#222\",color:\"#aaa\"},\"hljs-subst\":{color:\"#aaa\"},\"hljs-section\":{color:\"#fff\",fontWeight:\"bold\"},\"hljs-comment\":{color:\"#444\"},\"hljs-quote\":{color:\"#444\"},\"hljs-meta\":{color:\"#444\"},\"hljs-string\":{color:\"#ffcc33\"},\"hljs-symbol\":{color:\"#ffcc33\"},\"hljs-bullet\":{color:\"#ffcc33\"},\"hljs-regexp\":{color:\"#ffcc33\"},\"hljs-number\":{color:\"#00cc66\"},\"hljs-addition\":{color:\"#00cc66\"},\"hljs-built_in\":{color:\"#32aaee\"},\"hljs-builtin-name\":{color:\"#32aaee\"},\"hljs-literal\":{color:\"#32aaee\"},\"hljs-type\":{color:\"#32aaee\"},\"hljs-template-variable\":{color:\"#32aaee\"},\"hljs-attribute\":{color:\"#32aaee\"},\"hljs-link\":{color:\"#32aaee\"},\"hljs-keyword\":{color:\"#6644aa\"},\"hljs-selector-tag\":{color:\"#6644aa\"},\"hljs-name\":{color:\"#6644aa\"},\"hljs-selector-id\":{color:\"#6644aa\"},\"hljs-selector-class\":{color:\"#6644aa\"},\"hljs-title\":{color:\"#bb1166\"},\"hljs-variable\":{color:\"#bb1166\"},\"hljs-deletion\":{color:\"#bb1166\"},\"hljs-template-tag\":{color:\"#bb1166\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-emphasis\":{fontStyle:\"italic\"}},monokai:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#272822\",color:\"#ddd\"},\"hljs-tag\":{color:\"#f92672\"},\"hljs-keyword\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#f92672\",fontWeight:\"bold\"},\"hljs-strong\":{color:\"#f92672\"},\"hljs-name\":{color:\"#f92672\"},\"hljs-code\":{color:\"#66d9ef\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-attribute\":{color:\"#bf79db\"},\"hljs-symbol\":{color:\"#bf79db\"},\"hljs-regexp\":{color:\"#bf79db\"},\"hljs-link\":{color:\"#bf79db\"},\"hljs-string\":{color:\"#a6e22e\"},\"hljs-bullet\":{color:\"#a6e22e\"},\"hljs-subst\":{color:\"#a6e22e\"},\"hljs-title\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-section\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-emphasis\":{color:\"#a6e22e\"},\"hljs-type\":{color:\"#a6e22e\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#a6e22e\"},\"hljs-builtin-name\":{color:\"#a6e22e\"},\"hljs-selector-attr\":{color:\"#a6e22e\"},\"hljs-selector-pseudo\":{color:\"#a6e22e\"},\"hljs-addition\":{color:\"#a6e22e\"},\"hljs-variable\":{color:\"#a6e22e\"},\"hljs-template-tag\":{color:\"#a6e22e\"},\"hljs-template-variable\":{color:\"#a6e22e\"},\"hljs-comment\":{color:\"#75715e\"},\"hljs-quote\":{color:\"#75715e\"},\"hljs-deletion\":{color:\"#75715e\"},\"hljs-meta\":{color:\"#75715e\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-selector-id\":{fontWeight:\"bold\"}},nord:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#2E3440\",color:\"#D8DEE9\"},\"hljs-subst\":{color:\"#D8DEE9\"},\"hljs-selector-tag\":{color:\"#81A1C1\"},\"hljs-selector-id\":{color:\"#8FBCBB\",fontWeight:\"bold\"},\"hljs-selector-class\":{color:\"#8FBCBB\"},\"hljs-selector-attr\":{color:\"#8FBCBB\"},\"hljs-selector-pseudo\":{color:\"#88C0D0\"},\"hljs-addition\":{backgroundColor:\"rgba(163, 190, 140, 0.5)\"},\"hljs-deletion\":{backgroundColor:\"rgba(191, 97, 106, 0.5)\"},\"hljs-built_in\":{color:\"#8FBCBB\"},\"hljs-type\":{color:\"#8FBCBB\"},\"hljs-class\":{color:\"#8FBCBB\"},\"hljs-function\":{color:\"#88C0D0\"},\"hljs-function > .hljs-title\":{color:\"#88C0D0\"},\"hljs-keyword\":{color:\"#81A1C1\"},\"hljs-literal\":{color:\"#81A1C1\"},\"hljs-symbol\":{color:\"#81A1C1\"},\"hljs-number\":{color:\"#B48EAD\"},\"hljs-regexp\":{color:\"#EBCB8B\"},\"hljs-string\":{color:\"#A3BE8C\"},\"hljs-title\":{color:\"#8FBCBB\"},\"hljs-params\":{color:\"#D8DEE9\"},\"hljs-bullet\":{color:\"#81A1C1\"},\"hljs-code\":{color:\"#8FBCBB\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-formula\":{color:\"#8FBCBB\"},\"hljs-strong\":{fontWeight:\"bold\"},\"hljs-link:hover\":{textDecoration:\"underline\"},\"hljs-quote\":{color:\"#4C566A\"},\"hljs-comment\":{color:\"#4C566A\"},\"hljs-doctag\":{color:\"#8FBCBB\"},\"hljs-meta\":{color:\"#5E81AC\"},\"hljs-meta-keyword\":{color:\"#5E81AC\"},\"hljs-meta-string\":{color:\"#A3BE8C\"},\"hljs-attr\":{color:\"#8FBCBB\"},\"hljs-attribute\":{color:\"#D8DEE9\"},\"hljs-builtin-name\":{color:\"#81A1C1\"},\"hljs-name\":{color:\"#81A1C1\"},\"hljs-section\":{color:\"#88C0D0\"},\"hljs-tag\":{color:\"#81A1C1\"},\"hljs-variable\":{color:\"#D8DEE9\"},\"hljs-template-variable\":{color:\"#D8DEE9\"},\"hljs-template-tag\":{color:\"#5E81AC\"},\"abnf .hljs-attribute\":{color:\"#88C0D0\"},\"abnf .hljs-symbol\":{color:\"#EBCB8B\"},\"apache .hljs-attribute\":{color:\"#88C0D0\"},\"apache .hljs-section\":{color:\"#81A1C1\"},\"arduino .hljs-built_in\":{color:\"#88C0D0\"},\"aspectj .hljs-meta\":{color:\"#D08770\"},\"aspectj > .hljs-title\":{color:\"#88C0D0\"},\"bnf .hljs-attribute\":{color:\"#8FBCBB\"},\"clojure .hljs-name\":{color:\"#88C0D0\"},\"clojure .hljs-symbol\":{color:\"#EBCB8B\"},\"coq .hljs-built_in\":{color:\"#88C0D0\"},\"cpp .hljs-meta-string\":{color:\"#8FBCBB\"},\"css .hljs-built_in\":{color:\"#88C0D0\"},\"css .hljs-keyword\":{color:\"#D08770\"},\"diff .hljs-meta\":{color:\"#8FBCBB\"},\"ebnf .hljs-attribute\":{color:\"#8FBCBB\"},\"glsl .hljs-built_in\":{color:\"#88C0D0\"},\"groovy .hljs-meta:not(:first-child)\":{color:\"#D08770\"},\"haxe .hljs-meta\":{color:\"#D08770\"},\"java .hljs-meta\":{color:\"#D08770\"},\"ldif .hljs-attribute\":{color:\"#8FBCBB\"},\"lisp .hljs-name\":{color:\"#88C0D0\"},\"lua .hljs-built_in\":{color:\"#88C0D0\"},\"moonscript .hljs-built_in\":{color:\"#88C0D0\"},\"nginx .hljs-attribute\":{color:\"#88C0D0\"},\"nginx .hljs-section\":{color:\"#5E81AC\"},\"pf .hljs-built_in\":{color:\"#88C0D0\"},\"processing .hljs-built_in\":{color:\"#88C0D0\"},\"scss .hljs-keyword\":{color:\"#81A1C1\"},\"stylus .hljs-keyword\":{color:\"#81A1C1\"},\"swift .hljs-meta\":{color:\"#D08770\"},\"vim .hljs-built_in\":{color:\"#88C0D0\",fontStyle:\"italic\"},\"yaml .hljs-meta\":{color:\"#D08770\"}},obsidian:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",background:\"#282b2e\",color:\"#e0e2e4\"},\"hljs-keyword\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-tag\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-literal\":{color:\"#93c763\",fontWeight:\"bold\"},\"hljs-selector-id\":{color:\"#93c763\"},\"hljs-number\":{color:\"#ffcd22\"},\"hljs-attribute\":{color:\"#668bb0\"},\"hljs-code\":{color:\"white\"},\"hljs-class .hljs-title\":{color:\"white\"},\"hljs-section\":{color:\"white\",fontWeight:\"bold\"},\"hljs-regexp\":{color:\"#d39745\"},\"hljs-link\":{color:\"#d39745\"},\"hljs-meta\":{color:\"#557182\"},\"hljs-tag\":{color:\"#8cbbad\"},\"hljs-name\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-bullet\":{color:\"#8cbbad\"},\"hljs-subst\":{color:\"#8cbbad\"},\"hljs-emphasis\":{color:\"#8cbbad\"},\"hljs-type\":{color:\"#8cbbad\",fontWeight:\"bold\"},\"hljs-built_in\":{color:\"#8cbbad\"},\"hljs-selector-attr\":{color:\"#8cbbad\"},\"hljs-selector-pseudo\":{color:\"#8cbbad\"},\"hljs-addition\":{color:\"#8cbbad\"},\"hljs-variable\":{color:\"#8cbbad\"},\"hljs-template-tag\":{color:\"#8cbbad\"},\"hljs-template-variable\":{color:\"#8cbbad\"},\"hljs-string\":{color:\"#ec7600\"},\"hljs-symbol\":{color:\"#ec7600\"},\"hljs-comment\":{color:\"#818e96\"},\"hljs-quote\":{color:\"#818e96\"},\"hljs-deletion\":{color:\"#818e96\"},\"hljs-selector-class\":{color:\"#A082BD\"},\"hljs-doctag\":{fontWeight:\"bold\"},\"hljs-title\":{fontWeight:\"bold\"},\"hljs-strong\":{fontWeight:\"bold\"}},\"tomorrow-night\":{\"hljs-comment\":{color:\"#969896\"},\"hljs-quote\":{color:\"#969896\"},\"hljs-variable\":{color:\"#cc6666\"},\"hljs-template-variable\":{color:\"#cc6666\"},\"hljs-tag\":{color:\"#cc6666\"},\"hljs-name\":{color:\"#cc6666\"},\"hljs-selector-id\":{color:\"#cc6666\"},\"hljs-selector-class\":{color:\"#cc6666\"},\"hljs-regexp\":{color:\"#cc6666\"},\"hljs-deletion\":{color:\"#cc6666\"},\"hljs-number\":{color:\"#de935f\"},\"hljs-built_in\":{color:\"#de935f\"},\"hljs-builtin-name\":{color:\"#de935f\"},\"hljs-literal\":{color:\"#de935f\"},\"hljs-type\":{color:\"#de935f\"},\"hljs-params\":{color:\"#de935f\"},\"hljs-meta\":{color:\"#de935f\"},\"hljs-link\":{color:\"#de935f\"},\"hljs-attribute\":{color:\"#f0c674\"},\"hljs-string\":{color:\"#b5bd68\"},\"hljs-symbol\":{color:\"#b5bd68\"},\"hljs-bullet\":{color:\"#b5bd68\"},\"hljs-addition\":{color:\"#b5bd68\"},\"hljs-title\":{color:\"#81a2be\"},\"hljs-section\":{color:\"#81a2be\"},\"hljs-keyword\":{color:\"#b294bb\"},\"hljs-selector-tag\":{color:\"#b294bb\"},hljs:{display:\"block\",overflowX:\"auto\",background:\"#1d1f21\",color:\"#c5c8c6\",padding:\"0.5em\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}},idea:{hljs:{display:\"block\",overflowX:\"auto\",padding:\"0.5em\",color:\"#000\",background:\"#fff\"},\"hljs-subst\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-title\":{fontWeight:\"normal\",color:\"#000\"},\"hljs-comment\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-quote\":{color:\"#808080\",fontStyle:\"italic\"},\"hljs-meta\":{color:\"#808000\"},\"hljs-tag\":{background:\"#efefef\"},\"hljs-section\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-name\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-literal\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-keyword\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-tag\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-type\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-id\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-selector-class\":{fontWeight:\"bold\",color:\"#000080\"},\"hljs-attribute\":{fontWeight:\"bold\",color:\"#0000ff\"},\"hljs-number\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-regexp\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-link\":{fontWeight:\"normal\",color:\"#0000ff\"},\"hljs-string\":{color:\"#008000\",fontWeight:\"bold\"},\"hljs-symbol\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-bullet\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-formula\":{color:\"#000\",background:\"#d0eded\",fontStyle:\"italic\"},\"hljs-doctag\":{textDecoration:\"underline\"},\"hljs-variable\":{color:\"#660e7a\"},\"hljs-template-variable\":{color:\"#660e7a\"},\"hljs-addition\":{background:\"#baeeba\"},\"hljs-deletion\":{background:\"#ffc8bd\"},\"hljs-emphasis\":{fontStyle:\"italic\"},\"hljs-strong\":{fontWeight:\"bold\"}}},$O=FO,components_SyntaxHighlighter=({language:s,className:o=\"\",getConfigs:i,syntaxHighlighting:a={},children:u=\"\"})=>{const _=i().syntaxHighlight.theme,{styles:w,defaultStyle:x}=a,C=w?.[_]??x;return Re.createElement(wO,{language:s,className:o,style:C},u)};var qO=__webpack_require__(5419),VO=__webpack_require__.n(qO);const components_HighlightCode=({fileName:s=\"response.txt\",className:o,downloadable:i,getComponent:a,canCopy:u,language:_,children:w})=>{const x=(0,Re.useRef)(null),C=a(\"SyntaxHighlighter\",!0),handlePreventYScrollingBeyondElement=s=>{const{target:o,deltaY:i}=s,{scrollHeight:a,offsetHeight:u,scrollTop:_}=o;a>u&&(0===_&&i<0||u+_>=a&&i>0)&&s.preventDefault()};return(0,Re.useEffect)((()=>{const s=Array.from(x.current.childNodes).filter((s=>!!s.nodeType&&s.classList.contains(\"microlight\")));return s.forEach((s=>s.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{s.forEach((s=>s.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[w,o,_]),Re.createElement(\"div\",{className:\"highlight-code\",ref:x},u&&Re.createElement(\"div\",{className:\"copy-to-clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:w},Re.createElement(\"button\",null))),i?Re.createElement(\"button\",{className:\"download-contents\",onClick:()=>{VO()(w,s)}},\"Download\"):null,Re.createElement(C,{language:_,className:Jn()(o,\"microlight\"),renderPlainText:({children:s,PlainTextViewer:i})=>Re.createElement(i,{className:o},s)},w))},components_PlainTextViewer=({className:s=\"\",children:o})=>Re.createElement(\"pre\",{className:Jn()(\"microlight\",s)},o),wrap_components_SyntaxHighlighter=(s,o)=>({renderPlainText:i,children:a,...u})=>{const _=o.getConfigs().syntaxHighlight.activated,w=o.getComponent(\"PlainTextViewer\");return _||\"function\"!=typeof i?_?Re.createElement(s,u,a):Re.createElement(w,null,a):i({children:a,PlainTextViewer:w})},SyntaxHighlightingPlugin1=()=>({afterLoad:after_load,rootInjects:{syntaxHighlighting:{styles:BO,defaultStyle:$O}},components:{SyntaxHighlighter:components_SyntaxHighlighter,HighlightCode:components_HighlightCode,PlainTextViewer:components_PlainTextViewer}}),SyntaxHighlightingPlugin2=()=>({wrapComponents:{SyntaxHighlighter:wrap_components_SyntaxHighlighter}}),syntax_highlighting=()=>[SyntaxHighlightingPlugin1,SyntaxHighlightingPlugin2],versions_after_load=()=>{const{GIT_DIRTY:s,GIT_COMMIT:o,PACKAGE_VERSION:i,BUILD_TIME:a}={PACKAGE_VERSION:\"5.24.2\",GIT_COMMIT:\"gf714aff1\",GIT_DIRTY:!0,BUILD_TIME:\"Mon, 16 Jun 2025 12:49:08 GMT\"};lt.versions=lt.versions||{},lt.versions.swaggerUI={version:i,gitRevision:o,gitDirty:s,buildTimestamp:a}},versions=()=>({afterLoad:versions_after_load});var UO=__webpack_require__(47248),zO=__webpack_require__.n(UO);const WO=console.error,withErrorBoundary=s=>o=>{const{getComponent:i,fn:a}=s(),u=i(\"ErrorBoundary\"),_=a.getDisplayName(o);class WithErrorBoundary extends Re.Component{render(){return Re.createElement(u,{targetName:_,getComponent:i,fn:a},Re.createElement(o,Mn()({},this.props,this.context)))}}var w;return WithErrorBoundary.displayName=`WithErrorBoundary(${_})`,(w=o).prototype&&w.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=o.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:s})=>Re.createElement(\"div\",{className:\"fallback\"},\"😱 \",Re.createElement(\"i\",null,\"Could not render \",\"t\"===s?\"this component\":s,\", see the console.\"));class ErrorBoundary extends Re.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:WO},children:null};static getDerivedStateFromError(s){return{hasError:!0,error:s}}constructor(...s){super(...s),this.state={hasError:!1,error:null}}componentDidCatch(s,o){this.props.fn.componentDidCatch(s,o)}render(){const{getComponent:s,targetName:o,children:i}=this.props;if(this.state.hasError){const i=s(\"Fallback\");return Re.createElement(i,{name:o})}return i}}const JO=ErrorBoundary,safe_render=({componentList:s=[],fullOverride:o=!1}={})=>({getSystem:i})=>{const a=o?s:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...s],u=zO()(a,Array(a.length).fill(((s,{fn:o})=>o.withErrorBoundary(s))));return{fn:{componentDidCatch:WO,withErrorBoundary:withErrorBoundary(i)},components:{ErrorBoundary:JO,Fallback:fallback},wrapComponents:u}};class App extends Re.Component{getLayout(){const{getComponent:s,layoutSelectors:o}=this.props,i=o.current(),a=s(i,!0);return a||(()=>Re.createElement(\"h1\",null,' No layout defined for \"',i,'\" '))}render(){const s=this.getLayout();return Re.createElement(s,null)}}const HO=App;class AuthorizationPopup extends Re.Component{close=()=>{let{authActions:s}=this.props;s.showDefinitions(!1)};render(){let{authSelectors:s,authActions:o,getComponent:i,errSelectors:a,specSelectors:u,fn:{AST:_={}}}=this.props,w=s.shownDefinitions();const x=i(\"auths\"),C=i(\"CloseIcon\");return Re.createElement(\"div\",{className:\"dialog-ux\"},Re.createElement(\"div\",{className:\"backdrop-ux\"}),Re.createElement(\"div\",{className:\"modal-ux\"},Re.createElement(\"div\",{className:\"modal-dialog-ux\"},Re.createElement(\"div\",{className:\"modal-ux-inner\"},Re.createElement(\"div\",{className:\"modal-ux-header\"},Re.createElement(\"h3\",null,\"Available authorizations\"),Re.createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},Re.createElement(C,null))),Re.createElement(\"div\",{className:\"modal-ux-content\"},w.valueSeq().map(((w,C)=>Re.createElement(x,{key:C,AST:_,definitions:w,getComponent:i,errSelectors:a,authSelectors:s,authActions:o,specSelectors:u}))))))))}}class AuthorizeBtn extends Re.Component{render(){let{isAuthorized:s,showPopup:o,onClick:i,getComponent:a}=this.props;const u=a(\"authorizationPopup\",!0),_=a(\"LockAuthIcon\",!0),w=a(\"UnlockAuthIcon\",!0);return Re.createElement(\"div\",{className:\"auth-wrapper\"},Re.createElement(\"button\",{className:s?\"btn authorize locked\":\"btn authorize unlocked\",onClick:i},Re.createElement(\"span\",null,\"Authorize\"),s?Re.createElement(_,null):Re.createElement(w,null)),o&&Re.createElement(u,null))}}class AuthorizeBtnContainer extends Re.Component{render(){const{authActions:s,authSelectors:o,specSelectors:i,getComponent:a}=this.props,u=i.securityDefinitions(),_=o.definitionsToAuthorize(),w=a(\"authorizeBtn\");return u?Re.createElement(w,{onClick:()=>s.showDefinitions(_),isAuthorized:!!o.authorized().size,showPopup:!!o.shownDefinitions(),getComponent:a}):null}}class AuthorizeOperationBtn extends Re.Component{onClick=s=>{s.stopPropagation();let{onClick:o}=this.props;o&&o()};render(){let{isAuthorized:s,getComponent:o}=this.props;const i=o(\"LockAuthOperationIcon\",!0),a=o(\"UnlockAuthOperationIcon\",!0);return Re.createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":s?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},s?Re.createElement(i,{className:\"locked\"}):Re.createElement(a,{className:\"unlocked\"}))}}class Auths extends Re.Component{constructor(s,o){super(s,o),this.state={}}onAuthChange=s=>{let{name:o}=s;this.setState({[o]:s})};submitAuth=s=>{s.preventDefault();let{authActions:o}=this.props;o.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:o,definitions:i}=this.props,a=i.map(((s,o)=>o)).toArray();this.setState(a.reduce(((s,o)=>(s[o]=\"\",s)),{})),o.logoutWithPersistOption(a)};close=s=>{s.preventDefault();let{authActions:o}=this.props;o.showDefinitions(!1)};render(){let{definitions:s,getComponent:o,authSelectors:i,errSelectors:a}=this.props;const u=o(\"AuthItem\"),_=o(\"oauth2\",!0),w=o(\"Button\");let x=i.authorized(),C=s.filter(((s,o)=>!!x.get(o))),j=s.filter((s=>\"oauth2\"!==s.get(\"type\"))),L=s.filter((s=>\"oauth2\"===s.get(\"type\")));return Re.createElement(\"div\",{className:\"auth-container\"},!!j.size&&Re.createElement(\"form\",{onSubmit:this.submitAuth},j.map(((s,_)=>Re.createElement(u,{key:_,schema:s,name:_,getComponent:o,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a,authSelectors:i}))).toArray(),Re.createElement(\"div\",{className:\"auth-btn-wrapper\"},j.size===C.size?Re.createElement(w,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):Re.createElement(w,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),Re.createElement(w,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),L&&L.size?Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"scope-def\"},Re.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),Re.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(_,{authorized:x,schema:s,name:o})))).toArray()):null)}}class auth_item_Auths extends Re.Component{render(){let{schema:s,name:o,getComponent:i,onAuthChange:a,authorized:u,errSelectors:_,authSelectors:w}=this.props;const x=i(\"apiKeyAuth\"),C=i(\"basicAuth\");let j;const L=s.get(\"type\");switch(L){case\"apiKey\":j=Re.createElement(x,{key:o,schema:s,name:o,errSelectors:_,authorized:u,getComponent:i,onChange:a,authSelectors:w});break;case\"basic\":j=Re.createElement(C,{key:o,schema:s,name:o,errSelectors:_,authorized:u,getComponent:i,onChange:a,authSelectors:w});break;default:j=Re.createElement(\"div\",{key:o},\"Unknown security definition type \",L)}return Re.createElement(\"div\",{key:`${o}-jump`},j)}}class AuthError extends Re.Component{render(){let{error:s}=this.props,o=s.get(\"level\"),i=s.get(\"message\"),a=s.get(\"source\");return Re.createElement(\"div\",{className:\"errors\"},Re.createElement(\"b\",null,a,\" \",o),Re.createElement(\"span\",null,i))}}class ApiKeyAuth extends Re.Component{constructor(s,o){super(s,o);let{name:i,schema:a}=this.props,u=this.getValue();this.state={name:i,schema:a,value:u}}getValue(){let{name:s,authorized:o}=this.props;return o&&o.getIn([s,\"value\"])}onChange=s=>{let{onChange:o}=this.props,i=s.target.value,a=Object.assign({},this.state,{value:i});this.setState(a),o(a)};render(){let{schema:s,getComponent:o,errSelectors:i,name:a,authSelectors:u}=this.props;const _=o(\"Input\"),w=o(\"Row\"),x=o(\"Col\"),C=o(\"authError\"),j=o(\"Markdown\",!0),L=o(\"JumpToPath\",!0),B=u.selectAuthPath(a);let $=this.getValue(),V=i.allErrors().filter((s=>s.get(\"authId\")===a));return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,Re.createElement(\"code\",null,a||s.get(\"name\")),\" (apiKey)\",Re.createElement(L,{path:B})),$&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(j,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"p\",null,\"Name: \",Re.createElement(\"code\",null,s.get(\"name\")))),Re.createElement(w,null,Re.createElement(\"p\",null,\"In: \",Re.createElement(\"code\",null,s.get(\"in\")))),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),$?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),V.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o}))))}}class BasicAuth extends Re.Component{constructor(s,o){super(s,o);let{schema:i,name:a}=this.props,u=this.getValue().username;this.state={name:a,schema:i,value:u?{username:u}:{}}}getValue(){let{authorized:s,name:o}=this.props;return s&&s.getIn([o,\"value\"])||{}}onChange=s=>{let{onChange:o}=this.props,{value:i,name:a}=s.target,u=this.state.value;u[a]=i,this.setState({value:u}),o(this.state)};render(){let{schema:s,getComponent:o,name:i,errSelectors:a,authSelectors:u}=this.props;const _=o(\"Input\"),w=o(\"Row\"),x=o(\"Col\"),C=o(\"authError\"),j=o(\"JumpToPath\",!0),L=o(\"Markdown\",!0),B=u.selectAuthPath(i);let $=this.getValue().username,V=a.allErrors().filter((s=>s.get(\"authId\")===i));return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,\"Basic authorization\",Re.createElement(j,{path:B})),$&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(L,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),$?Re.createElement(\"code\",null,\" \",$,\" \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),$?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),V.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o}))))}}function example_Example(s){const{example:o,showValue:i,getComponent:a}=s,u=a(\"Markdown\",!0),_=a(\"HighlightCode\",!0);return o&&ze.Map.isMap(o)?Re.createElement(\"div\",{className:\"example\"},o.get(\"description\")?Re.createElement(\"section\",{className:\"example__section\"},Re.createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),Re.createElement(\"p\",null,Re.createElement(u,{source:o.get(\"description\")}))):null,i&&o.has(\"value\")?Re.createElement(\"section\",{className:\"example__section\"},Re.createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),Re.createElement(_,null,stringify(o.get(\"value\")))):null):null}class ExamplesSelect extends Re.PureComponent{static defaultProps={examples:(0,ze.Map)({}),onSelect:(...s)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...s),currentExampleKey:null,showLabels:!0};_onSelect=(s,{isSyntheticChange:o=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(s,{isSyntheticChange:o})};_onDomSelect=s=>{if(\"function\"==typeof this.props.onSelect){const o=s.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(o,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:s,currentExampleKey:o}=this.props,i=s.get(o),a=s.keySeq().first(),u=s.get(a);return i||u||(0,ze.Map)({})};componentDidMount(){const{onSelect:s,examples:o}=this.props;if(\"function\"==typeof s){const s=o.first(),i=o.keyOf(s);this._onSelect(i,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(s){const{currentExampleKey:o,examples:i}=s;if(i!==this.props.examples&&!i.has(o)){const s=i.first(),o=i.keyOf(s);this._onSelect(o,{isSyntheticChange:!0})}}render(){const{examples:s,currentExampleKey:o,isValueModified:i,isModifiedValueAvailable:a,showLabels:u}=this.props;return Re.createElement(\"div\",{className:\"examples-select\"},u?Re.createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,Re.createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:a&&i?\"__MODIFIED__VALUE__\":o||\"\"},a?Re.createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,s.map(((s,o)=>Re.createElement(\"option\",{key:o,value:o},ze.Map.isMap(s)&&s.get(\"summary\")||o))).valueSeq()))}}const stringifyUnlessList=s=>ze.List.isList(s)?s:stringify(s);class ExamplesSelectValueRetainer extends Re.PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,ze.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...s),updateValue:(...s)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...s)};constructor(s){super(s);const o=this._getCurrentExampleValue();this.state={[s.currentNamespace]:(0,ze.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:o,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==o})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:s}=this.props;return(this.state[s]||(0,ze.Map)()).toObject()};_setStateForCurrentNamespace=s=>{const{currentNamespace:o}=this.props;return this._setStateForNamespace(o,s)};_setStateForNamespace=(s,o)=>{const i=(this.state[s]||(0,ze.Map)()).mergeDeep(o);return this.setState({[s]:i})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:s}=this.props;return this._getCurrentExampleValue()===s};_getValueForExample=(s,o)=>{const{examples:i}=o||this.props;return stringifyUnlessList((i||(0,ze.Map)({})).getIn([s,\"value\"]))};_getCurrentExampleValue=s=>{const{currentKey:o}=s||this.props;return this._getValueForExample(o,s||this.props)};_onExamplesSelect=(s,{isSyntheticChange:o}={},...i)=>{const{onSelect:a,updateValue:u,currentUserInputValue:_,userHasEditedBody:w}=this.props,{lastUserEditedValue:x}=this._getStateForCurrentNamespace(),C=this._getValueForExample(s);if(\"__MODIFIED__VALUE__\"===s)return u(stringifyUnlessList(x)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof a&&a(s,{isSyntheticChange:o},...i),this._setStateForCurrentNamespace({lastDownstreamValue:C,isModifiedValueSelected:o&&w||!!_&&_!==C}),o||\"function\"==typeof u&&u(stringifyUnlessList(C))};UNSAFE_componentWillReceiveProps(s){const{currentUserInputValue:o,examples:i,onSelect:a,userHasEditedBody:u}=s,{lastUserEditedValue:_,lastDownstreamValue:w}=this._getStateForCurrentNamespace(),x=this._getValueForExample(s.currentKey,s),C=i.filter((s=>ze.Map.isMap(s)&&(s.get(\"value\")===o||stringify(s.get(\"value\"))===o)));if(C.size){let o;o=C.has(s.currentKey)?s.currentKey:C.keySeq().first(),a(o,{isSyntheticChange:!0})}else o!==this.props.currentUserInputValue&&o!==_&&o!==w&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(s.currentNamespace,{lastUserEditedValue:s.currentUserInputValue,isModifiedValueSelected:u||o!==x}))}render(){const{currentUserInputValue:s,examples:o,currentKey:i,getComponent:a,userHasEditedBody:u}=this.props,{lastDownstreamValue:_,lastUserEditedValue:w,isModifiedValueSelected:x}=this._getStateForCurrentNamespace(),C=a(\"ExamplesSelect\");return Re.createElement(C,{examples:o,currentExampleKey:i,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!w&&w!==_,isValueModified:void 0!==s&&x&&s!==this._getCurrentExampleValue()||u})}}function oauth2_authorize_authorize({auth:s,authActions:o,errActions:i,configs:a,authConfigs:u={},currentServer:_}){let{schema:w,scopes:x,name:C,clientId:j}=s,L=w.get(\"flow\"),B=[];switch(L){case\"password\":return void o.authorizePassword(s);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void o.authorizeApplication(s);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":B.push(\"response_type=code\");break;case\"implicit\":B.push(\"response_type=token\")}\"string\"==typeof j&&B.push(\"client_id=\"+encodeURIComponent(j));let $=a.oauth2RedirectUrl;if(void 0===$)return void i.newAuthErr({authId:C,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});B.push(\"redirect_uri=\"+encodeURIComponent($));let V=[];if(Array.isArray(x)?V=x:We().List.isList(x)&&(V=x.toArray()),V.length>0){let s=u.scopeSeparator||\" \";B.push(\"scope=\"+encodeURIComponent(V.join(s)))}let U=utils_btoa(new Date);if(B.push(\"state=\"+encodeURIComponent(U)),void 0!==u.realm&&B.push(\"realm=\"+encodeURIComponent(u.realm)),(\"authorizationCode\"===L||\"authorization_code\"===L||\"accessCode\"===L)&&u.usePkceWithAuthorizationCodeGrant){const o=function generateCodeVerifier(){return b64toB64UrlEncoded(xt()(32).toString(\"base64\"))}(),i=function createCodeChallenge(s){return b64toB64UrlEncoded(Ot()(\"sha256\").update(s).digest(\"base64\"))}(o);B.push(\"code_challenge=\"+i),B.push(\"code_challenge_method=S256\"),s.codeVerifier=o}let{additionalQueryStringParams:z}=u;for(let s in z)void 0!==z[s]&&B.push([s,z[s]].map(encodeURIComponent).join(\"=\"));const Y=w.get(\"authorizationUrl\");let Z;Z=_?Nt()(sanitizeUrl(Y),_,!0).toString():sanitizeUrl(Y);let ee,ie=[Z,B.join(\"&\")].join(\"string\"!=typeof Y||Y.includes(\"?\")?\"&\":\"?\");ee=\"implicit\"===L?o.preAuthorizeImplicit:u.useBasicAuthenticationWithAccessCodeGrant?o.authorizeAccessCodeWithBasicAuthentication:o.authorizeAccessCodeWithFormParams,o.authPopup(ie,{auth:s,state:U,redirectUrl:$,callback:ee,errCb:i.newAuthErr})}class Oauth2 extends Re.Component{constructor(s,o){super(s,o);let{name:i,schema:a,authorized:u,authSelectors:_}=this.props,w=u&&u.get(i),x=_.getConfigs()||{},C=w&&w.get(\"username\")||\"\",j=w&&w.get(\"clientId\")||x.clientId||\"\",L=w&&w.get(\"clientSecret\")||x.clientSecret||\"\",B=w&&w.get(\"passwordType\")||\"basic\",$=w&&w.get(\"scopes\")||x.scopes||[];\"string\"==typeof $&&($=$.split(x.scopeSeparator||\" \")),this.state={appName:x.appName,name:i,schema:a,scopes:$,clientId:j,clientSecret:L,username:C,password:\"\",passwordType:B}}close=s=>{s.preventDefault();let{authActions:o}=this.props;o.showDefinitions(!1)};authorize=()=>{let{authActions:s,errActions:o,getConfigs:i,authSelectors:a,oas3Selectors:u}=this.props,_=i(),w=a.getConfigs();o.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:u.serverEffectiveValue(u.selectedServer()),authActions:s,errActions:o,configs:_,authConfigs:w})};onScopeChange=s=>{let{target:o}=s,{checked:i}=o,a=o.dataset.value;if(i&&-1===this.state.scopes.indexOf(a)){let s=this.state.scopes.concat([a]);this.setState({scopes:s})}else!i&&this.state.scopes.indexOf(a)>-1&&this.setState({scopes:this.state.scopes.filter((s=>s!==a))})};onInputChange=s=>{let{target:{dataset:{name:o},value:i}}=s,a={[o]:i};this.setState(a)};selectScopes=s=>{s.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=s=>{s.preventDefault();let{authActions:o,errActions:i,name:a}=this.props;i.clear({authId:a,type:\"auth\",source:\"auth\"}),o.logoutWithPersistOption([a])};render(){let{schema:s,getComponent:o,authSelectors:i,errSelectors:a,name:u,specSelectors:_}=this.props;const w=o(\"Input\"),x=o(\"Row\"),C=o(\"Col\"),j=o(\"Button\"),L=o(\"authError\"),B=o(\"JumpToPath\",!0),$=o(\"Markdown\",!0),V=o(\"InitializedInput\"),{isOAS3:U}=_;let z=U()?s.get(\"openIdConnectUrl\"):null;const Y=\"implicit\",Z=\"password\",ee=U()?z?\"authorization_code\":\"authorizationCode\":\"accessCode\",ie=U()?z?\"client_credentials\":\"clientCredentials\":\"application\",ae=i.selectAuthPath(u);let ce=!!(i.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,le=s.get(\"flow\"),pe=le===ee&&ce?le+\" with PKCE\":le,de=s.get(\"allowedScopes\")||s.get(\"scopes\"),fe=!!i.authorized().get(u),ye=a.allErrors().filter((s=>s.get(\"authId\")===u)),be=!ye.filter((s=>\"validation\"===s.get(\"source\"))).size,_e=s.get(\"description\");return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,u,\" (OAuth2, \",pe,\") \",Re.createElement(B,{path:ae})),this.state.appName?Re.createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,_e&&Re.createElement($,{source:s.get(\"description\")}),fe&&Re.createElement(\"h6\",null,\"Authorized\"),z&&Re.createElement(\"p\",null,\"OpenID Connect URL: \",Re.createElement(\"code\",null,z)),(le===Y||le===ee)&&Re.createElement(\"p\",null,\"Authorization URL: \",Re.createElement(\"code\",null,s.get(\"authorizationUrl\"))),(le===Z||le===ee||le===ie)&&Re.createElement(\"p\",null,\"Token URL:\",Re.createElement(\"code\",null,\" \",s.get(\"tokenUrl\"))),Re.createElement(\"p\",{className:\"flow\"},\"Flow: \",Re.createElement(\"code\",null,pe)),le!==Z?null:Re.createElement(x,null,Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),fe?Re.createElement(\"code\",null,\" \",this.state.username,\" \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),fe?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),fe?Re.createElement(\"code\",null,\" \",this.state.passwordType,\" \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},Re.createElement(\"option\",{value:\"basic\"},\"Authorization header\"),Re.createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(le===ie||le===Y||le===ee||le===Z)&&(!fe||fe&&this.state.clientId)&&Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:`client_id_${le}`},\"client_id:\"),fe?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(V,{id:`client_id_${le}`,type:\"text\",required:le===Z,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(le===ie||le===ee||le===Z)&&Re.createElement(x,null,Re.createElement(\"label\",{htmlFor:`client_secret_${le}`},\"client_secret:\"),fe?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(C,{tablet:10,desktop:10},Re.createElement(V,{id:`client_secret_${le}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!fe&&de&&de.size?Re.createElement(\"div\",{className:\"scopes\"},Re.createElement(\"h2\",null,\"Scopes:\",Re.createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),Re.createElement(\"a\",{onClick:this.selectScopes},\"select none\")),de.map(((s,o)=>Re.createElement(x,{key:o},Re.createElement(\"div\",{className:\"checkbox\"},Re.createElement(w,{\"data-value\":o,id:`${o}-${le}-checkbox-${this.state.name}`,disabled:fe,checked:this.state.scopes.includes(o),type:\"checkbox\",onChange:this.onScopeChange}),Re.createElement(\"label\",{htmlFor:`${o}-${le}-checkbox-${this.state.name}`},Re.createElement(\"span\",{className:\"item\"}),Re.createElement(\"div\",{className:\"text\"},Re.createElement(\"p\",{className:\"name\"},o),Re.createElement(\"p\",{className:\"description\"},s))))))).toArray()):null,ye.valueSeq().map(((s,o)=>Re.createElement(L,{error:s,key:o}))),Re.createElement(\"div\",{className:\"auth-btn-wrapper\"},be&&(fe?Re.createElement(j,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):Re.createElement(j,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),Re.createElement(j,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends Re.Component{onClick=()=>{let{specActions:s,path:o,method:i}=this.props;s.clearResponse(o,i),s.clearRequest(o,i)};render(){return Re.createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const live_response_Headers=({headers:s})=>Re.createElement(\"div\",null,Re.createElement(\"h5\",null,\"Response headers\"),Re.createElement(\"pre\",{className:\"microlight\"},s)),Duration=({duration:s})=>Re.createElement(\"div\",null,Re.createElement(\"h5\",null,\"Request duration\"),Re.createElement(\"pre\",{className:\"microlight\"},s,\" ms\"));class LiveResponse extends Re.Component{shouldComponentUpdate(s){return this.props.response!==s.response||this.props.path!==s.path||this.props.method!==s.method||this.props.displayRequestDuration!==s.displayRequestDuration}render(){const{response:s,getComponent:o,getConfigs:i,displayRequestDuration:a,specSelectors:u,path:_,method:w}=this.props,{showMutatedRequest:x,requestSnippetsEnabled:C}=i(),j=x?u.mutatedRequestFor(_,w):u.requestFor(_,w),L=s.get(\"status\"),B=j.get(\"url\"),$=s.get(\"headers\").toJS(),V=s.get(\"notDocumented\"),U=s.get(\"error\"),z=s.get(\"text\"),Y=s.get(\"duration\"),Z=Object.keys($),ee=$[\"content-type\"]||$[\"Content-Type\"],ie=o(\"responseBody\"),ae=Z.map((s=>{var o=Array.isArray($[s])?$[s].join():$[s];return Re.createElement(\"span\",{className:\"headerline\",key:s},\" \",s,\": \",o,\" \")})),ce=0!==ae.length,le=o(\"Markdown\",!0),pe=o(\"RequestSnippets\",!0),de=o(\"curl\",!0);return Re.createElement(\"div\",null,j&&C?Re.createElement(pe,{request:j}):Re.createElement(de,{request:j}),B&&Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"request-url\"},Re.createElement(\"h4\",null,\"Request URL\"),Re.createElement(\"pre\",{className:\"microlight\"},B))),Re.createElement(\"h4\",null,\"Server response\"),Re.createElement(\"table\",{className:\"responses-table live-responses-table\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",{className:\"responses-header\"},Re.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),Re.createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),Re.createElement(\"tbody\",null,Re.createElement(\"tr\",{className:\"response\"},Re.createElement(\"td\",{className:\"response-col_status\"},L,V?Re.createElement(\"div\",{className:\"response-undocumented\"},Re.createElement(\"i\",null,\" Undocumented \")):null),Re.createElement(\"td\",{className:\"response-col_description\"},U?Re.createElement(le,{source:`${\"\"!==s.get(\"name\")?`${s.get(\"name\")}: `:\"\"}${s.get(\"message\")}`}):null,z?Re.createElement(ie,{content:z,contentType:ee,url:B,headers:$,getConfigs:i,getComponent:o}):null,ce?Re.createElement(live_response_Headers,{headers:ae}):null,a&&Y?Re.createElement(Duration,{duration:Y}):null)))))}}class OnlineValidatorBadge extends Re.Component{constructor(s,o){super(s,o);let{getConfigs:i}=s,{validatorUrl:a}=i();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===a?\"https://validator.swagger.io/validator\":a}}getDefinitionUrl=()=>{let{specSelectors:s}=this.props;return new(Nt())(s.url(),lt.location).toString()};UNSAFE_componentWillReceiveProps(s){let{getConfigs:o}=s,{validatorUrl:i}=o();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===i?\"https://validator.swagger.io/validator\":i})}render(){let{getConfigs:s}=this.props,{spec:o}=s(),i=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof o&&Object.keys(o).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?Re.createElement(\"span\",{className:\"float-right\"},Re.createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${i}/debug?url=${encodeURIComponent(this.state.url)}`},Re.createElement(ValidatorImage,{src:`${i}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends Re.Component{constructor(s){super(s),this.state={loaded:!1,error:!1}}componentDidMount(){const s=new Image;s.onload=()=>{this.setState({loaded:!0})},s.onerror=()=>{this.setState({error:!0})},s.src=this.props.src}UNSAFE_componentWillReceiveProps(s){if(s.src!==this.props.src){const o=new Image;o.onload=()=>{this.setState({loaded:!0})},o.onerror=()=>{this.setState({error:!0})},o.src=s.src}}render(){return this.state.error?Re.createElement(\"img\",{alt:\"Error\"}):this.state.loaded?Re.createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends Re.Component{render(){let{specSelectors:s}=this.props;const o=s.taggedOperations();return 0===o.size?Re.createElement(\"h3\",null,\" No operations defined in spec!\"):Re.createElement(\"div\",null,o.map(this.renderOperationTag).toArray(),o.size<1?Re.createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(s,o)=>{const{specSelectors:i,getComponent:a,oas3Selectors:u,layoutSelectors:_,layoutActions:w,getConfigs:x}=this.props,C=i.validOperationMethods(),j=a(\"OperationContainer\",!0),L=a(\"OperationTag\"),B=s.get(\"operations\");return Re.createElement(L,{key:\"operation-\"+o,tagObj:s,tag:o,oas3Selectors:u,layoutSelectors:_,layoutActions:w,getConfigs:x,getComponent:a,specUrl:i.url()},Re.createElement(\"div\",{className:\"operation-tag-content\"},B.map((s=>{const i=s.get(\"path\"),a=s.get(\"method\"),u=We().List([\"paths\",i,a]);return-1===C.indexOf(a)?null:Re.createElement(j,{key:`${i}-${a}`,specPath:u,op:s,path:i,method:a,tag:o})})).toArray()))}}class OperationTag extends Re.Component{static defaultProps={tagObj:We().fromJS({}),tag:\"\"};render(){const{tagObj:s,tag:o,children:i,oas3Selectors:a,layoutSelectors:u,layoutActions:_,getConfigs:w,getComponent:x,specUrl:C}=this.props;let{docExpansion:j,deepLinking:L}=w();const B=x(\"Collapse\"),$=x(\"Markdown\",!0),V=x(\"DeepLink\"),U=x(\"Link\"),z=x(\"ArrowUpIcon\"),Y=x(\"ArrowDownIcon\");let Z,ee=s.getIn([\"tagDetails\",\"description\"],null),ie=s.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),ae=s.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);Z=isFunc(a)&&isFunc(a.selectedServer)?safeBuildUrl(ae,C,{selectedServer:a.selectedServer()}):ae;let ce=[\"operations-tag\",o],le=u.isShown(ce,\"full\"===j||\"list\"===j);return Re.createElement(\"div\",{className:le?\"opblock-tag-section is-open\":\"opblock-tag-section\"},Re.createElement(\"h3\",{onClick:()=>_.show(ce,!le),className:ee?\"opblock-tag\":\"opblock-tag no-desc\",id:ce.map((s=>escapeDeepLinkPath(s))).join(\"-\"),\"data-tag\":o,\"data-is-open\":le},Re.createElement(V,{enabled:L,isShown:le,path:createDeepLinkPath(o),text:o}),ee?Re.createElement(\"small\",null,Re.createElement($,{source:ee})):Re.createElement(\"small\",null),Z?Re.createElement(\"div\",{className:\"info__externaldocs\"},Re.createElement(\"small\",null,Re.createElement(U,{href:sanitizeUrl(Z),onClick:s=>s.stopPropagation(),target:\"_blank\"},ie||Z))):null,Re.createElement(\"button\",{\"aria-expanded\":le,className:\"expand-operation\",title:le?\"Collapse operation\":\"Expand operation\",onClick:()=>_.show(ce,!le)},le?Re.createElement(z,{className:\"arrow\"}):Re.createElement(Y,{className:\"arrow\"}))),Re.createElement(B,{isOpened:le},i))}}class operation_Operation extends Re.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,ze.List)(),summary:\"\"};render(){let{specPath:s,response:o,request:i,toggleShown:a,onTryoutClick:u,onResetClick:_,onCancelClick:w,onExecute:x,fn:C,getComponent:j,getConfigs:L,specActions:B,specSelectors:$,authActions:V,authSelectors:U,oas3Actions:z,oas3Selectors:Y}=this.props,Z=this.props.operation,{deprecated:ee,isShown:ie,path:ae,method:ce,op:le,tag:pe,operationId:de,allowTryItOut:fe,displayRequestDuration:ye,tryItOutEnabled:be,executeInProgress:_e}=Z.toJS(),{description:Se,externalDocs:we,schemes:xe}=le;const Pe=we?safeBuildUrl(we.url,$.url(),{selectedServer:Y.selectedServer()}):\"\";let Te=Z.getIn([\"op\"]),$e=Te.get(\"responses\"),qe=function getList(s,o){if(!We().Iterable.isIterable(s))return We().List();let i=s.getIn(Array.isArray(o)?o:[o]);return We().List.isList(i)?i:We().List()}(Te,[\"parameters\"]),ze=$.operationScheme(ae,ce),He=[\"operations\",pe,de],Ye=getExtensions(Te);const Xe=j(\"responses\"),Qe=j(\"parameters\"),et=j(\"execute\"),tt=j(\"clear\"),rt=j(\"Collapse\"),nt=j(\"Markdown\",!0),st=j(\"schemes\"),ot=j(\"OperationServers\"),it=j(\"OperationExt\"),at=j(\"OperationSummary\"),ct=j(\"Link\"),{showExtensions:lt}=L();if($e&&o&&o.size>0){let s=!$e.get(String(o.get(\"status\")))&&!$e.get(\"default\");o=o.set(\"notDocumented\",s)}let ut=[ae,ce];const pt=$.validationErrors([ae,ce]);return Re.createElement(\"div\",{className:ee?\"opblock opblock-deprecated\":ie?`opblock opblock-${ce} is-open`:`opblock opblock-${ce}`,id:escapeDeepLinkPath(He.join(\"-\"))},Re.createElement(at,{operationProps:Z,isShown:ie,toggleShown:a,getComponent:j,authActions:V,authSelectors:U,specPath:s}),Re.createElement(rt,{isOpened:ie},Re.createElement(\"div\",{className:\"opblock-body\"},Te&&Te.size||null===Te?null:Re.createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),ee&&Re.createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),Se&&Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(\"div\",{className:\"opblock-description\"},Re.createElement(nt,{source:Se}))),Pe?Re.createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},Re.createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),Re.createElement(\"div\",{className:\"opblock-external-docs\"},we.description&&Re.createElement(\"span\",{className:\"opblock-external-docs__description\"},Re.createElement(nt,{source:we.description})),Re.createElement(ct,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl(Pe)},Pe))):null,Te&&Te.size?Re.createElement(Qe,{parameters:qe,specPath:s.push(\"parameters\"),operation:Te,onChangeKey:ut,onTryoutClick:u,onResetClick:_,onCancelClick:w,tryItOutEnabled:be,allowTryItOut:fe,fn:C,getComponent:j,specActions:B,specSelectors:$,pathMethod:[ae,ce],getConfigs:L,oas3Actions:z,oas3Selectors:Y}):null,be?Re.createElement(ot,{getComponent:j,path:ae,method:ce,operationServers:Te.get(\"servers\"),pathServers:$.paths().getIn([ae,\"servers\"]),getSelectedServer:Y.selectedServer,setSelectedServer:z.setSelectedServer,setServerVariableValue:z.setServerVariableValue,getServerVariable:Y.serverVariableValue,getEffectiveServerValue:Y.serverEffectiveValue}):null,be&&fe&&xe&&xe.size?Re.createElement(\"div\",{className:\"opblock-schemes\"},Re.createElement(st,{schemes:xe,path:ae,method:ce,specActions:B,currentScheme:ze})):null,!be||!fe||pt.length<=0?null:Re.createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",Re.createElement(\"ul\",null,pt.map(((s,o)=>Re.createElement(\"li\",{key:o},\" \",s,\" \"))))),Re.createElement(\"div\",{className:be&&o&&fe?\"btn-group\":\"execute-wrapper\"},be&&fe?Re.createElement(et,{operation:Te,specActions:B,specSelectors:$,oas3Selectors:Y,oas3Actions:z,path:ae,method:ce,onExecute:x,disabled:_e}):null,be&&o&&fe?Re.createElement(tt,{specActions:B,path:ae,method:ce}):null),_e?Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"div\",{className:\"loading\"})):null,$e?Re.createElement(Xe,{responses:$e,request:i,tryItOutResponse:o,getComponent:j,getConfigs:L,specSelectors:$,oas3Actions:z,oas3Selectors:Y,specActions:B,produces:$.producesOptionsFor([ae,ce]),producesValue:$.currentProducesFor([ae,ce]),specPath:s.push(\"responses\"),path:ae,method:ce,displayRequestDuration:ye,fn:C}):null,lt&&Ye.size?Re.createElement(it,{extensions:Ye,getComponent:j}):null)))}}class OperationContainer extends Re.PureComponent{constructor(s,o){super(s,o);const{tryItOutEnabled:i}=s.getConfigs();this.state={tryItOutEnabled:i,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(s,o){const{op:i,layoutSelectors:a,getConfigs:u}=o,{docExpansion:_,deepLinking:w,displayOperationId:x,displayRequestDuration:C,supportedSubmitMethods:j}=u(),L=a.showSummary(),B=i.getIn([\"operation\",\"__originalOperationId\"])||i.getIn([\"operation\",\"operationId\"])||opId(i.get(\"operation\"),o.path,o.method)||i.get(\"id\"),$=[\"operations\",o.tag,B],V=j.indexOf(o.method)>=0&&(void 0===o.allowTryItOut?o.specSelectors.allowTryItOutFor(o.path,o.method):o.allowTryItOut),U=i.getIn([\"operation\",\"security\"])||o.specSelectors.security();return{operationId:B,isDeepLinkingEnabled:w,showSummary:L,displayOperationId:x,displayRequestDuration:C,allowTryItOut:V,security:U,isAuthorized:o.authSelectors.isAuthorized(U),isShown:a.isShown($,\"full\"===_),jumpToKey:`paths.${o.path}.${o.method}`,response:o.specSelectors.responseFor(o.path,o.method),request:o.specSelectors.requestFor(o.path,o.method)}}componentDidMount(){const{isShown:s}=this.props,o=this.getResolvedSubtree();s&&void 0===o&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(s){const{response:o,isShown:i}=s,a=this.getResolvedSubtree();o!==this.props.response&&this.setState({executeInProgress:!1}),i&&void 0===a&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:s,tag:o,operationId:i,isShown:a}=this.props;const u=this.getResolvedSubtree();a||void 0!==u||this.requestResolvedSubtree(),s.show([\"operations\",o,i],!a)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=s=>{const o=this.props.oas3Selectors.selectDefaultRequestBodyValue(...s);this.props.oas3Actions.setRequestBodyValue({value:o,pathMethod:s})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:s,path:o,method:i,specPath:a}=this.props;return a?s.specResolvedSubtree(a.toJS()):s.specResolvedSubtree([\"paths\",o,i])};requestResolvedSubtree=()=>{const{specActions:s,path:o,method:i,specPath:a}=this.props;return a?s.requestResolvedSubtree(a.toJS()):s.requestResolvedSubtree([\"paths\",o,i])};render(){let{op:s,tag:o,path:i,method:a,security:u,isAuthorized:_,operationId:w,showSummary:x,isShown:C,jumpToKey:j,allowTryItOut:L,response:B,request:$,displayOperationId:V,displayRequestDuration:U,isDeepLinkingEnabled:z,specPath:Y,specSelectors:Z,specActions:ee,getComponent:ie,getConfigs:ae,layoutSelectors:ce,layoutActions:le,authActions:pe,authSelectors:de,oas3Actions:fe,oas3Selectors:ye,fn:be}=this.props;const _e=ie(\"operation\"),Se=this.getResolvedSubtree()||(0,ze.Map)(),we=(0,ze.fromJS)({op:Se,tag:o,path:i,summary:s.getIn([\"operation\",\"summary\"])||\"\",deprecated:Se.get(\"deprecated\")||s.getIn([\"operation\",\"deprecated\"])||!1,method:a,security:u,isAuthorized:_,operationId:w,originalOperationId:Se.getIn([\"operation\",\"__originalOperationId\"]),showSummary:x,isShown:C,jumpToKey:j,allowTryItOut:L,request:$,displayOperationId:V,displayRequestDuration:U,isDeepLinkingEnabled:z,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return Re.createElement(_e,{operation:we,response:B,request:$,isShown:C,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:Y,specActions:ee,specSelectors:Z,oas3Actions:fe,oas3Selectors:ye,layoutActions:le,layoutSelectors:ce,authActions:pe,authSelectors:de,getComponent:ie,getConfigs:ae,fn:be})}}var KO=__webpack_require__(13222),GO=__webpack_require__.n(KO);class OperationSummary extends Re.PureComponent{static defaultProps={operationProps:null,specPath:(0,ze.List)(),summary:\"\"};render(){let{isShown:s,toggleShown:o,getComponent:i,authActions:a,authSelectors:u,operationProps:_,specPath:w}=this.props,{summary:x,isAuthorized:C,method:j,op:L,showSummary:B,path:$,operationId:V,originalOperationId:U,displayOperationId:z}=_.toJS(),{summary:Y}=L,Z=_.get(\"security\");const ee=i(\"authorizeOperationBtn\",!0),ie=i(\"OperationSummaryMethod\"),ae=i(\"OperationSummaryPath\"),ce=i(\"JumpToPath\",!0),le=i(\"CopyToClipboardBtn\",!0),pe=i(\"ArrowUpIcon\"),de=i(\"ArrowDownIcon\"),fe=Z&&!!Z.count(),ye=fe&&1===Z.size&&Z.first().isEmpty(),be=!fe||ye;return Re.createElement(\"div\",{className:`opblock-summary opblock-summary-${j}`},Re.createElement(\"button\",{\"aria-expanded\":s,className:\"opblock-summary-control\",onClick:o},Re.createElement(ie,{method:j}),Re.createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},Re.createElement(ae,{getComponent:i,operationProps:_,specPath:w}),B?Re.createElement(\"div\",{className:\"opblock-summary-description\"},GO()(Y||x)):null),z&&(U||V)?Re.createElement(\"span\",{className:\"opblock-summary-operation-id\"},U||V):null),Re.createElement(le,{textToCopy:`${w.get(1)}`}),be?null:Re.createElement(ee,{isAuthorized:C,onClick:()=>{const s=u.definitionsForRequirements(Z);a.showDefinitions(s)}}),Re.createElement(ce,{path:w}),Re.createElement(\"button\",{\"aria-label\":`${j} ${$.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":s,tabIndex:\"-1\",onClick:o},s?Re.createElement(pe,{className:\"arrow\"}):Re.createElement(de,{className:\"arrow\"})))}}class OperationSummaryMethod extends Re.PureComponent{static defaultProps={operationProps:null};render(){let{method:s}=this.props;return Re.createElement(\"span\",{className:\"opblock-summary-method\"},s.toUpperCase())}}class OperationSummaryPath extends Re.PureComponent{render(){let{getComponent:s,operationProps:o}=this.props,{deprecated:i,isShown:a,path:u,tag:_,operationId:w,isDeepLinkingEnabled:x}=o.toJS();const C=u.split(/(?=\\/)/g);for(let s=1;s<C.length;s+=2)C.splice(s,0,Re.createElement(\"wbr\",{key:s}));const j=s(\"DeepLink\");return Re.createElement(\"span\",{className:i?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":u},Re.createElement(j,{enabled:x,isShown:a,path:createDeepLinkPath(`${_}/${w}`),text:C}))}}const operation_extensions=({extensions:s,getComponent:o})=>{let i=o(\"OperationExtRow\");return Re.createElement(\"div\",{className:\"opblock-section\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"h4\",null,\"Extensions\")),Re.createElement(\"div\",{className:\"table-container\"},Re.createElement(\"table\",null,Re.createElement(\"thead\",null,Re.createElement(\"tr\",null,Re.createElement(\"td\",{className:\"col_header\"},\"Field\"),Re.createElement(\"td\",{className:\"col_header\"},\"Value\"))),Re.createElement(\"tbody\",null,s.entrySeq().map((([s,o])=>Re.createElement(i,{key:`${s}-${o}`,xKey:s,xVal:o})))))))},operation_extension_row=({xKey:s,xVal:o})=>{const i=o?o.toJS?o.toJS():o:null;return Re.createElement(\"tr\",null,Re.createElement(\"td\",null,s),Re.createElement(\"td\",null,JSON.stringify(i)))};function createHtmlReadyId(s,o=\"_\"){return s.replace(/[^\\w-]/g,o)}class responses_Responses extends Re.Component{static defaultProps={tryItOutResponse:null,produces:(0,ze.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);onResponseContentTypeChange=({controlsAcceptHeader:s,value:o})=>{const{oas3Actions:i,path:a,method:u}=this.props;s&&i.setResponseContentType({value:o,path:a,method:u})};render(){let{responses:s,tryItOutResponse:o,getComponent:i,getConfigs:a,specSelectors:u,fn:_,producesValue:w,displayRequestDuration:x,specPath:C,path:j,method:L,oas3Selectors:B,oas3Actions:$}=this.props,V=function defaultStatusCode(s){let o=s.keySeq();return o.contains(jt)?jt:o.filter((s=>\"2\"===(s+\"\")[0])).sort().first()}(s);const U=i(\"contentType\"),z=i(\"liveResponse\"),Y=i(\"response\");let Z=this.props.produces&&this.props.produces.size?this.props.produces:responses_Responses.defaultProps.produces;const ee=u.isOAS3()?function getAcceptControllingResponse(s){if(!We().OrderedMap.isOrderedMap(s))return null;if(!s.size)return null;const o=s.find(((s,o)=>o.startsWith(\"2\")&&Object.keys(s.get(\"content\")||{}).length>0)),i=s.get(\"default\")||We().OrderedMap(),a=(i.get(\"content\")||We().OrderedMap()).keySeq().toJS().length?i:null;return o||a}(s):null,ie=createHtmlReadyId(`${L}${j}_responses`),ae=`${ie}_select`;return Re.createElement(\"div\",{className:\"responses-wrapper\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"h4\",null,\"Responses\"),u.isOAS3()?null:Re.createElement(\"label\",{htmlFor:ae},Re.createElement(\"span\",null,\"Response content type\"),Re.createElement(U,{value:w,ariaControls:ie,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:Z,controlId:ae,onChange:this.onChangeProducesWrapper}))),Re.createElement(\"div\",{className:\"responses-inner\"},o?Re.createElement(\"div\",null,Re.createElement(z,{response:o,getComponent:i,getConfigs:a,specSelectors:u,path:this.props.path,method:this.props.method,displayRequestDuration:x}),Re.createElement(\"h4\",null,\"Responses\")):null,Re.createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:ie,role:\"region\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",{className:\"responses-header\"},Re.createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),Re.createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),u.isOAS3()?Re.createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),Re.createElement(\"tbody\",null,s.entrySeq().map((([s,x])=>{let U=o&&o.get(\"status\")==s?\"response_current\":\"\";return Re.createElement(Y,{key:s,path:j,method:L,specPath:C.push(s),isDefault:V===s,fn:_,className:U,code:s,response:x,specSelectors:u,controlsAcceptHeader:x===ee,onContentTypeChange:this.onResponseContentTypeChange,contentType:w,getConfigs:a,activeExamplesKey:B.activeExamplesMember(j,L,\"responses\",s),oas3Actions:$,getComponent:i})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(s){const o=function canJsonParse(s){try{return!!JSON.parse(s)}catch(s){return null}}(s);return o?\"json\":null}class response_Response extends Re.Component{constructor(s,o){super(s,o),this.state={responseContentType:\"\"}}static defaultProps={response:(0,ze.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=s=>{const{onContentTypeChange:o,controlsAcceptHeader:i}=this.props;this.setState({responseContentType:s}),o({value:s,controlsAcceptHeader:i})};getTargetExamplesKey=()=>{const{response:s,contentType:o,activeExamplesKey:i}=this.props,a=this.state.responseContentType||o,u=s.getIn([\"content\",a],(0,ze.Map)({})).get(\"examples\",null).keySeq().first();return i||u};render(){let{path:s,method:o,code:i,response:a,className:u,specPath:_,fn:w,getComponent:x,getConfigs:C,specSelectors:j,contentType:L,controlsAcceptHeader:B,oas3Actions:$}=this.props,{inferSchema:V,getSampleSchema:U}=w,z=j.isOAS3();const{showExtensions:Y}=C();let Z=Y?getExtensions(a):null,ee=a.get(\"headers\"),ie=a.get(\"links\");const ae=x(\"ResponseExtension\"),ce=x(\"headers\"),le=x(\"HighlightCode\",!0),pe=x(\"modelExample\"),de=x(\"Markdown\",!0),fe=x(\"operationLink\"),ye=x(\"contentType\"),be=x(\"ExamplesSelect\"),_e=x(\"Example\");var Se,we;const xe=this.state.responseContentType||L,Pe=a.getIn([\"content\",xe],(0,ze.Map)({})),Te=Pe.get(\"examples\",null);if(z){const s=Pe.get(\"schema\");Se=s?V(s.toJS()):null,we=s?(0,ze.List)([\"content\",this.state.responseContentType,\"schema\"]):_}else Se=a.get(\"schema\"),we=a.has(\"schema\")?_.push(\"schema\"):_;let $e,qe,We=!1,He={includeReadOnly:!0};if(z)if(qe=Pe.get(\"schema\")?.toJS(),ze.Map.isMap(Te)&&!Te.isEmpty()){const s=this.getTargetExamplesKey(),getMediaTypeExample=s=>ze.Map.isMap(s)?s.get(\"value\"):void 0;$e=getMediaTypeExample(Te.get(s,(0,ze.Map)({}))),void 0===$e&&($e=getMediaTypeExample(Te.values().next().value)),We=!0}else void 0!==Pe.get(\"example\")&&($e=Pe.get(\"example\"),We=!0);else{qe=Se,He={...He,includeWriteOnly:!0};const s=a.getIn([\"examples\",xe]);s&&($e=s,We=!0)}const Ye=((s,o)=>{if(null==s)return null;const i=getKnownSyntaxHighlighterLanguage(s)?\"json\":null;return Re.createElement(\"div\",null,Re.createElement(o,{className:\"example\",language:i},stringify(s)))})(U(qe,xe,He,We?$e:void 0),le);return Re.createElement(\"tr\",{className:\"response \"+(u||\"\"),\"data-code\":i},Re.createElement(\"td\",{className:\"response-col_status\"},i),Re.createElement(\"td\",{className:\"response-col_description\"},Re.createElement(\"div\",{className:\"response-col_description__inner\"},Re.createElement(de,{source:a.get(\"description\")})),Y&&Z.size?Z.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,xKey:s,xVal:o}))):null,z&&a.get(\"content\")?Re.createElement(\"section\",{className:\"response-controls\"},Re.createElement(\"div\",{className:Jn()(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":B})},Re.createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),Re.createElement(ye,{value:this.state.responseContentType,contentTypes:a.get(\"content\")?a.get(\"content\").keySeq():(0,ze.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),B?Re.createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",Re.createElement(\"code\",null,\"Accept\"),\" header.\"):null),ze.Map.isMap(Te)&&!Te.isEmpty()?Re.createElement(\"div\",{className:\"response-control-examples\"},Re.createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),Re.createElement(be,{examples:Te,currentExampleKey:this.getTargetExamplesKey(),onSelect:a=>$.setActiveExamplesMember({name:a,pathMethod:[s,o],contextType:\"responses\",contextName:i}),showLabels:!1})):null):null,Ye||Se?Re.createElement(pe,{specPath:we,getComponent:x,getConfigs:C,specSelectors:j,schema:fromJSOrdered(Se),example:Ye,includeReadOnly:!0}):null,z&&Te?Re.createElement(_e,{example:Te.get(this.getTargetExamplesKey(),(0,ze.Map)({})),getComponent:x,getConfigs:C,omitValue:!0}):null,ee?Re.createElement(ce,{headers:ee,getComponent:x}):null),z?Re.createElement(\"td\",{className:\"response-col_links\"},ie?ie.toSeq().entrySeq().map((([s,o])=>Re.createElement(fe,{key:s,name:s,link:o,getComponent:x}))):Re.createElement(\"i\",null,\"No links\")):null)}}const response_extension=({xKey:s,xVal:o})=>Re.createElement(\"div\",{className:\"response__extension\"},s,\": \",String(o));var YO=__webpack_require__(26657),XO=__webpack_require__.n(YO),QO=__webpack_require__(80218),ZO=__webpack_require__.n(QO);class ResponseBody extends Re.PureComponent{state={parsedContent:null};updateParsedContent=s=>{const{content:o}=this.props;if(s!==o)if(o&&o instanceof Blob){var i=new FileReader;i.onload=()=>{this.setState({parsedContent:i.result})},i.readAsText(o)}else this.setState({parsedContent:o.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(s){this.updateParsedContent(s.content)}render(){let{content:s,contentType:o,url:i,headers:a={},getComponent:u}=this.props;const{parsedContent:_}=this.state,w=u(\"HighlightCode\",!0),x=\"response_\"+(new Date).getTime();let C,j;if(i=i||\"\",(/^application\\/octet-stream/i.test(o)||a[\"Content-Disposition\"]&&/attachment/i.test(a[\"Content-Disposition\"])||a[\"content-disposition\"]&&/attachment/i.test(a[\"content-disposition\"])||a[\"Content-Description\"]&&/File Transfer/i.test(a[\"Content-Description\"])||a[\"content-description\"]&&/File Transfer/i.test(a[\"content-description\"]))&&(s.size>0||s.length>0))if(\"Blob\"in window){let u=o||\"text/html\",_=s instanceof Blob?s:new Blob([s],{type:u}),w=window.URL.createObjectURL(_),x=[u,i.substr(i.lastIndexOf(\"/\")+1),w].join(\":\"),C=a[\"content-disposition\"]||a[\"Content-Disposition\"];if(void 0!==C){let s=function extractFileNameFromContentDispositionHeader(s){let o;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((i=>(o=i.exec(s),null!==o))),null!==o&&o.length>1)try{return decodeURIComponent(o[1])}catch(s){console.error(s)}return null}(C);null!==s&&(x=s)}j=lt.navigator&&lt.navigator.msSaveOrOpenBlob?Re.createElement(\"div\",null,Re.createElement(\"a\",{href:w,onClick:()=>lt.navigator.msSaveOrOpenBlob(_,x)},\"Download file\")):Re.createElement(\"div\",null,Re.createElement(\"a\",{href:w,download:x},\"Download file\"))}else j=Re.createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(o)){let o=null;getKnownSyntaxHighlighterLanguage(s)&&(o=\"json\");try{C=JSON.stringify(JSON.parse(s),null,\"  \")}catch(o){C=\"can't parse JSON.  Raw result:\\n\\n\"+s}j=Re.createElement(w,{language:o,downloadable:!0,fileName:`${x}.json`,canCopy:!0},C)}else/xml/i.test(o)?(C=XO()(s,{textNodesOnSameLine:!0,indentor:\"  \"}),j=Re.createElement(w,{downloadable:!0,fileName:`${x}.xml`,canCopy:!0},C)):j=\"text/html\"===ZO()(o)||/text\\/plain/.test(o)?Re.createElement(w,{downloadable:!0,fileName:`${x}.html`,canCopy:!0},s):\"text/csv\"===ZO()(o)||/text\\/csv/.test(o)?Re.createElement(w,{downloadable:!0,fileName:`${x}.csv`,canCopy:!0},s):/^image\\//i.test(o)?o.includes(\"svg\")?Re.createElement(\"div\",null,\" \",s,\" \"):Re.createElement(\"img\",{src:window.URL.createObjectURL(s)}):/^audio\\//i.test(o)?Re.createElement(\"pre\",{className:\"microlight\"},Re.createElement(\"audio\",{controls:!0,key:i},Re.createElement(\"source\",{src:i,type:o}))):\"string\"==typeof s?Re.createElement(w,{downloadable:!0,fileName:`${x}.txt`,canCopy:!0},s):s.size>0?_?Re.createElement(\"div\",null,Re.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),Re.createElement(w,{downloadable:!0,fileName:`${x}.txt`,canCopy:!0},_)):Re.createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return j?Re.createElement(\"div\",null,Re.createElement(\"h5\",null,\"Response body\"),j):null}}class Parameters extends Re.Component{constructor(s){super(s),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(s,o,i)=>{let{specActions:{changeParamByIdentity:a},onChangeKey:u}=this.props;a(u,s,o,i)};onChangeConsumesWrapper=s=>{let{specActions:{changeConsumesValue:o},onChangeKey:i}=this.props;o(i,s)};toggleTab=s=>\"parameters\"===s?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===s?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:s,pathMethod:o})=>{let{specActions:i,oas3Selectors:a,oas3Actions:u}=this.props;const _=a.hasUserEditedBody(...o),w=a.shouldRetainRequestBodyValue(...o);u.setRequestContentType({value:s,pathMethod:o}),u.initRequestBodyValidateError({pathMethod:o}),_||(w||u.setRequestBodyValue({value:void 0,pathMethod:o}),i.clearResponse(...o),i.clearRequest(...o),i.clearValidateParams(o))};render(){let{onTryoutClick:s,onResetClick:o,parameters:i,allowTryItOut:a,tryItOutEnabled:u,specPath:_,fn:w,getComponent:x,getConfigs:C,specSelectors:j,specActions:L,pathMethod:B,oas3Actions:$,oas3Selectors:V,operation:U}=this.props;const z=x(\"parameterRow\"),Y=x(\"TryItOutButton\"),Z=x(\"contentType\"),ee=x(\"Callbacks\",!0),ie=x(\"RequestBody\",!0),ae=u&&a,ce=j.isOAS3(),le=`${createHtmlReadyId(`${B[1]}${B[0]}_requests`)}_select`,pe=U.get(\"requestBody\"),de=Object.values(i.reduce(((s,o)=>{if(ze.Map.isMap(o)){const i=o.get(\"in\");s[i]??=[],s[i].push(o)}return s}),{})).reduce(((s,o)=>s.concat(o)),[]);return Re.createElement(\"div\",{className:\"opblock-section\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},ce?Re.createElement(\"div\",{className:\"tab-header\"},Re.createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},Re.createElement(\"h4\",{className:\"opblock-title\"},Re.createElement(\"span\",null,\"Parameters\"))),U.get(\"callbacks\")?Re.createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},Re.createElement(\"h4\",{className:\"opblock-title\"},Re.createElement(\"span\",null,\"Callbacks\"))):null):Re.createElement(\"div\",{className:\"tab-header\"},Re.createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),a?Re.createElement(Y,{isOAS3:j.isOAS3(),hasUserEditedBody:V.hasUserEditedBody(...B),enabled:u,onCancelClick:this.props.onCancelClick,onTryoutClick:s,onResetClick:()=>o(B)}):null),this.state.parametersVisible?Re.createElement(\"div\",{className:\"parameters-container\"},de.length?Re.createElement(\"div\",{className:\"table-container\"},Re.createElement(\"table\",{className:\"parameters\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",null,Re.createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),Re.createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),Re.createElement(\"tbody\",null,de.map(((s,o)=>Re.createElement(z,{fn:w,specPath:_.push(o.toString()),getComponent:x,getConfigs:C,rawParam:s,param:j.parameterWithMetaByIdentity(B,s),key:`${s.get(\"in\")}.${s.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:j,specActions:L,oas3Actions:$,oas3Selectors:V,pathMethod:B,isExecute:ae})))))):Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?Re.createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},Re.createElement(ee,{callbacks:(0,ze.Map)(U.get(\"callbacks\")),specPath:_.slice(0,-1).push(\"callbacks\")})):null,ce&&pe&&this.state.parametersVisible&&Re.createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"h4\",{className:`opblock-title parameter__name ${pe.get(\"required\")&&\"required\"}`},\"Request body\"),Re.createElement(\"label\",{id:le},Re.createElement(Z,{value:V.requestContentType(...B),contentTypes:pe.get(\"content\",(0,ze.List)()).keySeq(),onChange:s=>{this.onChangeMediaType({value:s,pathMethod:B})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:le}))),Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(ie,{setRetainRequestBodyValueFlag:s=>$.setRetainRequestBodyValueFlag({value:s,pathMethod:B}),userHasEditedBody:V.hasUserEditedBody(...B),specPath:_.slice(0,-1).push(\"requestBody\"),requestBody:pe,requestBodyValue:V.requestBodyValue(...B),requestBodyInclusionSetting:V.requestBodyInclusionSetting(...B),requestBodyErrors:V.requestBodyErrors(...B),isExecute:ae,getConfigs:C,activeExamplesKey:V.activeExamplesMember(...B,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(s,o)=>{if(o){const i=V.requestBodyValue(...B),a=ze.Map.isMap(i)?i:(0,ze.Map)();return $.setRequestBodyValue({pathMethod:B,value:a.setIn(o,s)})}$.setRequestBodyValue({value:s,pathMethod:B})},onChangeIncludeEmpty:(s,o)=>{$.setRequestBodyInclusion({pathMethod:B,value:o,name:s})},contentType:V.requestContentType(...B)}))))}}const parameter_extension=({xKey:s,xVal:o})=>Re.createElement(\"div\",{className:\"parameter__extension\"},s,\": \",String(o)),eC={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends Re.Component{static defaultProps=eC;componentDidMount(){const{isIncludedOptions:s,onChange:o}=this.props,{shouldDispatchInit:i,defaultValue:a}=s;i&&o(a)}onCheckboxChange=s=>{const{onChange:o}=this.props;o(s.target.checked)};render(){let{isIncluded:s,isDisabled:o}=this.props;return Re.createElement(\"div\",null,Re.createElement(\"label\",{htmlFor:\"include_empty_value\",className:Jn()(\"parameter__empty_value_toggle\",{disabled:o})},Re.createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:o,checked:!o&&s,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends Re.Component{constructor(s,o){super(s,o),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(s){let o,{specSelectors:i,pathMethod:a,rawParam:u}=s,_=i.isOAS3(),w=i.parameterWithMetaByIdentity(a,u)||new ze.Map;if(w=w.isEmpty()?u:w,_){let{schema:s}=getParameterSchema(w,{isOAS3:_});o=s?s.get(\"enum\"):void 0}else o=w?w.get(\"enum\"):void 0;let x,C=w?w.get(\"value\"):void 0;void 0!==C?x=C:u.get(\"required\")&&o&&o.size&&(x=o.first()),void 0!==x&&x!==C&&this.onChangeWrapper(function numberToString(s){return\"number\"==typeof s?s.toString():s}(x)),this.setDefaultValue()}onChangeWrapper=(s,o=!1)=>{let i,{onChange:a,rawParam:u}=this.props;return i=\"\"===s||s&&0===s.size?null:s,a(u,i,o)};_onExampleSelect=s=>{this.props.oas3Actions.setActiveExamplesMember({name:s,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=s=>{let{specActions:o,param:i,pathMethod:a}=this.props;const u=i.get(\"name\"),_=i.get(\"in\");return o.updateEmptyParamInclusion(a,u,_,s)};setDefaultValue=()=>{let{specSelectors:s,pathMethod:o,rawParam:i,oas3Selectors:a,fn:u}=this.props;const _=s.parameterWithMetaByIdentity(o,i)||(0,ze.Map)();let{schema:w}=getParameterSchema(_,{isOAS3:s.isOAS3()});const x=_.get(\"content\",(0,ze.Map)()).keySeq().first(),C=w?u.getSampleSchema(w.toJS(),x,{includeWriteOnly:!0}):null;if(_&&void 0===_.get(\"value\")&&\"body\"!==_.get(\"in\")){let i;if(s.isSwagger2())i=void 0!==_.get(\"x-example\")?_.get(\"x-example\"):void 0!==_.getIn([\"schema\",\"example\"])?_.getIn([\"schema\",\"example\"]):w&&w.getIn([\"default\"]);else if(s.isOAS3()){w=this.composeJsonSchema(w);const s=a.activeExamplesMember(...o,\"parameters\",this.getParamKey());i=void 0!==_.getIn([\"examples\",s,\"value\"])?_.getIn([\"examples\",s,\"value\"]):void 0!==_.getIn([\"content\",x,\"example\"])?_.getIn([\"content\",x,\"example\"]):void 0!==_.get(\"example\")?_.get(\"example\"):void 0!==(w&&w.get(\"example\"))?w&&w.get(\"example\"):void 0!==(w&&w.get(\"default\"))?w&&w.get(\"default\"):_.get(\"default\")}void 0===i||ze.List.isList(i)||(i=stringify(i));const j=u.getSchemaObjectType(w),L=u.getSchemaObjectType(w?.get(\"items\"));void 0!==i?this.onChangeWrapper(i):\"object\"===j&&C&&!_.get(\"examples\")?this.onChangeWrapper(ze.List.isList(C)?C:stringify(C)):\"array\"===j&&\"object\"===L&&C&&!_.get(\"examples\")&&this.onChangeWrapper(ze.List.isList(C)?C:(0,ze.List)(JSON.parse(C)))}};getParamKey(){const{param:s}=this.props;return s?`${s.get(\"name\")}-${s.get(\"in\")}`:null}composeJsonSchema(s){const{fn:o}=this.props,i=s.get(\"oneOf\")?.get(0)?.toJS(),a=s.get(\"anyOf\")?.get(0)?.toJS();return(0,ze.fromJS)(o.mergeJsonSchema(s.toJS(),i??a??{}))}render(){let{param:s,rawParam:o,getComponent:i,getConfigs:a,isExecute:u,fn:_,onChangeConsumes:w,specSelectors:x,pathMethod:C,specPath:j,oas3Selectors:L}=this.props,B=x.isOAS3();const{showExtensions:$,showCommonExtensions:V}=a();if(s||(s=o),!o)return null;const U=i(\"JsonSchemaForm\"),z=i(\"ParamBody\");let Y=s.get(\"in\"),Z=\"body\"!==Y?null:Re.createElement(z,{getComponent:i,getConfigs:a,fn:_,param:s,consumes:x.consumesOptionsFor(C),consumesValue:x.contentTypeValues(C).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:w,isExecute:u,specSelectors:x,pathMethod:C});const ee=i(\"modelExample\"),ie=i(\"Markdown\",!0),ae=i(\"ParameterExt\"),ce=i(\"ParameterIncludeEmpty\"),le=i(\"ExamplesSelectValueRetainer\"),pe=i(\"Example\");let{schema:de}=getParameterSchema(s,{isOAS3:B}),fe=x.parameterWithMetaByIdentity(C,o)||(0,ze.Map)();B&&(de=this.composeJsonSchema(de));let ye=de?de.get(\"format\"):null,be=\"formData\"===Y,_e=\"FormData\"in lt,Se=s.get(\"required\");const we=_.getSchemaObjectType(de),xe=_.getSchemaObjectType(de?.get(\"items\")),Pe=_.getSchemaObjectTypeLabel(de),Te=!Z&&\"object\"===we,$e=!Z&&\"object\"===xe;let qe,We,He,Ye,Xe=fe?fe.get(\"value\"):\"\",Qe=V?getCommonExtensions(de):null,et=$?getExtensions(s):null,tt=!1;void 0!==s&&de&&(qe=de.get(\"items\")),void 0!==qe?(We=qe.get(\"enum\"),He=qe.get(\"default\")):de&&(We=de.get(\"enum\")),We&&We.size&&We.size>0&&(tt=!0),void 0!==s&&(de&&(He=de.get(\"default\")),void 0===He&&(He=s.get(\"default\")),Ye=s.get(\"example\"),void 0===Ye&&(Ye=s.get(\"x-example\")));const rt=Z?null:Re.createElement(U,{fn:_,getComponent:i,value:Xe,required:Se,disabled:!u,description:s.get(\"name\"),onChange:this.onChangeWrapper,errors:fe.get(\"errors\"),schema:de});return Re.createElement(\"tr\",{\"data-param-name\":s.get(\"name\"),\"data-param-in\":s.get(\"in\")},Re.createElement(\"td\",{className:\"parameters-col_name\"},Re.createElement(\"div\",{className:Se?\"parameter__name required\":\"parameter__name\"},s.get(\"name\"),Se?Re.createElement(\"span\",null,\" *\"):null),Re.createElement(\"div\",{className:\"parameter__type\"},Pe,ye&&Re.createElement(\"span\",{className:\"prop-format\"},\"($\",ye,\")\")),Re.createElement(\"div\",{className:\"parameter__deprecated\"},B&&s.get(\"deprecated\")?\"deprecated\":null),Re.createElement(\"div\",{className:\"parameter__in\"},\"(\",s.get(\"in\"),\")\")),Re.createElement(\"td\",{className:\"parameters-col_description\"},s.get(\"description\")?Re.createElement(ie,{source:s.get(\"description\")}):null,!Z&&u||!tt?null:Re.createElement(ie,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+We.map((function(s){return s})).toArray().map(String).join(\", \")}),!Z&&u||void 0===He?null:Re.createElement(ie,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+He}),!Z&&u||void 0===Ye?null:Re.createElement(ie,{source:\"<i>Example</i> : \"+Ye}),be&&!_e&&Re.createElement(\"div\",null,\"Error: your browser does not support FormData\"),B&&s.get(\"examples\")?Re.createElement(\"section\",{className:\"parameter-controls\"},Re.createElement(le,{examples:s.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:i,defaultToFirstExample:!0,currentKey:L.activeExamplesMember(...C,\"parameters\",this.getParamKey()),currentUserInputValue:Xe})):null,Te||$e?Re.createElement(ee,{getComponent:i,specPath:j.push(\"schema\"),getConfigs:a,isExecute:u,specSelectors:x,schema:de,example:rt}):rt,Z&&de?Re.createElement(ee,{getComponent:i,specPath:j.push(\"schema\"),getConfigs:a,isExecute:u,specSelectors:x,schema:de,example:Z,includeWriteOnly:!0}):null,!Z&&u&&s.get(\"allowEmptyValue\")?Re.createElement(ce,{onChange:this.onChangeIncludeEmpty,isIncluded:x.parameterInclusionSettingFor(C,s.get(\"name\"),s.get(\"in\")),isDisabled:!isEmptyValue(Xe)}):null,B&&s.get(\"examples\")?Re.createElement(pe,{example:s.getIn([\"examples\",L.activeExamplesMember(...C,\"parameters\",this.getParamKey())]),getComponent:i,getConfigs:a}):null,V&&Qe.size?Qe.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,xKey:s,xVal:o}))):null,$&&et.size?et.entrySeq().map((([s,o])=>Re.createElement(ae,{key:`${s}-${o}`,xKey:s,xVal:o}))):null))}}class Execute extends Re.Component{handleValidateParameters=()=>{let{specSelectors:s,specActions:o,path:i,method:a}=this.props;return o.validateParams([i,a]),s.validateBeforeExecute([i,a])};handleValidateRequestBody=()=>{let{path:s,method:o,specSelectors:i,oas3Selectors:a,oas3Actions:u}=this.props,_={missingBodyValue:!1,missingRequiredKeys:[]};u.clearRequestBodyValidateError({path:s,method:o});let w=i.getOAS3RequiredRequestBodyContentType([s,o]),x=a.requestBodyValue(s,o),C=a.validateBeforeExecute([s,o]),j=a.requestContentType(s,o);if(!C)return _.missingBodyValue=!0,u.setRequestBodyValidateError({path:s,method:o,validationErrors:_}),!1;if(!w)return!0;let L=a.validateShallowRequired({oas3RequiredRequestBodyContentType:w,oas3RequestContentType:j,oas3RequestBodyValue:x});return!L||L.length<1||(L.forEach((s=>{_.missingRequiredKeys.push(s)})),u.setRequestBodyValidateError({path:s,method:o,validationErrors:_}),!1)};handleValidationResultPass=()=>{let{specActions:s,operation:o,path:i,method:a}=this.props;this.props.onExecute&&this.props.onExecute(),s.execute({operation:o,path:i,method:a})};handleValidationResultFail=()=>{let{specActions:s,path:o,method:i}=this.props;s.clearValidateParams([o,i]),setTimeout((()=>{s.validateParams([o,i])}),40)};handleValidationResult=s=>{s?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let s=this.handleValidateParameters(),o=this.handleValidateRequestBody(),i=s&&o;this.handleValidationResult(i)};onChangeProducesWrapper=s=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],s);render(){const{disabled:s}=this.props;return Re.createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:s},\"Execute\")}}class headers_Headers extends Re.Component{render(){let{headers:s,getComponent:o}=this.props;const i=o(\"Property\"),a=o(\"Markdown\",!0);return s&&s.size?Re.createElement(\"div\",{className:\"headers-wrapper\"},Re.createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),Re.createElement(\"table\",{className:\"headers\"},Re.createElement(\"thead\",null,Re.createElement(\"tr\",{className:\"header-row\"},Re.createElement(\"th\",{className:\"header-col\"},\"Name\"),Re.createElement(\"th\",{className:\"header-col\"},\"Description\"),Re.createElement(\"th\",{className:\"header-col\"},\"Type\"))),Re.createElement(\"tbody\",null,s.entrySeq().map((([s,o])=>{if(!We().Map.isMap(o))return null;const u=o.get(\"description\"),_=o.getIn([\"schema\"])?o.getIn([\"schema\",\"type\"]):o.getIn([\"type\"]),w=o.getIn([\"schema\",\"example\"]);return Re.createElement(\"tr\",{key:s},Re.createElement(\"td\",{className:\"header-col\"},s),Re.createElement(\"td\",{className:\"header-col\"},u?Re.createElement(a,{source:u}):null),Re.createElement(\"td\",{className:\"header-col\"},_,\" \",w?Re.createElement(i,{propKey:\"Example\",propVal:w,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends Re.Component{render(){let{editorActions:s,errSelectors:o,layoutSelectors:i,layoutActions:a,getComponent:u}=this.props;const _=u(\"Collapse\");if(s&&s.jumpToLine)var w=s.jumpToLine;let x=o.allErrors().filter((s=>\"thrown\"===s.get(\"type\")||\"error\"===s.get(\"level\")));if(!x||x.count()<1)return null;let C=i.isShown([\"errorPane\"],!0),j=x.sortBy((s=>s.get(\"line\")));return Re.createElement(\"pre\",{className:\"errors-wrapper\"},Re.createElement(\"hgroup\",{className:\"error\"},Re.createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),Re.createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>a.show([\"errorPane\"],!C)},C?\"Hide\":\"Show\")),Re.createElement(_,{isOpened:C,animated:!0},Re.createElement(\"div\",{className:\"errors\"},j.map(((s,o)=>{let i=s.get(\"type\");return\"thrown\"===i||\"auth\"===i?Re.createElement(ThrownErrorItem,{key:o,error:s.get(\"error\")||s,jumpToLine:w}):\"spec\"===i?Re.createElement(SpecErrorItem,{key:o,error:s,jumpToLine:w}):void 0})))))}}const ThrownErrorItem=({error:s,jumpToLine:o})=>{if(!s)return null;let i=s.get(\"line\");return Re.createElement(\"div\",{className:\"error-wrapper\"},s?Re.createElement(\"div\",null,Re.createElement(\"h4\",null,s.get(\"source\")&&s.get(\"level\")?toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"):\"\",s.get(\"path\")?Re.createElement(\"small\",null,\" at \",s.get(\"path\")):null),Re.createElement(\"span\",{className:\"message thrown\"},s.get(\"message\")),Re.createElement(\"div\",{className:\"error-line\"},i&&o?Re.createElement(\"a\",{onClick:o.bind(null,i)},\"Jump to line \",i):null)):null)},SpecErrorItem=({error:s,jumpToLine:o=null})=>{let i=null;return s.get(\"path\")?i=ze.List.isList(s.get(\"path\"))?Re.createElement(\"small\",null,\"at \",s.get(\"path\").join(\".\")):Re.createElement(\"small\",null,\"at \",s.get(\"path\")):s.get(\"line\")&&!o&&(i=Re.createElement(\"small\",null,\"on line \",s.get(\"line\"))),Re.createElement(\"div\",{className:\"error-wrapper\"},s?Re.createElement(\"div\",null,Re.createElement(\"h4\",null,toTitleCase(s.get(\"source\"))+\" \"+s.get(\"level\"),\" \",i),Re.createElement(\"span\",{className:\"message\"},s.get(\"message\")),Re.createElement(\"div\",{className:\"error-line\"},o?Re.createElement(\"a\",{onClick:o.bind(null,s.get(\"line\"))},\"Jump to line \",s.get(\"line\")):null)):null)};function toTitleCase(s){return(s||\"\").split(\" \").map((s=>s[0].toUpperCase()+s.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends Re.Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,ze.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(s){s.contentTypes&&s.contentTypes.size&&(s.contentTypes.includes(s.value)||s.onChange(s.contentTypes.first()))}onChangeWrapper=s=>this.props.onChange(s.target.value);render(){let{ariaControls:s,ariaLabel:o,className:i,contentTypes:a,controlId:u,value:_}=this.props;return a&&a.size?Re.createElement(\"div\",{className:\"content-type-wrapper \"+(i||\"\")},Re.createElement(\"select\",{\"aria-controls\":s,\"aria-label\":o,className:\"content-type\",id:u,onChange:this.onChangeWrapper,value:_||\"\"},a.map((s=>Re.createElement(\"option\",{key:s,value:s},s))).toArray())):null}}function xclass(...s){return s.filter((s=>!!s)).join(\" \").trim()}class Container extends Re.Component{render(){let{fullscreen:s,full:o,...i}=this.props;if(s)return Re.createElement(\"section\",i);let a=\"swagger-container\"+(o?\"-full\":\"\");return Re.createElement(\"section\",Mn()({},i,{className:xclass(i.className,a)}))}}const tC={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends Re.Component{render(){const{hide:s,keepContents:o,mobile:i,tablet:a,desktop:u,large:_,...w}=this.props;if(s&&!o)return Re.createElement(\"span\",null);let x=[];for(let s in tC){if(!Object.prototype.hasOwnProperty.call(tC,s))continue;let o=tC[s];if(s in this.props){let i=this.props[s];if(i<1){x.push(\"none\"+o);continue}x.push(\"block\"+o),x.push(\"col-\"+i+o)}}s&&x.push(\"hidden\");let C=xclass(w.className,...x);return Re.createElement(\"section\",Mn()({},w,{className:C}))}}class Row extends Re.Component{render(){return Re.createElement(\"div\",Mn()({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends Re.Component{static defaultProps={className:\"\"};render(){return Re.createElement(\"button\",Mn()({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=s=>Re.createElement(\"textarea\",s),Input=s=>Re.createElement(\"input\",s);class Select extends Re.Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(s,o){let i;super(s,o),i=s.value?s.value:s.multiple?[\"\"]:\"\",this.state={value:i}}onChange=s=>{let o,{onChange:i,multiple:a}=this.props,u=[].slice.call(s.target.options);o=a?u.filter((function(s){return s.selected})).map((function(s){return s.value})):s.target.value,this.setState({value:o}),i&&i(o)};UNSAFE_componentWillReceiveProps(s){s.value!==this.props.value&&this.setState({value:s.value})}render(){let{allowedValues:s,multiple:o,allowEmptyValue:i,disabled:a}=this.props,u=this.state.value?.toJS?.()||this.state.value;return Re.createElement(\"select\",{className:this.props.className,multiple:o,value:u,onChange:this.onChange,disabled:a},i?Re.createElement(\"option\",{value:\"\"},\"--\"):null,s.map((function(s,o){return Re.createElement(\"option\",{key:o,value:String(s)},String(s))})))}}class layout_utils_Link extends Re.Component{render(){return Re.createElement(\"a\",Mn()({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:s})=>Re.createElement(\"div\",{className:\"no-margin\"},\" \",s,\" \");class Collapse extends Re.Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?Re.createElement(NoMargin,null,this.props.children):Re.createElement(\"noscript\",null)}render(){let{animated:s,isOpened:o,children:i}=this.props;return s?(i=o?i:null,Re.createElement(NoMargin,null,i)):this.renderNotAnimated()}}class Overview extends Re.Component{constructor(...s){super(...s),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(s,o){this.props.layoutActions.show(s,o)}showOp(s,o){let{layoutActions:i}=this.props;i.show(s,o)}render(){let{specSelectors:s,layoutSelectors:o,layoutActions:i,getComponent:a}=this.props,u=s.taggedOperations();const _=a(\"Collapse\");return Re.createElement(\"div\",null,Re.createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),u.map(((s,a)=>{let u=s.get(\"operations\"),w=[\"overview-tags\",a],x=o.isShown(w,!0);return Re.createElement(\"div\",{key:\"overview-\"+a},Re.createElement(\"h4\",{onClick:()=>i.show(w,!x),className:\"link overview-tag\"},\" \",x?\"-\":\"+\",a),Re.createElement(_,{isOpened:x,animated:!0},u.map((s=>{let{path:a,method:u,id:_}=s.toObject(),w=\"operations\",x=_,C=o.isShown([w,x]);return Re.createElement(OperationLink,{key:_,path:a,method:u,id:a+\"-\"+u,shown:C,showOpId:x,showOpIdPrefix:w,href:`#operation-${x}`,onClick:i.show})})).toArray()))})).toArray(),u.size<1&&Re.createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends Re.Component{constructor(s){super(s),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:s,showOpIdPrefix:o,onClick:i,shown:a}=this.props;i([o,s],!a)}render(){let{id:s,method:o,shown:i,href:a}=this.props;return Re.createElement(layout_utils_Link,{href:a,onClick:this.onClick,className:\"block opblock-link \"+(i?\"shown\":\"\")},Re.createElement(\"div\",null,Re.createElement(\"small\",{className:`bold-label-${o}`},o.toUpperCase()),Re.createElement(\"span\",{className:\"bold-label\"},s)))}}class InitializedInput extends Re.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:s,defaultValue:o,initialValue:i,...a}=this.props;return Re.createElement(\"input\",Mn()({},a,{ref:s=>this.inputRef=s}))}}class InfoBasePath extends Re.Component{render(){const{host:s,basePath:o}=this.props;return Re.createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",s,o,\" ]\")}}class InfoUrl extends Re.PureComponent{render(){const{url:s,getComponent:o}=this.props,i=o(\"Link\");return Re.createElement(i,{target:\"_blank\",href:sanitizeUrl(s)},Re.createElement(\"span\",{className:\"url\"},\" \",s))}}class info_Info extends Re.Component{render(){const{info:s,url:o,host:i,basePath:a,getComponent:u,externalDocs:_,selectedServer:w,url:x}=this.props,C=s.get(\"version\"),j=s.get(\"description\"),L=s.get(\"title\"),B=safeBuildUrl(s.get(\"termsOfService\"),x,{selectedServer:w}),$=s.get(\"contact\"),V=s.get(\"license\"),U=safeBuildUrl(_&&_.get(\"url\"),x,{selectedServer:w}),z=_&&_.get(\"description\"),Y=u(\"Markdown\",!0),Z=u(\"Link\"),ee=u(\"VersionStamp\"),ie=u(\"OpenAPIVersion\"),ae=u(\"InfoUrl\"),ce=u(\"InfoBasePath\"),le=u(\"License\"),pe=u(\"Contact\");return Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"hgroup\",{className:\"main\"},Re.createElement(\"h2\",{className:\"title\"},L,Re.createElement(\"span\",null,C&&Re.createElement(ee,{version:C}),Re.createElement(ie,{oasVersion:\"2.0\"}))),i||a?Re.createElement(ce,{host:i,basePath:a}):null,o&&Re.createElement(ae,{getComponent:u,url:o})),Re.createElement(\"div\",{className:\"description\"},Re.createElement(Y,{source:j})),B&&Re.createElement(\"div\",{className:\"info__tos\"},Re.createElement(Z,{target:\"_blank\",href:sanitizeUrl(B)},\"Terms of service\")),$?.size>0&&Re.createElement(pe,{getComponent:u,data:$,selectedServer:w,url:o}),V?.size>0&&Re.createElement(le,{getComponent:u,license:V,selectedServer:w,url:o}),U?Re.createElement(Z,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(U)},z||U):null)}}const rC=info_Info;class InfoContainer extends Re.Component{render(){const{specSelectors:s,getComponent:o,oas3Selectors:i}=this.props,a=s.info(),u=s.url(),_=s.basePath(),w=s.host(),x=s.externalDocs(),C=i.selectedServer(),j=o(\"info\");return Re.createElement(\"div\",null,a&&a.count()?Re.createElement(j,{info:a,url:u,host:w,basePath:_,externalDocs:x,getComponent:o,selectedServer:C}):null)}}class contact_Contact extends Re.Component{render(){const{data:s,getComponent:o,selectedServer:i,url:a}=this.props,u=s.get(\"name\",\"the developer\"),_=safeBuildUrl(s.get(\"url\"),a,{selectedServer:i}),w=s.get(\"email\"),x=o(\"Link\");return Re.createElement(\"div\",{className:\"info__contact\"},_&&Re.createElement(\"div\",null,Re.createElement(x,{href:sanitizeUrl(_),target:\"_blank\"},u,\" - Website\")),w&&Re.createElement(x,{href:sanitizeUrl(`mailto:${w}`)},_?`Send email to ${u}`:`Contact ${u}`))}}const nC=contact_Contact;class license_License extends Re.Component{render(){const{license:s,getComponent:o,selectedServer:i,url:a}=this.props,u=s.get(\"name\",\"License\"),_=safeBuildUrl(s.get(\"url\"),a,{selectedServer:i}),w=o(\"Link\");return Re.createElement(\"div\",{className:\"info__license\"},_?Re.createElement(\"div\",{className:\"info__license__url\"},Re.createElement(w,{target:\"_blank\",href:sanitizeUrl(_)},u)):Re.createElement(\"span\",null,u))}}const sC=license_License;class JumpToPath extends Re.Component{render(){return null}}class CopyToClipboardBtn extends Re.Component{render(){let{getComponent:s}=this.props;const o=s(\"CopyIcon\");return Re.createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:this.props.textToCopy},Re.createElement(o,null)))}}class Footer extends Re.Component{render(){return Re.createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends Re.Component{onFilterChange=s=>{const{target:{value:o}}=s;this.props.layoutActions.updateFilter(o)};render(){const{specSelectors:s,layoutSelectors:o,getComponent:i}=this.props,a=i(\"Col\"),u=\"loading\"===s.loadingStatus(),_=\"failed\"===s.loadingStatus(),w=o.currentFilter(),x=[\"operation-filter-input\"];return _&&x.push(\"failed\"),u&&x.push(\"loading\"),Re.createElement(\"div\",null,!1===w?null:Re.createElement(\"div\",{className:\"filter-container\"},Re.createElement(a,{className:\"filter wrapper\",mobile:12},Re.createElement(\"input\",{className:x.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:\"string\"==typeof w?w:\"\",disabled:u}))))}}const oC=Function.prototype;class ParamBody extends Re.PureComponent{static defaultProp={consumes:(0,ze.fromJS)([\"application/json\"]),param:(0,ze.fromJS)({}),onChange:oC,onChangeConsumes:oC};constructor(s,o){super(s,o),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(s){this.updateValues.call(this,s)}updateValues=s=>{let{param:o,isExecute:i,consumesValue:a=\"\"}=s,u=/xml/i.test(a),_=/json/i.test(a),w=u?o.get(\"value_xml\"):o.get(\"value\");if(void 0!==w){let s=!w&&_?\"{}\":w;this.setState({value:s}),this.onChange(s,{isXml:u,isEditBox:i})}else u?this.onChange(this.sample(\"xml\"),{isXml:u,isEditBox:i}):this.onChange(this.sample(),{isEditBox:i})};sample=s=>{let{param:o,fn:i}=this.props,a=i.inferSchema(o.toJS());return i.getSampleSchema(a,s,{includeWriteOnly:!0})};onChange=(s,{isEditBox:o,isXml:i})=>{this.setState({value:s,isEditBox:o}),this._onChange(s,i)};_onChange=(s,o)=>{(this.props.onChange||oC)(s,o)};handleOnChange=s=>{const{consumesValue:o}=this.props,i=/xml/i.test(o),a=s.target.value;this.onChange(a,{isXml:i,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((s=>({isEditBox:!s.isEditBox})));render(){let{onChangeConsumes:s,param:o,isExecute:i,specSelectors:a,pathMethod:u,getComponent:_}=this.props;const w=_(\"Button\"),x=_(\"TextArea\"),C=_(\"HighlightCode\",!0),j=_(\"contentType\");let L=(a?a.parameterWithMetaByIdentity(u,o):o).get(\"errors\",(0,ze.List)()),B=a.contentTypeValues(u).get(\"requestContentType\"),$=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:V,isEditBox:U}=this.state,z=null;getKnownSyntaxHighlighterLanguage(V)&&(z=\"json\");const Y=`${createHtmlReadyId(`${u[1]}${u[0]}_parameters`)}_select`;return Re.createElement(\"div\",{className:\"body-param\",\"data-param-name\":o.get(\"name\"),\"data-param-in\":o.get(\"in\")},U&&i?Re.createElement(x,{className:\"body-param__text\"+(L.count()?\" invalid\":\"\"),value:V,onChange:this.handleOnChange}):V&&Re.createElement(C,{className:\"body-param__example\",language:z},V),Re.createElement(\"div\",{className:\"body-param-options\"},i?Re.createElement(\"div\",{className:\"body-param-edit\"},Re.createElement(w,{className:U?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},U?\"Cancel\":\"Edit\")):null,Re.createElement(\"label\",{htmlFor:Y},Re.createElement(\"span\",null,\"Parameter content type\"),Re.createElement(j,{value:B,contentTypes:$,onChange:s,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:Y}))))}}class Curl extends Re.Component{render(){const{request:s,getComponent:o}=this.props,i=requestSnippetGenerator_curl_bash(s),a=o(\"SyntaxHighlighter\",!0);return Re.createElement(\"div\",{className:\"curl-command\"},Re.createElement(\"h4\",null,\"Curl\"),Re.createElement(\"div\",{className:\"copy-to-clipboard\"},Re.createElement(Hn.CopyToClipboard,{text:i},Re.createElement(\"button\",null))),Re.createElement(\"div\",null,Re.createElement(a,{language:\"bash\",className:\"curl microlight\",renderPlainText:({children:s,PlainTextViewer:o})=>Re.createElement(o,{className:\"curl\"},s)},i)))}}const property=({propKey:s,propVal:o,propClass:i})=>Re.createElement(\"span\",{className:i},Re.createElement(\"br\",null),s,\": \",String(o));class TryItOutButton extends Re.Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:s,onCancelClick:o,onResetClick:i,enabled:a,hasUserEditedBody:u,isOAS3:_}=this.props,w=_&&u;return Re.createElement(\"div\",{className:w?\"try-out btn-group\":\"try-out\"},a?Re.createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:o},\"Cancel\"):Re.createElement(\"button\",{className:\"btn try-out__btn\",onClick:s},\"Try it out \"),w&&Re.createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:i},\"Reset\"))}}class VersionPragmaFilter extends Re.PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:s,isSwagger2:o,isOAS3:i,alsoShow:a}=this.props;return s?Re.createElement(\"div\",null,this.props.children):o&&i?Re.createElement(\"div\",{className:\"version-pragma\"},a,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,Re.createElement(\"code\",null,\"swagger\"),\" and \",Re.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),Re.createElement(\"p\",null,\"Supported version fields are \",Re.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",Re.createElement(\"code\",null,\"openapi: 3.0.4\"),\").\")))):o||i?Re.createElement(\"div\",null,this.props.children):Re.createElement(\"div\",{className:\"version-pragma\"},a,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),Re.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",Re.createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",Re.createElement(\"code\",null,\"openapi: 3.0.4\"),\").\"))))}}const version_stamp=({version:s})=>Re.createElement(\"small\",null,Re.createElement(\"pre\",{className:\"version\"},\" \",s,\" \")),openapi_version=({oasVersion:s})=>Re.createElement(\"small\",{className:\"version-stamp\"},Re.createElement(\"pre\",{className:\"version\"},\"OAS \",s)),deep_link=({enabled:s,path:o,text:i})=>Re.createElement(\"a\",{className:\"nostyle\",onClick:s?s=>s.preventDefault():null,href:s?`#/${o}`:null},Re.createElement(\"span\",null,i)),svg_assets=()=>Re.createElement(\"div\",null,Re.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},Re.createElement(\"defs\",null,Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},Re.createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},Re.createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},Re.createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},Re.createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},Re.createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},Re.createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},Re.createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),Re.createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},Re.createElement(\"g\",{transform:\"translate(2, -1)\"},Re.createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))))));var iC;function decodeEntity(s){return(iC=iC||document.createElement(\"textarea\")).innerHTML=\"&\"+s+\";\",iC.value}var aC=Object.prototype.hasOwnProperty;function index_browser_has(s,o){return!!s&&aC.call(s,o)}function index_browser_assign(s){return[].slice.call(arguments,1).forEach((function(o){if(o){if(\"object\"!=typeof o)throw new TypeError(o+\"must be object\");Object.keys(o).forEach((function(i){s[i]=o[i]}))}})),s}var cC=/\\\\([\\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;function unescapeMd(s){return s.indexOf(\"\\\\\")<0?s:s.replace(cC,\"$1\")}function isValidEntityCode(s){return!(s>=55296&&s<=57343)&&(!(s>=64976&&s<=65007)&&(!!(65535&~s&&65534!=(65535&s))&&(!(s>=0&&s<=8)&&(11!==s&&(!(s>=14&&s<=31)&&(!(s>=127&&s<=159)&&!(s>1114111)))))))}function fromCodePoint(s){if(s>65535){var o=55296+((s-=65536)>>10),i=56320+(1023&s);return String.fromCharCode(o,i)}return String.fromCharCode(s)}var lC=/&([a-z#][a-z0-9]{1,31});/gi,uC=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function replaceEntityPattern(s,o){var i=0,a=decodeEntity(o);return o!==a?a:35===o.charCodeAt(0)&&uC.test(o)&&isValidEntityCode(i=\"x\"===o[1].toLowerCase()?parseInt(o.slice(2),16):parseInt(o.slice(1),10))?fromCodePoint(i):s}function replaceEntities(s){return s.indexOf(\"&\")<0?s:s.replace(lC,replaceEntityPattern)}var pC=/[&<>\"]/,hC=/[&<>\"]/g,dC={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\"};function replaceUnsafeChar(s){return dC[s]}function escapeHtml(s){return pC.test(s)?s.replace(hC,replaceUnsafeChar):s}var fC={};function nextToken(s,o){return++o>=s.length-2?o:\"paragraph_open\"===s[o].type&&s[o].tight&&\"inline\"===s[o+1].type&&0===s[o+1].content.length&&\"paragraph_close\"===s[o+2].type&&s[o+2].tight?nextToken(s,o+2):o}fC.blockquote_open=function(){return\"<blockquote>\\n\"},fC.blockquote_close=function(s,o){return\"</blockquote>\"+mC(s,o)},fC.code=function(s,o){return s[o].block?\"<pre><code>\"+escapeHtml(s[o].content)+\"</code></pre>\"+mC(s,o):\"<code>\"+escapeHtml(s[o].content)+\"</code>\"},fC.fence=function(s,o,i,a,u){var _,w,x=s[o],C=\"\",j=i.langPrefix;if(x.params){if(w=(_=x.params.split(/\\s+/g)).join(\" \"),index_browser_has(u.rules.fence_custom,_[0]))return u.rules.fence_custom[_[0]](s,o,i,a,u);C=' class=\"'+j+escapeHtml(replaceEntities(unescapeMd(w)))+'\"'}return\"<pre><code\"+C+\">\"+(i.highlight&&i.highlight.apply(i.highlight,[x.content].concat(_))||escapeHtml(x.content))+\"</code></pre>\"+mC(s,o)},fC.fence_custom={},fC.heading_open=function(s,o){return\"<h\"+s[o].hLevel+\">\"},fC.heading_close=function(s,o){return\"</h\"+s[o].hLevel+\">\\n\"},fC.hr=function(s,o,i){return(i.xhtmlOut?\"<hr />\":\"<hr>\")+mC(s,o)},fC.bullet_list_open=function(){return\"<ul>\\n\"},fC.bullet_list_close=function(s,o){return\"</ul>\"+mC(s,o)},fC.list_item_open=function(){return\"<li>\"},fC.list_item_close=function(){return\"</li>\\n\"},fC.ordered_list_open=function(s,o){var i=s[o];return\"<ol\"+(i.order>1?' start=\"'+i.order+'\"':\"\")+\">\\n\"},fC.ordered_list_close=function(s,o){return\"</ol>\"+mC(s,o)},fC.paragraph_open=function(s,o){return s[o].tight?\"\":\"<p>\"},fC.paragraph_close=function(s,o){var i=!(s[o].tight&&o&&\"inline\"===s[o-1].type&&!s[o-1].content);return(s[o].tight?\"\":\"</p>\")+(i?mC(s,o):\"\")},fC.link_open=function(s,o,i){var a=s[o].title?' title=\"'+escapeHtml(replaceEntities(s[o].title))+'\"':\"\",u=i.linkTarget?' target=\"'+i.linkTarget+'\"':\"\";return'<a href=\"'+escapeHtml(s[o].href)+'\"'+a+u+\">\"},fC.link_close=function(){return\"</a>\"},fC.image=function(s,o,i){var a=' src=\"'+escapeHtml(s[o].src)+'\"',u=s[o].title?' title=\"'+escapeHtml(replaceEntities(s[o].title))+'\"':\"\";return\"<img\"+a+(' alt=\"'+(s[o].alt?escapeHtml(replaceEntities(unescapeMd(s[o].alt))):\"\")+'\"')+u+(i.xhtmlOut?\" /\":\"\")+\">\"},fC.table_open=function(){return\"<table>\\n\"},fC.table_close=function(){return\"</table>\\n\"},fC.thead_open=function(){return\"<thead>\\n\"},fC.thead_close=function(){return\"</thead>\\n\"},fC.tbody_open=function(){return\"<tbody>\\n\"},fC.tbody_close=function(){return\"</tbody>\\n\"},fC.tr_open=function(){return\"<tr>\"},fC.tr_close=function(){return\"</tr>\\n\"},fC.th_open=function(s,o){var i=s[o];return\"<th\"+(i.align?' style=\"text-align:'+i.align+'\"':\"\")+\">\"},fC.th_close=function(){return\"</th>\"},fC.td_open=function(s,o){var i=s[o];return\"<td\"+(i.align?' style=\"text-align:'+i.align+'\"':\"\")+\">\"},fC.td_close=function(){return\"</td>\"},fC.strong_open=function(){return\"<strong>\"},fC.strong_close=function(){return\"</strong>\"},fC.em_open=function(){return\"<em>\"},fC.em_close=function(){return\"</em>\"},fC.del_open=function(){return\"<del>\"},fC.del_close=function(){return\"</del>\"},fC.ins_open=function(){return\"<ins>\"},fC.ins_close=function(){return\"</ins>\"},fC.mark_open=function(){return\"<mark>\"},fC.mark_close=function(){return\"</mark>\"},fC.sub=function(s,o){return\"<sub>\"+escapeHtml(s[o].content)+\"</sub>\"},fC.sup=function(s,o){return\"<sup>\"+escapeHtml(s[o].content)+\"</sup>\"},fC.hardbreak=function(s,o,i){return i.xhtmlOut?\"<br />\\n\":\"<br>\\n\"},fC.softbreak=function(s,o,i){return i.breaks?i.xhtmlOut?\"<br />\\n\":\"<br>\\n\":\"\\n\"},fC.text=function(s,o){return escapeHtml(s[o].content)},fC.htmlblock=function(s,o){return s[o].content},fC.htmltag=function(s,o){return s[o].content},fC.abbr_open=function(s,o){return'<abbr title=\"'+escapeHtml(replaceEntities(s[o].title))+'\">'},fC.abbr_close=function(){return\"</abbr>\"},fC.footnote_ref=function(s,o){var i=Number(s[o].id+1).toString(),a=\"fnref\"+i;return s[o].subId>0&&(a+=\":\"+s[o].subId),'<sup class=\"footnote-ref\"><a href=\"#fn'+i+'\" id=\"'+a+'\">['+i+\"]</a></sup>\"},fC.footnote_block_open=function(s,o,i){return(i.xhtmlOut?'<hr class=\"footnotes-sep\" />\\n':'<hr class=\"footnotes-sep\">\\n')+'<section class=\"footnotes\">\\n<ol class=\"footnotes-list\">\\n'},fC.footnote_block_close=function(){return\"</ol>\\n</section>\\n\"},fC.footnote_open=function(s,o){return'<li id=\"fn'+Number(s[o].id+1).toString()+'\"  class=\"footnote-item\">'},fC.footnote_close=function(){return\"</li>\\n\"},fC.footnote_anchor=function(s,o){var i=\"fnref\"+Number(s[o].id+1).toString();return s[o].subId>0&&(i+=\":\"+s[o].subId),' <a href=\"#'+i+'\" class=\"footnote-backref\">↩</a>'},fC.dl_open=function(){return\"<dl>\\n\"},fC.dt_open=function(){return\"<dt>\"},fC.dd_open=function(){return\"<dd>\"},fC.dl_close=function(){return\"</dl>\\n\"},fC.dt_close=function(){return\"</dt>\\n\"},fC.dd_close=function(){return\"</dd>\\n\"};var mC=fC.getBreak=function getBreak(s,o){return(o=nextToken(s,o))<s.length&&\"list_item_close\"===s[o].type?\"\":\"\\n\"};function Renderer(){this.rules=index_browser_assign({},fC),this.getBreak=fC.getBreak}function Ruler(){this.__rules__=[],this.__cache__=null}function StateInline(s,o,i,a,u){this.src=s,this.env=a,this.options=i,this.parser=o,this.tokens=u,this.pos=0,this.posMax=this.src.length,this.level=0,this.pending=\"\",this.pendingLevel=0,this.cache=[],this.isInLabel=!1,this.linkLevel=0,this.linkContent=\"\",this.labelUnmatchedScopes=0}function parseLinkLabel(s,o){var i,a,u,_=-1,w=s.posMax,x=s.pos,C=s.isInLabel;if(s.isInLabel)return-1;if(s.labelUnmatchedScopes)return s.labelUnmatchedScopes--,-1;for(s.pos=o+1,s.isInLabel=!0,i=1;s.pos<w;){if(91===(u=s.src.charCodeAt(s.pos)))i++;else if(93===u&&0===--i){a=!0;break}s.parser.skipToken(s)}return a?(_=s.pos,s.labelUnmatchedScopes=0):s.labelUnmatchedScopes=i-1,s.pos=x,s.isInLabel=C,_}function parseAbbr(s,o,i,a){var u,_,w,x,C,j;if(42!==s.charCodeAt(0))return-1;if(91!==s.charCodeAt(1))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((_=parseLinkLabel(u=new StateInline(s,o,i,a,[]),1))<0||58!==s.charCodeAt(_+1))return-1;for(x=u.posMax,w=_+2;w<x&&10!==u.src.charCodeAt(w);w++);return C=s.slice(2,_),0===(j=s.slice(_+2,w).trim()).length?-1:(a.abbreviations||(a.abbreviations={}),void 0===a.abbreviations[\":\"+C]&&(a.abbreviations[\":\"+C]=j),w)}function normalizeLink(s){var o=replaceEntities(s);try{o=decodeURI(o)}catch(s){}return encodeURI(o)}function parseLinkDestination(s,o){var i,a,u,_=o,w=s.posMax;if(60===s.src.charCodeAt(o)){for(o++;o<w;){if(10===(i=s.src.charCodeAt(o)))return!1;if(62===i)return u=normalizeLink(unescapeMd(s.src.slice(_+1,o))),!!s.parser.validateLink(u)&&(s.pos=o+1,s.linkContent=u,!0);92===i&&o+1<w?o+=2:o++}return!1}for(a=0;o<w&&32!==(i=s.src.charCodeAt(o))&&!(i<32||127===i);)if(92===i&&o+1<w)o+=2;else{if(40===i&&++a>1)break;if(41===i&&--a<0)break;o++}return _!==o&&(u=unescapeMd(s.src.slice(_,o)),!!s.parser.validateLink(u)&&(s.linkContent=u,s.pos=o,!0))}function parseLinkTitle(s,o){var i,a=o,u=s.posMax,_=s.src.charCodeAt(o);if(34!==_&&39!==_&&40!==_)return!1;for(o++,40===_&&(_=41);o<u;){if((i=s.src.charCodeAt(o))===_)return s.pos=o+1,s.linkContent=unescapeMd(s.src.slice(a+1,o)),!0;92===i&&o+1<u?o+=2:o++}return!1}function normalizeReference(s){return s.trim().replace(/\\s+/g,\" \").toUpperCase()}function parseReference(s,o,i,a){var u,_,w,x,C,j,L,B,$;if(91!==s.charCodeAt(0))return-1;if(-1===s.indexOf(\"]:\"))return-1;if((_=parseLinkLabel(u=new StateInline(s,o,i,a,[]),0))<0||58!==s.charCodeAt(_+1))return-1;for(x=u.posMax,w=_+2;w<x&&(32===(C=u.src.charCodeAt(w))||10===C);w++);if(!parseLinkDestination(u,w))return-1;for(L=u.linkContent,j=w=u.pos,w+=1;w<x&&(32===(C=u.src.charCodeAt(w))||10===C);w++);for(w<x&&j!==w&&parseLinkTitle(u,w)?(B=u.linkContent,w=u.pos):(B=\"\",w=j);w<x&&32===u.src.charCodeAt(w);)w++;return w<x&&10!==u.src.charCodeAt(w)?-1:($=normalizeReference(s.slice(1,_)),void 0===a.references[$]&&(a.references[$]={title:B,href:L}),w)}Renderer.prototype.renderInline=function(s,o,i){for(var a=this.rules,u=s.length,_=0,w=\"\";u--;)w+=a[s[_].type](s,_++,o,i,this);return w},Renderer.prototype.render=function(s,o,i){for(var a=this.rules,u=s.length,_=-1,w=\"\";++_<u;)\"inline\"===s[_].type?w+=this.renderInline(s[_].children,o,i):w+=a[s[_].type](s,_,o,i,this);return w},Ruler.prototype.__find__=function(s){for(var o=this.__rules__.length,i=-1;o--;)if(this.__rules__[++i].name===s)return i;return-1},Ruler.prototype.__compile__=function(){var s=this,o=[\"\"];s.__rules__.forEach((function(s){s.enabled&&s.alt.forEach((function(s){o.indexOf(s)<0&&o.push(s)}))})),s.__cache__={},o.forEach((function(o){s.__cache__[o]=[],s.__rules__.forEach((function(i){i.enabled&&(o&&i.alt.indexOf(o)<0||s.__cache__[o].push(i.fn))}))}))},Ruler.prototype.at=function(s,o,i){var a=this.__find__(s),u=i||{};if(-1===a)throw new Error(\"Parser rule not found: \"+s);this.__rules__[a].fn=o,this.__rules__[a].alt=u.alt||[],this.__cache__=null},Ruler.prototype.before=function(s,o,i,a){var u=this.__find__(s),_=a||{};if(-1===u)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(u,0,{name:o,enabled:!0,fn:i,alt:_.alt||[]}),this.__cache__=null},Ruler.prototype.after=function(s,o,i,a){var u=this.__find__(s),_=a||{};if(-1===u)throw new Error(\"Parser rule not found: \"+s);this.__rules__.splice(u+1,0,{name:o,enabled:!0,fn:i,alt:_.alt||[]}),this.__cache__=null},Ruler.prototype.push=function(s,o,i){var a=i||{};this.__rules__.push({name:s,enabled:!0,fn:o,alt:a.alt||[]}),this.__cache__=null},Ruler.prototype.enable=function(s,o){s=Array.isArray(s)?s:[s],o&&this.__rules__.forEach((function(s){s.enabled=!1})),s.forEach((function(s){var o=this.__find__(s);if(o<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[o].enabled=!0}),this),this.__cache__=null},Ruler.prototype.disable=function(s){(s=Array.isArray(s)?s:[s]).forEach((function(s){var o=this.__find__(s);if(o<0)throw new Error(\"Rules manager: invalid rule name \"+s);this.__rules__[o].enabled=!1}),this),this.__cache__=null},Ruler.prototype.getRules=function(s){return null===this.__cache__&&this.__compile__(),this.__cache__[s]||[]},StateInline.prototype.pushPending=function(){this.tokens.push({type:\"text\",content:this.pending,level:this.pendingLevel}),this.pending=\"\"},StateInline.prototype.push=function(s){this.pending&&this.pushPending(),this.tokens.push(s),this.pendingLevel=this.level},StateInline.prototype.cacheSet=function(s,o){for(var i=this.cache.length;i<=s;i++)this.cache.push(0);this.cache[s]=o},StateInline.prototype.cacheGet=function(s){return s<this.cache.length?this.cache[s]:0};var gC=\" \\n()[]'\\\".,!?-\";function regEscape(s){return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g,\"\\\\$1\")}var yC=/\\+-|\\.\\.|\\?\\?\\?\\?|!!!!|,,|--/,vC=/\\((c|tm|r|p)\\)/gi,bC={c:\"©\",r:\"®\",p:\"§\",tm:\"™\"};function replaceScopedAbbr(s){return s.indexOf(\"(\")<0?s:s.replace(vC,(function(s,o){return bC[o.toLowerCase()]}))}var _C=/['\"]/,SC=/['\"]/g,EC=/[-\\s()\\[\\]]/;function isLetter(s,o){return!(o<0||o>=s.length)&&!EC.test(s[o])}function replaceAt(s,o,i){return s.substr(0,o)+i+s.substr(o+1)}var wC=[[\"block\",function block(s){s.inlineMode?s.tokens.push({type:\"inline\",content:s.src.replace(/\\n/g,\" \").trim(),level:0,lines:[0,1],children:[]}):s.block.parse(s.src,s.options,s.env,s.tokens)}],[\"abbr\",function abbr(s){var o,i,a,u,_=s.tokens;if(!s.inlineMode)for(o=1,i=_.length-1;o<i;o++)if(\"paragraph_open\"===_[o-1].type&&\"inline\"===_[o].type&&\"paragraph_close\"===_[o+1].type){for(a=_[o].content;a.length&&!((u=parseAbbr(a,s.inline,s.options,s.env))<0);)a=a.slice(u).trim();_[o].content=a,a.length||(_[o-1].tight=!0,_[o+1].tight=!0)}}],[\"references\",function references(s){var o,i,a,u,_=s.tokens;if(s.env.references=s.env.references||{},!s.inlineMode)for(o=1,i=_.length-1;o<i;o++)if(\"inline\"===_[o].type&&\"paragraph_open\"===_[o-1].type&&\"paragraph_close\"===_[o+1].type){for(a=_[o].content;a.length&&!((u=parseReference(a,s.inline,s.options,s.env))<0);)a=a.slice(u).trim();_[o].content=a,a.length||(_[o-1].tight=!0,_[o+1].tight=!0)}}],[\"inline\",function inline(s){var o,i,a,u=s.tokens;for(i=0,a=u.length;i<a;i++)\"inline\"===(o=u[i]).type&&s.inline.parse(o.content,s.options,s.env,o.children)}],[\"footnote_tail\",function footnote_block(s){var o,i,a,u,_,w,x,C,j,L=0,B=!1,$={};if(s.env.footnotes&&(s.tokens=s.tokens.filter((function(s){return\"footnote_reference_open\"===s.type?(B=!0,C=[],j=s.label,!1):\"footnote_reference_close\"===s.type?(B=!1,$[\":\"+j]=C,!1):(B&&C.push(s),!B)})),s.env.footnotes.list)){for(w=s.env.footnotes.list,s.tokens.push({type:\"footnote_block_open\",level:L++}),o=0,i=w.length;o<i;o++){for(s.tokens.push({type:\"footnote_open\",id:o,level:L++}),w[o].tokens?((x=[]).push({type:\"paragraph_open\",tight:!1,level:L++}),x.push({type:\"inline\",content:\"\",level:L,children:w[o].tokens}),x.push({type:\"paragraph_close\",tight:!1,level:--L})):w[o].label&&(x=$[\":\"+w[o].label]),s.tokens=s.tokens.concat(x),_=\"paragraph_close\"===s.tokens[s.tokens.length-1].type?s.tokens.pop():null,u=w[o].count>0?w[o].count:1,a=0;a<u;a++)s.tokens.push({type:\"footnote_anchor\",id:o,subId:a,level:L});_&&s.tokens.push(_),s.tokens.push({type:\"footnote_close\",level:--L})}s.tokens.push({type:\"footnote_block_close\",level:--L})}}],[\"abbr2\",function abbr2(s){var o,i,a,u,_,w,x,C,j,L,B,$,V=s.tokens;if(s.env.abbreviations)for(s.env.abbrRegExp||($=\"(^|[\"+gC.split(\"\").map(regEscape).join(\"\")+\"])(\"+Object.keys(s.env.abbreviations).map((function(s){return s.substr(1)})).sort((function(s,o){return o.length-s.length})).map(regEscape).join(\"|\")+\")($|[\"+gC.split(\"\").map(regEscape).join(\"\")+\"])\",s.env.abbrRegExp=new RegExp($,\"g\")),L=s.env.abbrRegExp,i=0,a=V.length;i<a;i++)if(\"inline\"===V[i].type)for(o=(u=V[i].children).length-1;o>=0;o--)if(\"text\"===(_=u[o]).type){for(C=0,w=_.content,L.lastIndex=0,j=_.level,x=[];B=L.exec(w);)L.lastIndex>C&&x.push({type:\"text\",content:w.slice(C,B.index+B[1].length),level:j}),x.push({type:\"abbr_open\",title:s.env.abbreviations[\":\"+B[2]],level:j++}),x.push({type:\"text\",content:B[2],level:j}),x.push({type:\"abbr_close\",level:--j}),C=L.lastIndex-B[3].length;x.length&&(C<w.length&&x.push({type:\"text\",content:w.slice(C),level:j}),V[i].children=u=[].concat(u.slice(0,o),x,u.slice(o+1)))}}],[\"replacements\",function index_browser_replace(s){var o,i,a,u,_;if(s.options.typographer)for(_=s.tokens.length-1;_>=0;_--)if(\"inline\"===s.tokens[_].type)for(o=(u=s.tokens[_].children).length-1;o>=0;o--)\"text\"===(i=u[o]).type&&(a=replaceScopedAbbr(a=i.content),yC.test(a)&&(a=a.replace(/\\+-/g,\"±\").replace(/\\.{2,}/g,\"…\").replace(/([?!])…/g,\"$1..\").replace(/([?!]){4,}/g,\"$1$1$1\").replace(/,{2,}/g,\",\").replace(/(^|[^-])---([^-]|$)/gm,\"$1—$2\").replace(/(^|\\s)--(\\s|$)/gm,\"$1–$2\").replace(/(^|[^-\\s])--([^-\\s]|$)/gm,\"$1–$2\")),i.content=a)}],[\"smartquotes\",function smartquotes(s){var o,i,a,u,_,w,x,C,j,L,B,$,V,U,z,Y,Z;if(s.options.typographer)for(Z=[],z=s.tokens.length-1;z>=0;z--)if(\"inline\"===s.tokens[z].type)for(Y=s.tokens[z].children,Z.length=0,o=0;o<Y.length;o++)if(\"text\"===(i=Y[o]).type&&!_C.test(i.text)){for(x=Y[o].level,V=Z.length-1;V>=0&&!(Z[V].level<=x);V--);Z.length=V+1,_=0,w=(a=i.content).length;e:for(;_<w&&(SC.lastIndex=_,u=SC.exec(a));)if(C=!isLetter(a,u.index-1),_=u.index+1,U=\"'\"===u[0],(j=!isLetter(a,_))||C){if(B=!j,$=!C)for(V=Z.length-1;V>=0&&(L=Z[V],!(Z[V].level<x));V--)if(L.single===U&&Z[V].level===x){L=Z[V],U?(Y[L.token].content=replaceAt(Y[L.token].content,L.pos,s.options.quotes[2]),i.content=replaceAt(i.content,u.index,s.options.quotes[3])):(Y[L.token].content=replaceAt(Y[L.token].content,L.pos,s.options.quotes[0]),i.content=replaceAt(i.content,u.index,s.options.quotes[1])),Z.length=V;continue e}B?Z.push({token:o,pos:u.index,single:U,level:x}):$&&U&&(i.content=replaceAt(i.content,u.index,\"’\"))}else U&&(i.content=replaceAt(i.content,u.index,\"’\"))}}]];function Core(){this.options={},this.ruler=new Ruler;for(var s=0;s<wC.length;s++)this.ruler.push(wC[s][0],wC[s][1])}function StateBlock(s,o,i,a,u){var _,w,x,C,j,L,B;for(this.src=s,this.parser=o,this.options=i,this.env=a,this.tokens=u,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType=\"root\",this.ddIndent=-1,this.level=0,this.result=\"\",L=0,B=!1,x=C=L=0,j=(w=this.src).length;C<j;C++){if(_=w.charCodeAt(C),!B){if(32===_){L++;continue}B=!0}10!==_&&C!==j-1||(10!==_&&C++,this.bMarks.push(x),this.eMarks.push(C),this.tShift.push(L),B=!1,L=0,x=C+1)}this.bMarks.push(w.length),this.eMarks.push(w.length),this.tShift.push(0),this.lineMax=this.bMarks.length-1}function skipBulletListMarker(s,o){var i,a,u;return(a=s.bMarks[o]+s.tShift[o])>=(u=s.eMarks[o])||42!==(i=s.src.charCodeAt(a++))&&45!==i&&43!==i||a<u&&32!==s.src.charCodeAt(a)?-1:a}function skipOrderedListMarker(s,o){var i,a=s.bMarks[o]+s.tShift[o],u=s.eMarks[o];if(a+1>=u)return-1;if((i=s.src.charCodeAt(a++))<48||i>57)return-1;for(;;){if(a>=u)return-1;if(!((i=s.src.charCodeAt(a++))>=48&&i<=57)){if(41===i||46===i)break;return-1}}return a<u&&32!==s.src.charCodeAt(a)?-1:a}Core.prototype.process=function(s){var o,i,a;for(o=0,i=(a=this.ruler.getRules(\"\")).length;o<i;o++)a[o](s)},StateBlock.prototype.isEmpty=function isEmpty(s){return this.bMarks[s]+this.tShift[s]>=this.eMarks[s]},StateBlock.prototype.skipEmptyLines=function skipEmptyLines(s){for(var o=this.lineMax;s<o&&!(this.bMarks[s]+this.tShift[s]<this.eMarks[s]);s++);return s},StateBlock.prototype.skipSpaces=function skipSpaces(s){for(var o=this.src.length;s<o&&32===this.src.charCodeAt(s);s++);return s},StateBlock.prototype.skipChars=function skipChars(s,o){for(var i=this.src.length;s<i&&this.src.charCodeAt(s)===o;s++);return s},StateBlock.prototype.skipCharsBack=function skipCharsBack(s,o,i){if(s<=i)return s;for(;s>i;)if(o!==this.src.charCodeAt(--s))return s+1;return s},StateBlock.prototype.getLines=function getLines(s,o,i,a){var u,_,w,x,C,j=s;if(s>=o)return\"\";if(j+1===o)return _=this.bMarks[j]+Math.min(this.tShift[j],i),w=a?this.eMarks[j]+1:this.eMarks[j],this.src.slice(_,w);for(x=new Array(o-s),u=0;j<o;j++,u++)(C=this.tShift[j])>i&&(C=i),C<0&&(C=0),_=this.bMarks[j]+C,w=j+1<o||a?this.eMarks[j]+1:this.eMarks[j],x[u]=this.src.slice(_,w);return x.join(\"\")};var xC={};[\"article\",\"aside\",\"button\",\"blockquote\",\"body\",\"canvas\",\"caption\",\"col\",\"colgroup\",\"dd\",\"div\",\"dl\",\"dt\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"header\",\"hgroup\",\"hr\",\"iframe\",\"li\",\"map\",\"object\",\"ol\",\"output\",\"p\",\"pre\",\"progress\",\"script\",\"section\",\"style\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"tr\",\"thead\",\"ul\",\"video\"].forEach((function(s){xC[s]=!0}));var kC=/^<([a-zA-Z]{1,15})[\\s\\/>]/,OC=/^<\\/([a-zA-Z]{1,15})[\\s>]/;function index_browser_getLine(s,o){var i=s.bMarks[o]+s.blkIndent,a=s.eMarks[o];return s.src.substr(i,a-i)}function skipMarker(s,o){var i,a,u=s.bMarks[o]+s.tShift[o],_=s.eMarks[o];return u>=_||126!==(a=s.src.charCodeAt(u++))&&58!==a||u===(i=s.skipSpaces(u))||i>=_?-1:i}var CC=[[\"code\",function code(s,o,i){var a,u;if(s.tShift[o]-s.blkIndent<4)return!1;for(u=a=o+1;a<i;)if(s.isEmpty(a))a++;else{if(!(s.tShift[a]-s.blkIndent>=4))break;u=++a}return s.line=a,s.tokens.push({type:\"code\",content:s.getLines(o,u,4+s.blkIndent,!0),block:!0,lines:[o,s.line],level:s.level}),!0}],[\"fences\",function fences(s,o,i,a){var u,_,w,x,C,j=!1,L=s.bMarks[o]+s.tShift[o],B=s.eMarks[o];if(L+3>B)return!1;if(126!==(u=s.src.charCodeAt(L))&&96!==u)return!1;if(C=L,(_=(L=s.skipChars(L,u))-C)<3)return!1;if((w=s.src.slice(L,B).trim()).indexOf(\"`\")>=0)return!1;if(a)return!0;for(x=o;!(++x>=i)&&!((L=C=s.bMarks[x]+s.tShift[x])<(B=s.eMarks[x])&&s.tShift[x]<s.blkIndent);)if(s.src.charCodeAt(L)===u&&!(s.tShift[x]-s.blkIndent>=4||(L=s.skipChars(L,u))-C<_||(L=s.skipSpaces(L))<B)){j=!0;break}return _=s.tShift[o],s.line=x+(j?1:0),s.tokens.push({type:\"fence\",params:w,content:s.getLines(o+1,x,_,!0),lines:[o,s.line],level:s.level}),!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"blockquote\",function blockquote(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U,z=s.bMarks[o]+s.tShift[o],Y=s.eMarks[o];if(z>Y)return!1;if(62!==s.src.charCodeAt(z++))return!1;if(s.level>=s.options.maxNesting)return!1;if(a)return!0;for(32===s.src.charCodeAt(z)&&z++,C=s.blkIndent,s.blkIndent=0,x=[s.bMarks[o]],s.bMarks[o]=z,_=(z=z<Y?s.skipSpaces(z):z)>=Y,w=[s.tShift[o]],s.tShift[o]=z-s.bMarks[o],B=s.parser.ruler.getRules(\"blockquote\"),u=o+1;u<i&&!((z=s.bMarks[u]+s.tShift[u])>=(Y=s.eMarks[u]));u++)if(62!==s.src.charCodeAt(z++)){if(_)break;for(U=!1,$=0,V=B.length;$<V;$++)if(B[$](s,u,i,!0)){U=!0;break}if(U)break;x.push(s.bMarks[u]),w.push(s.tShift[u]),s.tShift[u]=-1337}else 32===s.src.charCodeAt(z)&&z++,x.push(s.bMarks[u]),s.bMarks[u]=z,_=(z=z<Y?s.skipSpaces(z):z)>=Y,w.push(s.tShift[u]),s.tShift[u]=z-s.bMarks[u];for(j=s.parentType,s.parentType=\"blockquote\",s.tokens.push({type:\"blockquote_open\",lines:L=[o,0],level:s.level++}),s.parser.tokenize(s,o,u),s.tokens.push({type:\"blockquote_close\",level:--s.level}),s.parentType=j,L[1]=s.line,$=0;$<w.length;$++)s.bMarks[$+o]=x[$],s.tShift[$+o]=w[$];return s.blkIndent=C,!0},[\"paragraph\",\"blockquote\",\"list\"]],[\"hr\",function hr(s,o,i,a){var u,_,w,x=s.bMarks[o],C=s.eMarks[o];if((x+=s.tShift[o])>C)return!1;if(42!==(u=s.src.charCodeAt(x++))&&45!==u&&95!==u)return!1;for(_=1;x<C;){if((w=s.src.charCodeAt(x++))!==u&&32!==w)return!1;w===u&&_++}return!(_<3)&&(a||(s.line=o+1,s.tokens.push({type:\"hr\",lines:[o,s.line],level:s.level})),!0)},[\"paragraph\",\"blockquote\",\"list\"]],[\"list\",function index_browser_list(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U,z,Y,Z,ee,ie,ae,ce,le,pe,de,fe=!0;if((B=skipOrderedListMarker(s,o))>=0)z=!0;else{if(!((B=skipBulletListMarker(s,o))>=0))return!1;z=!1}if(s.level>=s.options.maxNesting)return!1;if(U=s.src.charCodeAt(B-1),a)return!0;for(Z=s.tokens.length,z?(L=s.bMarks[o]+s.tShift[o],V=Number(s.src.substr(L,B-L-1)),s.tokens.push({type:\"ordered_list_open\",order:V,lines:ie=[o,0],level:s.level++})):s.tokens.push({type:\"bullet_list_open\",lines:ie=[o,0],level:s.level++}),u=o,ee=!1,ce=s.parser.ruler.getRules(\"list\");!(!(u<i)||(($=(Y=s.skipSpaces(B))>=s.eMarks[u]?1:Y-B)>4&&($=1),$<1&&($=1),_=B-s.bMarks[u]+$,s.tokens.push({type:\"list_item_open\",lines:ae=[o,0],level:s.level++}),x=s.blkIndent,C=s.tight,w=s.tShift[o],j=s.parentType,s.tShift[o]=Y-s.bMarks[o],s.blkIndent=_,s.tight=!0,s.parentType=\"list\",s.parser.tokenize(s,o,i,!0),s.tight&&!ee||(fe=!1),ee=s.line-o>1&&s.isEmpty(s.line-1),s.blkIndent=x,s.tShift[o]=w,s.tight=C,s.parentType=j,s.tokens.push({type:\"list_item_close\",level:--s.level}),u=o=s.line,ae[1]=u,Y=s.bMarks[o],u>=i)||s.isEmpty(u)||s.tShift[u]<s.blkIndent);){for(de=!1,le=0,pe=ce.length;le<pe;le++)if(ce[le](s,u,i,!0)){de=!0;break}if(de)break;if(z){if((B=skipOrderedListMarker(s,u))<0)break}else if((B=skipBulletListMarker(s,u))<0)break;if(U!==s.src.charCodeAt(B-1))break}return s.tokens.push({type:z?\"ordered_list_close\":\"bullet_list_close\",level:--s.level}),ie[1]=u,s.line=u,fe&&function markTightParagraphs(s,o){var i,a,u=s.level+2;for(i=o+2,a=s.tokens.length-2;i<a;i++)s.tokens[i].level===u&&\"paragraph_open\"===s.tokens[i].type&&(s.tokens[i+2].tight=!0,s.tokens[i].tight=!0,i+=2)}(s,Z),!0},[\"paragraph\",\"blockquote\"]],[\"footnote\",function footnote(s,o,i,a){var u,_,w,x,C,j=s.bMarks[o]+s.tShift[o],L=s.eMarks[o];if(j+4>L)return!1;if(91!==s.src.charCodeAt(j))return!1;if(94!==s.src.charCodeAt(j+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(x=j+2;x<L;x++){if(32===s.src.charCodeAt(x))return!1;if(93===s.src.charCodeAt(x))break}return x!==j+2&&(!(x+1>=L||58!==s.src.charCodeAt(++x))&&(a||(x++,s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.refs||(s.env.footnotes.refs={}),C=s.src.slice(j+2,x-2),s.env.footnotes.refs[\":\"+C]=-1,s.tokens.push({type:\"footnote_reference_open\",label:C,level:s.level++}),u=s.bMarks[o],_=s.tShift[o],w=s.parentType,s.tShift[o]=s.skipSpaces(x)-x,s.bMarks[o]=x,s.blkIndent+=4,s.parentType=\"footnote\",s.tShift[o]<s.blkIndent&&(s.tShift[o]+=s.blkIndent,s.bMarks[o]-=s.blkIndent),s.parser.tokenize(s,o,i,!0),s.parentType=w,s.blkIndent-=4,s.tShift[o]=_,s.bMarks[o]=u,s.tokens.push({type:\"footnote_reference_close\",level:--s.level})),!0))},[\"paragraph\"]],[\"heading\",function heading(s,o,i,a){var u,_,w,x=s.bMarks[o]+s.tShift[o],C=s.eMarks[o];if(x>=C)return!1;if(35!==(u=s.src.charCodeAt(x))||x>=C)return!1;for(_=1,u=s.src.charCodeAt(++x);35===u&&x<C&&_<=6;)_++,u=s.src.charCodeAt(++x);return!(_>6||x<C&&32!==u)&&(a||(C=s.skipCharsBack(C,32,x),(w=s.skipCharsBack(C,35,x))>x&&32===s.src.charCodeAt(w-1)&&(C=w),s.line=o+1,s.tokens.push({type:\"heading_open\",hLevel:_,lines:[o,s.line],level:s.level}),x<C&&s.tokens.push({type:\"inline\",content:s.src.slice(x,C).trim(),level:s.level+1,lines:[o,s.line],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:_,level:s.level})),!0)},[\"paragraph\",\"blockquote\"]],[\"lheading\",function lheading(s,o,i){var a,u,_,w=o+1;return!(w>=i)&&(!(s.tShift[w]<s.blkIndent)&&(!(s.tShift[w]-s.blkIndent>3)&&(!((u=s.bMarks[w]+s.tShift[w])>=(_=s.eMarks[w]))&&((45===(a=s.src.charCodeAt(u))||61===a)&&(u=s.skipChars(u,a),!((u=s.skipSpaces(u))<_)&&(u=s.bMarks[o]+s.tShift[o],s.line=w+1,s.tokens.push({type:\"heading_open\",hLevel:61===a?1:2,lines:[o,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:s.src.slice(u,s.eMarks[o]).trim(),level:s.level+1,lines:[o,s.line-1],children:[]}),s.tokens.push({type:\"heading_close\",hLevel:61===a?1:2,level:s.level}),!0))))))}],[\"htmlblock\",function htmlblock(s,o,i,a){var u,_,w,x=s.bMarks[o],C=s.eMarks[o],j=s.tShift[o];if(x+=j,!s.options.html)return!1;if(j>3||x+2>=C)return!1;if(60!==s.src.charCodeAt(x))return!1;if(33===(u=s.src.charCodeAt(x+1))||63===u){if(a)return!0}else{if(47!==u&&!function isLetter$1(s){var o=32|s;return o>=97&&o<=122}(u))return!1;if(47===u){if(!(_=s.src.slice(x,C).match(OC)))return!1}else if(!(_=s.src.slice(x,C).match(kC)))return!1;if(!0!==xC[_[1].toLowerCase()])return!1;if(a)return!0}for(w=o+1;w<s.lineMax&&!s.isEmpty(w);)w++;return s.line=w,s.tokens.push({type:\"htmlblock\",level:s.level,lines:[o,s.line],content:s.getLines(o,w,0,!0)}),!0},[\"paragraph\",\"blockquote\"]],[\"table\",function table(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U;if(o+2>i)return!1;if(C=o+1,s.tShift[C]<s.blkIndent)return!1;if((w=s.bMarks[C]+s.tShift[C])>=s.eMarks[C])return!1;if(124!==(u=s.src.charCodeAt(w))&&45!==u&&58!==u)return!1;if(_=index_browser_getLine(s,o+1),!/^[-:| ]+$/.test(_))return!1;if((j=_.split(\"|\"))<=2)return!1;for(B=[],x=0;x<j.length;x++){if(!($=j[x].trim())){if(0===x||x===j.length-1)continue;return!1}if(!/^:?-+:?$/.test($))return!1;58===$.charCodeAt($.length-1)?B.push(58===$.charCodeAt(0)?\"center\":\"right\"):58===$.charCodeAt(0)?B.push(\"left\"):B.push(\"\")}if(-1===(_=index_browser_getLine(s,o).trim()).indexOf(\"|\"))return!1;if(j=_.replace(/^\\||\\|$/g,\"\").split(\"|\"),B.length!==j.length)return!1;if(a)return!0;for(s.tokens.push({type:\"table_open\",lines:V=[o,0],level:s.level++}),s.tokens.push({type:\"thead_open\",lines:[o,o+1],level:s.level++}),s.tokens.push({type:\"tr_open\",lines:[o,o+1],level:s.level++}),x=0;x<j.length;x++)s.tokens.push({type:\"th_open\",align:B[x],lines:[o,o+1],level:s.level++}),s.tokens.push({type:\"inline\",content:j[x].trim(),lines:[o,o+1],level:s.level,children:[]}),s.tokens.push({type:\"th_close\",level:--s.level});for(s.tokens.push({type:\"tr_close\",level:--s.level}),s.tokens.push({type:\"thead_close\",level:--s.level}),s.tokens.push({type:\"tbody_open\",lines:U=[o+2,0],level:s.level++}),C=o+2;C<i&&!(s.tShift[C]<s.blkIndent)&&-1!==(_=index_browser_getLine(s,C).trim()).indexOf(\"|\");C++){for(j=_.replace(/^\\||\\|$/g,\"\").split(\"|\"),s.tokens.push({type:\"tr_open\",level:s.level++}),x=0;x<j.length;x++)s.tokens.push({type:\"td_open\",align:B[x],level:s.level++}),L=j[x].substring(124===j[x].charCodeAt(0)?1:0,124===j[x].charCodeAt(j[x].length-1)?j[x].length-1:j[x].length).trim(),s.tokens.push({type:\"inline\",content:L,level:s.level,children:[]}),s.tokens.push({type:\"td_close\",level:--s.level});s.tokens.push({type:\"tr_close\",level:--s.level})}return s.tokens.push({type:\"tbody_close\",level:--s.level}),s.tokens.push({type:\"table_close\",level:--s.level}),V[1]=U[1]=C,s.line=C,!0},[\"paragraph\"]],[\"deflist\",function deflist(s,o,i,a){var u,_,w,x,C,j,L,B,$,V,U,z,Y,Z;if(a)return!(s.ddIndent<0)&&skipMarker(s,o)>=0;if(L=o+1,s.isEmpty(L)&&++L>i)return!1;if(s.tShift[L]<s.blkIndent)return!1;if((u=skipMarker(s,L))<0)return!1;if(s.level>=s.options.maxNesting)return!1;j=s.tokens.length,s.tokens.push({type:\"dl_open\",lines:C=[o,0],level:s.level++}),w=o,_=L;e:for(;;){for(Z=!0,Y=!1,s.tokens.push({type:\"dt_open\",lines:[w,w],level:s.level++}),s.tokens.push({type:\"inline\",content:s.getLines(w,w+1,s.blkIndent,!1).trim(),level:s.level+1,lines:[w,w],children:[]}),s.tokens.push({type:\"dt_close\",level:--s.level});;){if(s.tokens.push({type:\"dd_open\",lines:x=[L,0],level:s.level++}),z=s.tight,$=s.ddIndent,B=s.blkIndent,U=s.tShift[_],V=s.parentType,s.blkIndent=s.ddIndent=s.tShift[_]+2,s.tShift[_]=u-s.bMarks[_],s.tight=!0,s.parentType=\"deflist\",s.parser.tokenize(s,_,i,!0),s.tight&&!Y||(Z=!1),Y=s.line-_>1&&s.isEmpty(s.line-1),s.tShift[_]=U,s.tight=z,s.parentType=V,s.blkIndent=B,s.ddIndent=$,s.tokens.push({type:\"dd_close\",level:--s.level}),x[1]=L=s.line,L>=i)break e;if(s.tShift[L]<s.blkIndent)break e;if((u=skipMarker(s,L))<0)break;_=L}if(L>=i)break;if(w=L,s.isEmpty(w))break;if(s.tShift[w]<s.blkIndent)break;if((_=w+1)>=i)break;if(s.isEmpty(_)&&_++,_>=i)break;if(s.tShift[_]<s.blkIndent)break;if((u=skipMarker(s,_))<0)break}return s.tokens.push({type:\"dl_close\",level:--s.level}),C[1]=L,s.line=L,Z&&function markTightParagraphs$1(s,o){var i,a,u=s.level+2;for(i=o+2,a=s.tokens.length-2;i<a;i++)s.tokens[i].level===u&&\"paragraph_open\"===s.tokens[i].type&&(s.tokens[i+2].tight=!0,s.tokens[i].tight=!0,i+=2)}(s,j),!0},[\"paragraph\"]],[\"paragraph\",function paragraph(s,o){var i,a,u,_,w,x,C=o+1;if(C<(i=s.lineMax)&&!s.isEmpty(C))for(x=s.parser.ruler.getRules(\"paragraph\");C<i&&!s.isEmpty(C);C++)if(!(s.tShift[C]-s.blkIndent>3)){for(u=!1,_=0,w=x.length;_<w;_++)if(x[_](s,C,i,!0)){u=!0;break}if(u)break}return a=s.getLines(o,C,s.blkIndent,!1).trim(),s.line=C,a.length&&(s.tokens.push({type:\"paragraph_open\",tight:!1,lines:[o,s.line],level:s.level}),s.tokens.push({type:\"inline\",content:a,level:s.level+1,lines:[o,s.line],children:[]}),s.tokens.push({type:\"paragraph_close\",tight:!1,level:s.level})),!0}]];function ParserBlock(){this.ruler=new Ruler;for(var s=0;s<CC.length;s++)this.ruler.push(CC[s][0],CC[s][1],{alt:(CC[s][2]||[]).slice()})}ParserBlock.prototype.tokenize=function(s,o,i){for(var a,u=this.ruler.getRules(\"\"),_=u.length,w=o,x=!1;w<i&&(s.line=w=s.skipEmptyLines(w),!(w>=i))&&!(s.tShift[w]<s.blkIndent);){for(a=0;a<_&&!u[a](s,w,i,!1);a++);if(s.tight=!x,s.isEmpty(s.line-1)&&(x=!0),(w=s.line)<i&&s.isEmpty(w)){if(x=!0,++w<i&&\"list\"===s.parentType&&s.isEmpty(w))break;s.line=w}}};var AC=/[\\n\\t]/g,jC=/\\r[\\n\\u0085]|[\\u2424\\u2028\\u0085]/g,PC=/\\u00a0/g;function isTerminatorChar(s){switch(s){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}ParserBlock.prototype.parse=function(s,o,i,a){var u,_=0,w=0;if(!s)return[];(s=(s=s.replace(PC,\" \")).replace(jC,\"\\n\")).indexOf(\"\\t\")>=0&&(s=s.replace(AC,(function(o,i){var a;return 10===s.charCodeAt(i)?(_=i+1,w=0,o):(a=\"    \".slice((i-_-w)%4),w=i-_+1,a)}))),u=new StateBlock(s,this,o,i,a),this.tokenize(u,u.line,u.lineMax)};for(var IC=[],TC=0;TC<256;TC++)IC.push(0);function isAlphaNum(s){return s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122}function scanDelims(s,o){var i,a,u,_=o,w=!0,x=!0,C=s.posMax,j=s.src.charCodeAt(o);for(i=o>0?s.src.charCodeAt(o-1):-1;_<C&&s.src.charCodeAt(_)===j;)_++;return _>=C&&(w=!1),(u=_-o)>=4?w=x=!1:(32!==(a=_<C?s.src.charCodeAt(_):-1)&&10!==a||(w=!1),32!==i&&10!==i||(x=!1),95===j&&(isAlphaNum(i)&&(w=!1),isAlphaNum(a)&&(x=!1))),{can_open:w,can_close:x,delims:u}}\"\\\\!\\\"#$%&'()*+,./:;<=>?@[]^_`{|}~-\".split(\"\").forEach((function(s){IC[s.charCodeAt(0)]=1}));var NC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var MC=/\\\\([ \\\\!\"#$%&'()*+,.\\/:;<=>?@[\\]^_`{|}~-])/g;var RC=[\"coap\",\"doi\",\"javascript\",\"aaa\",\"aaas\",\"about\",\"acap\",\"cap\",\"cid\",\"crid\",\"data\",\"dav\",\"dict\",\"dns\",\"file\",\"ftp\",\"geo\",\"go\",\"gopher\",\"h323\",\"http\",\"https\",\"iax\",\"icap\",\"im\",\"imap\",\"info\",\"ipp\",\"iris\",\"iris.beep\",\"iris.xpc\",\"iris.xpcs\",\"iris.lwz\",\"ldap\",\"mailto\",\"mid\",\"msrp\",\"msrps\",\"mtqp\",\"mupdate\",\"news\",\"nfs\",\"ni\",\"nih\",\"nntp\",\"opaquelocktoken\",\"pop\",\"pres\",\"rtsp\",\"service\",\"session\",\"shttp\",\"sieve\",\"sip\",\"sips\",\"sms\",\"snmp\",\"soap.beep\",\"soap.beeps\",\"tag\",\"tel\",\"telnet\",\"tftp\",\"thismessage\",\"tn3270\",\"tip\",\"tv\",\"urn\",\"vemmi\",\"ws\",\"wss\",\"xcon\",\"xcon-userid\",\"xmlrpc.beep\",\"xmlrpc.beeps\",\"xmpp\",\"z39.50r\",\"z39.50s\",\"adiumxtra\",\"afp\",\"afs\",\"aim\",\"apt\",\"attachment\",\"aw\",\"beshare\",\"bitcoin\",\"bolo\",\"callto\",\"chrome\",\"chrome-extension\",\"com-eventbrite-attendee\",\"content\",\"cvs\",\"dlna-playsingle\",\"dlna-playcontainer\",\"dtn\",\"dvb\",\"ed2k\",\"facetime\",\"feed\",\"finger\",\"fish\",\"gg\",\"git\",\"gizmoproject\",\"gtalk\",\"hcp\",\"icon\",\"ipn\",\"irc\",\"irc6\",\"ircs\",\"itms\",\"jar\",\"jms\",\"keyparc\",\"lastfm\",\"ldaps\",\"magnet\",\"maps\",\"market\",\"message\",\"mms\",\"ms-help\",\"msnim\",\"mumble\",\"mvn\",\"notes\",\"oid\",\"palm\",\"paparazzi\",\"platform\",\"proxy\",\"psyc\",\"query\",\"res\",\"resource\",\"rmi\",\"rsync\",\"rtmp\",\"secondlife\",\"sftp\",\"sgn\",\"skype\",\"smb\",\"soldat\",\"spotify\",\"ssh\",\"steam\",\"svn\",\"teamspeak\",\"things\",\"udp\",\"unreal\",\"ut2004\",\"ventrilo\",\"view-source\",\"webcal\",\"wtai\",\"wyciwyg\",\"xfire\",\"xri\",\"ymsgr\"],DC=/^<([a-zA-Z0-9.!#$%&'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,LC=/^<([a-zA-Z.\\-]{1,25}):([^<>\\x00-\\x20]*)>/;function replace$1(s,o){return s=s.source,o=o||\"\",function self(i,a){return i?(a=a.source||a,s=s.replace(i,a),self):new RegExp(s,o)}}var FC=replace$1(/(?:unquoted|single_quoted|double_quoted)/)(\"unquoted\",/[^\"'=<>`\\x00-\\x20]+/)(\"single_quoted\",/'[^']*'/)(\"double_quoted\",/\"[^\"]*\"/)(),BC=replace$1(/(?:\\s+attr_name(?:\\s*=\\s*attr_value)?)/)(\"attr_name\",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)(\"attr_value\",FC)(),$C=replace$1(/<[A-Za-z][A-Za-z0-9]*attribute*\\s*\\/?>/)(\"attribute\",BC)(),qC=replace$1(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)(\"open_tag\",$C)(\"close_tag\",/<\\/[A-Za-z][A-Za-z0-9]*\\s*>/)(\"comment\",/<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->/)(\"processing\",/<[?].*?[?]>/)(\"declaration\",/<![A-Z]+\\s+[^>]*>/)(\"cdata\",/<!\\[CDATA\\[[\\s\\S]*?\\]\\]>/)();var VC=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,UC=/^&([a-z][a-z0-9]{1,31});/i;var zC=[[\"text\",function index_browser_text(s,o){for(var i=s.pos;i<s.posMax&&!isTerminatorChar(s.src.charCodeAt(i));)i++;return i!==s.pos&&(o||(s.pending+=s.src.slice(s.pos,i)),s.pos=i,!0)}],[\"newline\",function newline(s,o){var i,a,u=s.pos;if(10!==s.src.charCodeAt(u))return!1;if(i=s.pending.length-1,a=s.posMax,!o)if(i>=0&&32===s.pending.charCodeAt(i))if(i>=1&&32===s.pending.charCodeAt(i-1)){for(var _=i-2;_>=0;_--)if(32!==s.pending.charCodeAt(_)){s.pending=s.pending.substring(0,_+1);break}s.push({type:\"hardbreak\",level:s.level})}else s.pending=s.pending.slice(0,-1),s.push({type:\"softbreak\",level:s.level});else s.push({type:\"softbreak\",level:s.level});for(u++;u<a&&32===s.src.charCodeAt(u);)u++;return s.pos=u,!0}],[\"escape\",function index_browser_escape(s,o){var i,a=s.pos,u=s.posMax;if(92!==s.src.charCodeAt(a))return!1;if(++a<u){if((i=s.src.charCodeAt(a))<256&&0!==IC[i])return o||(s.pending+=s.src[a]),s.pos+=2,!0;if(10===i){for(o||s.push({type:\"hardbreak\",level:s.level}),a++;a<u&&32===s.src.charCodeAt(a);)a++;return s.pos=a,!0}}return o||(s.pending+=\"\\\\\"),s.pos++,!0}],[\"backticks\",function backticks(s,o){var i,a,u,_,w,x=s.pos;if(96!==s.src.charCodeAt(x))return!1;for(i=x,x++,a=s.posMax;x<a&&96===s.src.charCodeAt(x);)x++;for(u=s.src.slice(i,x),_=w=x;-1!==(_=s.src.indexOf(\"`\",w));){for(w=_+1;w<a&&96===s.src.charCodeAt(w);)w++;if(w-_===u.length)return o||s.push({type:\"code\",content:s.src.slice(x,_).replace(/[ \\n]+/g,\" \").trim(),block:!1,level:s.level}),s.pos=w,!0}return o||(s.pending+=u),s.pos+=u.length,!0}],[\"del\",function del(s,o){var i,a,u,_,w,x=s.posMax,C=s.pos;if(126!==s.src.charCodeAt(C))return!1;if(o)return!1;if(C+4>=x)return!1;if(126!==s.src.charCodeAt(C+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(_=C>0?s.src.charCodeAt(C-1):-1,w=s.src.charCodeAt(C+2),126===_)return!1;if(126===w)return!1;if(32===w||10===w)return!1;for(a=C+2;a<x&&126===s.src.charCodeAt(a);)a++;if(a>C+3)return s.pos+=a-C,o||(s.pending+=s.src.slice(C,a)),!0;for(s.pos=C+2,u=1;s.pos+1<x;){if(126===s.src.charCodeAt(s.pos)&&126===s.src.charCodeAt(s.pos+1)&&(_=s.src.charCodeAt(s.pos-1),126!==(w=s.pos+2<x?s.src.charCodeAt(s.pos+2):-1)&&126!==_&&(32!==_&&10!==_?u--:32!==w&&10!==w&&u++,u<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=C+2,o||(s.push({type:\"del_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"del_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=x,!0):(s.pos=C,!1)}],[\"ins\",function ins(s,o){var i,a,u,_,w,x=s.posMax,C=s.pos;if(43!==s.src.charCodeAt(C))return!1;if(o)return!1;if(C+4>=x)return!1;if(43!==s.src.charCodeAt(C+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(_=C>0?s.src.charCodeAt(C-1):-1,w=s.src.charCodeAt(C+2),43===_)return!1;if(43===w)return!1;if(32===w||10===w)return!1;for(a=C+2;a<x&&43===s.src.charCodeAt(a);)a++;if(a!==C+2)return s.pos+=a-C,o||(s.pending+=s.src.slice(C,a)),!0;for(s.pos=C+2,u=1;s.pos+1<x;){if(43===s.src.charCodeAt(s.pos)&&43===s.src.charCodeAt(s.pos+1)&&(_=s.src.charCodeAt(s.pos-1),43!==(w=s.pos+2<x?s.src.charCodeAt(s.pos+2):-1)&&43!==_&&(32!==_&&10!==_?u--:32!==w&&10!==w&&u++,u<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=C+2,o||(s.push({type:\"ins_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"ins_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=x,!0):(s.pos=C,!1)}],[\"mark\",function mark(s,o){var i,a,u,_,w,x=s.posMax,C=s.pos;if(61!==s.src.charCodeAt(C))return!1;if(o)return!1;if(C+4>=x)return!1;if(61!==s.src.charCodeAt(C+1))return!1;if(s.level>=s.options.maxNesting)return!1;if(_=C>0?s.src.charCodeAt(C-1):-1,w=s.src.charCodeAt(C+2),61===_)return!1;if(61===w)return!1;if(32===w||10===w)return!1;for(a=C+2;a<x&&61===s.src.charCodeAt(a);)a++;if(a!==C+2)return s.pos+=a-C,o||(s.pending+=s.src.slice(C,a)),!0;for(s.pos=C+2,u=1;s.pos+1<x;){if(61===s.src.charCodeAt(s.pos)&&61===s.src.charCodeAt(s.pos+1)&&(_=s.src.charCodeAt(s.pos-1),61!==(w=s.pos+2<x?s.src.charCodeAt(s.pos+2):-1)&&61!==_&&(32!==_&&10!==_?u--:32!==w&&10!==w&&u++,u<=0))){i=!0;break}s.parser.skipToken(s)}return i?(s.posMax=s.pos,s.pos=C+2,o||(s.push({type:\"mark_open\",level:s.level++}),s.parser.tokenize(s),s.push({type:\"mark_close\",level:--s.level})),s.pos=s.posMax+2,s.posMax=x,!0):(s.pos=C,!1)}],[\"emphasis\",function emphasis(s,o){var i,a,u,_,w,x,C,j=s.posMax,L=s.pos,B=s.src.charCodeAt(L);if(95!==B&&42!==B)return!1;if(o)return!1;if(i=(C=scanDelims(s,L)).delims,!C.can_open)return s.pos+=i,o||(s.pending+=s.src.slice(L,s.pos)),!0;if(s.level>=s.options.maxNesting)return!1;for(s.pos=L+i,x=[i];s.pos<j;)if(s.src.charCodeAt(s.pos)!==B)s.parser.skipToken(s);else{if(a=(C=scanDelims(s,s.pos)).delims,C.can_close){for(_=x.pop(),w=a;_!==w;){if(w<_){x.push(_-w);break}if(w-=_,0===x.length)break;s.pos+=_,_=x.pop()}if(0===x.length){i=_,u=!0;break}s.pos+=a;continue}C.can_open&&x.push(a),s.pos+=a}return u?(s.posMax=s.pos,s.pos=L+i,o||(2!==i&&3!==i||s.push({type:\"strong_open\",level:s.level++}),1!==i&&3!==i||s.push({type:\"em_open\",level:s.level++}),s.parser.tokenize(s),1!==i&&3!==i||s.push({type:\"em_close\",level:--s.level}),2!==i&&3!==i||s.push({type:\"strong_close\",level:--s.level})),s.pos=s.posMax+i,s.posMax=j,!0):(s.pos=L,!1)}],[\"sub\",function sub(s,o){var i,a,u=s.posMax,_=s.pos;if(126!==s.src.charCodeAt(_))return!1;if(o)return!1;if(_+2>=u)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=_+1;s.pos<u;){if(126===s.src.charCodeAt(s.pos)){i=!0;break}s.parser.skipToken(s)}return i&&_+1!==s.pos?(a=s.src.slice(_+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=_,!1):(s.posMax=s.pos,s.pos=_+1,o||s.push({type:\"sub\",level:s.level,content:a.replace(NC,\"$1\")}),s.pos=s.posMax+1,s.posMax=u,!0):(s.pos=_,!1)}],[\"sup\",function sup(s,o){var i,a,u=s.posMax,_=s.pos;if(94!==s.src.charCodeAt(_))return!1;if(o)return!1;if(_+2>=u)return!1;if(s.level>=s.options.maxNesting)return!1;for(s.pos=_+1;s.pos<u;){if(94===s.src.charCodeAt(s.pos)){i=!0;break}s.parser.skipToken(s)}return i&&_+1!==s.pos?(a=s.src.slice(_+1,s.pos)).match(/(^|[^\\\\])(\\\\\\\\)*\\s/)?(s.pos=_,!1):(s.posMax=s.pos,s.pos=_+1,o||s.push({type:\"sup\",level:s.level,content:a.replace(MC,\"$1\")}),s.pos=s.posMax+1,s.posMax=u,!0):(s.pos=_,!1)}],[\"links\",function links(s,o){var i,a,u,_,w,x,C,j,L=!1,B=s.pos,$=s.posMax,V=s.pos,U=s.src.charCodeAt(V);if(33===U&&(L=!0,U=s.src.charCodeAt(++V)),91!==U)return!1;if(s.level>=s.options.maxNesting)return!1;if(i=V+1,(a=parseLinkLabel(s,V))<0)return!1;if((x=a+1)<$&&40===s.src.charCodeAt(x)){for(x++;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);if(x>=$)return!1;for(V=x,parseLinkDestination(s,x)?(_=s.linkContent,x=s.pos):_=\"\",V=x;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);if(x<$&&V!==x&&parseLinkTitle(s,x))for(w=s.linkContent,x=s.pos;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);else w=\"\";if(x>=$||41!==s.src.charCodeAt(x))return s.pos=B,!1;x++}else{if(s.linkLevel>0)return!1;for(;x<$&&(32===(j=s.src.charCodeAt(x))||10===j);x++);if(x<$&&91===s.src.charCodeAt(x)&&(V=x+1,(x=parseLinkLabel(s,x))>=0?u=s.src.slice(V,x++):x=V-1),u||(void 0===u&&(x=a+1),u=s.src.slice(i,a)),!(C=s.env.references[normalizeReference(u)]))return s.pos=B,!1;_=C.href,w=C.title}return o||(s.pos=i,s.posMax=a,L?s.push({type:\"image\",src:_,title:w,alt:s.src.substr(i,a-i),level:s.level}):(s.push({type:\"link_open\",href:_,title:w,level:s.level++}),s.linkLevel++,s.parser.tokenize(s),s.linkLevel--,s.push({type:\"link_close\",level:--s.level}))),s.pos=x,s.posMax=$,!0}],[\"footnote_inline\",function footnote_inline(s,o){var i,a,u,_,w=s.posMax,x=s.pos;return!(x+2>=w)&&(94===s.src.charCodeAt(x)&&(91===s.src.charCodeAt(x+1)&&(!(s.level>=s.options.maxNesting)&&(i=x+2,!((a=parseLinkLabel(s,x+1))<0)&&(o||(s.env.footnotes||(s.env.footnotes={}),s.env.footnotes.list||(s.env.footnotes.list=[]),u=s.env.footnotes.list.length,s.pos=i,s.posMax=a,s.push({type:\"footnote_ref\",id:u,level:s.level}),s.linkLevel++,_=s.tokens.length,s.parser.tokenize(s),s.env.footnotes.list[u]={tokens:s.tokens.splice(_)},s.linkLevel--),s.pos=a+1,s.posMax=w,!0)))))}],[\"footnote_ref\",function footnote_ref(s,o){var i,a,u,_,w=s.posMax,x=s.pos;if(x+3>w)return!1;if(!s.env.footnotes||!s.env.footnotes.refs)return!1;if(91!==s.src.charCodeAt(x))return!1;if(94!==s.src.charCodeAt(x+1))return!1;if(s.level>=s.options.maxNesting)return!1;for(a=x+2;a<w;a++){if(32===s.src.charCodeAt(a))return!1;if(10===s.src.charCodeAt(a))return!1;if(93===s.src.charCodeAt(a))break}return a!==x+2&&(!(a>=w)&&(a++,i=s.src.slice(x+2,a-1),void 0!==s.env.footnotes.refs[\":\"+i]&&(o||(s.env.footnotes.list||(s.env.footnotes.list=[]),s.env.footnotes.refs[\":\"+i]<0?(u=s.env.footnotes.list.length,s.env.footnotes.list[u]={label:i,count:0},s.env.footnotes.refs[\":\"+i]=u):u=s.env.footnotes.refs[\":\"+i],_=s.env.footnotes.list[u].count,s.env.footnotes.list[u].count++,s.push({type:\"footnote_ref\",id:u,subId:_,level:s.level})),s.pos=a,s.posMax=w,!0)))}],[\"autolink\",function autolink(s,o){var i,a,u,_,w,x=s.pos;return 60===s.src.charCodeAt(x)&&(!((i=s.src.slice(x)).indexOf(\">\")<0)&&((a=i.match(LC))?!(RC.indexOf(a[1].toLowerCase())<0)&&(w=normalizeLink(_=a[0].slice(1,-1)),!!s.parser.validateLink(_)&&(o||(s.push({type:\"link_open\",href:w,level:s.level}),s.push({type:\"text\",content:_,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=a[0].length,!0)):!!(u=i.match(DC))&&(w=normalizeLink(\"mailto:\"+(_=u[0].slice(1,-1))),!!s.parser.validateLink(w)&&(o||(s.push({type:\"link_open\",href:w,level:s.level}),s.push({type:\"text\",content:_,level:s.level+1}),s.push({type:\"link_close\",level:s.level})),s.pos+=u[0].length,!0))))}],[\"htmltag\",function htmltag(s,o){var i,a,u,_=s.pos;return!!s.options.html&&(u=s.posMax,!(60!==s.src.charCodeAt(_)||_+2>=u)&&(!(33!==(i=s.src.charCodeAt(_+1))&&63!==i&&47!==i&&!function isLetter$2(s){var o=32|s;return o>=97&&o<=122}(i))&&(!!(a=s.src.slice(_).match(qC))&&(o||s.push({type:\"htmltag\",content:s.src.slice(_,_+a[0].length),level:s.level}),s.pos+=a[0].length,!0))))}],[\"entity\",function entity(s,o){var i,a,u=s.pos,_=s.posMax;if(38!==s.src.charCodeAt(u))return!1;if(u+1<_)if(35===s.src.charCodeAt(u+1)){if(a=s.src.slice(u).match(VC))return o||(i=\"x\"===a[1][0].toLowerCase()?parseInt(a[1].slice(1),16):parseInt(a[1],10),s.pending+=isValidEntityCode(i)?fromCodePoint(i):fromCodePoint(65533)),s.pos+=a[0].length,!0}else if(a=s.src.slice(u).match(UC)){var w=decodeEntity(a[1]);if(a[1]!==w)return o||(s.pending+=w),s.pos+=a[0].length,!0}return o||(s.pending+=\"&\"),s.pos++,!0}]];function ParserInline(){this.ruler=new Ruler;for(var s=0;s<zC.length;s++)this.ruler.push(zC[s][0],zC[s][1]);this.validateLink=validateLink}function validateLink(s){var o=s.trim().toLowerCase();return-1===(o=replaceEntities(o)).indexOf(\":\")||-1===[\"vbscript\",\"javascript\",\"file\",\"data\"].indexOf(o.split(\":\")[0])}ParserInline.prototype.skipToken=function(s){var o,i,a=this.ruler.getRules(\"\"),u=a.length,_=s.pos;if((i=s.cacheGet(_))>0)s.pos=i;else{for(o=0;o<u;o++)if(a[o](s,!0))return void s.cacheSet(_,s.pos);s.pos++,s.cacheSet(_,s.pos)}},ParserInline.prototype.tokenize=function(s){for(var o,i,a=this.ruler.getRules(\"\"),u=a.length,_=s.posMax;s.pos<_;){for(i=0;i<u&&!(o=a[i](s,!1));i++);if(o){if(s.pos>=_)break}else s.pending+=s.src[s.pos++]}s.pending&&s.pushPending()},ParserInline.prototype.parse=function(s,o,i,a){var u=new StateInline(s,this,o,i,a);this.tokenize(u)};var WC={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"replacements\",\"smartquotes\",\"references\",\"abbr2\",\"footnote_tail\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"footnote\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\",\"table\"]},inline:{rules:[\"autolink\",\"backticks\",\"del\",\"emphasis\",\"entity\",\"escape\",\"footnote_ref\",\"htmltag\",\"links\",\"newline\",\"text\"]}}},full:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:\"language-\",linkTarget:\"\",typographer:!1,quotes:\"“”‘’\",highlight:null,maxNesting:20},components:{core:{rules:[\"block\",\"inline\",\"references\",\"abbr2\"]},block:{rules:[\"blockquote\",\"code\",\"fences\",\"heading\",\"hr\",\"htmlblock\",\"lheading\",\"list\",\"paragraph\"]},inline:{rules:[\"autolink\",\"backticks\",\"emphasis\",\"entity\",\"escape\",\"htmltag\",\"links\",\"newline\",\"text\"]}}}};function StateCore(s,o,i){this.src=o,this.env=i,this.options=s.options,this.tokens=[],this.inlineMode=!1,this.inline=s.inline,this.block=s.block,this.renderer=s.renderer,this.typographer=s.typographer}function Remarkable(s,o){\"string\"!=typeof s&&(o=s,s=\"default\"),o&&null!=o.linkify&&console.warn(\"linkify option is removed. Use linkify plugin instead:\\n\\nimport Remarkable from 'remarkable';\\nimport linkify from 'remarkable/linkify';\\nnew Remarkable().use(linkify)\\n\"),this.inline=new ParserInline,this.block=new ParserBlock,this.core=new Core,this.renderer=new Renderer,this.ruler=new Ruler,this.options={},this.configure(WC[s]),this.set(o||{})}Remarkable.prototype.set=function(s){index_browser_assign(this.options,s)},Remarkable.prototype.configure=function(s){var o=this;if(!s)throw new Error(\"Wrong `remarkable` preset, check name/content\");s.options&&o.set(s.options),s.components&&Object.keys(s.components).forEach((function(i){s.components[i].rules&&o[i].ruler.enable(s.components[i].rules,!0)}))},Remarkable.prototype.use=function(s,o){return s(this,o),this},Remarkable.prototype.parse=function(s,o){var i=new StateCore(this,s,o);return this.core.process(i),i.tokens},Remarkable.prototype.render=function(s,o){return o=o||{},this.renderer.render(this.parse(s,o),this.options,o)},Remarkable.prototype.parseInline=function(s,o){var i=new StateCore(this,s,o);return i.inlineMode=!0,this.core.process(i),i.tokens},Remarkable.prototype.renderInline=function(s,o){return o=o||{},this.renderer.render(this.parseInline(s,o),this.options,o)};function indexOf(s,o){if(Array.prototype.indexOf)return s.indexOf(o);for(var i=0,a=s.length;i<a;i++)if(s[i]===o)return i;return-1}function utils_remove(s,o){for(var i=s.length-1;i>=0;i--)!0===o(s[i])&&s.splice(i,1)}function throwUnhandledCaseError(s){throw new Error(\"Unhandled case for value: '\".concat(s,\"'\"))}var JC=function(){function HtmlTag(s){void 0===s&&(s={}),this.tagName=\"\",this.attrs={},this.innerHTML=\"\",this.whitespaceRegex=/\\s+/,this.tagName=s.tagName||\"\",this.attrs=s.attrs||{},this.innerHTML=s.innerHtml||s.innerHTML||\"\"}return HtmlTag.prototype.setTagName=function(s){return this.tagName=s,this},HtmlTag.prototype.getTagName=function(){return this.tagName||\"\"},HtmlTag.prototype.setAttr=function(s,o){return this.getAttrs()[s]=o,this},HtmlTag.prototype.getAttr=function(s){return this.getAttrs()[s]},HtmlTag.prototype.setAttrs=function(s){return Object.assign(this.getAttrs(),s),this},HtmlTag.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},HtmlTag.prototype.setClass=function(s){return this.setAttr(\"class\",s)},HtmlTag.prototype.addClass=function(s){for(var o,i=this.getClass(),a=this.whitespaceRegex,u=i?i.split(a):[],_=s.split(a);o=_.shift();)-1===indexOf(u,o)&&u.push(o);return this.getAttrs().class=u.join(\" \"),this},HtmlTag.prototype.removeClass=function(s){for(var o,i=this.getClass(),a=this.whitespaceRegex,u=i?i.split(a):[],_=s.split(a);u.length&&(o=_.shift());){var w=indexOf(u,o);-1!==w&&u.splice(w,1)}return this.getAttrs().class=u.join(\" \"),this},HtmlTag.prototype.getClass=function(){return this.getAttrs().class||\"\"},HtmlTag.prototype.hasClass=function(s){return-1!==(\" \"+this.getClass()+\" \").indexOf(\" \"+s+\" \")},HtmlTag.prototype.setInnerHTML=function(s){return this.innerHTML=s,this},HtmlTag.prototype.setInnerHtml=function(s){return this.setInnerHTML(s)},HtmlTag.prototype.getInnerHTML=function(){return this.innerHTML||\"\"},HtmlTag.prototype.getInnerHtml=function(){return this.getInnerHTML()},HtmlTag.prototype.toAnchorString=function(){var s=this.getTagName(),o=this.buildAttrsStr();return[\"<\",s,o=o?\" \"+o:\"\",\">\",this.getInnerHtml(),\"</\",s,\">\"].join(\"\")},HtmlTag.prototype.buildAttrsStr=function(){if(!this.attrs)return\"\";var s=this.getAttrs(),o=[];for(var i in s)s.hasOwnProperty(i)&&o.push(i+'=\"'+s[i]+'\"');return o.join(\" \")},HtmlTag}();var HC=function(){function AnchorTagBuilder(s){void 0===s&&(s={}),this.newWindow=!1,this.truncate={},this.className=\"\",this.newWindow=s.newWindow||!1,this.truncate=s.truncate||{},this.className=s.className||\"\"}return AnchorTagBuilder.prototype.build=function(s){return new JC({tagName:\"a\",attrs:this.createAttrs(s),innerHtml:this.processAnchorText(s.getAnchorText())})},AnchorTagBuilder.prototype.createAttrs=function(s){var o={href:s.getAnchorHref()},i=this.createCssClass(s);return i&&(o.class=i),this.newWindow&&(o.target=\"_blank\",o.rel=\"noopener noreferrer\"),this.truncate&&this.truncate.length&&this.truncate.length<s.getAnchorText().length&&(o.title=s.getAnchorHref()),o},AnchorTagBuilder.prototype.createCssClass=function(s){var o=this.className;if(o){for(var i=[o],a=s.getCssClassSuffixes(),u=0,_=a.length;u<_;u++)i.push(o+\"-\"+a[u]);return i.join(\" \")}return\"\"},AnchorTagBuilder.prototype.processAnchorText=function(s){return s=this.doTruncate(s)},AnchorTagBuilder.prototype.doTruncate=function(s){var o=this.truncate;if(!o||!o.length)return s;var i=o.length,a=o.location;return\"smart\"===a?function truncateSmart(s,o,i){var a,u;null==i?(i=\"&hellip;\",u=3,a=8):(u=i.length,a=i.length);var buildUrl=function(s){var o=\"\";return s.scheme&&s.host&&(o+=s.scheme+\"://\"),s.host&&(o+=s.host),s.path&&(o+=\"/\"+s.path),s.query&&(o+=\"?\"+s.query),s.fragment&&(o+=\"#\"+s.fragment),o},buildSegment=function(s,o){var a=o/2,u=Math.ceil(a),_=-1*Math.floor(a),w=\"\";return _<0&&(w=s.substr(_)),s.substr(0,u)+i+w};if(s.length<=o)return s;var _=o-u,w=function(s){var o={},i=s,a=i.match(/^([a-z]+):\\/\\//i);return a&&(o.scheme=a[1],i=i.substr(a[0].length)),(a=i.match(/^(.*?)(?=(\\?|#|\\/|$))/i))&&(o.host=a[1],i=i.substr(a[0].length)),(a=i.match(/^\\/(.*?)(?=(\\?|#|$))/i))&&(o.path=a[1],i=i.substr(a[0].length)),(a=i.match(/^\\?(.*?)(?=(#|$))/i))&&(o.query=a[1],i=i.substr(a[0].length)),(a=i.match(/^#(.*?)$/i))&&(o.fragment=a[1]),o}(s);if(w.query){var x=w.query.match(/^(.*?)(?=(\\?|\\#))(.*?)$/i);x&&(w.query=w.query.substr(0,x[1].length),s=buildUrl(w))}if(s.length<=o)return s;if(w.host&&(w.host=w.host.replace(/^www\\./,\"\"),s=buildUrl(w)),s.length<=o)return s;var C=\"\";if(w.host&&(C+=w.host),C.length>=_)return w.host.length==o?(w.host.substr(0,o-u)+i).substr(0,_+a):buildSegment(C,_).substr(0,_+a);var j=\"\";if(w.path&&(j+=\"/\"+w.path),w.query&&(j+=\"?\"+w.query),j){if((C+j).length>=_)return(C+j).length==o?(C+j).substr(0,o):(C+buildSegment(j,_-C.length)).substr(0,_+a);C+=j}if(w.fragment){var L=\"#\"+w.fragment;if((C+L).length>=_)return(C+L).length==o?(C+L).substr(0,o):(C+buildSegment(L,_-C.length)).substr(0,_+a);C+=L}if(w.scheme&&w.host){var B=w.scheme+\"://\";if((C+B).length<_)return(B+C).substr(0,o)}if(C.length<=o)return C;var $=\"\";return _>0&&($=C.substr(-1*Math.floor(_/2))),(C.substr(0,Math.ceil(_/2))+i+$).substr(0,_+a)}(s,i):\"middle\"===a?function truncateMiddle(s,o,i){if(s.length<=o)return s;var a,u;null==i?(i=\"&hellip;\",a=8,u=3):(a=i.length,u=i.length);var _=o-u,w=\"\";return _>0&&(w=s.substr(-1*Math.floor(_/2))),(s.substr(0,Math.ceil(_/2))+i+w).substr(0,_+a)}(s,i):function truncateEnd(s,o,i){return function ellipsis(s,o,i){var a;return s.length>o&&(null==i?(i=\"&hellip;\",a=3):a=i.length,s=s.substring(0,o-a)+i),s}(s,o,i)}(s,i)},AnchorTagBuilder}(),KC=function(){function Match(s){this.__jsduckDummyDocProp=null,this.matchedText=\"\",this.offset=0,this.tagBuilder=s.tagBuilder,this.matchedText=s.matchedText,this.offset=s.offset}return Match.prototype.getMatchedText=function(){return this.matchedText},Match.prototype.setOffset=function(s){this.offset=s},Match.prototype.getOffset=function(){return this.offset},Match.prototype.getCssClassSuffixes=function(){return[this.getType()]},Match.prototype.buildTag=function(){return this.tagBuilder.build(this)},Match}(),extendStatics=function(s,o){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,o){s.__proto__=o}||function(s,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(s[i]=o[i])},extendStatics(s,o)};function tslib_es6_extends(s,o){if(\"function\"!=typeof o&&null!==o)throw new TypeError(\"Class extends value \"+String(o)+\" is not a constructor or null\");function __(){this.constructor=s}extendStatics(s,o),s.prototype=null===o?Object.create(o):(__.prototype=o.prototype,new __)}var __assign=function(){return __assign=Object.assign||function __assign(s){for(var o,i=1,a=arguments.length;i<a;i++)for(var u in o=arguments[i])Object.prototype.hasOwnProperty.call(o,u)&&(s[u]=o[u]);return s},__assign.apply(this,arguments)};Object.create;Object.create;\"function\"==typeof SuppressedError&&SuppressedError;var GC,YC=function(s){function EmailMatch(o){var i=s.call(this,o)||this;return i.email=\"\",i.email=o.email,i}return tslib_es6_extends(EmailMatch,s),EmailMatch.prototype.getType=function(){return\"email\"},EmailMatch.prototype.getEmail=function(){return this.email},EmailMatch.prototype.getAnchorHref=function(){return\"mailto:\"+this.email},EmailMatch.prototype.getAnchorText=function(){return this.email},EmailMatch}(KC),XC=function(s){function HashtagMatch(o){var i=s.call(this,o)||this;return i.serviceName=\"\",i.hashtag=\"\",i.serviceName=o.serviceName,i.hashtag=o.hashtag,i}return tslib_es6_extends(HashtagMatch,s),HashtagMatch.prototype.getType=function(){return\"hashtag\"},HashtagMatch.prototype.getServiceName=function(){return this.serviceName},HashtagMatch.prototype.getHashtag=function(){return this.hashtag},HashtagMatch.prototype.getAnchorHref=function(){var s=this.serviceName,o=this.hashtag;switch(s){case\"twitter\":return\"https://twitter.com/hashtag/\"+o;case\"facebook\":return\"https://www.facebook.com/hashtag/\"+o;case\"instagram\":return\"https://instagram.com/explore/tags/\"+o;case\"tiktok\":return\"https://www.tiktok.com/tag/\"+o;default:throw new Error(\"Unknown service name to point hashtag to: \"+s)}},HashtagMatch.prototype.getAnchorText=function(){return\"#\"+this.hashtag},HashtagMatch}(KC),QC=function(s){function MentionMatch(o){var i=s.call(this,o)||this;return i.serviceName=\"twitter\",i.mention=\"\",i.mention=o.mention,i.serviceName=o.serviceName,i}return tslib_es6_extends(MentionMatch,s),MentionMatch.prototype.getType=function(){return\"mention\"},MentionMatch.prototype.getMention=function(){return this.mention},MentionMatch.prototype.getServiceName=function(){return this.serviceName},MentionMatch.prototype.getAnchorHref=function(){switch(this.serviceName){case\"twitter\":return\"https://twitter.com/\"+this.mention;case\"instagram\":return\"https://instagram.com/\"+this.mention;case\"soundcloud\":return\"https://soundcloud.com/\"+this.mention;case\"tiktok\":return\"https://www.tiktok.com/@\"+this.mention;default:throw new Error(\"Unknown service name to point mention to: \"+this.serviceName)}},MentionMatch.prototype.getAnchorText=function(){return\"@\"+this.mention},MentionMatch.prototype.getCssClassSuffixes=function(){var o=s.prototype.getCssClassSuffixes.call(this),i=this.getServiceName();return i&&o.push(i),o},MentionMatch}(KC),ZC=function(s){function PhoneMatch(o){var i=s.call(this,o)||this;return i.number=\"\",i.plusSign=!1,i.number=o.number,i.plusSign=o.plusSign,i}return tslib_es6_extends(PhoneMatch,s),PhoneMatch.prototype.getType=function(){return\"phone\"},PhoneMatch.prototype.getPhoneNumber=function(){return this.number},PhoneMatch.prototype.getNumber=function(){return this.getPhoneNumber()},PhoneMatch.prototype.getAnchorHref=function(){return\"tel:\"+(this.plusSign?\"+\":\"\")+this.number},PhoneMatch.prototype.getAnchorText=function(){return this.matchedText},PhoneMatch}(KC),eA=function(s){function UrlMatch(o){var i=s.call(this,o)||this;return i.url=\"\",i.urlMatchType=\"scheme\",i.protocolUrlMatch=!1,i.protocolRelativeMatch=!1,i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.schemePrefixRegex=/^(https?:\\/\\/)?/i,i.wwwPrefixRegex=/^(https?:\\/\\/)?(www\\.)?/i,i.protocolRelativeRegex=/^\\/\\//,i.protocolPrepended=!1,i.urlMatchType=o.urlMatchType,i.url=o.url,i.protocolUrlMatch=o.protocolUrlMatch,i.protocolRelativeMatch=o.protocolRelativeMatch,i.stripPrefix=o.stripPrefix,i.stripTrailingSlash=o.stripTrailingSlash,i.decodePercentEncoding=o.decodePercentEncoding,i}return tslib_es6_extends(UrlMatch,s),UrlMatch.prototype.getType=function(){return\"url\"},UrlMatch.prototype.getUrlMatchType=function(){return this.urlMatchType},UrlMatch.prototype.getUrl=function(){var s=this.url;return this.protocolRelativeMatch||this.protocolUrlMatch||this.protocolPrepended||(s=this.url=\"http://\"+s,this.protocolPrepended=!0),s},UrlMatch.prototype.getAnchorHref=function(){return this.getUrl().replace(/&amp;/g,\"&\")},UrlMatch.prototype.getAnchorText=function(){var s=this.getMatchedText();return this.protocolRelativeMatch&&(s=this.stripProtocolRelativePrefix(s)),this.stripPrefix.scheme&&(s=this.stripSchemePrefix(s)),this.stripPrefix.www&&(s=this.stripWwwPrefix(s)),this.stripTrailingSlash&&(s=this.removeTrailingSlash(s)),this.decodePercentEncoding&&(s=this.removePercentEncoding(s)),s},UrlMatch.prototype.stripSchemePrefix=function(s){return s.replace(this.schemePrefixRegex,\"\")},UrlMatch.prototype.stripWwwPrefix=function(s){return s.replace(this.wwwPrefixRegex,\"$1\")},UrlMatch.prototype.stripProtocolRelativePrefix=function(s){return s.replace(this.protocolRelativeRegex,\"\")},UrlMatch.prototype.removeTrailingSlash=function(s){return\"/\"===s.charAt(s.length-1)&&(s=s.slice(0,-1)),s},UrlMatch.prototype.removePercentEncoding=function(s){var o=s.replace(/%22/gi,\"&quot;\").replace(/%26/gi,\"&amp;\").replace(/%27/gi,\"&#39;\").replace(/%3C/gi,\"&lt;\").replace(/%3E/gi,\"&gt;\");try{return decodeURIComponent(o)}catch(s){return o}},UrlMatch}(KC),tA=function tA(s){this.__jsduckDummyDocProp=null,this.tagBuilder=s.tagBuilder},rA=/[A-Za-z]/,nA=/[\\d]/,sA=/[\\D]/,oA=/\\s/,iA=/['\"]/,aA=/[\\x00-\\x1F\\x7F]/,cA=/A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B4\\u08B6-\\u08BD\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0AF9\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58-\\u0C5A\\u0C60\\u0C61\\u0C80\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D54-\\u0D56\\u0D5F-\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16F1-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1C80-\\u1C88\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FD5\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA7AE\\uA7B0-\\uA7B7\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA8FD\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB65\\uAB70-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC/.source,lA=cA+/\\u2700-\\u27bf\\udde6-\\uddff\\ud800-\\udbff\\udc00-\\udfff\\ufe0e\\ufe0f\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ud83c\\udffb-\\udfff\\u200d\\u3299\\u3297\\u303d\\u3030\\u24c2\\ud83c\\udd70-\\udd71\\udd7e-\\udd7f\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01-\\ude02\\ude1a\\ude2f\\ude32-\\ude3a\\ude50-\\ude51\\u203c\\u2049\\u25aa-\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u00a9\\u00ae\\u2122\\u2139\\udc04\\u2600-\\u26FF\\u2b05\\u2b06\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u231a\\u231b\\u2328\\u23cf\\u23e9-\\u23f3\\u23f8-\\u23fa\\udccf\\u2935\\u2934\\u2190-\\u21ff/.source+/\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08D4-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFB-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F/.source,uA=/0-9\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0DE6-\\u0DEF\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uA9F0-\\uA9F9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19/.source,pA=lA+uA,hA=lA+uA,dA=new RegExp(\"[\".concat(hA,\"]\")),fA=\"(?:[\"+uA+\"]{1,3}\\\\.){3}[\"+uA+\"]{1,3}\",mA=\"[\"+hA+\"](?:[\"+hA+\"\\\\-_]{0,61}[\"+hA+\"])?\",getDomainLabelStr=function(s){return\"(?=(\"+mA+\"))\\\\\"+s},getDomainNameStr=function(s){return\"(?:\"+getDomainLabelStr(s)+\"(?:\\\\.\"+getDomainLabelStr(s+1)+\"){0,126}|\"+fA+\")\"},gA=(new RegExp(\"[\"+hA+\".\\\\-]*[\"+hA+\"\\\\-]\"),dA),yA=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|католик|اتصالات|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|诺基亚|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)/,vA=new RegExp(\"[\".concat(hA,\"!#$%&'*+/=?^_`{|}~-]\")),bA=new RegExp(\"^\".concat(yA.source,\"$\")),_A=function(s){function EmailMatcher(){var o=null!==s&&s.apply(this,arguments)||this;return o.localPartCharRegex=vA,o.strictTldRegex=bA,o}return tslib_es6_extends(EmailMatcher,s),EmailMatcher.prototype.parseMatches=function(s){for(var o=this.tagBuilder,i=this.localPartCharRegex,a=this.strictTldRegex,u=[],_=s.length,w=new SA,x={m:\"a\",a:\"i\",i:\"l\",l:\"t\",t:\"o\",o:\":\"},C=0,j=0,L=w;C<_;){var B=s.charAt(C);switch(j){case 0:stateNonEmailAddress(B);break;case 1:stateMailTo(s.charAt(C-1),B);break;case 2:stateLocalPart(B);break;case 3:stateLocalPartDot(B);break;case 4:stateAtSign(B);break;case 5:stateDomainChar(B);break;case 6:stateDomainHyphen(B);break;case 7:stateDomainDot(B);break;default:throwUnhandledCaseError(j)}C++}return captureMatchIfValidAndReset(),u;function stateNonEmailAddress(s){\"m\"===s?beginEmailMatch(1):i.test(s)&&beginEmailMatch()}function stateMailTo(s,o){\":\"===s?i.test(o)?(j=2,L=new SA(__assign(__assign({},L),{hasMailtoPrefix:!0}))):resetToNonEmailMatchState():x[s]===o||(i.test(o)?j=2:\".\"===o?j=3:\"@\"===o?j=4:resetToNonEmailMatchState())}function stateLocalPart(s){\".\"===s?j=3:\"@\"===s?j=4:i.test(s)||resetToNonEmailMatchState()}function stateLocalPartDot(s){\".\"===s||\"@\"===s?resetToNonEmailMatchState():i.test(s)?j=2:resetToNonEmailMatchState()}function stateAtSign(s){gA.test(s)?j=5:resetToNonEmailMatchState()}function stateDomainChar(s){\".\"===s?j=7:\"-\"===s?j=6:gA.test(s)||captureMatchIfValidAndReset()}function stateDomainHyphen(s){\"-\"===s||\".\"===s?captureMatchIfValidAndReset():gA.test(s)?j=5:captureMatchIfValidAndReset()}function stateDomainDot(s){\".\"===s||\"-\"===s?captureMatchIfValidAndReset():gA.test(s)?(j=5,L=new SA(__assign(__assign({},L),{hasDomainDot:!0}))):captureMatchIfValidAndReset()}function beginEmailMatch(s){void 0===s&&(s=2),j=s,L=new SA({idx:C})}function resetToNonEmailMatchState(){j=0,L=w}function captureMatchIfValidAndReset(){if(L.hasDomainDot){var i=s.slice(L.idx,C);/[-.]$/.test(i)&&(i=i.slice(0,-1));var _=L.hasMailtoPrefix?i.slice(7):i;(function doesEmailHaveValidTld(s){var o=s.split(\".\").pop()||\"\",i=o.toLowerCase();return a.test(i)})(_)&&u.push(new YC({tagBuilder:o,matchedText:i,offset:L.idx,email:_}))}resetToNonEmailMatchState()}},EmailMatcher}(tA),SA=function SA(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.hasMailtoPrefix=!!s.hasMailtoPrefix,this.hasDomainDot=!!s.hasDomainDot},EA=function(){function UrlMatchValidator(){}return UrlMatchValidator.isValid=function(s,o){return!(o&&!this.isValidUriScheme(o)||this.urlMatchDoesNotHaveProtocolOrDot(s,o)||this.urlMatchDoesNotHaveAtLeastOneWordChar(s,o)&&!this.isValidIpAddress(s)||this.containsMultipleDots(s))},UrlMatchValidator.isValidIpAddress=function(s){var o=new RegExp(this.hasFullProtocolRegex.source+this.ipRegex.source);return null!==s.match(o)},UrlMatchValidator.containsMultipleDots=function(s){var o=s;return this.hasFullProtocolRegex.test(s)&&(o=s.split(\"://\")[1]),o.split(\"/\")[0].indexOf(\"..\")>-1},UrlMatchValidator.isValidUriScheme=function(s){var o=s.match(this.uriSchemeRegex),i=o&&o[0].toLowerCase();return\"javascript:\"!==i&&\"vbscript:\"!==i},UrlMatchValidator.urlMatchDoesNotHaveProtocolOrDot=function(s,o){return!(!s||o&&this.hasFullProtocolRegex.test(o)||-1!==s.indexOf(\".\"))},UrlMatchValidator.urlMatchDoesNotHaveAtLeastOneWordChar=function(s,o){return!(!s||!o)&&(!this.hasFullProtocolRegex.test(o)&&!this.hasWordCharAfterProtocolRegex.test(s))},UrlMatchValidator.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\\/\\//,UrlMatchValidator.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,UrlMatchValidator.hasWordCharAfterProtocolRegex=new RegExp(\":[^\\\\s]*?[\"+cA+\"]\"),UrlMatchValidator.ipRegex=/[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?\\.[0-9][0-9]?[0-9]?(:[0-9]*)?\\/?$/,UrlMatchValidator}(),wA=(GC=new RegExp(\"[/?#](?:[\"+hA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}?!:,.;^✓]*[\"+hA+\"\\\\-+&@#/%=~_()|'$*\\\\[\\\\]{}✓])?\"),new RegExp([\"(?:\",\"(\",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\\/\\/)(?!\\d+\\/?)(?:\\/\\/)?)/.source,getDomainNameStr(2),\")\",\"|\",\"(\",\"(//)?\",/(?:www\\.)/.source,getDomainNameStr(6),\")\",\"|\",\"(\",\"(//)?\",getDomainNameStr(10)+\"\\\\.\",yA.source,\"(?![-\"+pA+\"])\",\")\",\")\",\"(?::[0-9]+)?\",\"(?:\"+GC.source+\")?\"].join(\"\"),\"gi\")),xA=new RegExp(\"[\"+hA+\"]\"),kA=function(s){function UrlMatcher(o){var i=s.call(this,o)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=wA,i.wordCharRegExp=xA,i.stripPrefix=o.stripPrefix,i.stripTrailingSlash=o.stripTrailingSlash,i.decodePercentEncoding=o.decodePercentEncoding,i}return tslib_es6_extends(UrlMatcher,s),UrlMatcher.prototype.parseMatches=function(s){for(var o,i=this.matcherRegex,a=this.stripPrefix,u=this.stripTrailingSlash,_=this.decodePercentEncoding,w=this.tagBuilder,x=[],_loop_1=function(){var i=o[0],j=o[1],L=o[4],B=o[5],$=o[9],V=o.index,U=B||$,z=s.charAt(V-1);if(!EA.isValid(i,j))return\"continue\";if(V>0&&\"@\"===z)return\"continue\";if(V>0&&U&&C.wordCharRegExp.test(z))return\"continue\";if(/\\?$/.test(i)&&(i=i.substr(0,i.length-1)),C.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var Y=C.matchHasInvalidCharAfterTld(i,j);Y>-1&&(i=i.substr(0,Y))}var Z=[\"http://\",\"https://\"].find((function(s){return!!j&&-1!==j.indexOf(s)}));if(Z){var ee=i.indexOf(Z);i=i.substr(ee),j=j.substr(ee),V+=ee}var ie=j?\"scheme\":L?\"www\":\"tld\",ae=!!j;x.push(new eA({tagBuilder:w,matchedText:i,offset:V,urlMatchType:ie,url:i,protocolUrlMatch:ae,protocolRelativeMatch:!!U,stripPrefix:a,stripTrailingSlash:u,decodePercentEncoding:_}))},C=this;null!==(o=i.exec(s));)_loop_1();return x},UrlMatcher.prototype.matchHasUnbalancedClosingParen=function(s){var o,i=s.charAt(s.length-1);if(\")\"===i)o=\"(\";else if(\"]\"===i)o=\"[\";else{if(\"}\"!==i)return!1;o=\"{\"}for(var a=0,u=0,_=s.length-1;u<_;u++){var w=s.charAt(u);w===o?a++:w===i&&(a=Math.max(a-1,0))}return 0===a},UrlMatcher.prototype.matchHasInvalidCharAfterTld=function(s,o){if(!s)return-1;var i=0;o&&(i=s.indexOf(\":\"),s=s.slice(i));var a=new RegExp(\"^((.?//)?[-.\"+hA+\"]*[-\"+hA+\"]\\\\.[-\"+hA+\"]+)\").exec(s);return null===a?-1:(i+=a[1].length,s=s.slice(a[1].length),/^[^-.A-Za-z0-9:\\/?#]/.test(s)?i:-1)},UrlMatcher}(tA),OA=new RegExp(\"[_\".concat(hA,\"]\")),CA=function(s){function HashtagMatcher(o){var i=s.call(this,o)||this;return i.serviceName=\"twitter\",i.serviceName=o.serviceName,i}return tslib_es6_extends(HashtagMatcher,s),HashtagMatcher.prototype.parseMatches=function(s){for(var o=this.tagBuilder,i=this.serviceName,a=[],u=s.length,_=0,w=-1,x=0;_<u;){var C=s.charAt(_);switch(x){case 0:stateNone(C);break;case 1:stateNonHashtagWordChar(C);break;case 2:stateHashtagHashChar(C);break;case 3:stateHashtagTextChar(C);break;default:throwUnhandledCaseError(x)}_++}return captureMatchIfValid(),a;function stateNone(s){\"#\"===s?(x=2,w=_):dA.test(s)&&(x=1)}function stateNonHashtagWordChar(s){dA.test(s)||(x=0)}function stateHashtagHashChar(s){x=OA.test(s)?3:dA.test(s)?1:0}function stateHashtagTextChar(s){OA.test(s)||(captureMatchIfValid(),w=-1,x=dA.test(s)?1:0)}function captureMatchIfValid(){if(w>-1&&_-w<=140){var u=s.slice(w,_),x=new XC({tagBuilder:o,matchedText:u,offset:w,serviceName:i,hashtag:u.slice(1)});a.push(x)}}},HashtagMatcher}(tA),AA=[\"twitter\",\"facebook\",\"instagram\",\"tiktok\"],jA=new RegExp(\"\".concat(/(?:(?:(?:(\\+)?\\d{1,3}[-\\040.]?)?\\(?\\d{3}\\)?[-\\040.]?\\d{3}[-\\040.]?\\d{4})|(?:(\\+)(?:9[976]\\d|8[987530]\\d|6[987]\\d|5[90]\\d|42\\d|3[875]\\d|2[98654321]\\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\\040.]?(?:\\d[-\\040.]?){6,12}\\d+))([,;]+[0-9]+#?)*/.source,\"|\").concat(/(0([1-9]{1}-?[1-9]\\d{3}|[1-9]{2}-?\\d{3}|[1-9]{2}\\d{1}-?\\d{2}|[1-9]{2}\\d{2}-?\\d{1})-?\\d{4}|0[789]0-?\\d{4}-?\\d{4}|050-?\\d{4}-?\\d{4})/.source),\"g\"),PA=function(s){function PhoneMatcher(){var o=null!==s&&s.apply(this,arguments)||this;return o.matcherRegex=jA,o}return tslib_es6_extends(PhoneMatcher,s),PhoneMatcher.prototype.parseMatches=function(s){for(var o,i=this.matcherRegex,a=this.tagBuilder,u=[];null!==(o=i.exec(s));){var _=o[0],w=_.replace(/[^0-9,;#]/g,\"\"),x=!(!o[1]&&!o[2]),C=0==o.index?\"\":s.substr(o.index-1,1),j=s.substr(o.index+_.length,1),L=!C.match(/\\d/)&&!j.match(/\\d/);this.testMatch(o[3])&&this.testMatch(_)&&L&&u.push(new ZC({tagBuilder:a,matchedText:_,offset:o.index,number:w,plusSign:x}))}return u},PhoneMatcher.prototype.testMatch=function(s){return sA.test(s)},PhoneMatcher}(tA),IA=new RegExp(\"@[_\".concat(hA,\"]{1,50}(?![_\").concat(hA,\"])\"),\"g\"),TA=new RegExp(\"@[_.\".concat(hA,\"]{1,30}(?![_\").concat(hA,\"])\"),\"g\"),NA=new RegExp(\"@[-_.\".concat(hA,\"]{1,50}(?![-_\").concat(hA,\"])\"),\"g\"),MA=new RegExp(\"@[_.\".concat(hA,\"]{1,23}[_\").concat(hA,\"](?![_\").concat(hA,\"])\"),\"g\"),RA=new RegExp(\"[^\"+hA+\"]\"),DA=function(s){function MentionMatcher(o){var i=s.call(this,o)||this;return i.serviceName=\"twitter\",i.matcherRegexes={twitter:IA,instagram:TA,soundcloud:NA,tiktok:MA},i.nonWordCharRegex=RA,i.serviceName=o.serviceName,i}return tslib_es6_extends(MentionMatcher,s),MentionMatcher.prototype.parseMatches=function(s){var o,i=this.serviceName,a=this.matcherRegexes[this.serviceName],u=this.nonWordCharRegex,_=this.tagBuilder,w=[];if(!a)return w;for(;null!==(o=a.exec(s));){var x=o.index,C=s.charAt(x-1);if(0===x||u.test(C)){var j=o[0].replace(/\\.+$/g,\"\"),L=j.slice(1);w.push(new QC({tagBuilder:_,matchedText:j,offset:x,serviceName:i,mention:L}))}}return w},MentionMatcher}(tA);function parseHtml(s,o){for(var i=o.onOpenTag,a=o.onCloseTag,u=o.onText,_=o.onComment,w=o.onDoctype,x=new LA,C=0,j=s.length,L=0,B=0,$=x;C<j;){var V=s.charAt(C);switch(L){case 0:stateData(V);break;case 1:stateTagOpen(V);break;case 2:stateEndTagOpen(V);break;case 3:stateTagName(V);break;case 4:stateBeforeAttributeName(V);break;case 5:stateAttributeName(V);break;case 6:stateAfterAttributeName(V);break;case 7:stateBeforeAttributeValue(V);break;case 8:stateAttributeValueDoubleQuoted(V);break;case 9:stateAttributeValueSingleQuoted(V);break;case 10:stateAttributeValueUnquoted(V);break;case 11:stateAfterAttributeValueQuoted(V);break;case 12:stateSelfClosingStartTag(V);break;case 13:stateMarkupDeclarationOpen(V);break;case 14:stateCommentStart(V);break;case 15:stateCommentStartDash(V);break;case 16:stateComment(V);break;case 17:stateCommentEndDash(V);break;case 18:stateCommentEnd(V);break;case 19:stateCommentEndBang(V);break;case 20:stateDoctype(V);break;default:throwUnhandledCaseError(L)}C++}function stateData(s){\"<\"===s&&startNewTag()}function stateTagOpen(s){\"!\"===s?L=13:\"/\"===s?(L=2,$=new LA(__assign(__assign({},$),{isClosing:!0}))):\"<\"===s?startNewTag():rA.test(s)?(L=3,$=new LA(__assign(__assign({},$),{isOpening:!0}))):(L=0,$=x)}function stateTagName(s){oA.test(s)?($=new LA(__assign(__assign({},$),{name:captureTagName()})),L=4):\"<\"===s?startNewTag():\"/\"===s?($=new LA(__assign(__assign({},$),{name:captureTagName()})),L=12):\">\"===s?($=new LA(__assign(__assign({},$),{name:captureTagName()})),emitTagAndPreviousTextNode()):rA.test(s)||nA.test(s)||\":\"===s||resetToDataState()}function stateEndTagOpen(s){\">\"===s?resetToDataState():rA.test(s)?L=3:resetToDataState()}function stateBeforeAttributeName(s){oA.test(s)||(\"/\"===s?L=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():\"=\"===s||iA.test(s)||aA.test(s)?resetToDataState():L=5)}function stateAttributeName(s){oA.test(s)?L=6:\"/\"===s?L=12:\"=\"===s?L=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():iA.test(s)&&resetToDataState()}function stateAfterAttributeName(s){oA.test(s)||(\"/\"===s?L=12:\"=\"===s?L=7:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():iA.test(s)?resetToDataState():L=5)}function stateBeforeAttributeValue(s){oA.test(s)||('\"'===s?L=8:\"'\"===s?L=9:/[>=`]/.test(s)?resetToDataState():\"<\"===s?startNewTag():L=10)}function stateAttributeValueDoubleQuoted(s){'\"'===s&&(L=11)}function stateAttributeValueSingleQuoted(s){\"'\"===s&&(L=11)}function stateAttributeValueUnquoted(s){oA.test(s)?L=4:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function stateAfterAttributeValueQuoted(s){oA.test(s)?L=4:\"/\"===s?L=12:\">\"===s?emitTagAndPreviousTextNode():\"<\"===s?startNewTag():(L=4,function reconsumeCurrentCharacter(){C--}())}function stateSelfClosingStartTag(s){\">\"===s?($=new LA(__assign(__assign({},$),{isClosing:!0})),emitTagAndPreviousTextNode()):L=4}function stateMarkupDeclarationOpen(o){\"--\"===s.substr(C,2)?(C+=2,$=new LA(__assign(__assign({},$),{type:\"comment\"})),L=14):\"DOCTYPE\"===s.substr(C,7).toUpperCase()?(C+=7,$=new LA(__assign(__assign({},$),{type:\"doctype\"})),L=20):resetToDataState()}function stateCommentStart(s){\"-\"===s?L=15:\">\"===s?resetToDataState():L=16}function stateCommentStartDash(s){\"-\"===s?L=18:\">\"===s?resetToDataState():L=16}function stateComment(s){\"-\"===s&&(L=17)}function stateCommentEndDash(s){L=\"-\"===s?18:16}function stateCommentEnd(s){\">\"===s?emitTagAndPreviousTextNode():\"!\"===s?L=19:\"-\"===s||(L=16)}function stateCommentEndBang(s){\"-\"===s?L=17:\">\"===s?emitTagAndPreviousTextNode():L=16}function stateDoctype(s){\">\"===s?emitTagAndPreviousTextNode():\"<\"===s&&startNewTag()}function resetToDataState(){L=0,$=x}function startNewTag(){L=1,$=new LA({idx:C})}function emitTagAndPreviousTextNode(){var o=s.slice(B,$.idx);o&&u(o,B),\"comment\"===$.type?_($.idx):\"doctype\"===$.type?w($.idx):($.isOpening&&i($.name,$.idx),$.isClosing&&a($.name,$.idx)),resetToDataState(),B=C+1}function captureTagName(){var o=$.idx+($.isClosing?2:1);return s.slice(o,C).toLowerCase()}B<C&&function emitText(){var o=s.slice(B,C);u(o,B),B=C+1}()}var LA=function LA(s){void 0===s&&(s={}),this.idx=void 0!==s.idx?s.idx:-1,this.type=s.type||\"tag\",this.name=s.name||\"\",this.isOpening=!!s.isOpening,this.isClosing=!!s.isClosing},FA=function(){function Autolinker(s){void 0===s&&(s={}),this.version=Autolinker.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:\"end\"},this.className=\"\",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(s.urls),this.email=\"boolean\"==typeof s.email?s.email:this.email,this.phone=\"boolean\"==typeof s.phone?s.phone:this.phone,this.hashtag=s.hashtag||this.hashtag,this.mention=s.mention||this.mention,this.newWindow=\"boolean\"==typeof s.newWindow?s.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(s.stripPrefix),this.stripTrailingSlash=\"boolean\"==typeof s.stripTrailingSlash?s.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=\"boolean\"==typeof s.decodePercentEncoding?s.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=s.sanitizeHtml||!1;var o=this.mention;if(!1!==o&&-1===[\"twitter\",\"instagram\",\"soundcloud\",\"tiktok\"].indexOf(o))throw new Error(\"invalid `mention` cfg '\".concat(o,\"' - see docs\"));var i=this.hashtag;if(!1!==i&&-1===AA.indexOf(i))throw new Error(\"invalid `hashtag` cfg '\".concat(i,\"' - see docs\"));this.truncate=this.normalizeTruncateCfg(s.truncate),this.className=s.className||this.className,this.replaceFn=s.replaceFn||this.replaceFn,this.context=s.context||this}return Autolinker.link=function(s,o){return new Autolinker(o).link(s)},Autolinker.parse=function(s,o){return new Autolinker(o).parse(s)},Autolinker.prototype.normalizeUrlsCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{schemeMatches:s,wwwMatches:s,tldMatches:s}:{schemeMatches:\"boolean\"!=typeof s.schemeMatches||s.schemeMatches,wwwMatches:\"boolean\"!=typeof s.wwwMatches||s.wwwMatches,tldMatches:\"boolean\"!=typeof s.tldMatches||s.tldMatches}},Autolinker.prototype.normalizeStripPrefixCfg=function(s){return null==s&&(s=!0),\"boolean\"==typeof s?{scheme:s,www:s}:{scheme:\"boolean\"!=typeof s.scheme||s.scheme,www:\"boolean\"!=typeof s.www||s.www}},Autolinker.prototype.normalizeTruncateCfg=function(s){return\"number\"==typeof s?{length:s,location:\"end\"}:function defaults(s,o){for(var i in o)o.hasOwnProperty(i)&&void 0===s[i]&&(s[i]=o[i]);return s}(s||{},{length:Number.POSITIVE_INFINITY,location:\"end\"})},Autolinker.prototype.parse=function(s){var o=this,i=[\"a\",\"style\",\"script\"],a=0,u=[];return parseHtml(s,{onOpenTag:function(s){i.indexOf(s)>=0&&a++},onText:function(s,i){if(0===a){var _=function splitAndCapture(s,o){if(!o.global)throw new Error(\"`splitRegex` must have the 'g' flag set\");for(var i,a=[],u=0;i=o.exec(s);)a.push(s.substring(u,i.index)),a.push(i[0]),u=i.index+i[0].length;return a.push(s.substring(u)),a}(s,/(&nbsp;|&#160;|&lt;|&#60;|&gt;|&#62;|&quot;|&#34;|&#39;)/gi),w=i;_.forEach((function(s,i){if(i%2==0){var a=o.parseText(s,w);u.push.apply(u,a)}w+=s.length}))}},onCloseTag:function(s){i.indexOf(s)>=0&&(a=Math.max(a-1,0))},onComment:function(s){},onDoctype:function(s){}}),u=this.compactMatches(u),u=this.removeUnwantedMatches(u)},Autolinker.prototype.compactMatches=function(s){s.sort((function(s,o){return s.getOffset()-o.getOffset()}));for(var o=0;o<s.length-1;){var i=s[o],a=i.getOffset(),u=i.getMatchedText().length,_=a+u;if(o+1<s.length){if(s[o+1].getOffset()===a){var w=s[o+1].getMatchedText().length>u?o:o+1;s.splice(w,1);continue}if(s[o+1].getOffset()<_){s.splice(o+1,1);continue}}o++}return s},Autolinker.prototype.removeUnwantedMatches=function(s){return this.hashtag||utils_remove(s,(function(s){return\"hashtag\"===s.getType()})),this.email||utils_remove(s,(function(s){return\"email\"===s.getType()})),this.phone||utils_remove(s,(function(s){return\"phone\"===s.getType()})),this.mention||utils_remove(s,(function(s){return\"mention\"===s.getType()})),this.urls.schemeMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"scheme\"===s.getUrlMatchType()})),this.urls.wwwMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"www\"===s.getUrlMatchType()})),this.urls.tldMatches||utils_remove(s,(function(s){return\"url\"===s.getType()&&\"tld\"===s.getUrlMatchType()})),s},Autolinker.prototype.parseText=function(s,o){void 0===o&&(o=0),o=o||0;for(var i=this.getMatchers(),a=[],u=0,_=i.length;u<_;u++){for(var w=i[u].parseMatches(s),x=0,C=w.length;x<C;x++)w[x].setOffset(o+w[x].getOffset());a.push.apply(a,w)}return a},Autolinker.prototype.link=function(s){if(!s)return\"\";this.sanitizeHtml&&(s=s.replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));for(var o=this.parse(s),i=[],a=0,u=0,_=o.length;u<_;u++){var w=o[u];i.push(s.substring(a,w.getOffset())),i.push(this.createMatchReturnVal(w)),a=w.getOffset()+w.getMatchedText().length}return i.push(s.substring(a)),i.join(\"\")},Autolinker.prototype.createMatchReturnVal=function(s){var o;return this.replaceFn&&(o=this.replaceFn.call(this.context,s)),\"string\"==typeof o?o:!1===o?s.getMatchedText():o instanceof JC?o.toAnchorString():s.buildTag().toAnchorString()},Autolinker.prototype.getMatchers=function(){if(this.matchers)return this.matchers;var s=this.getTagBuilder(),o=[new CA({tagBuilder:s,serviceName:this.hashtag}),new _A({tagBuilder:s}),new PA({tagBuilder:s}),new DA({tagBuilder:s,serviceName:this.mention}),new kA({tagBuilder:s,stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding})];return this.matchers=o},Autolinker.prototype.getTagBuilder=function(){var s=this.tagBuilder;return s||(s=this.tagBuilder=new HC({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),s},Autolinker.version=\"3.16.2\",Autolinker.AnchorTagBuilder=HC,Autolinker.HtmlTag=JC,Autolinker.matcher={Email:_A,Hashtag:CA,Matcher:tA,Mention:DA,Phone:PA,Url:kA},Autolinker.match={Email:YC,Hashtag:XC,Match:KC,Mention:QC,Phone:ZC,Url:eA},Autolinker}();const BA=FA;var $A=/www|@|\\:\\/\\//;function isLinkOpen(s){return/^<a[>\\s]/i.test(s)}function isLinkClose(s){return/^<\\/a\\s*>/i.test(s)}function createLinkifier(){var s=[],o=new BA({stripPrefix:!1,url:!0,email:!0,replaceFn:function(o){switch(o.getType()){case\"url\":s.push({text:o.matchedText,url:o.getUrl()});break;case\"email\":s.push({text:o.matchedText,url:\"mailto:\"+o.getEmail().replace(/^mailto:/i,\"\")})}return!1}});return{links:s,autolinker:o}}function parseTokens(s){var o,i,a,u,_,w,x,C,j,L,B,$,V,U=s.tokens,z=null;for(i=0,a=U.length;i<a;i++)if(\"inline\"===U[i].type)for(B=0,o=(u=U[i].children).length-1;o>=0;o--)if(\"link_close\"!==(_=u[o]).type){if(\"htmltag\"===_.type&&(isLinkOpen(_.content)&&B>0&&B--,isLinkClose(_.content)&&B++),!(B>0)&&\"text\"===_.type&&$A.test(_.content)){if(z||($=(z=createLinkifier()).links,V=z.autolinker),w=_.content,$.length=0,V.link(w),!$.length)continue;for(x=[],L=_.level,C=0;C<$.length;C++)s.inline.validateLink($[C].url)&&((j=w.indexOf($[C].text))&&x.push({type:\"text\",content:w.slice(0,j),level:L}),x.push({type:\"link_open\",href:$[C].url,title:\"\",level:L++}),x.push({type:\"text\",content:$[C].text,level:L}),x.push({type:\"link_close\",level:--L}),w=w.slice(j+$[C].text.length));w.length&&x.push({type:\"text\",content:w,level:L}),U[i].children=u=[].concat(u.slice(0,o),x,u.slice(o+1))}}else for(o--;u[o].level!==_.level&&\"link_open\"!==u[o].type;)o--}function linkify(s){s.core.ruler.push(\"linkify\",parseTokens)}const{entries:qA,setPrototypeOf:VA,isFrozen:UA,getPrototypeOf:zA,getOwnPropertyDescriptor:WA}=Object;let{freeze:JA,seal:HA,create:KA}=Object,{apply:GA,construct:YA}=\"undefined\"!=typeof Reflect&&Reflect;JA||(JA=function freeze(s){return s}),HA||(HA=function seal(s){return s}),GA||(GA=function apply(s,o,i){return s.apply(o,i)}),YA||(YA=function construct(s,o){return new s(...o)});const XA=unapply(Array.prototype.forEach),QA=unapply(Array.prototype.lastIndexOf),ZA=unapply(Array.prototype.pop),ej=unapply(Array.prototype.push),fj=unapply(Array.prototype.splice),mj=unapply(String.prototype.toLowerCase),_j=unapply(String.prototype.toString),Cj=unapply(String.prototype.match),Aj=unapply(String.prototype.replace),Nj=unapply(String.prototype.indexOf),Bj=unapply(String.prototype.trim),$j=unapply(Object.prototype.hasOwnProperty),zj=unapply(RegExp.prototype.test),Jj=function unconstruct(s){return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];return YA(s,i)}}(TypeError);function unapply(s){return function(o){for(var i=arguments.length,a=new Array(i>1?i-1:0),u=1;u<i;u++)a[u-1]=arguments[u];return GA(s,o,a)}}function addToSet(s,o){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:mj;VA&&VA(s,null);let a=o.length;for(;a--;){let u=o[a];if(\"string\"==typeof u){const s=i(u);s!==u&&(UA(o)||(o[a]=s),u=s)}s[u]=!0}return s}function purify_es_cleanArray(s){for(let o=0;o<s.length;o++){$j(s,o)||(s[o]=null)}return s}function clone(s){const o=KA(null);for(const[i,a]of qA(s)){$j(s,i)&&(Array.isArray(a)?o[i]=purify_es_cleanArray(a):a&&\"object\"==typeof a&&a.constructor===Object?o[i]=clone(a):o[i]=a)}return o}function lookupGetter(s,o){for(;null!==s;){const i=WA(s,o);if(i){if(i.get)return unapply(i.get);if(\"function\"==typeof i.value)return unapply(i.value)}s=zA(s)}return function fallbackValue(){return null}}const Kj=JA([\"a\",\"abbr\",\"acronym\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"bdi\",\"bdo\",\"big\",\"blink\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"center\",\"cite\",\"code\",\"col\",\"colgroup\",\"content\",\"data\",\"datalist\",\"dd\",\"decorator\",\"del\",\"details\",\"dfn\",\"dialog\",\"dir\",\"div\",\"dl\",\"dt\",\"element\",\"em\",\"fieldset\",\"figcaption\",\"figure\",\"font\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"img\",\"input\",\"ins\",\"kbd\",\"label\",\"legend\",\"li\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meter\",\"nav\",\"nobr\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"section\",\"select\",\"shadow\",\"small\",\"source\",\"spacer\",\"span\",\"strike\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"template\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"tr\",\"track\",\"tt\",\"u\",\"ul\",\"var\",\"video\",\"wbr\"]),Gj=JA([\"svg\",\"a\",\"altglyph\",\"altglyphdef\",\"altglyphitem\",\"animatecolor\",\"animatemotion\",\"animatetransform\",\"circle\",\"clippath\",\"defs\",\"desc\",\"ellipse\",\"filter\",\"font\",\"g\",\"glyph\",\"glyphref\",\"hkern\",\"image\",\"line\",\"lineargradient\",\"marker\",\"mask\",\"metadata\",\"mpath\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialgradient\",\"rect\",\"stop\",\"style\",\"switch\",\"symbol\",\"text\",\"textpath\",\"title\",\"tref\",\"tspan\",\"view\",\"vkern\"]),Xj=JA([\"feBlend\",\"feColorMatrix\",\"feComponentTransfer\",\"feComposite\",\"feConvolveMatrix\",\"feDiffuseLighting\",\"feDisplacementMap\",\"feDistantLight\",\"feDropShadow\",\"feFlood\",\"feFuncA\",\"feFuncB\",\"feFuncG\",\"feFuncR\",\"feGaussianBlur\",\"feImage\",\"feMerge\",\"feMergeNode\",\"feMorphology\",\"feOffset\",\"fePointLight\",\"feSpecularLighting\",\"feSpotLight\",\"feTile\",\"feTurbulence\"]),eP=JA([\"animate\",\"color-profile\",\"cursor\",\"discard\",\"font-face\",\"font-face-format\",\"font-face-name\",\"font-face-src\",\"font-face-uri\",\"foreignobject\",\"hatch\",\"hatchpath\",\"mesh\",\"meshgradient\",\"meshpatch\",\"meshrow\",\"missing-glyph\",\"script\",\"set\",\"solidcolor\",\"unknown\",\"use\"]),tP=JA([\"math\",\"menclose\",\"merror\",\"mfenced\",\"mfrac\",\"mglyph\",\"mi\",\"mlabeledtr\",\"mmultiscripts\",\"mn\",\"mo\",\"mover\",\"mpadded\",\"mphantom\",\"mroot\",\"mrow\",\"ms\",\"mspace\",\"msqrt\",\"mstyle\",\"msub\",\"msup\",\"msubsup\",\"mtable\",\"mtd\",\"mtext\",\"mtr\",\"munder\",\"munderover\",\"mprescripts\"]),rP=JA([\"maction\",\"maligngroup\",\"malignmark\",\"mlongdiv\",\"mscarries\",\"mscarry\",\"msgroup\",\"mstack\",\"msline\",\"msrow\",\"semantics\",\"annotation\",\"annotation-xml\",\"mprescripts\",\"none\"]),nP=JA([\"#text\"]),sP=JA([\"accept\",\"action\",\"align\",\"alt\",\"autocapitalize\",\"autocomplete\",\"autopictureinpicture\",\"autoplay\",\"background\",\"bgcolor\",\"border\",\"capture\",\"cellpadding\",\"cellspacing\",\"checked\",\"cite\",\"class\",\"clear\",\"color\",\"cols\",\"colspan\",\"controls\",\"controlslist\",\"coords\",\"crossorigin\",\"datetime\",\"decoding\",\"default\",\"dir\",\"disabled\",\"disablepictureinpicture\",\"disableremoteplayback\",\"download\",\"draggable\",\"enctype\",\"enterkeyhint\",\"face\",\"for\",\"headers\",\"height\",\"hidden\",\"high\",\"href\",\"hreflang\",\"id\",\"inputmode\",\"integrity\",\"ismap\",\"kind\",\"label\",\"lang\",\"list\",\"loading\",\"loop\",\"low\",\"max\",\"maxlength\",\"media\",\"method\",\"min\",\"minlength\",\"multiple\",\"muted\",\"name\",\"nonce\",\"noshade\",\"novalidate\",\"nowrap\",\"open\",\"optimum\",\"pattern\",\"placeholder\",\"playsinline\",\"popover\",\"popovertarget\",\"popovertargetaction\",\"poster\",\"preload\",\"pubdate\",\"radiogroup\",\"readonly\",\"rel\",\"required\",\"rev\",\"reversed\",\"role\",\"rows\",\"rowspan\",\"spellcheck\",\"scope\",\"selected\",\"shape\",\"size\",\"sizes\",\"span\",\"srclang\",\"start\",\"src\",\"srcset\",\"step\",\"style\",\"summary\",\"tabindex\",\"title\",\"translate\",\"type\",\"usemap\",\"valign\",\"value\",\"width\",\"wrap\",\"xmlns\",\"slot\"]),oP=JA([\"accent-height\",\"accumulate\",\"additive\",\"alignment-baseline\",\"amplitude\",\"ascent\",\"attributename\",\"attributetype\",\"azimuth\",\"basefrequency\",\"baseline-shift\",\"begin\",\"bias\",\"by\",\"class\",\"clip\",\"clippathunits\",\"clip-path\",\"clip-rule\",\"color\",\"color-interpolation\",\"color-interpolation-filters\",\"color-profile\",\"color-rendering\",\"cx\",\"cy\",\"d\",\"dx\",\"dy\",\"diffuseconstant\",\"direction\",\"display\",\"divisor\",\"dur\",\"edgemode\",\"elevation\",\"end\",\"exponent\",\"fill\",\"fill-opacity\",\"fill-rule\",\"filter\",\"filterunits\",\"flood-color\",\"flood-opacity\",\"font-family\",\"font-size\",\"font-size-adjust\",\"font-stretch\",\"font-style\",\"font-variant\",\"font-weight\",\"fx\",\"fy\",\"g1\",\"g2\",\"glyph-name\",\"glyphref\",\"gradientunits\",\"gradienttransform\",\"height\",\"href\",\"id\",\"image-rendering\",\"in\",\"in2\",\"intercept\",\"k\",\"k1\",\"k2\",\"k3\",\"k4\",\"kerning\",\"keypoints\",\"keysplines\",\"keytimes\",\"lang\",\"lengthadjust\",\"letter-spacing\",\"kernelmatrix\",\"kernelunitlength\",\"lighting-color\",\"local\",\"marker-end\",\"marker-mid\",\"marker-start\",\"markerheight\",\"markerunits\",\"markerwidth\",\"maskcontentunits\",\"maskunits\",\"max\",\"mask\",\"media\",\"method\",\"mode\",\"min\",\"name\",\"numoctaves\",\"offset\",\"operator\",\"opacity\",\"order\",\"orient\",\"orientation\",\"origin\",\"overflow\",\"paint-order\",\"path\",\"pathlength\",\"patterncontentunits\",\"patterntransform\",\"patternunits\",\"points\",\"preservealpha\",\"preserveaspectratio\",\"primitiveunits\",\"r\",\"rx\",\"ry\",\"radius\",\"refx\",\"refy\",\"repeatcount\",\"repeatdur\",\"restart\",\"result\",\"rotate\",\"scale\",\"seed\",\"shape-rendering\",\"slope\",\"specularconstant\",\"specularexponent\",\"spreadmethod\",\"startoffset\",\"stddeviation\",\"stitchtiles\",\"stop-color\",\"stop-opacity\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-opacity\",\"stroke\",\"stroke-width\",\"style\",\"surfacescale\",\"systemlanguage\",\"tabindex\",\"tablevalues\",\"targetx\",\"targety\",\"transform\",\"transform-origin\",\"text-anchor\",\"text-decoration\",\"text-rendering\",\"textlength\",\"type\",\"u1\",\"u2\",\"unicode\",\"values\",\"viewbox\",\"visibility\",\"version\",\"vert-adv-y\",\"vert-origin-x\",\"vert-origin-y\",\"width\",\"word-spacing\",\"wrap\",\"writing-mode\",\"xchannelselector\",\"ychannelselector\",\"x\",\"x1\",\"x2\",\"xmlns\",\"y\",\"y1\",\"y2\",\"z\",\"zoomandpan\"]),iP=JA([\"accent\",\"accentunder\",\"align\",\"bevelled\",\"close\",\"columnsalign\",\"columnlines\",\"columnspan\",\"denomalign\",\"depth\",\"dir\",\"display\",\"displaystyle\",\"encoding\",\"fence\",\"frame\",\"height\",\"href\",\"id\",\"largeop\",\"length\",\"linethickness\",\"lspace\",\"lquote\",\"mathbackground\",\"mathcolor\",\"mathsize\",\"mathvariant\",\"maxsize\",\"minsize\",\"movablelimits\",\"notation\",\"numalign\",\"open\",\"rowalign\",\"rowlines\",\"rowspacing\",\"rowspan\",\"rspace\",\"rquote\",\"scriptlevel\",\"scriptminsize\",\"scriptsizemultiplier\",\"selection\",\"separator\",\"separators\",\"stretchy\",\"subscriptshift\",\"supscriptshift\",\"symmetric\",\"voffset\",\"width\",\"xmlns\"]),aP=JA([\"xlink:href\",\"xml:id\",\"xlink:title\",\"xml:space\",\"xmlns:xlink\"]),cP=HA(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm),lP=HA(/<%[\\w\\W]*|[\\w\\W]*%>/gm),uP=HA(/\\$\\{[\\w\\W]*/gm),pP=HA(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/),hP=HA(/^aria-[\\-\\w]+$/),dP=HA(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i),fP=HA(/^(?:\\w+script|data):/i),mP=HA(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g),gP=HA(/^html$/i),yP=HA(/^[a-z][.\\w]*(-[.\\w]+)+$/i);var vP=Object.freeze({__proto__:null,ARIA_ATTR:hP,ATTR_WHITESPACE:mP,CUSTOM_ELEMENT:yP,DATA_ATTR:pP,DOCTYPE_NAME:gP,ERB_EXPR:lP,IS_ALLOWED_URI:dP,IS_SCRIPT_OR_DATA:fP,MUSTACHE_EXPR:cP,TMPLIT_EXPR:uP});const bP=1,_P=3,SP=7,EP=8,wP=9,xP=function getGlobal(){return\"undefined\"==typeof window?null:window};var kP=function createDOMPurify(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xP();const DOMPurify=s=>createDOMPurify(s);if(DOMPurify.version=\"3.2.4\",DOMPurify.removed=[],!s||!s.document||s.document.nodeType!==wP||!s.Element)return DOMPurify.isSupported=!1,DOMPurify;let{document:o}=s;const i=o,a=i.currentScript,{DocumentFragment:u,HTMLTemplateElement:_,Node:w,Element:x,NodeFilter:C,NamedNodeMap:j=s.NamedNodeMap||s.MozNamedAttrMap,HTMLFormElement:L,DOMParser:B,trustedTypes:$}=s,V=x.prototype,U=lookupGetter(V,\"cloneNode\"),z=lookupGetter(V,\"remove\"),Y=lookupGetter(V,\"nextSibling\"),Z=lookupGetter(V,\"childNodes\"),ee=lookupGetter(V,\"parentNode\");if(\"function\"==typeof _){const s=o.createElement(\"template\");s.content&&s.content.ownerDocument&&(o=s.content.ownerDocument)}let ie,ae=\"\";const{implementation:ce,createNodeIterator:le,createDocumentFragment:pe,getElementsByTagName:de}=o,{importNode:fe}=i;let ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};DOMPurify.isSupported=\"function\"==typeof qA&&\"function\"==typeof ee&&ce&&void 0!==ce.createHTMLDocument;const{MUSTACHE_EXPR:be,ERB_EXPR:_e,TMPLIT_EXPR:Se,DATA_ATTR:we,ARIA_ATTR:xe,IS_SCRIPT_OR_DATA:Pe,ATTR_WHITESPACE:Te,CUSTOM_ELEMENT:Re}=vP;let{IS_ALLOWED_URI:$e}=vP,qe=null;const ze=addToSet({},[...Kj,...Gj,...Xj,...tP,...nP]);let We=null;const He=addToSet({},[...sP,...oP,...iP,...aP]);let Ye=Object.seal(KA(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Xe=null,Qe=null,et=!0,tt=!0,rt=!1,nt=!0,st=!1,ot=!0,it=!1,at=!1,ct=!1,lt=!1,ut=!1,pt=!1,ht=!0,dt=!1,mt=!0,gt=!1,yt={},vt=null;const bt=addToSet({},[\"annotation-xml\",\"audio\",\"colgroup\",\"desc\",\"foreignobject\",\"head\",\"iframe\",\"math\",\"mi\",\"mn\",\"mo\",\"ms\",\"mtext\",\"noembed\",\"noframes\",\"noscript\",\"plaintext\",\"script\",\"style\",\"svg\",\"template\",\"thead\",\"title\",\"video\",\"xmp\"]);let _t=null;const St=addToSet({},[\"audio\",\"video\",\"img\",\"source\",\"image\",\"track\"]);let Et=null;const wt=addToSet({},[\"alt\",\"class\",\"for\",\"id\",\"label\",\"name\",\"pattern\",\"placeholder\",\"role\",\"summary\",\"title\",\"value\",\"style\",\"xmlns\"]),xt=\"http://www.w3.org/1998/Math/MathML\",kt=\"http://www.w3.org/2000/svg\",Ot=\"http://www.w3.org/1999/xhtml\";let Ct=Ot,At=!1,jt=null;const Pt=addToSet({},[xt,kt,Ot],_j);let It=addToSet({},[\"mi\",\"mo\",\"mn\",\"ms\",\"mtext\"]),Tt=addToSet({},[\"annotation-xml\"]);const Nt=addToSet({},[\"title\",\"style\",\"font\",\"a\",\"script\"]);let Mt=null;const Rt=[\"application/xhtml+xml\",\"text/html\"];let Dt=null,Lt=null;const Ft=o.createElement(\"form\"),Bt=function isRegexOrFunction(s){return s instanceof RegExp||s instanceof Function},$t=function _parseConfig(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Lt||Lt!==s){if(s&&\"object\"==typeof s||(s={}),s=clone(s),Mt=-1===Rt.indexOf(s.PARSER_MEDIA_TYPE)?\"text/html\":s.PARSER_MEDIA_TYPE,Dt=\"application/xhtml+xml\"===Mt?_j:mj,qe=$j(s,\"ALLOWED_TAGS\")?addToSet({},s.ALLOWED_TAGS,Dt):ze,We=$j(s,\"ALLOWED_ATTR\")?addToSet({},s.ALLOWED_ATTR,Dt):He,jt=$j(s,\"ALLOWED_NAMESPACES\")?addToSet({},s.ALLOWED_NAMESPACES,_j):Pt,Et=$j(s,\"ADD_URI_SAFE_ATTR\")?addToSet(clone(wt),s.ADD_URI_SAFE_ATTR,Dt):wt,_t=$j(s,\"ADD_DATA_URI_TAGS\")?addToSet(clone(St),s.ADD_DATA_URI_TAGS,Dt):St,vt=$j(s,\"FORBID_CONTENTS\")?addToSet({},s.FORBID_CONTENTS,Dt):bt,Xe=$j(s,\"FORBID_TAGS\")?addToSet({},s.FORBID_TAGS,Dt):{},Qe=$j(s,\"FORBID_ATTR\")?addToSet({},s.FORBID_ATTR,Dt):{},yt=!!$j(s,\"USE_PROFILES\")&&s.USE_PROFILES,et=!1!==s.ALLOW_ARIA_ATTR,tt=!1!==s.ALLOW_DATA_ATTR,rt=s.ALLOW_UNKNOWN_PROTOCOLS||!1,nt=!1!==s.ALLOW_SELF_CLOSE_IN_ATTR,st=s.SAFE_FOR_TEMPLATES||!1,ot=!1!==s.SAFE_FOR_XML,it=s.WHOLE_DOCUMENT||!1,lt=s.RETURN_DOM||!1,ut=s.RETURN_DOM_FRAGMENT||!1,pt=s.RETURN_TRUSTED_TYPE||!1,ct=s.FORCE_BODY||!1,ht=!1!==s.SANITIZE_DOM,dt=s.SANITIZE_NAMED_PROPS||!1,mt=!1!==s.KEEP_CONTENT,gt=s.IN_PLACE||!1,$e=s.ALLOWED_URI_REGEXP||dP,Ct=s.NAMESPACE||Ot,It=s.MATHML_TEXT_INTEGRATION_POINTS||It,Tt=s.HTML_INTEGRATION_POINTS||Tt,Ye=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&Bt(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ye.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&Bt(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ye.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&\"boolean\"==typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ye.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),st&&(tt=!1),ut&&(lt=!0),yt&&(qe=addToSet({},nP),We=[],!0===yt.html&&(addToSet(qe,Kj),addToSet(We,sP)),!0===yt.svg&&(addToSet(qe,Gj),addToSet(We,oP),addToSet(We,aP)),!0===yt.svgFilters&&(addToSet(qe,Xj),addToSet(We,oP),addToSet(We,aP)),!0===yt.mathMl&&(addToSet(qe,tP),addToSet(We,iP),addToSet(We,aP))),s.ADD_TAGS&&(qe===ze&&(qe=clone(qe)),addToSet(qe,s.ADD_TAGS,Dt)),s.ADD_ATTR&&(We===He&&(We=clone(We)),addToSet(We,s.ADD_ATTR,Dt)),s.ADD_URI_SAFE_ATTR&&addToSet(Et,s.ADD_URI_SAFE_ATTR,Dt),s.FORBID_CONTENTS&&(vt===bt&&(vt=clone(vt)),addToSet(vt,s.FORBID_CONTENTS,Dt)),mt&&(qe[\"#text\"]=!0),it&&addToSet(qe,[\"html\",\"head\",\"body\"]),qe.table&&(addToSet(qe,[\"tbody\"]),delete Xe.tbody),s.TRUSTED_TYPES_POLICY){if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createHTML)throw Jj('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');if(\"function\"!=typeof s.TRUSTED_TYPES_POLICY.createScriptURL)throw Jj('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');ie=s.TRUSTED_TYPES_POLICY,ae=ie.createHTML(\"\")}else void 0===ie&&(ie=function _createTrustedTypesPolicy(s,o){if(\"object\"!=typeof s||\"function\"!=typeof s.createPolicy)return null;let i=null;const a=\"data-tt-policy-suffix\";o&&o.hasAttribute(a)&&(i=o.getAttribute(a));const u=\"dompurify\"+(i?\"#\"+i:\"\");try{return s.createPolicy(u,{createHTML:s=>s,createScriptURL:s=>s})}catch(s){return console.warn(\"TrustedTypes policy \"+u+\" could not be created.\"),null}}($,a)),null!==ie&&\"string\"==typeof ae&&(ae=ie.createHTML(\"\"));JA&&JA(s),Lt=s}},qt=addToSet({},[...Gj,...Xj,...eP]),Vt=addToSet({},[...tP,...rP]),Ut=function _forceRemove(s){ej(DOMPurify.removed,{element:s});try{ee(s).removeChild(s)}catch(o){z(s)}},zt=function _removeAttribute(s,o){try{ej(DOMPurify.removed,{attribute:o.getAttributeNode(s),from:o})}catch(s){ej(DOMPurify.removed,{attribute:null,from:o})}if(o.removeAttribute(s),\"is\"===s)if(lt||ut)try{Ut(o)}catch(s){}else try{o.setAttribute(s,\"\")}catch(s){}},Wt=function _initDocument(s){let i=null,a=null;if(ct)s=\"<remove></remove>\"+s;else{const o=Cj(s,/^[\\r\\n\\t ]+/);a=o&&o[0]}\"application/xhtml+xml\"===Mt&&Ct===Ot&&(s='<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>'+s+\"</body></html>\");const u=ie?ie.createHTML(s):s;if(Ct===Ot)try{i=(new B).parseFromString(u,Mt)}catch(s){}if(!i||!i.documentElement){i=ce.createDocument(Ct,\"template\",null);try{i.documentElement.innerHTML=At?ae:u}catch(s){}}const _=i.body||i.documentElement;return s&&a&&_.insertBefore(o.createTextNode(a),_.childNodes[0]||null),Ct===Ot?de.call(i,it?\"html\":\"body\")[0]:it?i.documentElement:_},Jt=function _createNodeIterator(s){return le.call(s.ownerDocument||s,s,C.SHOW_ELEMENT|C.SHOW_COMMENT|C.SHOW_TEXT|C.SHOW_PROCESSING_INSTRUCTION|C.SHOW_CDATA_SECTION,null)},Ht=function _isClobbered(s){return s instanceof L&&(\"string\"!=typeof s.nodeName||\"string\"!=typeof s.textContent||\"function\"!=typeof s.removeChild||!(s.attributes instanceof j)||\"function\"!=typeof s.removeAttribute||\"function\"!=typeof s.setAttribute||\"string\"!=typeof s.namespaceURI||\"function\"!=typeof s.insertBefore||\"function\"!=typeof s.hasChildNodes)},Kt=function _isNode(s){return\"function\"==typeof w&&s instanceof w};function _executeHooks(s,o,i){XA(s,(s=>{s.call(DOMPurify,o,i,Lt)}))}const Gt=function _sanitizeElements(s){let o=null;if(_executeHooks(ye.beforeSanitizeElements,s,null),Ht(s))return Ut(s),!0;const i=Dt(s.nodeName);if(_executeHooks(ye.uponSanitizeElement,s,{tagName:i,allowedTags:qe}),s.hasChildNodes()&&!Kt(s.firstElementChild)&&zj(/<[/\\w]/g,s.innerHTML)&&zj(/<[/\\w]/g,s.textContent))return Ut(s),!0;if(s.nodeType===SP)return Ut(s),!0;if(ot&&s.nodeType===EP&&zj(/<[/\\w]/g,s.data))return Ut(s),!0;if(!qe[i]||Xe[i]){if(!Xe[i]&&Xt(i)){if(Ye.tagNameCheck instanceof RegExp&&zj(Ye.tagNameCheck,i))return!1;if(Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(i))return!1}if(mt&&!vt[i]){const o=ee(s)||s.parentNode,i=Z(s)||s.childNodes;if(i&&o){for(let a=i.length-1;a>=0;--a){const u=U(i[a],!0);u.__removalCount=(s.__removalCount||0)+1,o.insertBefore(u,Y(s))}}}return Ut(s),!0}return s instanceof x&&!function _checkValidNamespace(s){let o=ee(s);o&&o.tagName||(o={namespaceURI:Ct,tagName:\"template\"});const i=mj(s.tagName),a=mj(o.tagName);return!!jt[s.namespaceURI]&&(s.namespaceURI===kt?o.namespaceURI===Ot?\"svg\"===i:o.namespaceURI===xt?\"svg\"===i&&(\"annotation-xml\"===a||It[a]):Boolean(qt[i]):s.namespaceURI===xt?o.namespaceURI===Ot?\"math\"===i:o.namespaceURI===kt?\"math\"===i&&Tt[a]:Boolean(Vt[i]):s.namespaceURI===Ot?!(o.namespaceURI===kt&&!Tt[a])&&!(o.namespaceURI===xt&&!It[a])&&!Vt[i]&&(Nt[i]||!qt[i]):!(\"application/xhtml+xml\"!==Mt||!jt[s.namespaceURI]))}(s)?(Ut(s),!0):\"noscript\"!==i&&\"noembed\"!==i&&\"noframes\"!==i||!zj(/<\\/no(script|embed|frames)/i,s.innerHTML)?(st&&s.nodeType===_P&&(o=s.textContent,XA([be,_e,Se],(s=>{o=Aj(o,s,\" \")})),s.textContent!==o&&(ej(DOMPurify.removed,{element:s.cloneNode()}),s.textContent=o)),_executeHooks(ye.afterSanitizeElements,s,null),!1):(Ut(s),!0)},Yt=function _isValidAttribute(s,i,a){if(ht&&(\"id\"===i||\"name\"===i)&&(a in o||a in Ft))return!1;if(tt&&!Qe[i]&&zj(we,i));else if(et&&zj(xe,i));else if(!We[i]||Qe[i]){if(!(Xt(s)&&(Ye.tagNameCheck instanceof RegExp&&zj(Ye.tagNameCheck,s)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(s))&&(Ye.attributeNameCheck instanceof RegExp&&zj(Ye.attributeNameCheck,i)||Ye.attributeNameCheck instanceof Function&&Ye.attributeNameCheck(i))||\"is\"===i&&Ye.allowCustomizedBuiltInElements&&(Ye.tagNameCheck instanceof RegExp&&zj(Ye.tagNameCheck,a)||Ye.tagNameCheck instanceof Function&&Ye.tagNameCheck(a))))return!1}else if(Et[i]);else if(zj($e,Aj(a,Te,\"\")));else if(\"src\"!==i&&\"xlink:href\"!==i&&\"href\"!==i||\"script\"===s||0!==Nj(a,\"data:\")||!_t[s]){if(rt&&!zj(Pe,Aj(a,Te,\"\")));else if(a)return!1}else;return!0},Xt=function _isBasicCustomElement(s){return\"annotation-xml\"!==s&&Cj(s,Re)},Qt=function _sanitizeAttributes(s){_executeHooks(ye.beforeSanitizeAttributes,s,null);const{attributes:o}=s;if(!o||Ht(s))return;const i={attrName:\"\",attrValue:\"\",keepAttr:!0,allowedAttributes:We,forceKeepAttr:void 0};let a=o.length;for(;a--;){const u=o[a],{name:_,namespaceURI:w,value:x}=u,C=Dt(_);let j=\"value\"===_?x:Bj(x);if(i.attrName=C,i.attrValue=j,i.keepAttr=!0,i.forceKeepAttr=void 0,_executeHooks(ye.uponSanitizeAttribute,s,i),j=i.attrValue,!dt||\"id\"!==C&&\"name\"!==C||(zt(_,s),j=\"user-content-\"+j),ot&&zj(/((--!?|])>)|<\\/(style|title)/i,j)){zt(_,s);continue}if(i.forceKeepAttr)continue;if(zt(_,s),!i.keepAttr)continue;if(!nt&&zj(/\\/>/i,j)){zt(_,s);continue}st&&XA([be,_e,Se],(s=>{j=Aj(j,s,\" \")}));const L=Dt(s.nodeName);if(Yt(L,C,j)){if(ie&&\"object\"==typeof $&&\"function\"==typeof $.getAttributeType)if(w);else switch($.getAttributeType(L,C)){case\"TrustedHTML\":j=ie.createHTML(j);break;case\"TrustedScriptURL\":j=ie.createScriptURL(j)}try{w?s.setAttributeNS(w,_,j):s.setAttribute(_,j),Ht(s)?Ut(s):ZA(DOMPurify.removed)}catch(s){}}}_executeHooks(ye.afterSanitizeAttributes,s,null)},Zt=function _sanitizeShadowDOM(s){let o=null;const i=Jt(s);for(_executeHooks(ye.beforeSanitizeShadowDOM,s,null);o=i.nextNode();)_executeHooks(ye.uponSanitizeShadowNode,o,null),Gt(o),Qt(o),o.content instanceof u&&_sanitizeShadowDOM(o.content);_executeHooks(ye.afterSanitizeShadowDOM,s,null)};return DOMPurify.sanitize=function(s){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null,_=null,x=null,C=null;if(At=!s,At&&(s=\"\\x3c!--\\x3e\"),\"string\"!=typeof s&&!Kt(s)){if(\"function\"!=typeof s.toString)throw Jj(\"toString is not a function\");if(\"string\"!=typeof(s=s.toString()))throw Jj(\"dirty is not a string, aborting\")}if(!DOMPurify.isSupported)return s;if(at||$t(o),DOMPurify.removed=[],\"string\"==typeof s&&(gt=!1),gt){if(s.nodeName){const o=Dt(s.nodeName);if(!qe[o]||Xe[o])throw Jj(\"root node is forbidden and cannot be sanitized in-place\")}}else if(s instanceof w)a=Wt(\"\\x3c!----\\x3e\"),_=a.ownerDocument.importNode(s,!0),_.nodeType===bP&&\"BODY\"===_.nodeName||\"HTML\"===_.nodeName?a=_:a.appendChild(_);else{if(!lt&&!st&&!it&&-1===s.indexOf(\"<\"))return ie&&pt?ie.createHTML(s):s;if(a=Wt(s),!a)return lt?null:pt?ae:\"\"}a&&ct&&Ut(a.firstChild);const j=Jt(gt?s:a);for(;x=j.nextNode();)Gt(x),Qt(x),x.content instanceof u&&Zt(x.content);if(gt)return s;if(lt){if(ut)for(C=pe.call(a.ownerDocument);a.firstChild;)C.appendChild(a.firstChild);else C=a;return(We.shadowroot||We.shadowrootmode)&&(C=fe.call(i,C,!0)),C}let L=it?a.outerHTML:a.innerHTML;return it&&qe[\"!doctype\"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&zj(gP,a.ownerDocument.doctype.name)&&(L=\"<!DOCTYPE \"+a.ownerDocument.doctype.name+\">\\n\"+L),st&&XA([be,_e,Se],(s=>{L=Aj(L,s,\" \")})),ie&&pt?ie.createHTML(L):L},DOMPurify.setConfig=function(){$t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),at=!0},DOMPurify.clearConfig=function(){Lt=null,at=!1},DOMPurify.isValidAttribute=function(s,o,i){Lt||$t({});const a=Dt(s),u=Dt(o);return Yt(a,u,i)},DOMPurify.addHook=function(s,o){\"function\"==typeof o&&ej(ye[s],o)},DOMPurify.removeHook=function(s,o){if(void 0!==o){const i=QA(ye[s],o);return-1===i?void 0:fj(ye[s],i,1)[0]}return ZA(ye[s])},DOMPurify.removeHooks=function(s){ye[s]=[]},DOMPurify.removeAllHooks=function(){ye={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},DOMPurify}();kP.addHook&&kP.addHook(\"beforeSanitizeElements\",(function(s){return s.href&&s.setAttribute(\"rel\",\"noopener noreferrer\"),s}));const OP=function Markdown({source:s,className:o=\"\",getConfigs:i=()=>({useUnsafeMarkdown:!1})}){if(\"string\"!=typeof s)return null;const a=new Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(linkify);a.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:u}=i(),_=a.render(s),w=sanitizer(_,{useUnsafeMarkdown:u});return s&&_&&w?Re.createElement(\"div\",{className:Jn()(o,\"markdown\"),dangerouslySetInnerHTML:{__html:w}}):null};function sanitizer(s,{useUnsafeMarkdown:o=!1}={}){const i=o,a=o?[]:[\"style\",\"class\"];return o&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),kP.sanitize(s,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:i,FORBID_ATTR:a})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends Re.Component{render(){const{errSelectors:s,specSelectors:o,getComponent:i}=this.props,a=i(\"SvgAssets\"),u=i(\"InfoContainer\",!0),_=i(\"VersionPragmaFilter\"),w=i(\"operations\",!0),x=i(\"Models\",!0),C=i(\"Webhooks\",!0),j=i(\"Row\"),L=i(\"Col\"),B=i(\"errors\",!0),$=i(\"ServersContainer\",!0),V=i(\"SchemesContainer\",!0),U=i(\"AuthorizeBtnContainer\",!0),z=i(\"FilterContainer\",!0),Y=o.isSwagger2(),Z=o.isOAS3(),ee=o.isOAS31(),ie=!o.specStr(),ae=o.loadingStatus();let ce=null;if(\"loading\"===ae&&(ce=Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"div\",{className:\"loading\"})))),\"failed\"===ae&&(ce=Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),Re.createElement(B,null)))),\"failedConfig\"===ae){const o=s.lastError(),i=o?o.get(\"message\"):\"\";ce=Re.createElement(\"div\",{className:\"info failed-config\"},Re.createElement(\"div\",{className:\"loading-container\"},Re.createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),Re.createElement(\"p\",null,i)))}if(!ce&&ie&&(ce=Re.createElement(\"h4\",null,\"No API definition provided.\")),ce)return Re.createElement(\"div\",{className:\"swagger-ui\"},Re.createElement(\"div\",{className:\"loading-container\"},ce));const le=o.servers(),pe=o.schemes(),de=le&&le.size,fe=pe&&pe.size,ye=!!o.securityDefinitions();return Re.createElement(\"div\",{className:\"swagger-ui\"},Re.createElement(a,null),Re.createElement(_,{isSwagger2:Y,isOAS3:Z,alsoShow:Re.createElement(B,null)},Re.createElement(B,null),Re.createElement(j,{className:\"information-container\"},Re.createElement(L,{mobile:12},Re.createElement(u,null))),de||fe||ye?Re.createElement(\"div\",{className:\"scheme-container\"},Re.createElement(L,{className:\"schemes wrapper\",mobile:12},de||fe?Re.createElement(\"div\",{className:\"schemes-server-container\"},de?Re.createElement($,null):null,fe?Re.createElement(V,null):null):null,ye?Re.createElement(U,null):null)):null,Re.createElement(z,null),Re.createElement(j,null,Re.createElement(L,{mobile:12,desktop:12},Re.createElement(w,null))),ee&&Re.createElement(j,{className:\"webhooks-container\"},Re.createElement(L,{mobile:12,desktop:12},Re.createElement(C,null))),Re.createElement(j,null,Re.createElement(L,{mobile:12,desktop:12},Re.createElement(x,null)))))}}const core_components=()=>({components:{App:HO,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:rC,InfoContainer,InfoUrl,InfoBasePath,Contact:nC,License:sC,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:operation_Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,responses:responses_Responses,response:response_Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,Property:property,TryItOutButton,Markdown:OP,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example:example_Example,ExamplesSelect,ExamplesSelectValueRetainer}}),form_components=()=>({components:{..._e}}),base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5,json_schema_5_samples,core_components,form_components,swagger_client,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,syntax_highlighting,versions,safe_render()],CP=(0,ze.Map)();function onlyOAS3(s){return(o,i)=>(...a)=>{if(i.getSystem().specSelectors.isOAS3()){const o=s(...a);return\"function\"==typeof o?o(i):o}return o(...a)}}const AP=onlyOAS3(xs()(null)),jP=onlyOAS3(((s,o)=>s=>s.getSystem().specSelectors.findSchema(o))),PP=onlyOAS3((()=>s=>{const o=s.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return ze.Map.isMap(o)?o:CP})),IP=onlyOAS3((()=>s=>s.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),TP=onlyOAS3(Vt(Ns,(s=>s.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(s,o)=>(i,...a)=>o.specSelectors.isOAS3()?o.oas3Selectors.validOperationMethods():s(...a),NP=AP,MP=AP,RP=AP,DP=AP,LP=AP;const FP=function wrap_selectors_onlyOAS3(s){return(o,i)=>(...a)=>{if(i.getSystem().specSelectors.isOAS3()){let o=i.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return s(i,o,...a)}return o(...a)}}(Vt((s=>s),(({specSelectors:s})=>s.securityDefinitions()),((s,o)=>{let i=(0,ze.List)();return o?(o.entrySeq().forEach((([s,o])=>{const a=o?.get(\"type\");if(\"oauth2\"===a&&o.get(\"flows\").entrySeq().forEach((([a,u])=>{let _=(0,ze.fromJS)({flow:a,authorizationUrl:u.get(\"authorizationUrl\"),tokenUrl:u.get(\"tokenUrl\"),scopes:u.get(\"scopes\"),type:o.get(\"type\"),description:o.get(\"description\")});i=i.push(new ze.Map({[s]:_.filter((s=>void 0!==s))}))})),\"http\"!==a&&\"apiKey\"!==a||(i=i.push(new ze.Map({[s]:o}))),\"openIdConnect\"===a&&o.get(\"openIdConnectData\")){let a=o.get(\"openIdConnectData\");(a.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((u=>{let _=a.get(\"scopes_supported\")&&a.get(\"scopes_supported\").reduce(((s,o)=>s.set(o,\"\")),new ze.Map),w=(0,ze.fromJS)({flow:u,authorizationUrl:a.get(\"authorization_endpoint\"),tokenUrl:a.get(\"token_endpoint\"),scopes:_,type:\"oauth2\",openIdConnectUrl:o.get(\"openIdConnectUrl\")});i=i.push(new ze.Map({[s]:w.filter((s=>void 0!==s))}))}))}})),i):i})));function OAS3ComponentWrapFactory(s){return(o,i)=>a=>\"function\"==typeof i.specSelectors?.isOAS3?i.specSelectors.isOAS3()?Re.createElement(s,Mn()({},a,i,{Ori:o})):Re.createElement(o,a):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const BP=(0,ze.Map)(),selectors_isSwagger2=()=>s=>function isSwagger2(s){const o=s.get(\"swagger\");return\"string\"==typeof o&&\"2.0\"===o}(s.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>s=>function isOAS30(s){const o=s.get(\"openapi\");return\"string\"==typeof o&&/^3\\.0\\.(?:[1-9]\\d*|0)$/.test(o)}(s.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>s=>s.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(s){return(o,...i)=>a=>{if(a.specSelectors.isOAS3()){const u=s(o,...i);return\"function\"==typeof u?u(a):u}return null}}const $P=selectors_onlyOAS3((()=>s=>s.specSelectors.specJson().get(\"servers\",BP))),findSchema=(s,o)=>{const i=s.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",o],null),a=s.getIn([\"json\",\"components\",\"schemas\",o],null);return i||a||null},qP=selectors_onlyOAS3(((s,{callbacks:o,specPath:i})=>s=>{const a=s.specSelectors.validOperationMethods();return ze.Map.isMap(o)?o.reduce(((s,o,u)=>{if(!ze.Map.isMap(o))return s;const _=o.reduce(((s,o,_)=>{if(!ze.Map.isMap(o))return s;const w=o.entrySeq().filter((([s])=>a.includes(s))).map((([s,o])=>({operation:(0,ze.Map)({operation:o}),method:s,path:_,callbackName:u,specPath:i.concat([u,_,s])})));return s.concat(w)}),(0,ze.List)());return s.concat(_)}),(0,ze.List)()).groupBy((s=>s.callbackName)).map((s=>s.toArray())).toObject():{}})),callbacks=({callbacks:s,specPath:o,specSelectors:i,getComponent:a})=>{const u=i.callbacksOperations({callbacks:s,specPath:o}),_=Object.keys(u),w=a(\"OperationContainer\",!0);return 0===_.length?Re.createElement(\"span\",null,\"No callbacks\"):Re.createElement(\"div\",null,_.map((s=>Re.createElement(\"div\",{key:`${s}`},Re.createElement(\"h2\",null,s),u[s].map((o=>Re.createElement(w,{key:`${s}-${o.path}-${o.method}`,op:o.operation,tag:\"callbacks\",method:o.method,path:o.path,specPath:o.specPath,allowTryItOut:!1})))))))},getDefaultRequestBodyValue=(s,o,i,a)=>{const u=s.getIn([\"content\",o])??(0,ze.OrderedMap)(),_=u.get(\"schema\",(0,ze.OrderedMap)()).toJS(),w=void 0!==u.get(\"examples\"),x=u.get(\"example\"),C=w?u.getIn([\"examples\",i,\"value\"]):x;return stringify(a.getSampleSchema(_,o,{includeWriteOnly:!0},C))},components_request_body=({userHasEditedBody:s,requestBody:o,requestBodyValue:i,requestBodyInclusionSetting:a,requestBodyErrors:u,getComponent:_,getConfigs:w,specSelectors:x,fn:C,contentType:j,isExecute:L,specPath:B,onChange:$,onChangeIncludeEmpty:V,activeExamplesKey:U,updateActiveExamplesKey:z,setRetainRequestBodyValueFlag:Y})=>{const handleFile=s=>{$(s.target.files[0])},setIsIncludedOptions=s=>{let o={key:s,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===a.get(s,\"no value\")&&(o.shouldDispatchInit=!0),o},Z=_(\"Markdown\",!0),ee=_(\"modelExample\"),ie=_(\"RequestBodyEditor\"),ae=_(\"HighlightCode\",!0),ce=_(\"ExamplesSelectValueRetainer\"),le=_(\"Example\"),pe=_(\"ParameterIncludeEmpty\"),{showCommonExtensions:de}=w(),fe=o?.get(\"description\")??null,ye=o?.get(\"content\")??new ze.OrderedMap;j=j||ye.keySeq().first()||\"\";const be=ye.get(j)??(0,ze.OrderedMap)(),_e=be.get(\"schema\",(0,ze.OrderedMap)()),Se=be.get(\"examples\",null),we=Se?.map(((s,i)=>{const a=s?.get(\"value\",null);return a&&(s=s.set(\"value\",getDefaultRequestBodyValue(o,j,i,C),a)),s}));u=ze.List.isList(u)?u:(0,ze.List)();if(C.isFileUploadIntended(be?.get(\"schema\"),j)){const s=_(\"Input\");return L?Re.createElement(s,{type:\"file\",onChange:handleFile}):Re.createElement(\"i\",null,\"Example values are not available for \",Re.createElement(\"code\",null,j),\" media types.\")}if(!be.size)return null;if(C.hasSchemaType(be.get(\"schema\"),\"object\")&&(\"application/x-www-form-urlencoded\"===j||0===j.indexOf(\"multipart/\"))&&_e.get(\"properties\",(0,ze.OrderedMap)()).size>0){const s=_(\"JsonSchemaForm\"),o=_(\"ParameterExt\"),j=_e.get(\"properties\",(0,ze.OrderedMap)());return i=ze.Map.isMap(i)?i:(0,ze.OrderedMap)(),Re.createElement(\"div\",{className:\"table-container\"},fe&&Re.createElement(Z,{source:fe}),Re.createElement(\"table\",null,Re.createElement(\"tbody\",null,ze.Map.isMap(j)&&j.entrySeq().map((([j,U])=>{if(U.get(\"readOnly\"))return;const z=U.get(\"oneOf\")?.get(0)?.toJS(),Y=U.get(\"anyOf\")?.get(0)?.toJS();U=(0,ze.fromJS)(C.mergeJsonSchema(U.toJS(),z??Y??{}));let ie=de?getCommonExtensions(U):null;const ae=_e.get(\"required\",(0,ze.List)()).includes(j),ce=C.getSchemaObjectType(U),le=C.getSchemaObjectTypeLabel(U),fe=C.getSchemaObjectType(U?.get(\"items\")),ye=U.get(\"format\"),be=U.get(\"description\"),Se=i.getIn([j,\"value\"]),we=i.getIn([j,\"errors\"])||u,xe=a.get(j)||!1;let Pe=C.getSampleSchema(U,!1,{includeWriteOnly:!0});!1===Pe&&(Pe=\"false\"),0===Pe&&(Pe=\"0\"),\"string\"!=typeof Pe&&\"object\"===ce&&(Pe=stringify(Pe)),\"string\"==typeof Pe&&\"array\"===ce&&(Pe=JSON.parse(Pe));const Te=C.isFileUploadIntended(U),$e=Re.createElement(s,{fn:C,dispatchInitialValue:!Te,schema:U,description:j,getComponent:_,value:void 0===Se?Pe:Se,required:ae,errors:we,onChange:s=>{$(s,[j])}});return Re.createElement(\"tr\",{key:j,className:\"parameters\",\"data-property-name\":j},Re.createElement(\"td\",{className:\"parameters-col_name\"},Re.createElement(\"div\",{className:ae?\"parameter__name required\":\"parameter__name\"},j,ae?Re.createElement(\"span\",null,\" *\"):null),Re.createElement(\"div\",{className:\"parameter__type\"},le,ye&&Re.createElement(\"span\",{className:\"prop-format\"},\"($\",ye,\")\"),de&&ie.size?ie.entrySeq().map((([s,i])=>Re.createElement(o,{key:`${s}-${i}`,xKey:s,xVal:i}))):null),Re.createElement(\"div\",{className:\"parameter__deprecated\"},U.get(\"deprecated\")?\"deprecated\":null)),Re.createElement(\"td\",{className:\"parameters-col_description\"},Re.createElement(Z,{source:be}),L?Re.createElement(\"div\",null,\"object\"===ce||\"object\"===fe?Re.createElement(ee,{getComponent:_,specPath:B.push(\"schema\"),getConfigs:w,isExecute:L,specSelectors:x,schema:U,example:$e}):$e,ae?null:Re.createElement(pe,{onChange:s=>V(j,s),isIncluded:xe,isIncludedOptions:setIsIncludedOptions(j),isDisabled:Array.isArray(Se)?0!==Se.length:!isEmptyValue(Se)})):null))})))))}const xe=getDefaultRequestBodyValue(o,j,U,C);let Pe=null;getKnownSyntaxHighlighterLanguage(xe)&&(Pe=\"json\");const Te=L?Re.createElement(ie,{value:i,errors:u,defaultValue:xe,onChange:$,getComponent:_}):Re.createElement(ae,{className:\"body-param__example\",language:Pe},stringify(i)||xe);return Re.createElement(\"div\",null,fe&&Re.createElement(Z,{source:fe}),we?Re.createElement(ce,{userHasEditedBody:s,examples:we,currentKey:U,currentUserInputValue:i,onSelect:s=>{z(s)},updateValue:$,defaultToFirstExample:!0,getComponent:_,setRetainRequestBodyValueFlag:Y}):null,Re.createElement(ee,{getComponent:_,getConfigs:w,specSelectors:x,expandDepth:1,isExecute:L,schema:be.get(\"schema\"),specPath:B.push(\"content\",j),example:Te,includeWriteOnly:!0}),we?Re.createElement(le,{example:we.get(U),getComponent:_,getConfigs:w}):null)};class operation_link_OperationLink extends Re.Component{render(){const{link:s,name:o,getComponent:i}=this.props,a=i(\"Markdown\",!0);let u=s.get(\"operationId\")||s.get(\"operationRef\"),_=s.get(\"parameters\")&&s.get(\"parameters\").toJS(),w=s.get(\"description\");return Re.createElement(\"div\",{className:\"operation-link\"},Re.createElement(\"div\",{className:\"description\"},Re.createElement(\"b\",null,Re.createElement(\"code\",null,o)),w?Re.createElement(a,{source:w}):null),Re.createElement(\"pre\",null,\"Operation `\",u,\"`\",Re.createElement(\"br\",null),Re.createElement(\"br\",null),\"Parameters \",function padString(s,o){if(\"string\"!=typeof o)return\"\";return o.split(\"\\n\").map(((o,i)=>i>0?Array(s+1).join(\" \")+o:o)).join(\"\\n\")}(0,JSON.stringify(_,null,2))||\"{}\",Re.createElement(\"br\",null)))}}const VP=operation_link_OperationLink,components_servers=({servers:s,currentServer:o,setSelectedServer:i,setServerVariableValue:a,getServerVariable:u,getEffectiveServerValue:_})=>{const w=(s.find((s=>s.get(\"url\")===o))||(0,ze.OrderedMap)()).get(\"variables\")||(0,ze.OrderedMap)(),x=0!==w.size;(0,Re.useEffect)((()=>{o||i(s.first()?.get(\"url\"))}),[]),(0,Re.useEffect)((()=>{const u=s.find((s=>s.get(\"url\")===o));if(!u)return void i(s.first().get(\"url\"));(u.get(\"variables\")||(0,ze.OrderedMap)()).map(((s,i)=>{a({server:o,key:i,val:s.get(\"default\")||\"\"})}))}),[o,s]);const C=(0,Re.useCallback)((s=>{i(s.target.value)}),[i]),j=(0,Re.useCallback)((s=>{const i=s.target.getAttribute(\"data-variable\"),u=s.target.value;a({server:o,key:i,val:u})}),[a,o]);return Re.createElement(\"div\",{className:\"servers\"},Re.createElement(\"label\",{htmlFor:\"servers\"},Re.createElement(\"select\",{onChange:C,value:o,id:\"servers\"},s.valueSeq().map((s=>Re.createElement(\"option\",{value:s.get(\"url\"),key:s.get(\"url\")},s.get(\"url\"),s.get(\"description\")&&` - ${s.get(\"description\")}`))).toArray())),x&&Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",Re.createElement(\"code\",null,_(o))),Re.createElement(\"h4\",null,\"Server variables\"),Re.createElement(\"table\",null,Re.createElement(\"tbody\",null,w.entrySeq().map((([s,i])=>Re.createElement(\"tr\",{key:s},Re.createElement(\"td\",null,s),Re.createElement(\"td\",null,i.get(\"enum\")?Re.createElement(\"select\",{\"data-variable\":s,onChange:j},i.get(\"enum\").map((i=>Re.createElement(\"option\",{selected:i===u(o,s),key:i,value:i},i)))):Re.createElement(\"input\",{type:\"text\",value:u(o,s)||\"\",onChange:j,\"data-variable\":s})))))))))};class ServersContainer extends Re.Component{render(){const{specSelectors:s,oas3Selectors:o,oas3Actions:i,getComponent:a}=this.props,u=s.servers(),_=a(\"Servers\");return u&&u.size?Re.createElement(\"div\",null,Re.createElement(\"span\",{className:\"servers-title\"},\"Servers\"),Re.createElement(_,{servers:u,currentServer:o.selectedServer(),setSelectedServer:i.setSelectedServer,setServerVariableValue:i.setServerVariableValue,getServerVariable:o.serverVariableValue,getEffectiveServerValue:o.serverEffectiveValue})):null}}const UP=Function.prototype;class RequestBodyEditor extends Re.PureComponent{static defaultProps={onChange:UP,userHasEditedBody:!1};constructor(s,o){super(s,o),this.state={value:stringify(s.value)||s.defaultValue},s.onChange(s.value)}applyDefaultValue=s=>{const{onChange:o,defaultValue:i}=s||this.props;return this.setState({value:i}),o(i)};onChange=s=>{this.props.onChange(stringify(s))};onDomChange=s=>{const o=s.target.value;this.setState({value:o},(()=>this.onChange(o)))};UNSAFE_componentWillReceiveProps(s){this.props.value!==s.value&&s.value!==this.state.value&&this.setState({value:stringify(s.value)}),!s.value&&s.defaultValue&&this.state.value&&this.applyDefaultValue(s)}render(){let{getComponent:s,errors:o}=this.props,{value:i}=this.state,a=o.size>0;const u=s(\"TextArea\");return Re.createElement(\"div\",{className:\"body-param\"},Re.createElement(u,{className:Jn()(\"body-param__text\",{invalid:a}),title:o.size?o.join(\", \"):\"\",value:i,onChange:this.onDomChange}))}}class HttpAuth extends Re.Component{constructor(s,o){super(s,o);let{name:i,schema:a}=this.props,u=this.getValue();this.state={name:i,schema:a,value:u}}getValue(){let{name:s,authorized:o}=this.props;return o&&o.getIn([s,\"value\"])}onChange=s=>{let{onChange:o}=this.props,{value:i,name:a}=s.target,u=Object.assign({},this.state.value);a?u[a]=i:u=i,this.setState({value:u},(()=>o(this.state)))};render(){let{schema:s,getComponent:o,errSelectors:i,name:a,authSelectors:u}=this.props;const _=o(\"Input\"),w=o(\"Row\"),x=o(\"Col\"),C=o(\"authError\"),j=o(\"Markdown\",!0),L=o(\"JumpToPath\",!0),B=(s.get(\"scheme\")||\"\").toLowerCase(),$=u.selectAuthPath(a);let V=this.getValue(),U=i.allErrors().filter((s=>s.get(\"authId\")===a));if(\"basic\"===B){let o=V?V.get(\"username\"):null;return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,Re.createElement(\"code\",null,a),\"  (http, Basic)\",Re.createElement(L,{path:$})),o&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(j,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),o?Re.createElement(\"code\",null,\" \",o,\" \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),o?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),U.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o}))))}return\"bearer\"===B?Re.createElement(\"div\",null,Re.createElement(\"h4\",null,Re.createElement(\"code\",null,a),\"  (http, Bearer)\",Re.createElement(L,{path:$})),V&&Re.createElement(\"h6\",null,\"Authorized\"),Re.createElement(w,null,Re.createElement(j,{source:s.get(\"description\")})),Re.createElement(w,null,Re.createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),V?Re.createElement(\"code\",null,\" ****** \"):Re.createElement(x,null,Re.createElement(_,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),U.valueSeq().map(((s,o)=>Re.createElement(C,{error:s,key:o})))):Re.createElement(\"div\",null,Re.createElement(\"em\",null,Re.createElement(\"b\",null,a),\" HTTP authentication: unsupported scheme \",`'${B}'`))}}class operation_servers_OperationServers extends Re.Component{setSelectedServer=s=>{const{path:o,method:i}=this.props;return this.forceUpdate(),this.props.setSelectedServer(s,`${o}:${i}`)};setServerVariableValue=s=>{const{path:o,method:i}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...s,namespace:`${o}:${i}`})};getSelectedServer=()=>{const{path:s,method:o}=this.props;return this.props.getSelectedServer(`${s}:${o}`)};getServerVariable=(s,o)=>{const{path:i,method:a}=this.props;return this.props.getServerVariable({namespace:`${i}:${a}`,server:s},o)};getEffectiveServerValue=s=>{const{path:o,method:i}=this.props;return this.props.getEffectiveServerValue({server:s,namespace:`${o}:${i}`})};render(){const{operationServers:s,pathServers:o,getComponent:i}=this.props;if(!s&&!o)return null;const a=i(\"Servers\"),u=s||o,_=s?\"operation\":\"path\";return Re.createElement(\"div\",{className:\"opblock-section operation-servers\"},Re.createElement(\"div\",{className:\"opblock-section-header\"},Re.createElement(\"div\",{className:\"tab-header\"},Re.createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),Re.createElement(\"div\",{className:\"opblock-description-wrapper\"},Re.createElement(\"h4\",{className:\"message\"},\"These \",_,\"-level options override the global server options.\"),Re.createElement(a,{servers:u,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const zP={Callbacks:callbacks,HttpAuth,RequestBody:components_request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers:operation_servers_OperationServers,operationLink:VP},WP=new Remarkable(\"commonmark\");WP.block.ruler.enable([\"table\"]),WP.set({linkTarget:\"_blank\"});const JP=OAS3ComponentWrapFactory((({source:s,className:o=\"\",getConfigs:i=()=>({useUnsafeMarkdown:!1})})=>{if(\"string\"!=typeof s)return null;if(s){const{useUnsafeMarkdown:a}=i(),u=sanitizer(WP.render(s),{useUnsafeMarkdown:a});let _;return\"string\"==typeof u&&(_=u.trim()),Re.createElement(\"div\",{dangerouslySetInnerHTML:{__html:_},className:Jn()(o,\"renderedMarkdown\")})}return null})),HP=OAS3ComponentWrapFactory((({Ori:s,...o})=>{const{schema:i,getComponent:a,errSelectors:u,authorized:_,onAuthChange:w,name:x,authSelectors:C}=o,j=a(\"HttpAuth\");return\"http\"===i.get(\"type\")?Re.createElement(j,{key:x,schema:i,name:x,errSelectors:u,authorized:_,getComponent:a,onChange:w,authSelectors:C}):Re.createElement(s,o)})),KP=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends Re.Component{render(){let{getConfigs:s,schema:o,Ori:i}=this.props,a=[\"model-box\"],u=null;return!0===o.get(\"deprecated\")&&(a.push(\"deprecated\"),u=Re.createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),Re.createElement(\"div\",{className:a.join(\" \")},u,Re.createElement(i,Mn()({},this.props,{getConfigs:s,depth:1,expandDepth:this.props.expandDepth||0})))}}const GP=OAS3ComponentWrapFactory(ModelComponent),YP=OAS3ComponentWrapFactory((({Ori:s,...o})=>{const{schema:i,getComponent:a,errors:u,onChange:_,fn:w}=o,x=w.isFileUploadIntended(i),C=a(\"Input\");return x?Re.createElement(C,{type:\"file\",className:u.length?\"invalid\":\"\",title:u.length?u:\"\",onChange:s=>{_(s.target.files[0])},disabled:s.isDisabled}):Re.createElement(s,o)})),XP={Markdown:JP,AuthItem:HP,OpenAPIVersion:function OAS30ComponentWrapFactory(s){return(o,i)=>a=>\"function\"==typeof i.specSelectors?.isOAS30?i.specSelectors.isOAS30()?Re.createElement(s,Mn()({},a,i,{Ori:o})):Re.createElement(o,a):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((s=>{const{Ori:o}=s;return Re.createElement(o,{oasVersion:\"3.0\"})})),JsonSchema_string:YP,model:GP,onlineValidatorBadge:KP},QP=\"oas3_set_servers\",ZP=\"oas3_set_request_body_value\",eI=\"oas3_set_request_body_retain_flag\",tI=\"oas3_set_request_body_inclusion\",rI=\"oas3_set_active_examples_member\",nI=\"oas3_set_request_content_type\",sI=\"oas3_set_response_content_type\",oI=\"oas3_set_server_variable_value\",iI=\"oas3_set_request_body_validate_error\",aI=\"oas3_clear_request_body_validate_error\",cI=\"oas3_clear_request_body_value\";function setSelectedServer(s,o){return{type:QP,payload:{selectedServerUrl:s,namespace:o}}}function setRequestBodyValue({value:s,pathMethod:o}){return{type:ZP,payload:{value:s,pathMethod:o}}}const setRetainRequestBodyValueFlag=({value:s,pathMethod:o})=>({type:eI,payload:{value:s,pathMethod:o}});function setRequestBodyInclusion({value:s,pathMethod:o,name:i}){return{type:tI,payload:{value:s,pathMethod:o,name:i}}}function setActiveExamplesMember({name:s,pathMethod:o,contextType:i,contextName:a}){return{type:rI,payload:{name:s,pathMethod:o,contextType:i,contextName:a}}}function setRequestContentType({value:s,pathMethod:o}){return{type:nI,payload:{value:s,pathMethod:o}}}function setResponseContentType({value:s,path:o,method:i}){return{type:sI,payload:{value:s,path:o,method:i}}}function setServerVariableValue({server:s,namespace:o,key:i,val:a}){return{type:oI,payload:{server:s,namespace:o,key:i,val:a}}}const setRequestBodyValidateError=({path:s,method:o,validationErrors:i})=>({type:iI,payload:{path:s,method:o,validationErrors:i}}),clearRequestBodyValidateError=({path:s,method:o})=>({type:aI,payload:{path:s,method:o}}),initRequestBodyValidateError=({pathMethod:s})=>({type:aI,payload:{path:s[0],method:s[1]}}),clearRequestBodyValue=({pathMethod:s})=>({type:cI,payload:{pathMethod:s}});var lI=__webpack_require__(60680),uI=__webpack_require__.n(lI);const oas3_selectors_onlyOAS3=s=>(o,...i)=>a=>{if(a.getSystem().specSelectors.isOAS3()){const u=s(o,...i);return\"function\"==typeof u?u(a):u}return null};const pI=oas3_selectors_onlyOAS3(((s,o)=>{const i=o?[o,\"selectedServer\"]:[\"selectedServer\"];return s.getIn(i)||\"\"})),hI=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"bodyValue\"])||null)),dI=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(s,o,i)=>s=>{const{oas3Selectors:a,specSelectors:u,fn:_}=s.getSystem();if(u.isOAS3()){const s=a.requestContentType(o,i);if(s)return getDefaultRequestBodyValue(u.specResolvedSubtree([\"paths\",o,i,\"requestBody\"]),s,a.activeExamplesMember(o,i,\"requestBody\",\"requestBody\"),_)}return null},fI=oas3_selectors_onlyOAS3(((s,o,i)=>s=>{const{oas3Selectors:a,specSelectors:u,fn:_}=s;let w=!1;const x=a.requestContentType(o,i);let C=a.requestBodyValue(o,i);const j=u.specResolvedSubtree([\"paths\",o,i,\"requestBody\"]);if(!j)return!1;if(ze.Map.isMap(C)&&(C=stringify(C.mapEntries((s=>ze.Map.isMap(s[1])?[s[0],s[1].get(\"value\")]:s)).toJS())),ze.List.isList(C)&&(C=stringify(C)),x){const s=getDefaultRequestBodyValue(j,x,a.activeExamplesMember(o,i,\"requestBody\",\"requestBody\"),_);w=!!C&&C!==s}return w})),mI=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"bodyInclusion\"])||(0,ze.Map)())),gI=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"errors\"])||null)),yI=oas3_selectors_onlyOAS3(((s,o,i,a,u)=>s.getIn([\"examples\",o,i,a,u,\"activeExample\"])||null)),vI=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"requestContentType\"])||null)),bI=oas3_selectors_onlyOAS3(((s,o,i)=>s.getIn([\"requestData\",o,i,\"responseContentType\"])||null)),_I=oas3_selectors_onlyOAS3(((s,o,i)=>{let a;if(\"string\"!=typeof o){const{server:s,namespace:u}=o;a=u?[u,\"serverVariableValues\",s,i]:[\"serverVariableValues\",s,i]}else{a=[\"serverVariableValues\",o,i]}return s.getIn(a)||null})),SI=oas3_selectors_onlyOAS3(((s,o)=>{let i;if(\"string\"!=typeof o){const{server:s,namespace:a}=o;i=a?[a,\"serverVariableValues\",s]:[\"serverVariableValues\",s]}else{i=[\"serverVariableValues\",o]}return s.getIn(i)||(0,ze.OrderedMap)()})),EI=oas3_selectors_onlyOAS3(((s,o)=>{var i,a;if(\"string\"!=typeof o){const{server:u,namespace:_}=o;a=u,i=_?s.getIn([_,\"serverVariableValues\",a]):s.getIn([\"serverVariableValues\",a])}else a=o,i=s.getIn([\"serverVariableValues\",a]);i=i||(0,ze.OrderedMap)();let u=a;return i.map(((s,o)=>{u=u.replace(new RegExp(`{${uI()(o)}}`,\"g\"),s)})),u})),wI=function validateRequestBodyIsRequired(s){return(...o)=>i=>{const a=i.getSystem().specSelectors.specJson();let u=[...o][1]||[];return!a.getIn([\"paths\",...u,\"requestBody\",\"required\"])||s(...o)}}(((s,o)=>((s,o)=>(o=o||[],!!s.getIn([\"requestData\",...o,\"bodyValue\"])))(s,o))),validateShallowRequired=(s,{oas3RequiredRequestBodyContentType:o,oas3RequestContentType:i,oas3RequestBodyValue:a})=>{let u=[];if(!ze.Map.isMap(a))return u;let _=[];return Object.keys(o.requestContentType).forEach((s=>{if(s===i){o.requestContentType[s].forEach((s=>{_.indexOf(s)<0&&_.push(s)}))}})),_.forEach((s=>{a.getIn([s,\"value\"])||u.push(s)})),u},xI=xs()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]),kI={[QP]:(s,{payload:{selectedServerUrl:o,namespace:i}})=>{const a=i?[i,\"selectedServer\"]:[\"selectedServer\"];return s.setIn(a,o)},[ZP]:(s,{payload:{value:o,pathMethod:i}})=>{let[a,u]=i;if(!ze.Map.isMap(o))return s.setIn([\"requestData\",a,u,\"bodyValue\"],o);let _,w=s.getIn([\"requestData\",a,u,\"bodyValue\"])||(0,ze.Map)();ze.Map.isMap(w)||(w=(0,ze.Map)());const[...x]=o.keys();return x.forEach((s=>{let i=o.getIn([s]);w.has(s)&&ze.Map.isMap(i)||(_=w.setIn([s,\"value\"],i))})),s.setIn([\"requestData\",a,u,\"bodyValue\"],_)},[eI]:(s,{payload:{value:o,pathMethod:i}})=>{let[a,u]=i;return s.setIn([\"requestData\",a,u,\"retainBodyValue\"],o)},[tI]:(s,{payload:{value:o,pathMethod:i,name:a}})=>{let[u,_]=i;return s.setIn([\"requestData\",u,_,\"bodyInclusion\",a],o)},[rI]:(s,{payload:{name:o,pathMethod:i,contextType:a,contextName:u}})=>{let[_,w]=i;return s.setIn([\"examples\",_,w,a,u,\"activeExample\"],o)},[nI]:(s,{payload:{value:o,pathMethod:i}})=>{let[a,u]=i;return s.setIn([\"requestData\",a,u,\"requestContentType\"],o)},[sI]:(s,{payload:{value:o,path:i,method:a}})=>s.setIn([\"requestData\",i,a,\"responseContentType\"],o),[oI]:(s,{payload:{server:o,namespace:i,key:a,val:u}})=>{const _=i?[i,\"serverVariableValues\",o,a]:[\"serverVariableValues\",o,a];return s.setIn(_,u)},[iI]:(s,{payload:{path:o,method:i,validationErrors:a}})=>{let u=[];if(u.push(\"Required field is not provided\"),a.missingBodyValue)return s.setIn([\"requestData\",o,i,\"errors\"],(0,ze.fromJS)(u));if(a.missingRequiredKeys&&a.missingRequiredKeys.length>0){const{missingRequiredKeys:_}=a;return s.updateIn([\"requestData\",o,i,\"bodyValue\"],(0,ze.fromJS)({}),(s=>_.reduce(((s,o)=>s.setIn([o,\"errors\"],(0,ze.fromJS)(u))),s)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),s},[aI]:(s,{payload:{path:o,method:i}})=>{const a=s.getIn([\"requestData\",o,i,\"bodyValue\"]);if(!ze.Map.isMap(a))return s.setIn([\"requestData\",o,i,\"errors\"],(0,ze.fromJS)([]));const[...u]=a.keys();return u?s.updateIn([\"requestData\",o,i,\"bodyValue\"],(0,ze.fromJS)({}),(s=>u.reduce(((s,o)=>s.setIn([o,\"errors\"],(0,ze.fromJS)([]))),s))):s},[cI]:(s,{payload:{pathMethod:o}})=>{let[i,a]=o;const u=s.getIn([\"requestData\",i,a,\"bodyValue\"]);return u?ze.Map.isMap(u)?s.setIn([\"requestData\",i,a,\"bodyValue\"],(0,ze.Map)()):s.setIn([\"requestData\",i,a,\"bodyValue\"],\"\"):s}};function oas3({getSystem:s}){const o=(s=>(o,i=null)=>{const{getConfigs:a,fn:u}=s(),{fileUploadMediaTypes:_}=a();if(\"string\"==typeof i&&_.some((s=>i.startsWith(s))))return!0;const w=ze.Map.isMap(o);if(!w&&!as()(o))return!1;const x=w?o.get(\"format\"):o.format;return u.hasSchemaType(o,\"string\")&&[\"binary\",\"byte\"].includes(x)})(s);return{components:zP,wrapComponents:XP,statePlugins:{spec:{wrapSelectors:Se,selectors:xe},auth:{wrapSelectors:we},oas3:{actions:{...Pe},reducers:kI,selectors:{...Te}}},fn:{isFileUploadIntended:o,isFileUploadIntendedOAS30:o}}}const webhooks=({specSelectors:s,getComponent:o})=>{const i=s.selectWebhooksOperations(),a=Object.keys(i),u=o(\"OperationContainer\",!0);return 0===a.length?null:Re.createElement(\"div\",{className:\"webhooks\"},Re.createElement(\"h2\",null,\"Webhooks\"),a.map((s=>Re.createElement(\"div\",{key:`${s}-webhook`},i[s].map((o=>Re.createElement(u,{key:`${s}-${o.method}-webhook`,op:o.operation,tag:\"webhooks\",method:o.method,path:s,specPath:(0,ze.List)(o.specPath),allowTryItOut:!1})))))))},oas31_components_license=({getComponent:s,specSelectors:o})=>{const i=o.selectLicenseNameField(),a=o.selectLicenseUrl(),u=s(\"Link\");return Re.createElement(\"div\",{className:\"info__license\"},a?Re.createElement(\"div\",{className:\"info__license__url\"},Re.createElement(u,{target:\"_blank\",href:sanitizeUrl(a)},i)):Re.createElement(\"span\",null,i))},oas31_components_contact=({getComponent:s,specSelectors:o})=>{const i=o.selectContactNameField(),a=o.selectContactUrl(),u=o.selectContactEmailField(),_=s(\"Link\");return Re.createElement(\"div\",{className:\"info__contact\"},a&&Re.createElement(\"div\",null,Re.createElement(_,{href:sanitizeUrl(a),target:\"_blank\"},i,\" - Website\")),u&&Re.createElement(_,{href:sanitizeUrl(`mailto:${u}`)},a?`Send email to ${i}`:`Contact ${i}`))},oas31_components_info=({getComponent:s,specSelectors:o})=>{const i=o.version(),a=o.url(),u=o.basePath(),_=o.host(),w=o.selectInfoSummaryField(),x=o.selectInfoDescriptionField(),C=o.selectInfoTitleField(),j=o.selectInfoTermsOfServiceUrl(),L=o.selectExternalDocsUrl(),B=o.selectExternalDocsDescriptionField(),$=o.contact(),V=o.license(),U=s(\"Markdown\",!0),z=s(\"Link\"),Y=s(\"VersionStamp\"),Z=s(\"OpenAPIVersion\"),ee=s(\"InfoUrl\"),ie=s(\"InfoBasePath\"),ae=s(\"License\",!0),ce=s(\"Contact\",!0),le=s(\"JsonSchemaDialect\",!0);return Re.createElement(\"div\",{className:\"info\"},Re.createElement(\"hgroup\",{className:\"main\"},Re.createElement(\"h2\",{className:\"title\"},C,Re.createElement(\"span\",null,i&&Re.createElement(Y,{version:i}),Re.createElement(Z,{oasVersion:\"3.1\"}))),(_||u)&&Re.createElement(ie,{host:_,basePath:u}),a&&Re.createElement(ee,{getComponent:s,url:a})),w&&Re.createElement(\"p\",{className:\"info__summary\"},w),Re.createElement(\"div\",{className:\"info__description description\"},Re.createElement(U,{source:x})),j&&Re.createElement(\"div\",{className:\"info__tos\"},Re.createElement(z,{target:\"_blank\",href:sanitizeUrl(j)},\"Terms of service\")),$.size>0&&Re.createElement(ce,null),V.size>0&&Re.createElement(ae,null),L&&Re.createElement(z,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(L)},B||L),Re.createElement(le,null))},json_schema_dialect=({getComponent:s,specSelectors:o})=>{const i=o.selectJsonSchemaDialectField(),a=o.selectJsonSchemaDialectDefault(),u=s(\"Link\");return Re.createElement(Re.Fragment,null,i&&i===a&&Re.createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",Re.createElement(u,{target:\"_blank\",href:sanitizeUrl(i)},i)),i&&i!==a&&Re.createElement(\"div\",{className:\"error-wrapper\"},Re.createElement(\"div\",{className:\"no-margin\"},Re.createElement(\"div\",{className:\"errors\"},Re.createElement(\"div\",{className:\"errors-wrapper\"},Re.createElement(\"h4\",{className:\"center\"},\"Warning\"),Re.createElement(\"p\",{className:\"message\"},Re.createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",Re.createElement(u,{target:\"_blank\",href:a},a),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))},version_pragma_filter=({bypass:s,isSwagger2:o,isOAS3:i,isOAS31:a,alsoShow:u,children:_})=>s?Re.createElement(\"div\",null,_):o&&(i||a)?Re.createElement(\"div\",{className:\"version-pragma\"},u,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,Re.createElement(\"code\",null,\"swagger\"),\" and \",Re.createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),Re.createElement(\"p\",null,\"Supported version fields are \",Re.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",Re.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):o||i||a?Re.createElement(\"div\",null,_):Re.createElement(\"div\",{className:\"version-pragma\"},u,Re.createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},Re.createElement(\"div\",null,Re.createElement(\"h3\",null,\"Unable to render this definition\"),Re.createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),Re.createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",Re.createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",Re.createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",Re.createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))),getModelName=s=>\"string\"==typeof s&&s.includes(\"#/components/schemas/\")?(s=>{const o=s.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(o)}catch{return o}})(s.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,OI=(0,Re.forwardRef)((({schema:s,getComponent:o,onToggle:i=()=>{},specPath:a},u)=>{const _=o(\"JSONSchema202012\"),w=getModelName(s.get(\"$$ref\")),x=(0,Re.useCallback)(((s,o)=>{i(w,o)}),[w,i]);return Re.createElement(_,{name:w,schema:s.toJS(),ref:u,onExpand:x,identifier:a.toJS().join(\"_\")})})),CI=OI,models=({specActions:s,specSelectors:o,layoutSelectors:i,layoutActions:a,getComponent:u,getConfigs:_,fn:w})=>{const x=o.selectSchemas(),C=Object.keys(x).length>0,j=[\"components\",\"schemas\"],{docExpansion:L,defaultModelsExpandDepth:B}=_(),$=B>0&&\"none\"!==L,V=i.isShown(j,$),U=u(\"Collapse\"),z=u(\"JSONSchema202012\"),Y=u(\"ArrowUpIcon\"),Z=u(\"ArrowDownIcon\"),{getTitle:ee}=w.jsonSchema202012.useFn();(0,Re.useEffect)((()=>{const i=V&&B>1,a=null!=o.specResolvedSubtree(j);i&&!a&&s.requestResolvedSubtree(j)}),[V,B]);const ie=(0,Re.useCallback)((()=>{a.show(j,!V)}),[V]),ae=(0,Re.useCallback)((s=>{null!==s&&a.readyToScroll(j,s)}),[]),handleJSONSchema202012Ref=s=>o=>{null!==o&&a.readyToScroll([...j,s],o)},handleJSONSchema202012Expand=i=>(a,u)=>{if(u){const a=[...j,i];null!=o.specResolvedSubtree(a)||s.requestResolvedSubtree([...j,i])}};return!C||B<0?null:Re.createElement(\"section\",{className:Jn()(\"models\",{\"is-open\":V}),ref:ae},Re.createElement(\"h4\",null,Re.createElement(\"button\",{\"aria-expanded\":V,className:\"models-control\",onClick:ie},Re.createElement(\"span\",null,\"Schemas\"),V?Re.createElement(Y,null):Re.createElement(Z,null))),Re.createElement(U,{isOpened:V},Object.entries(x).map((([s,o])=>{const i=ee(o,{lookup:\"basic\"})||s;return Re.createElement(z,{key:s,ref:handleJSONSchema202012Ref(s),schema:o,name:i,onExpand:handleJSONSchema202012Expand(s)})}))))},mutual_tls_auth=({schema:s,getComponent:o,name:i,authSelectors:a})=>{const u=o(\"JumpToPath\",!0),_=a.selectAuthPath(i);return Re.createElement(\"div\",null,Re.createElement(\"h4\",null,i,\" (mutualTLS) \",Re.createElement(u,{path:_})),Re.createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),Re.createElement(\"p\",null,s.get(\"description\")))};class auths_Auths extends Re.Component{constructor(s,o){super(s,o),this.state={}}onAuthChange=s=>{let{name:o}=s;this.setState({[o]:s})};submitAuth=s=>{s.preventDefault();let{authActions:o}=this.props;o.authorizeWithPersistOption(this.state)};logoutClick=s=>{s.preventDefault();let{authActions:o,definitions:i}=this.props,a=i.map(((s,o)=>o)).toArray();this.setState(a.reduce(((s,o)=>(s[o]=\"\",s)),{})),o.logoutWithPersistOption(a)};close=s=>{s.preventDefault();let{authActions:o}=this.props;o.showDefinitions(!1)};render(){let{definitions:s,getComponent:o,authSelectors:i,errSelectors:a}=this.props;const u=o(\"AuthItem\"),_=o(\"oauth2\",!0),w=o(\"Button\"),x=i.authorized(),C=s.filter(((s,o)=>!!x.get(o))),j=s.filter((s=>\"oauth2\"!==s.get(\"type\")&&\"mutualTLS\"!==s.get(\"type\"))),L=s.filter((s=>\"oauth2\"===s.get(\"type\"))),B=s.filter((s=>\"mutualTLS\"===s.get(\"type\")));return Re.createElement(\"div\",{className:\"auth-container\"},j.size>0&&Re.createElement(\"form\",{onSubmit:this.submitAuth},j.map(((s,_)=>Re.createElement(u,{key:_,schema:s,name:_,getComponent:o,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a,authSelectors:i}))).toArray(),Re.createElement(\"div\",{className:\"auth-btn-wrapper\"},j.size===C.size?Re.createElement(w,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):Re.createElement(w,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),Re.createElement(w,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),L.size>0?Re.createElement(\"div\",null,Re.createElement(\"div\",{className:\"scope-def\"},Re.createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),Re.createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),s.filter((s=>\"oauth2\"===s.get(\"type\"))).map(((s,o)=>Re.createElement(\"div\",{key:o},Re.createElement(_,{authorized:x,schema:s,name:o})))).toArray()):null,B.size>0&&Re.createElement(\"div\",null,B.map(((s,_)=>Re.createElement(u,{key:_,schema:s,name:_,getComponent:o,onAuthChange:this.onAuthChange,authorized:x,errSelectors:a,authSelectors:i}))).toArray()))}}const AI=auths_Auths,isOAS31=s=>{const o=s.get(\"openapi\");return\"string\"==typeof o&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(o)},fn_createOnlyOAS31Selector=s=>(o,...i)=>a=>{if(a.getSystem().specSelectors.isOAS31()){const u=s(o,...i);return\"function\"==typeof u?u(a):u}return null},createOnlyOAS31SelectorWrapper=s=>(o,i)=>(a,...u)=>{if(i.getSystem().specSelectors.isOAS31()){const _=s(a,...u);return\"function\"==typeof _?_(o,i):_}return o(...u)},fn_createSystemSelector=s=>(o,...i)=>a=>{const u=s(o,a,...i);return\"function\"==typeof u?u(a):u},createOnlyOAS31ComponentWrapper=s=>(o,i)=>a=>i.specSelectors.isOAS31()?Re.createElement(s,Mn()({},a,{originalComponent:o,getSystem:i.getSystem})):Re.createElement(o,a),wrapOAS31Fn=(s,o)=>{const{fn:i,specSelectors:a}=o;return Object.fromEntries(Object.entries(s).map((([s,o])=>{const u=i[s];return[s,(...s)=>a.isOAS31()?o(...s):\"function\"==typeof u?u(...s):void 0]})))},jI=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const o=s().getComponent(\"OAS31License\",!0);return Re.createElement(o,null)})),PI=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const o=s().getComponent(\"OAS31Contact\",!0);return Re.createElement(o,null)})),II=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const o=s().getComponent(\"OAS31Info\",!0);return Re.createElement(o,null)})),getProperties=(s,{includeReadOnly:o,includeWriteOnly:i})=>{if(!s?.properties)return{};const a=Object.entries(s.properties).filter((([,s])=>(!(!0===s?.readOnly)||o)&&(!(!0===s?.writeOnly)||i)));return Object.fromEntries(a)},makeGetSchemaKeywords=s=>{if(\"function\"!=typeof s)return null;const o=s();return()=>[...o,\"discriminator\",\"xml\",\"externalDocs\",\"example\",\"$$ref\"]},TI=createOnlyOAS31ComponentWrapper((({getSystem:s,...o})=>{const i=s(),{getComponent:a,fn:u,getConfigs:_}=i,w=_(),x=a(\"OAS31Model\"),C=a(\"withJSONSchema202012SystemContext\");return TI.ModelWithJSONSchemaContext??=C(x,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:w.defaultModelExpandDepth,includeReadOnly:o.includeReadOnly,includeWriteOnly:o.includeWriteOnly},fn:{getProperties:u.jsonSchema202012.getProperties,isExpandable:u.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(u.jsonSchema202012.getSchemaKeywords)}}),Re.createElement(TI.ModelWithJSONSchemaContext,o)})),NI=TI,MI=createOnlyOAS31ComponentWrapper((({getSystem:s})=>{const{getComponent:o,fn:i,getConfigs:a}=s(),u=a();if(MI.ModelsWithJSONSchemaContext)return Re.createElement(MI.ModelsWithJSONSchemaContext,null);const _=o(\"OAS31Models\",!0),w=o(\"withJSONSchema202012SystemContext\");return MI.ModelsWithJSONSchemaContext??=w(_,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:u.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},fn:{getProperties:i.jsonSchema202012.getProperties,isExpandable:i.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(i.jsonSchema202012.getSchemaKeywords)}}),Re.createElement(MI.ModelsWithJSONSchemaContext,null)}));MI.ModelsWithJSONSchemaContext=null;const RI=MI,wrap_components_version_pragma_filter=(s,o)=>s=>{const i=o.specSelectors.isOAS31(),a=o.getComponent(\"OAS31VersionPragmaFilter\");return Re.createElement(a,Mn()({isOAS31:i},s))},DI=createOnlyOAS31ComponentWrapper((({originalComponent:s,...o})=>{const{getComponent:i,schema:a,name:u}=o,_=i(\"MutualTLSAuth\",!0);return\"mutualTLS\"===a.get(\"type\")?Re.createElement(_,{schema:a,name:u}):Re.createElement(s,o)})),LI=DI,FI=createOnlyOAS31ComponentWrapper((({getSystem:s,...o})=>{const i=s().getComponent(\"OAS31Auths\",!0);return Re.createElement(i,o)})),BI=(0,ze.Map)(),$I=Vt(((s,o)=>o.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>s=>{const o=s.specSelectors.specJson().get(\"webhooks\");return ze.Map.isMap(o)?o:BI},qI=Vt([(s,o)=>o.specSelectors.webhooks(),(s,o)=>o.specSelectors.validOperationMethods(),(s,o)=>o.specSelectors.specResolvedSubtree([\"webhooks\"])],((s,o)=>s.reduce(((s,i,a)=>{if(!ze.Map.isMap(i))return s;const u=i.entrySeq().filter((([s])=>o.includes(s))).map((([s,o])=>({operation:(0,ze.Map)({operation:o}),method:s,path:a,specPath:[\"webhooks\",a,s]})));return s.concat(u)}),(0,ze.List)()).groupBy((s=>s.path)).map((s=>s.toArray())).toObject())),selectors_license=()=>s=>{const o=s.specSelectors.info().get(\"license\");return ze.Map.isMap(o)?o:BI},selectLicenseNameField=()=>s=>s.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>s=>s.specSelectors.license().get(\"url\"),VI=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectLicenseUrlField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectLicenseIdentifierField=()=>s=>s.specSelectors.license().get(\"identifier\"),selectors_contact=()=>s=>{const o=s.specSelectors.info().get(\"contact\");return ze.Map.isMap(o)?o:BI},selectContactNameField=()=>s=>s.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>s=>s.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>s=>s.specSelectors.contact().get(\"url\"),UI=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectContactUrlField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectInfoTitleField=()=>s=>s.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>s=>s.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>s=>s.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>s=>s.specSelectors.info().get(\"termsOfService\"),zI=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectInfoTermsOfServiceField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectExternalDocsDescriptionField=()=>s=>s.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>s=>s.specSelectors.externalDocs().get(\"url\"),WI=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectExternalDocsUrlField()],((s,o,i)=>{if(i)return safeBuildUrl(i,s,{selectedServer:o})})),selectJsonSchemaDialectField=()=>s=>s.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",JI=Vt(((s,o)=>o.specSelectors.definitions()),((s,o)=>o.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((s,o)=>ze.Map.isMap(s)?ze.Map.isMap(o)?Object.entries(s.toJS()).reduce(((s,[i,a])=>{const u=o.get(i);return s[i]=u?.toJS()||a,s}),{}):s.toJS():{})),wrap_selectors_isOAS3=(s,o)=>(i,...a)=>o.specSelectors.isOAS31()||s(...a),HI=createOnlyOAS31SelectorWrapper((()=>(s,o)=>o.oas31Selectors.selectLicenseUrl())),KI=createOnlyOAS31SelectorWrapper((()=>(s,o)=>{const i=o.specSelectors.securityDefinitions();let a=s();return i?(i.entrySeq().forEach((([s,o])=>{const i=o?.get(\"type\");\"mutualTLS\"===i&&(a=a.push(new ze.Map({[s]:o})))})),a):a})),GI=Vt([(s,o)=>o.specSelectors.url(),(s,o)=>o.oas3Selectors.selectedServer(),(s,o)=>o.specSelectors.selectLicenseUrlField(),(s,o)=>o.specSelectors.selectLicenseIdentifierField()],((s,o,i,a)=>i?safeBuildUrl(i,s,{selectedServer:o}):a?`https://spdx.org/licenses/${a}.html`:void 0)),keywords_Example=({schema:s,getSystem:o})=>{const{fn:i,getComponent:a}=o(),{hasKeyword:u}=i.jsonSchema202012.useFn(),_=a(\"JSONSchema202012JSONViewer\");return u(s,\"example\")?Re.createElement(_,{name:\"Example\",value:s.example,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"}):null},keywords_Xml=({schema:s,getSystem:o})=>{const i=s?.xml||{},{fn:a,getComponent:u,getConfigs:_}=o(),{showExtensions:w}=_(),{useComponent:x,useIsExpanded:C,usePath:j,useLevel:L}=a.jsonSchema202012,{path:B}=j(\"xml\"),{isExpanded:$,setExpanded:V,setCollapsed:U}=C(\"xml\"),[z,Y]=L(),Z=w?getExtensions(i):[],ee=!!(i.name||i.namespace||i.prefix||Z.length>0),ie=x(\"Accordion\"),ae=x(\"ExpandDeepButton\"),ce=u(\"OpenAPI31Extensions\"),le=u(\"JSONSchema202012PathContext\")(),pe=u(\"JSONSchema202012LevelContext\")(),de=(0,Re.useCallback)((()=>{$?U():V()}),[$,V,U]),fe=(0,Re.useCallback)(((s,o)=>{o?V({deep:!0}):U({deep:!0})}),[V,U]);return 0===Object.keys(i).length?null:Re.createElement(le.Provider,{value:B},Re.createElement(pe.Provider,{value:Y},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\",\"data-json-schema-level\":z},ee?Re.createElement(Re.Fragment,null,Re.createElement(ie,{expanded:$,onChange:de},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),Re.createElement(ae,{expanded:$,onClick:fe})):Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===i.attribute&&Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===i.wrapped&&Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!$})},$&&Re.createElement(Re.Fragment,null,i.name&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i.name))),i.namespace&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i.namespace))),i.prefix&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},i.prefix)))),Z.length>0&&Re.createElement(ce,{openAPISpecObj:i,openAPIExtensions:Z,getSystem:o})))))},Discriminator_DiscriminatorMapping=({discriminator:s})=>{const o=s?.mapping||{};return 0===Object.keys(o).length?null:Object.entries(o).map((([s,o])=>Re.createElement(\"div\",{key:`${s}-${o}`,className:\"json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},s),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},o))))},keywords_Discriminator_Discriminator=({schema:s,getSystem:o})=>{const i=s?.discriminator||{},{fn:a,getComponent:u,getConfigs:_}=o(),{showExtensions:w}=_(),{useComponent:x,useIsExpanded:C,usePath:j,useLevel:L}=a.jsonSchema202012,B=\"discriminator\",{path:$}=j(B),{isExpanded:V,setExpanded:U,setCollapsed:z}=C(B),[Y,Z]=L(),ee=w?getExtensions(i):[],ie=!!(i.mapping||ee.length>0),ae=x(\"Accordion\"),ce=x(\"ExpandDeepButton\"),le=u(\"OpenAPI31Extensions\"),pe=u(\"JSONSchema202012PathContext\")(),de=u(\"JSONSchema202012LevelContext\")(),fe=(0,Re.useCallback)((()=>{V?z():U()}),[V,U,z]),ye=(0,Re.useCallback)(((s,o)=>{o?U({deep:!0}):z({deep:!0})}),[U,z]);return 0===Object.keys(i).length?null:Re.createElement(pe.Provider,{value:$},Re.createElement(de.Provider,{value:Z},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\",\"data-json-schema-level\":Y},ie?Re.createElement(Re.Fragment,null,Re.createElement(ae,{expanded:V,onChange:fe},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),Re.createElement(ce,{expanded:V,onClick:ye})):Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),i.propertyName&&Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},i.propertyName),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!V})},V&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(Discriminator_DiscriminatorMapping,{discriminator:i})),ee.length>0&&Re.createElement(le,{openAPISpecObj:i,openAPIExtensions:ee,getSystem:o})))))},keywords_OpenAPIExtensions=({openAPISpecObj:s,getSystem:o,openAPIExtensions:i})=>{const{fn:a}=o(),{useComponent:u}=a.jsonSchema202012,_=u(\"JSONViewer\");return i.map((o=>Re.createElement(_,{key:o,name:o,value:s[o],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))},keywords_ExternalDocs=({schema:s,getSystem:o})=>{const i=s?.externalDocs||{},{fn:a,getComponent:u,getConfigs:_}=o(),{showExtensions:w}=_(),{useComponent:x,useIsExpanded:C,usePath:j,useLevel:L}=a.jsonSchema202012,B=\"externalDocs\",{path:$}=j(B),{isExpanded:V,setExpanded:U,setCollapsed:z}=C(B),[Y,Z]=L(),ee=w?getExtensions(i):[],ie=!!(i.description||i.url||ee.length>0),ae=x(\"Accordion\"),ce=x(\"ExpandDeepButton\"),le=u(\"JSONSchema202012KeywordDescription\"),pe=u(\"Link\"),de=u(\"OpenAPI31Extensions\"),fe=u(\"JSONSchema202012PathContext\")(),ye=u(\"JSONSchema202012LevelContext\")(),be=(0,Re.useCallback)((()=>{V?z():U()}),[V,U,z]),_e=(0,Re.useCallback)(((s,o)=>{o?U({deep:!0}):z({deep:!0})}),[U,z]);return 0===Object.keys(i).length?null:Re.createElement(fe.Provider,{value:$},Re.createElement(ye.Provider,{value:Z},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\",\"data-json-schema-level\":Y},ie?Re.createElement(Re.Fragment,null,Re.createElement(ae,{expanded:V,onChange:be},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),Re.createElement(ce,{expanded:V,onClick:_e})):Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!V})},V&&Re.createElement(Re.Fragment,null,i.description&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(le,{schema:i,getSystem:o})),i.url&&Re.createElement(\"li\",{className:\"json-schema-2020-12-property\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},Re.createElement(pe,{target:\"_blank\",href:sanitizeUrl(i.url)},i.url))))),ee.length>0&&Re.createElement(de,{openAPISpecObj:i,openAPIExtensions:ee,getSystem:o})))))},keywords_Description=({schema:s,getSystem:o})=>{if(!s?.description)return null;const{getComponent:i}=o(),a=i(\"Markdown\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},Re.createElement(a,{source:s.description})))},YI=createOnlyOAS31ComponentWrapper(keywords_Description),XI=createOnlyOAS31ComponentWrapper((({schema:s,getSystem:o,originalComponent:i})=>{const{getComponent:a}=o(),u=a(\"JSONSchema202012KeywordDiscriminator\"),_=a(\"JSONSchema202012KeywordXml\"),w=a(\"JSONSchema202012KeywordExample\"),x=a(\"JSONSchema202012KeywordExternalDocs\");return Re.createElement(Re.Fragment,null,Re.createElement(i,{schema:s}),Re.createElement(u,{schema:s,getSystem:o}),Re.createElement(_,{schema:s,getSystem:o}),Re.createElement(x,{schema:s,getSystem:o}),Re.createElement(w,{schema:s,getSystem:o}))})),QI=XI,keywords_Properties=({schema:s,getSystem:o})=>{const{fn:i,getComponent:a}=o(),{useComponent:u,usePath:_}=i.jsonSchema202012,{getDependentRequired:w,getProperties:x}=i.jsonSchema202012.useFn(),C=i.jsonSchema202012.useConfig(),j=Array.isArray(s?.required)?s.required:[],{path:L}=_(\"properties\"),B=u(\"JSONSchema\"),$=a(\"JSONSchema202012PathContext\")(),V=x(s,C);return 0===Object.keys(V).length?null:Re.createElement($.Provider,{value:L},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},Re.createElement(\"ul\",null,Object.entries(V).map((([o,i])=>{const a=j.includes(o),u=w(o,s);return Re.createElement(\"li\",{key:o,className:Jn()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":a})},Re.createElement(B,{name:o,schema:i,dependentRequired:u}))})))))},ZI=createOnlyOAS31ComponentWrapper(keywords_Properties);const eT=function oas31_after_load_afterLoad({fn:s,getSystem:o}){if(s.jsonSchema202012){const i=((s,o)=>{const{fn:i}=o();if(\"function\"!=typeof s)return null;const{hasKeyword:a}=i.jsonSchema202012;return o=>s(o)||a(o,\"example\")||o?.xml||o?.discriminator||o?.externalDocs})(s.jsonSchema202012.isExpandable,o);Object.assign(this.fn.jsonSchema202012,{isExpandable:i,getProperties})}if(\"function\"==typeof s.sampleFromSchema&&s.jsonSchema202012){const i=wrapOAS31Fn({sampleFromSchema:s.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:s.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:s.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:s.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:s.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:s.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:s.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:s.jsonSchema202012.getXmlSampleSchema,getSampleSchema:s.jsonSchema202012.getSampleSchema,mergeJsonSchema:s.jsonSchema202012.mergeJsonSchema,getSchemaObjectTypeLabel:o=>s.jsonSchema202012.getType(immutableToJS(o)),getSchemaObjectType:o=>s.jsonSchema202012.foldType(immutableToJS(o)?.type)},o());Object.assign(this.fn,i)}const i=(s=>(o,i=null)=>{const{fn:a}=s();if(a.isFileUploadIntendedOAS30(o,i))return!0;const u=ze.Map.isMap(o);if(!u&&!as()(o))return!1;const _=u?o.get(\"contentMediaType\"):o.contentMediaType,w=u?o.get(\"contentEncoding\"):o.contentEncoding;return\"string\"==typeof _&&\"\"!==_||\"string\"==typeof w&&\"\"!==w})(o),{isFileUploadIntended:a}=wrapOAS31Fn({isFileUploadIntended:i},o());if(this.fn.isFileUploadIntended=a,this.fn.isFileUploadIntendedOAS31=i,s.jsonSchema202012){const{hasSchemaType:i}=wrapOAS31Fn({hasSchemaType:s.jsonSchema202012.hasSchemaType},o());this.fn.hasSchemaType=i}},oas31=({fn:s})=>{const o=s.createSystemSelector||fn_createSystemSelector,i=s.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:eT,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:oas31_components_license,OAS31Contact:oas31_components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:CI,OAS31Models:models,OAS31Auths:AI,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:keywords_Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs,OpenAPI31Extensions:keywords_OpenAPIExtensions},wrapComponents:{InfoContainer:II,License:jI,Contact:PI,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:NI,Models:RI,AuthItem:LI,auths:FI,JSONSchema202012KeywordDescription:YI,JSONSchema202012KeywordExamples:QI,JSONSchema202012KeywordProperties:ZI},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:KI}},spec:{selectors:{isOAS31:o($I),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:i(selectLicenseIdentifierField),selectLicenseUrl:o(VI),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:o(UI),selectInfoTitleField,selectInfoSummaryField:i(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:o(zI),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:o(WI),webhooks:i(selectors_webhooks),selectWebhooksOperations:i(o(qI)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:o(JI)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:HI}},oas31:{selectors:{selectLicenseUrl:i(o(GI))}}}}},tT=es().object,rT=es().bool,nT=(es().oneOfType([tT,rT]),(0,Re.createContext)(null));nT.displayName=\"JSONSchemaContext\";const sT=(0,Re.createContext)(0);sT.displayName=\"JSONSchemaLevelContext\";const oT=(0,Re.createContext)(new Set),iT=(0,Re.createContext)([]);class JSONSchemaIsExpandedState{static Collapsed=\"collapsed\";static Expanded=\"expanded\";static DeeplyExpanded=\"deeply-expanded\"}const useConfig=()=>{const{config:s}=(0,Re.useContext)(nT);return s},useComponent=s=>{const{components:o}=(0,Re.useContext)(nT);return o[s]||null},useFn=(s=void 0)=>{const{fn:o}=(0,Re.useContext)(nT);return void 0!==s?o[s]:o},useJSONSchemaContextState=()=>{const[,s]=(0,Re.useState)(null),{state:o}=(0,Re.useContext)(nT);return{state:o,setState:i=>{i(o),s({})}}},useLevel=()=>{const s=(0,Re.useContext)(sT);return[s,s+1]},usePath=s=>{const o=(0,Re.useContext)(iT),{setState:i}=useJSONSchemaContextState(),a=\"string\"==typeof s?[...o,s]:o;return{path:a,pathMutator:(s,o={deep:!1})=>{const u=a.toString(),updateFn=o=>{o.paths[u]=s,s===JSONSchemaIsExpandedState.Collapsed&&Object.keys(o.paths).forEach((s=>{s.startsWith(u)&&o.paths[s]===JSONSchemaIsExpandedState.DeeplyExpanded&&(o.paths[s]=JSONSchemaIsExpandedState.Expanded)}))},updateDeepFn=o=>{Object.keys(o.paths).forEach((i=>{i.startsWith(u)&&(o.paths[i]=s)}))};o.deep?i(updateDeepFn):i(updateFn)}}},useIsExpanded=s=>{const[o]=useLevel(),{defaultExpandedLevels:i}=useConfig(),{path:a,pathMutator:u}=usePath(s),{path:_}=usePath(),{state:w}=useJSONSchemaContextState(),x=w.paths[a.toString()],C=w.paths[_.toString()]??w.paths[_.slice(0,-1).toString()],j=x??(i-o>0?JSONSchemaIsExpandedState.Expanded:JSONSchemaIsExpandedState.Collapsed),L=j!==JSONSchemaIsExpandedState.Collapsed;(0,Re.useEffect)((()=>{u(C===JSONSchemaIsExpandedState.DeeplyExpanded?JSONSchemaIsExpandedState.DeeplyExpanded:j)}),[C]);return{isExpanded:L,setExpanded:(0,Re.useCallback)(((s={deep:!1})=>{u(s.deep?JSONSchemaIsExpandedState.DeeplyExpanded:JSONSchemaIsExpandedState.Expanded)}),[]),setCollapsed:(0,Re.useCallback)(((s={deep:!1})=>{u(JSONSchemaIsExpandedState.Collapsed,s)}),[])}},useRenderedSchemas=(s=void 0)=>{if(void 0===s)return(0,Re.useContext)(oT);const o=(0,Re.useContext)(oT);return new Set([...o,s])},aT=(0,Re.forwardRef)((({schema:s,name:o=\"\",dependentRequired:i=[],onExpand:a=()=>{},identifier:u=\"\"},_)=>{const w=useFn(),x=u||s?.$id||o,{path:C}=usePath(x),{isExpanded:j,setExpanded:L,setCollapsed:B}=useIsExpanded(x),[$,V]=useLevel(),U=(()=>{const[s]=useLevel();return s>0})(),z=w.isExpandable(s)||i.length>0,Y=(s=>useRenderedSchemas().has(s))(s),Z=useRenderedSchemas(s),ee=w.stringifyConstraints(s),ie=useComponent(\"Accordion\"),ae=useComponent(\"Keyword$schema\"),ce=useComponent(\"Keyword$vocabulary\"),le=useComponent(\"Keyword$id\"),pe=useComponent(\"Keyword$anchor\"),de=useComponent(\"Keyword$dynamicAnchor\"),fe=useComponent(\"Keyword$ref\"),ye=useComponent(\"Keyword$dynamicRef\"),be=useComponent(\"Keyword$defs\"),_e=useComponent(\"Keyword$comment\"),Se=useComponent(\"KeywordAllOf\"),we=useComponent(\"KeywordAnyOf\"),xe=useComponent(\"KeywordOneOf\"),Pe=useComponent(\"KeywordNot\"),Te=useComponent(\"KeywordIf\"),$e=useComponent(\"KeywordThen\"),qe=useComponent(\"KeywordElse\"),ze=useComponent(\"KeywordDependentSchemas\"),We=useComponent(\"KeywordPrefixItems\"),He=useComponent(\"KeywordItems\"),Ye=useComponent(\"KeywordContains\"),Xe=useComponent(\"KeywordProperties\"),Qe=useComponent(\"KeywordPatternProperties\"),et=useComponent(\"KeywordAdditionalProperties\"),tt=useComponent(\"KeywordPropertyNames\"),rt=useComponent(\"KeywordUnevaluatedItems\"),nt=useComponent(\"KeywordUnevaluatedProperties\"),st=useComponent(\"KeywordType\"),ot=useComponent(\"KeywordEnum\"),it=useComponent(\"KeywordConst\"),at=useComponent(\"KeywordConstraint\"),ct=useComponent(\"KeywordDependentRequired\"),lt=useComponent(\"KeywordContentSchema\"),ut=useComponent(\"KeywordTitle\"),pt=useComponent(\"KeywordDescription\"),ht=useComponent(\"KeywordDefault\"),dt=useComponent(\"KeywordDeprecated\"),mt=useComponent(\"KeywordReadOnly\"),gt=useComponent(\"KeywordWriteOnly\"),yt=useComponent(\"KeywordExamples\"),vt=useComponent(\"ExtensionKeywords\"),bt=useComponent(\"ExpandDeepButton\"),_t=(0,Re.useCallback)(((s,o)=>{o?L():B(),a(s,o,!1)}),[a,L,B]),St=(0,Re.useCallback)(((s,o)=>{o?L({deep:!0}):B({deep:!0}),a(s,o,!0)}),[a,L,B]);return Re.createElement(iT.Provider,{value:C},Re.createElement(sT.Provider,{value:V},Re.createElement(oT.Provider,{value:Z},Re.createElement(\"article\",{ref:_,\"data-json-schema-level\":$,className:Jn()(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":U,\"json-schema-2020-12--circular\":Y})},Re.createElement(\"div\",{className:\"json-schema-2020-12-head\"},z&&!Y?Re.createElement(Re.Fragment,null,Re.createElement(ie,{expanded:j,onChange:_t},Re.createElement(ut,{title:o,schema:s})),Re.createElement(bt,{expanded:j,onClick:St})):Re.createElement(ut,{title:o,schema:s}),Re.createElement(dt,{schema:s}),Re.createElement(mt,{schema:s}),Re.createElement(gt,{schema:s}),Re.createElement(st,{schema:s,isCircular:Y}),ee.length>0&&ee.map((s=>Re.createElement(at,{key:`${s.scope}-${s.value}`,constraint:s})))),Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!j})},j&&Re.createElement(Re.Fragment,null,Re.createElement(pt,{schema:s}),!Y&&z&&Re.createElement(Re.Fragment,null,Re.createElement(Xe,{schema:s}),Re.createElement(Qe,{schema:s}),Re.createElement(et,{schema:s}),Re.createElement(nt,{schema:s}),Re.createElement(tt,{schema:s}),Re.createElement(Se,{schema:s}),Re.createElement(we,{schema:s}),Re.createElement(xe,{schema:s}),Re.createElement(Pe,{schema:s}),Re.createElement(Te,{schema:s}),Re.createElement($e,{schema:s}),Re.createElement(qe,{schema:s}),Re.createElement(ze,{schema:s}),Re.createElement(We,{schema:s}),Re.createElement(He,{schema:s}),Re.createElement(rt,{schema:s}),Re.createElement(Ye,{schema:s}),Re.createElement(lt,{schema:s})),Re.createElement(ot,{schema:s}),Re.createElement(it,{schema:s}),Re.createElement(ct,{schema:s,dependentRequired:i}),Re.createElement(ht,{schema:s}),Re.createElement(yt,{schema:s}),Re.createElement(ae,{schema:s}),Re.createElement(ce,{schema:s}),Re.createElement(le,{schema:s}),Re.createElement(pe,{schema:s}),Re.createElement(de,{schema:s}),Re.createElement(fe,{schema:s}),!Y&&z&&Re.createElement(be,{schema:s}),Re.createElement(ye,{schema:s}),Re.createElement(_e,{schema:s}),Re.createElement(vt,{schema:s})))))))})),cT=aT,keywords_$schema=({schema:s})=>s?.$schema?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$schema)):null,$vocabulary_$vocabulary=({schema:s})=>{const o=\"$vocabulary\",{path:i}=usePath(o),{isExpanded:a,setExpanded:u,setCollapsed:_}=useIsExpanded(o),w=useComponent(\"Accordion\"),x=(0,Re.useCallback)((()=>{a?_():u()}),[a,u,_]);return s?.$vocabulary?\"object\"!=typeof s.$vocabulary?null:Re.createElement(iT.Provider,{value:i},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},Re.createElement(w,{expanded:a,onChange:x},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",null,a&&Object.entries(s.$vocabulary).map((([s,o])=>Re.createElement(\"li\",{key:s,className:Jn()(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!o})},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s))))))):null},keywords_$id=({schema:s})=>s?.$id?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$id)):null,keywords_$anchor=({schema:s})=>s?.$anchor?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$anchor)):null,keywords_$dynamicAnchor=({schema:s})=>s?.$dynamicAnchor?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicAnchor)):null,keywords_$ref=({schema:s})=>s?.$ref?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$ref)):null,keywords_$dynamicRef=({schema:s})=>s?.$dynamicRef?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$dynamicRef)):null,keywords_$defs=({schema:s})=>{const o=s?.$defs||{},i=\"$defs\",{path:a}=usePath(i),{isExpanded:u,setExpanded:_,setCollapsed:w}=useIsExpanded(i),[x,C]=useLevel(),j=useComponent(\"Accordion\"),L=useComponent(\"ExpandDeepButton\"),B=useComponent(\"JSONSchema\"),$=(0,Re.useCallback)((()=>{u?w():_()}),[u,_,w]),V=(0,Re.useCallback)(((s,o)=>{o?_({deep:!0}):w({deep:!0})}),[_,w]);return 0===Object.keys(o).length?null:Re.createElement(iT.Provider,{value:a},Re.createElement(sT.Provider,{value:C},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\",\"data-json-schema-level\":x},Re.createElement(j,{expanded:u,onChange:$},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),Re.createElement(L,{expanded:u,onClick:V}),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&Re.createElement(Re.Fragment,null,Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(B,{name:s,schema:o})))))))))},keywords_$comment=({schema:s})=>s?.$comment?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},s.$comment)):null,keywords_AllOf=({schema:s})=>{const o=s?.allOf||[],i=useFn(),a=\"allOf\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{allOf:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_AnyOf=({schema:s})=>{const o=s?.anyOf||[],i=useFn(),a=\"anyOf\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{anyOf:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_OneOf=({schema:s})=>{const o=s?.oneOf||[],i=useFn(),a=\"oneOf\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{oneOf:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_Not=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"not\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},Re.createElement(i,{name:a,schema:s.not,identifier:\"not\"}))},keywords_If=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"if\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},Re.createElement(i,{name:a,schema:s.if,identifier:\"if\"}))},keywords_Then=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"then\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},Re.createElement(i,{name:a,schema:s.then,identifier:\"then\"}))},keywords_Else=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"else\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},Re.createElement(i,{name:a,schema:s.else,identifier:\"else\"}))},keywords_DependentSchemas=({schema:s})=>{const o=s?.dependentSchemas||[],i=\"dependentSchemas\",{path:a}=usePath(i),{isExpanded:u,setExpanded:_,setCollapsed:w}=useIsExpanded(i),[x,C]=useLevel(),j=useComponent(\"Accordion\"),L=useComponent(\"ExpandDeepButton\"),B=useComponent(\"JSONSchema\"),$=(0,Re.useCallback)((()=>{u?w():_()}),[u,_,w]),V=(0,Re.useCallback)(((s,o)=>{o?_({deep:!0}):w({deep:!0})}),[_,w]);return\"object\"!=typeof o||0===Object.keys(o).length?null:Re.createElement(iT.Provider,{value:a},Re.createElement(sT.Provider,{value:C},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\",\"data-json-schema-level\":x},Re.createElement(j,{expanded:u,onChange:$},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),Re.createElement(L,{expanded:u,onClick:V}),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&Re.createElement(Re.Fragment,null,Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(B,{name:s,schema:o})))))))))},keywords_PrefixItems=({schema:s})=>{const o=s?.prefixItems||[],i=useFn(),a=\"prefixItems\",{path:u}=usePath(a),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(a),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=useComponent(\"JSONSchema\"),V=useComponent(\"KeywordType\"),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return Array.isArray(o)&&0!==o.length?Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\",\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(V,{schema:{prefixItems:o}}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement($,{name:`#${o} ${i.getTitle(s)}`,schema:s}))))))))):null},keywords_Items=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"items\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},Re.createElement(i,{name:a,schema:s.items,identifier:\"items\"}))},keywords_Contains=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"contains\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},Re.createElement(i,{name:a,schema:s.contains,identifier:\"contains\"}))},keywords_Properties_Properties=({schema:s})=>{const o=useFn(),i=s?.properties||{},a=Array.isArray(s?.required)?s.required:[],u=useComponent(\"JSONSchema\"),{path:_}=usePath(\"properties\");return 0===Object.keys(i).length?null:Re.createElement(iT.Provider,{value:_},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},Re.createElement(\"ul\",null,Object.entries(i).map((([i,_])=>{const w=a.includes(i),x=o.getDependentRequired(i,s);return Re.createElement(\"li\",{key:i,className:Jn()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":w})},Re.createElement(u,{name:i,schema:_,dependentRequired:x}))})))))},PatternProperties_PatternProperties=({schema:s})=>{const o=s?.patternProperties||{},i=useComponent(\"JSONSchema\"),{path:a}=usePath(\"patternProperties\");return 0===Object.keys(o).length?null:Re.createElement(iT.Provider,{value:a},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},Re.createElement(\"ul\",null,Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(i,{name:s,schema:o})))))))},keywords_AdditionalProperties=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"additionalProperties\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===s.additionalProperties?Re.createElement(Re.Fragment,null,a,Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===s.additionalProperties?Re.createElement(Re.Fragment,null,a,Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):Re.createElement(i,{name:a,schema:s.additionalProperties,identifier:\"additionalProperties\"}))},keywords_PropertyNames=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\"),a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return o.hasKeyword(s,\"propertyNames\")?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},Re.createElement(i,{name:a,schema:s.propertyNames,identifier:\"propertyNames\"})):null},keywords_UnevaluatedItems=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"unevaluatedItems\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},Re.createElement(i,{name:a,schema:s.unevaluatedItems,identifier:\"unevaluatedItems\"}))},keywords_UnevaluatedProperties=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"unevaluatedProperties\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},Re.createElement(i,{name:a,schema:s.unevaluatedProperties,identifier:\"unevaluatedProperties\"}))},keywords_Type=({schema:s,isCircular:o=!1})=>{const i=useFn().getType(s),a=o?\" [circular]\":\"\";return Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${i}${a}`)},Enum_Enum=({schema:s})=>{const o=useComponent(\"JSONViewer\");return Array.isArray(s?.enum)?Re.createElement(o,{name:\"Enum\",value:s.enum,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"}):null},Const_Const=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONViewer\");return o.hasKeyword(s,\"const\")?Re.createElement(i,{name:\"Const\",value:s.const,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"}):null},fn_upperFirst=s=>\"string\"==typeof s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:s,makeGetTitle=s=>(o,{lookup:i=\"extended\"}={})=>{const a=s();if(null!=o?.title)return a.upperFirst(String(o.title));if(\"extended\"===i){if(null!=o?.$anchor)return a.upperFirst(String(o.$anchor));if(null!=o?.$id)return String(o.$id)}return\"\"},makeGetType=s=>{const getType=(o,i=new WeakSet)=>{const a=s();if(null==o)return\"any\";if(a.isBooleanJSONSchema(o))return o?\"any\":\"never\";if(\"object\"!=typeof o)return\"any\";if(i.has(o))return\"any\";i.add(o);const{type:u,prefixItems:_,items:w}=o,getArrayType=()=>{if(Array.isArray(_)){const s=_.map((s=>getType(s,i))),o=w?getType(w,i):\"any\";return`array<[${s.join(\", \")}], ${o}>`}if(w){return`array<${getType(w,i)}>`}return\"array<any>\"};if(o.not&&\"any\"===getType(o.not))return\"never\";const handleCombiningKeywords=(s,a)=>{if(Array.isArray(o[s])){return`(${o[s].map((s=>getType(s,i))).join(a)})`}return null},x=[Array.isArray(u)?u.map((s=>\"array\"===s?getArrayType():s)).join(\" | \"):\"array\"===u?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(u)?u:(()=>{if(Object.hasOwn(o,\"prefixItems\")||Object.hasOwn(o,\"items\")||Object.hasOwn(o,\"contains\"))return getArrayType();if(Object.hasOwn(o,\"properties\")||Object.hasOwn(o,\"additionalProperties\")||Object.hasOwn(o,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(o.format))return\"integer\";if([\"float\",\"double\"].includes(o.format))return\"number\";if(Object.hasOwn(o,\"minimum\")||Object.hasOwn(o,\"maximum\")||Object.hasOwn(o,\"exclusiveMinimum\")||Object.hasOwn(o,\"exclusiveMaximum\")||Object.hasOwn(o,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(o,\"pattern\")||Object.hasOwn(o,\"format\")||Object.hasOwn(o,\"minLength\")||Object.hasOwn(o,\"maxLength\")||Object.hasOwn(o,\"contentEncoding\")||Object.hasOwn(o,\"contentMediaType\"))return\"string\";if(void 0!==o.const){if(null===o.const)return\"null\";if(\"boolean\"==typeof o.const)return\"boolean\";if(\"number\"==typeof o.const)return Number.isInteger(o.const)?\"integer\":\"number\";if(\"string\"==typeof o.const)return\"string\";if(Array.isArray(o.const))return\"array<any>\";if(\"object\"==typeof o.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return i.delete(o),x||\"any\"};return getType},isBooleanJSONSchema=s=>\"boolean\"==typeof s,hasKeyword=(s,o)=>null!==s&&\"object\"==typeof s&&Object.hasOwn(s,o),fn_makeIsExpandable=s=>o=>{const i=s();return o?.$schema||o?.$vocabulary||o?.$id||o?.$anchor||o?.$dynamicAnchor||o?.$ref||o?.$dynamicRef||o?.$defs||o?.$comment||o?.allOf||o?.anyOf||o?.oneOf||i.hasKeyword(o,\"not\")||i.hasKeyword(o,\"if\")||i.hasKeyword(o,\"then\")||i.hasKeyword(o,\"else\")||o?.dependentSchemas||o?.prefixItems||i.hasKeyword(o,\"items\")||i.hasKeyword(o,\"contains\")||o?.properties||o?.patternProperties||i.hasKeyword(o,\"additionalProperties\")||i.hasKeyword(o,\"propertyNames\")||i.hasKeyword(o,\"unevaluatedItems\")||i.hasKeyword(o,\"unevaluatedProperties\")||o?.description||o?.enum||i.hasKeyword(o,\"const\")||i.hasKeyword(o,\"contentSchema\")||i.hasKeyword(o,\"default\")||o?.examples||i.getExtensionKeywords(o).length>0},fn_stringify=s=>null===s||[\"number\",\"bigint\",\"boolean\"].includes(typeof s)?String(s):Array.isArray(s)?`[${s.map(fn_stringify).join(\", \")}]`:JSON.stringify(s),stringifyConstraintRange=(s,o,i)=>{const a=\"number\"==typeof o,u=\"number\"==typeof i;return a&&u?o===i?`${o} ${s}`:`[${o}, ${i}] ${s}`:a?`≥ ${o} ${s}`:u?`≤ ${i} ${s}`:null},stringifyConstraints=s=>{const o=[],i=(s=>{if(\"number\"!=typeof s?.multipleOf)return null;if(s.multipleOf<=0)return null;if(1===s.multipleOf)return null;const{multipleOf:o}=s;if(Number.isInteger(o))return`multiple of ${o}`;const i=10**o.toString().split(\".\")[1].length;return`multiple of ${o*i}/${i}`})(s);null!==i&&o.push({scope:\"number\",value:i});const a=(s=>{const o=s?.minimum,i=s?.maximum,a=s?.exclusiveMinimum,u=s?.exclusiveMaximum,_=\"number\"==typeof o,w=\"number\"==typeof i,x=\"number\"==typeof a,C=\"number\"==typeof u,j=x&&(!_||o<a),L=C&&(!w||i>u);if((_||x)&&(w||C))return`${j?\"(\":\"[\"}${j?a:o}, ${L?u:i}${L?\")\":\"]\"}`;if(_||x)return`${j?\">\":\"≥\"} ${j?a:o}`;if(w||C)return`${L?\"<\":\"≤\"} ${L?u:i}`;return null})(s);null!==a&&o.push({scope:\"number\",value:a}),s?.format&&o.push({scope:\"string\",value:s.format});const u=stringifyConstraintRange(\"characters\",s?.minLength,s?.maxLength);null!==u&&o.push({scope:\"string\",value:u}),s?.pattern&&o.push({scope:\"string\",value:`matches ${s?.pattern}`}),s?.contentMediaType&&o.push({scope:\"string\",value:`media type: ${s.contentMediaType}`}),s?.contentEncoding&&o.push({scope:\"string\",value:`encoding: ${s.contentEncoding}`});const _=stringifyConstraintRange(s?.uniqueItems?\"unique items\":\"items\",s?.minItems,s?.maxItems);null!==_&&o.push({scope:\"array\",value:_}),s?.uniqueItems&&!_&&o.push({scope:\"array\",value:\"unique\"});const w=stringifyConstraintRange(\"contained items\",s?.minContains,s?.maxContains);null!==w&&o.push({scope:\"array\",value:w});const x=stringifyConstraintRange(\"properties\",s?.minProperties,s?.maxProperties);return null!==x&&o.push({scope:\"object\",value:x}),o},getDependentRequired=(s,o)=>o?.dependentRequired?Array.from(Object.entries(o.dependentRequired).reduce(((o,[i,a])=>Array.isArray(a)&&a.includes(s)?(o.add(i),o):o),new Set)):[],fn_isPlainObject=s=>\"object\"==typeof s&&null!==s&&!Array.isArray(s)&&(null===Object.getPrototypeOf(s)||Object.getPrototypeOf(s)===Object.prototype),getSchemaKeywords=()=>[\"$schema\",\"$vocabulary\",\"$id\",\"$anchor\",\"$dynamicAnchor\",\"$dynamicRef\",\"$ref\",\"$defs\",\"$comment\",\"allOf\",\"anyOf\",\"oneOf\",\"not\",\"if\",\"then\",\"else\",\"dependentSchemas\",\"prefixItems\",\"items\",\"contains\",\"properties\",\"patternProperties\",\"additionalProperties\",\"propertyNames\",\"unevaluatedItems\",\"unevaluatedProperties\",\"type\",\"enum\",\"const\",\"multipleOf\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"maxContains\",\"minContains\",\"maxProperties\",\"minProperties\",\"required\",\"dependentRequired\",\"title\",\"description\",\"default\",\"deprecated\",\"readOnly\",\"writeOnly\",\"examples\",\"format\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],makeGetExtensionKeywords=s=>o=>{const i=s().getSchemaKeywords();return fn_isPlainObject(o)?((s,o)=>{const i=new Set(o);return s.filter((s=>!i.has(s)))})(Object.keys(o),i):[]},fn_hasSchemaType=(s,o)=>{const i=ze.Map.isMap(s);if(!i&&!fn_isPlainObject(s))return!1;const hasType=s=>o===s||Array.isArray(o)&&o.includes(s),a=i?s.get(\"type\"):s.type;return ze.List.isList(a)||Array.isArray(a)?a.some((s=>hasType(s))):hasType(a)},Constraint=({constraint:s})=>fn_isPlainObject(s)&&\"string\"==typeof s.scope&&\"string\"==typeof s.value?Re.createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${s.scope}`},s.value):null,lT=Re.memo(Constraint),DependentRequired_DependentRequired=({dependentRequired:s})=>Array.isArray(s)&&0!==s.length?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),Re.createElement(\"ul\",null,s.map((s=>Re.createElement(\"li\",{key:s},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},s)))))):null,keywords_ContentSchema=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONSchema\");if(!o.hasKeyword(s,\"contentSchema\"))return null;const a=Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},Re.createElement(i,{name:a,schema:s.contentSchema,identifier:\"contentSchema\"}))},Title_Title=({title:s=\"\",schema:o})=>{const i=useFn(),a=s||i.getTitle(o);return a?Re.createElement(\"div\",{className:\"json-schema-2020-12__title\"},a):null},keywords_Description_Description=({schema:s})=>s?.description?Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},Re.createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},s.description)):null,Default_Default=({schema:s})=>{const o=useFn(),i=useComponent(\"JSONViewer\");return o.hasKeyword(s,\"default\")?Re.createElement(i,{name:\"Default\",value:s.default,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"}):null},keywords_Deprecated=({schema:s})=>!0!==s?.deprecated?null:Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\"),keywords_ReadOnly=({schema:s})=>!0!==s?.readOnly?null:Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\"),keywords_WriteOnly=({schema:s})=>!0!==s?.writeOnly?null:Re.createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\"),keywords_Examples_Examples=({schema:s})=>{const o=s?.examples||[],i=useComponent(\"JSONViewer\");return Array.isArray(o)&&0!==o.length?Re.createElement(i,{name:\"Examples\",value:s.examples,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--examples\"}):null},ExtensionKeywords_ExtensionKeywords=({schema:s})=>{const o=useFn(),i=\"ExtensionKeywords\",{path:a}=usePath(i),{isExpanded:u,setExpanded:_,setCollapsed:w}=useIsExpanded(i),[x,C]=useLevel(),j=useComponent(\"Accordion\"),L=useComponent(\"ExpandDeepButton\"),B=useComponent(\"JSONViewer\"),{showExtensionKeywords:$}=useConfig(),V=o.getExtensionKeywords(s),U=(0,Re.useCallback)((()=>{u?w():_()}),[u,_,w]),z=(0,Re.useCallback)(((s,o)=>{o?_({deep:!0}):w({deep:!0})}),[_,w]);return $&&0!==V.length?Re.createElement(iT.Provider,{value:a},Re.createElement(sT.Provider,{value:C},Re.createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--extension-keywords\",\"data-json-schema-level\":x},Re.createElement(j,{expanded:u,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--extension\"},\"Extension Keywords\")),Re.createElement(L,{expanded:u,onClick:z}),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&Re.createElement(Re.Fragment,null,V.map((o=>Re.createElement(B,{key:o,name:o,value:s[o],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))))))):null},JSONViewer=({name:s,value:o,className:i})=>{const a=useFn(),{path:u}=usePath(s),{isExpanded:_,setExpanded:w,setCollapsed:x}=useIsExpanded(s),[C,j]=useLevel(),L=useComponent(\"Accordion\"),B=useComponent(\"ExpandDeepButton\"),$=\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||\"boolean\"==typeof o||\"symbol\"==typeof o||null==o,V=(s=>fn_isPlainObject(s)&&0===Object.keys(s).length)(o)||(s=>Array.isArray(s)&&0===s.length)(o),U=(0,Re.useCallback)((()=>{_?x():w()}),[_,w,x]),z=(0,Re.useCallback)(((s,o)=>{o?w({deep:!0}):x({deep:!0})}),[w,x]);return $?Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-json-viewer\",i)},Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},s),Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__value json-schema-2020-12-json-viewer__value--secondary\"},a.stringify(o))):V?Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-json-viewer\",i)},Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},s),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(o)?\"empty array\":\"empty object\")):Re.createElement(iT.Provider,{value:u},Re.createElement(sT.Provider,{value:j},Re.createElement(\"div\",{className:Jn()(\"json-schema-2020-12-json-viewer\",i),\"data-json-schema-level\":C},Re.createElement(L,{expanded:_,onChange:U},Re.createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},s)),Re.createElement(B,{expanded:_,onClick:z}),Re.createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(o)?\"array\":\"object\"),Re.createElement(\"ul\",{className:Jn()(\"json-schema-2020-12-json-viewer__children\",{\"json-schema-2020-12-json-viewer__children--collapsed\":!_})},_&&Re.createElement(Re.Fragment,null,Array.isArray(o)?o.map(((s,o)=>Re.createElement(\"li\",{key:`#${o}`,className:\"json-schema-2020-12-property\"},Re.createElement(JSONViewer,{name:`#${o}`,value:s,className:i})))):Object.entries(o).map((([s,o])=>Re.createElement(\"li\",{key:s,className:\"json-schema-2020-12-property\"},Re.createElement(JSONViewer,{name:s,value:o,className:i})))))))))},uT=JSONViewer,Accordion_Accordion=({expanded:s=!1,children:o,onChange:i})=>{const a=useComponent(\"ChevronRightIcon\"),u=(0,Re.useCallback)((o=>{i(o,!s)}),[s,i]);return Re.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:u},Re.createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},o),Re.createElement(\"span\",{className:Jn()(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":s,\"json-schema-2020-12-accordion__icon--collapsed\":!s})},Re.createElement(a,null)))},ExpandDeepButton_ExpandDeepButton=({expanded:s,onClick:o})=>{const i=(0,Re.useCallback)((i=>{o(i,!s)}),[s,o]);return Re.createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:i},s?\"Collapse all\":\"Expand all\")},icons_ChevronRight=()=>Re.createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},Re.createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"})),withJSONSchemaContext=(s,o={})=>{const i={components:{JSONSchema:cT,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:Const_Const,KeywordConstraint:lT,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:Default_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,KeywordExamples:keywords_Examples_Examples,ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONViewer:uT,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...o.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,showExtensionKeywords:!0,...o.config},fn:{upperFirst:fn_upperFirst,getTitle:makeGetTitle(useFn),getType:makeGetType(useFn),isBooleanJSONSchema,hasKeyword,isExpandable:fn_makeIsExpandable(useFn),stringify:fn_stringify,stringifyConstraints,getDependentRequired,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(useFn),...o.fn},state:{paths:{}}},HOC=o=>Re.createElement(nT.Provider,{value:i},Re.createElement(s,o));return HOC.contexts={JSONSchemaContext:nT},HOC.displayName=s.displayName,HOC},makeWithJSONSchemaSystemContext=({getSystem:s})=>(o,i={})=>{const{getComponent:a,getConfigs:u}=s(),_=u(),w=a(\"JSONSchema202012\"),x=a(\"JSONSchema202012Keyword$schema\"),C=a(\"JSONSchema202012Keyword$vocabulary\"),j=a(\"JSONSchema202012Keyword$id\"),L=a(\"JSONSchema202012Keyword$anchor\"),B=a(\"JSONSchema202012Keyword$dynamicAnchor\"),$=a(\"JSONSchema202012Keyword$ref\"),V=a(\"JSONSchema202012Keyword$dynamicRef\"),U=a(\"JSONSchema202012Keyword$defs\"),z=a(\"JSONSchema202012Keyword$comment\"),Y=a(\"JSONSchema202012KeywordAllOf\"),Z=a(\"JSONSchema202012KeywordAnyOf\"),ee=a(\"JSONSchema202012KeywordOneOf\"),ie=a(\"JSONSchema202012KeywordNot\"),ae=a(\"JSONSchema202012KeywordIf\"),ce=a(\"JSONSchema202012KeywordThen\"),le=a(\"JSONSchema202012KeywordElse\"),pe=a(\"JSONSchema202012KeywordDependentSchemas\"),de=a(\"JSONSchema202012KeywordPrefixItems\"),fe=a(\"JSONSchema202012KeywordItems\"),ye=a(\"JSONSchema202012KeywordContains\"),be=a(\"JSONSchema202012KeywordProperties\"),_e=a(\"JSONSchema202012KeywordPatternProperties\"),Se=a(\"JSONSchema202012KeywordAdditionalProperties\"),we=a(\"JSONSchema202012KeywordPropertyNames\"),xe=a(\"JSONSchema202012KeywordUnevaluatedItems\"),Pe=a(\"JSONSchema202012KeywordUnevaluatedProperties\"),Te=a(\"JSONSchema202012KeywordType\"),Re=a(\"JSONSchema202012KeywordEnum\"),$e=a(\"JSONSchema202012KeywordConst\"),qe=a(\"JSONSchema202012KeywordConstraint\"),ze=a(\"JSONSchema202012KeywordDependentRequired\"),We=a(\"JSONSchema202012KeywordContentSchema\"),He=a(\"JSONSchema202012KeywordTitle\"),Ye=a(\"JSONSchema202012KeywordDescription\"),Xe=a(\"JSONSchema202012KeywordDefault\"),Qe=a(\"JSONSchema202012KeywordDeprecated\"),et=a(\"JSONSchema202012KeywordReadOnly\"),tt=a(\"JSONSchema202012KeywordWriteOnly\"),rt=a(\"JSONSchema202012KeywordExamples\"),nt=a(\"JSONSchema202012ExtensionKeywords\"),st=a(\"JSONSchema202012JSONViewer\"),ot=a(\"JSONSchema202012Accordion\"),it=a(\"JSONSchema202012ExpandDeepButton\"),at=a(\"JSONSchema202012ChevronRightIcon\");return withJSONSchemaContext(o,{components:{JSONSchema:w,Keyword$schema:x,Keyword$vocabulary:C,Keyword$id:j,Keyword$anchor:L,Keyword$dynamicAnchor:B,Keyword$ref:$,Keyword$dynamicRef:V,Keyword$defs:U,Keyword$comment:z,KeywordAllOf:Y,KeywordAnyOf:Z,KeywordOneOf:ee,KeywordNot:ie,KeywordIf:ae,KeywordThen:ce,KeywordElse:le,KeywordDependentSchemas:pe,KeywordPrefixItems:de,KeywordItems:fe,KeywordContains:ye,KeywordProperties:be,KeywordPatternProperties:_e,KeywordAdditionalProperties:Se,KeywordPropertyNames:we,KeywordUnevaluatedItems:xe,KeywordUnevaluatedProperties:Pe,KeywordType:Te,KeywordEnum:Re,KeywordConst:$e,KeywordConstraint:qe,KeywordDependentRequired:ze,KeywordContentSchema:We,KeywordTitle:He,KeywordDescription:Ye,KeywordDefault:Xe,KeywordDeprecated:Qe,KeywordReadOnly:et,KeywordWriteOnly:tt,KeywordExamples:rt,ExtensionKeywords:nt,JSONViewer:st,Accordion:ot,ExpandDeepButton:it,ChevronRightIcon:at,...i.components},config:{showExtensionKeywords:_.showExtensions,...i.config},fn:{...i.fn}})},json_schema_2020_12=({getSystem:s,fn:o})=>{const fnAccessor=()=>({upperFirst:o.upperFirst,...o.jsonSchema202012});return{components:{JSONSchema202012:cT,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:Const_Const,JSONSchema202012KeywordConstraint:lT,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:Default_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012KeywordExamples:keywords_Examples_Examples,JSONSchema202012ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONSchema202012JSONViewer:uT,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,withJSONSchema202012SystemContext:makeWithJSONSchemaSystemContext(s()),JSONSchema202012PathContext:()=>iT,JSONSchema202012LevelContext:()=>sT},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{getTitle:makeGetTitle(fnAccessor),getType:makeGetType(fnAccessor),isExpandable:fn_makeIsExpandable(fnAccessor),isBooleanJSONSchema,hasKeyword,useFn,useConfig,useComponent,useIsExpanded,usePath,useLevel,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(fnAccessor),hasSchemaType:fn_hasSchemaType}}}},array=(s,{sample:o=[]}={})=>((s,o={})=>{const{minItems:i,maxItems:a,uniqueItems:u}=o,{contains:_,minContains:w,maxContains:x}=o;let C=[...s];if(null!=_&&\"object\"==typeof _){if(Number.isInteger(w)&&w>1){const s=C.at(0);for(let o=1;o<w;o+=1)C.unshift(s)}Number.isInteger(x)}if(Number.isInteger(a)&&a>0&&(C=s.slice(0,a)),Number.isInteger(i)&&i>0)for(let s=0;C.length<i;s+=1)C.push(C[s%C.length]);return!0===u&&(C=Array.from(new Set(C))),C})(o,s),object=()=>{throw new Error(\"Not implemented\")},bytes=s=>xt()(s),random_pick=s=>s.at(0),predicates_isBooleanJSONSchema=s=>\"boolean\"==typeof s,isJSONSchemaObject=s=>as()(s),isJSONSchema=s=>predicates_isBooleanJSONSchema(s)||isJSONSchemaObject(s);const pT=class Registry{data={};register(s,o){this.data[s]=o}unregister(s){void 0===s?this.data={}:delete this.data[s]}get(s){return this.data[s]}},int32=()=>0,int64=()=>0,generators_float=()=>.1,generators_double=()=>.1,email=()=>\"user@example.com\",idn_email=()=>\"실례@example.com\",hostname=()=>\"example.com\",idn_hostname=()=>\"실례.com\",ipv4=()=>\"198.51.100.42\",ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",uri=()=>\"https://example.com/\",uri_reference=()=>\"path/index.html\",iri=()=>\"https://실례.com/\",iri_reference=()=>\"path/실례.html\",uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\",generators_json_pointer=()=>\"/a/b/c\",relative_json_pointer=()=>\"1/0\",date_time=()=>(new Date).toISOString(),date=()=>(new Date).toISOString().substring(0,10),time=()=>(new Date).toISOString().substring(11),duration=()=>\"P3D\",generators_password=()=>\"********\",regex=()=>\"^[a-z]+$\";const hT=new class FormatRegistry extends pT{#s={int32,int64,float:generators_float,double:generators_double,email,\"idn-email\":idn_email,hostname,\"idn-hostname\":idn_hostname,ipv4,ipv6,uri,\"uri-reference\":uri_reference,iri,\"iri-reference\":iri_reference,uuid,\"uri-template\":uri_template,\"json-pointer\":generators_json_pointer,\"relative-json-pointer\":relative_json_pointer,\"date-time\":date_time,date,time,duration,password:generators_password,regex};data={...this.#s};get defaults(){return{...this.#s}}},formatAPI=(s,o)=>\"function\"==typeof o?hT.register(s,o):null===o?hT.unregister(s):hT.get(s);formatAPI.getDefaults=()=>hT.defaults;const dT=formatAPI;var fT=__webpack_require__(48287).Buffer;const _7bit=s=>fT.from(s).toString(\"ascii\");var mT=__webpack_require__(48287).Buffer;const _8bit=s=>mT.from(s).toString(\"utf8\");var gT=__webpack_require__(48287).Buffer;const encoders_binary=s=>gT.from(s).toString(\"binary\"),quoted_printable=s=>{let o=\"\";for(let i=0;i<s.length;i++){const a=s.charCodeAt(i);if(61===a)o+=\"=3D\";else if(a>=33&&a<=60||a>=62&&a<=126||9===a||32===a)o+=s.charAt(i);else if(13===a||10===a)o+=\"\\r\\n\";else if(a>126){const a=unescape(encodeURIComponent(s.charAt(i)));for(let s=0;s<a.length;s++)o+=\"=\"+(\"0\"+a.charCodeAt(s).toString(16)).slice(-2).toUpperCase()}else o+=\"=\"+(\"0\"+a.toString(16)).slice(-2).toUpperCase()}return o};var yT=__webpack_require__(48287).Buffer;const base16=s=>yT.from(s).toString(\"hex\");var vT=__webpack_require__(48287).Buffer;const base32=s=>{const o=vT.from(s).toString(\"utf8\"),i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let a=0,u=\"\",_=0,w=0;for(let s=0;s<o.length;s++)for(_=_<<8|o.charCodeAt(s),w+=8;w>=5;)u+=i.charAt(_>>>w-5&31),w-=5;w>0&&(u+=i.charAt(_<<5-w&31),a=(8-8*o.length%5)%5);for(let s=0;s<a;s++)u+=\"=\";return u};var bT=__webpack_require__(48287).Buffer;const base64=s=>bT.from(s).toString(\"base64\");var _T=__webpack_require__(48287).Buffer;const base64url=s=>_T.from(s).toString(\"base64url\");const ST=new class EncoderRegistry extends pT{#s={\"7bit\":_7bit,\"8bit\":_8bit,binary:encoders_binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#s};get defaults(){return{...this.#s}}},encoderAPI=(s,o)=>\"function\"==typeof o?ST.register(s,o):null===o?ST.unregister(s):ST.get(s);encoderAPI.getDefaults=()=>ST.defaults;const ET=encoderAPI,wT={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"},xT={\"image/*\":()=>bytes(25).toString(\"binary\")},kT={\"audio/*\":()=>bytes(25).toString(\"binary\")},OT={\"video/*\":()=>bytes(25).toString(\"binary\")},CT={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const AT=new class MediaTypeRegistry extends pT{#s={...wT,...xT,...kT,...OT,...CT};data={...this.#s};get defaults(){return{...this.#s}}},mediaTypeAPI=(s,o)=>{if(\"function\"==typeof o)return AT.register(s,o);if(null===o)return AT.unregister(s);const i=s.split(\";\").at(0),a=`${i.split(\"/\").at(0)}/*`;return AT.get(s)||AT.get(i)||AT.get(a)};mediaTypeAPI.getDefaults=()=>AT.defaults;const jT=mediaTypeAPI,applyStringConstraints=(s,o={})=>{const{maxLength:i,minLength:a}=o;let u=s;if(Number.isInteger(i)&&i>0&&(u=u.slice(0,i)),Number.isInteger(a)&&a>0){let s=0;for(;u.length<a;)u+=u[s++%u.length]}return u},types_string=(s,{sample:o}={})=>{const{contentEncoding:i,contentMediaType:a,contentSchema:u}=s,{pattern:_,format:w}=s,x=ET(i)||yO();let C;return C=\"string\"==typeof _?applyStringConstraints((s=>{try{const o=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,i=s.replace(o,\"100\"),a=new(ps())(i);return a.max=100,a.gen()}catch{return\"string\"}})(_),s):\"string\"==typeof w?(s=>{const{format:o}=s,i=dT(o);return\"function\"==typeof i?i(s):\"string\"})(s):isJSONSchema(u)&&\"string\"==typeof a&&void 0!==o?Array.isArray(o)||\"object\"==typeof o?JSON.stringify(o):applyStringConstraints(String(o),s):\"string\"==typeof a?(s=>{const{contentMediaType:o}=s,i=jT(o);return\"function\"==typeof i?i(s):\"string\"})(s):applyStringConstraints(\"string\",s),x(C)},applyNumberConstraints=(s,o={})=>{const{minimum:i,maximum:a,exclusiveMinimum:u,exclusiveMaximum:_}=o,{multipleOf:w}=o,x=Number.isInteger(s)?1:Number.EPSILON;let C=\"number\"==typeof i?i:null,j=\"number\"==typeof a?a:null,L=s;if(\"number\"==typeof u&&(C=null!==C?Math.max(C,u+x):u+x),\"number\"==typeof _&&(j=null!==j?Math.min(j,_-x):_-x),L=C>j&&s||C||j||L,\"number\"==typeof w&&w>0){const s=L%w;L=0===s?L:L+w-s}return L},types_number=s=>{const{format:o}=s;let i;return i=\"string\"==typeof o?(s=>{const{format:o}=s,i=dT(o);return\"function\"==typeof i?i(s):0})(s):0,applyNumberConstraints(i,s)},types_integer=s=>{const{format:o}=s;let i;return i=\"string\"==typeof o?(s=>{const{format:o}=s,i=dT(o);if(\"function\"==typeof i)return i(s);switch(o){case\"int32\":return int32();case\"int64\":return int64()}return 0})(s):0,applyNumberConstraints(i,s)},types_boolean=s=>\"boolean\"!=typeof s.default||s.default,PT=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(s,o)=>\"string\"==typeof o&&Object.hasOwn(s,o)?s[o]:()=>`Unknown Type: ${o}`}),IT=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=s=>{if(!isJSONSchemaObject(s))return!1;const{examples:o,example:i,default:a}=s;return!!(Array.isArray(o)&&o.length>=1)||(void 0!==a||void 0!==i)},extractExample=s=>{if(!isJSONSchemaObject(s))return null;const{examples:o,example:i,default:a}=s;return Array.isArray(o)&&o.length>=1?o.at(0):void 0!==a?a:void 0!==i?i:void 0},TT={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};TT.number=TT.integer;const NT=\"string\",inferTypeFromValue=s=>void 0===s?null:null===s?\"null\":Array.isArray(s)?\"array\":Number.isInteger(s)?\"integer\":typeof s,foldType=s=>{if(Array.isArray(s)&&s.length>=1){if(s.includes(\"array\"))return\"array\";if(s.includes(\"object\"))return\"object\";{const o=s.filter((s=>\"null\"!==s)),i=random_pick(o.length>0?o:s);if(IT.includes(i))return i}}return IT.includes(s)?s:null},inferType=(s,o=new WeakSet)=>{if(!isJSONSchemaObject(s))return NT;if(o.has(s))return NT;o.add(s);let{type:i,const:a}=s;if(i=foldType(i),\"string\"!=typeof i){const o=Object.keys(TT);e:for(let a=0;a<o.length;a+=1){const u=o[a],_=TT[u];for(let o=0;o<_.length;o+=1){const a=_[o];if(Object.hasOwn(s,a)){i=u;break e}}}}if(\"string\"!=typeof i&&void 0!==a){const s=inferTypeFromValue(a);i=\"string\"==typeof s?s:i}if(\"string\"!=typeof i){const combineTypes=i=>{if(Array.isArray(s[i])){const a=s[i].map((s=>inferType(s,o)));return foldType(a)}return null},a=combineTypes(\"allOf\"),u=combineTypes(\"anyOf\"),_=combineTypes(\"oneOf\"),w=s.not?inferType(s.not,o):null;(a||u||_||w)&&(i=foldType([a,u,_,w].filter(Boolean)))}if(\"string\"!=typeof i&&hasExample(s)){const o=extractExample(s),a=inferTypeFromValue(o);i=\"string\"==typeof a?a:i}return o.delete(s),i||NT},type_getType=s=>inferType(s),typeCast=s=>predicates_isBooleanJSONSchema(s)?(s=>!1===s?{not:{}}:{})(s):isJSONSchemaObject(s)?s:{},merge_merge=(s,o,i={})=>{if(predicates_isBooleanJSONSchema(s)&&!0===s)return!0;if(predicates_isBooleanJSONSchema(s)&&!1===s)return!1;if(predicates_isBooleanJSONSchema(o)&&!0===o)return!0;if(predicates_isBooleanJSONSchema(o)&&!1===o)return!1;if(!isJSONSchema(s))return o;if(!isJSONSchema(o))return s;const a={...o,...s};if(o.type&&s.type&&Array.isArray(o.type)&&\"string\"==typeof o.type){const i=normalizeArray(o.type).concat(s.type);a.type=Array.from(new Set(i))}if(Array.isArray(o.required)&&Array.isArray(s.required)&&(a.required=[...new Set([...s.required,...o.required])]),o.properties&&s.properties){const u=new Set([...Object.keys(o.properties),...Object.keys(s.properties)]);a.properties={};for(const _ of u){const u=o.properties[_]||{},w=s.properties[_]||{};u.readOnly&&!i.includeReadOnly||u.writeOnly&&!i.includeWriteOnly?a.required=(a.required||[]).filter((s=>s!==_)):a.properties[_]=merge_merge(w,u,i)}}return isJSONSchema(o.items)&&isJSONSchema(s.items)&&(a.items=merge_merge(s.items,o.items,i)),isJSONSchema(o.contains)&&isJSONSchema(s.contains)&&(a.contains=merge_merge(s.contains,o.contains,i)),isJSONSchema(o.contentSchema)&&isJSONSchema(s.contentSchema)&&(a.contentSchema=merge_merge(s.contentSchema,o.contentSchema,i)),a},MT=merge_merge,main_sampleFromSchemaGeneric=(s,o={},i=void 0,a=!1)=>{if(null==s&&void 0===i)return;\"function\"==typeof s?.toJS&&(s=s.toJS()),s=typeCast(s);let u=void 0!==i||hasExample(s);const _=!u&&Array.isArray(s.oneOf)&&s.oneOf.length>0,w=!u&&Array.isArray(s.anyOf)&&s.anyOf.length>0;if(!u&&(_||w)){const i=typeCast(random_pick(_?s.oneOf:s.anyOf));!(s=MT(s,i,o)).xml&&i.xml&&(s.xml=i.xml),hasExample(s)&&hasExample(i)&&(u=!0)}const x={};let{xml:C,properties:j,additionalProperties:L,items:B,contains:$}=s||{},V=type_getType(s),{includeReadOnly:U,includeWriteOnly:z}=o;C=C||{};let Y,{name:Z,prefix:ee,namespace:ie}=C,ae={};if(Object.hasOwn(s,\"type\")||(s.type=V),a&&(Z=Z||\"notagname\",Y=(ee?`${ee}:`:\"\")+Z,ie)){x[ee?`xmlns:${ee}`:\"xmlns\"]=ie}a&&(ae[Y]=[]);const ce=objectify(j);let le,pe=0;const hasExceededMaxProperties=()=>Number.isInteger(s.maxProperties)&&s.maxProperties>0&&pe>=s.maxProperties,canAddProperty=o=>!(Number.isInteger(s.maxProperties)&&s.maxProperties>0)||!hasExceededMaxProperties()&&(!(o=>!Array.isArray(s.required)||0===s.required.length||!s.required.includes(o))(o)||s.maxProperties-pe-(()=>{if(!Array.isArray(s.required)||0===s.required.length)return 0;let o=0;return a?s.required.forEach((s=>o+=void 0===ae[s]?0:1)):s.required.forEach((s=>{o+=void 0===ae[Y]?.find((o=>void 0!==o[s]))?0:1})),s.required.length-o})()>0);if(le=a?(i,u=void 0)=>{if(s&&ce[i]){if(ce[i].xml=ce[i].xml||{},ce[i].xml.attribute){const s=Array.isArray(ce[i].enum)?random_pick(ce[i].enum):void 0;if(hasExample(ce[i]))x[ce[i].xml.name||i]=extractExample(ce[i]);else if(void 0!==s)x[ce[i].xml.name||i]=s;else{const s=typeCast(ce[i]),a=type_getType(s),_=ce[i].xml.name||i;if(\"array\"===a){const s=main_sampleFromSchemaGeneric(ce[i],o,u,!1);x[_]=s.map((s=>as()(s)?\"UnknownTypeObject\":Array.isArray(s)?\"UnknownTypeArray\":s)).join(\" \")}else x[_]=\"object\"===a?\"UnknownTypeObject\":PT[a](s)}return}ce[i].xml.name=ce[i].xml.name||i}else ce[i]||!1===L||(ce[i]={xml:{name:i}});let _=main_sampleFromSchemaGeneric(ce[i],o,u,a);canAddProperty(i)&&(pe++,Array.isArray(_)?ae[Y]=ae[Y].concat(_):ae[Y].push(_))}:(i,u)=>{if(canAddProperty(i)){if(as()(s.discriminator?.mapping)&&s.discriminator.propertyName===i&&\"string\"==typeof s.$$ref){for(const o in s.discriminator.mapping)if(-1!==s.$$ref.search(s.discriminator.mapping[o])){ae[i]=o;break}}else ae[i]=main_sampleFromSchemaGeneric(ce[i],o,u,a);pe++}},u){let u;if(u=void 0!==i?i:extractExample(s),!a){if(\"number\"==typeof u&&\"string\"===V)return`${u}`;if(\"string\"!=typeof u||\"string\"===V)return u;try{return JSON.parse(u)}catch{return u}}if(\"array\"===V){if(!Array.isArray(u)){if(\"string\"==typeof u)return u;u=[u]}let i=[];return isJSONSchemaObject(B)&&(B.xml=B.xml||C||{},B.xml.name=B.xml.name||C.name,i=u.map((s=>main_sampleFromSchemaGeneric(B,o,s,a)))),isJSONSchemaObject($)&&($.xml=$.xml||C||{},$.xml.name=$.xml.name||C.name,i=[main_sampleFromSchemaGeneric($,o,void 0,a),...i]),i=PT.array(s,{sample:i}),C.wrapped?(ae[Y]=i,ds()(x)||ae[Y].push({_attr:x})):ae=i,ae}if(\"object\"===V){if(\"string\"==typeof u)return u;for(const s in u)Object.hasOwn(u,s)&&(ce[s]?.readOnly&&!U||ce[s]?.writeOnly&&!z||(ce[s]?.xml?.attribute?x[ce[s].xml.name||s]=u[s]:le(s,u[s])));return ds()(x)||ae[Y].push({_attr:x}),ae}return ae[Y]=ds()(x)?u:[{_attr:x},u],ae}if(\"array\"===V){let i=[];if(isJSONSchemaObject($))if(a&&($.xml=$.xml||s.xml||{},$.xml.name=$.xml.name||C.name),Array.isArray($.anyOf)){const{anyOf:s,...u}=B;i.push(...$.anyOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else if(Array.isArray($.oneOf)){const{oneOf:s,...u}=B;i.push(...$.oneOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else{if(!(!a||a&&C.wrapped))return main_sampleFromSchemaGeneric($,o,void 0,a);i.push(main_sampleFromSchemaGeneric($,o,void 0,a))}if(isJSONSchemaObject(B))if(a&&(B.xml=B.xml||s.xml||{},B.xml.name=B.xml.name||C.name),Array.isArray(B.anyOf)){const{anyOf:s,...u}=B;i.push(...B.anyOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else if(Array.isArray(B.oneOf)){const{oneOf:s,...u}=B;i.push(...B.oneOf.map((s=>main_sampleFromSchemaGeneric(MT(s,u,o),o,void 0,a))))}else{if(!(!a||a&&C.wrapped))return main_sampleFromSchemaGeneric(B,o,void 0,a);i.push(main_sampleFromSchemaGeneric(B,o,void 0,a))}return i=PT.array(s,{sample:i}),a&&C.wrapped?(ae[Y]=i,ds()(x)||ae[Y].push({_attr:x}),ae):i}if(\"object\"===V){for(let s in ce)Object.hasOwn(ce,s)&&(ce[s]?.deprecated||ce[s]?.readOnly&&!U||ce[s]?.writeOnly&&!z||le(s));if(a&&x&&ae[Y].push({_attr:x}),hasExceededMaxProperties())return ae;if(predicates_isBooleanJSONSchema(L)&&L)a?ae[Y].push({additionalProp:\"Anything can be here\"}):ae.additionalProp1={},pe++;else if(isJSONSchemaObject(L)){const i=L,u=main_sampleFromSchemaGeneric(i,o,void 0,a);if(a&&\"string\"==typeof i?.xml?.name&&\"notagname\"!==i?.xml?.name)ae[Y].push(u);else{const o=Number.isInteger(s.minProperties)&&s.minProperties>0&&pe<s.minProperties?s.minProperties-pe:3;for(let s=1;s<=o;s++){if(hasExceededMaxProperties())return ae;if(a){const o={};o[\"additionalProp\"+s]=u.notagname,ae[Y].push(o)}else ae[\"additionalProp\"+s]=u;pe++}}}return ae}let de;if(void 0!==s.const)de=s.const;else if(s&&Array.isArray(s.enum))de=random_pick(normalizeArray(s.enum));else{const i=isJSONSchemaObject(s.contentSchema)?main_sampleFromSchemaGeneric(s.contentSchema,o,void 0,a):void 0;de=PT[V](s,{sample:i})}return a?(ae[Y]=ds()(x)?de:[{_attr:x},de],ae):de},main_createXMLExample=(s,o,i)=>{const a=main_sampleFromSchemaGeneric(s,o,i,!0);if(a)return\"string\"==typeof a?a:ls()(a,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(s,o,i)=>main_sampleFromSchemaGeneric(s,o,i,!1),main_resolver=(s,o,i)=>[s,JSON.stringify(o),JSON.stringify(i)],RT=utils_memoizeN(main_createXMLExample,main_resolver),DT=utils_memoizeN(main_sampleFromSchema,main_resolver);const LT=new class OptionRegistry extends pT{#s={};data={...this.#s};get defaults(){return{...this.#s}}},api_optionAPI=(s,o)=>(void 0!==o&&LT.register(s,o),LT.get(s)),FT=[{when:/json/,shouldStringifyTypes:[\"string\"]}],BT=[\"object\"],fn_get_json_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.jsonSchema202012.memoizedSampleFromSchema(o,i,u),x=typeof w,C=FT.reduce(((s,o)=>o.when.test(a)?[...s,...o.shouldStringifyTypes]:s),BT);return gt()(C,(s=>s===x))?JSON.stringify(w,null,2):w},fn_get_yaml_sample_schema=s=>(o,i,a,u)=>{const{fn:_}=s(),w=_.jsonSchema202012.getJsonSampleSchema(o,i,a,u);let x;try{x=fn.dump(fn.load(w),{lineWidth:-1},{schema:rn}),\"\\n\"===x[x.length-1]&&(x=x.slice(0,x.length-1))}catch(s){return console.error(s),\"error: could not generate yaml example\"}return x.replace(/\\t/g,\"  \")},fn_get_xml_sample_schema=s=>(o,i,a)=>{const{fn:u}=s();if(o&&!o.xml&&(o.xml={}),o&&!o.xml.name){if(!o.$$ref&&(o.type||o.items||o.properties||o.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(o.$$ref){let s=o.$$ref.match(/\\S*\\/(\\S+)$/);o.xml.name=s[1]}}return u.jsonSchema202012.memoizedCreateXMLExample(o,i,a)},fn_get_sample_schema=s=>(o,i=\"\",a={},u=void 0)=>{const{fn:_}=s();return\"function\"==typeof o?.toJS&&(o=o.toJS()),\"function\"==typeof u?.toJS&&(u=u.toJS()),/xml/.test(i)?_.jsonSchema202012.getXmlSampleSchema(o,a,u):/(yaml|yml)/.test(i)?_.jsonSchema202012.getYamlSampleSchema(o,a,i,u):_.jsonSchema202012.getJsonSampleSchema(o,a,i,u)},json_schema_2020_12_samples=({getSystem:s})=>{const o=fn_get_json_sample_schema(s),i=fn_get_yaml_sample_schema(s),a=fn_get_xml_sample_schema(s),u=fn_get_sample_schema(s);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleOptionAPI:api_optionAPI,sampleEncoderAPI:ET,sampleFormatAPI:dT,sampleMediaTypeAPI:jT,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:DT,memoizedCreateXMLExample:RT,getJsonSampleSchema:o,getYamlSampleSchema:i,getXmlSampleSchema:a,getSampleSchema:u,mergeJsonSchema:MT,foldType}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const inline_plugin=s=>()=>({fn:s.fn,components:s.components}),factorization_system=s=>{const o=Ye()({layout:{layout:s.layout,filter:s.filter},spec:{spec:\"\",url:s.url},requestSnippets:s.requestSnippets},s.initialState);if(s.initialState)for(const[i,a]of Object.entries(s.initialState))void 0===a&&delete o[i];return{system:{configs:s.configs},plugins:s.presets,state:o}},sources_query=()=>s=>{const o=s.queryConfigEnabled?(()=>{const s=new URLSearchParams(lt.location.search);return Object.fromEntries(s)})():{};return Object.entries(o).reduce(((s,[o,i])=>(\"config\"===o?s.configUrl=i:\"urls.primaryName\"===o?s[o]=i:s=co()(s,o,i),s)),{})},sources_url=({url:s,system:o})=>async i=>{if(!s)return{};if(\"function\"!=typeof o.configsActions?.getConfigByUrl)return{};const a=(()=>{const s={};return s.promise=new Promise(((o,i)=>{s.resolve=o,s.reject=i})),s})();return o.configsActions.getConfigByUrl({url:s,loadRemoteConfig:!0,requestInterceptor:i.requestInterceptor,responseInterceptor:i.responseInterceptor},(s=>{a.resolve(s)})),a.promise},runtime=()=>()=>{const s={};return globalThis.location&&(s.oauth2RedirectUrl=`${globalThis.location.protocol}//${globalThis.location.host}${globalThis.location.pathname.substring(0,globalThis.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`),s},$T=Object.freeze({dom_id:null,domNode:null,spec:{},url:\"\",urls:null,configUrl:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:-1,filter:!1,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:void 0,persistAuthorization:!1,configs:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:s=>(s.curlOptions=[],s),responseInterceptor:s=>s,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:!1,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"},operationsSorter:null,tagsSorter:null,onComplete:null,modelPropertyMacro:null,parameterMacro:null,fileUploadMediaTypes:[\"application/octet-stream\",\"image/\",\"audio/\",\"video/\"],uncaughtExceptionHandler:null});var qT=__webpack_require__(61448),VT=__webpack_require__.n(qT),UT=__webpack_require__(77731),zT=__webpack_require__.n(UT);const type_casters_array=(s,o=[])=>Array.isArray(s)?s:o,type_casters_boolean=(s,o=!1)=>!0===s||\"true\"===s||1===s||\"1\"===s||!1!==s&&\"false\"!==s&&0!==s&&\"0\"!==s&&o,dom_node=s=>null===s||\"null\"===s?null:s,type_casters_filter=s=>{const o=String(s);return type_casters_boolean(s,o)},type_casters_function=(s,o)=>\"function\"==typeof s?s:o,nullable_array=s=>Array.isArray(s)?s:null,nullable_function=s=>\"function\"==typeof s?s:null,nullable_string=s=>null===s||\"null\"===s?null:String(s),type_casters_number=(s,o=-1)=>{const i=parseInt(s,10);return Number.isNaN(i)?o:i},type_casters_object=(s,o={})=>as()(s)?s:o,sorter=s=>\"function\"==typeof s||\"string\"==typeof s?s:null,type_casters_string=s=>String(s),syntax_highlight=(s,o)=>as()(s)?s:!1===s||\"false\"===s||0===s||\"0\"===s?{activated:!1}:o,undefined_string=s=>void 0===s||\"undefined\"===s?void 0:String(s),WT={components:{typeCaster:type_casters_object},configs:{typeCaster:type_casters_object},configUrl:{typeCaster:nullable_string},deepLinking:{typeCaster:type_casters_boolean,defaultValue:$T.deepLinking},defaultModelExpandDepth:{typeCaster:type_casters_number,defaultValue:$T.defaultModelExpandDepth},defaultModelRendering:{typeCaster:type_casters_string},defaultModelsExpandDepth:{typeCaster:type_casters_number,defaultValue:$T.defaultModelsExpandDepth},displayOperationId:{typeCaster:type_casters_boolean,defaultValue:$T.displayOperationId},displayRequestDuration:{typeCaster:type_casters_boolean,defaultValue:$T.displayRequestDuration},docExpansion:{typeCaster:type_casters_string},dom_id:{typeCaster:nullable_string},domNode:{typeCaster:dom_node},fileUploadMediaTypes:{typeCaster:type_casters_array,defaultValue:$T.fileUploadMediaTypes},filter:{typeCaster:type_casters_filter},fn:{typeCaster:type_casters_object},initialState:{typeCaster:type_casters_object},layout:{typeCaster:type_casters_string},maxDisplayedTags:{typeCaster:type_casters_number,defaultValue:$T.maxDisplayedTags},modelPropertyMacro:{typeCaster:nullable_function},oauth2RedirectUrl:{typeCaster:undefined_string},onComplete:{typeCaster:nullable_function},operationsSorter:{typeCaster:sorter},paramaterMacro:{typeCaster:nullable_function},persistAuthorization:{typeCaster:type_casters_boolean,defaultValue:$T.persistAuthorization},plugins:{typeCaster:type_casters_array,defaultValue:$T.plugins},presets:{typeCaster:type_casters_array,defaultValue:$T.presets},requestInterceptor:{typeCaster:type_casters_function,defaultValue:$T.requestInterceptor},requestSnippets:{typeCaster:type_casters_object,defaultValue:$T.requestSnippets},requestSnippetsEnabled:{typeCaster:type_casters_boolean,defaultValue:$T.requestSnippetsEnabled},responseInterceptor:{typeCaster:type_casters_function,defaultValue:$T.responseInterceptor},showCommonExtensions:{typeCaster:type_casters_boolean,defaultValue:$T.showCommonExtensions},showExtensions:{typeCaster:type_casters_boolean,defaultValue:$T.showExtensions},showMutatedRequest:{typeCaster:type_casters_boolean,defaultValue:$T.showMutatedRequest},spec:{typeCaster:type_casters_object,defaultValue:$T.spec},supportedSubmitMethods:{typeCaster:type_casters_array,defaultValue:$T.supportedSubmitMethods},syntaxHighlight:{typeCaster:syntax_highlight,defaultValue:$T.syntaxHighlight},\"syntaxHighlight.activated\":{typeCaster:type_casters_boolean,defaultValue:$T.syntaxHighlight.activated},\"syntaxHighlight.theme\":{typeCaster:type_casters_string},tagsSorter:{typeCaster:sorter},tryItOutEnabled:{typeCaster:type_casters_boolean,defaultValue:$T.tryItOutEnabled},url:{typeCaster:type_casters_string},urls:{typeCaster:nullable_array},\"urls.primaryName\":{typeCaster:type_casters_string},validatorUrl:{typeCaster:nullable_string},withCredentials:{typeCaster:type_casters_boolean,defaultValue:$T.withCredentials},uncaughtExceptionHandler:{typeCaster:nullable_function}},type_cast=s=>Object.entries(WT).reduce(((s,[o,{typeCaster:i,defaultValue:a}])=>{if(VT()(s,o)){const u=i(An()(s,o),a);s=zT()(o,u,s)}return s}),{...s}),config_merge=(s,...o)=>{let i=Symbol.for(\"domNode\"),a=Symbol.for(\"primaryName\");const u=[];for(const s of o){const o={...s};Object.hasOwn(o,\"domNode\")&&(i=o.domNode,delete o.domNode),Object.hasOwn(o,\"urls.primaryName\")?(a=o[\"urls.primaryName\"],delete o[\"urls.primaryName\"]):Array.isArray(o.urls)&&Object.hasOwn(o.urls,\"primaryName\")&&(a=o.urls.primaryName,delete o.urls.primaryName),u.push(o)}const _=Ye()(s,...u);return i!==Symbol.for(\"domNode\")&&(_.domNode=i),a!==Symbol.for(\"primaryName\")&&Array.isArray(_.urls)&&(_.urls.primaryName=a),type_cast(_)};function SwaggerUI(s){const o=sources_query()(s),i=runtime()(),a=SwaggerUI.config.merge({},SwaggerUI.config.defaults,i,s,o),u=factorization_system(a),_=inline_plugin(a),w=new Store(u);w.register([a.plugins,_]);const x=w.getSystem(),persistConfigs=s=>{w.setConfigs(s),x.configsActions.loaded()},updateSpec=s=>{!o.url&&\"object\"==typeof s.spec&&Object.keys(s.spec).length>0?(x.specActions.updateUrl(\"\"),x.specActions.updateLoadingStatus(\"success\"),x.specActions.updateSpec(JSON.stringify(s.spec))):\"function\"==typeof x.specActions.download&&s.url&&!s.urls&&(x.specActions.updateUrl(s.url),x.specActions.download(s.url))},render=s=>{if(s.domNode)x.render(s.domNode,\"App\");else if(s.dom_id){const o=document.querySelector(s.dom_id);x.render(o,\"App\")}else null===s.dom_id||null===s.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\")};return a.configUrl?((async()=>{const{configUrl:s}=a,i=await sources_url({url:s,system:x})(a),u=SwaggerUI.config.merge({},a,i,o);persistConfigs(u),null!==i&&updateSpec(u),render(u)})(),x):(persistConfigs(a),updateSpec(a),render(a),x)}SwaggerUI.System=Store,SwaggerUI.config={defaults:$T,merge:config_merge,typeCast:type_cast,typeCastMappings:WT},SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5:json_schema_5,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SyntaxHighlighting:syntax_highlighting,Versions:versions,SafeRender:safe_render};const JT=SwaggerUI})(),module.exports=i.default})();"
  },
  {
    "path": "runner/server/docs/ui/swagger-ui-standalone-preset.js",
    "content": "/*! For license information please see swagger-ui-standalone-preset.js.LICENSE.txt */\n!function webpackUniversalModuleDefinition(t,e){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define([],e):\"object\"==typeof exports?exports.SwaggerUIStandalonePreset=e():t.SwaggerUIStandalonePreset=e()}(this,(()=>(()=>{var t={2:(t,e,r)=>{var n=r(2199),i=r(4664),o=r(5950);t.exports=function getAllKeys(t){return n(t,o,i)}},79:(t,e,r)=>{var n=r(3702),i=r(80),o=r(4739),a=r(8655),s=r(1175);function ListCache(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ListCache.prototype.clear=n,ListCache.prototype.delete=i,ListCache.prototype.get=o,ListCache.prototype.has=a,ListCache.prototype.set=s,t.exports=ListCache},80:(t,e,r)=>{var n=r(6025),i=Array.prototype.splice;t.exports=function listCacheDelete(t){var e=this.__data__,r=n(e,t);return!(r<0)&&(r==e.length-1?e.pop():i.call(e,r,1),--this.size,!0)}},104:(t,e,r)=>{var n=r(3661);function memoize(t,e){if(\"function\"!=typeof t||null!=e&&\"function\"!=typeof e)throw new TypeError(\"Expected a function\");var memoized=function(){var r=arguments,n=e?e.apply(this,r):r[0],i=memoized.cache;if(i.has(n))return i.get(n);var o=t.apply(this,r);return memoized.cache=i.set(n,o)||i,o};return memoized.cache=new(memoize.Cache||n),memoized}memoize.Cache=n,t.exports=memoize},251:(t,e)=>{e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,_=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[r+p]=255&a,p+=d,a/=256,c-=8);t[r+p-d]|=128*_}},270:(t,e,r)=>{var n=r(7068),i=r(346);t.exports=function baseIsEqual(t,e,r,o,a){return t===e||(null==t||null==e||!i(t)&&!i(e)?t!=t&&e!=e:n(t,e,r,o,baseIsEqual,a))}},289:(t,e,r)=>{var n=r(2651);t.exports=function mapCacheGet(t){return n(this,t).get(t)}},294:t=>{t.exports=function isLength(t){return\"number\"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},317:t=>{t.exports=function mapToArray(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}},346:t=>{t.exports=function isObjectLike(t){return null!=t&&\"object\"==typeof t}},361:t=>{var e=/^(?:0|[1-9]\\d*)$/;t.exports=function isIndex(t,r){var n=typeof t;return!!(r=null==r?9007199254740991:r)&&(\"number\"==n||\"symbol\"!=n&&e.test(t))&&t>-1&&t%1==0&&t<r}},376:t=>{\"use strict\";t.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},392:t=>{t.exports=function getValue(t,e){return null==t?void 0:t[e]}},462:(t,e,r)=>{\"use strict\";var n=r(975);t.exports=n},470:(t,e,r)=>{\"use strict\";var n=r(6028),i=r(5594);t.exports=function(t){var e=n(t,\"string\");return i(e)?e:e+\"\"}},575:(t,e,r)=>{\"use strict\";var n=r(3121);t.exports=function(t){return n(t.length)}},581:(t,e,r)=>{\"use strict\";var n=r(3930),i=r(2250),o=r(6285),a=TypeError;t.exports=function(t,e){var r,s;if(\"string\"===e&&i(r=t.toString)&&!o(s=n(r,t)))return s;if(i(r=t.valueOf)&&!o(s=n(r,t)))return s;if(\"string\"!==e&&i(r=t.toString)&&!o(s=n(r,t)))return s;throw new a(\"Can't convert object to primitive value\")}},583:(t,e,r)=>{var n=r(7237),i=r(7255),o=r(8586),a=r(7797);t.exports=function property(t){return o(t)?n(a(t)):i(t)}},631:(t,e,r)=>{var n=r(8077),i=r(9326);t.exports=function hasIn(t,e){return null!=t&&i(t,e,n)}},641:(t,e,r)=>{var n=r(6649),i=r(5950);t.exports=function baseForOwn(t,e){return t&&n(t,e,i)}},659:(t,e,r)=>{var n=r(1873),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function getRawTag(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=a.call(t);return n&&(e?t[s]=r:delete t[s]),i}},689:(t,e,r)=>{var n=r(2),i=Object.prototype.hasOwnProperty;t.exports=function equalObjects(t,e,r,o,a,s){var u=1&r,c=n(t),f=c.length;if(f!=n(e).length&&!u)return!1;for(var l=f;l--;){var h=c[l];if(!(u?h in e:i.call(e,h)))return!1}var p=s.get(t),d=s.get(e);if(p&&d)return p==e&&d==t;var _=!0;s.set(t,e),s.set(e,t);for(var y=u;++l<f;){var m=t[h=c[l]],g=e[h];if(o)var v=u?o(g,m,h,e,t,s):o(m,g,h,t,e,s);if(!(void 0===v?m===g||a(m,g,r,o,s):v)){_=!1;break}y||(y=\"constructor\"==h)}if(_&&!y){var b=t.constructor,w=e.constructor;b==w||!(\"constructor\"in t)||!(\"constructor\"in e)||\"function\"==typeof b&&b instanceof b&&\"function\"==typeof w&&w instanceof w||(_=!1)}return s.delete(t),s.delete(e),_}},695:(t,e,r)=>{var n=r(8096),i=r(2428),o=r(6449),a=r(3656),s=r(361),u=r(7167),c=Object.prototype.hasOwnProperty;t.exports=function arrayLikeKeys(t,e){var r=o(t),f=!r&&i(t),l=!r&&!f&&a(t),h=!r&&!f&&!l&&u(t),p=r||f||l||h,d=p?n(t.length,String):[],_=d.length;for(var y in t)!e&&!c.call(t,y)||p&&(\"length\"==y||l&&(\"offset\"==y||\"parent\"==y)||h&&(\"buffer\"==y||\"byteLength\"==y||\"byteOffset\"==y)||s(y,_))||d.push(y);return d}},756:(t,e,r)=>{var n=r(3805);t.exports=function isStrictComparable(t){return t==t&&!n(t)}},776:(t,e,r)=>{var n=r(756),i=r(5950);t.exports=function getMatchData(t){for(var e=i(t),r=e.length;r--;){var o=e[r],a=t[o];e[r]=[o,a,n(a)]}return e}},798:(t,e,r)=>{\"use strict\";var n,i,o=r(5951),a=r(6794),s=o.process,u=o.Deno,c=s&&s.versions||u&&u.version,f=c&&c.v8;f&&(i=(n=f.split(\".\"))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\\/(\\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\\/(\\d+)/))&&(i=+n[1]),t.exports=i},828:(t,e,r)=>{var n=r(4647),i=r(3222),o=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,a=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\");t.exports=function deburr(t){return(t=i(t))&&t.replace(o,n).replace(a,\"\")}},882:t=>{t.exports=function arrayReduce(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}},909:(t,e,r)=>{var n=r(641),i=r(8329)(n);t.exports=i},916:(t,e,r)=>{var n=r(909);t.exports=function baseSome(t,e){var r;return n(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}},938:t=>{t.exports=function stackDelete(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},945:(t,e,r)=>{var n=r(79),i=r(8223),o=r(3661);t.exports=function stackSet(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(t,e),this.size=r.size,this}},953:(t,e,r)=>{\"use strict\";t.exports=r(3375)},975:(t,e,r)=>{\"use strict\";var n=r(9748);t.exports=n},1042:(t,e,r)=>{var n=r(6110)(Object,\"create\");t.exports=n},1074:t=>{t.exports=function asciiToArray(t){return t.split(\"\")}},1091:(t,e,r)=>{\"use strict\";var n=r(5951),i=r(6024),o=r(2361),a=r(2250),s=r(3846).f,u=r(7463),c=r(2046),f=r(8311),l=r(1626),h=r(9724);r(6128);var wrapConstructor=function(t){var Wrapper=function(e,r,n){if(this instanceof Wrapper){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,r)}return new t(e,r,n)}return i(t,this,arguments)};return Wrapper.prototype=t.prototype,Wrapper};t.exports=function(t,e){var r,i,p,d,_,y,m,g,v,b=t.target,w=t.global,I=t.stat,x=t.proto,B=w?n:I?n[b]:n[b]&&n[b].prototype,k=w?c:c[b]||l(c,b,{})[b],C=k.prototype;for(d in e)i=!(r=u(w?d:b+(I?\".\":\"#\")+d,t.forced))&&B&&h(B,d),y=k[d],i&&(m=t.dontCallGetSet?(v=s(B,d))&&v.value:B[d]),_=i&&m?m:e[d],(r||x||typeof y!=typeof _)&&(g=t.bind&&i?f(_,n):t.wrap&&i?wrapConstructor(_):x&&a(_)?o(_):_,(t.sham||_&&_.sham||y&&y.sham)&&l(g,\"sham\",!0),l(k,d,g),x&&(h(c,p=b+\"Prototype\")||l(c,p,{}),l(c[p],d,_),t.real&&C&&(r||!C[d])&&l(C,d,_)))}},1175:(t,e,r)=>{var n=r(6025);t.exports=function listCacheSet(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},1176:t=>{\"use strict\";var e=Math.ceil,r=Math.floor;t.exports=Math.trunc||function trunc(t){var n=+t;return(n>0?r:e)(n)}},1234:t=>{t.exports=function baseZipObject(t,e,r){for(var n=-1,i=t.length,o=e.length,a={};++n<i;){var s=n<o?e[n]:void 0;r(a,t[n],s)}return a}},1340:(t,e,r)=>{\"use strict\";var n=r(1091),i=r(9538);n({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==i},{assign:i})},1380:t=>{t.exports=function setCacheAdd(t){return this.__data__.set(t,\"__lodash_hash_undefined__\"),this}},1420:(t,e,r)=>{var n=r(79);t.exports=function stackClear(){this.__data__=new n,this.size=0}},1459:t=>{t.exports=function setCacheHas(t){return this.__data__.has(t)}},1489:(t,e,r)=>{var n=r(7400);t.exports=function toInteger(t){var e=n(t),r=e%1;return e==e?r?e-r:e:0}},1505:(t,e,r)=>{\"use strict\";var n=r(8828);t.exports=!n((function(){var t=function(){}.bind();return\"function\"!=typeof t||t.hasOwnProperty(\"prototype\")}))},1549:(t,e,r)=>{var n=r(2032),i=r(3862),o=r(6721),a=r(2749),s=r(5749);function Hash(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Hash.prototype.clear=n,Hash.prototype.delete=i,Hash.prototype.get=o,Hash.prototype.has=a,Hash.prototype.set=s,t.exports=Hash},1626:(t,e,r)=>{\"use strict\";var n=r(9447),i=r(4284),o=r(5817);t.exports=n?function(t,e,r){return i.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},1733:t=>{var e=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g;t.exports=function asciiWords(t){return t.match(e)||[]}},1747:(t,e,r)=>{\"use strict\";var n=r(5951),i=r(2046);t.exports=function(t,e){var r=i[t+\"Prototype\"],o=r&&r[e];if(o)return o;var a=n[t],s=a&&a.prototype;return s&&s[e]}},1769:(t,e,r)=>{var n=r(6449),i=r(8586),o=r(1802),a=r(3222);t.exports=function castPath(t,e){return n(t)?t:i(t,e)?[t]:o(a(t))}},1799:(t,e,r)=>{var n=r(7217),i=r(270);t.exports=function baseIsMatch(t,e,r,o){var a=r.length,s=a,u=!o;if(null==t)return!s;for(t=Object(t);a--;){var c=r[a];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<s;){var f=(c=r[a])[0],l=t[f],h=c[1];if(u&&c[2]){if(void 0===l&&!(f in t))return!1}else{var p=new n;if(o)var d=o(l,h,f,t,e,p);if(!(void 0===d?i(h,l,3,o,p):d))return!1}}return!0}},1800:t=>{var e=/\\s/;t.exports=function trimmedEndIndex(t){for(var r=t.length;r--&&e.test(t.charAt(r)););return r}},1802:(t,e,r)=>{var n=r(2224),i=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,o=/\\\\(\\\\)?/g,a=n((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(\"\"),t.replace(i,(function(t,r,n,i){e.push(n?i.replace(o,\"$1\"):r||t)})),e}));t.exports=a},1873:(t,e,r)=>{var n=r(9325).Symbol;t.exports=n},1882:(t,e,r)=>{var n=r(2552),i=r(3805);t.exports=function isFunction(t){if(!i(t))return!1;var e=n(t);return\"[object Function]\"==e||\"[object GeneratorFunction]\"==e||\"[object AsyncFunction]\"==e||\"[object Proxy]\"==e}},1907:(t,e,r)=>{\"use strict\";var n=r(1505),i=Function.prototype,o=i.call,a=n&&i.bind.bind(o,o);t.exports=n?a:function(t){return function(){return o.apply(t,arguments)}}},1986:(t,e,r)=>{var n=r(1873),i=r(7828),o=r(5288),a=r(5911),s=r(317),u=r(4247),c=n?n.prototype:void 0,f=c?c.valueOf:void 0;t.exports=function equalByTag(t,e,r,n,c,l,h){switch(r){case\"[object DataView]\":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case\"[object ArrayBuffer]\":return!(t.byteLength!=e.byteLength||!l(new i(t),new i(e)));case\"[object Boolean]\":case\"[object Date]\":case\"[object Number]\":return o(+t,+e);case\"[object Error]\":return t.name==e.name&&t.message==e.message;case\"[object RegExp]\":case\"[object String]\":return t==e+\"\";case\"[object Map]\":var p=s;case\"[object Set]\":var d=1&n;if(p||(p=u),t.size!=e.size&&!d)return!1;var _=h.get(t);if(_)return _==e;n|=2,h.set(t,e);var y=a(p(t),p(e),n,c,l,h);return h.delete(t),y;case\"[object Symbol]\":if(f)return f.call(t)==f.call(e)}return!1}},2006:(t,e,r)=>{var n=r(5389),i=r(4894),o=r(5950);t.exports=function createFind(t){return function(e,r,a){var s=Object(e);if(!i(e)){var u=n(r,3);e=o(e),r=function(t){return u(s[t],t,s)}}var c=t(e,r,a);return c>-1?s[u?e[c]:c]:void 0}}},2032:(t,e,r)=>{var n=r(1042);t.exports=function hashClear(){this.__data__=n?n(null):{},this.size=0}},2046:t=>{\"use strict\";t.exports={}},2054:t=>{var e=\"\\\\ud800-\\\\udfff\",r=\"[\"+e+\"]\",n=\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",i=\"\\\\ud83c[\\\\udffb-\\\\udfff]\",o=\"[^\"+e+\"]\",a=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",s=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",u=\"(?:\"+n+\"|\"+i+\")\"+\"?\",c=\"[\\\\ufe0e\\\\ufe0f]?\",f=c+u+(\"(?:\\\\u200d(?:\"+[o,a,s].join(\"|\")+\")\"+c+u+\")*\"),l=\"(?:\"+[o+n+\"?\",n,a,s,r].join(\"|\")+\")\",h=RegExp(i+\"(?=\"+i+\")|\"+l+f,\"g\");t.exports=function unicodeToArray(t){return t.match(h)||[]}},2159:(t,e,r)=>{\"use strict\";var n=r(2250),i=r(4640),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+\" is not a function\")}},2199:(t,e,r)=>{var n=r(4528),i=r(6449);t.exports=function baseGetAllKeys(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},2205:function(t,e,r){var n;n=void 0!==r.g?r.g:this,t.exports=function(t){if(t.CSS&&t.CSS.escape)return t.CSS.escape;var cssEscape=function(t){if(0==arguments.length)throw new TypeError(\"`CSS.escape` requires an argument.\");for(var e,r=String(t),n=r.length,i=-1,o=\"\",a=r.charCodeAt(0);++i<n;)0!=(e=r.charCodeAt(i))?o+=e>=1&&e<=31||127==e||0==i&&e>=48&&e<=57||1==i&&e>=48&&e<=57&&45==a?\"\\\\\"+e.toString(16)+\" \":0==i&&1==n&&45==e||!(e>=128||45==e||95==e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122)?\"\\\\\"+r.charAt(i):r.charAt(i):o+=\"�\";return o};return t.CSS||(t.CSS={}),t.CSS.escape=cssEscape,cssEscape}(n)},2224:(t,e,r)=>{var n=r(104);t.exports=function memoizeCapped(t){var e=n(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}},2225:t=>{var e=\"\\\\ud800-\\\\udfff\",r=\"\\\\u2700-\\\\u27bf\",n=\"a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff\",i=\"A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde\",o=\"\\\\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\",a=\"[\"+o+\"]\",s=\"\\\\d+\",u=\"[\"+r+\"]\",c=\"[\"+n+\"]\",f=\"[^\"+e+o+s+r+n+i+\"]\",l=\"(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}\",h=\"[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]\",p=\"[\"+i+\"]\",d=\"(?:\"+c+\"|\"+f+\")\",_=\"(?:\"+p+\"|\"+f+\")\",y=\"(?:['’](?:d|ll|m|re|s|t|ve))?\",m=\"(?:['’](?:D|LL|M|RE|S|T|VE))?\",g=\"(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?\",v=\"[\\\\ufe0e\\\\ufe0f]?\",b=v+g+(\"(?:\\\\u200d(?:\"+[\"[^\"+e+\"]\",l,h].join(\"|\")+\")\"+v+g+\")*\"),w=\"(?:\"+[u,l,h].join(\"|\")+\")\"+b,I=RegExp([p+\"?\"+c+\"+\"+y+\"(?=\"+[a,p,\"$\"].join(\"|\")+\")\",_+\"+\"+m+\"(?=\"+[a,p+d,\"$\"].join(\"|\")+\")\",p+\"?\"+d+\"+\"+y,p+\"+\"+m,\"\\\\d*(?:1ST|2ND|3RD|(?![123])\\\\dTH)(?=\\\\b|[a-z_])\",\"\\\\d*(?:1st|2nd|3rd|(?![123])\\\\dth)(?=\\\\b|[A-Z_])\",s,w].join(\"|\"),\"g\");t.exports=function unicodeWords(t){return t.match(I)||[]}},2250:t=>{\"use strict\";var e=\"object\"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return\"function\"==typeof t||t===e}:function(t){return\"function\"==typeof t}},2361:(t,e,r)=>{\"use strict\";var n=r(5807),i=r(1907);t.exports=function(t){if(\"Function\"===n(t))return i(t)}},2426:(t,e,r)=>{var n=r(4248),i=r(5389),o=r(916),a=r(6449),s=r(6800);t.exports=function some(t,e,r){var u=a(t)?n:o;return r&&s(t,e,r)&&(e=void 0),u(t,i(e,3))}},2428:(t,e,r)=>{var n=r(7534),i=r(346),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,\"callee\")&&!s.call(t,\"callee\")};t.exports=u},2507:(t,e,r)=>{var n=r(8754),i=r(9698),o=r(3912),a=r(3222);t.exports=function createCaseFirst(t){return function(e){e=a(e);var r=i(e)?o(e):void 0,s=r?r[0]:e.charAt(0),u=r?n(r,1).join(\"\"):e.slice(1);return s[t]()+u}}},2523:t=>{t.exports=function baseFindIndex(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},2532:(t,e,r)=>{\"use strict\";var n=r(5951),i=Object.defineProperty;t.exports=function(t,e){try{i(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},2552:(t,e,r)=>{var n=r(1873),i=r(659),o=r(9350),a=n?n.toStringTag:void 0;t.exports=function baseGetTag(t){return null==t?void 0===t?\"[object Undefined]\":\"[object Null]\":a&&a in Object(t)?i(t):o(t)}},2567:(t,e,r)=>{\"use strict\";r(9307);var n=r(1747);t.exports=n(\"Function\",\"bind\")},2574:(t,e)=>{\"use strict\";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);e.f=i?function propertyIsEnumerable(t){var e=n(this,t);return!!e&&e.enumerable}:r},2651:(t,e,r)=>{var n=r(4218);t.exports=function getMapData(t,e){var r=t.__data__;return n(e)?r[\"string\"==typeof e?\"string\":\"hash\"]:r.map}},2749:(t,e,r)=>{var n=r(1042),i=Object.prototype.hasOwnProperty;t.exports=function hashHas(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},2802:(t,e,r)=>{var n=t.exports=function SHA(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+\" is not supported (we accept pull requests)\");return new e};n.sha=r(7816),n.sha1=r(3737),n.sha224=r(6710),n.sha256=r(4107),n.sha384=r(2827),n.sha512=r(2890)},2804:(t,e,r)=>{var n=r(6110)(r(9325),\"Promise\");t.exports=n},2827:(t,e,r)=>{var n=r(6698),i=r(2890),o=r(8011),a=r(2861).Buffer,s=new Array(160);function Sha384(){this.init(),this._w=s,o.call(this,128,112)}n(Sha384,i),Sha384.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Sha384.prototype._hash=function(){var t=a.allocUnsafe(48);function writeInt64BE(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),t},t.exports=Sha384},2861:(t,e,r)=>{var n=r(8287),i=n.Buffer;function copyProps(t,e){for(var r in t)e[r]=t[r]}function SafeBuffer(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(copyProps(n,e),e.Buffer=SafeBuffer),SafeBuffer.prototype=Object.create(i.prototype),copyProps(i,SafeBuffer),SafeBuffer.from=function(t,e,r){if(\"number\"==typeof t)throw new TypeError(\"Argument must not be a number\");return i(t,e,r)},SafeBuffer.alloc=function(t,e,r){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");var n=i(t);return void 0!==e?\"string\"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},SafeBuffer.allocUnsafe=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return i(t)},SafeBuffer.allocUnsafeSlow=function(t){if(\"number\"!=typeof t)throw new TypeError(\"Argument must be a number\");return n.SlowBuffer(t)}},2875:(t,e,r)=>{\"use strict\";var n=r(3045),i=r(376);t.exports=Object.keys||function keys(t){return n(t,i)}},2890:(t,e,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function Sha512(){this.init(),this._w=s,i.call(this,128,112)}function Ch(t,e,r){return r^t&(e^r)}function maj(t,e,r){return t&e|r&(t|e)}function sigma0(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function sigma1(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Gamma0(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Gamma0l(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Gamma1(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Gamma1l(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function getCarry(t,e){return t>>>0<e>>>0?1:0}n(Sha512,i),Sha512.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},Sha512.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,c=0|this._gh,f=0|this._hh,l=0|this._al,h=0|this._bl,p=0|this._cl,d=0|this._dl,_=0|this._el,y=0|this._fl,m=0|this._gl,g=0|this._hl,v=0;v<32;v+=2)e[v]=t.readInt32BE(4*v),e[v+1]=t.readInt32BE(4*v+4);for(;v<160;v+=2){var b=e[v-30],w=e[v-30+1],I=Gamma0(b,w),x=Gamma0l(w,b),B=Gamma1(b=e[v-4],w=e[v-4+1]),k=Gamma1l(w,b),C=e[v-14],q=e[v-14+1],L=e[v-32],j=e[v-32+1],z=x+q|0,P=I+C+getCarry(z,x)|0;P=(P=P+B+getCarry(z=z+k|0,k)|0)+L+getCarry(z=z+j|0,j)|0,e[v]=P,e[v+1]=z}for(var D=0;D<160;D+=2){P=e[D],z=e[D+1];var U=maj(r,n,i),W=maj(l,h,p),V=sigma0(r,l),K=sigma0(l,r),$=sigma1(s,_),H=sigma1(_,s),Y=a[D],Z=a[D+1],J=Ch(s,u,c),tt=Ch(_,y,m),et=g+H|0,rt=f+$+getCarry(et,g)|0;rt=(rt=(rt=rt+J+getCarry(et=et+tt|0,tt)|0)+Y+getCarry(et=et+Z|0,Z)|0)+P+getCarry(et=et+z|0,z)|0;var nt=K+W|0,it=V+U+getCarry(nt,K)|0;f=c,g=m,c=u,m=y,u=s,y=_,s=o+rt+getCarry(_=d+et|0,d)|0,o=i,d=p,i=n,p=h,n=r,h=l,r=rt+it+getCarry(l=et+nt|0,et)|0}this._al=this._al+l|0,this._bl=this._bl+h|0,this._cl=this._cl+p|0,this._dl=this._dl+d|0,this._el=this._el+_|0,this._fl=this._fl+y|0,this._gl=this._gl+m|0,this._hl=this._hl+g|0,this._ah=this._ah+r+getCarry(this._al,l)|0,this._bh=this._bh+n+getCarry(this._bl,h)|0,this._ch=this._ch+i+getCarry(this._cl,p)|0,this._dh=this._dh+o+getCarry(this._dl,d)|0,this._eh=this._eh+s+getCarry(this._el,_)|0,this._fh=this._fh+u+getCarry(this._fl,y)|0,this._gh=this._gh+c+getCarry(this._gl,m)|0,this._hh=this._hh+f+getCarry(this._hl,g)|0},Sha512.prototype._hash=function(){var t=o.allocUnsafe(64);function writeInt64BE(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return writeInt64BE(this._ah,this._al,0),writeInt64BE(this._bh,this._bl,8),writeInt64BE(this._ch,this._cl,16),writeInt64BE(this._dh,this._dl,24),writeInt64BE(this._eh,this._el,32),writeInt64BE(this._fh,this._fl,40),writeInt64BE(this._gh,this._gl,48),writeInt64BE(this._hh,this._hl,56),t},t.exports=Sha512},2949:(t,e,r)=>{var n=r(2651);t.exports=function mapCacheSet(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},3034:(t,e,r)=>{\"use strict\";var n=r(8280),i=r(2567),o=Function.prototype;t.exports=function(t){var e=t.bind;return t===o||n(o,t)&&e===o.bind?i:e}},3040:(t,e,r)=>{var n=r(1549),i=r(79),o=r(8223);t.exports=function mapCacheClear(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},3045:(t,e,r)=>{\"use strict\";var n=r(1907),i=r(9724),o=r(7374),a=r(4436).indexOf,s=r(8530),u=n([].push);t.exports=function(t,e){var r,n=o(t),c=0,f=[];for(r in n)!i(s,r)&&i(n,r)&&u(f,r);for(;e.length>c;)i(n,r=e[c++])&&(~a(f,r)||u(f,r));return f}},3121:(t,e,r)=>{\"use strict\";var n=r(5482),i=Math.min;t.exports=function(t){var e=n(t);return e>0?i(e,9007199254740991):0}},3209:(t,e,r)=>{\"use strict\";var n=r(5606),i=65536,o=4294967295;var a=r(2861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function randomBytes(t,e){if(t>o)throw new RangeError(\"requested too many random bytes\");var r=a.allocUnsafe(t);if(t>0)if(t>i)for(var u=0;u<t;u+=i)s.getRandomValues(r.slice(u,u+i));else s.getRandomValues(r);if(\"function\"==typeof e)return n.nextTick((function(){e(null,r)}));return r}:t.exports=function oldBrowser(){throw new Error(\"Secure random number generation is not supported by this browser.\\nUse Chrome, Firefox or Internet Explorer 11\")}},3221:t=>{t.exports=function createBaseFor(t){return function(e,r,n){for(var i=-1,o=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++i];if(!1===r(o[u],u,o))break}return e}}},3222:(t,e,r)=>{var n=r(7556);t.exports=function toString(t){return null==t?\"\":n(t)}},3243:(t,e,r)=>{var n=r(6110),i=function(){try{var t=n(Object,\"defineProperty\");return t({},\"\",{}),t}catch(t){}}();t.exports=i},3345:t=>{t.exports=function stubArray(){return[]}},3360:(t,e,r)=>{var n=r(3243);t.exports=function baseAssignValue(t,e,r){\"__proto__\"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},3375:(t,e,r)=>{\"use strict\";var n=r(3700);t.exports=n},3427:(t,e,r)=>{\"use strict\";var n=r(1907);t.exports=n([].slice)},3488:t=>{t.exports=function identity(t){return t}},3556:(t,e,r)=>{\"use strict\";var n=r(9846);t.exports=n&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},3605:t=>{t.exports=function stackGet(t){return this.__data__.get(t)}},3648:(t,e,r)=>{\"use strict\";var n=r(9447),i=r(8828),o=r(9552);t.exports=!n&&!i((function(){return 7!==Object.defineProperty(o(\"div\"),\"a\",{get:function(){return 7}}).a}))},3650:(t,e,r)=>{var n=r(4335)(Object.keys,Object);t.exports=n},3656:(t,e,r)=>{t=r.nmd(t);var n=r(9325),i=r(9935),o=e&&!e.nodeType&&e,a=o&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u},3661:(t,e,r)=>{var n=r(3040),i=r(7670),o=r(289),a=r(4509),s=r(2949);function MapCache(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}MapCache.prototype.clear=n,MapCache.prototype.delete=i,MapCache.prototype.get=o,MapCache.prototype.has=a,MapCache.prototype.set=s,t.exports=MapCache},3663:(t,e,r)=>{var n=r(1799),i=r(776),o=r(7197);t.exports=function baseMatches(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(r){return r===t||n(r,t,e)}}},3700:(t,e,r)=>{\"use strict\";var n=r(9709);t.exports=n},3702:t=>{t.exports=function listCacheClear(){this.__data__=[],this.size=0}},3737:(t,e,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function Sha1(){this.init(),this._w=s,i.call(this,64,56)}function rotl5(t){return t<<5|t>>>27}function rotl30(t){return t<<30|t>>>2}function ft(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(Sha1,i),Sha1.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha1.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=(e=r[c-3]^r[c-8]^r[c-14]^r[c-16])<<1|e>>>31;for(var f=0;f<80;++f){var l=~~(f/20),h=rotl5(n)+ft(l,i,o,s)+u+r[f]+a[l]|0;u=s,s=o,o=rotl30(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},Sha1.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=Sha1},3805:t=>{t.exports=function isObject(t){var e=typeof t;return null!=t&&(\"object\"==e||\"function\"==e)}},3846:(t,e,r)=>{\"use strict\";var n=r(9447),i=r(3930),o=r(2574),a=r(5817),s=r(7374),u=r(470),c=r(9724),f=r(3648),l=Object.getOwnPropertyDescriptor;e.f=n?l:function getOwnPropertyDescriptor(t,e){if(t=s(t),e=u(e),f)try{return l(t,e)}catch(t){}if(c(t,e))return a(!i(o.f,t,e),t[e])}},3862:t=>{t.exports=function hashDelete(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},3912:(t,e,r)=>{var n=r(1074),i=r(9698),o=r(2054);t.exports=function stringToArray(t){return i(t)?o(t):n(t)}},3930:(t,e,r)=>{\"use strict\";var n=r(1505),i=Function.prototype.call;t.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},4058:(t,e,r)=>{var n=r(4792),i=r(5539)((function(t,e,r){return e=e.toLowerCase(),t+(r?n(e):e)}));t.exports=i},4107:(t,e,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function Sha256(){this.init(),this._w=s,i.call(this,64,56)}function ch(t,e,r){return r^t&(e^r)}function maj(t,e,r){return t&e|r&(t|e)}function sigma0(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function sigma1(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function gamma0(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(Sha256,i),Sha256.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},Sha256.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0|this._f,f=0|this._g,l=0|this._h,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((e=r[h-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[h-7]+gamma0(r[h-15])+r[h-16];for(var p=0;p<64;++p){var d=l+sigma1(u)+ch(u,c,f)+a[p]+r[p]|0,_=sigma0(n)+maj(n,i,o)|0;l=f,f=c,c=u,u=s+d|0,s=o,o=i,i=n,n=d+_|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=c+this._f|0,this._g=f+this._g|0,this._h=l+this._h|0},Sha256.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=Sha256},4128:(t,e,r)=>{var n=r(1800),i=/^\\s+/;t.exports=function baseTrim(t){return t?t.slice(0,n(t)+1).replace(i,\"\"):t}},4218:t=>{t.exports=function isKeyable(t){var e=typeof t;return\"string\"==e||\"number\"==e||\"symbol\"==e||\"boolean\"==e?\"__proto__\"!==t:null===t}},4239:(t,e,r)=>{\"use strict\";var n=r(7136),i=TypeError;t.exports=function(t){if(n(t))throw new i(\"Can't call method on \"+t);return t}},4247:t=>{t.exports=function setToArray(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}},4248:t=>{t.exports=function arraySome(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}},4284:(t,e,r)=>{\"use strict\";var n=r(9447),i=r(3648),o=r(8661),a=r(6624),s=r(470),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l=\"enumerable\",h=\"configurable\",p=\"writable\";e.f=n?o?function defineProperty(t,e,r){if(a(t),e=s(e),a(r),\"function\"==typeof t&&\"prototype\"===e&&\"value\"in r&&p in r&&!r[p]){var n=f(t,e);n&&n[p]&&(t[e]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:l in r?r[l]:n[l],writable:!1})}return c(t,e,r)}:c:function defineProperty(t,e,r){if(a(t),e=s(e),a(r),i)try{return c(t,e,r)}catch(t){}if(\"get\"in r||\"set\"in r)throw new u(\"Accessors not supported\");return\"value\"in r&&(t[e]=r.value),t}},4335:t=>{t.exports=function overArg(t,e){return function(r){return t(e(r))}}},4394:(t,e,r)=>{var n=r(2552),i=r(346);t.exports=function isSymbol(t){return\"symbol\"==typeof t||i(t)&&\"[object Symbol]\"==n(t)}},4436:(t,e,r)=>{\"use strict\";var n=r(7374),i=r(4849),o=r(575),createMethod=function(t){return function(e,r,a){var s=n(e),u=o(s);if(0===u)return!t&&-1;var c,f=i(a,u);if(t&&r!=r){for(;u>f;)if((c=s[f++])!=c)return!0}else for(;u>f;f++)if((t||f in s)&&s[f]===r)return t||f||0;return!t&&-1}};t.exports={includes:createMethod(!0),indexOf:createMethod(!1)}},4509:(t,e,r)=>{var n=r(2651);t.exports=function mapCacheHas(t){return n(this,t).has(t)}},4528:t=>{t.exports=function arrayPush(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},4552:t=>{t.exports=function basePropertyOf(t){return function(e){return null==t?void 0:t[e]}}},4640:t=>{\"use strict\";var e=String;t.exports=function(t){try{return e(t)}catch(t){return\"Object\"}}},4647:(t,e,r)=>{var n=r(4552)({À:\"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\",ſ:\"s\"});t.exports=n},4664:(t,e,r)=>{var n=r(9770),i=r(3345),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),n(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=s},4673:(t,e,r)=>{\"use strict\";var n=r(1907),i=r(2159),o=r(6285),a=r(9724),s=r(3427),u=r(1505),c=Function,f=n([].concat),l=n([].join),h={};t.exports=u?c.bind:function bind(t){var e=i(this),r=e.prototype,n=s(arguments,1),u=function bound(){var r=f(n,s(arguments));return this instanceof u?function(t,e,r){if(!a(h,e)){for(var n=[],i=0;i<e;i++)n[i]=\"a[\"+i+\"]\";h[e]=c(\"C,a\",\"return new C(\"+l(n,\",\")+\")\")}return h[e](t,r)}(e,r.length,r):e.apply(t,r)};return o(r)&&(u.prototype=r),u}},4713:(t,e,r)=>{var n=r(2523),i=r(5389),o=r(1489),a=Math.max;t.exports=function findIndex(t,e,r){var s=null==t?0:t.length;if(!s)return-1;var u=null==r?0:o(r);return u<0&&(u=a(s+u,0)),n(t,i(e,3),u)}},4739:(t,e,r)=>{var n=r(6025);t.exports=function listCacheGet(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},4792:(t,e,r)=>{var n=r(3222),i=r(5808);t.exports=function capitalize(t){return i(n(t).toLowerCase())}},4840:(t,e,r)=>{var n=\"object\"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;t.exports=n},4849:(t,e,r)=>{\"use strict\";var n=r(5482),i=Math.max,o=Math.min;t.exports=function(t,e){var r=n(t);return r<0?i(r+e,0):o(r,e)}},4851:(t,e,r)=>{\"use strict\";t.exports=r(5401)},4894:(t,e,r)=>{var n=r(1882),i=r(294);t.exports=function isArrayLike(t){return null!=t&&i(t.length)&&!n(t)}},4901:(t,e,r)=>{var n=r(2552),i=r(294),o=r(346),a={};a[\"[object Float32Array]\"]=a[\"[object Float64Array]\"]=a[\"[object Int8Array]\"]=a[\"[object Int16Array]\"]=a[\"[object Int32Array]\"]=a[\"[object Uint8Array]\"]=a[\"[object Uint8ClampedArray]\"]=a[\"[object Uint16Array]\"]=a[\"[object Uint32Array]\"]=!0,a[\"[object Arguments]\"]=a[\"[object Array]\"]=a[\"[object ArrayBuffer]\"]=a[\"[object Boolean]\"]=a[\"[object DataView]\"]=a[\"[object Date]\"]=a[\"[object Error]\"]=a[\"[object Function]\"]=a[\"[object Map]\"]=a[\"[object Number]\"]=a[\"[object Object]\"]=a[\"[object RegExp]\"]=a[\"[object Set]\"]=a[\"[object String]\"]=a[\"[object WeakMap]\"]=!1,t.exports=function baseIsTypedArray(t){return o(t)&&i(t.length)&&!!a[n(t)]}},4932:t=>{t.exports=function arrayMap(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},5083:(t,e,r)=>{var n=r(1882),i=r(7296),o=r(3805),a=r(7473),s=/^\\[object .+?Constructor\\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,l=c.hasOwnProperty,h=RegExp(\"^\"+f.call(l).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");t.exports=function baseIsNative(t){return!(!o(t)||i(t))&&(n(t)?h:s).test(a(t))}},5160:t=>{t.exports=function baseSlice(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=Array(i);++n<i;)o[n]=t[n+e];return o}},5287:(t,e)=>{\"use strict\";var r=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),i=Symbol.for(\"react.fragment\"),o=Symbol.for(\"react.strict_mode\"),a=Symbol.for(\"react.profiler\"),s=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),c=Symbol.for(\"react.forward_ref\"),f=Symbol.for(\"react.suspense\"),l=Symbol.for(\"react.memo\"),h=Symbol.for(\"react.lazy\"),p=Symbol.iterator;var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,y={};function E(t,e,r){this.props=t,this.context=e,this.refs=y,this.updater=r||d}function F(){}function G(t,e,r){this.props=t,this.context=e,this.refs=y,this.updater=r||d}E.prototype.isReactComponent={},E.prototype.setState=function(t,e){if(\"object\"!=typeof t&&\"function\"!=typeof t&&null!=t)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,t,e,\"setState\")},E.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,\"forceUpdate\")},F.prototype=E.prototype;var m=G.prototype=new F;m.constructor=G,_(m,E.prototype),m.isPureReactComponent=!0;var g=Array.isArray,v=Object.prototype.hasOwnProperty,b={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function M(t,e,n){var i,o={},a=null,s=null;if(null!=e)for(i in void 0!==e.ref&&(s=e.ref),void 0!==e.key&&(a=\"\"+e.key),e)v.call(e,i)&&!w.hasOwnProperty(i)&&(o[i]=e[i]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var c=Array(u),f=0;f<u;f++)c[f]=arguments[f+2];o.children=c}if(t&&t.defaultProps)for(i in u=t.defaultProps)void 0===o[i]&&(o[i]=u[i]);return{$$typeof:r,type:t,key:a,ref:s,props:o,_owner:b.current}}function O(t){return\"object\"==typeof t&&null!==t&&t.$$typeof===r}var I=/\\/+/g;function Q(t,e){return\"object\"==typeof t&&null!==t&&null!=t.key?function escape(t){var e={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+t.replace(/[=:]/g,(function(t){return e[t]}))}(\"\"+t.key):e.toString(36)}function R(t,e,i,o,a){var s=typeof t;\"undefined\"!==s&&\"boolean\"!==s||(t=null);var u=!1;if(null===t)u=!0;else switch(s){case\"string\":case\"number\":u=!0;break;case\"object\":switch(t.$$typeof){case r:case n:u=!0}}if(u)return a=a(u=t),t=\"\"===o?\".\"+Q(u,0):o,g(a)?(i=\"\",null!=t&&(i=t.replace(I,\"$&/\")+\"/\"),R(a,e,i,\"\",(function(t){return t}))):null!=a&&(O(a)&&(a=function N(t,e){return{$$typeof:r,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(a,i+(!a.key||u&&u.key===a.key?\"\":(\"\"+a.key).replace(I,\"$&/\")+\"/\")+t)),e.push(a)),1;if(u=0,o=\"\"===o?\".\":o+\":\",g(t))for(var c=0;c<t.length;c++){var f=o+Q(s=t[c],c);u+=R(s,e,i,f,a)}else if(f=function A(t){return null===t||\"object\"!=typeof t?null:\"function\"==typeof(t=p&&t[p]||t[\"@@iterator\"])?t:null}(t),\"function\"==typeof f)for(t=f.call(t),c=0;!(s=t.next()).done;)u+=R(s=s.value,e,i,f=o+Q(s,c++),a);else if(\"object\"===s)throw e=String(t),Error(\"Objects are not valid as a React child (found: \"+(\"[object Object]\"===e?\"object with keys {\"+Object.keys(t).join(\", \")+\"}\":e)+\"). If you meant to render a collection of children, use an array instead.\");return u}function S(t,e,r){if(null==t)return t;var n=[],i=0;return R(t,n,\"\",\"\",(function(t){return e.call(r,t,i++)})),n}function T(t){if(-1===t._status){var e=t._result;(e=e()).then((function(e){0!==t._status&&-1!==t._status||(t._status=1,t._result=e)}),(function(e){0!==t._status&&-1!==t._status||(t._status=2,t._result=e)})),-1===t._status&&(t._status=0,t._result=e)}if(1===t._status)return t._result.default;throw t._result}var x={current:null},B={transition:null},k={ReactCurrentDispatcher:x,ReactCurrentBatchConfig:B,ReactCurrentOwner:b};function X(){throw Error(\"act(...) is not supported in production builds of React.\")}e.Children={map:S,forEach:function(t,e,r){S(t,(function(){e.apply(this,arguments)}),r)},count:function(t){var e=0;return S(t,(function(){e++})),e},toArray:function(t){return S(t,(function(t){return t}))||[]},only:function(t){if(!O(t))throw Error(\"React.Children.only expected to receive a single React element child.\");return t}},e.Component=E,e.Fragment=i,e.Profiler=a,e.PureComponent=G,e.StrictMode=o,e.Suspense=f,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k,e.act=X,e.cloneElement=function(t,e,n){if(null==t)throw Error(\"React.cloneElement(...): The argument must be a React element, but you passed \"+t+\".\");var i=_({},t.props),o=t.key,a=t.ref,s=t._owner;if(null!=e){if(void 0!==e.ref&&(a=e.ref,s=b.current),void 0!==e.key&&(o=\"\"+e.key),t.type&&t.type.defaultProps)var u=t.type.defaultProps;for(c in e)v.call(e,c)&&!w.hasOwnProperty(c)&&(i[c]=void 0===e[c]&&void 0!==u?u[c]:e[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){u=Array(c);for(var f=0;f<c;f++)u[f]=arguments[f+2];i.children=u}return{$$typeof:r,type:t.type,key:o,ref:a,props:i,_owner:s}},e.createContext=function(t){return(t={$$typeof:u,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:t},t.Consumer=t},e.createElement=M,e.createFactory=function(t){var e=M.bind(null,t);return e.type=t,e},e.createRef=function(){return{current:null}},e.forwardRef=function(t){return{$$typeof:c,render:t}},e.isValidElement=O,e.lazy=function(t){return{$$typeof:h,_payload:{_status:-1,_result:t},_init:T}},e.memo=function(t,e){return{$$typeof:l,type:t,compare:void 0===e?null:e}},e.startTransition=function(t){var e=B.transition;B.transition={};try{t()}finally{B.transition=e}},e.unstable_act=X,e.useCallback=function(t,e){return x.current.useCallback(t,e)},e.useContext=function(t){return x.current.useContext(t)},e.useDebugValue=function(){},e.useDeferredValue=function(t){return x.current.useDeferredValue(t)},e.useEffect=function(t,e){return x.current.useEffect(t,e)},e.useId=function(){return x.current.useId()},e.useImperativeHandle=function(t,e,r){return x.current.useImperativeHandle(t,e,r)},e.useInsertionEffect=function(t,e){return x.current.useInsertionEffect(t,e)},e.useLayoutEffect=function(t,e){return x.current.useLayoutEffect(t,e)},e.useMemo=function(t,e){return x.current.useMemo(t,e)},e.useReducer=function(t,e,r){return x.current.useReducer(t,e,r)},e.useRef=function(t){return x.current.useRef(t)},e.useState=function(t){return x.current.useState(t)},e.useSyncExternalStore=function(t,e,r){return x.current.useSyncExternalStore(t,e,r)},e.useTransition=function(){return x.current.useTransition()},e.version=\"18.3.1\"},5288:t=>{t.exports=function eq(t,e){return t===e||t!=t&&e!=e}},5389:(t,e,r)=>{var n=r(3663),i=r(7978),o=r(3488),a=r(6449),s=r(583);t.exports=function baseIteratee(t){return\"function\"==typeof t?t:null==t?o:\"object\"==typeof t?a(t)?i(t[0],t[1]):n(t):s(t)}},5401:(t,e,r)=>{\"use strict\";var n=r(462);t.exports=n},5434:t=>{var e=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;t.exports=function hasUnicodeWord(t){return e.test(t)}},5481:(t,e,r)=>{var n=r(9325)[\"__core-js_shared__\"];t.exports=n},5482:(t,e,r)=>{\"use strict\";var n=r(1176);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},5527:t=>{var e=Object.prototype;t.exports=function isPrototype(t){var r=t&&t.constructor;return t===(\"function\"==typeof r&&r.prototype||e)}},5539:(t,e,r)=>{var n=r(882),i=r(828),o=r(6645),a=RegExp(\"['’]\",\"g\");t.exports=function createCompounder(t){return function(e){return n(o(i(e).replace(a,\"\")),t,\"\")}}},5580:(t,e,r)=>{var n=r(6110)(r(9325),\"DataView\");t.exports=n},5582:(t,e,r)=>{\"use strict\";var n=r(2046),i=r(5951),o=r(2250),aFunction=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?aFunction(n[t])||aFunction(i[t]):n[t]&&n[t][e]||i[t]&&i[t][e]}},5594:(t,e,r)=>{\"use strict\";var n=r(5582),i=r(2250),o=r(8280),a=r(3556),s=Object;t.exports=a?function(t){return\"symbol\"==typeof t}:function(t){var e=n(\"Symbol\");return i(e)&&o(e.prototype,s(t))}},5606:t=>{var e,r,n=t.exports={};function defaultSetTimout(){throw new Error(\"setTimeout has not been defined\")}function defaultClearTimeout(){throw new Error(\"clearTimeout has not been defined\")}function runTimeout(t){if(e===setTimeout)return setTimeout(t,0);if((e===defaultSetTimout||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e=\"function\"==typeof setTimeout?setTimeout:defaultSetTimout}catch(t){e=defaultSetTimout}try{r=\"function\"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(t){r=defaultClearTimeout}}();var i,o=[],a=!1,s=-1;function cleanUpNextTick(){a&&i&&(a=!1,i.length?o=i.concat(o):s=-1,o.length&&drainQueue())}function drainQueue(){if(!a){var t=runTimeout(cleanUpNextTick);a=!0;for(var e=o.length;e;){for(i=o,o=[];++s<e;)i&&i[s].run();s=-1,e=o.length}i=null,a=!1,function runClearTimeout(t){if(r===clearTimeout)return clearTimeout(t);if((r===defaultClearTimeout||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function Item(t,e){this.fun=t,this.array=e}function noop(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];o.push(new Item(t,e)),1!==o.length||a||runTimeout(drainQueue)},Item.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=noop,n.addListener=noop,n.once=noop,n.off=noop,n.removeListener=noop,n.removeAllListeners=noop,n.emit=noop,n.prependListener=noop,n.prependOnceListener=noop,n.listeners=function(t){return[]},n.binding=function(t){throw new Error(\"process.binding is not supported\")},n.cwd=function(){return\"/\"},n.chdir=function(t){throw new Error(\"process.chdir is not supported\")},n.umask=function(){return 0}},5749:(t,e,r)=>{var n=r(1042);t.exports=function hashSet(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?\"__lodash_hash_undefined__\":e,this}},5807:(t,e,r)=>{\"use strict\";var n=r(1907),i=n({}.toString),o=n(\"\".slice);t.exports=function(t){return o(i(t),8,-1)}},5808:(t,e,r)=>{var n=r(2507)(\"toUpperCase\");t.exports=n},5816:(t,e,r)=>{\"use strict\";var n=r(6128);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5817:t=>{\"use strict\";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},5861:(t,e,r)=>{var n=r(5580),i=r(8223),o=r(2804),a=r(6545),s=r(8303),u=r(2552),c=r(7473),f=\"[object Map]\",l=\"[object Promise]\",h=\"[object Set]\",p=\"[object WeakMap]\",d=\"[object DataView]\",_=c(n),y=c(i),m=c(o),g=c(a),v=c(s),b=u;(n&&b(new n(new ArrayBuffer(1)))!=d||i&&b(new i)!=f||o&&b(o.resolve())!=l||a&&b(new a)!=h||s&&b(new s)!=p)&&(b=function(t){var e=u(t),r=\"[object Object]\"==e?t.constructor:void 0,n=r?c(r):\"\";if(n)switch(n){case _:return d;case y:return f;case m:return l;case g:return h;case v:return p}return e}),t.exports=b},5911:(t,e,r)=>{var n=r(8859),i=r(4248),o=r(9219);t.exports=function equalArrays(t,e,r,a,s,u){var c=1&r,f=t.length,l=e.length;if(f!=l&&!(c&&l>f))return!1;var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=-1,_=!0,y=2&r?new n:void 0;for(u.set(t,e),u.set(e,t);++d<f;){var m=t[d],g=e[d];if(a)var v=c?a(g,m,d,e,t,u):a(m,g,d,t,e,u);if(void 0!==v){if(v)continue;_=!1;break}if(y){if(!i(e,(function(t,e){if(!o(y,e)&&(m===t||s(m,t,r,a,u)))return y.push(e)}))){_=!1;break}}else if(m!==g&&!s(m,g,r,a,u)){_=!1;break}}return u.delete(t),u.delete(e),_}},5950:(t,e,r)=>{var n=r(695),i=r(8984),o=r(4894);t.exports=function keys(t){return o(t)?n(t):i(t)}},5951:function(t,e,r){\"use strict\";var check=function(t){return t&&t.Math===Math&&t};t.exports=check(\"object\"==typeof globalThis&&globalThis)||check(\"object\"==typeof window&&window)||check(\"object\"==typeof self&&self)||check(\"object\"==typeof r.g&&r.g)||check(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()},6009:(t,e,r)=>{t=r.nmd(t);var n=r(4840),i=e&&!e.nodeType&&e,o=i&&t&&!t.nodeType&&t,a=o&&o.exports===i&&n.process,s=function(){try{var t=o&&o.require&&o.require(\"util\").types;return t||a&&a.binding&&a.binding(\"util\")}catch(t){}}();t.exports=s},6024:(t,e,r)=>{\"use strict\";var n=r(1505),i=Function.prototype,o=i.apply,a=i.call;t.exports=\"object\"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},6025:(t,e,r)=>{var n=r(5288);t.exports=function assocIndexOf(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},6028:(t,e,r)=>{\"use strict\";var n=r(3930),i=r(6285),o=r(5594),a=r(9367),s=r(581),u=r(6264),c=TypeError,f=u(\"toPrimitive\");t.exports=function(t,e){if(!i(t)||o(t))return t;var r,u=a(t,f);if(u){if(void 0===e&&(e=\"default\"),r=n(u,t,e),!i(r)||o(r))return r;throw new c(\"Can't convert object to primitive value\")}return void 0===e&&(e=\"number\"),s(t,e)}},6110:(t,e,r)=>{var n=r(5083),i=r(392);t.exports=function getNative(t,e){var r=i(t,e);return n(r)?r:void 0}},6128:(t,e,r)=>{\"use strict\";var n=r(7376),i=r(5951),o=r(2532),a=\"__core-js_shared__\",s=t.exports=i[a]||o(a,{});(s.versions||(s.versions=[])).push({version:\"3.40.0\",mode:n?\"pure\":\"global\",copyright:\"© 2014-2025 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},6264:(t,e,r)=>{\"use strict\";var n=r(5951),i=r(5816),o=r(9724),a=r(6499),s=r(9846),u=r(3556),c=n.Symbol,f=i(\"wks\"),l=u?c.for||c:c&&c.withoutSetter||a;t.exports=function(t){return o(f,t)||(f[t]=s&&o(c,t)?c[t]:l(\"Symbol.\"+t)),f[t]}},6285:(t,e,r)=>{\"use strict\";var n=r(2250);t.exports=function(t){return\"object\"==typeof t?null!==t:n(t)}},6449:t=>{var e=Array.isArray;t.exports=e},6499:(t,e,r)=>{\"use strict\";var n=r(1907),i=0,o=Math.random(),a=n(1..toString);t.exports=function(t){return\"Symbol(\"+(void 0===t?\"\":t)+\")_\"+a(++i+o,36)}},6540:(t,e,r)=>{\"use strict\";t.exports=r(5287)},6545:(t,e,r)=>{var n=r(6110)(r(9325),\"Set\");t.exports=n},6547:(t,e,r)=>{var n=r(3360),i=r(5288),o=Object.prototype.hasOwnProperty;t.exports=function assignValue(t,e,r){var a=t[e];o.call(t,e)&&i(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},6624:(t,e,r)=>{\"use strict\";var n=r(6285),i=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(i(t)+\" is not an object\")}},6645:(t,e,r)=>{var n=r(1733),i=r(5434),o=r(3222),a=r(2225);t.exports=function words(t,e,r){return t=o(t),void 0===(e=r?void 0:e)?i(t)?a(t):n(t):t.match(e)||[]}},6649:(t,e,r)=>{var n=r(3221)();t.exports=n},6698:t=>{\"function\"==typeof Object.create?t.exports=function inherits(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function inherits(t,e){if(e){t.super_=e;var TempCtor=function(){};TempCtor.prototype=e.prototype,t.prototype=new TempCtor,t.prototype.constructor=t}}},6710:(t,e,r)=>{var n=r(6698),i=r(4107),o=r(8011),a=r(2861).Buffer,s=new Array(64);function Sha224(){this.init(),this._w=s,o.call(this,64,56)}n(Sha224,i),Sha224.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},Sha224.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=Sha224},6721:(t,e,r)=>{var n=r(1042),i=Object.prototype.hasOwnProperty;t.exports=function hashGet(t){var e=this.__data__;if(n){var r=e[t];return\"__lodash_hash_undefined__\"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},6794:(t,e,r)=>{\"use strict\";var n=r(5951).navigator,i=n&&n.userAgent;t.exports=i?String(i):\"\"},6800:(t,e,r)=>{var n=r(5288),i=r(4894),o=r(361),a=r(3805);t.exports=function isIterateeCall(t,e,r){if(!a(r))return!1;var s=typeof e;return!!(\"number\"==s?i(r)&&o(e,r.length):\"string\"==s&&e in r)&&n(r[e],t)}},6946:(t,e,r)=>{\"use strict\";var n=r(1907),i=r(8828),o=r(5807),a=Object,s=n(\"\".split);t.exports=i((function(){return!a(\"z\").propertyIsEnumerable(0)}))?function(t){return\"String\"===o(t)?s(t,\"\"):a(t)}:a},7068:(t,e,r)=>{var n=r(7217),i=r(5911),o=r(1986),a=r(689),s=r(5861),u=r(6449),c=r(3656),f=r(7167),l=\"[object Arguments]\",h=\"[object Array]\",p=\"[object Object]\",d=Object.prototype.hasOwnProperty;t.exports=function baseIsEqualDeep(t,e,r,_,y,m){var g=u(t),v=u(e),b=g?h:s(t),w=v?h:s(e),I=(b=b==l?p:b)==p,x=(w=w==l?p:w)==p,B=b==w;if(B&&c(t)){if(!c(e))return!1;g=!0,I=!1}if(B&&!I)return m||(m=new n),g||f(t)?i(t,e,r,_,y,m):o(t,e,b,r,_,y,m);if(!(1&r)){var k=I&&d.call(t,\"__wrapped__\"),C=x&&d.call(e,\"__wrapped__\");if(k||C){var q=k?t.value():t,L=C?e.value():e;return m||(m=new n),y(q,L,r,_,m)}}return!!B&&(m||(m=new n),a(t,e,r,_,y,m))}},7136:t=>{\"use strict\";t.exports=function(t){return null==t}},7167:(t,e,r)=>{var n=r(4901),i=r(7301),o=r(6009),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},7170:(t,e)=>{\"use strict\";e.f=Object.getOwnPropertySymbols},7197:t=>{t.exports=function matchesStrictComparable(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}},7217:(t,e,r)=>{var n=r(79),i=r(1420),o=r(938),a=r(3605),s=r(9817),u=r(945);function Stack(t){var e=this.__data__=new n(t);this.size=e.size}Stack.prototype.clear=i,Stack.prototype.delete=o,Stack.prototype.get=a,Stack.prototype.has=s,Stack.prototype.set=u,t.exports=Stack},7237:t=>{t.exports=function baseProperty(t){return function(e){return null==e?void 0:e[t]}}},7248:(t,e,r)=>{var n=r(6547),i=r(1234);t.exports=function zipObject(t,e){return i(t||[],e||[],n)}},7255:(t,e,r)=>{var n=r(7422);t.exports=function basePropertyDeep(t){return function(e){return n(e,t)}}},7296:(t,e,r)=>{var n,i=r(5481),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+n:\"\";t.exports=function isMasked(t){return!!o&&o in t}},7301:t=>{t.exports=function baseUnary(t){return function(e){return t(e)}}},7309:(t,e,r)=>{var n=r(2006)(r(4713));t.exports=n},7374:(t,e,r)=>{\"use strict\";var n=r(6946),i=r(4239);t.exports=function(t){return n(i(t))}},7376:t=>{\"use strict\";t.exports=!0},7400:(t,e,r)=>{var n=r(9374),i=1/0;t.exports=function toFinite(t){return t?(t=n(t))===i||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},7422:(t,e,r)=>{var n=r(1769),i=r(7797);t.exports=function baseGet(t,e){for(var r=0,o=(e=n(e,t)).length;null!=t&&r<o;)t=t[i(e[r++])];return r&&r==o?t:void 0}},7463:(t,e,r)=>{\"use strict\";var n=r(8828),i=r(2250),o=/#|\\.prototype\\./,isForced=function(t,e){var r=s[a(t)];return r===c||r!==u&&(i(e)?n(e):!!e)},a=isForced.normalize=function(t){return String(t).replace(o,\".\").toLowerCase()},s=isForced.data={},u=isForced.NATIVE=\"N\",c=isForced.POLYFILL=\"P\";t.exports=isForced},7473:t=>{var e=Function.prototype.toString;t.exports=function toSource(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+\"\"}catch(t){}}return\"\"}},7526:(t,e)=>{\"use strict\";e.byteLength=function byteLength(t){var e=getLens(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function toByteArray(t){var e,r,o=getLens(t),a=o[0],s=o[1],u=new i(function _byteLength(t,e,r){return 3*(e+r)/4-r}(0,a,s)),c=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[c++]=e>>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function fromByteArray(t){for(var e,n=t.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(encodeChunk(t,s,s+a>u?u:s+a));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+\"==\")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+\"=\"));return o.join(\"\")};for(var r=[],n=[],i=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,o=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function getLens(t){var e=t.length;if(e%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var r=t.indexOf(\"=\");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function encodeChunk(t,e,n){for(var i,o,a=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join(\"\")}n[\"-\".charCodeAt(0)]=62,n[\"_\".charCodeAt(0)]=63},7534:(t,e,r)=>{var n=r(2552),i=r(346);t.exports=function baseIsArguments(t){return i(t)&&\"[object Arguments]\"==n(t)}},7556:(t,e,r)=>{var n=r(1873),i=r(4932),o=r(6449),a=r(4394),s=n?n.prototype:void 0,u=s?s.toString:void 0;t.exports=function baseToString(t){if(\"string\"==typeof t)return t;if(o(t))return i(t,baseToString)+\"\";if(a(t))return u?u.call(t):\"\";var e=t+\"\";return\"0\"==e&&1/t==-1/0?\"-0\":e}},7666:(t,e,r)=>{var n=r(4851),i=r(953);function _extends(){var e;return t.exports=_extends=n?i(e=n).call(e):function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},t.exports.__esModule=!0,t.exports.default=t.exports,_extends.apply(null,arguments)}t.exports=_extends,t.exports.__esModule=!0,t.exports.default=t.exports},7670:(t,e,r)=>{var n=r(2651);t.exports=function mapCacheDelete(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},7797:(t,e,r)=>{var n=r(4394);t.exports=function toKey(t){if(\"string\"==typeof t||n(t))return t;var e=t+\"\";return\"0\"==e&&1/t==-1/0?\"-0\":e}},7816:(t,e,r)=>{var n=r(6698),i=r(8011),o=r(2861).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function Sha(){this.init(),this._w=s,i.call(this,64,56)}function rotl30(t){return t<<30|t>>>2}function ft(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(Sha,i),Sha.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Sha.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)r[c]=t.readInt32BE(4*c);for(;c<80;++c)r[c]=r[c-3]^r[c-8]^r[c-14]^r[c-16];for(var f=0;f<80;++f){var l=~~(f/20),h=0|((e=n)<<5|e>>>27)+ft(l,i,o,s)+u+r[f]+a[l];u=s,s=o,o=rotl30(i),i=n,n=h}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},Sha.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=Sha},7828:(t,e,r)=>{var n=r(9325).Uint8Array;t.exports=n},7978:(t,e,r)=>{var n=r(270),i=r(8156),o=r(631),a=r(8586),s=r(756),u=r(7197),c=r(7797);t.exports=function baseMatchesProperty(t,e){return a(t)&&s(e)?u(c(t),e):function(r){var a=i(r,t);return void 0===a&&a===e?o(r,t):n(e,a,3)}}},8011:(t,e,r)=>{var n=r(2861).Buffer;function Hash(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Hash.prototype.update=function(t,e){\"string\"==typeof t&&(e=e||\"utf8\",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),f=0;f<c;f++)r[u+f]=t[s+f];s+=c,(a+=c)%i==0&&this._update(r)}return this._len+=o,this},Hash.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},Hash.prototype._update=function(){throw new Error(\"_update must be implemented by subclass\")},t.exports=Hash},8077:t=>{t.exports=function baseHasIn(t,e){return null!=t&&e in Object(t)}},8096:t=>{t.exports=function baseTimes(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},8156:(t,e,r)=>{var n=r(7422);t.exports=function get(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},8223:(t,e,r)=>{var n=r(6110)(r(9325),\"Map\");t.exports=n},8280:(t,e,r)=>{\"use strict\";var n=r(1907);t.exports=n({}.isPrototypeOf)},8287:(t,e,r)=>{\"use strict\";const n=r(7526),i=r(251),o=\"function\"==typeof Symbol&&\"function\"==typeof Symbol.for?Symbol.for(\"nodejs.util.inspect.custom\"):null;e.Buffer=Buffer,e.SlowBuffer=function SlowBuffer(t){+t!=t&&(t=0);return Buffer.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function createBuffer(t){if(t>a)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,Buffer.prototype),e}function Buffer(t,e,r){if(\"number\"==typeof t){if(\"string\"==typeof e)throw new TypeError('The \"string\" argument must be of type string. Received type number');return allocUnsafe(t)}return from(t,e,r)}function from(t,e,r){if(\"string\"==typeof t)return function fromString(t,e){\"string\"==typeof e&&\"\"!==e||(e=\"utf8\");if(!Buffer.isEncoding(e))throw new TypeError(\"Unknown encoding: \"+e);const r=0|byteLength(t,e);let n=createBuffer(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function fromArrayView(t){if(isInstance(t,Uint8Array)){const e=new Uint8Array(t);return fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength)}return fromArrayLike(t)}(t);if(null==t)throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t);if(isInstance(t,ArrayBuffer)||t&&isInstance(t.buffer,ArrayBuffer))return fromArrayBuffer(t,e,r);if(\"undefined\"!=typeof SharedArrayBuffer&&(isInstance(t,SharedArrayBuffer)||t&&isInstance(t.buffer,SharedArrayBuffer)))return fromArrayBuffer(t,e,r);if(\"number\"==typeof t)throw new TypeError('The \"value\" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return Buffer.from(n,e,r);const i=function fromObject(t){if(Buffer.isBuffer(t)){const e=0|checked(t.length),r=createBuffer(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return\"number\"!=typeof t.length||numberIsNaN(t.length)?createBuffer(0):fromArrayLike(t);if(\"Buffer\"===t.type&&Array.isArray(t.data))return fromArrayLike(t.data)}(t);if(i)return i;if(\"undefined\"!=typeof Symbol&&null!=Symbol.toPrimitive&&\"function\"==typeof t[Symbol.toPrimitive])return Buffer.from(t[Symbol.toPrimitive](\"string\"),e,r);throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type \"+typeof t)}function assertSize(t){if(\"number\"!=typeof t)throw new TypeError('\"size\" argument must be of type number');if(t<0)throw new RangeError('The value \"'+t+'\" is invalid for option \"size\"')}function allocUnsafe(t){return assertSize(t),createBuffer(t<0?0:0|checked(t))}function fromArrayLike(t){const e=t.length<0?0:0|checked(t.length),r=createBuffer(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function fromArrayBuffer(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('\"offset\" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('\"length\" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,Buffer.prototype),n}function checked(t){if(t>=a)throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+a.toString(16)+\" bytes\");return 0|t}function byteLength(t,e){if(Buffer.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||isInstance(t,ArrayBuffer))return t.byteLength;if(\"string\"!=typeof t)throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case\"ascii\":case\"latin1\":case\"binary\":return r;case\"utf8\":case\"utf-8\":return utf8ToBytes(t).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*r;case\"hex\":return r>>>1;case\"base64\":return base64ToBytes(t).length;default:if(i)return n?-1:utf8ToBytes(t).length;e=(\"\"+e).toLowerCase(),i=!0}}function slowToString(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return\"\";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return\"\";if((r>>>=0)<=(e>>>=0))return\"\";for(t||(t=\"utf8\");;)switch(t){case\"hex\":return hexSlice(this,e,r);case\"utf8\":case\"utf-8\":return utf8Slice(this,e,r);case\"ascii\":return asciiSlice(this,e,r);case\"latin1\":case\"binary\":return latin1Slice(this,e,r);case\"base64\":return base64Slice(this,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,e,r);default:if(n)throw new TypeError(\"Unknown encoding: \"+t);t=(t+\"\").toLowerCase(),n=!0}}function swap(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function bidirectionalIndexOf(t,e,r,n,i){if(0===t.length)return-1;if(\"string\"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if(\"string\"==typeof e&&(e=Buffer.from(e,n)),Buffer.isBuffer(e))return 0===e.length?-1:arrayIndexOf(t,e,r,n,i);if(\"number\"==typeof e)return e&=255,\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):arrayIndexOf(t,[e],r,n,i);throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(t,e,r,n,i){let o,a=1,s=t.length,u=e.length;if(void 0!==n&&(\"ucs2\"===(n=String(n).toLowerCase())||\"ucs-2\"===n||\"utf16le\"===n||\"utf-16le\"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function read(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let n=-1;for(o=r;o<s;o++)if(read(t,o)===read(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(read(t,o+n)!==read(e,n)){r=!1;break}if(r)return o}return-1}function hexWrite(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(e.substr(2*a,2),16);if(numberIsNaN(n))return a;t[r+a]=n}return a}function utf8Write(t,e,r,n){return blitBuffer(utf8ToBytes(e,t.length-r),t,r,n)}function asciiWrite(t,e,r,n){return blitBuffer(function asciiToBytes(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function base64Write(t,e,r,n){return blitBuffer(base64ToBytes(e),t,r,n)}function ucs2Write(t,e,r,n){return blitBuffer(function utf16leToBytes(t,e){let r,n,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function base64Slice(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function utf8Slice(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(u=(31&e)<<6|63&r,u>127&&(o=u));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(u=(15&e)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=t[i+1],n=t[i+2],s=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function decodeCodePointsArray(t){const e=t.length;if(e<=s)return String.fromCharCode.apply(String,t);let r=\"\",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=s));return r}(n)}e.kMaxLength=a,Buffer.TYPED_ARRAY_SUPPORT=function typedArraySupport(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),Buffer.TYPED_ARRAY_SUPPORT||\"undefined\"==typeof console||\"function\"!=typeof console.error||console.error(\"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.\"),Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),Buffer.poolSize=8192,Buffer.from=function(t,e,r){return from(t,e,r)},Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype),Object.setPrototypeOf(Buffer,Uint8Array),Buffer.alloc=function(t,e,r){return function alloc(t,e,r){return assertSize(t),t<=0?createBuffer(t):void 0!==e?\"string\"==typeof r?createBuffer(t).fill(e,r):createBuffer(t).fill(e):createBuffer(t)}(t,e,r)},Buffer.allocUnsafe=function(t){return allocUnsafe(t)},Buffer.allocUnsafeSlow=function(t){return allocUnsafe(t)},Buffer.isBuffer=function isBuffer(t){return null!=t&&!0===t._isBuffer&&t!==Buffer.prototype},Buffer.compare=function compare(t,e){if(isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(t)||!Buffer.isBuffer(e))throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function isEncoding(t){switch(String(t).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}},Buffer.concat=function concat(t,e){if(!Array.isArray(t))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===t.length)return Buffer.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=Buffer.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(isInstance(e,Uint8Array))i+e.length>n.length?(Buffer.isBuffer(e)||(e=Buffer.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!Buffer.isBuffer(e))throw new TypeError('\"list\" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function swap16(){const t=this.length;if(t%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(let e=0;e<t;e+=2)swap(this,e,e+1);return this},Buffer.prototype.swap32=function swap32(){const t=this.length;if(t%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(let e=0;e<t;e+=4)swap(this,e,e+3),swap(this,e+1,e+2);return this},Buffer.prototype.swap64=function swap64(){const t=this.length;if(t%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(let e=0;e<t;e+=8)swap(this,e,e+7),swap(this,e+1,e+6),swap(this,e+2,e+5),swap(this,e+3,e+4);return this},Buffer.prototype.toString=function toString(){const t=this.length;return 0===t?\"\":0===arguments.length?utf8Slice(this,0,t):slowToString.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function equals(t){if(!Buffer.isBuffer(t))throw new TypeError(\"Argument must be a Buffer\");return this===t||0===Buffer.compare(this,t)},Buffer.prototype.inspect=function inspect(){let t=\"\";const r=e.INSPECT_MAX_BYTES;return t=this.toString(\"hex\",0,r).replace(/(.{2})/g,\"$1 \").trim(),this.length>r&&(t+=\" ... \"),\"<Buffer \"+t+\">\"},o&&(Buffer.prototype[o]=Buffer.prototype.inspect),Buffer.prototype.compare=function compare(t,e,r,n,i){if(isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(t))throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError(\"out of range index\");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0);const s=Math.min(o,a),u=this.slice(n,i),c=t.slice(e,r);for(let t=0;t<s;++t)if(u[t]!==c[t]){o=u[t],a=c[t];break}return o<a?-1:a<o?1:0},Buffer.prototype.includes=function includes(t,e,r){return-1!==this.indexOf(t,e,r)},Buffer.prototype.indexOf=function indexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!0)},Buffer.prototype.lastIndexOf=function lastIndexOf(t,e,r){return bidirectionalIndexOf(this,t,e,r,!1)},Buffer.prototype.write=function write(t,e,r,n){if(void 0===e)n=\"utf8\",r=this.length,e=0;else if(void 0===r&&\"string\"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n=\"utf8\")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");n||(n=\"utf8\");let o=!1;for(;;)switch(n){case\"hex\":return hexWrite(this,t,e,r);case\"utf8\":case\"utf-8\":return utf8Write(this,t,e,r);case\"ascii\":case\"latin1\":case\"binary\":return asciiWrite(this,t,e,r);case\"base64\":return base64Write(this,t,e,r);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,t,e,r);default:if(o)throw new TypeError(\"Unknown encoding: \"+n);n=(\"\"+n).toLowerCase(),o=!0}},Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};const s=4096;function asciiSlice(t,e,r){let n=\"\";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function latin1Slice(t,e,r){let n=\"\";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function hexSlice(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i=\"\";for(let n=e;n<r;++n)i+=f[t[n]];return i}function utf16leSlice(t,e,r){const n=t.slice(e,r);let i=\"\";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function checkOffset(t,e,r){if(t%1!=0||t<0)throw new RangeError(\"offset is not uint\");if(t+e>r)throw new RangeError(\"Trying to access beyond buffer length\")}function checkInt(t,e,r,n,i,o){if(!Buffer.isBuffer(t))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('\"value\" argument is out of bounds');if(r+n>t.length)throw new RangeError(\"Index out of range\")}function wrtBigUInt64LE(t,e,r,n,i){checkIntBI(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,r}function wrtBigUInt64BE(t,e,r,n,i){checkIntBI(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=a,a>>=8,t[r+2]=a,a>>=8,t[r+1]=a,a>>=8,t[r]=a,r+8}function checkIEEE754(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError(\"Index out of range\");if(r<0)throw new RangeError(\"Index out of range\")}function writeFloat(t,e,r,n,o){return e=+e,r>>>=0,o||checkIEEE754(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function writeDouble(t,e,r,n,o){return e=+e,r>>>=0,o||checkIEEE754(t,0,r,8),i.write(t,e,r,n,52,8),r+8}Buffer.prototype.slice=function slice(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,Buffer.prototype),n},Buffer.prototype.readUintLE=Buffer.prototype.readUIntLE=function readUIntLE(t,e,r){t>>>=0,e>>>=0,r||checkOffset(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},Buffer.prototype.readUintBE=Buffer.prototype.readUIntBE=function readUIntBE(t,e,r){t>>>=0,e>>>=0,r||checkOffset(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},Buffer.prototype.readUint8=Buffer.prototype.readUInt8=function readUInt8(t,e){return t>>>=0,e||checkOffset(t,1,this.length),this[t]},Buffer.prototype.readUint16LE=Buffer.prototype.readUInt16LE=function readUInt16LE(t,e){return t>>>=0,e||checkOffset(t,2,this.length),this[t]|this[t+1]<<8},Buffer.prototype.readUint16BE=Buffer.prototype.readUInt16BE=function readUInt16BE(t,e){return t>>>=0,e||checkOffset(t,2,this.length),this[t]<<8|this[t+1]},Buffer.prototype.readUint32LE=Buffer.prototype.readUInt32LE=function readUInt32LE(t,e){return t>>>=0,e||checkOffset(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Buffer.prototype.readUint32BE=Buffer.prototype.readUInt32BE=function readUInt32BE(t,e){return t>>>=0,e||checkOffset(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Buffer.prototype.readBigUInt64LE=defineBigIntMethod((function readBigUInt64LE(t){validateNumber(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||boundsError(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),Buffer.prototype.readBigUInt64BE=defineBigIntMethod((function readBigUInt64BE(t){validateNumber(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||boundsError(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),Buffer.prototype.readIntLE=function readIntLE(t,e,r){t>>>=0,e>>>=0,r||checkOffset(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},Buffer.prototype.readIntBE=function readIntBE(t,e,r){t>>>=0,e>>>=0,r||checkOffset(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},Buffer.prototype.readInt8=function readInt8(t,e){return t>>>=0,e||checkOffset(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Buffer.prototype.readInt16LE=function readInt16LE(t,e){t>>>=0,e||checkOffset(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function readInt16BE(t,e){t>>>=0,e||checkOffset(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function readInt32LE(t,e){return t>>>=0,e||checkOffset(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Buffer.prototype.readInt32BE=function readInt32BE(t,e){return t>>>=0,e||checkOffset(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Buffer.prototype.readBigInt64LE=defineBigIntMethod((function readBigInt64LE(t){validateNumber(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||boundsError(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),Buffer.prototype.readBigInt64BE=defineBigIntMethod((function readBigInt64BE(t){validateNumber(t>>>=0,\"offset\");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||boundsError(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),Buffer.prototype.readFloatLE=function readFloatLE(t,e){return t>>>=0,e||checkOffset(t,4,this.length),i.read(this,t,!0,23,4)},Buffer.prototype.readFloatBE=function readFloatBE(t,e){return t>>>=0,e||checkOffset(t,4,this.length),i.read(this,t,!1,23,4)},Buffer.prototype.readDoubleLE=function readDoubleLE(t,e){return t>>>=0,e||checkOffset(t,8,this.length),i.read(this,t,!0,52,8)},Buffer.prototype.readDoubleBE=function readDoubleBE(t,e){return t>>>=0,e||checkOffset(t,8,this.length),i.read(this,t,!1,52,8)},Buffer.prototype.writeUintLE=Buffer.prototype.writeUIntLE=function writeUIntLE(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){checkInt(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},Buffer.prototype.writeUintBE=Buffer.prototype.writeUIntBE=function writeUIntBE(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){checkInt(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},Buffer.prototype.writeUint8=Buffer.prototype.writeUInt8=function writeUInt8(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,1,255,0),this[e]=255&t,e+1},Buffer.prototype.writeUint16LE=Buffer.prototype.writeUInt16LE=function writeUInt16LE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},Buffer.prototype.writeUint16BE=Buffer.prototype.writeUInt16BE=function writeUInt16BE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},Buffer.prototype.writeUint32LE=Buffer.prototype.writeUInt32LE=function writeUInt32LE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},Buffer.prototype.writeUint32BE=Buffer.prototype.writeUInt32BE=function writeUInt32BE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},Buffer.prototype.writeBigUInt64LE=defineBigIntMethod((function writeBigUInt64LE(t,e=0){return wrtBigUInt64LE(this,t,e,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeBigUInt64BE=defineBigIntMethod((function writeBigUInt64BE(t,e=0){return wrtBigUInt64BE(this,t,e,BigInt(0),BigInt(\"0xffffffffffffffff\"))})),Buffer.prototype.writeIntLE=function writeIntLE(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,t,e,r,n-1,-n)}let i=0,o=1,a=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},Buffer.prototype.writeIntBE=function writeIntBE(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);checkInt(this,t,e,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o|0)-a&255;return e+r},Buffer.prototype.writeInt8=function writeInt8(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},Buffer.prototype.writeInt16LE=function writeInt16LE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},Buffer.prototype.writeInt16BE=function writeInt16BE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},Buffer.prototype.writeInt32LE=function writeInt32LE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},Buffer.prototype.writeInt32BE=function writeInt32BE(t,e,r){return t=+t,e>>>=0,r||checkInt(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},Buffer.prototype.writeBigInt64LE=defineBigIntMethod((function writeBigInt64LE(t,e=0){return wrtBigUInt64LE(this,t,e,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeBigInt64BE=defineBigIntMethod((function writeBigInt64BE(t,e=0){return wrtBigUInt64BE(this,t,e,-BigInt(\"0x8000000000000000\"),BigInt(\"0x7fffffffffffffff\"))})),Buffer.prototype.writeFloatLE=function writeFloatLE(t,e,r){return writeFloat(this,t,e,!0,r)},Buffer.prototype.writeFloatBE=function writeFloatBE(t,e,r){return writeFloat(this,t,e,!1,r)},Buffer.prototype.writeDoubleLE=function writeDoubleLE(t,e,r){return writeDouble(this,t,e,!0,r)},Buffer.prototype.writeDoubleBE=function writeDoubleBE(t,e,r){return writeDouble(this,t,e,!1,r)},Buffer.prototype.copy=function copy(t,e,r,n){if(!Buffer.isBuffer(t))throw new TypeError(\"argument should be a Buffer\");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<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),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&\"function\"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},Buffer.prototype.fill=function fill(t,e,r,n){if(\"string\"==typeof t){if(\"string\"==typeof e?(n=e,e=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&&!Buffer.isEncoding(n))throw new TypeError(\"Unknown encoding: \"+n);if(1===t.length){const e=t.charCodeAt(0);(\"utf8\"===n&&e<128||\"latin1\"===n)&&(t=e)}}else\"number\"==typeof t?t&=255:\"boolean\"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError(\"Out of range index\");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),\"number\"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=Buffer.isBuffer(t)?t:Buffer.from(t,n),a=o.length;if(0===a)throw new TypeError('The value \"'+t+'\" is invalid for argument \"value\"');for(i=0;i<r-e;++i)this[i+e]=o[i%a]}return this};const u={};function E(t,e,r){u[t]=class NodeError extends r{constructor(){super(),Object.defineProperty(this,\"message\",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,\"code\",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function addNumericalSeparator(t){let e=\"\",r=t.length;const n=\"-\"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function checkIntBI(t,e,r,n,i,o){if(t>r||t<e){const n=\"bigint\"==typeof e?\"n\":\"\";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new u.ERR_OUT_OF_RANGE(\"value\",i,t)}!function checkBounds(t,e,r){validateNumber(e,\"offset\"),void 0!==t[e]&&void 0!==t[e+r]||boundsError(e,t.length-(r+1))}(n,i,o)}function validateNumber(t,e){if(\"number\"!=typeof t)throw new u.ERR_INVALID_ARG_TYPE(e,\"number\",t)}function boundsError(t,e,r){if(Math.floor(t)!==t)throw validateNumber(t,r),new u.ERR_OUT_OF_RANGE(r||\"offset\",\"an integer\",t);if(e<0)throw new u.ERR_BUFFER_OUT_OF_BOUNDS;throw new u.ERR_OUT_OF_RANGE(r||\"offset\",`>= ${r?1:0} and <= ${e}`,t)}E(\"ERR_BUFFER_OUT_OF_BOUNDS\",(function(t){return t?`${t} is outside of buffer bounds`:\"Attempt to access memory outside buffer bounds\"}),RangeError),E(\"ERR_INVALID_ARG_TYPE\",(function(t,e){return`The \"${t}\" argument must be of type number. Received type ${typeof e}`}),TypeError),E(\"ERR_OUT_OF_RANGE\",(function(t,e,r){let n=`The value of \"${t}\" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=addNumericalSeparator(String(r)):\"bigint\"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=addNumericalSeparator(i)),i+=\"n\"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const c=/[^+/0-9A-Za-z-_]/g;function utf8ToBytes(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=t.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error(\"Invalid code point\");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function base64ToBytes(t){return n.toByteArray(function base64clean(t){if((t=(t=t.split(\"=\")[0]).trim().replace(c,\"\")).length<2)return\"\";for(;t.length%4!=0;)t+=\"=\";return t}(t))}function blitBuffer(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function isInstance(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function numberIsNaN(t){return t!=t}const f=function(){const t=\"0123456789abcdef\",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function defineBigIntMethod(t){return\"undefined\"==typeof BigInt?BufferBigIntNotDefined:t}function BufferBigIntNotDefined(){throw new Error(\"BigInt not supported\")}},8303:(t,e,r)=>{var n=r(6110)(r(9325),\"WeakMap\");t.exports=n},8311:(t,e,r)=>{\"use strict\";var n=r(2361),i=r(2159),o=r(1505),a=n(n.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},8329:(t,e,r)=>{var n=r(4894);t.exports=function createBaseEach(t,e){return function(r,i){if(null==r)return r;if(!n(r))return t(r,i);for(var o=r.length,a=e?o:-1,s=Object(r);(e?a--:++a<o)&&!1!==i(s[a],a,s););return r}}},8530:t=>{\"use strict\";t.exports={}},8586:(t,e,r)=>{var n=r(6449),i=r(4394),o=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,a=/^\\w*$/;t.exports=function isKey(t,e){if(n(t))return!1;var r=typeof t;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},8655:(t,e,r)=>{var n=r(6025);t.exports=function listCacheHas(t){return n(this.__data__,t)>-1}},8661:(t,e,r)=>{\"use strict\";var n=r(9447),i=r(8828);t.exports=n&&i((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},8754:(t,e,r)=>{var n=r(5160);t.exports=function castSlice(t,e,r){var i=t.length;return r=void 0===r?i:r,!e&&r>=i?t:n(t,e,r)}},8828:t=>{\"use strict\";t.exports=function(t){try{return!!t()}catch(t){return!0}}},8859:(t,e,r)=>{var n=r(3661),i=r(1380),o=r(1459);function SetCache(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new n;++e<r;)this.add(t[e])}SetCache.prototype.add=SetCache.prototype.push=i,SetCache.prototype.has=o,t.exports=SetCache},8984:(t,e,r)=>{var n=r(5527),i=r(3650),o=Object.prototype.hasOwnProperty;t.exports=function baseKeys(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&\"constructor\"!=r&&e.push(r);return e}},9219:t=>{t.exports=function cacheHas(t,e){return t.has(e)}},9298:(t,e,r)=>{\"use strict\";var n=r(4239),i=Object;t.exports=function(t){return i(n(t))}},9307:(t,e,r)=>{\"use strict\";var n=r(1091),i=r(4673);n({target:\"Function\",proto:!0,forced:Function.bind!==i},{bind:i})},9325:(t,e,r)=>{var n=r(4840),i=\"object\"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function(\"return this\")();t.exports=o},9326:(t,e,r)=>{var n=r(1769),i=r(2428),o=r(6449),a=r(361),s=r(294),u=r(7797);t.exports=function hasPath(t,e,r){for(var c=-1,f=(e=n(e,t)).length,l=!1;++c<f;){var h=u(e[c]);if(!(l=null!=t&&r(t,h)))break;t=t[h]}return l||++c!=f?l:!!(f=null==t?0:t.length)&&s(f)&&a(h,f)&&(o(t)||i(t))}},9350:t=>{var e=Object.prototype.toString;t.exports=function objectToString(t){return e.call(t)}},9367:(t,e,r)=>{\"use strict\";var n=r(2159),i=r(7136);t.exports=function(t,e){var r=t[e];return i(r)?void 0:n(r)}},9374:(t,e,r)=>{var n=r(4128),i=r(3805),o=r(4394),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function toNumber(t){if(\"number\"==typeof t)return t;if(o(t))return NaN;if(i(t)){var e=\"function\"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+\"\":e}if(\"string\"!=typeof t)return 0===t?t:+t;t=n(t);var r=s.test(t);return r||u.test(t)?c(t.slice(2),r?2:8):a.test(t)?NaN:+t}},9404:function(t){t.exports=function(){\"use strict\";var t=Array.prototype.slice;function createClass(t,e){e&&(t.prototype=Object.create(e.prototype)),t.prototype.constructor=t}function Iterable(t){return isIterable(t)?t:Seq(t)}function KeyedIterable(t){return isKeyed(t)?t:KeyedSeq(t)}function IndexedIterable(t){return isIndexed(t)?t:IndexedSeq(t)}function SetIterable(t){return isIterable(t)&&!isAssociative(t)?t:SetSeq(t)}function isIterable(t){return!(!t||!t[e])}function isKeyed(t){return!(!t||!t[r])}function isIndexed(t){return!(!t||!t[n])}function isAssociative(t){return isKeyed(t)||isIndexed(t)}function isOrdered(t){return!(!t||!t[i])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var e=\"@@__IMMUTABLE_ITERABLE__@@\",r=\"@@__IMMUTABLE_KEYED__@@\",n=\"@@__IMMUTABLE_INDEXED__@@\",i=\"@@__IMMUTABLE_ORDERED__@@\",o=\"delete\",a=5,s=1<<a,u=s-1,c={},f={value:!1},l={value:!1};function MakeRef(t){return t.value=!1,t}function SetRef(t){t&&(t.value=!0)}function OwnerID(){}function arrCopy(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),i=0;i<r;i++)n[i]=t[i+e];return n}function ensureSize(t){return void 0===t.size&&(t.size=t.__iterate(returnTrue)),t.size}function wrapIndex(t,e){if(\"number\"!=typeof e){var r=e>>>0;if(\"\"+r!==e||4294967295===r)return NaN;e=r}return e<0?ensureSize(t)+e:e}function returnTrue(){return!0}function wholeSlice(t,e,r){return(0===t||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function resolveBegin(t,e){return resolveIndex(t,e,0)}function resolveEnd(t,e){return resolveIndex(t,e,e)}function resolveIndex(t,e,r){return void 0===t?r:t<0?Math.max(0,e+t):void 0===e?t:Math.min(e,t)}var h=0,p=1,d=2,_=\"function\"==typeof Symbol&&Symbol.iterator,y=\"@@iterator\",m=_||y;function Iterator(t){this.next=t}function iteratorValue(t,e,r,n){var i=0===t?e:1===t?r:[e,r];return n?n.value=i:n={value:i,done:!1},n}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(t){return!!getIteratorFn(t)}function isIterator(t){return t&&\"function\"==typeof t.next}function getIterator(t){var e=getIteratorFn(t);return e&&e.call(t)}function getIteratorFn(t){var e=t&&(_&&t[_]||t[y]);if(\"function\"==typeof e)return e}function isArrayLike(t){return t&&\"number\"==typeof t.length}function Seq(t){return null==t?emptySequence():isIterable(t)?t.toSeq():seqFromValue(t)}function KeyedSeq(t){return null==t?emptySequence().toKeyedSeq():isIterable(t)?isKeyed(t)?t.toSeq():t.fromEntrySeq():keyedSeqFromValue(t)}function IndexedSeq(t){return null==t?emptySequence():isIterable(t)?isKeyed(t)?t.entrySeq():t.toIndexedSeq():indexedSeqFromValue(t)}function SetSeq(t){return(null==t?emptySequence():isIterable(t)?isKeyed(t)?t.entrySeq():t:indexedSeqFromValue(t)).toSetSeq()}Iterator.prototype.toString=function(){return\"[Iterator]\"},Iterator.KEYS=h,Iterator.VALUES=p,Iterator.ENTRIES=d,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[m]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString(\"Seq {\",\"}\")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(t,e){return seqIterate(this,t,e,!0)},Seq.prototype.__iterator=function(t,e){return seqIterator(this,t,e,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString(\"Seq [\",\"]\")},IndexedSeq.prototype.__iterate=function(t,e){return seqIterate(this,t,e,!1)},IndexedSeq.prototype.__iterator=function(t,e){return seqIterator(this,t,e,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq;var g,v,b,w=\"@@__IMMUTABLE_SEQ__@@\";function ArraySeq(t){this._array=t,this.size=t.length}function ObjectSeq(t){var e=Object.keys(t);this._object=t,this._keys=e,this.size=e.length}function IterableSeq(t){this._iterable=t,this.size=t.length||t.size}function IteratorSeq(t){this._iterator=t,this._iteratorCache=[]}function isSeq(t){return!(!t||!t[w])}function emptySequence(){return g||(g=new ArraySeq([]))}function keyedSeqFromValue(t){var e=Array.isArray(t)?new ArraySeq(t).fromEntrySeq():isIterator(t)?new IteratorSeq(t).fromEntrySeq():hasIterator(t)?new IterableSeq(t).fromEntrySeq():\"object\"==typeof t?new ObjectSeq(t):void 0;if(!e)throw new TypeError(\"Expected Array or iterable object of [k, v] entries, or keyed object: \"+t);return e}function indexedSeqFromValue(t){var e=maybeIndexedSeqFromValue(t);if(!e)throw new TypeError(\"Expected Array or iterable object of values: \"+t);return e}function seqFromValue(t){var e=maybeIndexedSeqFromValue(t)||\"object\"==typeof t&&new ObjectSeq(t);if(!e)throw new TypeError(\"Expected Array or iterable object of values, or keyed object: \"+t);return e}function maybeIndexedSeqFromValue(t){return isArrayLike(t)?new ArraySeq(t):isIterator(t)?new IteratorSeq(t):hasIterator(t)?new IterableSeq(t):void 0}function seqIterate(t,e,r,n){var i=t._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[r?o-a:a];if(!1===e(s[1],n?s[0]:a,t))return a+1}return a}return t.__iterateUncached(e,r)}function seqIterator(t,e,r,n){var i=t._cache;if(i){var o=i.length-1,a=0;return new Iterator((function(){var t=i[r?o-a:a];return a++>o?iteratorDone():iteratorValue(e,n?t[0]:a-1,t[1])}))}return t.__iteratorUncached(e,r)}function fromJS(t,e){return e?fromJSWith(e,t,\"\",{\"\":t}):fromJSDefault(t)}function fromJSWith(t,e,r,n){return Array.isArray(e)?t.call(n,r,IndexedSeq(e).map((function(r,n){return fromJSWith(t,r,n,e)}))):isPlainObj(e)?t.call(n,r,KeyedSeq(e).map((function(r,n){return fromJSWith(t,r,n,e)}))):e}function fromJSDefault(t){return Array.isArray(t)?IndexedSeq(t).map(fromJSDefault).toList():isPlainObj(t)?KeyedSeq(t).map(fromJSDefault).toMap():t}function isPlainObj(t){return t&&(t.constructor===Object||void 0===t.constructor)}function is(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if(\"function\"==typeof t.valueOf&&\"function\"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!(\"function\"!=typeof t.equals||\"function\"!=typeof e.equals||!t.equals(e))}function deepEqual(t,e){if(t===e)return!0;if(!isIterable(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||isKeyed(t)!==isKeyed(e)||isIndexed(t)!==isIndexed(e)||isOrdered(t)!==isOrdered(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!isAssociative(t);if(isOrdered(t)){var n=t.entries();return e.every((function(t,e){var i=n.next().value;return i&&is(i[1],t)&&(r||is(i[0],e))}))&&n.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)\"function\"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var o=t;t=e,e=o}var a=!0,s=e.__iterate((function(e,n){if(r?!t.has(e):i?!is(e,t.get(n,c)):!is(t.get(n,c),e))return a=!1,!1}));return a&&t.size===s}function Repeat(t,e){if(!(this instanceof Repeat))return new Repeat(t,e);if(this._value=t,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(v)return v;v=this}}function invariant(t,e){if(!t)throw new Error(e)}function Range(t,e,r){if(!(this instanceof Range))return new Range(t,e,r);if(invariant(0!==r,\"Cannot step a Range by 0\"),t=t||0,void 0===e&&(e=1/0),r=void 0===r?1:Math.abs(r),e<t&&(r=-r),this._start=t,this._end=e,this._step=r,this.size=Math.max(0,Math.ceil((e-t)/r-1)+1),0===this.size){if(b)return b;b=this}}function Collection(){throw TypeError(\"Abstract\")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Seq.prototype[w]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(t,e){return this.has(t)?this._array[wrapIndex(this,t)]:e},ArraySeq.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length-1,i=0;i<=n;i++)if(!1===t(r[e?n-i:i],i,this))return i+1;return i},ArraySeq.prototype.__iterator=function(t,e){var r=this._array,n=r.length-1,i=0;return new Iterator((function(){return i>n?iteratorDone():iteratorValue(t,i,r[e?n-i++:i++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},ObjectSeq.prototype.has=function(t){return this._object.hasOwnProperty(t)},ObjectSeq.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,i=n.length-1,o=0;o<=i;o++){var a=n[e?i-o:o];if(!1===t(r[a],a,this))return o+1}return o},ObjectSeq.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,i=n.length-1,o=0;return new Iterator((function(){var a=n[e?i-o:o];return o++>i?iteratorDone():iteratorValue(t,a,r[a])}))},ObjectSeq.prototype[i]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=getIterator(this._iterable),n=0;if(isIterator(r))for(var i;!(i=r.next()).done&&!1!==t(i.value,n++,this););return n},IterableSeq.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=getIterator(this._iterable);if(!isIterator(r))return new Iterator(iteratorDone);var n=0;return new Iterator((function(){var e=r.next();return e.done?e:iteratorValue(t,n++,e.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);for(var r,n=this._iterator,i=this._iteratorCache,o=0;o<i.length;)if(!1===t(i[o],o++,this))return o;for(;!(r=n.next()).done;){var a=r.value;if(i[o]=a,!1===t(a,o++,this))break}return o},IteratorSeq.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=this._iterator,n=this._iteratorCache,i=0;return new Iterator((function(){if(i>=n.length){var e=r.next();if(e.done)return e;n[i]=e.value}return iteratorValue(t,i,n[i++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?\"Repeat []\":\"Repeat [ \"+this._value+\" \"+this.size+\" times ]\"},Repeat.prototype.get=function(t,e){return this.has(t)?this._value:e},Repeat.prototype.includes=function(t){return is(this._value,t)},Repeat.prototype.slice=function(t,e){var r=this.size;return wholeSlice(t,e,r)?this:new Repeat(this._value,resolveEnd(e,r)-resolveBegin(t,r))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(t){return is(this._value,t)?0:-1},Repeat.prototype.lastIndexOf=function(t){return is(this._value,t)?this.size:-1},Repeat.prototype.__iterate=function(t,e){for(var r=0;r<this.size;r++)if(!1===t(this._value,r,this))return r+1;return r},Repeat.prototype.__iterator=function(t,e){var r=this,n=0;return new Iterator((function(){return n<r.size?iteratorValue(t,n++,r._value):iteratorDone()}))},Repeat.prototype.equals=function(t){return t instanceof Repeat?is(this._value,t._value):deepEqual(t)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?\"Range []\":\"Range [ \"+this._start+\"...\"+this._end+(1!==this._step?\" by \"+this._step:\"\")+\" ]\"},Range.prototype.get=function(t,e){return this.has(t)?this._start+wrapIndex(this,t)*this._step:e},Range.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},Range.prototype.slice=function(t,e){return wholeSlice(t,e,this.size)?this:(t=resolveBegin(t,this.size),(e=resolveEnd(e,this.size))<=t?new Range(0,0):new Range(this.get(t,this._end),this.get(e,this._end),this._step))},Range.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},Range.prototype.lastIndexOf=function(t){return this.indexOf(t)},Range.prototype.__iterate=function(t,e){for(var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;o<=r;o++){if(!1===t(i,o,this))return o+1;i+=e?-n:n}return o},Range.prototype.__iterator=function(t,e){var r=this.size-1,n=this._step,i=e?this._start+r*n:this._start,o=0;return new Iterator((function(){var a=i;return i+=e?-n:n,o>r?iteratorDone():iteratorValue(t,o++,a)}))},Range.prototype.equals=function(t){return t instanceof Range?this._start===t._start&&this._end===t._end&&this._step===t._step:deepEqual(this,t)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var I=\"function\"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function smi(t){return t>>>1&1073741824|3221225471&t}function hash(t){if(!1===t||null==t)return 0;if(\"function\"==typeof t.valueOf&&(!1===(t=t.valueOf())||null==t))return 0;if(!0===t)return 1;var e=typeof t;if(\"number\"===e){if(t!=t||t===1/0)return 0;var r=0|t;for(r!==t&&(r^=4294967295*t);t>4294967295;)r^=t/=4294967295;return smi(r)}if(\"string\"===e)return t.length>j?cachedHashString(t):hashString(t);if(\"function\"==typeof t.hashCode)return t.hashCode();if(\"object\"===e)return hashJSObj(t);if(\"function\"==typeof t.toString)return hashString(t.toString());throw new Error(\"Value type \"+e+\" cannot be hashed.\")}function cachedHashString(t){var e=D[t];return void 0===e&&(e=hashString(t),P===z&&(P=0,D={}),P++,D[t]=e),e}function hashString(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return smi(e)}function hashJSObj(t){var e;if(C&&void 0!==(e=k.get(t)))return e;if(void 0!==(e=t[L]))return e;if(!B){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[L]))return e;if(void 0!==(e=getIENodeHash(t)))return e}if(e=++q,1073741824&q&&(q=0),C)k.set(t,e);else{if(void 0!==x&&!1===x(t))throw new Error(\"Non-extensible objects are not allowed as keys.\");if(B)Object.defineProperty(t,L,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[L]=e;else{if(void 0===t.nodeType)throw new Error(\"Unable to set a non-enumerable property on object.\");t[L]=e}}return e}var x=Object.isExtensible,B=function(){try{return Object.defineProperty({},\"@\",{}),!0}catch(t){return!1}}();function getIENodeHash(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}var k,C=\"function\"==typeof WeakMap;C&&(k=new WeakMap);var q=0,L=\"__immutablehash__\";\"function\"==typeof Symbol&&(L=Symbol(L));var j=16,z=255,P=0,D={};function assertNotInfinite(t){invariant(t!==1/0,\"Cannot perform this action with an infinite size.\")}function Map(t){return null==t?emptyMap():isMap(t)&&!isOrdered(t)?t:emptyMap().withMutations((function(e){var r=KeyedIterable(t);assertNotInfinite(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}function isMap(t){return!(!t||!t[W])}createClass(Map,KeyedCollection),Map.of=function(){var e=t.call(arguments,0);return emptyMap().withMutations((function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error(\"Missing value for key: \"+e[r]);t.set(e[r],e[r+1])}}))},Map.prototype.toString=function(){return this.__toString(\"Map {\",\"}\")},Map.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},Map.prototype.set=function(t,e){return updateMap(this,t,e)},Map.prototype.setIn=function(t,e){return this.updateIn(t,c,(function(){return e}))},Map.prototype.remove=function(t){return updateMap(this,t,c)},Map.prototype.deleteIn=function(t){return this.updateIn(t,(function(){return c}))},Map.prototype.update=function(t,e,r){return 1===arguments.length?t(this):this.updateIn([t],e,r)},Map.prototype.updateIn=function(t,e,r){r||(r=e,e=void 0);var n=updateInDeepMap(this,forceIterator(t),e,r);return n===c?void 0:n},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(e){return mergeIntoMapWith(this,e,t.call(arguments,1))},Map.prototype.mergeIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,emptyMap(),(function(t){return\"function\"==typeof t.merge?t.merge.apply(t,r):r[r.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(e),r)},Map.prototype.mergeDeepIn=function(e){var r=t.call(arguments,1);return this.updateIn(e,emptyMap(),(function(t){return\"function\"==typeof t.mergeDeep?t.mergeDeep.apply(t,r):r[r.length-1]}))},Map.prototype.sort=function(t){return OrderedMap(sortFactory(this,t))},Map.prototype.sortBy=function(t,e){return OrderedMap(sortFactory(this,e,t))},Map.prototype.withMutations=function(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(t,e){return new MapIterator(this,t,e)},Map.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},Map.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?makeMap(this.size,this._root,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Map.isMap=isMap;var U,W=\"@@__IMMUTABLE_MAP__@@\",V=Map.prototype;function ArrayMapNode(t,e){this.ownerID=t,this.entries=e}function BitmapIndexedNode(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r}function HashArrayMapNode(t,e,r){this.ownerID=t,this.count=e,this.nodes=r}function HashCollisionNode(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r}function ValueNode(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r}function MapIterator(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&mapIteratorFrame(t._root)}function mapIteratorValue(t,e){return iteratorValue(t,e[0],e[1])}function mapIteratorFrame(t,e){return{node:t,index:0,__prev:e}}function makeMap(t,e,r,n){var i=Object.create(V);return i.size=t,i._root=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function emptyMap(){return U||(U=makeMap(0))}function updateMap(t,e,r){var n,i;if(t._root){var o=MakeRef(f),a=MakeRef(l);if(n=updateNode(t._root,t.__ownerID,0,void 0,e,r,o,a),!a.value)return t;i=t.size+(o.value?r===c?-1:1:0)}else{if(r===c)return t;i=1,n=new ArrayMapNode(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=n,t.__hash=void 0,t.__altered=!0,t):n?makeMap(i,n):emptyMap()}function updateNode(t,e,r,n,i,o,a,s){return t?t.update(e,r,n,i,o,a,s):o===c?t:(SetRef(s),SetRef(a),new ValueNode(e,n,[i,o]))}function isLeafNode(t){return t.constructor===ValueNode||t.constructor===HashCollisionNode}function mergeIntoNode(t,e,r,n,i){if(t.keyHash===n)return new HashCollisionNode(e,n,[t.entry,i]);var o,s=(0===r?t.keyHash:t.keyHash>>>r)&u,c=(0===r?n:n>>>r)&u;return new BitmapIndexedNode(e,1<<s|1<<c,s===c?[mergeIntoNode(t,e,r+a,n,i)]:(o=new ValueNode(e,n,i),s<c?[t,o]:[o,t]))}function createNodes(t,e,r,n){t||(t=new OwnerID);for(var i=new ValueNode(t,hash(r),[r,n]),o=0;o<e.length;o++){var a=e[o];i=i.update(t,0,void 0,a[0],a[1])}return i}function packNodes(t,e,r,n){for(var i=0,o=0,a=new Array(r),s=0,u=1,c=e.length;s<c;s++,u<<=1){var f=e[s];void 0!==f&&s!==n&&(i|=u,a[o++]=f)}return new BitmapIndexedNode(t,i,a)}function expandNodes(t,e,r,n,i){for(var o=0,a=new Array(s),u=0;0!==r;u++,r>>>=1)a[u]=1&r?e[o++]:void 0;return a[n]=i,new HashArrayMapNode(t,o+1,a)}function mergeIntoMapWith(t,e,r){for(var n=[],i=0;i<r.length;i++){var o=r[i],a=KeyedIterable(o);isIterable(o)||(a=a.map((function(t){return fromJS(t)}))),n.push(a)}return mergeIntoCollectionWith(t,e,n)}function deepMerger(t,e,r){return t&&t.mergeDeep&&isIterable(e)?t.mergeDeep(e):is(t,e)?t:e}function deepMergerWith(t){return function(e,r,n){if(e&&e.mergeDeepWith&&isIterable(r))return e.mergeDeepWith(t,r);var i=t(e,r,n);return is(e,i)?e:i}}function mergeIntoCollectionWith(t,e,r){return 0===(r=r.filter((function(t){return 0!==t.size}))).length?t:0!==t.size||t.__ownerID||1!==r.length?t.withMutations((function(t){for(var n=e?function(r,n){t.update(n,c,(function(t){return t===c?r:e(t,r,n)}))}:function(e,r){t.set(r,e)},i=0;i<r.length;i++)r[i].forEach(n)})):t.constructor(r[0])}function updateInDeepMap(t,e,r,n){var i=t===c,o=e.next();if(o.done){var a=i?r:t,s=n(a);return s===a?t:s}invariant(i||t&&t.set,\"invalid keyPath\");var u=o.value,f=i?c:t.get(u,c),l=updateInDeepMap(f,e,r,n);return l===f?t:l===c?t.remove(u):(i?emptyMap():t).set(u,l)}function popCount(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function setIn(t,e,r,n){var i=n?t:arrCopy(t);return i[e]=r,i}function spliceIn(t,e,r,n){var i=t.length+1;if(n&&e+1===i)return t[e]=r,t;for(var o=new Array(i),a=0,s=0;s<i;s++)s===e?(o[s]=r,a=-1):o[s]=t[s+a];return o}function spliceOut(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var i=new Array(n),o=0,a=0;a<n;a++)a===e&&(o=1),i[a]=t[a+o];return i}V[W]=!0,V[o]=V.remove,V.removeIn=V.deleteIn,ArrayMapNode.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(is(r,i[o][0]))return i[o][1];return n},ArrayMapNode.prototype.update=function(t,e,r,n,i,o,a){for(var s=i===c,u=this.entries,f=0,l=u.length;f<l&&!is(n,u[f][0]);f++);var h=f<l;if(h?u[f][1]===i:s)return this;if(SetRef(a),(s||!h)&&SetRef(o),!s||1!==u.length){if(!h&&!s&&u.length>=K)return createNodes(t,u,n,i);var p=t&&t===this.ownerID,d=p?u:arrCopy(u);return h?s?f===l-1?d.pop():d[f]=d.pop():d[f]=[n,i]:d.push([n,i]),p?(this.entries=d,this):new ArrayMapNode(t,d)}},BitmapIndexedNode.prototype.get=function(t,e,r,n){void 0===e&&(e=hash(r));var i=1<<((0===t?e:e>>>t)&u),o=this.bitmap;return o&i?this.nodes[popCount(o&i-1)].get(t+a,e,r,n):n},BitmapIndexedNode.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=hash(n));var f=(0===e?r:r>>>e)&u,l=1<<f,h=this.bitmap,p=!!(h&l);if(!p&&i===c)return this;var d=popCount(h&l-1),_=this.nodes,y=p?_[d]:void 0,m=updateNode(y,t,e+a,r,n,i,o,s);if(m===y)return this;if(!p&&m&&_.length>=$)return expandNodes(t,_,h,f,m);if(p&&!m&&2===_.length&&isLeafNode(_[1^d]))return _[1^d];if(p&&m&&1===_.length&&isLeafNode(m))return m;var g=t&&t===this.ownerID,v=p?m?h:h^l:h|l,b=p?m?setIn(_,d,m,g):spliceOut(_,d,g):spliceIn(_,d,m,g);return g?(this.bitmap=v,this.nodes=b,this):new BitmapIndexedNode(t,v,b)},HashArrayMapNode.prototype.get=function(t,e,r,n){void 0===e&&(e=hash(r));var i=(0===t?e:e>>>t)&u,o=this.nodes[i];return o?o.get(t+a,e,r,n):n},HashArrayMapNode.prototype.update=function(t,e,r,n,i,o,s){void 0===r&&(r=hash(n));var f=(0===e?r:r>>>e)&u,l=i===c,h=this.nodes,p=h[f];if(l&&!p)return this;var d=updateNode(p,t,e+a,r,n,i,o,s);if(d===p)return this;var _=this.count;if(p){if(!d&&--_<H)return packNodes(t,h,_,f)}else _++;var y=t&&t===this.ownerID,m=setIn(h,f,d,y);return y?(this.count=_,this.nodes=m,this):new HashArrayMapNode(t,_,m)},HashCollisionNode.prototype.get=function(t,e,r,n){for(var i=this.entries,o=0,a=i.length;o<a;o++)if(is(r,i[o][0]))return i[o][1];return n},HashCollisionNode.prototype.update=function(t,e,r,n,i,o,a){void 0===r&&(r=hash(n));var s=i===c;if(r!==this.keyHash)return s?this:(SetRef(a),SetRef(o),mergeIntoNode(this,t,e,r,[n,i]));for(var u=this.entries,f=0,l=u.length;f<l&&!is(n,u[f][0]);f++);var h=f<l;if(h?u[f][1]===i:s)return this;if(SetRef(a),(s||!h)&&SetRef(o),s&&2===l)return new ValueNode(t,this.keyHash,u[1^f]);var p=t&&t===this.ownerID,d=p?u:arrCopy(u);return h?s?f===l-1?d.pop():d[f]=d.pop():d[f]=[n,i]:d.push([n,i]),p?(this.entries=d,this):new HashCollisionNode(t,this.keyHash,d)},ValueNode.prototype.get=function(t,e,r,n){return is(r,this.entry[0])?this.entry[1]:n},ValueNode.prototype.update=function(t,e,r,n,i,o,a){var s=i===c,u=is(n,this.entry[0]);return(u?i===this.entry[1]:s)?this:(SetRef(a),s?void SetRef(o):u?t&&t===this.ownerID?(this.entry[1]=i,this):new ValueNode(t,this.keyHash,[n,i]):(SetRef(o),mergeIntoNode(this,t,e,hash(n),[n,i])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(t,e){for(var r=this.entries,n=0,i=r.length-1;n<=i;n++)if(!1===t(r[e?i-n:n]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,i=r.length-1;n<=i;n++){var o=r[e?i-n:n];if(o&&!1===o.iterate(t,e))return!1}},ValueNode.prototype.iterate=function(t,e){return t(this.entry)},createClass(MapIterator,Iterator),MapIterator.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r,n=e.node,i=e.index++;if(n.entry){if(0===i)return mapIteratorValue(t,n.entry)}else if(n.entries){if(i<=(r=n.entries.length-1))return mapIteratorValue(t,n.entries[this._reverse?r-i:i])}else if(i<=(r=n.nodes.length-1)){var o=n.nodes[this._reverse?r-i:i];if(o){if(o.entry)return mapIteratorValue(t,o.entry);e=this._stack=mapIteratorFrame(o,e)}continue}e=this._stack=this._stack.__prev}return iteratorDone()};var K=s/4,$=s/2,H=s/4;function List(t){var e=emptyList();if(null==t)return e;if(isList(t))return t;var r=IndexedIterable(t),n=r.size;return 0===n?e:(assertNotInfinite(n),n>0&&n<s?makeList(0,n,a,null,new VNode(r.toArray())):e.withMutations((function(t){t.setSize(n),r.forEach((function(e,r){return t.set(r,e)}))})))}function isList(t){return!(!t||!t[Y])}createClass(List,IndexedCollection),List.of=function(){return this(arguments)},List.prototype.toString=function(){return this.__toString(\"List [\",\"]\")},List.prototype.get=function(t,e){if((t=wrapIndex(this,t))>=0&&t<this.size){var r=listNodeFor(this,t+=this._origin);return r&&r.array[t&u]}return e},List.prototype.set=function(t,e){return updateList(this,t,e)},List.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},List.prototype.insert=function(t,e){return this.splice(t,0,e)},List.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=a,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):emptyList()},List.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){setListBounds(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},List.prototype.pop=function(){return setListBounds(this,0,-1)},List.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){setListBounds(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},List.prototype.shift=function(){return setListBounds(this,1)},List.prototype.merge=function(){return mergeIntoListWith(this,void 0,arguments)},List.prototype.mergeWith=function(e){return mergeIntoListWith(this,e,t.call(arguments,1))},List.prototype.mergeDeep=function(){return mergeIntoListWith(this,deepMerger,arguments)},List.prototype.mergeDeepWith=function(e){var r=t.call(arguments,1);return mergeIntoListWith(this,deepMergerWith(e),r)},List.prototype.setSize=function(t){return setListBounds(this,0,t)},List.prototype.slice=function(t,e){var r=this.size;return wholeSlice(t,e,r)?this:setListBounds(this,resolveBegin(t,r),resolveEnd(e,r))},List.prototype.__iterator=function(t,e){var r=0,n=iterateList(this,e);return new Iterator((function(){var e=n();return e===et?iteratorDone():iteratorValue(t,r++,e)}))},List.prototype.__iterate=function(t,e){for(var r,n=0,i=iterateList(this,e);(r=i())!==et&&!1!==t(r,n++,this););return n},List.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?makeList(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):(this.__ownerID=t,this)},List.isList=isList;var Y=\"@@__IMMUTABLE_LIST__@@\",Z=List.prototype;function VNode(t,e){this.array=t,this.ownerID=e}Z[Y]=!0,Z[o]=Z.remove,Z.setIn=V.setIn,Z.deleteIn=Z.removeIn=V.removeIn,Z.update=V.update,Z.updateIn=V.updateIn,Z.mergeIn=V.mergeIn,Z.mergeDeepIn=V.mergeDeepIn,Z.withMutations=V.withMutations,Z.asMutable=V.asMutable,Z.asImmutable=V.asImmutable,Z.wasAltered=V.wasAltered,VNode.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&u;if(n>=this.array.length)return new VNode([],t);var i,o=0===n;if(e>0){var s=this.array[n];if((i=s&&s.removeBefore(t,e-a,r))===s&&o)return this}if(o&&!i)return this;var c=editableVNode(this,t);if(!o)for(var f=0;f<n;f++)c.array[f]=void 0;return i&&(c.array[n]=i),c},VNode.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,i=r-1>>>e&u;if(i>=this.array.length)return this;if(e>0){var o=this.array[i];if((n=o&&o.removeAfter(t,e-a,r))===o&&i===this.array.length-1)return this}var s=editableVNode(this,t);return s.array.splice(i+1),n&&(s.array[i]=n),s};var J,tt,et={};function iterateList(t,e){var r=t._origin,n=t._capacity,i=getTailOffset(n),o=t._tail;return iterateNodeOrLeaf(t._root,t._level,0);function iterateNodeOrLeaf(t,e,r){return 0===e?iterateLeaf(t,r):iterateNode(t,e,r)}function iterateLeaf(t,a){var u=a===i?o&&o.array:t&&t.array,c=a>r?0:r-a,f=n-a;return f>s&&(f=s),function(){if(c===f)return et;var t=e?--f:c++;return u&&u[t]}}function iterateNode(t,i,o){var u,c=t&&t.array,f=o>r?0:r-o>>i,l=1+(n-o>>i);return l>s&&(l=s),function(){for(;;){if(u){var t=u();if(t!==et)return t;u=null}if(f===l)return et;var r=e?--l:f++;u=iterateNodeOrLeaf(c&&c[r],i-a,o+(r<<i))}}}}function makeList(t,e,r,n,i,o,a){var s=Object.create(Z);return s.size=e-t,s._origin=t,s._capacity=e,s._level=r,s._root=n,s._tail=i,s.__ownerID=o,s.__hash=a,s.__altered=!1,s}function emptyList(){return J||(J=makeList(0,0,a))}function updateList(t,e,r){if((e=wrapIndex(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?setListBounds(t,e).set(0,r):setListBounds(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,i=t._root,o=MakeRef(l);return e>=getTailOffset(t._capacity)?n=updateVNode(n,t.__ownerID,0,e,r,o):i=updateVNode(i,t.__ownerID,t._level,e,r,o),o.value?t.__ownerID?(t._root=i,t._tail=n,t.__hash=void 0,t.__altered=!0,t):makeList(t._origin,t._capacity,t._level,i,n):t}function updateVNode(t,e,r,n,i,o){var s,c=n>>>r&u,f=t&&c<t.array.length;if(!f&&void 0===i)return t;if(r>0){var l=t&&t.array[c],h=updateVNode(l,e,r-a,n,i,o);return h===l?t:((s=editableVNode(t,e)).array[c]=h,s)}return f&&t.array[c]===i?t:(SetRef(o),s=editableVNode(t,e),void 0===i&&c===s.array.length-1?s.array.pop():s.array[c]=i,s)}function editableVNode(t,e){return e&&t&&e===t.ownerID?t:new VNode(t?t.array.slice():[],e)}function listNodeFor(t,e){if(e>=getTailOffset(t._capacity))return t._tail;if(e<1<<t._level+a){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&u],n-=a;return r}}function setListBounds(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new OwnerID,i=t._origin,o=t._capacity,s=i+e,c=void 0===r?o:r<0?o+r:i+r;if(s===i&&c===o)return t;if(s>=c)return t.clear();for(var f=t._level,l=t._root,h=0;s+h<0;)l=new VNode(l&&l.array.length?[void 0,l]:[],n),h+=1<<(f+=a);h&&(s+=h,i+=h,c+=h,o+=h);for(var p=getTailOffset(o),d=getTailOffset(c);d>=1<<f+a;)l=new VNode(l&&l.array.length?[l]:[],n),f+=a;var _=t._tail,y=d<p?listNodeFor(t,c-1):d>p?new VNode([],n):_;if(_&&d>p&&s<o&&_.array.length){for(var m=l=editableVNode(l,n),g=f;g>a;g-=a){var v=p>>>g&u;m=m.array[v]=editableVNode(m.array[v],n)}m.array[p>>>a&u]=_}if(c<o&&(y=y&&y.removeAfter(n,0,c)),s>=d)s-=d,c-=d,f=a,l=null,y=y&&y.removeBefore(n,0,s);else if(s>i||d<p){for(h=0;l;){var b=s>>>f&u;if(b!==d>>>f&u)break;b&&(h+=(1<<f)*b),f-=a,l=l.array[b]}l&&s>i&&(l=l.removeBefore(n,f,s-h)),l&&d<p&&(l=l.removeAfter(n,f,d-h)),h&&(s-=h,c-=h)}return t.__ownerID?(t.size=c-s,t._origin=s,t._capacity=c,t._level=f,t._root=l,t._tail=y,t.__hash=void 0,t.__altered=!0,t):makeList(s,c,f,l,y)}function mergeIntoListWith(t,e,r){for(var n=[],i=0,o=0;o<r.length;o++){var a=r[o],s=IndexedIterable(a);s.size>i&&(i=s.size),isIterable(a)||(s=s.map((function(t){return fromJS(t)}))),n.push(s)}return i>t.size&&(t=t.setSize(i)),mergeIntoCollectionWith(t,e,n)}function getTailOffset(t){return t<s?0:t-1>>>a<<a}function OrderedMap(t){return null==t?emptyOrderedMap():isOrderedMap(t)?t:emptyOrderedMap().withMutations((function(e){var r=KeyedIterable(t);assertNotInfinite(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}function isOrderedMap(t){return isMap(t)&&isOrdered(t)}function makeOrderedMap(t,e,r,n){var i=Object.create(OrderedMap.prototype);return i.size=t?t.size:0,i._map=t,i._list=e,i.__ownerID=r,i.__hash=n,i}function emptyOrderedMap(){return tt||(tt=makeOrderedMap(emptyMap(),emptyList()))}function updateOrderedMap(t,e,r){var n,i,o=t._map,a=t._list,u=o.get(e),f=void 0!==u;if(r===c){if(!f)return t;a.size>=s&&a.size>=2*o.size?(n=(i=a.filter((function(t,e){return void 0!==t&&u!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(n.__ownerID=i.__ownerID=t.__ownerID)):(n=o.remove(e),i=u===a.size-1?a.pop():a.set(u,void 0))}else if(f){if(r===a.get(u)[1])return t;n=o,i=a.set(u,[e,r])}else n=o.set(e,a.size),i=a.set(a.size,[e,r]);return t.__ownerID?(t.size=n.size,t._map=n,t._list=i,t.__hash=void 0,t):makeOrderedMap(n,i)}function ToKeyedSequence(t,e){this._iter=t,this._useKeys=e,this.size=t.size}function ToIndexedSequence(t){this._iter=t,this.size=t.size}function ToSetSequence(t){this._iter=t,this.size=t.size}function FromEntriesSequence(t){this._iter=t,this.size=t.size}function flipFactory(t){var e=makeSequence(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=cacheResultThrough,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(e===d){var n=t.__iterator(e,r);return new Iterator((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(e===p?h:p,r)},e}function mapFactory(t,e,r){var n=makeSequence(t);return n.size=t.size,n.has=function(e){return t.has(e)},n.get=function(n,i){var o=t.get(n,c);return o===c?i:e.call(r,o,n,t)},n.__iterateUncached=function(n,i){var o=this;return t.__iterate((function(t,i,a){return!1!==n(e.call(r,t,i,a),i,o)}),i)},n.__iteratorUncached=function(n,i){var o=t.__iterator(d,i);return new Iterator((function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return iteratorValue(n,s,e.call(r,a[1],s,t),i)}))},n}function reverseFactory(t,e){var r=makeSequence(t);return r._iter=t,r.size=t.size,r.reverse=function(){return t},t.flip&&(r.flip=function(){var e=flipFactory(t);return e.reverse=function(){return t.flip()},e}),r.get=function(r,n){return t.get(e?r:-1-r,n)},r.has=function(r){return t.has(e?r:-1-r)},r.includes=function(e){return t.includes(e)},r.cacheResult=cacheResultThrough,r.__iterate=function(e,r){var n=this;return t.__iterate((function(t,r){return e(t,r,n)}),!r)},r.__iterator=function(e,r){return t.__iterator(e,!r)},r}function filterFactory(t,e,r,n){var i=makeSequence(t);return n&&(i.has=function(n){var i=t.get(n,c);return i!==c&&!!e.call(r,i,n,t)},i.get=function(n,i){var o=t.get(n,c);return o!==c&&e.call(r,o,n,t)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return t.__iterate((function(t,o,u){if(e.call(r,t,o,u))return s++,i(t,n?o:s-1,a)}),o),s},i.__iteratorUncached=function(i,o){var a=t.__iterator(d,o),s=0;return new Iterator((function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],f=u[1];if(e.call(r,f,c,t))return iteratorValue(i,n?c:s++,f,o)}}))},i}function countByFactory(t,e,r){var n=Map().asMutable();return t.__iterate((function(i,o){n.update(e.call(r,i,o,t),0,(function(t){return t+1}))})),n.asImmutable()}function groupByFactory(t,e,r){var n=isKeyed(t),i=(isOrdered(t)?OrderedMap():Map()).asMutable();t.__iterate((function(o,a){i.update(e.call(r,o,a,t),(function(t){return(t=t||[]).push(n?[a,o]:o),t}))}));var o=iterableClass(t);return i.map((function(e){return reify(t,o(e))}))}function sliceFactory(t,e,r,n){var i=t.size;if(void 0!==e&&(e|=0),void 0!==r&&(r===1/0?r=i:r|=0),wholeSlice(e,r,i))return t;var o=resolveBegin(e,i),a=resolveEnd(r,i);if(o!=o||a!=a)return sliceFactory(t.toSeq().cacheResult(),e,r,n);var s,u=a-o;u==u&&(s=u<0?0:u);var c=makeSequence(t);return c.size=0===s?s:t.size&&s||void 0,!n&&isSeq(t)&&s>=0&&(c.get=function(e,r){return(e=wrapIndex(this,e))>=0&&e<s?t.get(e+o,r):r}),c.__iterateUncached=function(e,r){var i=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var a=0,u=!0,c=0;return t.__iterate((function(t,r){if(!u||!(u=a++<o))return c++,!1!==e(t,n?r:c-1,i)&&c!==s})),c},c.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);var i=0!==s&&t.__iterator(e,r),a=0,u=0;return new Iterator((function(){for(;a++<o;)i.next();if(++u>s)return iteratorDone();var t=i.next();return n||e===p?t:iteratorValue(e,u-1,e===h?void 0:t.value[1],t)}))},c}function takeWhileFactory(t,e,r){var n=makeSequence(t);return n.__iterateUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterate(n,i);var a=0;return t.__iterate((function(t,i,s){return e.call(r,t,i,s)&&++a&&n(t,i,o)})),a},n.__iteratorUncached=function(n,i){var o=this;if(i)return this.cacheResult().__iterator(n,i);var a=t.__iterator(d,i),s=!0;return new Iterator((function(){if(!s)return iteratorDone();var t=a.next();if(t.done)return t;var i=t.value,u=i[0],c=i[1];return e.call(r,c,u,o)?n===d?t:iteratorValue(n,u,c,t):(s=!1,iteratorDone())}))},n}function skipWhileFactory(t,e,r,n){var i=makeSequence(t);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return t.__iterate((function(t,o,c){if(!s||!(s=e.call(r,t,o,c)))return u++,i(t,n?o:u-1,a)})),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=t.__iterator(d,o),u=!0,c=0;return new Iterator((function(){var t,o,f;do{if((t=s.next()).done)return n||i===p?t:iteratorValue(i,c++,i===h?void 0:t.value[1],t);var l=t.value;o=l[0],f=l[1],u&&(u=e.call(r,f,o,a))}while(u);return i===d?t:iteratorValue(i,o,f,t)}))},i}function concatFactory(t,e){var r=isKeyed(t),n=[t].concat(e).map((function(t){return isIterable(t)?r&&(t=KeyedIterable(t)):t=r?keyedSeqFromValue(t):indexedSeqFromValue(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var i=n[0];if(i===t||r&&isKeyed(i)||isIndexed(t)&&isIndexed(i))return i}var o=new ArraySeq(n);return r?o=o.toKeyedSeq():isIndexed(t)||(o=o.toSetSeq()),(o=o.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),o}function flattenFactory(t,e,r){var n=makeSequence(t);return n.__iterateUncached=function(n,i){var o=0,a=!1;function flatDeep(t,s){var u=this;t.__iterate((function(t,i){return(!e||s<e)&&isIterable(t)?flatDeep(t,s+1):!1===n(t,r?i:o++,u)&&(a=!0),!a}),i)}return flatDeep(t,0),o},n.__iteratorUncached=function(n,i){var o=t.__iterator(n,i),a=[],s=0;return new Iterator((function(){for(;o;){var t=o.next();if(!1===t.done){var u=t.value;if(n===d&&(u=u[1]),e&&!(a.length<e)||!isIterable(u))return r?t:iteratorValue(n,s++,u,t);a.push(o),o=u.__iterator(n,i)}else o=a.pop()}return iteratorDone()}))},n}function flatMapFactory(t,e,r){var n=iterableClass(t);return t.toSeq().map((function(i,o){return n(e.call(r,i,o,t))})).flatten(!0)}function interposeFactory(t,e){var r=makeSequence(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var i=this,o=0;return t.__iterate((function(t,n){return(!o||!1!==r(e,o++,i))&&!1!==r(t,o++,i)}),n),o},r.__iteratorUncached=function(r,n){var i,o=t.__iterator(p,n),a=0;return new Iterator((function(){return(!i||a%2)&&(i=o.next()).done?i:a%2?iteratorValue(r,a++,e):iteratorValue(r,a++,i.value,i)}))},r}function sortFactory(t,e,r){e||(e=defaultComparator);var n=isKeyed(t),i=0,o=t.toSeq().map((function(e,n){return[n,e,i++,r?r(e,n,t):e]})).toArray();return o.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){o[e].length=2}:function(t,e){o[e]=t[1]}),n?KeyedSeq(o):isIndexed(t)?IndexedSeq(o):SetSeq(o)}function maxFactory(t,e,r){if(e||(e=defaultComparator),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return maxCompare(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return maxCompare(e,t,r)?r:t}))}function maxCompare(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function zipWithFactory(t,e,r){var n=makeSequence(t);return n.size=new ArraySeq(r).map((function(t){return t.size})).min(),n.__iterate=function(t,e){for(var r,n=this.__iterator(p,e),i=0;!(r=n.next()).done&&!1!==t(r.value,i++,this););return i},n.__iteratorUncached=function(t,n){var i=r.map((function(t){return t=Iterable(t),getIterator(n?t.reverse():t)})),o=0,a=!1;return new Iterator((function(){var r;return a||(r=i.map((function(t){return t.next()})),a=r.some((function(t){return t.done}))),a?iteratorDone():iteratorValue(t,o++,e.apply(null,r.map((function(t){return t.value}))))}))},n}function reify(t,e){return isSeq(t)?e:t.constructor(e)}function validateEntry(t){if(t!==Object(t))throw new TypeError(\"Expected [K, V] tuple: \"+t)}function resolveSize(t){return assertNotInfinite(t.size),ensureSize(t)}function iterableClass(t){return isKeyed(t)?KeyedIterable:isIndexed(t)?IndexedIterable:SetIterable}function makeSequence(t){return Object.create((isKeyed(t)?KeyedSeq:isIndexed(t)?IndexedSeq:SetSeq).prototype)}function cacheResultThrough(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):Seq.prototype.cacheResult.call(this)}function defaultComparator(t,e){return t>e?1:t<e?-1:0}function forceIterator(t){var e=getIterator(t);if(!e){if(!isArrayLike(t))throw new TypeError(\"Expected iterable or array-like: \"+t);e=getIterator(Iterable(t))}return e}function Record(t,e){var r,n=function Record(o){if(o instanceof n)return o;if(!(this instanceof n))return new n(o);if(!r){r=!0;var a=Object.keys(t);setProps(i,a),i.size=a.length,i._name=e,i._keys=a,i._defaultValues=t}this._map=Map(o)},i=n.prototype=Object.create(rt);return i.constructor=n,n}createClass(OrderedMap,Map),OrderedMap.of=function(){return this(arguments)},OrderedMap.prototype.toString=function(){return this.__toString(\"OrderedMap {\",\"}\")},OrderedMap.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},OrderedMap.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):emptyOrderedMap()},OrderedMap.prototype.set=function(t,e){return updateOrderedMap(this,t,e)},OrderedMap.prototype.remove=function(t){return updateOrderedMap(this,t,c)},OrderedMap.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},OrderedMap.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},OrderedMap.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},OrderedMap.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?makeOrderedMap(e,r,t,this.__hash):(this.__ownerID=t,this._map=e,this._list=r,this)},OrderedMap.isOrderedMap=isOrderedMap,OrderedMap.prototype[i]=!0,OrderedMap.prototype[o]=OrderedMap.prototype.remove,createClass(ToKeyedSequence,KeyedSeq),ToKeyedSequence.prototype.get=function(t,e){return this._iter.get(t,e)},ToKeyedSequence.prototype.has=function(t){return this._iter.has(t)},ToKeyedSequence.prototype.valueSeq=function(){return this._iter.valueSeq()},ToKeyedSequence.prototype.reverse=function(){var t=this,e=reverseFactory(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},ToKeyedSequence.prototype.map=function(t,e){var r=this,n=mapFactory(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},ToKeyedSequence.prototype.__iterate=function(t,e){var r,n=this;return this._iter.__iterate(this._useKeys?function(e,r){return t(e,r,n)}:(r=e?resolveSize(this):0,function(i){return t(i,e?--r:r++,n)}),e)},ToKeyedSequence.prototype.__iterator=function(t,e){if(this._useKeys)return this._iter.__iterator(t,e);var r=this._iter.__iterator(p,e),n=e?resolveSize(this):0;return new Iterator((function(){var i=r.next();return i.done?i:iteratorValue(t,e?--n:n++,i.value,i)}))},ToKeyedSequence.prototype[i]=!0,createClass(ToIndexedSequence,IndexedSeq),ToIndexedSequence.prototype.includes=function(t){return this._iter.includes(t)},ToIndexedSequence.prototype.__iterate=function(t,e){var r=this,n=0;return this._iter.__iterate((function(e){return t(e,n++,r)}),e)},ToIndexedSequence.prototype.__iterator=function(t,e){var r=this._iter.__iterator(p,e),n=0;return new Iterator((function(){var e=r.next();return e.done?e:iteratorValue(t,n++,e.value,e)}))},createClass(ToSetSequence,SetSeq),ToSetSequence.prototype.has=function(t){return this._iter.includes(t)},ToSetSequence.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},ToSetSequence.prototype.__iterator=function(t,e){var r=this._iter.__iterator(p,e);return new Iterator((function(){var e=r.next();return e.done?e:iteratorValue(t,e.value,e.value,e)}))},createClass(FromEntriesSequence,KeyedSeq),FromEntriesSequence.prototype.entrySeq=function(){return this._iter.toSeq()},FromEntriesSequence.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){if(e){validateEntry(e);var n=isIterable(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},FromEntriesSequence.prototype.__iterator=function(t,e){var r=this._iter.__iterator(p,e);return new Iterator((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){validateEntry(n);var i=isIterable(n);return iteratorValue(t,i?n.get(0):n[0],i?n.get(1):n[1],e)}}}))},ToIndexedSequence.prototype.cacheResult=ToKeyedSequence.prototype.cacheResult=ToSetSequence.prototype.cacheResult=FromEntriesSequence.prototype.cacheResult=cacheResultThrough,createClass(Record,KeyedCollection),Record.prototype.toString=function(){return this.__toString(recordName(this)+\" {\",\"}\")},Record.prototype.has=function(t){return this._defaultValues.hasOwnProperty(t)},Record.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._defaultValues[t];return this._map?this._map.get(t,r):r},Record.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var t=this.constructor;return t._empty||(t._empty=makeRecord(this,emptyMap()))},Record.prototype.set=function(t,e){if(!this.has(t))throw new Error('Cannot set unknown key \"'+t+'\" on '+recordName(this));if(this._map&&!this._map.has(t)&&e===this._defaultValues[t])return this;var r=this._map&&this._map.set(t,e);return this.__ownerID||r===this._map?this:makeRecord(this,r)},Record.prototype.remove=function(t){if(!this.has(t))return this;var e=this._map&&this._map.remove(t);return this.__ownerID||e===this._map?this:makeRecord(this,e)},Record.prototype.wasAltered=function(){return this._map.wasAltered()},Record.prototype.__iterator=function(t,e){var r=this;return KeyedIterable(this._defaultValues).map((function(t,e){return r.get(e)})).__iterator(t,e)},Record.prototype.__iterate=function(t,e){var r=this;return KeyedIterable(this._defaultValues).map((function(t,e){return r.get(e)})).__iterate(t,e)},Record.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map&&this._map.__ensureOwner(t);return t?makeRecord(this,e,t):(this.__ownerID=t,this._map=e,this)};var rt=Record.prototype;function makeRecord(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._map=e,n.__ownerID=r,n}function recordName(t){return t._name||t.constructor.name||\"Record\"}function setProps(t,e){try{e.forEach(setProp.bind(void 0,t))}catch(t){}}function setProp(t,e){Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){invariant(this.__ownerID,\"Cannot set on an immutable record.\"),this.set(e,t)}})}function Set(t){return null==t?emptySet():isSet(t)&&!isOrdered(t)?t:emptySet().withMutations((function(e){var r=SetIterable(t);assertNotInfinite(r.size),r.forEach((function(t){return e.add(t)}))}))}function isSet(t){return!(!t||!t[it])}rt[o]=rt.remove,rt.deleteIn=rt.removeIn=V.removeIn,rt.merge=V.merge,rt.mergeWith=V.mergeWith,rt.mergeIn=V.mergeIn,rt.mergeDeep=V.mergeDeep,rt.mergeDeepWith=V.mergeDeepWith,rt.mergeDeepIn=V.mergeDeepIn,rt.setIn=V.setIn,rt.update=V.update,rt.updateIn=V.updateIn,rt.withMutations=V.withMutations,rt.asMutable=V.asMutable,rt.asImmutable=V.asImmutable,createClass(Set,SetCollection),Set.of=function(){return this(arguments)},Set.fromKeys=function(t){return this(KeyedIterable(t).keySeq())},Set.prototype.toString=function(){return this.__toString(\"Set {\",\"}\")},Set.prototype.has=function(t){return this._map.has(t)},Set.prototype.add=function(t){return updateSet(this,this._map.set(t,!0))},Set.prototype.remove=function(t){return updateSet(this,this._map.remove(t))},Set.prototype.clear=function(){return updateSet(this,this._map.clear())},Set.prototype.union=function(){var e=t.call(arguments,0);return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(t){for(var r=0;r<e.length;r++)SetIterable(e[r]).forEach((function(e){return t.add(e)}))})):this.constructor(e[0])},Set.prototype.intersect=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return SetIterable(t)}));var r=this;return this.withMutations((function(t){r.forEach((function(r){e.every((function(t){return t.includes(r)}))||t.remove(r)}))}))},Set.prototype.subtract=function(){var e=t.call(arguments,0);if(0===e.length)return this;e=e.map((function(t){return SetIterable(t)}));var r=this;return this.withMutations((function(t){r.forEach((function(r){e.some((function(t){return t.includes(r)}))&&t.remove(r)}))}))},Set.prototype.merge=function(){return this.union.apply(this,arguments)},Set.prototype.mergeWith=function(e){var r=t.call(arguments,1);return this.union.apply(this,r)},Set.prototype.sort=function(t){return OrderedSet(sortFactory(this,t))},Set.prototype.sortBy=function(t,e){return OrderedSet(sortFactory(this,e,t))},Set.prototype.wasAltered=function(){return this._map.wasAltered()},Set.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e,n){return t(n,n,r)}),e)},Set.prototype.__iterator=function(t,e){return this._map.map((function(t,e){return e})).__iterator(t,e)},Set.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):(this.__ownerID=t,this._map=e,this)},Set.isSet=isSet;var nt,it=\"@@__IMMUTABLE_SET__@@\",ot=Set.prototype;function updateSet(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function makeSet(t,e){var r=Object.create(ot);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function emptySet(){return nt||(nt=makeSet(emptyMap()))}function OrderedSet(t){return null==t?emptyOrderedSet():isOrderedSet(t)?t:emptyOrderedSet().withMutations((function(e){var r=SetIterable(t);assertNotInfinite(r.size),r.forEach((function(t){return e.add(t)}))}))}function isOrderedSet(t){return isSet(t)&&isOrdered(t)}ot[it]=!0,ot[o]=ot.remove,ot.mergeDeep=ot.merge,ot.mergeDeepWith=ot.mergeWith,ot.withMutations=V.withMutations,ot.asMutable=V.asMutable,ot.asImmutable=V.asImmutable,ot.__empty=emptySet,ot.__make=makeSet,createClass(OrderedSet,Set),OrderedSet.of=function(){return this(arguments)},OrderedSet.fromKeys=function(t){return this(KeyedIterable(t).keySeq())},OrderedSet.prototype.toString=function(){return this.__toString(\"OrderedSet {\",\"}\")},OrderedSet.isOrderedSet=isOrderedSet;var at,st=OrderedSet.prototype;function makeOrderedSet(t,e){var r=Object.create(st);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function emptyOrderedSet(){return at||(at=makeOrderedSet(emptyOrderedMap()))}function Stack(t){return null==t?emptyStack():isStack(t)?t:emptyStack().unshiftAll(t)}function isStack(t){return!(!t||!t[ct])}st[i]=!0,st.__empty=emptyOrderedSet,st.__make=makeOrderedSet,createClass(Stack,IndexedCollection),Stack.of=function(){return this(arguments)},Stack.prototype.toString=function(){return this.__toString(\"Stack [\",\"]\")},Stack.prototype.get=function(t,e){var r=this._head;for(t=wrapIndex(this,t);r&&t--;)r=r.next;return r?r.value:e},Stack.prototype.peek=function(){return this._head&&this._head.value},Stack.prototype.push=function(){if(0===arguments.length)return this;for(var t=this.size+arguments.length,e=this._head,r=arguments.length-1;r>=0;r--)e={value:arguments[r],next:e};return this.__ownerID?(this.size=t,this._head=e,this.__hash=void 0,this.__altered=!0,this):makeStack(t,e)},Stack.prototype.pushAll=function(t){if(0===(t=IndexedIterable(t)).size)return this;assertNotInfinite(t.size);var e=this.size,r=this._head;return t.reverse().forEach((function(t){e++,r={value:t,next:r}})),this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):makeStack(e,r)},Stack.prototype.pop=function(){return this.slice(1)},Stack.prototype.unshift=function(){return this.push.apply(this,arguments)},Stack.prototype.unshiftAll=function(t){return this.pushAll(t)},Stack.prototype.shift=function(){return this.pop.apply(this,arguments)},Stack.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):emptyStack()},Stack.prototype.slice=function(t,e){if(wholeSlice(t,e,this.size))return this;var r=resolveBegin(t,this.size);if(resolveEnd(e,this.size)!==this.size)return IndexedCollection.prototype.slice.call(this,t,e);for(var n=this.size-r,i=this._head;r--;)i=i.next;return this.__ownerID?(this.size=n,this._head=i,this.__hash=void 0,this.__altered=!0,this):makeStack(n,i)},Stack.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?makeStack(this.size,this._head,t,this.__hash):(this.__ownerID=t,this.__altered=!1,this)},Stack.prototype.__iterate=function(t,e){if(e)return this.reverse().__iterate(t);for(var r=0,n=this._head;n&&!1!==t(n.value,r++,this);)n=n.next;return r},Stack.prototype.__iterator=function(t,e){if(e)return this.reverse().__iterator(t);var r=0,n=this._head;return new Iterator((function(){if(n){var e=n.value;return n=n.next,iteratorValue(t,r++,e)}return iteratorDone()}))},Stack.isStack=isStack;var ut,ct=\"@@__IMMUTABLE_STACK__@@\",lt=Stack.prototype;function makeStack(t,e,r,n){var i=Object.create(lt);return i.size=t,i._head=e,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function emptyStack(){return ut||(ut=makeStack(0))}function mixin(t,e){var keyCopier=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(keyCopier),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(keyCopier),t}lt[ct]=!0,lt.withMutations=V.withMutations,lt.asMutable=V.asMutable,lt.asImmutable=V.asImmutable,lt.wasAltered=V.wasAltered,Iterable.Iterator=Iterator,mixin(Iterable,{toArray:function(){assertNotInfinite(this.size);var t=new Array(this.size||0);return this.valueSeq().__iterate((function(e,r){t[r]=e})),t},toIndexedSeq:function(){return new ToIndexedSequence(this)},toJS:function(){return this.toSeq().map((function(t){return t&&\"function\"==typeof t.toJS?t.toJS():t})).__toJS()},toJSON:function(){return this.toSeq().map((function(t){return t&&\"function\"==typeof t.toJSON?t.toJSON():t})).__toJS()},toKeyedSeq:function(){return new ToKeyedSequence(this,!0)},toMap:function(){return Map(this.toKeyedSeq())},toObject:function(){assertNotInfinite(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t},toOrderedMap:function(){return OrderedMap(this.toKeyedSeq())},toOrderedSet:function(){return OrderedSet(isKeyed(this)?this.valueSeq():this)},toSet:function(){return Set(isKeyed(this)?this.valueSeq():this)},toSetSeq:function(){return new ToSetSequence(this)},toSeq:function(){return isIndexed(this)?this.toIndexedSeq():isKeyed(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Stack(isKeyed(this)?this.valueSeq():this)},toList:function(){return List(isKeyed(this)?this.valueSeq():this)},toString:function(){return\"[Iterable]\"},__toString:function(t,e){return 0===this.size?t+e:t+\" \"+this.toSeq().map(this.__toStringMapper).join(\", \")+\" \"+e},concat:function(){return reify(this,concatFactory(this,t.call(arguments,0)))},includes:function(t){return this.some((function(e){return is(e,t)}))},entries:function(){return this.__iterator(d)},every:function(t,e){assertNotInfinite(this.size);var r=!0;return this.__iterate((function(n,i,o){if(!t.call(e,n,i,o))return r=!1,!1})),r},filter:function(t,e){return reify(this,filterFactory(this,t,e,!0))},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return assertNotInfinite(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){assertNotInfinite(this.size),t=void 0!==t?\"\"+t:\",\";var e=\"\",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():\"\"})),e},keys:function(){return this.__iterator(h)},map:function(t,e){return reify(this,mapFactory(this,t,e))},reduce:function(t,e,r){var n,i;return assertNotInfinite(this.size),arguments.length<2?i=!0:n=e,this.__iterate((function(e,o,a){i?(i=!1,n=e):n=t.call(r,n,e,o,a)})),n},reduceRight:function(t,e,r){var n=this.toKeyedSeq().reverse();return n.reduce.apply(n,arguments)},reverse:function(){return reify(this,reverseFactory(this,!0))},slice:function(t,e){return reify(this,sliceFactory(this,t,e,!0))},some:function(t,e){return!this.every(not(t),e)},sort:function(t){return reify(this,sortFactory(this,t))},values:function(){return this.__iterator(p)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return ensureSize(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return countByFactory(this,t,e)},equals:function(t){return deepEqual(this,t)},entrySeq:function(){var t=this;if(t._cache)return new ArraySeq(t._cache);var e=t.toSeq().map(entryMapper).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(not(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate((function(r,i,o){if(t.call(e,r,i,o))return n=[i,r],!1})),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(){return this.find(returnTrue)},flatMap:function(t,e){return reify(this,flatMapFactory(this,t,e))},flatten:function(t){return reify(this,flattenFactory(this,t,!0))},fromEntrySeq:function(){return new FromEntriesSequence(this)},get:function(t,e){return this.find((function(e,r){return is(r,t)}),void 0,e)},getIn:function(t,e){for(var r,n=this,i=forceIterator(t);!(r=i.next()).done;){var o=r.value;if((n=n&&n.get?n.get(o,c):c)===c)return e}return n},groupBy:function(t,e){return groupByFactory(this,t,e)},has:function(t){return this.get(t,c)!==c},hasIn:function(t){return this.getIn(t,c)!==c},isSubset:function(t){return t=\"function\"==typeof t.includes?t:Iterable(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t=\"function\"==typeof t.isSubset?t:Iterable(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return is(e,t)}))},keySeq:function(){return this.toSeq().map(keyMapper).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return maxFactory(this,t)},maxBy:function(t,e){return maxFactory(this,e,t)},min:function(t){return maxFactory(this,t?neg(t):defaultNegComparator)},minBy:function(t,e){return maxFactory(this,e?neg(e):defaultNegComparator,t)},rest:function(){return this.slice(1)},skip:function(t){return this.slice(Math.max(0,t))},skipLast:function(t){return reify(this,this.toSeq().reverse().skip(t).reverse())},skipWhile:function(t,e){return reify(this,skipWhileFactory(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(not(t),e)},sortBy:function(t,e){return reify(this,sortFactory(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return reify(this,this.toSeq().reverse().take(t).reverse())},takeWhile:function(t,e){return reify(this,takeWhileFactory(this,t,e))},takeUntil:function(t,e){return this.takeWhile(not(t),e)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=hashIterable(this))}});var ht=Iterable.prototype;ht[e]=!0,ht[m]=ht.values,ht.__toJS=ht.toArray,ht.__toStringMapper=quoteString,ht.inspect=ht.toSource=function(){return this.toString()},ht.chain=ht.flatMap,ht.contains=ht.includes,mixin(KeyedIterable,{flip:function(){return reify(this,flipFactory(this))},mapEntries:function(t,e){var r=this,n=0;return reify(this,this.toSeq().map((function(i,o){return t.call(e,[o,i],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return reify(this,this.toSeq().flip().map((function(n,i){return t.call(e,n,i,r)})).flip())}});var pt=KeyedIterable.prototype;function keyMapper(t,e){return e}function entryMapper(t,e){return[e,t]}function not(t){return function(){return!t.apply(this,arguments)}}function neg(t){return function(){return-t.apply(this,arguments)}}function quoteString(t){return\"string\"==typeof t?JSON.stringify(t):String(t)}function defaultZipper(){return arrCopy(arguments)}function defaultNegComparator(t,e){return t<e?1:t>e?-1:0}function hashIterable(t){if(t.size===1/0)return 0;var e=isOrdered(t),r=isKeyed(t),n=e?1:0;return murmurHashOfSize(t.__iterate(r?e?function(t,e){n=31*n+hashMerge(hash(t),hash(e))|0}:function(t,e){n=n+hashMerge(hash(t),hash(e))|0}:e?function(t){n=31*n+hash(t)|0}:function(t){n=n+hash(t)|0}),n)}function murmurHashOfSize(t,e){return e=I(e,3432918353),e=I(e<<15|e>>>-15,461845907),e=I(e<<13|e>>>-13,5),e=I((e=e+3864292196^t)^e>>>16,2246822507),e=smi((e=I(e^e>>>13,3266489909))^e>>>16)}function hashMerge(t,e){return t^e+2654435769+(t<<6)+(t>>2)}return pt[r]=!0,pt[m]=ht.entries,pt.__toJS=ht.toObject,pt.__toStringMapper=function(t,e){return JSON.stringify(e)+\": \"+quoteString(t)},mixin(IndexedIterable,{toKeyedSeq:function(){return new ToKeyedSequence(this,!1)},filter:function(t,e){return reify(this,filterFactory(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return reify(this,reverseFactory(this,!1))},slice:function(t,e){return reify(this,sliceFactory(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(0|e,0),0===r||2===r&&!e)return this;t=resolveBegin(t,t<0?this.count():this.size);var n=this.slice(0,t);return reify(this,1===r?n:n.concat(arrCopy(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(){return this.get(0)},flatten:function(t){return reify(this,flattenFactory(this,t,!1))},get:function(t,e){return(t=wrapIndex(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=wrapIndex(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return reify(this,interposeFactory(this,t))},interleave:function(){var t=[this].concat(arrCopy(arguments)),e=zipWithFactory(this.toSeq(),IndexedSeq.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),reify(this,r)},keySeq:function(){return Range(0,this.size)},last:function(){return this.get(-1)},skipWhile:function(t,e){return reify(this,skipWhileFactory(this,t,e,!1))},zip:function(){return reify(this,zipWithFactory(this,defaultZipper,[this].concat(arrCopy(arguments))))},zipWith:function(t){var e=arrCopy(arguments);return e[0]=this,reify(this,zipWithFactory(this,t,e))}}),IndexedIterable.prototype[n]=!0,IndexedIterable.prototype[i]=!0,mixin(SetIterable,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}}),SetIterable.prototype.has=ht.includes,SetIterable.prototype.contains=SetIterable.prototype.includes,mixin(KeyedSeq,KeyedIterable.prototype),mixin(IndexedSeq,IndexedIterable.prototype),mixin(SetSeq,SetIterable.prototype),mixin(KeyedCollection,KeyedIterable.prototype),mixin(IndexedCollection,IndexedIterable.prototype),mixin(SetCollection,SetIterable.prototype),{Iterable,Seq,Collection,Map,OrderedMap,List,Stack,Set,OrderedSet,Record,Range,Repeat,is,fromJS}}()},9447:(t,e,r)=>{\"use strict\";var n=r(8828);t.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9538:(t,e,r)=>{\"use strict\";var n=r(9447),i=r(1907),o=r(3930),a=r(8828),s=r(2875),u=r(7170),c=r(2574),f=r(9298),l=r(6946),h=Object.assign,p=Object.defineProperty,d=i([].concat);t.exports=!h||a((function(){if(n&&1!==h({b:1},h(p({},\"a\",{enumerable:!0,get:function(){p(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(\"assign detection\"),i=\"abcdefghijklmnopqrst\";return t[r]=7,i.split(\"\").forEach((function(t){e[t]=t})),7!==h({},t)[r]||s(h({},e)).join(\"\")!==i}))?function assign(t,e){for(var r=f(t),i=arguments.length,a=1,h=u.f,p=c.f;i>a;)for(var _,y=l(arguments[a++]),m=h?d(s(y),h(y)):s(y),g=m.length,v=0;g>v;)_=m[v++],n&&!o(p,y,_)||(r[_]=y[_]);return r}:h},9552:(t,e,r)=>{\"use strict\";var n=r(5951),i=r(6285),o=n.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},9698:t=>{var e=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\");t.exports=function hasUnicode(t){return e.test(t)}},9709:(t,e,r)=>{\"use strict\";var n=r(3034);t.exports=n},9724:(t,e,r)=>{\"use strict\";var n=r(1907),i=r(9298),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function hasOwn(t,e){return o(i(t),e)}},9748:(t,e,r)=>{\"use strict\";r(1340);var n=r(2046);t.exports=n.Object.assign},9770:t=>{t.exports=function arrayFilter(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}},9817:t=>{t.exports=function stackHas(t){return this.__data__.has(t)}},9846:(t,e,r)=>{\"use strict\";var n=r(798),i=r(8828),o=r(5951).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol(\"symbol detection\");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},9935:t=>{t.exports=function stubFalse(){return!1}}},e={};function __webpack_require__(r){var n=e[r];if(void 0!==n)return n.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,__webpack_require__),i.loaded=!0,i.exports}__webpack_require__.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return __webpack_require__.d(e,{a:e}),e},__webpack_require__.d=(t,e)=>{for(var r in e)__webpack_require__.o(e,r)&&!__webpack_require__.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},__webpack_require__.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),__webpack_require__.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),__webpack_require__.r=t=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};return(()=>{\"use strict\";__webpack_require__.d(r,{default:()=>ae});var t={};__webpack_require__.r(t),__webpack_require__.d(t,{TOGGLE_CONFIGS:()=>Qt,UPDATE_CONFIGS:()=>Jt,downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl,loaded:()=>loaded,toggle:()=>toggle,update:()=>update});var e={};__webpack_require__.r(e),__webpack_require__.d(e,{get:()=>get});var n=__webpack_require__(6540);class StandaloneLayout extends n.Component{render(){const{getComponent:t}=this.props,e=t(\"Container\"),r=t(\"Row\"),i=t(\"Col\"),o=t(\"Topbar\",!0),a=t(\"BaseLayout\",!0),s=t(\"onlineValidatorBadge\",!0);return n.createElement(e,{className:\"swagger-ui\"},o?n.createElement(o,null):null,n.createElement(a,null),n.createElement(r,null,n.createElement(i,null,n.createElement(s,null))))}}const i=StandaloneLayout,stadalone_layout=()=>({components:{StandaloneLayout:i}});var o=__webpack_require__(9404),a=__webpack_require__.n(o);__webpack_require__(4058),__webpack_require__(5808),__webpack_require__(104),__webpack_require__(7309),__webpack_require__(2426),__webpack_require__(5288),__webpack_require__(1882),__webpack_require__(2205),__webpack_require__(3209),__webpack_require__(2802);const s=function makeWindow(){var t={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return t;try{t=window;for(var e of[\"File\",\"Blob\",\"FormData\"])e in window&&(t[e]=window[e])}catch(t){console.error(t)}return t}();a().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");__webpack_require__(8287).Buffer;const parseSearch=()=>{const t=new URLSearchParams(s.location.search);return Object.fromEntries(t)};class TopBar extends n.Component{constructor(t,e){super(t,e),this.state={url:t.specSelectors.url(),selectedIndex:0}}UNSAFE_componentWillReceiveProps(t){this.setState({url:t.specSelectors.url()})}onUrlChange=t=>{let{target:{value:e}}=t;this.setState({url:e})};flushAuthData(){const{persistAuthorization:t}=this.props.getConfigs();t||this.props.authActions.restoreAuthorization({authorized:{}})}loadSpec=t=>{this.flushAuthData(),this.props.specActions.updateUrl(t),this.props.specActions.download(t)};onUrlSelect=t=>{let e=t.target.value||t.target.href;this.loadSpec(e),this.setSelectedUrl(e),t.preventDefault()};downloadUrl=t=>{this.loadSpec(this.state.url),t.preventDefault()};setSearch=t=>{let e=parseSearch();e[\"urls.primaryName\"]=t.name;const r=`${window.location.protocol}//${window.location.host}${window.location.pathname}`;window&&window.history&&window.history.pushState&&window.history.replaceState(null,\"\",`${r}?${(t=>{const e=new URLSearchParams(Object.entries(t));return String(e)})(e)}`)};setSelectedUrl=t=>{const e=this.props.getConfigs().urls||[];e&&e.length&&t&&e.forEach(((e,r)=>{e.url===t&&(this.setState({selectedIndex:r}),this.setSearch(e))}))};componentDidMount(){const t=this.props.getConfigs(),e=t.urls||[];if(e&&e.length){var r=this.state.selectedIndex;let n=parseSearch()[\"urls.primaryName\"]||t.urls.primaryName;n&&e.forEach(((t,e)=>{t.name===n&&(this.setState({selectedIndex:e}),r=e)})),this.loadSpec(e[r].url)}}onFilterChange=t=>{let{target:{value:e}}=t;this.props.layoutActions.updateFilter(e)};render(){let{getComponent:t,specSelectors:e,getConfigs:r}=this.props;const i=t(\"Button\"),o=t(\"Link\"),a=t(\"Logo\");let s=\"loading\"===e.loadingStatus();const u=[\"download-url-input\"];\"failed\"===e.loadingStatus()&&u.push(\"failed\"),s&&u.push(\"loading\");const{urls:c}=r();let f=[],l=null;if(c){let t=[];c.forEach(((e,r)=>{t.push(n.createElement(\"option\",{key:r,value:e.url},e.name))})),f.push(n.createElement(\"label\",{className:\"select-label\",htmlFor:\"select\"},n.createElement(\"span\",null,\"Select a definition\"),n.createElement(\"select\",{id:\"select\",disabled:s,onChange:this.onUrlSelect,value:c[this.state.selectedIndex].url},t)))}else l=this.downloadUrl,f.push(n.createElement(\"input\",{className:u.join(\" \"),type:\"text\",onChange:this.onUrlChange,value:this.state.url,disabled:s,id:\"download-url-input\"})),f.push(n.createElement(i,{className:\"download-url-button\",onClick:this.downloadUrl},\"Explore\"));return n.createElement(\"div\",{className:\"topbar\"},n.createElement(\"div\",{className:\"wrapper\"},n.createElement(\"div\",{className:\"topbar-wrapper\"},n.createElement(o,null,n.createElement(a,null)),n.createElement(\"form\",{className:\"download-url-wrapper\",onSubmit:l},f.map(((t,e)=>(0,n.cloneElement)(t,{key:e})))))))}}const u=TopBar;var c,f,l,h,p,d,_,y,m,g,v,b,w,I,x,B,k,C,q,L,j,z,P,D,U,W,V,K,$,H,Y,Z;function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_extends.apply(null,arguments)}const logo_small=t=>n.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 407 116\"},t),c||(c=n.createElement(\"defs\",null,n.createElement(\"clipPath\",{id:\"logo_small_svg__clip-SW_TM-logo-on-dark\"},n.createElement(\"path\",{d:\"M0 0h407v116H0z\"})),n.createElement(\"style\",null,\".logo_small_svg__cls-2{fill:#fff}.logo_small_svg__cls-3{fill:#85ea2d}\"))),n.createElement(\"g\",{id:\"logo_small_svg__SW_TM-logo-on-dark\",style:{clipPath:\"url(#logo_small_svg__clip-SW_TM-logo-on-dark)\"}},n.createElement(\"g\",{id:\"logo_small_svg__SW_In-Product\",transform:\"translate(-.301)\"},f||(f=n.createElement(\"path\",{id:\"logo_small_svg__Path_2936\",d:\"M359.15 70.674h-.7v-3.682h-1.26v-.6h3.219v.6h-1.259Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2936\"})),l||(l=n.createElement(\"path\",{id:\"logo_small_svg__Path_2937\",d:\"m363.217 70.674-1.242-3.574h-.023q.05.8.05 1.494v2.083h-.636v-4.286h.987l1.19 3.407h.017l1.225-3.407h.99v4.283h-.675v-2.118a30 30 0 0 1 .044-1.453h-.023l-1.286 3.571Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2937\"})),h||(h=n.createElement(\"path\",{id:\"logo_small_svg__Path_2938\",d:\"M50.328 97.669a47.642 47.642 0 1 1 47.643-47.642 47.64 47.64 0 0 1-47.643 47.642\",className:\"logo_small_svg__cls-3\",\"data-name\":\"Path 2938\"})),p||(p=n.createElement(\"path\",{id:\"logo_small_svg__Path_2939\",d:\"M50.328 4.769A45.258 45.258 0 1 1 5.07 50.027 45.26 45.26 0 0 1 50.328 4.769m0-4.769a50.027 50.027 0 1 0 50.027 50.027A50.027 50.027 0 0 0 50.328 0\",className:\"logo_small_svg__cls-3\",\"data-name\":\"Path 2939\"})),n.createElement(\"path\",{id:\"logo_small_svg__Path_2940\",d:\"M31.8 33.854c-.154 1.712.058 3.482-.057 5.213a43 43 0 0 1-.693 5.156 9.53 9.53 0 0 1-4.1 5.829c4.079 2.654 4.54 6.771 4.81 10.946.135 2.25.077 4.52.308 6.752.173 1.731.846 2.174 2.636 2.231.73.02 1.48 0 2.327 0v5.349c-5.29.9-9.657-.6-10.734-5.079a31 31 0 0 1-.654-5c-.117-1.789.076-3.578-.058-5.367-.386-4.906-1.02-6.56-5.713-6.791v-6.1a9 9 0 0 1 1.028-.173c2.577-.135 3.674-.924 4.231-3.463a29 29 0 0 0 .481-4.329 82 82 0 0 1 .6-8.406c.673-3.982 3.136-5.906 7.234-6.137 1.154-.057 2.327 0 3.655 0v5.464c-.558.038-1.039.115-1.539.115-3.336-.115-3.51 1.02-3.762 3.79m6.406 12.658h-.077a3.515 3.515 0 1 0-.346 7.021h.231a3.46 3.46 0 0 0 3.655-3.251v-.192a3.523 3.523 0 0 0-3.461-3.578Zm12.062 0a3.373 3.373 0 0 0-3.482 3.251 2 2 0 0 0 .02.327 3.3 3.3 0 0 0 3.578 3.443 3.263 3.263 0 0 0 3.443-3.558 3.308 3.308 0 0 0-3.557-3.463Zm12.351 0a3.59 3.59 0 0 0-3.655 3.482 3.53 3.53 0 0 0 3.536 3.539h.039c1.769.309 3.559-1.4 3.674-3.462a3.57 3.57 0 0 0-3.6-3.559Zm16.948.288c-2.232-.1-3.348-.846-3.9-2.962a21.5 21.5 0 0 1-.635-4.136c-.154-2.578-.135-5.175-.308-7.753-.4-6.117-4.828-8.252-11.254-7.195v5.31c1.019 0 1.808 0 2.6.019 1.366.019 2.4.539 2.539 2.059.135 1.385.135 2.789.27 4.193.269 2.79.422 5.618.9 8.369a8.72 8.72 0 0 0 3.921 5.348c-3.4 2.289-4.406 5.559-4.578 9.234-.1 2.52-.154 5.059-.289 7.6-.115 2.308-.923 3.058-3.251 3.116-.654.019-1.289.077-2.019.115v5.445c1.365 0 2.616.077 3.866 0 3.886-.231 6.233-2.117 7-5.887A49 49 0 0 0 75 63.4c.135-1.923.116-3.866.308-5.771.289-2.982 1.655-4.213 4.636-4.4a4 4 0 0 0 .828-.192v-6.1c-.5-.058-.843-.115-1.208-.135Z\",\"data-name\":\"Path 2940\",style:{fill:\"#173647\"}}),d||(d=n.createElement(\"path\",{id:\"logo_small_svg__Path_2941\",d:\"M152.273 58.122a11.23 11.23 0 0 1-4.384 9.424q-4.383 3.382-11.9 3.382-8.14 0-12.524-2.1V63.7a33 33 0 0 0 6.137 1.879 32.3 32.3 0 0 0 6.575.689q5.322 0 8.015-2.02a6.63 6.63 0 0 0 2.692-5.62 7.2 7.2 0 0 0-.954-3.9 8.9 8.9 0 0 0-3.194-2.8 44.6 44.6 0 0 0-6.81-2.911q-6.387-2.286-9.126-5.417a11.96 11.96 0 0 1-2.74-8.172A10.16 10.16 0 0 1 128.039 27q3.977-3.131 10.52-3.131a31 31 0 0 1 12.555 2.5L149.455 31a28.4 28.4 0 0 0-11.021-2.38 10.67 10.67 0 0 0-6.606 1.816 5.98 5.98 0 0 0-2.38 5.041 7.7 7.7 0 0 0 .877 3.9 8.24 8.24 0 0 0 2.959 2.786 36.7 36.7 0 0 0 6.371 2.8q7.2 2.566 9.91 5.51a10.84 10.84 0 0 1 2.708 7.649\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2941\"})),_||(_=n.createElement(\"path\",{id:\"logo_small_svg__Path_2942\",d:\"M185.288 70.3 179 50.17q-.594-1.848-2.222-8.391h-.251q-1.252 5.479-2.192 8.453L167.849 70.3h-6.011l-9.361-34.315h5.447q3.318 12.931 5.057 19.693a80 80 0 0 1 1.988 9.111h.25q.345-1.785 1.112-4.618t1.33-4.493l6.294-19.693h5.635l6.137 19.693a66 66 0 0 1 2.379 9.048h.251a33 33 0 0 1 .673-3.475q.548-2.347 6.528-25.266h5.385L191.456 70.3Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2942\"})),y||(y=n.createElement(\"path\",{id:\"logo_small_svg__Path_2943\",d:\"m225.115 70.3-1.033-4.885h-.25a14.45 14.45 0 0 1-5.119 4.368 15.6 15.6 0 0 1-6.372 1.143q-5.1 0-8-2.63t-2.9-7.483q0-10.4 16.626-10.9l5.823-.188V47.6q0-4.038-1.738-5.964t-5.552-1.923a22.6 22.6 0 0 0-9.706 2.63l-1.6-3.977a24.4 24.4 0 0 1 5.557-2.16 24 24 0 0 1 6.058-.783q6.136 0 9.1 2.724t2.959 8.735V70.3Zm-11.741-3.663a10.55 10.55 0 0 0 7.626-2.66 9.85 9.85 0 0 0 2.771-7.451v-3.1l-5.2.219q-6.2.219-8.939 1.926a5.8 5.8 0 0 0-2.74 5.306 5.35 5.35 0 0 0 1.707 4.29 7.08 7.08 0 0 0 4.775 1.472Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2943\"})),m||(m=n.createElement(\"path\",{id:\"logo_small_svg__Path_2944\",d:\"M264.6 35.987v3.287l-6.356.752a11.16 11.16 0 0 1 2.255 6.856 10.15 10.15 0 0 1-3.444 8.047q-3.444 3-9.456 3a15.7 15.7 0 0 1-2.88-.25Q241.4 59.438 241.4 62.1a2.24 2.24 0 0 0 1.159 2.082 8.46 8.46 0 0 0 3.976.673h6.074q5.573 0 8.563 2.348a8.16 8.16 0 0 1 2.99 6.825 9.74 9.74 0 0 1-4.571 8.688q-4.572 2.989-13.338 2.99-6.732 0-10.379-2.5a8.09 8.09 0 0 1-3.647-7.076 7.95 7.95 0 0 1 2-5.417 10.2 10.2 0 0 1 5.636-3.1 5.43 5.43 0 0 1-2.207-1.847 4.9 4.9 0 0 1-.893-2.912 5.53 5.53 0 0 1 1-3.288 10.5 10.5 0 0 1 3.162-2.723 9.28 9.28 0 0 1-4.336-3.726 10.95 10.95 0 0 1-1.675-6.012q0-5.634 3.382-8.688t9.58-3.052a17.4 17.4 0 0 1 4.853.626Zm-27.367 40.075a4.66 4.66 0 0 0 2.348 4.227 12.97 12.97 0 0 0 6.732 1.44q6.543 0 9.69-1.956a5.99 5.99 0 0 0 3.147-5.307q0-2.787-1.723-3.867t-6.481-1.08h-6.23a8.2 8.2 0 0 0-5.51 1.69 6.04 6.04 0 0 0-1.973 4.853m2.818-29.086a6.98 6.98 0 0 0 2.035 5.448 8.12 8.12 0 0 0 5.667 1.847q7.608 0 7.608-7.389 0-7.733-7.7-7.733a7.63 7.63 0 0 0-5.635 1.972q-1.976 1.973-1.975 5.855\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2944\"})),g||(g=n.createElement(\"path\",{id:\"logo_small_svg__Path_2945\",d:\"M299.136 35.987v3.287l-6.356.752a11.17 11.17 0 0 1 2.254 6.856 10.15 10.15 0 0 1-3.444 8.047q-3.444 3-9.455 3a15.7 15.7 0 0 1-2.88-.25q-3.32 1.754-3.319 4.415a2.24 2.24 0 0 0 1.158 2.082 8.46 8.46 0 0 0 3.976.673h6.074q5.574 0 8.563 2.348a8.16 8.16 0 0 1 2.99 6.825 9.74 9.74 0 0 1-4.571 8.688q-4.57 2.989-13.337 2.99-6.732 0-10.379-2.5a8.09 8.09 0 0 1-3.648-7.076 7.95 7.95 0 0 1 2-5.417 10.2 10.2 0 0 1 5.636-3.1 5.43 5.43 0 0 1-2.208-1.847 4.9 4.9 0 0 1-.892-2.912 5.53 5.53 0 0 1 1-3.288 10.5 10.5 0 0 1 3.162-2.723 9.27 9.27 0 0 1-4.336-3.726 10.95 10.95 0 0 1-1.675-6.012q0-5.634 3.381-8.688t9.581-3.052a17.4 17.4 0 0 1 4.853.626Zm-27.364 40.075a4.66 4.66 0 0 0 2.348 4.227 12.97 12.97 0 0 0 6.731 1.44q6.544 0 9.691-1.956a5.99 5.99 0 0 0 3.146-5.307q0-2.787-1.722-3.867t-6.481-1.08h-6.23a8.2 8.2 0 0 0-5.511 1.69 6.04 6.04 0 0 0-1.972 4.853m2.818-29.086a6.98 6.98 0 0 0 2.035 5.448 8.12 8.12 0 0 0 5.667 1.847q7.607 0 7.608-7.389 0-7.733-7.7-7.733a7.63 7.63 0 0 0-5.635 1.972q-1.975 1.973-1.975 5.855\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2945\"})),v||(v=n.createElement(\"path\",{id:\"logo_small_svg__Path_2946\",d:\"M316.778 70.928q-7.608 0-12.007-4.634t-4.4-12.868q0-8.3 4.086-13.181a13.57 13.57 0 0 1 10.974-4.884 12.94 12.94 0 0 1 10.207 4.239q3.762 4.247 3.762 11.2v3.287h-23.643q.156 6.044 3.053 9.174t8.156 3.131a27.6 27.6 0 0 0 10.958-2.317v4.634a27.5 27.5 0 0 1-5.213 1.706 29.3 29.3 0 0 1-5.933.513m-1.409-31.215a8.49 8.49 0 0 0-6.591 2.692 12.4 12.4 0 0 0-2.9 7.452h17.94q0-4.916-2.191-7.53a7.71 7.71 0 0 0-6.258-2.614\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2946\"})),b||(b=n.createElement(\"path\",{id:\"logo_small_svg__Path_2947\",d:\"M350.9 35.361a20.4 20.4 0 0 1 4.1.375l-.721 4.822a17.7 17.7 0 0 0-3.757-.47 9.14 9.14 0 0 0-7.122 3.382 12.33 12.33 0 0 0-2.959 8.422V70.3h-5.2V35.987h4.29l.6 6.356h.25a15.1 15.1 0 0 1 4.6-5.166 10.36 10.36 0 0 1 5.919-1.816\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2947\"})),w||(w=n.createElement(\"path\",{id:\"logo_small_svg__Path_2948\",d:\"M255.857 96.638s-3.43-.391-4.85-.391c-2.058 0-3.111.735-3.111 2.18 0 1.568.882 1.935 3.748 2.719 3.527.98 4.8 1.911 4.8 4.777 0 3.675-2.3 5.267-5.61 5.267a36 36 0 0 1-5.487-.662l.27-2.18s3.306.441 5.046.441c2.082 0 3.037-.931 3.037-2.7 0-1.421-.759-1.91-3.331-2.523-3.626-.93-5.193-2.033-5.193-4.948 0-3.381 2.229-4.776 5.585-4.776a37 37 0 0 1 5.315.587Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2948\"})),I||(I=n.createElement(\"path\",{id:\"logo_small_svg__Path_2949\",d:\"M262.967 94.14h4.733l3.748 13.106L275.2 94.14h4.752v16.78H277.2v-14.5h-.145l-4.191 13.816h-2.842l-4.191-13.816h-.145v14.5h-2.719Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2949\"})),x||(x=n.createElement(\"path\",{id:\"logo_small_svg__Path_2950\",d:\"M322.057 94.14H334.3v2.425h-4.728v14.355h-2.743V96.565h-4.777Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2950\"})),B||(B=n.createElement(\"path\",{id:\"logo_small_svg__Path_2951\",d:\"M346.137 94.14c3.332 0 5.12 1.249 5.12 4.361 0 2.033-.637 3.037-1.984 3.772 1.445.563 2.4 1.592 2.4 3.9 0 3.43-2.081 4.752-5.339 4.752h-6.566V94.14Zm-3.65 2.352v4.8h3.6c1.666 0 2.4-.832 2.4-2.474 0-1.617-.833-2.327-2.5-2.327Zm0 7.1v4.973h3.7c1.689 0 2.694-.539 2.694-2.548 0-1.911-1.421-2.425-2.744-2.425Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2951\"})),k||(k=n.createElement(\"path\",{id:\"logo_small_svg__Path_2952\",d:\"M358.414 94.14H369v2.377h-7.864v4.751h6.394v2.332h-6.394v4.924H369v2.4h-10.586Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2952\"})),C||(C=n.createElement(\"path\",{id:\"logo_small_svg__Path_2953\",d:\"M378.747 94.14h5.414l4.164 16.78h-2.744l-1.239-4.92h-5.777l-1.239 4.923h-2.719Zm.361 9.456h4.708l-1.737-7.178h-1.225Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2953\"})),q||(q=n.createElement(\"path\",{id:\"logo_small_svg__Path_2954\",d:\"M397.1 105.947v4.973h-2.719V94.14h6.37c3.7 0 5.683 2.12 5.683 5.843 0 2.376-.956 4.519-2.744 5.352l2.769 5.585h-2.989l-2.426-4.973Zm3.651-9.455H397.1v7.1h3.7c2.057 0 2.841-1.85 2.841-3.589 0-1.9-.934-3.511-2.894-3.511Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2954\"})),L||(L=n.createElement(\"path\",{id:\"logo_small_svg__Path_2955\",d:\"M290.013 94.14h5.413l4.164 16.78h-2.743l-1.239-4.92h-5.777l-1.239 4.923h-2.719Zm.361 9.456h4.707l-1.737-7.178h-1.225Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2955\"})),j||(j=n.createElement(\"path\",{id:\"logo_small_svg__Path_2956\",d:\"M308.362 105.947v4.973h-2.719V94.14h6.369c3.7 0 5.683 2.12 5.683 5.843 0 2.376-.955 4.519-2.743 5.352l2.768 5.585h-2.989l-2.425-4.973Zm3.65-9.455h-3.65v7.1h3.7c2.058 0 2.841-1.85 2.841-3.589-.003-1.903-.931-3.511-2.891-3.511\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2956\"})),z||(z=n.createElement(\"path\",{id:\"logo_small_svg__Path_2957\",d:\"M130.606 107.643a3.02 3.02 0 0 1-1.18 2.537 5.1 5.1 0 0 1-3.2.91 8 8 0 0 1-3.371-.564v-1.383a9 9 0 0 0 1.652.506 8.7 8.7 0 0 0 1.77.186 3.57 3.57 0 0 0 2.157-.544 1.78 1.78 0 0 0 .725-1.512 1.95 1.95 0 0 0-.257-1.05 2.4 2.4 0 0 0-.86-.754 12 12 0 0 0-1.833-.784 5.84 5.84 0 0 1-2.456-1.458 3.2 3.2 0 0 1-.738-2.2 2.74 2.74 0 0 1 1.071-2.267 4.44 4.44 0 0 1 2.831-.843 8.3 8.3 0 0 1 3.38.675l-.447 1.247a7.6 7.6 0 0 0-2.966-.641 2.88 2.88 0 0 0-1.779.489 1.61 1.61 0 0 0-.64 1.357 2.1 2.1 0 0 0 .236 1.049 2.2 2.2 0 0 0 .8.75 10 10 0 0 0 1.715.754 6.8 6.8 0 0 1 2.667 1.483 2.92 2.92 0 0 1 .723 2.057\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2957\"})),P||(P=n.createElement(\"path\",{id:\"logo_small_svg__Path_2958\",d:\"M134.447 101.686v5.991a2.4 2.4 0 0 0 .515 1.686 2.1 2.1 0 0 0 1.609.556 2.63 2.63 0 0 0 2.12-.792 4 4 0 0 0 .67-2.587v-4.854h1.4v9.236H139.6l-.2-1.239h-.075a2.8 2.8 0 0 1-1.193 1.045 4 4 0 0 1-1.74.362 3.53 3.53 0 0 1-2.524-.8 3.4 3.4 0 0 1-.839-2.562v-6.042Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2958\"})),D||(D=n.createElement(\"path\",{id:\"logo_small_svg__Path_2959\",d:\"M148.206 111.09a4 4 0 0 1-1.647-.333 3.1 3.1 0 0 1-1.252-1.023h-.1a12 12 0 0 1 .1 1.533v3.8h-1.4v-13.381h1.137l.194 1.264h.067a3.26 3.26 0 0 1 1.256-1.1 3.8 3.8 0 0 1 1.643-.337 3.41 3.41 0 0 1 2.836 1.256 6.68 6.68 0 0 1-.017 7.057 3.42 3.42 0 0 1-2.817 1.264m-.2-8.385a2.48 2.48 0 0 0-2.048.784 4.04 4.04 0 0 0-.649 2.494v.312a4.63 4.63 0 0 0 .649 2.785 2.47 2.47 0 0 0 2.082.839 2.16 2.16 0 0 0 1.875-.969 4.6 4.6 0 0 0 .678-2.671 4.43 4.43 0 0 0-.678-2.651 2.23 2.23 0 0 0-1.915-.923Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2959\"})),U||(U=n.createElement(\"path\",{id:\"logo_small_svg__Path_2960\",d:\"M159.039 111.09a4 4 0 0 1-1.647-.333 3.1 3.1 0 0 1-1.252-1.023h-.1a12 12 0 0 1 .1 1.533v3.8h-1.4v-13.381h1.137l.194 1.264h.067a3.26 3.26 0 0 1 1.256-1.1 3.8 3.8 0 0 1 1.643-.337 3.41 3.41 0 0 1 2.836 1.256 6.68 6.68 0 0 1-.017 7.057 3.42 3.42 0 0 1-2.817 1.264m-.2-8.385a2.48 2.48 0 0 0-2.048.784 4.04 4.04 0 0 0-.649 2.494v.312a4.63 4.63 0 0 0 .649 2.785 2.47 2.47 0 0 0 2.082.839 2.16 2.16 0 0 0 1.875-.969 4.6 4.6 0 0 0 .678-2.671 4.43 4.43 0 0 0-.678-2.651 2.23 2.23 0 0 0-1.911-.923Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2960\"})),W||(W=n.createElement(\"path\",{id:\"logo_small_svg__Path_2961\",d:\"M173.612 106.3a5.1 5.1 0 0 1-1.137 3.527 4 4 0 0 1-3.143 1.268 4.17 4.17 0 0 1-2.2-.581 3.84 3.84 0 0 1-1.483-1.669 5.8 5.8 0 0 1-.522-2.545 5.1 5.1 0 0 1 1.129-3.518 4 4 0 0 1 3.135-1.26 3.9 3.9 0 0 1 3.08 1.29 5.07 5.07 0 0 1 1.141 3.488m-7.036 0a4.4 4.4 0 0 0 .708 2.7 2.81 2.81 0 0 0 4.167 0 4.37 4.37 0 0 0 .712-2.7 4.3 4.3 0 0 0-.712-2.675 2.5 2.5 0 0 0-2.1-.915 2.46 2.46 0 0 0-2.072.9 4.33 4.33 0 0 0-.7 2.69Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2961\"})),V||(V=n.createElement(\"path\",{id:\"logo_small_svg__Path_2962\",d:\"M180.525 101.517a5.5 5.5 0 0 1 1.1.1l-.194 1.3a4.8 4.8 0 0 0-1.011-.127 2.46 2.46 0 0 0-1.917.911 3.32 3.32 0 0 0-.8 2.267v4.955h-1.4v-9.236h1.154l.16 1.71h.068a4.05 4.05 0 0 1 1.238-1.39 2.8 2.8 0 0 1 1.6-.49Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2962\"})),K||(K=n.createElement(\"path\",{id:\"logo_small_svg__Path_2963\",d:\"M187.363 109.936a4.5 4.5 0 0 0 .716-.055 4 4 0 0 0 .548-.114v1.07a2.5 2.5 0 0 1-.67.181 5 5 0 0 1-.8.072q-2.68 0-2.68-2.823v-5.494h-1.323v-.673l1.323-.582.59-1.972h.809v2.141h2.68v1.087h-2.68v5.435a1.87 1.87 0 0 0 .4 1.281 1.38 1.38 0 0 0 1.087.446\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2963\"})),$||($=n.createElement(\"path\",{id:\"logo_small_svg__Path_2964\",d:\"M194.538 111.09a4.24 4.24 0 0 1-3.231-1.247 4.82 4.82 0 0 1-1.184-3.463 5.36 5.36 0 0 1 1.1-3.548 3.65 3.65 0 0 1 2.954-1.315 3.48 3.48 0 0 1 2.747 1.142 4.38 4.38 0 0 1 1.011 3.013v.885h-6.362a3.66 3.66 0 0 0 .822 2.469 2.84 2.84 0 0 0 2.2.843 7.4 7.4 0 0 0 2.949-.624v1.247a7.4 7.4 0 0 1-1.4.459 8 8 0 0 1-1.6.139Zm-.379-8.4a2.29 2.29 0 0 0-1.774.725 3.34 3.34 0 0 0-.779 2.006h4.828a3.07 3.07 0 0 0-.59-2.027 2.08 2.08 0 0 0-1.685-.706Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2964\"})),H||(H=n.createElement(\"path\",{id:\"logo_small_svg__Path_2965\",d:\"M206.951 109.683h-.076a3.29 3.29 0 0 1-2.9 1.407 3.43 3.43 0 0 1-2.819-1.239 5.45 5.45 0 0 1-1.006-3.522 5.54 5.54 0 0 1 1.011-3.548 3.4 3.4 0 0 1 2.814-1.264 3.36 3.36 0 0 1 2.883 1.365h.109l-.059-.665-.034-.649v-3.759h1.4v13.113h-1.138Zm-2.8.236a2.55 2.55 0 0 0 2.078-.779 3.95 3.95 0 0 0 .644-2.516v-.3a4.64 4.64 0 0 0-.653-2.8 2.48 2.48 0 0 0-2.086-.839 2.14 2.14 0 0 0-1.883.957 4.76 4.76 0 0 0-.653 2.7 4.55 4.55 0 0 0 .649 2.671 2.2 2.2 0 0 0 1.906.906Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2965\"})),Y||(Y=n.createElement(\"path\",{id:\"logo_small_svg__Path_2966\",d:\"M220.712 101.534a3.44 3.44 0 0 1 2.827 1.243 6.65 6.65 0 0 1-.009 7.053 3.42 3.42 0 0 1-2.818 1.26 4 4 0 0 1-1.648-.333 3.1 3.1 0 0 1-1.251-1.023h-.1l-.295 1.188h-1V97.809h1.4V101q0 1.069-.068 1.921h.068a3.32 3.32 0 0 1 2.894-1.387m-.2 1.171a2.44 2.44 0 0 0-2.064.822 6.34 6.34 0 0 0 .017 5.553 2.46 2.46 0 0 0 2.081.839 2.16 2.16 0 0 0 1.922-.94 4.83 4.83 0 0 0 .632-2.7 4.64 4.64 0 0 0-.632-2.689 2.24 2.24 0 0 0-1.959-.885Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2966\"})),Z||(Z=n.createElement(\"path\",{id:\"logo_small_svg__Path_2967\",d:\"M225.758 101.686h1.5l2.023 5.267a20 20 0 0 1 .826 2.6h.067q.109-.431.459-1.471t2.288-6.4h1.5l-3.969 10.518a5.25 5.25 0 0 1-1.378 2.212 2.93 2.93 0 0 1-1.934.653 5.7 5.7 0 0 1-1.264-.143V113.8a5 5 0 0 0 1.037.1 2.136 2.136 0 0 0 2.056-1.618l.514-1.314Z\",className:\"logo_small_svg__cls-2\",\"data-name\":\"Path 2967\"}))))),components_Logo=()=>n.createElement(logo_small,{height:\"40\"}),top_bar=()=>({components:{Topbar:u,Logo:components_Logo}});function isNothing(t){return null==t}var J={isNothing,isObject:function js_yaml_isObject(t){return\"object\"==typeof t&&null!==t},toArray:function toArray(t){return Array.isArray(t)?t:isNothing(t)?[]:[t]},repeat:function repeat(t,e){var r,n=\"\";for(r=0;r<e;r+=1)n+=t;return n},isNegativeZero:function isNegativeZero(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t},extend:function extend(t,e){var r,n,i,o;if(e)for(r=0,n=(o=Object.keys(e)).length;r<n;r+=1)t[i=o[r]]=e[i];return t}};function formatError(t,e){var r=\"\",n=t.reason||\"(unknown reason)\";return t.mark?(t.mark.name&&(r+='in \"'+t.mark.name+'\" '),r+=\"(\"+(t.mark.line+1)+\":\"+(t.mark.column+1)+\")\",!e&&t.mark.snippet&&(r+=\"\\n\\n\"+t.mark.snippet),n+\" \"+r):n}function YAMLException$1(t,e){Error.call(this),this.name=\"YAMLException\",this.reason=t,this.mark=e,this.message=formatError(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||\"\"}YAMLException$1.prototype=Object.create(Error.prototype),YAMLException$1.prototype.constructor=YAMLException$1,YAMLException$1.prototype.toString=function toString(t){return this.name+\": \"+formatError(this,t)};var tt=YAMLException$1;function getLine(t,e,r,n,i){var o=\"\",a=\"\",s=Math.floor(i/2)-1;return n-e>s&&(e=n-s+(o=\" ... \").length),r-n>s&&(r=n+s-(a=\" ...\").length),{str:o+t.slice(e,r).replace(/\\t/g,\"→\")+a,pos:n-e+o.length}}function padStart(t,e){return J.repeat(\" \",e-t.length)+t}var et=function makeSnippet(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),\"number\"!=typeof e.indent&&(e.indent=1),\"number\"!=typeof e.linesBefore&&(e.linesBefore=3),\"number\"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,n=/\\r?\\n|\\r|\\0/g,i=[0],o=[],a=-1;r=n.exec(t.buffer);)o.push(r.index),i.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var s,u,c=\"\",f=Math.min(t.line+e.linesAfter,o.length).toString().length,l=e.maxLength-(e.indent+f+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)u=getLine(t.buffer,i[a-s],o[a-s],t.position-(i[a]-i[a-s]),l),c=J.repeat(\" \",e.indent)+padStart((t.line-s+1).toString(),f)+\" | \"+u.str+\"\\n\"+c;for(u=getLine(t.buffer,i[a],o[a],t.position,l),c+=J.repeat(\" \",e.indent)+padStart((t.line+1).toString(),f)+\" | \"+u.str+\"\\n\",c+=J.repeat(\"-\",e.indent+f+3+u.pos)+\"^\\n\",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)u=getLine(t.buffer,i[a+s],o[a+s],t.position-(i[a]-i[a+s]),l),c+=J.repeat(\" \",e.indent)+padStart((t.line+s+1).toString(),f)+\" | \"+u.str+\"\\n\";return c.replace(/\\n$/,\"\")},rt=[\"kind\",\"multi\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"representName\",\"defaultStyle\",\"styleAliases\"],nt=[\"scalar\",\"sequence\",\"mapping\"];var it=function Type$1(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===rt.indexOf(e))throw new tt('Unknown option \"'+e+'\" is met in definition of \"'+t+'\" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=function compileStyleAliases(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}(e.styleAliases||null),-1===nt.indexOf(this.kind))throw new tt('Unknown kind \"'+this.kind+'\" is specified for \"'+t+'\" YAML type.')};function compileList(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,n){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=n)})),r[e]=t})),r}function Schema$1(t){return this.extend(t)}Schema$1.prototype.extend=function extend(t){var e=[],r=[];if(t instanceof it)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new tt(\"Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })\");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof it))throw new tt(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");if(t.loadKind&&\"scalar\"!==t.loadKind)throw new tt(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\");if(t.multi)throw new tt(\"There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.\")})),r.forEach((function(t){if(!(t instanceof it))throw new tt(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\")}));var n=Object.create(Schema$1.prototype);return n.implicit=(this.implicit||[]).concat(e),n.explicit=(this.explicit||[]).concat(r),n.compiledImplicit=compileList(n,\"implicit\"),n.compiledExplicit=compileList(n,\"explicit\"),n.compiledTypeMap=function compileMap(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function collectType(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for(t=0,e=arguments.length;t<e;t+=1)arguments[t].forEach(collectType);return r}(n.compiledImplicit,n.compiledExplicit),n};var ot=Schema$1,at=new it(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(t){return null!==t?t:\"\"}}),st=new it(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(t){return null!==t?t:[]}}),ut=new it(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(t){return null!==t?t:{}}}),ct=new ot({explicit:[at,st,ut]});var lt=new it(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:function resolveYamlNull(t){if(null===t)return!0;var e=t.length;return 1===e&&\"~\"===t||4===e&&(\"null\"===t||\"Null\"===t||\"NULL\"===t)},construct:function constructYamlNull(){return null},predicate:function isNull(t){return null===t},represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"},empty:function(){return\"\"}},defaultStyle:\"lowercase\"});var ht=new it(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:function resolveYamlBoolean(t){if(null===t)return!1;var e=t.length;return 4===e&&(\"true\"===t||\"True\"===t||\"TRUE\"===t)||5===e&&(\"false\"===t||\"False\"===t||\"FALSE\"===t)},construct:function constructYamlBoolean(t){return\"true\"===t||\"True\"===t||\"TRUE\"===t},predicate:function isBoolean(t){return\"[object Boolean]\"===Object.prototype.toString.call(t)},represent:{lowercase:function(t){return t?\"true\":\"false\"},uppercase:function(t){return t?\"TRUE\":\"FALSE\"},camelcase:function(t){return t?\"True\":\"False\"}},defaultStyle:\"lowercase\"});function isOctCode(t){return 48<=t&&t<=55}function isDecCode(t){return 48<=t&&t<=57}var pt=new it(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:function resolveYamlInteger(t){if(null===t)return!1;var e,r,n=t.length,i=0,o=!1;if(!n)return!1;if(\"-\"!==(e=t[i])&&\"+\"!==e||(e=t[++i]),\"0\"===e){if(i+1===n)return!0;if(\"b\"===(e=t[++i])){for(i++;i<n;i++)if(\"_\"!==(e=t[i])){if(\"0\"!==e&&\"1\"!==e)return!1;o=!0}return o&&\"_\"!==e}if(\"x\"===e){for(i++;i<n;i++)if(\"_\"!==(e=t[i])){if(!(48<=(r=t.charCodeAt(i))&&r<=57||65<=r&&r<=70||97<=r&&r<=102))return!1;o=!0}return o&&\"_\"!==e}if(\"o\"===e){for(i++;i<n;i++)if(\"_\"!==(e=t[i])){if(!isOctCode(t.charCodeAt(i)))return!1;o=!0}return o&&\"_\"!==e}}if(\"_\"===e)return!1;for(;i<n;i++)if(\"_\"!==(e=t[i])){if(!isDecCode(t.charCodeAt(i)))return!1;o=!0}return!(!o||\"_\"===e)},construct:function constructYamlInteger(t){var e,r=t,n=1;if(-1!==r.indexOf(\"_\")&&(r=r.replace(/_/g,\"\")),\"-\"!==(e=r[0])&&\"+\"!==e||(\"-\"===e&&(n=-1),e=(r=r.slice(1))[0]),\"0\"===r)return 0;if(\"0\"===e){if(\"b\"===r[1])return n*parseInt(r.slice(2),2);if(\"x\"===r[1])return n*parseInt(r.slice(2),16);if(\"o\"===r[1])return n*parseInt(r.slice(2),8)}return n*parseInt(r,10)},predicate:function isInteger(t){return\"[object Number]\"===Object.prototype.toString.call(t)&&t%1==0&&!J.isNegativeZero(t)},represent:{binary:function(t){return t>=0?\"0b\"+t.toString(2):\"-0b\"+t.toString(2).slice(1)},octal:function(t){return t>=0?\"0o\"+t.toString(8):\"-0o\"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?\"0x\"+t.toString(16).toUpperCase():\"-0x\"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}}),dt=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");var _t=/^[-+]?[0-9]+e/;var yt=new it(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:function resolveYamlFloat(t){return null!==t&&!(!dt.test(t)||\"_\"===t[t.length-1])},construct:function constructYamlFloat(t){var e,r;return r=\"-\"===(e=t.replace(/_/g,\"\").toLowerCase())[0]?-1:1,\"+-\".indexOf(e[0])>=0&&(e=e.slice(1)),\".inf\"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===e?NaN:r*parseFloat(e,10)},predicate:function isFloat(t){return\"[object Number]\"===Object.prototype.toString.call(t)&&(t%1!=0||J.isNegativeZero(t))},represent:function representYamlFloat(t,e){var r;if(isNaN(t))switch(e){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===t)switch(e){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(J.isNegativeZero(t))return\"-0.0\";return r=t.toString(10),_t.test(r)?r.replace(\"e\",\".e\"):r},defaultStyle:\"lowercase\"}),mt=ct.extend({implicit:[lt,ht,pt,yt]}),gt=mt,vt=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$\"),bt=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$\");var St=new it(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:function resolveYamlTimestamp(t){return null!==t&&(null!==vt.exec(t)||null!==bt.exec(t))},construct:function constructYamlTimestamp(t){var e,r,n,i,o,a,s,u,c=0,f=null;if(null===(e=vt.exec(t))&&(e=bt.exec(t)),null===e)throw new Error(\"Date resolve error\");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+=\"0\";c=+c}return e[9]&&(f=6e4*(60*+e[10]+ +(e[11]||0)),\"-\"===e[9]&&(f=-f)),u=new Date(Date.UTC(r,n,i,o,a,s,c)),f&&u.setTime(u.getTime()-f),u},instanceOf:Date,represent:function representYamlTimestamp(t){return t.toISOString()}});var wt=new it(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:function resolveYamlMerge(t){return\"<<\"===t||null===t}}),It=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";var xt=new it(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:function resolveYamlBinary(t){if(null===t)return!1;var e,r,n=0,i=t.length,o=It;for(r=0;r<i;r++)if(!((e=o.indexOf(t.charAt(r)))>64)){if(e<0)return!1;n+=6}return n%8==0},construct:function constructYamlBinary(t){var e,r,n=t.replace(/[\\r\\n=]/g,\"\"),i=n.length,o=It,a=0,s=[];for(e=0;e<i;e++)e%4==0&&e&&(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(n.charAt(e));return 0===(r=i%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)},predicate:function isBinary(t){return\"[object Uint8Array]\"===Object.prototype.toString.call(t)},represent:function representYamlBinary(t){var e,r,n=\"\",i=0,o=t.length,a=It;for(e=0;e<o;e++)e%3==0&&e&&(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]),i=(i<<8)+t[e];return 0===(r=o%3)?(n+=a[i>>18&63],n+=a[i>>12&63],n+=a[i>>6&63],n+=a[63&i]):2===r?(n+=a[i>>10&63],n+=a[i>>4&63],n+=a[i<<2&63],n+=a[64]):1===r&&(n+=a[i>>2&63],n+=a[i<<4&63],n+=a[64],n+=a[64]),n}}),Et=Object.prototype.hasOwnProperty,Ot=Object.prototype.toString;var Bt=new it(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:function resolveYamlOmap(t){if(null===t)return!0;var e,r,n,i,o,a=[],s=t;for(e=0,r=s.length;e<r;e+=1){if(n=s[e],o=!1,\"[object Object]\"!==Ot.call(n))return!1;for(i in n)if(Et.call(n,i)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==a.indexOf(i))return!1;a.push(i)}return!0},construct:function constructYamlOmap(t){return null!==t?t:[]}}),kt=Object.prototype.toString;var At=new it(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:function resolveYamlPairs(t){if(null===t)return!0;var e,r,n,i,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(n=a[e],\"[object Object]\"!==kt.call(n))return!1;if(1!==(i=Object.keys(n)).length)return!1;o[e]=[i[0],n[i[0]]]}return!0},construct:function constructYamlPairs(t){if(null===t)return[];var e,r,n,i,o,a=t;for(o=new Array(a.length),e=0,r=a.length;e<r;e+=1)n=a[e],i=Object.keys(n),o[e]=[i[0],n[i[0]]];return o}}),Ct=Object.prototype.hasOwnProperty;var Mt=new it(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:function resolveYamlSet(t){if(null===t)return!0;var e,r=t;for(e in r)if(Ct.call(r,e)&&null!==r[e])return!1;return!0},construct:function constructYamlSet(t){return null!==t?t:{}}}),qt=gt.extend({implicit:[St,wt],explicit:[xt,Bt,At,Mt]}),Lt=Object.prototype.hasOwnProperty,Nt=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/,jt=/[\\x85\\u2028\\u2029]/,Tt=/[,\\[\\]\\{\\}]/,Rt=/^(?:!|!!|![a-z\\-]+!)$/i,zt=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;function _class(t){return Object.prototype.toString.call(t)}function is_EOL(t){return 10===t||13===t}function is_WHITE_SPACE(t){return 9===t||32===t}function is_WS_OR_EOL(t){return 9===t||32===t||10===t||13===t}function is_FLOW_INDICATOR(t){return 44===t||91===t||93===t||123===t||125===t}function fromHexCode(t){var e;return 48<=t&&t<=57?t-48:97<=(e=32|t)&&e<=102?e-97+10:-1}function simpleEscapeSequence(t){return 48===t?\"\\0\":97===t?\"\u0007\":98===t?\"\\b\":116===t||9===t?\"\\t\":110===t?\"\\n\":118===t?\"\\v\":102===t?\"\\f\":114===t?\"\\r\":101===t?\"\u001b\":32===t?\" \":34===t?'\"':47===t?\"/\":92===t?\"\\\\\":78===t?\"\":95===t?\" \":76===t?\"\\u2028\":80===t?\"\\u2029\":\"\"}function charFromCodepoint(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}for(var Pt=new Array(256),Ft=new Array(256),Dt=0;Dt<256;Dt++)Pt[Dt]=simpleEscapeSequence(Dt)?1:0,Ft[Dt]=simpleEscapeSequence(Dt);function State$1(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||qt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function generateError(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=et(r),new tt(e,r)}function throwError(t,e){throw generateError(t,e)}function throwWarning(t,e){t.onWarning&&t.onWarning.call(null,generateError(t,e))}var Ut={YAML:function handleYamlDirective(t,e,r){var n,i,o;null!==t.version&&throwError(t,\"duplication of %YAML directive\"),1!==r.length&&throwError(t,\"YAML directive accepts exactly one argument\"),null===(n=/^([0-9]+)\\.([0-9]+)$/.exec(r[0]))&&throwError(t,\"ill-formed argument of the YAML directive\"),i=parseInt(n[1],10),o=parseInt(n[2],10),1!==i&&throwError(t,\"unacceptable YAML version of the document\"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&throwWarning(t,\"unsupported YAML version of the document\")},TAG:function handleTagDirective(t,e,r){var n,i;2!==r.length&&throwError(t,\"TAG directive accepts exactly two arguments\"),n=r[0],i=r[1],Rt.test(n)||throwError(t,\"ill-formed tag handle (first argument) of the TAG directive\"),Lt.call(t.tagMap,n)&&throwError(t,'there is a previously declared suffix for \"'+n+'\" tag handle'),zt.test(i)||throwError(t,\"ill-formed tag prefix (second argument) of the TAG directive\");try{i=decodeURIComponent(i)}catch(e){throwError(t,\"tag prefix is malformed: \"+i)}t.tagMap[n]=i}};function captureSegment(t,e,r,n){var i,o,a,s;if(e<r){if(s=t.input.slice(e,r),n)for(i=0,o=s.length;i<o;i+=1)9===(a=s.charCodeAt(i))||32<=a&&a<=1114111||throwError(t,\"expected valid JSON character\");else Nt.test(s)&&throwError(t,\"the stream contains non-printable characters\");t.result+=s}}function mergeMappings(t,e,r,n){var i,o,a,s;for(J.isObject(r)||throwError(t,\"cannot merge mappings; the provided source object is unacceptable\"),a=0,s=(i=Object.keys(r)).length;a<s;a+=1)o=i[a],Lt.call(e,o)||(e[o]=r[o],n[o]=!0)}function storeMappingPair(t,e,r,n,i,o,a,s,u){var c,f;if(Array.isArray(i))for(c=0,f=(i=Array.prototype.slice.call(i)).length;c<f;c+=1)Array.isArray(i[c])&&throwError(t,\"nested arrays are not supported inside keys\"),\"object\"==typeof i&&\"[object Object]\"===_class(i[c])&&(i[c]=\"[object Object]\");if(\"object\"==typeof i&&\"[object Object]\"===_class(i)&&(i=\"[object Object]\"),i=String(i),null===e&&(e={}),\"tag:yaml.org,2002:merge\"===n)if(Array.isArray(o))for(c=0,f=o.length;c<f;c+=1)mergeMappings(t,e,o[c],r);else mergeMappings(t,e,o,r);else t.json||Lt.call(r,i)||!Lt.call(e,i)||(t.line=a||t.line,t.lineStart=s||t.lineStart,t.position=u||t.position,throwError(t,\"duplicated mapping key\")),\"__proto__\"===i?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:o}):e[i]=o,delete r[i];return e}function readLineBreak(t){var e;10===(e=t.input.charCodeAt(t.position))?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):throwError(t,\"a line break is expected\"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function skipSeparationSpace(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);0!==i;){for(;is_WHITE_SPACE(i);)9===i&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&35===i)do{i=t.input.charCodeAt(++t.position)}while(10!==i&&13!==i&&0!==i);if(!is_EOL(i))break;for(readLineBreak(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;32===i;)t.lineIndent++,i=t.input.charCodeAt(++t.position)}return-1!==r&&0!==n&&t.lineIndent<r&&throwWarning(t,\"deficient indentation\"),n}function testDocumentSeparator(t){var e,r=t.position;return!(45!==(e=t.input.charCodeAt(r))&&46!==e||e!==t.input.charCodeAt(r+1)||e!==t.input.charCodeAt(r+2)||(r+=3,0!==(e=t.input.charCodeAt(r))&&!is_WS_OR_EOL(e)))}function writeFoldedLines(t,e){1===e?t.result+=\" \":e>1&&(t.result+=J.repeat(\"\\n\",e-1))}function readBlockSequence(t,e){var r,n,i=t.tag,o=t.anchor,a=[],s=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),n=t.input.charCodeAt(t.position);0!==n&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,throwError(t,\"tab characters must not be used in indentation\")),45===n)&&is_WS_OR_EOL(t.input.charCodeAt(t.position+1));)if(s=!0,t.position++,skipSeparationSpace(t,!0,-1)&&t.lineIndent<=e)a.push(null),n=t.input.charCodeAt(t.position);else if(r=t.line,composeNode(t,e,3,!1,!0),a.push(t.result),skipSeparationSpace(t,!0,-1),n=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==n)throwError(t,\"bad indentation of a sequence entry\");else if(t.lineIndent<e)break;return!!s&&(t.tag=i,t.anchor=o,t.kind=\"sequence\",t.result=a,!0)}function readTagProperty(t){var e,r,n,i,o=!1,a=!1;if(33!==(i=t.input.charCodeAt(t.position)))return!1;if(null!==t.tag&&throwError(t,\"duplication of a tag property\"),60===(i=t.input.charCodeAt(++t.position))?(o=!0,i=t.input.charCodeAt(++t.position)):33===i?(a=!0,r=\"!!\",i=t.input.charCodeAt(++t.position)):r=\"!\",e=t.position,o){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&62!==i);t.position<t.length?(n=t.input.slice(e,t.position),i=t.input.charCodeAt(++t.position)):throwError(t,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==i&&!is_WS_OR_EOL(i);)33===i&&(a?throwError(t,\"tag suffix cannot contain exclamation marks\"):(r=t.input.slice(e-1,t.position+1),Rt.test(r)||throwError(t,\"named tag handle cannot contain such characters\"),a=!0,e=t.position+1)),i=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),Tt.test(n)&&throwError(t,\"tag suffix cannot contain flow indicator characters\")}n&&!zt.test(n)&&throwError(t,\"tag name cannot contain such characters: \"+n);try{n=decodeURIComponent(n)}catch(e){throwError(t,\"tag name is malformed: \"+n)}return o?t.tag=n:Lt.call(t.tagMap,r)?t.tag=t.tagMap[r]+n:\"!\"===r?t.tag=\"!\"+n:\"!!\"===r?t.tag=\"tag:yaml.org,2002:\"+n:throwError(t,'undeclared tag handle \"'+r+'\"'),!0}function readAnchorProperty(t){var e,r;if(38!==(r=t.input.charCodeAt(t.position)))return!1;for(null!==t.anchor&&throwError(t,\"duplication of an anchor property\"),r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!is_WS_OR_EOL(r)&&!is_FLOW_INDICATOR(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&throwError(t,\"name of an anchor node must contain at least one character\"),t.anchor=t.input.slice(e,t.position),!0}function composeNode(t,e,r,n,i){var o,a,s,u,c,f,l,h,p,d=1,_=!1,y=!1;if(null!==t.listener&&t.listener(\"open\",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=s=4===r||3===r,n&&skipSeparationSpace(t,!0,-1)&&(_=!0,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)),1===d)for(;readTagProperty(t)||readAnchorProperty(t);)skipSeparationSpace(t,!0,-1)?(_=!0,s=o,t.lineIndent>e?d=1:t.lineIndent===e?d=0:t.lineIndent<e&&(d=-1)):s=!1;if(s&&(s=_||i),1!==d&&4!==r||(h=1===r||2===r?e:e+1,p=t.position-t.lineStart,1===d?s&&(readBlockSequence(t,p)||function readBlockMapping(t,e,r){var n,i,o,a,s,u,c,f=t.tag,l=t.anchor,h={},p=Object.create(null),d=null,_=null,y=null,m=!1,g=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=h),c=t.input.charCodeAt(t.position);0!==c;){if(m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,throwError(t,\"tab characters must not be used in indentation\")),n=t.input.charCodeAt(t.position+1),o=t.line,63!==c&&58!==c||!is_WS_OR_EOL(n)){if(a=t.line,s=t.lineStart,u=t.position,!composeNode(t,r,2,!1,!0))break;if(t.line===o){for(c=t.input.charCodeAt(t.position);is_WHITE_SPACE(c);)c=t.input.charCodeAt(++t.position);if(58===c)is_WS_OR_EOL(c=t.input.charCodeAt(++t.position))||throwError(t,\"a whitespace character is expected after the key-value separator within a block mapping\"),m&&(storeMappingPair(t,h,p,d,_,null,a,s,u),d=_=y=null),g=!0,m=!1,i=!1,d=t.tag,_=t.result;else{if(!g)return t.tag=f,t.anchor=l,!0;throwError(t,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!g)return t.tag=f,t.anchor=l,!0;throwError(t,\"can not read a block mapping entry; a multiline key may not be an implicit key\")}}else 63===c?(m&&(storeMappingPair(t,h,p,d,_,null,a,s,u),d=_=y=null),g=!0,m=!0,i=!0):m?(m=!1,i=!0):throwError(t,\"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\"),t.position+=1,c=n;if((t.line===o||t.lineIndent>e)&&(m&&(a=t.line,s=t.lineStart,u=t.position),composeNode(t,e,4,!0,i)&&(m?_=t.result:y=t.result),m||(storeMappingPair(t,h,p,d,_,y,a,s,u),d=_=y=null),skipSeparationSpace(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)throwError(t,\"bad indentation of a mapping entry\");else if(t.lineIndent<e)break}return m&&storeMappingPair(t,h,p,d,_,null,a,s,u),g&&(t.tag=f,t.anchor=l,t.kind=\"mapping\",t.result=h),g}(t,p,h))||function readFlowCollection(t,e){var r,n,i,o,a,s,u,c,f,l,h,p,d=!0,_=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,c=!1,o=[];else{if(123!==p)return!1;a=125,c=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),p=t.input.charCodeAt(++t.position);0!==p;){if(skipSeparationSpace(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=_,t.anchor=y,t.kind=c?\"mapping\":\"sequence\",t.result=o,!0;d?44===p&&throwError(t,\"expected the node content, but found ','\"):throwError(t,\"missed comma between flow collection entries\"),h=null,s=u=!1,63===p&&is_WS_OR_EOL(t.input.charCodeAt(t.position+1))&&(s=u=!0,t.position++,skipSeparationSpace(t,!0,e)),r=t.line,n=t.lineStart,i=t.position,composeNode(t,e,1,!1,!0),l=t.tag,f=t.result,skipSeparationSpace(t,!0,e),p=t.input.charCodeAt(t.position),!u&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),skipSeparationSpace(t,!0,e),composeNode(t,e,1,!1,!0),h=t.result),c?storeMappingPair(t,o,m,l,f,h,r,n,i):s?o.push(storeMappingPair(t,null,m,l,f,h,r,n,i)):o.push(f),skipSeparationSpace(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(d=!0,p=t.input.charCodeAt(++t.position)):d=!1}throwError(t,\"unexpected end of the stream within a flow collection\")}(t,h)?y=!0:(a&&function readBlockScalar(t,e){var r,n,i,o,a,s=1,u=!1,c=!1,f=e,l=0,h=!1;if(124===(o=t.input.charCodeAt(t.position)))n=!1;else{if(62!==o)return!1;n=!0}for(t.kind=\"scalar\",t.result=\"\";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)1===s?s=43===o?3:2:throwError(t,\"repeat of a chomping mode identifier\");else{if(!((i=48<=(a=o)&&a<=57?a-48:-1)>=0))break;0===i?throwError(t,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):c?throwError(t,\"repeat of an indentation width identifier\"):(f=e+i-1,c=!0)}if(is_WHITE_SPACE(o)){do{o=t.input.charCodeAt(++t.position)}while(is_WHITE_SPACE(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!is_EOL(o)&&0!==o)}for(;0!==o;){for(readLineBreak(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndent<f)&&32===o;)t.lineIndent++,o=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>f&&(f=t.lineIndent),is_EOL(o))l++;else{if(t.lineIndent<f){3===s?t.result+=J.repeat(\"\\n\",u?1+l:l):1===s&&u&&(t.result+=\"\\n\");break}for(n?is_WHITE_SPACE(o)?(h=!0,t.result+=J.repeat(\"\\n\",u?1+l:l)):h?(h=!1,t.result+=J.repeat(\"\\n\",l+1)):0===l?u&&(t.result+=\" \"):t.result+=J.repeat(\"\\n\",l):t.result+=J.repeat(\"\\n\",u?1+l:l),u=!0,c=!0,l=0,r=t.position;!is_EOL(o)&&0!==o;)o=t.input.charCodeAt(++t.position);captureSegment(t,r,t.position,!1)}}return!0}(t,h)||function readSingleQuotedScalar(t,e){var r,n,i;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,n=i=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(captureSegment(t,n,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;n=t.position,t.position++,i=t.position}else is_EOL(r)?(captureSegment(t,n,i,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),n=i=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,\"unexpected end of the document within a single quoted scalar\"):(t.position++,i=t.position);throwError(t,\"unexpected end of the stream within a single quoted scalar\")}(t,h)||function readDoubleQuotedScalar(t,e){var r,n,i,o,a,s,u;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind=\"scalar\",t.result=\"\",t.position++,r=n=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return captureSegment(t,r,t.position,!0),t.position++,!0;if(92===s){if(captureSegment(t,r,t.position,!0),is_EOL(s=t.input.charCodeAt(++t.position)))skipSeparationSpace(t,!1,e);else if(s<256&&Pt[s])t.result+=Ft[s],t.position++;else if((a=120===(u=s)?2:117===u?4:85===u?8:0)>0){for(i=a,o=0;i>0;i--)(a=fromHexCode(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:throwError(t,\"expected hexadecimal character\");t.result+=charFromCodepoint(o),t.position++}else throwError(t,\"unknown escape sequence\");r=n=t.position}else is_EOL(s)?(captureSegment(t,r,n,!0),writeFoldedLines(t,skipSeparationSpace(t,!1,e)),r=n=t.position):t.position===t.lineStart&&testDocumentSeparator(t)?throwError(t,\"unexpected end of the document within a double quoted scalar\"):(t.position++,n=t.position)}throwError(t,\"unexpected end of the stream within a double quoted scalar\")}(t,h)?y=!0:!function readAlias(t){var e,r,n;if(42!==(n=t.input.charCodeAt(t.position)))return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!is_WS_OR_EOL(n)&&!is_FLOW_INDICATOR(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&throwError(t,\"name of an alias node must contain at least one character\"),r=t.input.slice(e,t.position),Lt.call(t.anchorMap,r)||throwError(t,'unidentified alias \"'+r+'\"'),t.result=t.anchorMap[r],skipSeparationSpace(t,!0,-1),!0}(t)?function readPlainScalar(t,e,r){var n,i,o,a,s,u,c,f,l=t.kind,h=t.result;if(is_WS_OR_EOL(f=t.input.charCodeAt(t.position))||is_FLOW_INDICATOR(f)||35===f||38===f||42===f||33===f||124===f||62===f||39===f||34===f||37===f||64===f||96===f)return!1;if((63===f||45===f)&&(is_WS_OR_EOL(n=t.input.charCodeAt(t.position+1))||r&&is_FLOW_INDICATOR(n)))return!1;for(t.kind=\"scalar\",t.result=\"\",i=o=t.position,a=!1;0!==f;){if(58===f){if(is_WS_OR_EOL(n=t.input.charCodeAt(t.position+1))||r&&is_FLOW_INDICATOR(n))break}else if(35===f){if(is_WS_OR_EOL(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&testDocumentSeparator(t)||r&&is_FLOW_INDICATOR(f))break;if(is_EOL(f)){if(s=t.line,u=t.lineStart,c=t.lineIndent,skipSeparationSpace(t,!1,-1),t.lineIndent>=e){a=!0,f=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=u,t.lineIndent=c;break}}a&&(captureSegment(t,i,o,!1),writeFoldedLines(t,t.line-s),i=o=t.position,a=!1),is_WHITE_SPACE(f)||(o=t.position+1),f=t.input.charCodeAt(++t.position)}return captureSegment(t,i,o,!1),!!t.result||(t.kind=l,t.result=h,!1)}(t,h,1===r)&&(y=!0,null===t.tag&&(t.tag=\"?\")):(y=!0,null===t.tag&&null===t.anchor||throwError(t,\"alias node should not have any properties\")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===d&&(y=s&&readBlockSequence(t,p))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if(\"?\"===t.tag){for(null!==t.result&&\"scalar\"!==t.kind&&throwError(t,'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"'+t.kind+'\"'),u=0,c=t.implicitTypes.length;u<c;u+=1)if((l=t.implicitTypes[u]).resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else if(\"!\"!==t.tag){if(Lt.call(t.typeMap[t.kind||\"fallback\"],t.tag))l=t.typeMap[t.kind||\"fallback\"][t.tag];else for(l=null,u=0,c=(f=t.typeMap.multi[t.kind||\"fallback\"]).length;u<c;u+=1)if(t.tag.slice(0,f[u].tag.length)===f[u].tag){l=f[u];break}l||throwError(t,\"unknown tag !<\"+t.tag+\">\"),null!==t.result&&l.kind!==t.kind&&throwError(t,\"unacceptable node kind for !<\"+t.tag+'> tag; it should be \"'+l.kind+'\", not \"'+t.kind+'\"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):throwError(t,\"cannot resolve a node with !<\"+t.tag+\"> explicit tag\")}return null!==t.listener&&t.listener(\"close\",t),null!==t.tag||null!==t.anchor||y}function readDocument(t){var e,r,n,i,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(skipSeparationSpace(t,!0,-1),i=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==i));){for(a=!0,i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!is_WS_OR_EOL(i);)i=t.input.charCodeAt(++t.position);for(n=[],(r=t.input.slice(e,t.position)).length<1&&throwError(t,\"directive name must not be less than one character in length\");0!==i;){for(;is_WHITE_SPACE(i);)i=t.input.charCodeAt(++t.position);if(35===i){do{i=t.input.charCodeAt(++t.position)}while(0!==i&&!is_EOL(i));break}if(is_EOL(i))break;for(e=t.position;0!==i&&!is_WS_OR_EOL(i);)i=t.input.charCodeAt(++t.position);n.push(t.input.slice(e,t.position))}0!==i&&readLineBreak(t),Lt.call(Ut,r)?Ut[r](t,r,n):throwWarning(t,'unknown document directive \"'+r+'\"')}skipSeparationSpace(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,skipSeparationSpace(t,!0,-1)):a&&throwError(t,\"directives end mark is expected\"),composeNode(t,t.lineIndent-1,4,!1,!0),skipSeparationSpace(t,!0,-1),t.checkLineBreaks&&jt.test(t.input.slice(o,t.position))&&throwWarning(t,\"non-ASCII line breaks are interpreted as content\"),t.documents.push(t.result),t.position===t.lineStart&&testDocumentSeparator(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,skipSeparationSpace(t,!0,-1)):t.position<t.length-1&&throwError(t,\"end of the stream or a document separator is expected\")}function loadDocuments(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+=\"\\n\"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var r=new State$1(t,e),n=t.indexOf(\"\\0\");for(-1!==n&&(r.position=n,throwError(r,\"null byte is not allowed in input\")),r.input+=\"\\0\";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)readDocument(r);return r.documents}var Wt={loadAll:function loadAll$1(t,e,r){null!==e&&\"object\"==typeof e&&void 0===r&&(r=e,e=null);var n=loadDocuments(t,r);if(\"function\"!=typeof e)return n;for(var i=0,o=n.length;i<o;i+=1)e(n[i])},load:function load$1(t,e){var r=loadDocuments(t,e);if(0!==r.length){if(1===r.length)return r[0];throw new tt(\"expected a single document in the stream, but found more\")}}},Vt=Object.prototype.toString,Kt=Object.prototype.hasOwnProperty,$t=65279,Ht={0:\"\\\\0\",7:\"\\\\a\",8:\"\\\\b\",9:\"\\\\t\",10:\"\\\\n\",11:\"\\\\v\",12:\"\\\\f\",13:\"\\\\r\",27:\"\\\\e\",34:'\\\\\"',92:\"\\\\\\\\\",133:\"\\\\N\",160:\"\\\\_\",8232:\"\\\\L\",8233:\"\\\\P\"},Yt=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"],Zt=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;function encodeHex(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r=\"x\",n=2;else if(t<=65535)r=\"u\",n=4;else{if(!(t<=4294967295))throw new tt(\"code point within a string may not be greater than 0xFFFFFFFF\");r=\"U\",n=8}return\"\\\\\"+r+J.repeat(\"0\",n-e.length)+e}function State(t){this.schema=t.schema||qt,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=J.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function compileStyleMap(t,e){var r,n,i,o,a,s,u;if(null===e)return{};for(r={},i=0,o=(n=Object.keys(e)).length;i<o;i+=1)a=n[i],s=String(e[a]),\"!!\"===a.slice(0,2)&&(a=\"tag:yaml.org,2002:\"+a.slice(2)),(u=t.compiledTypeMap.fallback[a])&&Kt.call(u.styleAliases,s)&&(s=u.styleAliases[s]),r[a]=s;return r}(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType='\"'===t.quotingType?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=\"function\"==typeof t.replacer?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function indentString(t,e){for(var r,n=J.repeat(\" \",e),i=0,o=-1,a=\"\",s=t.length;i<s;)-1===(o=t.indexOf(\"\\n\",i))?(r=t.slice(i),i=s):(r=t.slice(i,o+1),i=o+1),r.length&&\"\\n\"!==r&&(a+=n),a+=r;return a}function generateNextLine(t,e){return\"\\n\"+J.repeat(\" \",t.indent*e)}function isWhitespace(t){return 32===t||9===t}function isPrintable(t){return 32<=t&&t<=126||161<=t&&t<=55295&&8232!==t&&8233!==t||57344<=t&&t<=65533&&t!==$t||65536<=t&&t<=1114111}function isNsCharOrWhitespace(t){return isPrintable(t)&&t!==$t&&13!==t&&10!==t}function isPlainSafe(t,e,r){var n=isNsCharOrWhitespace(t),i=n&&!isWhitespace(t);return(r?n:n&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!i)||isNsCharOrWhitespace(e)&&!isWhitespace(e)&&35===t||58===e&&i}function codePointAt(t,e){var r,n=t.charCodeAt(e);return n>=55296&&n<=56319&&e+1<t.length&&(r=t.charCodeAt(e+1))>=56320&&r<=57343?1024*(n-55296)+r-56320+65536:n}function needIndentIndicator(t){return/^\\n* /.test(t)}function chooseScalarStyle(t,e,r,n,i,o,a,s){var u,c=0,f=null,l=!1,h=!1,p=-1!==n,d=-1,_=function isPlainSafeFirst(t){return isPrintable(t)&&t!==$t&&!isWhitespace(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}(codePointAt(t,0))&&function isPlainSafeLast(t){return!isWhitespace(t)&&58!==t}(codePointAt(t,t.length-1));if(e||a)for(u=0;u<t.length;c>=65536?u+=2:u++){if(!isPrintable(c=codePointAt(t,u)))return 5;_=_&&isPlainSafe(c,f,s),f=c}else{for(u=0;u<t.length;c>=65536?u+=2:u++){if(10===(c=codePointAt(t,u)))l=!0,p&&(h=h||u-d-1>n&&\" \"!==t[d+1],d=u);else if(!isPrintable(c))return 5;_=_&&isPlainSafe(c,f,s),f=c}h=h||p&&u-d-1>n&&\" \"!==t[d+1]}return l||h?r>9&&needIndentIndicator(t)?5:a?2===o?5:2:h?4:3:!_||a||i(t)?2===o?5:2:1}function writeScalar(t,e,r,n,i){t.dump=function(){if(0===e.length)return 2===t.quotingType?'\"\"':\"''\";if(!t.noCompatMode&&(-1!==Yt.indexOf(e)||Zt.test(e)))return 2===t.quotingType?'\"'+e+'\"':\"'\"+e+\"'\";var o=t.indent*Math.max(1,r),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),s=n||t.flowLevel>-1&&r>=t.flowLevel;switch(chooseScalarStyle(e,s,t.indent,a,(function testAmbiguity(e){return function testImplicitResolving(t,e){var r,n;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}(t,e)}),t.quotingType,t.forceQuotes&&!n,i)){case 1:return e;case 2:return\"'\"+e.replace(/'/g,\"''\")+\"'\";case 3:return\"|\"+blockHeader(e,t.indent)+dropEndingNewline(indentString(e,o));case 4:return\">\"+blockHeader(e,t.indent)+dropEndingNewline(indentString(function foldString(t,e){var r,n,i=/(\\n+)([^\\n]*)/g,o=(s=t.indexOf(\"\\n\"),s=-1!==s?s:t.length,i.lastIndex=s,foldLine(t.slice(0,s),e)),a=\"\\n\"===t[0]||\" \"===t[0];var s;for(;n=i.exec(t);){var u=n[1],c=n[2];r=\" \"===c[0],o+=u+(a||r||\"\"===c?\"\":\"\\n\")+foldLine(c,e),a=r}return o}(e,a),o));case 5:return'\"'+function escapeString(t){for(var e,r=\"\",n=0,i=0;i<t.length;n>=65536?i+=2:i++)n=codePointAt(t,i),!(e=Ht[n])&&isPrintable(n)?(r+=t[i],n>=65536&&(r+=t[i+1])):r+=e||encodeHex(n);return r}(e)+'\"';default:throw new tt(\"impossible error: invalid scalar style\")}}()}function blockHeader(t,e){var r=needIndentIndicator(t)?String(e):\"\",n=\"\\n\"===t[t.length-1];return r+(n&&(\"\\n\"===t[t.length-2]||\"\\n\"===t)?\"+\":n?\"\":\"-\")+\"\\n\"}function dropEndingNewline(t){return\"\\n\"===t[t.length-1]?t.slice(0,-1):t}function foldLine(t,e){if(\"\"===t||\" \"===t[0])return t;for(var r,n,i=/ [^ ]/g,o=0,a=0,s=0,u=\"\";r=i.exec(t);)(s=r.index)-o>e&&(n=a>o?a:s,u+=\"\\n\"+t.slice(o,n),o=n+1),a=s;return u+=\"\\n\",t.length-o>e&&a>o?u+=t.slice(o,a)+\"\\n\"+t.slice(a+1):u+=t.slice(o),u.slice(1)}function writeBlockSequence(t,e,r,n){var i,o,a,s=\"\",u=t.tag;for(i=0,o=r.length;i<o;i+=1)a=r[i],t.replacer&&(a=t.replacer.call(r,String(i),a)),(writeNode(t,e+1,a,!0,!0,!1,!0)||void 0===a&&writeNode(t,e+1,null,!0,!0,!1,!0))&&(n&&\"\"===s||(s+=generateNextLine(t,e)),t.dump&&10===t.dump.charCodeAt(0)?s+=\"-\":s+=\"- \",s+=t.dump);t.tag=u,t.dump=s||\"[]\"}function detectType(t,e,r){var n,i,o,a,s,u;for(o=0,a=(i=r?t.explicitTypes:t.implicitTypes).length;o<a;o+=1)if(((s=i[o]).instanceOf||s.predicate)&&(!s.instanceOf||\"object\"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(r?s.multi&&s.representName?t.tag=s.representName(e):t.tag=s.tag:t.tag=\"?\",s.represent){if(u=t.styleMap[s.tag]||s.defaultStyle,\"[object Function]\"===Vt.call(s.represent))n=s.represent(e,u);else{if(!Kt.call(s.represent,u))throw new tt(\"!<\"+s.tag+'> tag resolver accepts not \"'+u+'\" style');n=s.represent[u](e,u)}t.dump=n}return!0}return!1}function writeNode(t,e,r,n,i,o,a){t.tag=null,t.dump=r,detectType(t,r,!1)||detectType(t,r,!0);var s,u=Vt.call(t.dump),c=n;n&&(n=t.flowLevel<0||t.flowLevel>e);var f,l,h=\"[object Object]\"===u||\"[object Array]\"===u;if(h&&(l=-1!==(f=t.duplicates.indexOf(r))),(null!==t.tag&&\"?\"!==t.tag||l||2!==t.indent&&e>0)&&(i=!1),l&&t.usedDuplicates[f])t.dump=\"*ref_\"+f;else{if(h&&l&&!t.usedDuplicates[f]&&(t.usedDuplicates[f]=!0),\"[object Object]\"===u)n&&0!==Object.keys(t.dump).length?(!function writeBlockMapping(t,e,r,n){var i,o,a,s,u,c,f=\"\",l=t.tag,h=Object.keys(r);if(!0===t.sortKeys)h.sort();else if(\"function\"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new tt(\"sortKeys must be a boolean or a function\");for(i=0,o=h.length;i<o;i+=1)c=\"\",n&&\"\"===f||(c+=generateNextLine(t,e)),s=r[a=h[i]],t.replacer&&(s=t.replacer.call(r,a,s)),writeNode(t,e+1,a,!0,!0,!0)&&((u=null!==t.tag&&\"?\"!==t.tag||t.dump&&t.dump.length>1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=\"?\":c+=\"? \"),c+=t.dump,u&&(c+=generateNextLine(t,e)),writeNode(t,e+1,s,!0,u)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=\":\":c+=\": \",f+=c+=t.dump));t.tag=l,t.dump=f||\"{}\"}(t,e,t.dump,i),l&&(t.dump=\"&ref_\"+f+t.dump)):(!function writeFlowMapping(t,e,r){var n,i,o,a,s,u=\"\",c=t.tag,f=Object.keys(r);for(n=0,i=f.length;n<i;n+=1)s=\"\",\"\"!==u&&(s+=\", \"),t.condenseFlow&&(s+='\"'),a=r[o=f[n]],t.replacer&&(a=t.replacer.call(r,o,a)),writeNode(t,e,o,!1,!1)&&(t.dump.length>1024&&(s+=\"? \"),s+=t.dump+(t.condenseFlow?'\"':\"\")+\":\"+(t.condenseFlow?\"\":\" \"),writeNode(t,e,a,!1,!1)&&(u+=s+=t.dump));t.tag=c,t.dump=\"{\"+u+\"}\"}(t,e,t.dump),l&&(t.dump=\"&ref_\"+f+\" \"+t.dump));else if(\"[object Array]\"===u)n&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?writeBlockSequence(t,e-1,t.dump,i):writeBlockSequence(t,e,t.dump,i),l&&(t.dump=\"&ref_\"+f+t.dump)):(!function writeFlowSequence(t,e,r){var n,i,o,a=\"\",s=t.tag;for(n=0,i=r.length;n<i;n+=1)o=r[n],t.replacer&&(o=t.replacer.call(r,String(n),o)),(writeNode(t,e,o,!1,!1)||void 0===o&&writeNode(t,e,null,!1,!1))&&(\"\"!==a&&(a+=\",\"+(t.condenseFlow?\"\":\" \")),a+=t.dump);t.tag=s,t.dump=\"[\"+a+\"]\"}(t,e,t.dump),l&&(t.dump=\"&ref_\"+f+\" \"+t.dump));else{if(\"[object String]\"!==u){if(\"[object Undefined]\"===u)return!1;if(t.skipInvalid)return!1;throw new tt(\"unacceptable kind of an object to dump \"+u)}\"?\"!==t.tag&&writeScalar(t,t.dump,e,o,c)}null!==t.tag&&\"?\"!==t.tag&&(s=encodeURI(\"!\"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,\"%21\"),s=\"!\"===t.tag[0]?\"!\"+s:\"tag:yaml.org,2002:\"===s.slice(0,18)?\"!!\"+s.slice(18):\"!<\"+s+\">\",t.dump=s+\" \"+t.dump)}return!0}function getDuplicateReferences(t,e){var r,n,i=[],o=[];for(inspectNode(t,i,o),r=0,n=o.length;r<n;r+=1)e.duplicates.push(i[o[r]]);e.usedDuplicates=new Array(n)}function inspectNode(t,e,r){var n,i,o;if(null!==t&&\"object\"==typeof t)if(-1!==(i=e.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,o=t.length;i<o;i+=1)inspectNode(t[i],e,r);else for(i=0,o=(n=Object.keys(t)).length;i<o;i+=1)inspectNode(t[n[i]],e,r)}function renamed(t,e){return function(){throw new Error(\"Function yaml.\"+t+\" is removed in js-yaml 4. Use yaml.\"+e+\" instead, which is now safe by default.\")}}const Gt={Type:it,Schema:ot,FAILSAFE_SCHEMA:ct,JSON_SCHEMA:mt,CORE_SCHEMA:gt,DEFAULT_SCHEMA:qt,load:Wt.load,loadAll:Wt.loadAll,dump:{dump:function dump$1(t,e){var r=new State(e=e||{});r.noRefs||getDuplicateReferences(t,r);var n=t;return r.replacer&&(n=r.replacer.call({\"\":n},\"\",n)),writeNode(r,0,n,!0,!0)?r.dump+\"\\n\":\"\"}}.dump,YAMLException:tt,types:{binary:xt,float:yt,map:ut,null:lt,pairs:At,set:Mt,timestamp:St,bool:ht,int:pt,merge:wt,omap:Bt,seq:st,str:at},safeLoad:renamed(\"safeLoad\",\"load\"),safeLoadAll:renamed(\"safeLoadAll\",\"loadAll\"),safeDump:renamed(\"safeDump\",\"dump\")},Jt=\"configs_update\",Qt=\"configs_toggle\";function update(t,e){return{type:Jt,payload:{[t]:e}}}function toggle(t){return{type:Qt,payload:t}}const loaded=()=>()=>{},downloadConfig=t=>e=>{const{fn:{fetch:r}}=e;return r(t)},getConfigByUrl=(t,e)=>r=>{const{specActions:n,configsActions:i}=r;if(t)return i.downloadConfig(t).then(next,next);function next(i){i instanceof Error||i.status>=400?(n.updateLoadingStatus(\"failedConfig\"),n.updateLoadingStatus(\"failedConfig\"),n.updateUrl(\"\"),console.error(i.statusText+\" \"+t.url),e(null)):e(((t,e)=>{try{return Gt.load(t)}catch(t){return e&&e.errActions.newThrownErr(new Error(t)),{}}})(i.text,r))}},get=(t,e)=>t.getIn(Array.isArray(e)?e:[e]),Xt={[Jt]:(t,e)=>t.merge((0,o.fromJS)(e.payload)),[Qt]:(t,e)=>{const r=e.payload,n=t.get(r);return t.set(r,!n)}};var te=__webpack_require__(7248),ee=__webpack_require__.n(te),re=__webpack_require__(7666),ne=__webpack_require__.n(re);const ie=console.error,withErrorBoundary=t=>e=>{const{getComponent:r,fn:i}=t(),o=r(\"ErrorBoundary\"),a=i.getDisplayName(e);class WithErrorBoundary extends n.Component{render(){return n.createElement(o,{targetName:a,getComponent:r,fn:i},n.createElement(e,ne()({},this.props,this.context)))}}var s;return WithErrorBoundary.displayName=`WithErrorBoundary(${a})`,(s=e).prototype&&s.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=e.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:t})=>n.createElement(\"div\",{className:\"fallback\"},\"😱 \",n.createElement(\"i\",null,\"Could not render \",\"t\"===t?\"this component\":t,\", see the console.\"));class ErrorBoundary extends n.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:ie},children:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}constructor(...t){super(...t),this.state={hasError:!1,error:null}}componentDidCatch(t,e){this.props.fn.componentDidCatch(t,e)}render(){const{getComponent:t,targetName:e,children:r}=this.props;if(this.state.hasError){const r=t(\"Fallback\");return n.createElement(r,{name:e})}return r}}const oe=ErrorBoundary,ae=[top_bar,function configsPlugin(){return{statePlugins:{configs:{reducers:Xt,actions:t,selectors:e}}}},stadalone_layout,(({componentList:t=[],fullOverride:e=!1}={})=>({getSystem:r})=>{const n=e?t:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...t],i=ee()(n,Array(n.length).fill(((t,{fn:e})=>e.withErrorBoundary(t))));return{fn:{componentDidCatch:ie,withErrorBoundary:withErrorBoundary(r)},components:{ErrorBoundary:oe,Fallback:fallback},wrapComponents:i}})({fullOverride:!0,componentList:[\"Topbar\",\"StandaloneLayout\",\"onlineValidatorBadge\"]})]})(),r=r.default})()));"
  },
  {
    "path": "runner/server/docs/ui/swagger-ui.css",
    "content": ".swagger-ui{color:#3b4151;font-family:sans-serif}.swagger-ui html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}.swagger-ui body{margin:0}.swagger-ui article,.swagger-ui aside,.swagger-ui footer,.swagger-ui header,.swagger-ui nav,.swagger-ui section{display:block}.swagger-ui h1{font-size:2em;margin:.67em 0}.swagger-ui figcaption,.swagger-ui figure,.swagger-ui main{display:block}.swagger-ui figure{margin:1em 40px}.swagger-ui hr{box-sizing:content-box;height:0;overflow:visible}.swagger-ui pre{font-family:monospace,monospace;font-size:1em}.swagger-ui a{background-color:transparent;-webkit-text-decoration-skip:objects}.swagger-ui abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.swagger-ui b,.swagger-ui strong{font-weight:inherit;font-weight:bolder}.swagger-ui code,.swagger-ui kbd,.swagger-ui samp{font-family:monospace,monospace;font-size:1em}.swagger-ui dfn{font-style:italic}.swagger-ui mark{background-color:#ff0;color:#000}.swagger-ui small{font-size:80%}.swagger-ui sub,.swagger-ui sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.swagger-ui sub{bottom:-.25em}.swagger-ui sup{top:-.5em}.swagger-ui audio,.swagger-ui video{display:inline-block}.swagger-ui audio:not([controls]){display:none;height:0}.swagger-ui img{border-style:none}.swagger-ui svg:not(:root){overflow:hidden}.swagger-ui button,.swagger-ui input,.swagger-ui optgroup,.swagger-ui select,.swagger-ui textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}.swagger-ui button,.swagger-ui input{overflow:visible}.swagger-ui button,.swagger-ui select{text-transform:none}.swagger-ui [type=reset],.swagger-ui [type=submit],.swagger-ui button,.swagger-ui html [type=button]{-webkit-appearance:button}.swagger-ui [type=button]::-moz-focus-inner,.swagger-ui [type=reset]::-moz-focus-inner,.swagger-ui [type=submit]::-moz-focus-inner,.swagger-ui button::-moz-focus-inner{border-style:none;padding:0}.swagger-ui [type=button]:-moz-focusring,.swagger-ui [type=reset]:-moz-focusring,.swagger-ui [type=submit]:-moz-focusring,.swagger-ui button:-moz-focusring{outline:1px dotted ButtonText}.swagger-ui fieldset{padding:.35em .75em .625em}.swagger-ui legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}.swagger-ui progress{display:inline-block;vertical-align:baseline}.swagger-ui textarea{overflow:auto}.swagger-ui [type=checkbox],.swagger-ui [type=radio]{box-sizing:border-box;padding:0}.swagger-ui [type=number]::-webkit-inner-spin-button,.swagger-ui [type=number]::-webkit-outer-spin-button{height:auto}.swagger-ui [type=search]{-webkit-appearance:textfield;outline-offset:-2px}.swagger-ui [type=search]::-webkit-search-cancel-button,.swagger-ui [type=search]::-webkit-search-decoration{-webkit-appearance:none}.swagger-ui ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}.swagger-ui details,.swagger-ui menu{display:block}.swagger-ui summary{display:list-item}.swagger-ui canvas{display:inline-block}.swagger-ui [hidden],.swagger-ui template{display:none}.swagger-ui .debug *{outline:1px solid gold}.swagger-ui .debug-white *{outline:1px solid #fff}.swagger-ui .debug-black *{outline:1px solid #000}.swagger-ui .debug-grid{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTRDOTY4N0U2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTRDOTY4N0Q2N0VFMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3NjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3NzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PsBS+GMAAAAjSURBVHjaYvz//z8DLsD4gcGXiYEAGBIKGBne//fFpwAgwAB98AaF2pjlUQAAAABJRU5ErkJggg==) repeat 0 0}.swagger-ui .debug-grid-16{background:transparent url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODYyRjhERDU2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODYyRjhERDQ2N0YyMTFFNjg2MzZDQjkwNkQ4MjgwMEIiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3QTY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3QjY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCS01IAAABMSURBVHjaYmR4/5+BFPBfAMFm/MBgx8RAGWCn1AAmSg34Q6kBDKMGMDCwICeMIemF/5QawEipAWwUhwEjMDvbAWlWkvVBwu8vQIABAEwBCph8U6c0AAAAAElFTkSuQmCC) repeat 0 0}.swagger-ui .debug-grid-8-solid{background:#fff url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAAAAAAD/4QMxaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/PiA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA1LjYtYzExMSA3OS4xNTgzMjUsIDIwMTUvMDkvMTAtMDE6MTA6MjAgICAgICAgICI+IDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+IDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkIxMjI0OTczNjdCMzExRTZCMkJDRTI0MDgxMDAyMTcxIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkIxMjI0OTc0NjdCMzExRTZCMkJDRTI0MDgxMDAyMTcxIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QjEyMjQ5NzE2N0IzMTFFNkIyQkNFMjQwODEwMDIxNzEiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QjEyMjQ5NzI2N0IzMTFFNkIyQkNFMjQwODEwMDIxNzEiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7/7gAOQWRvYmUAZMAAAAAB/9sAhAAbGhopHSlBJiZBQi8vL0JHPz4+P0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHAR0pKTQmND8oKD9HPzU/R0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0dHR0f/wAARCAAIAAgDASIAAhEBAxEB/8QAWQABAQAAAAAAAAAAAAAAAAAAAAYBAQEAAAAAAAAAAAAAAAAAAAIEEAEBAAMBAAAAAAAAAAAAAAABADECA0ERAAEDBQAAAAAAAAAAAAAAAAARITFBUWESIv/aAAwDAQACEQMRAD8AoOnTV1QTD7JJshP3vSM3P//Z) repeat 0 0}.swagger-ui .debug-grid-16-solid{background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTExIDc5LjE1ODMyNSwgMjAxNS8wOS8xMC0wMToxMDoyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY3MkJEN0U2N0M1MTFFNkIyQkNFMjQwODEwMDIxNzEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY3MkJEN0Y2N0M1MTFFNkIyQkNFMjQwODEwMDIxNzEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3NjcyQkQ3QzY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3NjcyQkQ3RDY3QzUxMUU2QjJCQ0UyNDA4MTAwMjE3MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pve6J3kAAAAzSURBVHjaYvz//z8D0UDsMwMjSRoYP5Gq4SPNbRjVMEQ1fCRDg+in/6+J1AJUxsgAEGAA31BAJMS0GYEAAAAASUVORK5CYII=) repeat 0 0}.swagger-ui .border-box,.swagger-ui a,.swagger-ui article,.swagger-ui body,.swagger-ui code,.swagger-ui dd,.swagger-ui div,.swagger-ui dl,.swagger-ui dt,.swagger-ui fieldset,.swagger-ui footer,.swagger-ui form,.swagger-ui h1,.swagger-ui h2,.swagger-ui h3,.swagger-ui h4,.swagger-ui h5,.swagger-ui h6,.swagger-ui header,.swagger-ui html,.swagger-ui input[type=email],.swagger-ui input[type=number],.swagger-ui input[type=password],.swagger-ui input[type=tel],.swagger-ui input[type=text],.swagger-ui input[type=url],.swagger-ui legend,.swagger-ui li,.swagger-ui main,.swagger-ui ol,.swagger-ui p,.swagger-ui pre,.swagger-ui section,.swagger-ui table,.swagger-ui td,.swagger-ui textarea,.swagger-ui th,.swagger-ui tr,.swagger-ui ul{box-sizing:border-box}.swagger-ui .aspect-ratio{height:0;position:relative}.swagger-ui .aspect-ratio--16x9{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1{padding-bottom:100%}.swagger-ui .aspect-ratio--object{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}@media screen and (min-width:30em){.swagger-ui .aspect-ratio-ns{height:0;position:relative}.swagger-ui .aspect-ratio--16x9-ns{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16-ns{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3-ns{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4-ns{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4-ns{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6-ns{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5-ns{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8-ns{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5-ns{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7-ns{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1-ns{padding-bottom:100%}.swagger-ui .aspect-ratio--object-ns{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .aspect-ratio-m{height:0;position:relative}.swagger-ui .aspect-ratio--16x9-m{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16-m{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3-m{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4-m{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4-m{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6-m{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5-m{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8-m{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5-m{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7-m{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1-m{padding-bottom:100%}.swagger-ui .aspect-ratio--object-m{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}}@media screen and (min-width:60em){.swagger-ui .aspect-ratio-l{height:0;position:relative}.swagger-ui .aspect-ratio--16x9-l{padding-bottom:56.25%}.swagger-ui .aspect-ratio--9x16-l{padding-bottom:177.77%}.swagger-ui .aspect-ratio--4x3-l{padding-bottom:75%}.swagger-ui .aspect-ratio--3x4-l{padding-bottom:133.33%}.swagger-ui .aspect-ratio--6x4-l{padding-bottom:66.6%}.swagger-ui .aspect-ratio--4x6-l{padding-bottom:150%}.swagger-ui .aspect-ratio--8x5-l{padding-bottom:62.5%}.swagger-ui .aspect-ratio--5x8-l{padding-bottom:160%}.swagger-ui .aspect-ratio--7x5-l{padding-bottom:71.42%}.swagger-ui .aspect-ratio--5x7-l{padding-bottom:140%}.swagger-ui .aspect-ratio--1x1-l{padding-bottom:100%}.swagger-ui .aspect-ratio--object-l{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%;z-index:100}}.swagger-ui img{max-width:100%}.swagger-ui .cover{background-size:cover!important}.swagger-ui .contain{background-size:contain!important}@media screen and (min-width:30em){.swagger-ui .cover-ns{background-size:cover!important}.swagger-ui .contain-ns{background-size:contain!important}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .cover-m{background-size:cover!important}.swagger-ui .contain-m{background-size:contain!important}}@media screen and (min-width:60em){.swagger-ui .cover-l{background-size:cover!important}.swagger-ui .contain-l{background-size:contain!important}}.swagger-ui .bg-center{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left{background-position:0;background-repeat:no-repeat}@media screen and (min-width:30em){.swagger-ui .bg-center-ns{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top-ns{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right-ns{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom-ns{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left-ns{background-position:0;background-repeat:no-repeat}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .bg-center-m{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top-m{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right-m{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom-m{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left-m{background-position:0;background-repeat:no-repeat}}@media screen and (min-width:60em){.swagger-ui .bg-center-l{background-position:50%;background-repeat:no-repeat}.swagger-ui .bg-top-l{background-position:top;background-repeat:no-repeat}.swagger-ui .bg-right-l{background-position:100%;background-repeat:no-repeat}.swagger-ui .bg-bottom-l{background-position:bottom;background-repeat:no-repeat}.swagger-ui .bg-left-l{background-position:0;background-repeat:no-repeat}}.swagger-ui .outline{outline:1px solid}.swagger-ui .outline-transparent{outline:1px solid transparent}.swagger-ui .outline-0{outline:0}@media screen and (min-width:30em){.swagger-ui .outline-ns{outline:1px solid}.swagger-ui .outline-transparent-ns{outline:1px solid transparent}.swagger-ui .outline-0-ns{outline:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .outline-m{outline:1px solid}.swagger-ui .outline-transparent-m{outline:1px solid transparent}.swagger-ui .outline-0-m{outline:0}}@media screen and (min-width:60em){.swagger-ui .outline-l{outline:1px solid}.swagger-ui .outline-transparent-l{outline:1px solid transparent}.swagger-ui .outline-0-l{outline:0}}.swagger-ui .ba{border-style:solid;border-width:1px}.swagger-ui .bt{border-top-style:solid;border-top-width:1px}.swagger-ui .br{border-right-style:solid;border-right-width:1px}.swagger-ui .bb{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl{border-left-style:solid;border-left-width:1px}.swagger-ui .bn{border-style:none;border-width:0}@media screen and (min-width:30em){.swagger-ui .ba-ns{border-style:solid;border-width:1px}.swagger-ui .bt-ns{border-top-style:solid;border-top-width:1px}.swagger-ui .br-ns{border-right-style:solid;border-right-width:1px}.swagger-ui .bb-ns{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl-ns{border-left-style:solid;border-left-width:1px}.swagger-ui .bn-ns{border-style:none;border-width:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .ba-m{border-style:solid;border-width:1px}.swagger-ui .bt-m{border-top-style:solid;border-top-width:1px}.swagger-ui .br-m{border-right-style:solid;border-right-width:1px}.swagger-ui .bb-m{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl-m{border-left-style:solid;border-left-width:1px}.swagger-ui .bn-m{border-style:none;border-width:0}}@media screen and (min-width:60em){.swagger-ui .ba-l{border-style:solid;border-width:1px}.swagger-ui .bt-l{border-top-style:solid;border-top-width:1px}.swagger-ui .br-l{border-right-style:solid;border-right-width:1px}.swagger-ui .bb-l{border-bottom-style:solid;border-bottom-width:1px}.swagger-ui .bl-l{border-left-style:solid;border-left-width:1px}.swagger-ui .bn-l{border-style:none;border-width:0}}.swagger-ui .b--black{border-color:#000}.swagger-ui .b--near-black{border-color:#111}.swagger-ui .b--dark-gray{border-color:#333}.swagger-ui .b--mid-gray{border-color:#555}.swagger-ui .b--gray{border-color:#777}.swagger-ui .b--silver{border-color:#999}.swagger-ui .b--light-silver{border-color:#aaa}.swagger-ui .b--moon-gray{border-color:#ccc}.swagger-ui .b--light-gray{border-color:#eee}.swagger-ui .b--near-white{border-color:#f4f4f4}.swagger-ui .b--white{border-color:#fff}.swagger-ui .b--white-90{border-color:hsla(0,0%,100%,.9)}.swagger-ui .b--white-80{border-color:hsla(0,0%,100%,.8)}.swagger-ui .b--white-70{border-color:hsla(0,0%,100%,.7)}.swagger-ui .b--white-60{border-color:hsla(0,0%,100%,.6)}.swagger-ui .b--white-50{border-color:hsla(0,0%,100%,.5)}.swagger-ui .b--white-40{border-color:hsla(0,0%,100%,.4)}.swagger-ui .b--white-30{border-color:hsla(0,0%,100%,.3)}.swagger-ui .b--white-20{border-color:hsla(0,0%,100%,.2)}.swagger-ui .b--white-10{border-color:hsla(0,0%,100%,.1)}.swagger-ui .b--white-05{border-color:hsla(0,0%,100%,.05)}.swagger-ui .b--white-025{border-color:hsla(0,0%,100%,.025)}.swagger-ui .b--white-0125{border-color:hsla(0,0%,100%,.013)}.swagger-ui .b--black-90{border-color:rgba(0,0,0,.9)}.swagger-ui .b--black-80{border-color:rgba(0,0,0,.8)}.swagger-ui .b--black-70{border-color:rgba(0,0,0,.7)}.swagger-ui .b--black-60{border-color:rgba(0,0,0,.6)}.swagger-ui .b--black-50{border-color:rgba(0,0,0,.5)}.swagger-ui .b--black-40{border-color:rgba(0,0,0,.4)}.swagger-ui .b--black-30{border-color:rgba(0,0,0,.3)}.swagger-ui .b--black-20{border-color:rgba(0,0,0,.2)}.swagger-ui .b--black-10{border-color:rgba(0,0,0,.1)}.swagger-ui .b--black-05{border-color:rgba(0,0,0,.05)}.swagger-ui .b--black-025{border-color:rgba(0,0,0,.025)}.swagger-ui .b--black-0125{border-color:rgba(0,0,0,.013)}.swagger-ui .b--dark-red{border-color:#e7040f}.swagger-ui .b--red{border-color:#ff4136}.swagger-ui .b--light-red{border-color:#ff725c}.swagger-ui .b--orange{border-color:#ff6300}.swagger-ui .b--gold{border-color:#ffb700}.swagger-ui .b--yellow{border-color:gold}.swagger-ui .b--light-yellow{border-color:#fbf1a9}.swagger-ui .b--purple{border-color:#5e2ca5}.swagger-ui .b--light-purple{border-color:#a463f2}.swagger-ui .b--dark-pink{border-color:#d5008f}.swagger-ui .b--hot-pink{border-color:#ff41b4}.swagger-ui .b--pink{border-color:#ff80cc}.swagger-ui .b--light-pink{border-color:#ffa3d7}.swagger-ui .b--dark-green{border-color:#137752}.swagger-ui .b--green{border-color:#19a974}.swagger-ui .b--light-green{border-color:#9eebcf}.swagger-ui .b--navy{border-color:#001b44}.swagger-ui .b--dark-blue{border-color:#00449e}.swagger-ui .b--blue{border-color:#357edd}.swagger-ui .b--light-blue{border-color:#96ccff}.swagger-ui .b--lightest-blue{border-color:#cdecff}.swagger-ui .b--washed-blue{border-color:#f6fffe}.swagger-ui .b--washed-green{border-color:#e8fdf5}.swagger-ui .b--washed-yellow{border-color:#fffceb}.swagger-ui .b--washed-red{border-color:#ffdfdf}.swagger-ui .b--transparent{border-color:transparent}.swagger-ui .b--inherit{border-color:inherit}.swagger-ui .br0{border-radius:0}.swagger-ui .br1{border-radius:.125rem}.swagger-ui .br2{border-radius:.25rem}.swagger-ui .br3{border-radius:.5rem}.swagger-ui .br4{border-radius:1rem}.swagger-ui .br-100{border-radius:100%}.swagger-ui .br-pill{border-radius:9999px}.swagger-ui .br--bottom{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left{border-bottom-right-radius:0;border-top-right-radius:0}@media screen and (min-width:30em){.swagger-ui .br0-ns{border-radius:0}.swagger-ui .br1-ns{border-radius:.125rem}.swagger-ui .br2-ns{border-radius:.25rem}.swagger-ui .br3-ns{border-radius:.5rem}.swagger-ui .br4-ns{border-radius:1rem}.swagger-ui .br-100-ns{border-radius:100%}.swagger-ui .br-pill-ns{border-radius:9999px}.swagger-ui .br--bottom-ns{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top-ns{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right-ns{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left-ns{border-bottom-right-radius:0;border-top-right-radius:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .br0-m{border-radius:0}.swagger-ui .br1-m{border-radius:.125rem}.swagger-ui .br2-m{border-radius:.25rem}.swagger-ui .br3-m{border-radius:.5rem}.swagger-ui .br4-m{border-radius:1rem}.swagger-ui .br-100-m{border-radius:100%}.swagger-ui .br-pill-m{border-radius:9999px}.swagger-ui .br--bottom-m{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top-m{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right-m{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left-m{border-bottom-right-radius:0;border-top-right-radius:0}}@media screen and (min-width:60em){.swagger-ui .br0-l{border-radius:0}.swagger-ui .br1-l{border-radius:.125rem}.swagger-ui .br2-l{border-radius:.25rem}.swagger-ui .br3-l{border-radius:.5rem}.swagger-ui .br4-l{border-radius:1rem}.swagger-ui .br-100-l{border-radius:100%}.swagger-ui .br-pill-l{border-radius:9999px}.swagger-ui .br--bottom-l{border-top-left-radius:0;border-top-right-radius:0}.swagger-ui .br--top-l{border-bottom-left-radius:0;border-bottom-right-radius:0}.swagger-ui .br--right-l{border-bottom-left-radius:0;border-top-left-radius:0}.swagger-ui .br--left-l{border-bottom-right-radius:0;border-top-right-radius:0}}.swagger-ui .b--dotted{border-style:dotted}.swagger-ui .b--dashed{border-style:dashed}.swagger-ui .b--solid{border-style:solid}.swagger-ui .b--none{border-style:none}@media screen and (min-width:30em){.swagger-ui .b--dotted-ns{border-style:dotted}.swagger-ui .b--dashed-ns{border-style:dashed}.swagger-ui .b--solid-ns{border-style:solid}.swagger-ui .b--none-ns{border-style:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .b--dotted-m{border-style:dotted}.swagger-ui .b--dashed-m{border-style:dashed}.swagger-ui .b--solid-m{border-style:solid}.swagger-ui .b--none-m{border-style:none}}@media screen and (min-width:60em){.swagger-ui .b--dotted-l{border-style:dotted}.swagger-ui .b--dashed-l{border-style:dashed}.swagger-ui .b--solid-l{border-style:solid}.swagger-ui .b--none-l{border-style:none}}.swagger-ui .bw0{border-width:0}.swagger-ui .bw1{border-width:.125rem}.swagger-ui .bw2{border-width:.25rem}.swagger-ui .bw3{border-width:.5rem}.swagger-ui .bw4{border-width:1rem}.swagger-ui .bw5{border-width:2rem}.swagger-ui .bt-0{border-top-width:0}.swagger-ui .br-0{border-right-width:0}.swagger-ui .bb-0{border-bottom-width:0}.swagger-ui .bl-0{border-left-width:0}@media screen and (min-width:30em){.swagger-ui .bw0-ns{border-width:0}.swagger-ui .bw1-ns{border-width:.125rem}.swagger-ui .bw2-ns{border-width:.25rem}.swagger-ui .bw3-ns{border-width:.5rem}.swagger-ui .bw4-ns{border-width:1rem}.swagger-ui .bw5-ns{border-width:2rem}.swagger-ui .bt-0-ns{border-top-width:0}.swagger-ui .br-0-ns{border-right-width:0}.swagger-ui .bb-0-ns{border-bottom-width:0}.swagger-ui .bl-0-ns{border-left-width:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .bw0-m{border-width:0}.swagger-ui .bw1-m{border-width:.125rem}.swagger-ui .bw2-m{border-width:.25rem}.swagger-ui .bw3-m{border-width:.5rem}.swagger-ui .bw4-m{border-width:1rem}.swagger-ui .bw5-m{border-width:2rem}.swagger-ui .bt-0-m{border-top-width:0}.swagger-ui .br-0-m{border-right-width:0}.swagger-ui .bb-0-m{border-bottom-width:0}.swagger-ui .bl-0-m{border-left-width:0}}@media screen and (min-width:60em){.swagger-ui .bw0-l{border-width:0}.swagger-ui .bw1-l{border-width:.125rem}.swagger-ui .bw2-l{border-width:.25rem}.swagger-ui .bw3-l{border-width:.5rem}.swagger-ui .bw4-l{border-width:1rem}.swagger-ui .bw5-l{border-width:2rem}.swagger-ui .bt-0-l{border-top-width:0}.swagger-ui .br-0-l{border-right-width:0}.swagger-ui .bb-0-l{border-bottom-width:0}.swagger-ui .bl-0-l{border-left-width:0}}.swagger-ui .shadow-1{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}@media screen and (min-width:30em){.swagger-ui .shadow-1-ns{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2-ns{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3-ns{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4-ns{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5-ns{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .shadow-1-m{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2-m{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3-m{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4-m{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5-m{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}}@media screen and (min-width:60em){.swagger-ui .shadow-1-l{box-shadow:0 0 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-2-l{box-shadow:0 0 8px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-3-l{box-shadow:2px 2px 4px 2px rgba(0,0,0,.2)}.swagger-ui .shadow-4-l{box-shadow:2px 2px 8px 0 rgba(0,0,0,.2)}.swagger-ui .shadow-5-l{box-shadow:4px 4px 8px 0 rgba(0,0,0,.2)}}.swagger-ui .pre{overflow-x:auto;overflow-y:hidden;overflow:scroll}.swagger-ui .top-0{top:0}.swagger-ui .right-0{right:0}.swagger-ui .bottom-0{bottom:0}.swagger-ui .left-0{left:0}.swagger-ui .top-1{top:1rem}.swagger-ui .right-1{right:1rem}.swagger-ui .bottom-1{bottom:1rem}.swagger-ui .left-1{left:1rem}.swagger-ui .top-2{top:2rem}.swagger-ui .right-2{right:2rem}.swagger-ui .bottom-2{bottom:2rem}.swagger-ui .left-2{left:2rem}.swagger-ui .top--1{top:-1rem}.swagger-ui .right--1{right:-1rem}.swagger-ui .bottom--1{bottom:-1rem}.swagger-ui .left--1{left:-1rem}.swagger-ui .top--2{top:-2rem}.swagger-ui .right--2{right:-2rem}.swagger-ui .bottom--2{bottom:-2rem}.swagger-ui .left--2{left:-2rem}.swagger-ui .absolute--fill{bottom:0;left:0;right:0;top:0}@media screen and (min-width:30em){.swagger-ui .top-0-ns{top:0}.swagger-ui .left-0-ns{left:0}.swagger-ui .right-0-ns{right:0}.swagger-ui .bottom-0-ns{bottom:0}.swagger-ui .top-1-ns{top:1rem}.swagger-ui .left-1-ns{left:1rem}.swagger-ui .right-1-ns{right:1rem}.swagger-ui .bottom-1-ns{bottom:1rem}.swagger-ui .top-2-ns{top:2rem}.swagger-ui .left-2-ns{left:2rem}.swagger-ui .right-2-ns{right:2rem}.swagger-ui .bottom-2-ns{bottom:2rem}.swagger-ui .top--1-ns{top:-1rem}.swagger-ui .right--1-ns{right:-1rem}.swagger-ui .bottom--1-ns{bottom:-1rem}.swagger-ui .left--1-ns{left:-1rem}.swagger-ui .top--2-ns{top:-2rem}.swagger-ui .right--2-ns{right:-2rem}.swagger-ui .bottom--2-ns{bottom:-2rem}.swagger-ui .left--2-ns{left:-2rem}.swagger-ui .absolute--fill-ns{bottom:0;left:0;right:0;top:0}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .top-0-m{top:0}.swagger-ui .left-0-m{left:0}.swagger-ui .right-0-m{right:0}.swagger-ui .bottom-0-m{bottom:0}.swagger-ui .top-1-m{top:1rem}.swagger-ui .left-1-m{left:1rem}.swagger-ui .right-1-m{right:1rem}.swagger-ui .bottom-1-m{bottom:1rem}.swagger-ui .top-2-m{top:2rem}.swagger-ui .left-2-m{left:2rem}.swagger-ui .right-2-m{right:2rem}.swagger-ui .bottom-2-m{bottom:2rem}.swagger-ui .top--1-m{top:-1rem}.swagger-ui .right--1-m{right:-1rem}.swagger-ui .bottom--1-m{bottom:-1rem}.swagger-ui .left--1-m{left:-1rem}.swagger-ui .top--2-m{top:-2rem}.swagger-ui .right--2-m{right:-2rem}.swagger-ui .bottom--2-m{bottom:-2rem}.swagger-ui .left--2-m{left:-2rem}.swagger-ui .absolute--fill-m{bottom:0;left:0;right:0;top:0}}@media screen and (min-width:60em){.swagger-ui .top-0-l{top:0}.swagger-ui .left-0-l{left:0}.swagger-ui .right-0-l{right:0}.swagger-ui .bottom-0-l{bottom:0}.swagger-ui .top-1-l{top:1rem}.swagger-ui .left-1-l{left:1rem}.swagger-ui .right-1-l{right:1rem}.swagger-ui .bottom-1-l{bottom:1rem}.swagger-ui .top-2-l{top:2rem}.swagger-ui .left-2-l{left:2rem}.swagger-ui .right-2-l{right:2rem}.swagger-ui .bottom-2-l{bottom:2rem}.swagger-ui .top--1-l{top:-1rem}.swagger-ui .right--1-l{right:-1rem}.swagger-ui .bottom--1-l{bottom:-1rem}.swagger-ui .left--1-l{left:-1rem}.swagger-ui .top--2-l{top:-2rem}.swagger-ui .right--2-l{right:-2rem}.swagger-ui .bottom--2-l{bottom:-2rem}.swagger-ui .left--2-l{left:-2rem}.swagger-ui .absolute--fill-l{bottom:0;left:0;right:0;top:0}}.swagger-ui .cf:after,.swagger-ui .cf:before{content:\" \";display:table}.swagger-ui .cf:after{clear:both}.swagger-ui .cf{zoom:1}.swagger-ui .cl{clear:left}.swagger-ui .cr{clear:right}.swagger-ui .cb{clear:both}.swagger-ui .cn{clear:none}@media screen and (min-width:30em){.swagger-ui .cl-ns{clear:left}.swagger-ui .cr-ns{clear:right}.swagger-ui .cb-ns{clear:both}.swagger-ui .cn-ns{clear:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .cl-m{clear:left}.swagger-ui .cr-m{clear:right}.swagger-ui .cb-m{clear:both}.swagger-ui .cn-m{clear:none}}@media screen and (min-width:60em){.swagger-ui .cl-l{clear:left}.swagger-ui .cr-l{clear:right}.swagger-ui .cb-l{clear:both}.swagger-ui .cn-l{clear:none}}.swagger-ui .flex{display:flex}.swagger-ui .inline-flex{display:inline-flex}.swagger-ui .flex-auto{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none{flex:none}.swagger-ui .flex-column{flex-direction:column}.swagger-ui .flex-row{flex-direction:row}.swagger-ui .flex-wrap{flex-wrap:wrap}.swagger-ui .flex-nowrap{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse{flex-direction:column-reverse}.swagger-ui .flex-row-reverse{flex-direction:row-reverse}.swagger-ui .items-start{align-items:flex-start}.swagger-ui .items-end{align-items:flex-end}.swagger-ui .items-center{align-items:center}.swagger-ui .items-baseline{align-items:baseline}.swagger-ui .items-stretch{align-items:stretch}.swagger-ui .self-start{align-self:flex-start}.swagger-ui .self-end{align-self:flex-end}.swagger-ui .self-center{align-self:center}.swagger-ui .self-baseline{align-self:baseline}.swagger-ui .self-stretch{align-self:stretch}.swagger-ui .justify-start{justify-content:flex-start}.swagger-ui .justify-end{justify-content:flex-end}.swagger-ui .justify-center{justify-content:center}.swagger-ui .justify-between{justify-content:space-between}.swagger-ui .justify-around{justify-content:space-around}.swagger-ui .content-start{align-content:flex-start}.swagger-ui .content-end{align-content:flex-end}.swagger-ui .content-center{align-content:center}.swagger-ui .content-between{align-content:space-between}.swagger-ui .content-around{align-content:space-around}.swagger-ui .content-stretch{align-content:stretch}.swagger-ui .order-0{order:0}.swagger-ui .order-1{order:1}.swagger-ui .order-2{order:2}.swagger-ui .order-3{order:3}.swagger-ui .order-4{order:4}.swagger-ui .order-5{order:5}.swagger-ui .order-6{order:6}.swagger-ui .order-7{order:7}.swagger-ui .order-8{order:8}.swagger-ui .order-last{order:99999}.swagger-ui .flex-grow-0{flex-grow:0}.swagger-ui .flex-grow-1{flex-grow:1}.swagger-ui .flex-shrink-0{flex-shrink:0}.swagger-ui .flex-shrink-1{flex-shrink:1}@media screen and (min-width:30em){.swagger-ui .flex-ns{display:flex}.swagger-ui .inline-flex-ns{display:inline-flex}.swagger-ui .flex-auto-ns{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none-ns{flex:none}.swagger-ui .flex-column-ns{flex-direction:column}.swagger-ui .flex-row-ns{flex-direction:row}.swagger-ui .flex-wrap-ns{flex-wrap:wrap}.swagger-ui .flex-nowrap-ns{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse-ns{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse-ns{flex-direction:column-reverse}.swagger-ui .flex-row-reverse-ns{flex-direction:row-reverse}.swagger-ui .items-start-ns{align-items:flex-start}.swagger-ui .items-end-ns{align-items:flex-end}.swagger-ui .items-center-ns{align-items:center}.swagger-ui .items-baseline-ns{align-items:baseline}.swagger-ui .items-stretch-ns{align-items:stretch}.swagger-ui .self-start-ns{align-self:flex-start}.swagger-ui .self-end-ns{align-self:flex-end}.swagger-ui .self-center-ns{align-self:center}.swagger-ui .self-baseline-ns{align-self:baseline}.swagger-ui .self-stretch-ns{align-self:stretch}.swagger-ui .justify-start-ns{justify-content:flex-start}.swagger-ui .justify-end-ns{justify-content:flex-end}.swagger-ui .justify-center-ns{justify-content:center}.swagger-ui .justify-between-ns{justify-content:space-between}.swagger-ui .justify-around-ns{justify-content:space-around}.swagger-ui .content-start-ns{align-content:flex-start}.swagger-ui .content-end-ns{align-content:flex-end}.swagger-ui .content-center-ns{align-content:center}.swagger-ui .content-between-ns{align-content:space-between}.swagger-ui .content-around-ns{align-content:space-around}.swagger-ui .content-stretch-ns{align-content:stretch}.swagger-ui .order-0-ns{order:0}.swagger-ui .order-1-ns{order:1}.swagger-ui .order-2-ns{order:2}.swagger-ui .order-3-ns{order:3}.swagger-ui .order-4-ns{order:4}.swagger-ui .order-5-ns{order:5}.swagger-ui .order-6-ns{order:6}.swagger-ui .order-7-ns{order:7}.swagger-ui .order-8-ns{order:8}.swagger-ui .order-last-ns{order:99999}.swagger-ui .flex-grow-0-ns{flex-grow:0}.swagger-ui .flex-grow-1-ns{flex-grow:1}.swagger-ui .flex-shrink-0-ns{flex-shrink:0}.swagger-ui .flex-shrink-1-ns{flex-shrink:1}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .flex-m{display:flex}.swagger-ui .inline-flex-m{display:inline-flex}.swagger-ui .flex-auto-m{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none-m{flex:none}.swagger-ui .flex-column-m{flex-direction:column}.swagger-ui .flex-row-m{flex-direction:row}.swagger-ui .flex-wrap-m{flex-wrap:wrap}.swagger-ui .flex-nowrap-m{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse-m{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse-m{flex-direction:column-reverse}.swagger-ui .flex-row-reverse-m{flex-direction:row-reverse}.swagger-ui .items-start-m{align-items:flex-start}.swagger-ui .items-end-m{align-items:flex-end}.swagger-ui .items-center-m{align-items:center}.swagger-ui .items-baseline-m{align-items:baseline}.swagger-ui .items-stretch-m{align-items:stretch}.swagger-ui .self-start-m{align-self:flex-start}.swagger-ui .self-end-m{align-self:flex-end}.swagger-ui .self-center-m{align-self:center}.swagger-ui .self-baseline-m{align-self:baseline}.swagger-ui .self-stretch-m{align-self:stretch}.swagger-ui .justify-start-m{justify-content:flex-start}.swagger-ui .justify-end-m{justify-content:flex-end}.swagger-ui .justify-center-m{justify-content:center}.swagger-ui .justify-between-m{justify-content:space-between}.swagger-ui .justify-around-m{justify-content:space-around}.swagger-ui .content-start-m{align-content:flex-start}.swagger-ui .content-end-m{align-content:flex-end}.swagger-ui .content-center-m{align-content:center}.swagger-ui .content-between-m{align-content:space-between}.swagger-ui .content-around-m{align-content:space-around}.swagger-ui .content-stretch-m{align-content:stretch}.swagger-ui .order-0-m{order:0}.swagger-ui .order-1-m{order:1}.swagger-ui .order-2-m{order:2}.swagger-ui .order-3-m{order:3}.swagger-ui .order-4-m{order:4}.swagger-ui .order-5-m{order:5}.swagger-ui .order-6-m{order:6}.swagger-ui .order-7-m{order:7}.swagger-ui .order-8-m{order:8}.swagger-ui .order-last-m{order:99999}.swagger-ui .flex-grow-0-m{flex-grow:0}.swagger-ui .flex-grow-1-m{flex-grow:1}.swagger-ui .flex-shrink-0-m{flex-shrink:0}.swagger-ui .flex-shrink-1-m{flex-shrink:1}}@media screen and (min-width:60em){.swagger-ui .flex-l{display:flex}.swagger-ui .inline-flex-l{display:inline-flex}.swagger-ui .flex-auto-l{flex:1 1 auto;min-height:0;min-width:0}.swagger-ui .flex-none-l{flex:none}.swagger-ui .flex-column-l{flex-direction:column}.swagger-ui .flex-row-l{flex-direction:row}.swagger-ui .flex-wrap-l{flex-wrap:wrap}.swagger-ui .flex-nowrap-l{flex-wrap:nowrap}.swagger-ui .flex-wrap-reverse-l{flex-wrap:wrap-reverse}.swagger-ui .flex-column-reverse-l{flex-direction:column-reverse}.swagger-ui .flex-row-reverse-l{flex-direction:row-reverse}.swagger-ui .items-start-l{align-items:flex-start}.swagger-ui .items-end-l{align-items:flex-end}.swagger-ui .items-center-l{align-items:center}.swagger-ui .items-baseline-l{align-items:baseline}.swagger-ui .items-stretch-l{align-items:stretch}.swagger-ui .self-start-l{align-self:flex-start}.swagger-ui .self-end-l{align-self:flex-end}.swagger-ui .self-center-l{align-self:center}.swagger-ui .self-baseline-l{align-self:baseline}.swagger-ui .self-stretch-l{align-self:stretch}.swagger-ui .justify-start-l{justify-content:flex-start}.swagger-ui .justify-end-l{justify-content:flex-end}.swagger-ui .justify-center-l{justify-content:center}.swagger-ui .justify-between-l{justify-content:space-between}.swagger-ui .justify-around-l{justify-content:space-around}.swagger-ui .content-start-l{align-content:flex-start}.swagger-ui .content-end-l{align-content:flex-end}.swagger-ui .content-center-l{align-content:center}.swagger-ui .content-between-l{align-content:space-between}.swagger-ui .content-around-l{align-content:space-around}.swagger-ui .content-stretch-l{align-content:stretch}.swagger-ui .order-0-l{order:0}.swagger-ui .order-1-l{order:1}.swagger-ui .order-2-l{order:2}.swagger-ui .order-3-l{order:3}.swagger-ui .order-4-l{order:4}.swagger-ui .order-5-l{order:5}.swagger-ui .order-6-l{order:6}.swagger-ui .order-7-l{order:7}.swagger-ui .order-8-l{order:8}.swagger-ui .order-last-l{order:99999}.swagger-ui .flex-grow-0-l{flex-grow:0}.swagger-ui .flex-grow-1-l{flex-grow:1}.swagger-ui .flex-shrink-0-l{flex-shrink:0}.swagger-ui .flex-shrink-1-l{flex-shrink:1}}.swagger-ui .dn{display:none}.swagger-ui .di{display:inline}.swagger-ui .db{display:block}.swagger-ui .dib{display:inline-block}.swagger-ui .dit{display:inline-table}.swagger-ui .dt{display:table}.swagger-ui .dtc{display:table-cell}.swagger-ui .dt-row{display:table-row}.swagger-ui .dt-row-group{display:table-row-group}.swagger-ui .dt-column{display:table-column}.swagger-ui .dt-column-group{display:table-column-group}.swagger-ui .dt--fixed{table-layout:fixed;width:100%}@media screen and (min-width:30em){.swagger-ui .dn-ns{display:none}.swagger-ui .di-ns{display:inline}.swagger-ui .db-ns{display:block}.swagger-ui .dib-ns{display:inline-block}.swagger-ui .dit-ns{display:inline-table}.swagger-ui .dt-ns{display:table}.swagger-ui .dtc-ns{display:table-cell}.swagger-ui .dt-row-ns{display:table-row}.swagger-ui .dt-row-group-ns{display:table-row-group}.swagger-ui .dt-column-ns{display:table-column}.swagger-ui .dt-column-group-ns{display:table-column-group}.swagger-ui .dt--fixed-ns{table-layout:fixed;width:100%}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .dn-m{display:none}.swagger-ui .di-m{display:inline}.swagger-ui .db-m{display:block}.swagger-ui .dib-m{display:inline-block}.swagger-ui .dit-m{display:inline-table}.swagger-ui .dt-m{display:table}.swagger-ui .dtc-m{display:table-cell}.swagger-ui .dt-row-m{display:table-row}.swagger-ui .dt-row-group-m{display:table-row-group}.swagger-ui .dt-column-m{display:table-column}.swagger-ui .dt-column-group-m{display:table-column-group}.swagger-ui .dt--fixed-m{table-layout:fixed;width:100%}}@media screen and (min-width:60em){.swagger-ui .dn-l{display:none}.swagger-ui .di-l{display:inline}.swagger-ui .db-l{display:block}.swagger-ui .dib-l{display:inline-block}.swagger-ui .dit-l{display:inline-table}.swagger-ui .dt-l{display:table}.swagger-ui .dtc-l{display:table-cell}.swagger-ui .dt-row-l{display:table-row}.swagger-ui .dt-row-group-l{display:table-row-group}.swagger-ui .dt-column-l{display:table-column}.swagger-ui .dt-column-group-l{display:table-column-group}.swagger-ui .dt--fixed-l{table-layout:fixed;width:100%}}.swagger-ui .fl{_display:inline;float:left}.swagger-ui .fr{_display:inline;float:right}.swagger-ui .fn{float:none}@media screen and (min-width:30em){.swagger-ui .fl-ns{_display:inline;float:left}.swagger-ui .fr-ns{_display:inline;float:right}.swagger-ui .fn-ns{float:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .fl-m{_display:inline;float:left}.swagger-ui .fr-m{_display:inline;float:right}.swagger-ui .fn-m{float:none}}@media screen and (min-width:60em){.swagger-ui .fl-l{_display:inline;float:left}.swagger-ui .fr-l{_display:inline;float:right}.swagger-ui .fn-l{float:none}}.swagger-ui .sans-serif{font-family:-apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica,helvetica neue,ubuntu,roboto,noto,segoe ui,arial,sans-serif}.swagger-ui .serif{font-family:georgia,serif}.swagger-ui .system-sans-serif{font-family:sans-serif}.swagger-ui .system-serif{font-family:serif}.swagger-ui .code,.swagger-ui code{font-family:Consolas,monaco,monospace}.swagger-ui .courier{font-family:Courier Next,courier,monospace}.swagger-ui .helvetica{font-family:helvetica neue,helvetica,sans-serif}.swagger-ui .avenir{font-family:avenir next,avenir,sans-serif}.swagger-ui .athelas{font-family:athelas,georgia,serif}.swagger-ui .georgia{font-family:georgia,serif}.swagger-ui .times{font-family:times,serif}.swagger-ui .bodoni{font-family:Bodoni MT,serif}.swagger-ui .calisto{font-family:Calisto MT,serif}.swagger-ui .garamond{font-family:garamond,serif}.swagger-ui .baskerville{font-family:baskerville,serif}.swagger-ui .i{font-style:italic}.swagger-ui .fs-normal{font-style:normal}@media screen and (min-width:30em){.swagger-ui .i-ns{font-style:italic}.swagger-ui .fs-normal-ns{font-style:normal}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .i-m{font-style:italic}.swagger-ui .fs-normal-m{font-style:normal}}@media screen and (min-width:60em){.swagger-ui .i-l{font-style:italic}.swagger-ui .fs-normal-l{font-style:normal}}.swagger-ui .normal{font-weight:400}.swagger-ui .b{font-weight:700}.swagger-ui .fw1{font-weight:100}.swagger-ui .fw2{font-weight:200}.swagger-ui .fw3{font-weight:300}.swagger-ui .fw4{font-weight:400}.swagger-ui .fw5{font-weight:500}.swagger-ui .fw6{font-weight:600}.swagger-ui .fw7{font-weight:700}.swagger-ui .fw8{font-weight:800}.swagger-ui .fw9{font-weight:900}@media screen and (min-width:30em){.swagger-ui .normal-ns{font-weight:400}.swagger-ui .b-ns{font-weight:700}.swagger-ui .fw1-ns{font-weight:100}.swagger-ui .fw2-ns{font-weight:200}.swagger-ui .fw3-ns{font-weight:300}.swagger-ui .fw4-ns{font-weight:400}.swagger-ui .fw5-ns{font-weight:500}.swagger-ui .fw6-ns{font-weight:600}.swagger-ui .fw7-ns{font-weight:700}.swagger-ui .fw8-ns{font-weight:800}.swagger-ui .fw9-ns{font-weight:900}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .normal-m{font-weight:400}.swagger-ui .b-m{font-weight:700}.swagger-ui .fw1-m{font-weight:100}.swagger-ui .fw2-m{font-weight:200}.swagger-ui .fw3-m{font-weight:300}.swagger-ui .fw4-m{font-weight:400}.swagger-ui .fw5-m{font-weight:500}.swagger-ui .fw6-m{font-weight:600}.swagger-ui .fw7-m{font-weight:700}.swagger-ui .fw8-m{font-weight:800}.swagger-ui .fw9-m{font-weight:900}}@media screen and (min-width:60em){.swagger-ui .normal-l{font-weight:400}.swagger-ui .b-l{font-weight:700}.swagger-ui .fw1-l{font-weight:100}.swagger-ui .fw2-l{font-weight:200}.swagger-ui .fw3-l{font-weight:300}.swagger-ui .fw4-l{font-weight:400}.swagger-ui .fw5-l{font-weight:500}.swagger-ui .fw6-l{font-weight:600}.swagger-ui .fw7-l{font-weight:700}.swagger-ui .fw8-l{font-weight:800}.swagger-ui .fw9-l{font-weight:900}}.swagger-ui .input-reset{-webkit-appearance:none;-moz-appearance:none}.swagger-ui .button-reset::-moz-focus-inner,.swagger-ui .input-reset::-moz-focus-inner{border:0;padding:0}.swagger-ui .h1{height:1rem}.swagger-ui .h2{height:2rem}.swagger-ui .h3{height:4rem}.swagger-ui .h4{height:8rem}.swagger-ui .h5{height:16rem}.swagger-ui .h-25{height:25%}.swagger-ui .h-50{height:50%}.swagger-ui .h-75{height:75%}.swagger-ui .h-100{height:100%}.swagger-ui .min-h-100{min-height:100%}.swagger-ui .vh-25{height:25vh}.swagger-ui .vh-50{height:50vh}.swagger-ui .vh-75{height:75vh}.swagger-ui .vh-100{height:100vh}.swagger-ui .min-vh-100{min-height:100vh}.swagger-ui .h-auto{height:auto}.swagger-ui .h-inherit{height:inherit}@media screen and (min-width:30em){.swagger-ui .h1-ns{height:1rem}.swagger-ui .h2-ns{height:2rem}.swagger-ui .h3-ns{height:4rem}.swagger-ui .h4-ns{height:8rem}.swagger-ui .h5-ns{height:16rem}.swagger-ui .h-25-ns{height:25%}.swagger-ui .h-50-ns{height:50%}.swagger-ui .h-75-ns{height:75%}.swagger-ui .h-100-ns{height:100%}.swagger-ui .min-h-100-ns{min-height:100%}.swagger-ui .vh-25-ns{height:25vh}.swagger-ui .vh-50-ns{height:50vh}.swagger-ui .vh-75-ns{height:75vh}.swagger-ui .vh-100-ns{height:100vh}.swagger-ui .min-vh-100-ns{min-height:100vh}.swagger-ui .h-auto-ns{height:auto}.swagger-ui .h-inherit-ns{height:inherit}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .h1-m{height:1rem}.swagger-ui .h2-m{height:2rem}.swagger-ui .h3-m{height:4rem}.swagger-ui .h4-m{height:8rem}.swagger-ui .h5-m{height:16rem}.swagger-ui .h-25-m{height:25%}.swagger-ui .h-50-m{height:50%}.swagger-ui .h-75-m{height:75%}.swagger-ui .h-100-m{height:100%}.swagger-ui .min-h-100-m{min-height:100%}.swagger-ui .vh-25-m{height:25vh}.swagger-ui .vh-50-m{height:50vh}.swagger-ui .vh-75-m{height:75vh}.swagger-ui .vh-100-m{height:100vh}.swagger-ui .min-vh-100-m{min-height:100vh}.swagger-ui .h-auto-m{height:auto}.swagger-ui .h-inherit-m{height:inherit}}@media screen and (min-width:60em){.swagger-ui .h1-l{height:1rem}.swagger-ui .h2-l{height:2rem}.swagger-ui .h3-l{height:4rem}.swagger-ui .h4-l{height:8rem}.swagger-ui .h5-l{height:16rem}.swagger-ui .h-25-l{height:25%}.swagger-ui .h-50-l{height:50%}.swagger-ui .h-75-l{height:75%}.swagger-ui .h-100-l{height:100%}.swagger-ui .min-h-100-l{min-height:100%}.swagger-ui .vh-25-l{height:25vh}.swagger-ui .vh-50-l{height:50vh}.swagger-ui .vh-75-l{height:75vh}.swagger-ui .vh-100-l{height:100vh}.swagger-ui .min-vh-100-l{min-height:100vh}.swagger-ui .h-auto-l{height:auto}.swagger-ui .h-inherit-l{height:inherit}}.swagger-ui .tracked{letter-spacing:.1em}.swagger-ui .tracked-tight{letter-spacing:-.05em}.swagger-ui .tracked-mega{letter-spacing:.25em}@media screen and (min-width:30em){.swagger-ui .tracked-ns{letter-spacing:.1em}.swagger-ui .tracked-tight-ns{letter-spacing:-.05em}.swagger-ui .tracked-mega-ns{letter-spacing:.25em}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .tracked-m{letter-spacing:.1em}.swagger-ui .tracked-tight-m{letter-spacing:-.05em}.swagger-ui .tracked-mega-m{letter-spacing:.25em}}@media screen and (min-width:60em){.swagger-ui .tracked-l{letter-spacing:.1em}.swagger-ui .tracked-tight-l{letter-spacing:-.05em}.swagger-ui .tracked-mega-l{letter-spacing:.25em}}.swagger-ui .lh-solid{line-height:1}.swagger-ui .lh-title{line-height:1.25}.swagger-ui .lh-copy{line-height:1.5}@media screen and (min-width:30em){.swagger-ui .lh-solid-ns{line-height:1}.swagger-ui .lh-title-ns{line-height:1.25}.swagger-ui .lh-copy-ns{line-height:1.5}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .lh-solid-m{line-height:1}.swagger-ui .lh-title-m{line-height:1.25}.swagger-ui .lh-copy-m{line-height:1.5}}@media screen and (min-width:60em){.swagger-ui .lh-solid-l{line-height:1}.swagger-ui .lh-title-l{line-height:1.25}.swagger-ui .lh-copy-l{line-height:1.5}}.swagger-ui .link{-webkit-text-decoration:none;text-decoration:none}.swagger-ui .link,.swagger-ui .link:active,.swagger-ui .link:focus,.swagger-ui .link:hover,.swagger-ui .link:link,.swagger-ui .link:visited{transition:color .15s ease-in}.swagger-ui .link:focus{outline:1px dotted currentColor}.swagger-ui .list{list-style-type:none}.swagger-ui .mw-100{max-width:100%}.swagger-ui .mw1{max-width:1rem}.swagger-ui .mw2{max-width:2rem}.swagger-ui .mw3{max-width:4rem}.swagger-ui .mw4{max-width:8rem}.swagger-ui .mw5{max-width:16rem}.swagger-ui .mw6{max-width:32rem}.swagger-ui .mw7{max-width:48rem}.swagger-ui .mw8{max-width:64rem}.swagger-ui .mw9{max-width:96rem}.swagger-ui .mw-none{max-width:none}@media screen and (min-width:30em){.swagger-ui .mw-100-ns{max-width:100%}.swagger-ui .mw1-ns{max-width:1rem}.swagger-ui .mw2-ns{max-width:2rem}.swagger-ui .mw3-ns{max-width:4rem}.swagger-ui .mw4-ns{max-width:8rem}.swagger-ui .mw5-ns{max-width:16rem}.swagger-ui .mw6-ns{max-width:32rem}.swagger-ui .mw7-ns{max-width:48rem}.swagger-ui .mw8-ns{max-width:64rem}.swagger-ui .mw9-ns{max-width:96rem}.swagger-ui .mw-none-ns{max-width:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .mw-100-m{max-width:100%}.swagger-ui .mw1-m{max-width:1rem}.swagger-ui .mw2-m{max-width:2rem}.swagger-ui .mw3-m{max-width:4rem}.swagger-ui .mw4-m{max-width:8rem}.swagger-ui .mw5-m{max-width:16rem}.swagger-ui .mw6-m{max-width:32rem}.swagger-ui .mw7-m{max-width:48rem}.swagger-ui .mw8-m{max-width:64rem}.swagger-ui .mw9-m{max-width:96rem}.swagger-ui .mw-none-m{max-width:none}}@media screen and (min-width:60em){.swagger-ui .mw-100-l{max-width:100%}.swagger-ui .mw1-l{max-width:1rem}.swagger-ui .mw2-l{max-width:2rem}.swagger-ui .mw3-l{max-width:4rem}.swagger-ui .mw4-l{max-width:8rem}.swagger-ui .mw5-l{max-width:16rem}.swagger-ui .mw6-l{max-width:32rem}.swagger-ui .mw7-l{max-width:48rem}.swagger-ui .mw8-l{max-width:64rem}.swagger-ui .mw9-l{max-width:96rem}.swagger-ui .mw-none-l{max-width:none}}.swagger-ui .w1{width:1rem}.swagger-ui .w2{width:2rem}.swagger-ui .w3{width:4rem}.swagger-ui .w4{width:8rem}.swagger-ui .w5{width:16rem}.swagger-ui .w-10{width:10%}.swagger-ui .w-20{width:20%}.swagger-ui .w-25{width:25%}.swagger-ui .w-30{width:30%}.swagger-ui .w-33{width:33%}.swagger-ui .w-34{width:34%}.swagger-ui .w-40{width:40%}.swagger-ui .w-50{width:50%}.swagger-ui .w-60{width:60%}.swagger-ui .w-70{width:70%}.swagger-ui .w-75{width:75%}.swagger-ui .w-80{width:80%}.swagger-ui .w-90{width:90%}.swagger-ui .w-100{width:100%}.swagger-ui .w-third{width:33.3333333333%}.swagger-ui .w-two-thirds{width:66.6666666667%}.swagger-ui .w-auto{width:auto}@media screen and (min-width:30em){.swagger-ui .w1-ns{width:1rem}.swagger-ui .w2-ns{width:2rem}.swagger-ui .w3-ns{width:4rem}.swagger-ui .w4-ns{width:8rem}.swagger-ui .w5-ns{width:16rem}.swagger-ui .w-10-ns{width:10%}.swagger-ui .w-20-ns{width:20%}.swagger-ui .w-25-ns{width:25%}.swagger-ui .w-30-ns{width:30%}.swagger-ui .w-33-ns{width:33%}.swagger-ui .w-34-ns{width:34%}.swagger-ui .w-40-ns{width:40%}.swagger-ui .w-50-ns{width:50%}.swagger-ui .w-60-ns{width:60%}.swagger-ui .w-70-ns{width:70%}.swagger-ui .w-75-ns{width:75%}.swagger-ui .w-80-ns{width:80%}.swagger-ui .w-90-ns{width:90%}.swagger-ui .w-100-ns{width:100%}.swagger-ui .w-third-ns{width:33.3333333333%}.swagger-ui .w-two-thirds-ns{width:66.6666666667%}.swagger-ui .w-auto-ns{width:auto}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .w1-m{width:1rem}.swagger-ui .w2-m{width:2rem}.swagger-ui .w3-m{width:4rem}.swagger-ui .w4-m{width:8rem}.swagger-ui .w5-m{width:16rem}.swagger-ui .w-10-m{width:10%}.swagger-ui .w-20-m{width:20%}.swagger-ui .w-25-m{width:25%}.swagger-ui .w-30-m{width:30%}.swagger-ui .w-33-m{width:33%}.swagger-ui .w-34-m{width:34%}.swagger-ui .w-40-m{width:40%}.swagger-ui .w-50-m{width:50%}.swagger-ui .w-60-m{width:60%}.swagger-ui .w-70-m{width:70%}.swagger-ui .w-75-m{width:75%}.swagger-ui .w-80-m{width:80%}.swagger-ui .w-90-m{width:90%}.swagger-ui .w-100-m{width:100%}.swagger-ui .w-third-m{width:33.3333333333%}.swagger-ui .w-two-thirds-m{width:66.6666666667%}.swagger-ui .w-auto-m{width:auto}}@media screen and (min-width:60em){.swagger-ui .w1-l{width:1rem}.swagger-ui .w2-l{width:2rem}.swagger-ui .w3-l{width:4rem}.swagger-ui .w4-l{width:8rem}.swagger-ui .w5-l{width:16rem}.swagger-ui .w-10-l{width:10%}.swagger-ui .w-20-l{width:20%}.swagger-ui .w-25-l{width:25%}.swagger-ui .w-30-l{width:30%}.swagger-ui .w-33-l{width:33%}.swagger-ui .w-34-l{width:34%}.swagger-ui .w-40-l{width:40%}.swagger-ui .w-50-l{width:50%}.swagger-ui .w-60-l{width:60%}.swagger-ui .w-70-l{width:70%}.swagger-ui .w-75-l{width:75%}.swagger-ui .w-80-l{width:80%}.swagger-ui .w-90-l{width:90%}.swagger-ui .w-100-l{width:100%}.swagger-ui .w-third-l{width:33.3333333333%}.swagger-ui .w-two-thirds-l{width:66.6666666667%}.swagger-ui .w-auto-l{width:auto}}.swagger-ui .overflow-visible{overflow:visible}.swagger-ui .overflow-hidden{overflow:hidden}.swagger-ui .overflow-scroll{overflow:scroll}.swagger-ui .overflow-auto{overflow:auto}.swagger-ui .overflow-x-visible{overflow-x:visible}.swagger-ui .overflow-x-hidden{overflow-x:hidden}.swagger-ui .overflow-x-scroll{overflow-x:scroll}.swagger-ui .overflow-x-auto{overflow-x:auto}.swagger-ui .overflow-y-visible{overflow-y:visible}.swagger-ui .overflow-y-hidden{overflow-y:hidden}.swagger-ui .overflow-y-scroll{overflow-y:scroll}.swagger-ui .overflow-y-auto{overflow-y:auto}@media screen and (min-width:30em){.swagger-ui .overflow-visible-ns{overflow:visible}.swagger-ui .overflow-hidden-ns{overflow:hidden}.swagger-ui .overflow-scroll-ns{overflow:scroll}.swagger-ui .overflow-auto-ns{overflow:auto}.swagger-ui .overflow-x-visible-ns{overflow-x:visible}.swagger-ui .overflow-x-hidden-ns{overflow-x:hidden}.swagger-ui .overflow-x-scroll-ns{overflow-x:scroll}.swagger-ui .overflow-x-auto-ns{overflow-x:auto}.swagger-ui .overflow-y-visible-ns{overflow-y:visible}.swagger-ui .overflow-y-hidden-ns{overflow-y:hidden}.swagger-ui .overflow-y-scroll-ns{overflow-y:scroll}.swagger-ui .overflow-y-auto-ns{overflow-y:auto}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .overflow-visible-m{overflow:visible}.swagger-ui .overflow-hidden-m{overflow:hidden}.swagger-ui .overflow-scroll-m{overflow:scroll}.swagger-ui .overflow-auto-m{overflow:auto}.swagger-ui .overflow-x-visible-m{overflow-x:visible}.swagger-ui .overflow-x-hidden-m{overflow-x:hidden}.swagger-ui .overflow-x-scroll-m{overflow-x:scroll}.swagger-ui .overflow-x-auto-m{overflow-x:auto}.swagger-ui .overflow-y-visible-m{overflow-y:visible}.swagger-ui .overflow-y-hidden-m{overflow-y:hidden}.swagger-ui .overflow-y-scroll-m{overflow-y:scroll}.swagger-ui .overflow-y-auto-m{overflow-y:auto}}@media screen and (min-width:60em){.swagger-ui .overflow-visible-l{overflow:visible}.swagger-ui .overflow-hidden-l{overflow:hidden}.swagger-ui .overflow-scroll-l{overflow:scroll}.swagger-ui .overflow-auto-l{overflow:auto}.swagger-ui .overflow-x-visible-l{overflow-x:visible}.swagger-ui .overflow-x-hidden-l{overflow-x:hidden}.swagger-ui .overflow-x-scroll-l{overflow-x:scroll}.swagger-ui .overflow-x-auto-l{overflow-x:auto}.swagger-ui .overflow-y-visible-l{overflow-y:visible}.swagger-ui .overflow-y-hidden-l{overflow-y:hidden}.swagger-ui .overflow-y-scroll-l{overflow-y:scroll}.swagger-ui .overflow-y-auto-l{overflow-y:auto}}.swagger-ui .static{position:static}.swagger-ui .relative{position:relative}.swagger-ui .absolute{position:absolute}.swagger-ui .fixed{position:fixed}@media screen and (min-width:30em){.swagger-ui .static-ns{position:static}.swagger-ui .relative-ns{position:relative}.swagger-ui .absolute-ns{position:absolute}.swagger-ui .fixed-ns{position:fixed}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .static-m{position:static}.swagger-ui .relative-m{position:relative}.swagger-ui .absolute-m{position:absolute}.swagger-ui .fixed-m{position:fixed}}@media screen and (min-width:60em){.swagger-ui .static-l{position:static}.swagger-ui .relative-l{position:relative}.swagger-ui .absolute-l{position:absolute}.swagger-ui .fixed-l{position:fixed}}.swagger-ui .o-100{opacity:1}.swagger-ui .o-90{opacity:.9}.swagger-ui .o-80{opacity:.8}.swagger-ui .o-70{opacity:.7}.swagger-ui .o-60{opacity:.6}.swagger-ui .o-50{opacity:.5}.swagger-ui .o-40{opacity:.4}.swagger-ui .o-30{opacity:.3}.swagger-ui .o-20{opacity:.2}.swagger-ui .o-10{opacity:.1}.swagger-ui .o-05{opacity:.05}.swagger-ui .o-025{opacity:.025}.swagger-ui .o-0{opacity:0}.swagger-ui .rotate-45{transform:rotate(45deg)}.swagger-ui .rotate-90{transform:rotate(90deg)}.swagger-ui .rotate-135{transform:rotate(135deg)}.swagger-ui .rotate-180{transform:rotate(180deg)}.swagger-ui .rotate-225{transform:rotate(225deg)}.swagger-ui .rotate-270{transform:rotate(270deg)}.swagger-ui .rotate-315{transform:rotate(315deg)}@media screen and (min-width:30em){.swagger-ui .rotate-45-ns{transform:rotate(45deg)}.swagger-ui .rotate-90-ns{transform:rotate(90deg)}.swagger-ui .rotate-135-ns{transform:rotate(135deg)}.swagger-ui .rotate-180-ns{transform:rotate(180deg)}.swagger-ui .rotate-225-ns{transform:rotate(225deg)}.swagger-ui .rotate-270-ns{transform:rotate(270deg)}.swagger-ui .rotate-315-ns{transform:rotate(315deg)}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .rotate-45-m{transform:rotate(45deg)}.swagger-ui .rotate-90-m{transform:rotate(90deg)}.swagger-ui .rotate-135-m{transform:rotate(135deg)}.swagger-ui .rotate-180-m{transform:rotate(180deg)}.swagger-ui .rotate-225-m{transform:rotate(225deg)}.swagger-ui .rotate-270-m{transform:rotate(270deg)}.swagger-ui .rotate-315-m{transform:rotate(315deg)}}@media screen and (min-width:60em){.swagger-ui .rotate-45-l{transform:rotate(45deg)}.swagger-ui .rotate-90-l{transform:rotate(90deg)}.swagger-ui .rotate-135-l{transform:rotate(135deg)}.swagger-ui .rotate-180-l{transform:rotate(180deg)}.swagger-ui .rotate-225-l{transform:rotate(225deg)}.swagger-ui .rotate-270-l{transform:rotate(270deg)}.swagger-ui .rotate-315-l{transform:rotate(315deg)}}.swagger-ui .black-90{color:rgba(0,0,0,.9)}.swagger-ui .black-80{color:rgba(0,0,0,.8)}.swagger-ui .black-70{color:rgba(0,0,0,.7)}.swagger-ui .black-60{color:rgba(0,0,0,.6)}.swagger-ui .black-50{color:rgba(0,0,0,.5)}.swagger-ui .black-40{color:rgba(0,0,0,.4)}.swagger-ui .black-30{color:rgba(0,0,0,.3)}.swagger-ui .black-20{color:rgba(0,0,0,.2)}.swagger-ui .black-10{color:rgba(0,0,0,.1)}.swagger-ui .black-05{color:rgba(0,0,0,.05)}.swagger-ui .white-90{color:hsla(0,0%,100%,.9)}.swagger-ui .white-80{color:hsla(0,0%,100%,.8)}.swagger-ui .white-70{color:hsla(0,0%,100%,.7)}.swagger-ui .white-60{color:hsla(0,0%,100%,.6)}.swagger-ui .white-50{color:hsla(0,0%,100%,.5)}.swagger-ui .white-40{color:hsla(0,0%,100%,.4)}.swagger-ui .white-30{color:hsla(0,0%,100%,.3)}.swagger-ui .white-20{color:hsla(0,0%,100%,.2)}.swagger-ui .white-10{color:hsla(0,0%,100%,.1)}.swagger-ui .black{color:#000}.swagger-ui .near-black{color:#111}.swagger-ui .dark-gray{color:#333}.swagger-ui .mid-gray{color:#555}.swagger-ui .gray{color:#777}.swagger-ui .silver{color:#999}.swagger-ui .light-silver{color:#aaa}.swagger-ui .moon-gray{color:#ccc}.swagger-ui .light-gray{color:#eee}.swagger-ui .near-white{color:#f4f4f4}.swagger-ui .white{color:#fff}.swagger-ui .dark-red{color:#e7040f}.swagger-ui .red{color:#ff4136}.swagger-ui .light-red{color:#ff725c}.swagger-ui .orange{color:#ff6300}.swagger-ui .gold{color:#ffb700}.swagger-ui .yellow{color:gold}.swagger-ui .light-yellow{color:#fbf1a9}.swagger-ui .purple{color:#5e2ca5}.swagger-ui .light-purple{color:#a463f2}.swagger-ui .dark-pink{color:#d5008f}.swagger-ui .hot-pink{color:#ff41b4}.swagger-ui .pink{color:#ff80cc}.swagger-ui .light-pink{color:#ffa3d7}.swagger-ui .dark-green{color:#137752}.swagger-ui .green{color:#19a974}.swagger-ui .light-green{color:#9eebcf}.swagger-ui .navy{color:#001b44}.swagger-ui .dark-blue{color:#00449e}.swagger-ui .blue{color:#357edd}.swagger-ui .light-blue{color:#96ccff}.swagger-ui .lightest-blue{color:#cdecff}.swagger-ui .washed-blue{color:#f6fffe}.swagger-ui .washed-green{color:#e8fdf5}.swagger-ui .washed-yellow{color:#fffceb}.swagger-ui .washed-red{color:#ffdfdf}.swagger-ui .color-inherit{color:inherit}.swagger-ui .bg-black-90{background-color:rgba(0,0,0,.9)}.swagger-ui .bg-black-80{background-color:rgba(0,0,0,.8)}.swagger-ui .bg-black-70{background-color:rgba(0,0,0,.7)}.swagger-ui .bg-black-60{background-color:rgba(0,0,0,.6)}.swagger-ui .bg-black-50{background-color:rgba(0,0,0,.5)}.swagger-ui .bg-black-40{background-color:rgba(0,0,0,.4)}.swagger-ui .bg-black-30{background-color:rgba(0,0,0,.3)}.swagger-ui .bg-black-20{background-color:rgba(0,0,0,.2)}.swagger-ui .bg-black-10{background-color:rgba(0,0,0,.1)}.swagger-ui .bg-black-05{background-color:rgba(0,0,0,.05)}.swagger-ui .bg-white-90{background-color:hsla(0,0%,100%,.9)}.swagger-ui .bg-white-80{background-color:hsla(0,0%,100%,.8)}.swagger-ui .bg-white-70{background-color:hsla(0,0%,100%,.7)}.swagger-ui .bg-white-60{background-color:hsla(0,0%,100%,.6)}.swagger-ui .bg-white-50{background-color:hsla(0,0%,100%,.5)}.swagger-ui .bg-white-40{background-color:hsla(0,0%,100%,.4)}.swagger-ui .bg-white-30{background-color:hsla(0,0%,100%,.3)}.swagger-ui .bg-white-20{background-color:hsla(0,0%,100%,.2)}.swagger-ui .bg-white-10{background-color:hsla(0,0%,100%,.1)}.swagger-ui .bg-black{background-color:#000}.swagger-ui .bg-near-black{background-color:#111}.swagger-ui .bg-dark-gray{background-color:#333}.swagger-ui .bg-mid-gray{background-color:#555}.swagger-ui .bg-gray{background-color:#777}.swagger-ui .bg-silver{background-color:#999}.swagger-ui .bg-light-silver{background-color:#aaa}.swagger-ui .bg-moon-gray{background-color:#ccc}.swagger-ui .bg-light-gray{background-color:#eee}.swagger-ui .bg-near-white{background-color:#f4f4f4}.swagger-ui .bg-white{background-color:#fff}.swagger-ui .bg-transparent{background-color:transparent}.swagger-ui .bg-dark-red{background-color:#e7040f}.swagger-ui .bg-red{background-color:#ff4136}.swagger-ui .bg-light-red{background-color:#ff725c}.swagger-ui .bg-orange{background-color:#ff6300}.swagger-ui .bg-gold{background-color:#ffb700}.swagger-ui .bg-yellow{background-color:gold}.swagger-ui .bg-light-yellow{background-color:#fbf1a9}.swagger-ui .bg-purple{background-color:#5e2ca5}.swagger-ui .bg-light-purple{background-color:#a463f2}.swagger-ui .bg-dark-pink{background-color:#d5008f}.swagger-ui .bg-hot-pink{background-color:#ff41b4}.swagger-ui .bg-pink{background-color:#ff80cc}.swagger-ui .bg-light-pink{background-color:#ffa3d7}.swagger-ui .bg-dark-green{background-color:#137752}.swagger-ui .bg-green{background-color:#19a974}.swagger-ui .bg-light-green{background-color:#9eebcf}.swagger-ui .bg-navy{background-color:#001b44}.swagger-ui .bg-dark-blue{background-color:#00449e}.swagger-ui .bg-blue{background-color:#357edd}.swagger-ui .bg-light-blue{background-color:#96ccff}.swagger-ui .bg-lightest-blue{background-color:#cdecff}.swagger-ui .bg-washed-blue{background-color:#f6fffe}.swagger-ui .bg-washed-green{background-color:#e8fdf5}.swagger-ui .bg-washed-yellow{background-color:#fffceb}.swagger-ui .bg-washed-red{background-color:#ffdfdf}.swagger-ui .bg-inherit{background-color:inherit}.swagger-ui .hover-black:focus,.swagger-ui .hover-black:hover{color:#000}.swagger-ui .hover-near-black:focus,.swagger-ui .hover-near-black:hover{color:#111}.swagger-ui .hover-dark-gray:focus,.swagger-ui .hover-dark-gray:hover{color:#333}.swagger-ui .hover-mid-gray:focus,.swagger-ui .hover-mid-gray:hover{color:#555}.swagger-ui .hover-gray:focus,.swagger-ui .hover-gray:hover{color:#777}.swagger-ui .hover-silver:focus,.swagger-ui .hover-silver:hover{color:#999}.swagger-ui .hover-light-silver:focus,.swagger-ui .hover-light-silver:hover{color:#aaa}.swagger-ui .hover-moon-gray:focus,.swagger-ui .hover-moon-gray:hover{color:#ccc}.swagger-ui .hover-light-gray:focus,.swagger-ui .hover-light-gray:hover{color:#eee}.swagger-ui .hover-near-white:focus,.swagger-ui .hover-near-white:hover{color:#f4f4f4}.swagger-ui .hover-white:focus,.swagger-ui .hover-white:hover{color:#fff}.swagger-ui .hover-black-90:focus,.swagger-ui .hover-black-90:hover{color:rgba(0,0,0,.9)}.swagger-ui .hover-black-80:focus,.swagger-ui .hover-black-80:hover{color:rgba(0,0,0,.8)}.swagger-ui .hover-black-70:focus,.swagger-ui .hover-black-70:hover{color:rgba(0,0,0,.7)}.swagger-ui .hover-black-60:focus,.swagger-ui .hover-black-60:hover{color:rgba(0,0,0,.6)}.swagger-ui .hover-black-50:focus,.swagger-ui .hover-black-50:hover{color:rgba(0,0,0,.5)}.swagger-ui .hover-black-40:focus,.swagger-ui .hover-black-40:hover{color:rgba(0,0,0,.4)}.swagger-ui .hover-black-30:focus,.swagger-ui .hover-black-30:hover{color:rgba(0,0,0,.3)}.swagger-ui .hover-black-20:focus,.swagger-ui .hover-black-20:hover{color:rgba(0,0,0,.2)}.swagger-ui .hover-black-10:focus,.swagger-ui .hover-black-10:hover{color:rgba(0,0,0,.1)}.swagger-ui .hover-white-90:focus,.swagger-ui .hover-white-90:hover{color:hsla(0,0%,100%,.9)}.swagger-ui .hover-white-80:focus,.swagger-ui .hover-white-80:hover{color:hsla(0,0%,100%,.8)}.swagger-ui .hover-white-70:focus,.swagger-ui .hover-white-70:hover{color:hsla(0,0%,100%,.7)}.swagger-ui .hover-white-60:focus,.swagger-ui .hover-white-60:hover{color:hsla(0,0%,100%,.6)}.swagger-ui .hover-white-50:focus,.swagger-ui .hover-white-50:hover{color:hsla(0,0%,100%,.5)}.swagger-ui .hover-white-40:focus,.swagger-ui .hover-white-40:hover{color:hsla(0,0%,100%,.4)}.swagger-ui .hover-white-30:focus,.swagger-ui .hover-white-30:hover{color:hsla(0,0%,100%,.3)}.swagger-ui .hover-white-20:focus,.swagger-ui .hover-white-20:hover{color:hsla(0,0%,100%,.2)}.swagger-ui .hover-white-10:focus,.swagger-ui .hover-white-10:hover{color:hsla(0,0%,100%,.1)}.swagger-ui .hover-inherit:focus,.swagger-ui .hover-inherit:hover{color:inherit}.swagger-ui .hover-bg-black:focus,.swagger-ui .hover-bg-black:hover{background-color:#000}.swagger-ui .hover-bg-near-black:focus,.swagger-ui .hover-bg-near-black:hover{background-color:#111}.swagger-ui .hover-bg-dark-gray:focus,.swagger-ui .hover-bg-dark-gray:hover{background-color:#333}.swagger-ui .hover-bg-mid-gray:focus,.swagger-ui .hover-bg-mid-gray:hover{background-color:#555}.swagger-ui .hover-bg-gray:focus,.swagger-ui .hover-bg-gray:hover{background-color:#777}.swagger-ui .hover-bg-silver:focus,.swagger-ui .hover-bg-silver:hover{background-color:#999}.swagger-ui .hover-bg-light-silver:focus,.swagger-ui .hover-bg-light-silver:hover{background-color:#aaa}.swagger-ui .hover-bg-moon-gray:focus,.swagger-ui .hover-bg-moon-gray:hover{background-color:#ccc}.swagger-ui .hover-bg-light-gray:focus,.swagger-ui .hover-bg-light-gray:hover{background-color:#eee}.swagger-ui .hover-bg-near-white:focus,.swagger-ui .hover-bg-near-white:hover{background-color:#f4f4f4}.swagger-ui .hover-bg-white:focus,.swagger-ui .hover-bg-white:hover{background-color:#fff}.swagger-ui .hover-bg-transparent:focus,.swagger-ui .hover-bg-transparent:hover{background-color:transparent}.swagger-ui .hover-bg-black-90:focus,.swagger-ui .hover-bg-black-90:hover{background-color:rgba(0,0,0,.9)}.swagger-ui .hover-bg-black-80:focus,.swagger-ui .hover-bg-black-80:hover{background-color:rgba(0,0,0,.8)}.swagger-ui .hover-bg-black-70:focus,.swagger-ui .hover-bg-black-70:hover{background-color:rgba(0,0,0,.7)}.swagger-ui .hover-bg-black-60:focus,.swagger-ui .hover-bg-black-60:hover{background-color:rgba(0,0,0,.6)}.swagger-ui .hover-bg-black-50:focus,.swagger-ui .hover-bg-black-50:hover{background-color:rgba(0,0,0,.5)}.swagger-ui .hover-bg-black-40:focus,.swagger-ui .hover-bg-black-40:hover{background-color:rgba(0,0,0,.4)}.swagger-ui .hover-bg-black-30:focus,.swagger-ui .hover-bg-black-30:hover{background-color:rgba(0,0,0,.3)}.swagger-ui .hover-bg-black-20:focus,.swagger-ui .hover-bg-black-20:hover{background-color:rgba(0,0,0,.2)}.swagger-ui .hover-bg-black-10:focus,.swagger-ui .hover-bg-black-10:hover{background-color:rgba(0,0,0,.1)}.swagger-ui .hover-bg-white-90:focus,.swagger-ui .hover-bg-white-90:hover{background-color:hsla(0,0%,100%,.9)}.swagger-ui .hover-bg-white-80:focus,.swagger-ui .hover-bg-white-80:hover{background-color:hsla(0,0%,100%,.8)}.swagger-ui .hover-bg-white-70:focus,.swagger-ui .hover-bg-white-70:hover{background-color:hsla(0,0%,100%,.7)}.swagger-ui .hover-bg-white-60:focus,.swagger-ui .hover-bg-white-60:hover{background-color:hsla(0,0%,100%,.6)}.swagger-ui .hover-bg-white-50:focus,.swagger-ui .hover-bg-white-50:hover{background-color:hsla(0,0%,100%,.5)}.swagger-ui .hover-bg-white-40:focus,.swagger-ui .hover-bg-white-40:hover{background-color:hsla(0,0%,100%,.4)}.swagger-ui .hover-bg-white-30:focus,.swagger-ui .hover-bg-white-30:hover{background-color:hsla(0,0%,100%,.3)}.swagger-ui .hover-bg-white-20:focus,.swagger-ui .hover-bg-white-20:hover{background-color:hsla(0,0%,100%,.2)}.swagger-ui .hover-bg-white-10:focus,.swagger-ui .hover-bg-white-10:hover{background-color:hsla(0,0%,100%,.1)}.swagger-ui .hover-dark-red:focus,.swagger-ui .hover-dark-red:hover{color:#e7040f}.swagger-ui .hover-red:focus,.swagger-ui .hover-red:hover{color:#ff4136}.swagger-ui .hover-light-red:focus,.swagger-ui .hover-light-red:hover{color:#ff725c}.swagger-ui .hover-orange:focus,.swagger-ui .hover-orange:hover{color:#ff6300}.swagger-ui .hover-gold:focus,.swagger-ui .hover-gold:hover{color:#ffb700}.swagger-ui .hover-yellow:focus,.swagger-ui .hover-yellow:hover{color:gold}.swagger-ui .hover-light-yellow:focus,.swagger-ui .hover-light-yellow:hover{color:#fbf1a9}.swagger-ui .hover-purple:focus,.swagger-ui .hover-purple:hover{color:#5e2ca5}.swagger-ui .hover-light-purple:focus,.swagger-ui .hover-light-purple:hover{color:#a463f2}.swagger-ui .hover-dark-pink:focus,.swagger-ui .hover-dark-pink:hover{color:#d5008f}.swagger-ui .hover-hot-pink:focus,.swagger-ui .hover-hot-pink:hover{color:#ff41b4}.swagger-ui .hover-pink:focus,.swagger-ui .hover-pink:hover{color:#ff80cc}.swagger-ui .hover-light-pink:focus,.swagger-ui .hover-light-pink:hover{color:#ffa3d7}.swagger-ui .hover-dark-green:focus,.swagger-ui .hover-dark-green:hover{color:#137752}.swagger-ui .hover-green:focus,.swagger-ui .hover-green:hover{color:#19a974}.swagger-ui .hover-light-green:focus,.swagger-ui .hover-light-green:hover{color:#9eebcf}.swagger-ui .hover-navy:focus,.swagger-ui .hover-navy:hover{color:#001b44}.swagger-ui .hover-dark-blue:focus,.swagger-ui .hover-dark-blue:hover{color:#00449e}.swagger-ui .hover-blue:focus,.swagger-ui .hover-blue:hover{color:#357edd}.swagger-ui .hover-light-blue:focus,.swagger-ui .hover-light-blue:hover{color:#96ccff}.swagger-ui .hover-lightest-blue:focus,.swagger-ui .hover-lightest-blue:hover{color:#cdecff}.swagger-ui .hover-washed-blue:focus,.swagger-ui .hover-washed-blue:hover{color:#f6fffe}.swagger-ui .hover-washed-green:focus,.swagger-ui .hover-washed-green:hover{color:#e8fdf5}.swagger-ui .hover-washed-yellow:focus,.swagger-ui .hover-washed-yellow:hover{color:#fffceb}.swagger-ui .hover-washed-red:focus,.swagger-ui .hover-washed-red:hover{color:#ffdfdf}.swagger-ui .hover-bg-dark-red:focus,.swagger-ui .hover-bg-dark-red:hover{background-color:#e7040f}.swagger-ui .hover-bg-red:focus,.swagger-ui .hover-bg-red:hover{background-color:#ff4136}.swagger-ui .hover-bg-light-red:focus,.swagger-ui .hover-bg-light-red:hover{background-color:#ff725c}.swagger-ui .hover-bg-orange:focus,.swagger-ui .hover-bg-orange:hover{background-color:#ff6300}.swagger-ui .hover-bg-gold:focus,.swagger-ui .hover-bg-gold:hover{background-color:#ffb700}.swagger-ui .hover-bg-yellow:focus,.swagger-ui .hover-bg-yellow:hover{background-color:gold}.swagger-ui .hover-bg-light-yellow:focus,.swagger-ui .hover-bg-light-yellow:hover{background-color:#fbf1a9}.swagger-ui .hover-bg-purple:focus,.swagger-ui .hover-bg-purple:hover{background-color:#5e2ca5}.swagger-ui .hover-bg-light-purple:focus,.swagger-ui .hover-bg-light-purple:hover{background-color:#a463f2}.swagger-ui .hover-bg-dark-pink:focus,.swagger-ui .hover-bg-dark-pink:hover{background-color:#d5008f}.swagger-ui .hover-bg-hot-pink:focus,.swagger-ui .hover-bg-hot-pink:hover{background-color:#ff41b4}.swagger-ui .hover-bg-pink:focus,.swagger-ui .hover-bg-pink:hover{background-color:#ff80cc}.swagger-ui .hover-bg-light-pink:focus,.swagger-ui .hover-bg-light-pink:hover{background-color:#ffa3d7}.swagger-ui .hover-bg-dark-green:focus,.swagger-ui .hover-bg-dark-green:hover{background-color:#137752}.swagger-ui .hover-bg-green:focus,.swagger-ui .hover-bg-green:hover{background-color:#19a974}.swagger-ui .hover-bg-light-green:focus,.swagger-ui .hover-bg-light-green:hover{background-color:#9eebcf}.swagger-ui .hover-bg-navy:focus,.swagger-ui .hover-bg-navy:hover{background-color:#001b44}.swagger-ui .hover-bg-dark-blue:focus,.swagger-ui .hover-bg-dark-blue:hover{background-color:#00449e}.swagger-ui .hover-bg-blue:focus,.swagger-ui .hover-bg-blue:hover{background-color:#357edd}.swagger-ui .hover-bg-light-blue:focus,.swagger-ui .hover-bg-light-blue:hover{background-color:#96ccff}.swagger-ui .hover-bg-lightest-blue:focus,.swagger-ui .hover-bg-lightest-blue:hover{background-color:#cdecff}.swagger-ui .hover-bg-washed-blue:focus,.swagger-ui .hover-bg-washed-blue:hover{background-color:#f6fffe}.swagger-ui .hover-bg-washed-green:focus,.swagger-ui .hover-bg-washed-green:hover{background-color:#e8fdf5}.swagger-ui .hover-bg-washed-yellow:focus,.swagger-ui .hover-bg-washed-yellow:hover{background-color:#fffceb}.swagger-ui .hover-bg-washed-red:focus,.swagger-ui .hover-bg-washed-red:hover{background-color:#ffdfdf}.swagger-ui .hover-bg-inherit:focus,.swagger-ui .hover-bg-inherit:hover{background-color:inherit}.swagger-ui .pa0{padding:0}.swagger-ui .pa1{padding:.25rem}.swagger-ui .pa2{padding:.5rem}.swagger-ui .pa3{padding:1rem}.swagger-ui .pa4{padding:2rem}.swagger-ui .pa5{padding:4rem}.swagger-ui .pa6{padding:8rem}.swagger-ui .pa7{padding:16rem}.swagger-ui .pl0{padding-left:0}.swagger-ui .pl1{padding-left:.25rem}.swagger-ui .pl2{padding-left:.5rem}.swagger-ui .pl3{padding-left:1rem}.swagger-ui .pl4{padding-left:2rem}.swagger-ui .pl5{padding-left:4rem}.swagger-ui .pl6{padding-left:8rem}.swagger-ui .pl7{padding-left:16rem}.swagger-ui .pr0{padding-right:0}.swagger-ui .pr1{padding-right:.25rem}.swagger-ui .pr2{padding-right:.5rem}.swagger-ui .pr3{padding-right:1rem}.swagger-ui .pr4{padding-right:2rem}.swagger-ui .pr5{padding-right:4rem}.swagger-ui .pr6{padding-right:8rem}.swagger-ui .pr7{padding-right:16rem}.swagger-ui .pb0{padding-bottom:0}.swagger-ui .pb1{padding-bottom:.25rem}.swagger-ui .pb2{padding-bottom:.5rem}.swagger-ui .pb3{padding-bottom:1rem}.swagger-ui .pb4{padding-bottom:2rem}.swagger-ui .pb5{padding-bottom:4rem}.swagger-ui .pb6{padding-bottom:8rem}.swagger-ui .pb7{padding-bottom:16rem}.swagger-ui .pt0{padding-top:0}.swagger-ui .pt1{padding-top:.25rem}.swagger-ui .pt2{padding-top:.5rem}.swagger-ui .pt3{padding-top:1rem}.swagger-ui .pt4{padding-top:2rem}.swagger-ui .pt5{padding-top:4rem}.swagger-ui .pt6{padding-top:8rem}.swagger-ui .pt7{padding-top:16rem}.swagger-ui .pv0{padding-bottom:0;padding-top:0}.swagger-ui .pv1{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0{padding-left:0;padding-right:0}.swagger-ui .ph1{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0{margin:0}.swagger-ui .ma1{margin:.25rem}.swagger-ui .ma2{margin:.5rem}.swagger-ui .ma3{margin:1rem}.swagger-ui .ma4{margin:2rem}.swagger-ui .ma5{margin:4rem}.swagger-ui .ma6{margin:8rem}.swagger-ui .ma7{margin:16rem}.swagger-ui .ml0{margin-left:0}.swagger-ui .ml1{margin-left:.25rem}.swagger-ui .ml2{margin-left:.5rem}.swagger-ui .ml3{margin-left:1rem}.swagger-ui .ml4{margin-left:2rem}.swagger-ui .ml5{margin-left:4rem}.swagger-ui .ml6{margin-left:8rem}.swagger-ui .ml7{margin-left:16rem}.swagger-ui .mr0{margin-right:0}.swagger-ui .mr1{margin-right:.25rem}.swagger-ui .mr2{margin-right:.5rem}.swagger-ui .mr3{margin-right:1rem}.swagger-ui .mr4{margin-right:2rem}.swagger-ui .mr5{margin-right:4rem}.swagger-ui .mr6{margin-right:8rem}.swagger-ui .mr7{margin-right:16rem}.swagger-ui .mb0{margin-bottom:0}.swagger-ui .mb1{margin-bottom:.25rem}.swagger-ui .mb2{margin-bottom:.5rem}.swagger-ui .mb3{margin-bottom:1rem}.swagger-ui .mb4{margin-bottom:2rem}.swagger-ui .mb5{margin-bottom:4rem}.swagger-ui .mb6{margin-bottom:8rem}.swagger-ui .mb7{margin-bottom:16rem}.swagger-ui .mt0{margin-top:0}.swagger-ui .mt1{margin-top:.25rem}.swagger-ui .mt2{margin-top:.5rem}.swagger-ui .mt3{margin-top:1rem}.swagger-ui .mt4{margin-top:2rem}.swagger-ui .mt5{margin-top:4rem}.swagger-ui .mt6{margin-top:8rem}.swagger-ui .mt7{margin-top:16rem}.swagger-ui .mv0{margin-bottom:0;margin-top:0}.swagger-ui .mv1{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0{margin-left:0;margin-right:0}.swagger-ui .mh1{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7{margin-left:16rem;margin-right:16rem}@media screen and (min-width:30em){.swagger-ui .pa0-ns{padding:0}.swagger-ui .pa1-ns{padding:.25rem}.swagger-ui .pa2-ns{padding:.5rem}.swagger-ui .pa3-ns{padding:1rem}.swagger-ui .pa4-ns{padding:2rem}.swagger-ui .pa5-ns{padding:4rem}.swagger-ui .pa6-ns{padding:8rem}.swagger-ui .pa7-ns{padding:16rem}.swagger-ui .pl0-ns{padding-left:0}.swagger-ui .pl1-ns{padding-left:.25rem}.swagger-ui .pl2-ns{padding-left:.5rem}.swagger-ui .pl3-ns{padding-left:1rem}.swagger-ui .pl4-ns{padding-left:2rem}.swagger-ui .pl5-ns{padding-left:4rem}.swagger-ui .pl6-ns{padding-left:8rem}.swagger-ui .pl7-ns{padding-left:16rem}.swagger-ui .pr0-ns{padding-right:0}.swagger-ui .pr1-ns{padding-right:.25rem}.swagger-ui .pr2-ns{padding-right:.5rem}.swagger-ui .pr3-ns{padding-right:1rem}.swagger-ui .pr4-ns{padding-right:2rem}.swagger-ui .pr5-ns{padding-right:4rem}.swagger-ui .pr6-ns{padding-right:8rem}.swagger-ui .pr7-ns{padding-right:16rem}.swagger-ui .pb0-ns{padding-bottom:0}.swagger-ui .pb1-ns{padding-bottom:.25rem}.swagger-ui .pb2-ns{padding-bottom:.5rem}.swagger-ui .pb3-ns{padding-bottom:1rem}.swagger-ui .pb4-ns{padding-bottom:2rem}.swagger-ui .pb5-ns{padding-bottom:4rem}.swagger-ui .pb6-ns{padding-bottom:8rem}.swagger-ui .pb7-ns{padding-bottom:16rem}.swagger-ui .pt0-ns{padding-top:0}.swagger-ui .pt1-ns{padding-top:.25rem}.swagger-ui .pt2-ns{padding-top:.5rem}.swagger-ui .pt3-ns{padding-top:1rem}.swagger-ui .pt4-ns{padding-top:2rem}.swagger-ui .pt5-ns{padding-top:4rem}.swagger-ui .pt6-ns{padding-top:8rem}.swagger-ui .pt7-ns{padding-top:16rem}.swagger-ui .pv0-ns{padding-bottom:0;padding-top:0}.swagger-ui .pv1-ns{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2-ns{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3-ns{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4-ns{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5-ns{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6-ns{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7-ns{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0-ns{padding-left:0;padding-right:0}.swagger-ui .ph1-ns{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2-ns{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3-ns{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4-ns{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5-ns{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6-ns{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7-ns{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0-ns{margin:0}.swagger-ui .ma1-ns{margin:.25rem}.swagger-ui .ma2-ns{margin:.5rem}.swagger-ui .ma3-ns{margin:1rem}.swagger-ui .ma4-ns{margin:2rem}.swagger-ui .ma5-ns{margin:4rem}.swagger-ui .ma6-ns{margin:8rem}.swagger-ui .ma7-ns{margin:16rem}.swagger-ui .ml0-ns{margin-left:0}.swagger-ui .ml1-ns{margin-left:.25rem}.swagger-ui .ml2-ns{margin-left:.5rem}.swagger-ui .ml3-ns{margin-left:1rem}.swagger-ui .ml4-ns{margin-left:2rem}.swagger-ui .ml5-ns{margin-left:4rem}.swagger-ui .ml6-ns{margin-left:8rem}.swagger-ui .ml7-ns{margin-left:16rem}.swagger-ui .mr0-ns{margin-right:0}.swagger-ui .mr1-ns{margin-right:.25rem}.swagger-ui .mr2-ns{margin-right:.5rem}.swagger-ui .mr3-ns{margin-right:1rem}.swagger-ui .mr4-ns{margin-right:2rem}.swagger-ui .mr5-ns{margin-right:4rem}.swagger-ui .mr6-ns{margin-right:8rem}.swagger-ui .mr7-ns{margin-right:16rem}.swagger-ui .mb0-ns{margin-bottom:0}.swagger-ui .mb1-ns{margin-bottom:.25rem}.swagger-ui .mb2-ns{margin-bottom:.5rem}.swagger-ui .mb3-ns{margin-bottom:1rem}.swagger-ui .mb4-ns{margin-bottom:2rem}.swagger-ui .mb5-ns{margin-bottom:4rem}.swagger-ui .mb6-ns{margin-bottom:8rem}.swagger-ui .mb7-ns{margin-bottom:16rem}.swagger-ui .mt0-ns{margin-top:0}.swagger-ui .mt1-ns{margin-top:.25rem}.swagger-ui .mt2-ns{margin-top:.5rem}.swagger-ui .mt3-ns{margin-top:1rem}.swagger-ui .mt4-ns{margin-top:2rem}.swagger-ui .mt5-ns{margin-top:4rem}.swagger-ui .mt6-ns{margin-top:8rem}.swagger-ui .mt7-ns{margin-top:16rem}.swagger-ui .mv0-ns{margin-bottom:0;margin-top:0}.swagger-ui .mv1-ns{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2-ns{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3-ns{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4-ns{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5-ns{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6-ns{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7-ns{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0-ns{margin-left:0;margin-right:0}.swagger-ui .mh1-ns{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2-ns{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3-ns{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4-ns{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5-ns{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6-ns{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7-ns{margin-left:16rem;margin-right:16rem}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .pa0-m{padding:0}.swagger-ui .pa1-m{padding:.25rem}.swagger-ui .pa2-m{padding:.5rem}.swagger-ui .pa3-m{padding:1rem}.swagger-ui .pa4-m{padding:2rem}.swagger-ui .pa5-m{padding:4rem}.swagger-ui .pa6-m{padding:8rem}.swagger-ui .pa7-m{padding:16rem}.swagger-ui .pl0-m{padding-left:0}.swagger-ui .pl1-m{padding-left:.25rem}.swagger-ui .pl2-m{padding-left:.5rem}.swagger-ui .pl3-m{padding-left:1rem}.swagger-ui .pl4-m{padding-left:2rem}.swagger-ui .pl5-m{padding-left:4rem}.swagger-ui .pl6-m{padding-left:8rem}.swagger-ui .pl7-m{padding-left:16rem}.swagger-ui .pr0-m{padding-right:0}.swagger-ui .pr1-m{padding-right:.25rem}.swagger-ui .pr2-m{padding-right:.5rem}.swagger-ui .pr3-m{padding-right:1rem}.swagger-ui .pr4-m{padding-right:2rem}.swagger-ui .pr5-m{padding-right:4rem}.swagger-ui .pr6-m{padding-right:8rem}.swagger-ui .pr7-m{padding-right:16rem}.swagger-ui .pb0-m{padding-bottom:0}.swagger-ui .pb1-m{padding-bottom:.25rem}.swagger-ui .pb2-m{padding-bottom:.5rem}.swagger-ui .pb3-m{padding-bottom:1rem}.swagger-ui .pb4-m{padding-bottom:2rem}.swagger-ui .pb5-m{padding-bottom:4rem}.swagger-ui .pb6-m{padding-bottom:8rem}.swagger-ui .pb7-m{padding-bottom:16rem}.swagger-ui .pt0-m{padding-top:0}.swagger-ui .pt1-m{padding-top:.25rem}.swagger-ui .pt2-m{padding-top:.5rem}.swagger-ui .pt3-m{padding-top:1rem}.swagger-ui .pt4-m{padding-top:2rem}.swagger-ui .pt5-m{padding-top:4rem}.swagger-ui .pt6-m{padding-top:8rem}.swagger-ui .pt7-m{padding-top:16rem}.swagger-ui .pv0-m{padding-bottom:0;padding-top:0}.swagger-ui .pv1-m{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2-m{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3-m{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4-m{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5-m{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6-m{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7-m{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0-m{padding-left:0;padding-right:0}.swagger-ui .ph1-m{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2-m{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3-m{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4-m{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5-m{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6-m{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7-m{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0-m{margin:0}.swagger-ui .ma1-m{margin:.25rem}.swagger-ui .ma2-m{margin:.5rem}.swagger-ui .ma3-m{margin:1rem}.swagger-ui .ma4-m{margin:2rem}.swagger-ui .ma5-m{margin:4rem}.swagger-ui .ma6-m{margin:8rem}.swagger-ui .ma7-m{margin:16rem}.swagger-ui .ml0-m{margin-left:0}.swagger-ui .ml1-m{margin-left:.25rem}.swagger-ui .ml2-m{margin-left:.5rem}.swagger-ui .ml3-m{margin-left:1rem}.swagger-ui .ml4-m{margin-left:2rem}.swagger-ui .ml5-m{margin-left:4rem}.swagger-ui .ml6-m{margin-left:8rem}.swagger-ui .ml7-m{margin-left:16rem}.swagger-ui .mr0-m{margin-right:0}.swagger-ui .mr1-m{margin-right:.25rem}.swagger-ui .mr2-m{margin-right:.5rem}.swagger-ui .mr3-m{margin-right:1rem}.swagger-ui .mr4-m{margin-right:2rem}.swagger-ui .mr5-m{margin-right:4rem}.swagger-ui .mr6-m{margin-right:8rem}.swagger-ui .mr7-m{margin-right:16rem}.swagger-ui .mb0-m{margin-bottom:0}.swagger-ui .mb1-m{margin-bottom:.25rem}.swagger-ui .mb2-m{margin-bottom:.5rem}.swagger-ui .mb3-m{margin-bottom:1rem}.swagger-ui .mb4-m{margin-bottom:2rem}.swagger-ui .mb5-m{margin-bottom:4rem}.swagger-ui .mb6-m{margin-bottom:8rem}.swagger-ui .mb7-m{margin-bottom:16rem}.swagger-ui .mt0-m{margin-top:0}.swagger-ui .mt1-m{margin-top:.25rem}.swagger-ui .mt2-m{margin-top:.5rem}.swagger-ui .mt3-m{margin-top:1rem}.swagger-ui .mt4-m{margin-top:2rem}.swagger-ui .mt5-m{margin-top:4rem}.swagger-ui .mt6-m{margin-top:8rem}.swagger-ui .mt7-m{margin-top:16rem}.swagger-ui .mv0-m{margin-bottom:0;margin-top:0}.swagger-ui .mv1-m{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2-m{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3-m{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4-m{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5-m{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6-m{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7-m{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0-m{margin-left:0;margin-right:0}.swagger-ui .mh1-m{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2-m{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3-m{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4-m{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5-m{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6-m{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7-m{margin-left:16rem;margin-right:16rem}}@media screen and (min-width:60em){.swagger-ui .pa0-l{padding:0}.swagger-ui .pa1-l{padding:.25rem}.swagger-ui .pa2-l{padding:.5rem}.swagger-ui .pa3-l{padding:1rem}.swagger-ui .pa4-l{padding:2rem}.swagger-ui .pa5-l{padding:4rem}.swagger-ui .pa6-l{padding:8rem}.swagger-ui .pa7-l{padding:16rem}.swagger-ui .pl0-l{padding-left:0}.swagger-ui .pl1-l{padding-left:.25rem}.swagger-ui .pl2-l{padding-left:.5rem}.swagger-ui .pl3-l{padding-left:1rem}.swagger-ui .pl4-l{padding-left:2rem}.swagger-ui .pl5-l{padding-left:4rem}.swagger-ui .pl6-l{padding-left:8rem}.swagger-ui .pl7-l{padding-left:16rem}.swagger-ui .pr0-l{padding-right:0}.swagger-ui .pr1-l{padding-right:.25rem}.swagger-ui .pr2-l{padding-right:.5rem}.swagger-ui .pr3-l{padding-right:1rem}.swagger-ui .pr4-l{padding-right:2rem}.swagger-ui .pr5-l{padding-right:4rem}.swagger-ui .pr6-l{padding-right:8rem}.swagger-ui .pr7-l{padding-right:16rem}.swagger-ui .pb0-l{padding-bottom:0}.swagger-ui .pb1-l{padding-bottom:.25rem}.swagger-ui .pb2-l{padding-bottom:.5rem}.swagger-ui .pb3-l{padding-bottom:1rem}.swagger-ui .pb4-l{padding-bottom:2rem}.swagger-ui .pb5-l{padding-bottom:4rem}.swagger-ui .pb6-l{padding-bottom:8rem}.swagger-ui .pb7-l{padding-bottom:16rem}.swagger-ui .pt0-l{padding-top:0}.swagger-ui .pt1-l{padding-top:.25rem}.swagger-ui .pt2-l{padding-top:.5rem}.swagger-ui .pt3-l{padding-top:1rem}.swagger-ui .pt4-l{padding-top:2rem}.swagger-ui .pt5-l{padding-top:4rem}.swagger-ui .pt6-l{padding-top:8rem}.swagger-ui .pt7-l{padding-top:16rem}.swagger-ui .pv0-l{padding-bottom:0;padding-top:0}.swagger-ui .pv1-l{padding-bottom:.25rem;padding-top:.25rem}.swagger-ui .pv2-l{padding-bottom:.5rem;padding-top:.5rem}.swagger-ui .pv3-l{padding-bottom:1rem;padding-top:1rem}.swagger-ui .pv4-l{padding-bottom:2rem;padding-top:2rem}.swagger-ui .pv5-l{padding-bottom:4rem;padding-top:4rem}.swagger-ui .pv6-l{padding-bottom:8rem;padding-top:8rem}.swagger-ui .pv7-l{padding-bottom:16rem;padding-top:16rem}.swagger-ui .ph0-l{padding-left:0;padding-right:0}.swagger-ui .ph1-l{padding-left:.25rem;padding-right:.25rem}.swagger-ui .ph2-l{padding-left:.5rem;padding-right:.5rem}.swagger-ui .ph3-l{padding-left:1rem;padding-right:1rem}.swagger-ui .ph4-l{padding-left:2rem;padding-right:2rem}.swagger-ui .ph5-l{padding-left:4rem;padding-right:4rem}.swagger-ui .ph6-l{padding-left:8rem;padding-right:8rem}.swagger-ui .ph7-l{padding-left:16rem;padding-right:16rem}.swagger-ui .ma0-l{margin:0}.swagger-ui .ma1-l{margin:.25rem}.swagger-ui .ma2-l{margin:.5rem}.swagger-ui .ma3-l{margin:1rem}.swagger-ui .ma4-l{margin:2rem}.swagger-ui .ma5-l{margin:4rem}.swagger-ui .ma6-l{margin:8rem}.swagger-ui .ma7-l{margin:16rem}.swagger-ui .ml0-l{margin-left:0}.swagger-ui .ml1-l{margin-left:.25rem}.swagger-ui .ml2-l{margin-left:.5rem}.swagger-ui .ml3-l{margin-left:1rem}.swagger-ui .ml4-l{margin-left:2rem}.swagger-ui .ml5-l{margin-left:4rem}.swagger-ui .ml6-l{margin-left:8rem}.swagger-ui .ml7-l{margin-left:16rem}.swagger-ui .mr0-l{margin-right:0}.swagger-ui .mr1-l{margin-right:.25rem}.swagger-ui .mr2-l{margin-right:.5rem}.swagger-ui .mr3-l{margin-right:1rem}.swagger-ui .mr4-l{margin-right:2rem}.swagger-ui .mr5-l{margin-right:4rem}.swagger-ui .mr6-l{margin-right:8rem}.swagger-ui .mr7-l{margin-right:16rem}.swagger-ui .mb0-l{margin-bottom:0}.swagger-ui .mb1-l{margin-bottom:.25rem}.swagger-ui .mb2-l{margin-bottom:.5rem}.swagger-ui .mb3-l{margin-bottom:1rem}.swagger-ui .mb4-l{margin-bottom:2rem}.swagger-ui .mb5-l{margin-bottom:4rem}.swagger-ui .mb6-l{margin-bottom:8rem}.swagger-ui .mb7-l{margin-bottom:16rem}.swagger-ui .mt0-l{margin-top:0}.swagger-ui .mt1-l{margin-top:.25rem}.swagger-ui .mt2-l{margin-top:.5rem}.swagger-ui .mt3-l{margin-top:1rem}.swagger-ui .mt4-l{margin-top:2rem}.swagger-ui .mt5-l{margin-top:4rem}.swagger-ui .mt6-l{margin-top:8rem}.swagger-ui .mt7-l{margin-top:16rem}.swagger-ui .mv0-l{margin-bottom:0;margin-top:0}.swagger-ui .mv1-l{margin-bottom:.25rem;margin-top:.25rem}.swagger-ui .mv2-l{margin-bottom:.5rem;margin-top:.5rem}.swagger-ui .mv3-l{margin-bottom:1rem;margin-top:1rem}.swagger-ui .mv4-l{margin-bottom:2rem;margin-top:2rem}.swagger-ui .mv5-l{margin-bottom:4rem;margin-top:4rem}.swagger-ui .mv6-l{margin-bottom:8rem;margin-top:8rem}.swagger-ui .mv7-l{margin-bottom:16rem;margin-top:16rem}.swagger-ui .mh0-l{margin-left:0;margin-right:0}.swagger-ui .mh1-l{margin-left:.25rem;margin-right:.25rem}.swagger-ui .mh2-l{margin-left:.5rem;margin-right:.5rem}.swagger-ui .mh3-l{margin-left:1rem;margin-right:1rem}.swagger-ui .mh4-l{margin-left:2rem;margin-right:2rem}.swagger-ui .mh5-l{margin-left:4rem;margin-right:4rem}.swagger-ui .mh6-l{margin-left:8rem;margin-right:8rem}.swagger-ui .mh7-l{margin-left:16rem;margin-right:16rem}}.swagger-ui .na1{margin:-.25rem}.swagger-ui .na2{margin:-.5rem}.swagger-ui .na3{margin:-1rem}.swagger-ui .na4{margin:-2rem}.swagger-ui .na5{margin:-4rem}.swagger-ui .na6{margin:-8rem}.swagger-ui .na7{margin:-16rem}.swagger-ui .nl1{margin-left:-.25rem}.swagger-ui .nl2{margin-left:-.5rem}.swagger-ui .nl3{margin-left:-1rem}.swagger-ui .nl4{margin-left:-2rem}.swagger-ui .nl5{margin-left:-4rem}.swagger-ui .nl6{margin-left:-8rem}.swagger-ui .nl7{margin-left:-16rem}.swagger-ui .nr1{margin-right:-.25rem}.swagger-ui .nr2{margin-right:-.5rem}.swagger-ui .nr3{margin-right:-1rem}.swagger-ui .nr4{margin-right:-2rem}.swagger-ui .nr5{margin-right:-4rem}.swagger-ui .nr6{margin-right:-8rem}.swagger-ui .nr7{margin-right:-16rem}.swagger-ui .nb1{margin-bottom:-.25rem}.swagger-ui .nb2{margin-bottom:-.5rem}.swagger-ui .nb3{margin-bottom:-1rem}.swagger-ui .nb4{margin-bottom:-2rem}.swagger-ui .nb5{margin-bottom:-4rem}.swagger-ui .nb6{margin-bottom:-8rem}.swagger-ui .nb7{margin-bottom:-16rem}.swagger-ui .nt1{margin-top:-.25rem}.swagger-ui .nt2{margin-top:-.5rem}.swagger-ui .nt3{margin-top:-1rem}.swagger-ui .nt4{margin-top:-2rem}.swagger-ui .nt5{margin-top:-4rem}.swagger-ui .nt6{margin-top:-8rem}.swagger-ui .nt7{margin-top:-16rem}@media screen and (min-width:30em){.swagger-ui .na1-ns{margin:-.25rem}.swagger-ui .na2-ns{margin:-.5rem}.swagger-ui .na3-ns{margin:-1rem}.swagger-ui .na4-ns{margin:-2rem}.swagger-ui .na5-ns{margin:-4rem}.swagger-ui .na6-ns{margin:-8rem}.swagger-ui .na7-ns{margin:-16rem}.swagger-ui .nl1-ns{margin-left:-.25rem}.swagger-ui .nl2-ns{margin-left:-.5rem}.swagger-ui .nl3-ns{margin-left:-1rem}.swagger-ui .nl4-ns{margin-left:-2rem}.swagger-ui .nl5-ns{margin-left:-4rem}.swagger-ui .nl6-ns{margin-left:-8rem}.swagger-ui .nl7-ns{margin-left:-16rem}.swagger-ui .nr1-ns{margin-right:-.25rem}.swagger-ui .nr2-ns{margin-right:-.5rem}.swagger-ui .nr3-ns{margin-right:-1rem}.swagger-ui .nr4-ns{margin-right:-2rem}.swagger-ui .nr5-ns{margin-right:-4rem}.swagger-ui .nr6-ns{margin-right:-8rem}.swagger-ui .nr7-ns{margin-right:-16rem}.swagger-ui .nb1-ns{margin-bottom:-.25rem}.swagger-ui .nb2-ns{margin-bottom:-.5rem}.swagger-ui .nb3-ns{margin-bottom:-1rem}.swagger-ui .nb4-ns{margin-bottom:-2rem}.swagger-ui .nb5-ns{margin-bottom:-4rem}.swagger-ui .nb6-ns{margin-bottom:-8rem}.swagger-ui .nb7-ns{margin-bottom:-16rem}.swagger-ui .nt1-ns{margin-top:-.25rem}.swagger-ui .nt2-ns{margin-top:-.5rem}.swagger-ui .nt3-ns{margin-top:-1rem}.swagger-ui .nt4-ns{margin-top:-2rem}.swagger-ui .nt5-ns{margin-top:-4rem}.swagger-ui .nt6-ns{margin-top:-8rem}.swagger-ui .nt7-ns{margin-top:-16rem}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .na1-m{margin:-.25rem}.swagger-ui .na2-m{margin:-.5rem}.swagger-ui .na3-m{margin:-1rem}.swagger-ui .na4-m{margin:-2rem}.swagger-ui .na5-m{margin:-4rem}.swagger-ui .na6-m{margin:-8rem}.swagger-ui .na7-m{margin:-16rem}.swagger-ui .nl1-m{margin-left:-.25rem}.swagger-ui .nl2-m{margin-left:-.5rem}.swagger-ui .nl3-m{margin-left:-1rem}.swagger-ui .nl4-m{margin-left:-2rem}.swagger-ui .nl5-m{margin-left:-4rem}.swagger-ui .nl6-m{margin-left:-8rem}.swagger-ui .nl7-m{margin-left:-16rem}.swagger-ui .nr1-m{margin-right:-.25rem}.swagger-ui .nr2-m{margin-right:-.5rem}.swagger-ui .nr3-m{margin-right:-1rem}.swagger-ui .nr4-m{margin-right:-2rem}.swagger-ui .nr5-m{margin-right:-4rem}.swagger-ui .nr6-m{margin-right:-8rem}.swagger-ui .nr7-m{margin-right:-16rem}.swagger-ui .nb1-m{margin-bottom:-.25rem}.swagger-ui .nb2-m{margin-bottom:-.5rem}.swagger-ui .nb3-m{margin-bottom:-1rem}.swagger-ui .nb4-m{margin-bottom:-2rem}.swagger-ui .nb5-m{margin-bottom:-4rem}.swagger-ui .nb6-m{margin-bottom:-8rem}.swagger-ui .nb7-m{margin-bottom:-16rem}.swagger-ui .nt1-m{margin-top:-.25rem}.swagger-ui .nt2-m{margin-top:-.5rem}.swagger-ui .nt3-m{margin-top:-1rem}.swagger-ui .nt4-m{margin-top:-2rem}.swagger-ui .nt5-m{margin-top:-4rem}.swagger-ui .nt6-m{margin-top:-8rem}.swagger-ui .nt7-m{margin-top:-16rem}}@media screen and (min-width:60em){.swagger-ui .na1-l{margin:-.25rem}.swagger-ui .na2-l{margin:-.5rem}.swagger-ui .na3-l{margin:-1rem}.swagger-ui .na4-l{margin:-2rem}.swagger-ui .na5-l{margin:-4rem}.swagger-ui .na6-l{margin:-8rem}.swagger-ui .na7-l{margin:-16rem}.swagger-ui .nl1-l{margin-left:-.25rem}.swagger-ui .nl2-l{margin-left:-.5rem}.swagger-ui .nl3-l{margin-left:-1rem}.swagger-ui .nl4-l{margin-left:-2rem}.swagger-ui .nl5-l{margin-left:-4rem}.swagger-ui .nl6-l{margin-left:-8rem}.swagger-ui .nl7-l{margin-left:-16rem}.swagger-ui .nr1-l{margin-right:-.25rem}.swagger-ui .nr2-l{margin-right:-.5rem}.swagger-ui .nr3-l{margin-right:-1rem}.swagger-ui .nr4-l{margin-right:-2rem}.swagger-ui .nr5-l{margin-right:-4rem}.swagger-ui .nr6-l{margin-right:-8rem}.swagger-ui .nr7-l{margin-right:-16rem}.swagger-ui .nb1-l{margin-bottom:-.25rem}.swagger-ui .nb2-l{margin-bottom:-.5rem}.swagger-ui .nb3-l{margin-bottom:-1rem}.swagger-ui .nb4-l{margin-bottom:-2rem}.swagger-ui .nb5-l{margin-bottom:-4rem}.swagger-ui .nb6-l{margin-bottom:-8rem}.swagger-ui .nb7-l{margin-bottom:-16rem}.swagger-ui .nt1-l{margin-top:-.25rem}.swagger-ui .nt2-l{margin-top:-.5rem}.swagger-ui .nt3-l{margin-top:-1rem}.swagger-ui .nt4-l{margin-top:-2rem}.swagger-ui .nt5-l{margin-top:-4rem}.swagger-ui .nt6-l{margin-top:-8rem}.swagger-ui .nt7-l{margin-top:-16rem}}.swagger-ui .collapse{border-collapse:collapse;border-spacing:0}.swagger-ui .striped--light-silver:nth-child(odd){background-color:#aaa}.swagger-ui .striped--moon-gray:nth-child(odd){background-color:#ccc}.swagger-ui .striped--light-gray:nth-child(odd){background-color:#eee}.swagger-ui .striped--near-white:nth-child(odd){background-color:#f4f4f4}.swagger-ui .stripe-light:nth-child(odd){background-color:hsla(0,0%,100%,.1)}.swagger-ui .stripe-dark:nth-child(odd){background-color:rgba(0,0,0,.1)}.swagger-ui .strike{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline{-webkit-text-decoration:none;text-decoration:none}@media screen and (min-width:30em){.swagger-ui .strike-ns{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline-ns{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline-ns{-webkit-text-decoration:none;text-decoration:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .strike-m{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline-m{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline-m{-webkit-text-decoration:none;text-decoration:none}}@media screen and (min-width:60em){.swagger-ui .strike-l{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .underline-l{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .no-underline-l{-webkit-text-decoration:none;text-decoration:none}}.swagger-ui .tl{text-align:left}.swagger-ui .tr{text-align:right}.swagger-ui .tc{text-align:center}.swagger-ui .tj{text-align:justify}@media screen and (min-width:30em){.swagger-ui .tl-ns{text-align:left}.swagger-ui .tr-ns{text-align:right}.swagger-ui .tc-ns{text-align:center}.swagger-ui .tj-ns{text-align:justify}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .tl-m{text-align:left}.swagger-ui .tr-m{text-align:right}.swagger-ui .tc-m{text-align:center}.swagger-ui .tj-m{text-align:justify}}@media screen and (min-width:60em){.swagger-ui .tl-l{text-align:left}.swagger-ui .tr-l{text-align:right}.swagger-ui .tc-l{text-align:center}.swagger-ui .tj-l{text-align:justify}}.swagger-ui .ttc{text-transform:capitalize}.swagger-ui .ttl{text-transform:lowercase}.swagger-ui .ttu{text-transform:uppercase}.swagger-ui .ttn{text-transform:none}@media screen and (min-width:30em){.swagger-ui .ttc-ns{text-transform:capitalize}.swagger-ui .ttl-ns{text-transform:lowercase}.swagger-ui .ttu-ns{text-transform:uppercase}.swagger-ui .ttn-ns{text-transform:none}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .ttc-m{text-transform:capitalize}.swagger-ui .ttl-m{text-transform:lowercase}.swagger-ui .ttu-m{text-transform:uppercase}.swagger-ui .ttn-m{text-transform:none}}@media screen and (min-width:60em){.swagger-ui .ttc-l{text-transform:capitalize}.swagger-ui .ttl-l{text-transform:lowercase}.swagger-ui .ttu-l{text-transform:uppercase}.swagger-ui .ttn-l{text-transform:none}}.swagger-ui .f-6,.swagger-ui .f-headline{font-size:6rem}.swagger-ui .f-5,.swagger-ui .f-subheadline{font-size:5rem}.swagger-ui .f1{font-size:3rem}.swagger-ui .f2{font-size:2.25rem}.swagger-ui .f3{font-size:1.5rem}.swagger-ui .f4{font-size:1.25rem}.swagger-ui .f5{font-size:1rem}.swagger-ui .f6{font-size:.875rem}.swagger-ui .f7{font-size:.75rem}@media screen and (min-width:30em){.swagger-ui .f-6-ns,.swagger-ui .f-headline-ns{font-size:6rem}.swagger-ui .f-5-ns,.swagger-ui .f-subheadline-ns{font-size:5rem}.swagger-ui .f1-ns{font-size:3rem}.swagger-ui .f2-ns{font-size:2.25rem}.swagger-ui .f3-ns{font-size:1.5rem}.swagger-ui .f4-ns{font-size:1.25rem}.swagger-ui .f5-ns{font-size:1rem}.swagger-ui .f6-ns{font-size:.875rem}.swagger-ui .f7-ns{font-size:.75rem}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .f-6-m,.swagger-ui .f-headline-m{font-size:6rem}.swagger-ui .f-5-m,.swagger-ui .f-subheadline-m{font-size:5rem}.swagger-ui .f1-m{font-size:3rem}.swagger-ui .f2-m{font-size:2.25rem}.swagger-ui .f3-m{font-size:1.5rem}.swagger-ui .f4-m{font-size:1.25rem}.swagger-ui .f5-m{font-size:1rem}.swagger-ui .f6-m{font-size:.875rem}.swagger-ui .f7-m{font-size:.75rem}}@media screen and (min-width:60em){.swagger-ui .f-6-l,.swagger-ui .f-headline-l{font-size:6rem}.swagger-ui .f-5-l,.swagger-ui .f-subheadline-l{font-size:5rem}.swagger-ui .f1-l{font-size:3rem}.swagger-ui .f2-l{font-size:2.25rem}.swagger-ui .f3-l{font-size:1.5rem}.swagger-ui .f4-l{font-size:1.25rem}.swagger-ui .f5-l{font-size:1rem}.swagger-ui .f6-l{font-size:.875rem}.swagger-ui .f7-l{font-size:.75rem}}.swagger-ui .measure{max-width:30em}.swagger-ui .measure-wide{max-width:34em}.swagger-ui .measure-narrow{max-width:20em}.swagger-ui .indent{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media screen and (min-width:30em){.swagger-ui .measure-ns{max-width:30em}.swagger-ui .measure-wide-ns{max-width:34em}.swagger-ui .measure-narrow-ns{max-width:20em}.swagger-ui .indent-ns{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps-ns{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate-ns{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .measure-m{max-width:30em}.swagger-ui .measure-wide-m{max-width:34em}.swagger-ui .measure-narrow-m{max-width:20em}.swagger-ui .indent-m{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps-m{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate-m{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}@media screen and (min-width:60em){.swagger-ui .measure-l{max-width:30em}.swagger-ui .measure-wide-l{max-width:34em}.swagger-ui .measure-narrow-l{max-width:20em}.swagger-ui .indent-l{margin-bottom:0;margin-top:0;text-indent:1em}.swagger-ui .small-caps-l{font-feature-settings:\"smcp\";font-variant:small-caps}.swagger-ui .truncate-l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}.swagger-ui .overflow-container{overflow-y:scroll}.swagger-ui .center{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto{margin-right:auto}.swagger-ui .ml-auto{margin-left:auto}@media screen and (min-width:30em){.swagger-ui .center-ns{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto-ns{margin-right:auto}.swagger-ui .ml-auto-ns{margin-left:auto}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .center-m{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto-m{margin-right:auto}.swagger-ui .ml-auto-m{margin-left:auto}}@media screen and (min-width:60em){.swagger-ui .center-l{margin-left:auto;margin-right:auto}.swagger-ui .mr-auto-l{margin-right:auto}.swagger-ui .ml-auto-l{margin-left:auto}}.swagger-ui .clip{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}@media screen and (min-width:30em){.swagger-ui .clip-ns{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .clip-m{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}}@media screen and (min-width:60em){.swagger-ui .clip-l{position:fixed!important;_position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}}.swagger-ui .ws-normal{white-space:normal}.swagger-ui .nowrap{white-space:nowrap}.swagger-ui .pre{white-space:pre}@media screen and (min-width:30em){.swagger-ui .ws-normal-ns{white-space:normal}.swagger-ui .nowrap-ns{white-space:nowrap}.swagger-ui .pre-ns{white-space:pre}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .ws-normal-m{white-space:normal}.swagger-ui .nowrap-m{white-space:nowrap}.swagger-ui .pre-m{white-space:pre}}@media screen and (min-width:60em){.swagger-ui .ws-normal-l{white-space:normal}.swagger-ui .nowrap-l{white-space:nowrap}.swagger-ui .pre-l{white-space:pre}}.swagger-ui .v-base{vertical-align:baseline}.swagger-ui .v-mid{vertical-align:middle}.swagger-ui .v-top{vertical-align:top}.swagger-ui .v-btm{vertical-align:bottom}@media screen and (min-width:30em){.swagger-ui .v-base-ns{vertical-align:baseline}.swagger-ui .v-mid-ns{vertical-align:middle}.swagger-ui .v-top-ns{vertical-align:top}.swagger-ui .v-btm-ns{vertical-align:bottom}}@media screen and (min-width:30em)and (max-width:60em){.swagger-ui .v-base-m{vertical-align:baseline}.swagger-ui .v-mid-m{vertical-align:middle}.swagger-ui .v-top-m{vertical-align:top}.swagger-ui .v-btm-m{vertical-align:bottom}}@media screen and (min-width:60em){.swagger-ui .v-base-l{vertical-align:baseline}.swagger-ui .v-mid-l{vertical-align:middle}.swagger-ui .v-top-l{vertical-align:top}.swagger-ui .v-btm-l{vertical-align:bottom}}.swagger-ui .dim{opacity:1;transition:opacity .15s ease-in}.swagger-ui .dim:focus,.swagger-ui .dim:hover{opacity:.5;transition:opacity .15s ease-in}.swagger-ui .dim:active{opacity:.8;transition:opacity .15s ease-out}.swagger-ui .glow{transition:opacity .15s ease-in}.swagger-ui .glow:focus,.swagger-ui .glow:hover{opacity:1;transition:opacity .15s ease-in}.swagger-ui .hide-child .child{opacity:0;transition:opacity .15s ease-in}.swagger-ui .hide-child:active .child,.swagger-ui .hide-child:focus .child,.swagger-ui .hide-child:hover .child{opacity:1;transition:opacity .15s ease-in}.swagger-ui .underline-hover:focus,.swagger-ui .underline-hover:hover{-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .grow{-moz-osx-font-smoothing:grayscale;backface-visibility:hidden;transform:translateZ(0);transition:transform .25s ease-out}.swagger-ui .grow:focus,.swagger-ui .grow:hover{transform:scale(1.05)}.swagger-ui .grow:active{transform:scale(.9)}.swagger-ui .grow-large{-moz-osx-font-smoothing:grayscale;backface-visibility:hidden;transform:translateZ(0);transition:transform .25s ease-in-out}.swagger-ui .grow-large:focus,.swagger-ui .grow-large:hover{transform:scale(1.2)}.swagger-ui .grow-large:active{transform:scale(.95)}.swagger-ui .pointer:hover{cursor:pointer}.swagger-ui .shadow-hover{cursor:pointer;position:relative;transition:all .5s cubic-bezier(.165,.84,.44,1)}.swagger-ui .shadow-hover:after{border-radius:inherit;box-shadow:0 0 16px 2px rgba(0,0,0,.2);content:\"\";height:100%;left:0;opacity:0;position:absolute;top:0;transition:opacity .5s cubic-bezier(.165,.84,.44,1);width:100%;z-index:-1}.swagger-ui .shadow-hover:focus:after,.swagger-ui .shadow-hover:hover:after{opacity:1}.swagger-ui .bg-animate,.swagger-ui .bg-animate:focus,.swagger-ui .bg-animate:hover{transition:background-color .15s ease-in-out}.swagger-ui .z-0{z-index:0}.swagger-ui .z-1{z-index:1}.swagger-ui .z-2{z-index:2}.swagger-ui .z-3{z-index:3}.swagger-ui .z-4{z-index:4}.swagger-ui .z-5{z-index:5}.swagger-ui .z-999{z-index:999}.swagger-ui .z-9999{z-index:9999}.swagger-ui .z-max{z-index:2147483647}.swagger-ui .z-inherit{z-index:inherit}.swagger-ui .z-initial,.swagger-ui .z-unset{z-index:auto}.swagger-ui .nested-copy-line-height ol,.swagger-ui .nested-copy-line-height p,.swagger-ui .nested-copy-line-height ul{line-height:1.5}.swagger-ui .nested-headline-line-height h1,.swagger-ui .nested-headline-line-height h2,.swagger-ui .nested-headline-line-height h3,.swagger-ui .nested-headline-line-height h4,.swagger-ui .nested-headline-line-height h5,.swagger-ui .nested-headline-line-height h6{line-height:1.25}.swagger-ui .nested-list-reset ol,.swagger-ui .nested-list-reset ul{list-style-type:none;margin-left:0;padding-left:0}.swagger-ui .nested-copy-indent p+p{margin-bottom:0;margin-top:0;text-indent:.1em}.swagger-ui .nested-copy-seperator p+p{margin-top:1.5em}.swagger-ui .nested-img img{display:block;max-width:100%;width:100%}.swagger-ui .nested-links a{color:#357edd;transition:color .15s ease-in}.swagger-ui .nested-links a:focus,.swagger-ui .nested-links a:hover{color:#96ccff;transition:color .15s ease-in}.swagger-ui .wrapper{box-sizing:border-box;margin:0 auto;max-width:1460px;padding:0 20px;width:100%}.swagger-ui .opblock-tag-section{display:flex;flex-direction:column}.swagger-ui .try-out.btn-group{display:flex;flex:.1 2 auto;padding:0}.swagger-ui .try-out__btn{margin-left:1.25rem}.swagger-ui .opblock-tag{align-items:center;border-bottom:1px solid rgba(59,65,81,.3);cursor:pointer;display:flex;padding:10px 20px 10px 10px;transition:all .2s}.swagger-ui .opblock-tag:hover{background:rgba(0,0,0,.02)}.swagger-ui .opblock-tag{color:#3b4151;font-family:sans-serif;font-size:24px;margin:0 0 5px}.swagger-ui .opblock-tag.no-desc span{flex:1}.swagger-ui .opblock-tag svg{transition:all .4s}.swagger-ui .opblock-tag small{color:#3b4151;flex:2;font-family:sans-serif;font-size:14px;font-weight:400;padding:0 10px}.swagger-ui .opblock-tag>div{flex:1 1 150px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:640px){.swagger-ui .opblock-tag small,.swagger-ui .opblock-tag>div{flex:1}}.swagger-ui .opblock-tag .info__externaldocs{text-align:right}.swagger-ui .parameter__type{color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;padding:5px 0}.swagger-ui .parameter-controls{margin-top:.75em}.swagger-ui .examples__title{display:block;font-size:1.1em;font-weight:700;margin-bottom:.75em}.swagger-ui .examples__section{margin-top:1.5em}.swagger-ui .examples__section-header{font-size:.9rem;font-weight:700;margin-bottom:.5rem}.swagger-ui .examples-select{display:inline-block;margin-bottom:.75em}.swagger-ui .examples-select .examples-select-element{width:100%}.swagger-ui .examples-select__section-label{font-size:.9rem;font-weight:700;margin-right:.5rem}.swagger-ui .example__section{margin-top:1.5em}.swagger-ui .example__section-header{font-size:.9rem;font-weight:700;margin-bottom:.5rem}.swagger-ui .view-line-link{cursor:pointer;margin:0 5px;position:relative;top:3px;transition:all .5s;width:20px}.swagger-ui .opblock{border:1px solid #000;border-radius:4px;box-shadow:0 0 3px rgba(0,0,0,.19);margin:0 0 15px}.swagger-ui .opblock .tab-header{display:flex;flex:1}.swagger-ui .opblock .tab-header .tab-item{cursor:pointer;padding:0 40px}.swagger-ui .opblock .tab-header .tab-item:first-of-type{padding:0 40px 0 0}.swagger-ui .opblock .tab-header .tab-item.active h4 span{position:relative}.swagger-ui .opblock .tab-header .tab-item.active h4 span:after{background:grey;bottom:-15px;content:\"\";height:4px;left:50%;position:absolute;transform:translateX(-50%);width:120%}.swagger-ui .opblock.is-open .opblock-summary{border-bottom:1px solid #000}.swagger-ui .opblock .opblock-section-header{align-items:center;background:hsla(0,0%,100%,.8);box-shadow:0 1px 2px rgba(0,0,0,.1);display:flex;min-height:50px;padding:8px 20px}.swagger-ui .opblock .opblock-section-header>label{align-items:center;color:#3b4151;display:flex;font-family:sans-serif;font-size:12px;font-weight:700;margin:0 0 0 auto}.swagger-ui .opblock .opblock-section-header>label>span{padding:0 10px 0 0}.swagger-ui .opblock .opblock-section-header h4{color:#3b4151;flex:1;font-family:sans-serif;font-size:14px;margin:0}.swagger-ui .opblock .opblock-summary-method{background:#000;border-radius:3px;color:#fff;font-family:sans-serif;font-size:14px;font-weight:700;min-width:80px;padding:6px 0;text-align:center;text-shadow:0 1px 0 rgba(0,0,0,.1)}@media(max-width:768px){.swagger-ui .opblock .opblock-summary-method{font-size:12px}}.swagger-ui .opblock .opblock-summary-operation-id,.swagger-ui .opblock .opblock-summary-path,.swagger-ui .opblock .opblock-summary-path__deprecated{align-items:center;color:#3b4151;display:flex;font-family:monospace;font-size:16px;font-weight:600;word-break:break-word}@media(max-width:768px){.swagger-ui .opblock .opblock-summary-operation-id,.swagger-ui .opblock .opblock-summary-path,.swagger-ui .opblock .opblock-summary-path__deprecated{font-size:12px}}.swagger-ui .opblock .opblock-summary-path{flex-shrink:1}@media(max-width:640px){.swagger-ui .opblock .opblock-summary-path{max-width:100%}}.swagger-ui .opblock .opblock-summary-path__deprecated{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .opblock .opblock-summary-operation-id{font-size:14px}.swagger-ui .opblock .opblock-summary-description{color:#3b4151;font-family:sans-serif;font-size:13px;word-break:break-word}.swagger-ui .opblock .opblock-summary-path-description-wrapper{align-items:center;display:flex;flex-direction:row;flex-grow:1;flex-wrap:wrap;gap:0 10px;padding:0 10px}@media(max-width:550px){.swagger-ui .opblock .opblock-summary-path-description-wrapper{align-items:flex-start;flex-direction:column}}.swagger-ui .opblock .opblock-summary{align-items:center;cursor:pointer;display:flex;padding:5px}.swagger-ui .opblock .opblock-summary .view-line-link{cursor:pointer;margin:0;position:relative;top:2px;transition:all .5s;width:0}.swagger-ui .opblock .opblock-summary:hover .view-line-link{margin:0 5px;width:18px}.swagger-ui .opblock .opblock-summary:hover .view-line-link.copy-to-clipboard{width:24px}.swagger-ui .opblock.opblock-post{background:rgba(73,204,144,.1);border-color:#49cc90}.swagger-ui .opblock.opblock-post .opblock-summary-method{background:#49cc90}.swagger-ui .opblock.opblock-post .opblock-summary{border-color:#49cc90}.swagger-ui .opblock.opblock-post .tab-header .tab-item.active h4 span:after{background:#49cc90}.swagger-ui .opblock.opblock-put{background:rgba(252,161,48,.1);border-color:#fca130}.swagger-ui .opblock.opblock-put .opblock-summary-method{background:#fca130}.swagger-ui .opblock.opblock-put .opblock-summary{border-color:#fca130}.swagger-ui .opblock.opblock-put .tab-header .tab-item.active h4 span:after{background:#fca130}.swagger-ui .opblock.opblock-delete{background:rgba(249,62,62,.1);border-color:#f93e3e}.swagger-ui .opblock.opblock-delete .opblock-summary-method{background:#f93e3e}.swagger-ui .opblock.opblock-delete .opblock-summary{border-color:#f93e3e}.swagger-ui .opblock.opblock-delete .tab-header .tab-item.active h4 span:after{background:#f93e3e}.swagger-ui .opblock.opblock-get{background:rgba(97,175,254,.1);border-color:#61affe}.swagger-ui .opblock.opblock-get .opblock-summary-method{background:#61affe}.swagger-ui .opblock.opblock-get .opblock-summary{border-color:#61affe}.swagger-ui .opblock.opblock-get .tab-header .tab-item.active h4 span:after{background:#61affe}.swagger-ui .opblock.opblock-patch{background:rgba(80,227,194,.1);border-color:#50e3c2}.swagger-ui .opblock.opblock-patch .opblock-summary-method{background:#50e3c2}.swagger-ui .opblock.opblock-patch .opblock-summary{border-color:#50e3c2}.swagger-ui .opblock.opblock-patch .tab-header .tab-item.active h4 span:after{background:#50e3c2}.swagger-ui .opblock.opblock-head{background:rgba(144,18,254,.1);border-color:#9012fe}.swagger-ui .opblock.opblock-head .opblock-summary-method{background:#9012fe}.swagger-ui .opblock.opblock-head .opblock-summary{border-color:#9012fe}.swagger-ui .opblock.opblock-head .tab-header .tab-item.active h4 span:after{background:#9012fe}.swagger-ui .opblock.opblock-options{background:rgba(13,90,167,.1);border-color:#0d5aa7}.swagger-ui .opblock.opblock-options .opblock-summary-method{background:#0d5aa7}.swagger-ui .opblock.opblock-options .opblock-summary{border-color:#0d5aa7}.swagger-ui .opblock.opblock-options .tab-header .tab-item.active h4 span:after{background:#0d5aa7}.swagger-ui .opblock.opblock-deprecated{background:hsla(0,0%,92%,.1);border-color:#ebebeb;opacity:.6}.swagger-ui .opblock.opblock-deprecated .opblock-summary-method{background:#ebebeb}.swagger-ui .opblock.opblock-deprecated .opblock-summary{border-color:#ebebeb}.swagger-ui .opblock.opblock-deprecated .tab-header .tab-item.active h4 span:after{background:#ebebeb}.swagger-ui .opblock .opblock-schemes{padding:8px 20px}.swagger-ui .opblock .opblock-schemes .schemes-title{padding:0 10px 0 0}.swagger-ui .filter .operation-filter-input{border:2px solid #d8dde7;margin:20px 0;padding:10px;width:100%}.swagger-ui .download-url-wrapper .failed,.swagger-ui .filter .failed{color:red}.swagger-ui .download-url-wrapper .loading,.swagger-ui .filter .loading{color:#aaa}.swagger-ui .model-example{margin-top:1em}.swagger-ui .model-example .model-container{overflow-x:auto;width:100%}.swagger-ui .model-example .model-container .model-hint:not(.model-hint--embedded){top:-1.15em}.swagger-ui .tab{display:flex;list-style:none;padding:0}.swagger-ui .tab li{color:#3b4151;cursor:pointer;font-family:sans-serif;font-size:12px;min-width:60px;padding:0}.swagger-ui .tab li:first-of-type{padding-left:0;padding-right:12px;position:relative}.swagger-ui .tab li:first-of-type:after{background:rgba(0,0,0,.2);content:\"\";height:100%;position:absolute;right:6px;top:0;width:1px}.swagger-ui .tab li.active{font-weight:700}.swagger-ui .tab li button.tablinks{background:none;border:0;color:inherit;font-family:inherit;font-weight:inherit;padding:0}.swagger-ui .opblock-description-wrapper,.swagger-ui .opblock-external-docs-wrapper,.swagger-ui .opblock-title_normal{color:#3b4151;font-family:sans-serif;font-size:12px;margin:0 0 5px;padding:15px 20px}.swagger-ui .opblock-description-wrapper h4,.swagger-ui .opblock-external-docs-wrapper h4,.swagger-ui .opblock-title_normal h4{color:#3b4151;font-family:sans-serif;font-size:12px;margin:0 0 5px}.swagger-ui .opblock-description-wrapper p,.swagger-ui .opblock-external-docs-wrapper p,.swagger-ui .opblock-title_normal p{color:#3b4151;font-family:sans-serif;font-size:14px;margin:0}.swagger-ui .opblock-external-docs-wrapper h4{padding-left:0}.swagger-ui .execute-wrapper{padding:20px;text-align:right}.swagger-ui .execute-wrapper .btn{padding:8px 40px;width:100%}.swagger-ui .body-param-options{display:flex;flex-direction:column}.swagger-ui .body-param-options .body-param-edit{padding:10px 0}.swagger-ui .body-param-options label{padding:8px 0}.swagger-ui .body-param-options label select{margin:3px 0 0}.swagger-ui .responses-inner{padding:20px}.swagger-ui .responses-inner h4,.swagger-ui .responses-inner h5{color:#3b4151;font-family:sans-serif;font-size:12px;margin:10px 0 5px}.swagger-ui .responses-inner .curl{max-height:400px;min-height:6em;overflow-y:auto}.swagger-ui .response-col_status{color:#3b4151;font-family:sans-serif;font-size:14px}.swagger-ui .response-col_status .response-undocumented{color:#909090;font-family:monospace;font-size:11px;font-weight:600}.swagger-ui .response-col_links{color:#3b4151;font-family:sans-serif;font-size:14px;max-width:40em;padding-left:2em}.swagger-ui .response-col_links .response-undocumented{color:#909090;font-family:monospace;font-size:11px;font-weight:600}.swagger-ui .response-col_links .operation-link{margin-bottom:1.5em}.swagger-ui .response-col_links .operation-link .description{margin-bottom:.5em}.swagger-ui .opblock-body .opblock-loading-animation{display:block;margin:3em auto}.swagger-ui .opblock-body pre.microlight{background:#333;border-radius:4px;font-size:12px;hyphens:auto;margin:0;padding:10px;white-space:pre-wrap;word-break:break-all;word-break:break-word;word-wrap:break-word;color:#fff;font-family:monospace;font-weight:600}.swagger-ui .opblock-body pre.microlight .headerline{display:block}.swagger-ui .highlight-code{position:relative}.swagger-ui .highlight-code>.microlight{max-height:400px;min-height:6em;overflow-y:auto}.swagger-ui .highlight-code>.microlight code{white-space:pre-wrap!important;word-break:break-all}.swagger-ui .curl-command{position:relative}.swagger-ui .download-contents{align-items:center;background:#7d8293;border:none;border-radius:4px;bottom:10px;color:#fff;display:flex;font-family:sans-serif;font-size:14px;font-weight:600;height:30px;justify-content:center;padding:5px;position:absolute;right:10px;text-align:center}.swagger-ui .scheme-container{background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.15);margin:0 0 20px;padding:30px 0}.swagger-ui .scheme-container .schemes{align-items:flex-end;display:flex;flex-wrap:wrap;gap:10px;justify-content:space-between}.swagger-ui .scheme-container .schemes>.schemes-server-container{display:flex;flex-wrap:wrap;gap:10px}.swagger-ui .scheme-container .schemes>.schemes-server-container>label{color:#3b4151;display:flex;flex-direction:column;font-family:sans-serif;font-size:12px;font-weight:700;margin:-20px 15px 0 0}.swagger-ui .scheme-container .schemes>.schemes-server-container>label select{min-width:130px;text-transform:uppercase}.swagger-ui .scheme-container .schemes:not(:has(.schemes-server-container)){justify-content:flex-end}.swagger-ui .scheme-container .schemes .auth-wrapper{flex:none;justify-content:start}.swagger-ui .scheme-container .schemes .auth-wrapper .authorize{display:flex;flex-wrap:nowrap;margin:0;padding-right:20px}.swagger-ui .loading-container{align-items:center;display:flex;flex-direction:column;justify-content:center;margin-top:1em;min-height:1px;padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{color:#3b4151;content:\"loading\";font-family:sans-serif;font-size:10px;font-weight:700;left:50%;position:absolute;text-transform:uppercase;top:50%;transform:translate(-50%,-50%)}.swagger-ui .loading-container .loading:before{animation:rotation 1s linear infinite,opacity .5s;backface-visibility:hidden;border:2px solid rgba(85,85,85,.1);border-radius:100%;border-top-color:rgba(0,0,0,.6);content:\"\";display:block;height:60px;left:50%;margin:-30px;opacity:1;position:absolute;top:50%;width:60px}@keyframes rotation{to{transform:rotate(1turn)}}.swagger-ui .response-controls{display:flex;padding-top:1em}.swagger-ui .response-control-media-type{margin-right:1em}.swagger-ui .response-control-media-type--accept-controller select{border-color:green}.swagger-ui .response-control-media-type__accept-message{color:green;font-size:.7em}.swagger-ui .response-control-examples__title,.swagger-ui .response-control-media-type__title{display:block;font-size:.7em;margin-bottom:.2em}@keyframes blinker{50%{opacity:0}}.swagger-ui .hidden{display:none}.swagger-ui .no-margin{border:none;height:auto;margin:0;padding:0}.swagger-ui .float-right{float:right}.swagger-ui .svg-assets{height:0;position:absolute;width:0}.swagger-ui section h3{color:#3b4151;font-family:sans-serif}.swagger-ui a.nostyle{display:inline}.swagger-ui a.nostyle,.swagger-ui a.nostyle:visited{color:inherit;cursor:pointer;text-decoration:inherit}.swagger-ui .fallback{color:#aaa;padding:1em}.swagger-ui .version-pragma{height:100%;padding:5em 0}.swagger-ui .version-pragma__message{display:flex;font-size:1.2em;height:100%;justify-content:center;line-height:1.5em;padding:0 .6em;text-align:center}.swagger-ui .version-pragma__message>div{flex:1;max-width:55ch}.swagger-ui .version-pragma__message code{background-color:#dedede;padding:4px 4px 2px;white-space:pre}.swagger-ui .opblock-link{font-weight:400}.swagger-ui .opblock-link.shown{font-weight:700}.swagger-ui span.token-string{color:#555}.swagger-ui span.token-not-formatted{color:#555;font-weight:700}.swagger-ui .btn{background:transparent;border:2px solid grey;border-radius:4px;box-shadow:0 1px 2px rgba(0,0,0,.1);color:#3b4151;font-family:sans-serif;font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s}.swagger-ui .btn.btn-sm{font-size:12px;padding:4px 23px}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{background-color:transparent;border-color:#ff6060;color:#ff6060;font-family:sans-serif}.swagger-ui .btn.authorize{background-color:transparent;border-color:#49cc90;color:#49cc90;display:inline;line-height:1}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{background-color:#4990e2;border-color:#4990e2;color:#fff}.swagger-ui .btn-group{display:flex;padding:30px}.swagger-ui .btn-group .btn{flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{background:none;border:none;padding:0 0 0 10px}.swagger-ui .authorization__btn .locked{opacity:1}.swagger-ui .authorization__btn .unlocked{opacity:.4}.swagger-ui .model-box-control,.swagger-ui .models-control,.swagger-ui .opblock-summary-control{all:inherit;border-bottom:0;cursor:pointer;flex:1;padding:0}.swagger-ui .model-box-control:focus,.swagger-ui .models-control:focus,.swagger-ui .opblock-summary-control:focus{outline:auto}.swagger-ui .expand-methods,.swagger-ui .expand-operation{background:none;border:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{height:20px;width:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#404040}.swagger-ui .expand-methods svg{transition:all .3s;fill:#707070}.swagger-ui button{cursor:pointer}.swagger-ui button.invalid{animation:shake .4s 1;background:#feebeb;border-color:#f93e3e}.swagger-ui .copy-to-clipboard{align-items:center;background:#7d8293;border:none;border-radius:4px;bottom:10px;display:flex;height:30px;justify-content:center;position:absolute;right:100px;width:30px}.swagger-ui .copy-to-clipboard button{background:url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"16\\\" height=\\\"15\\\" aria-hidden=\\\"true\\\"><path fill=\\\"%23fff\\\" fill-rule=\\\"evenodd\\\" d=\\\"M4 12h4v1H4zm5-6H4v1h5zm2 3V7l-3 3 3 3v-2h5V9zM6.5 8H4v1h2.5zM4 11h2.5v-1H4zm9 1h1v2c-.02.28-.11.52-.3.7s-.42.28-.7.3H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h3c0-1.11.89-2 2-2s2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V5H3v9h10zM4 4h8c0-.55-.45-1-1-1h-1c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H5c-.55 0-1 .45-1 1\\\"/></svg>\") 50% no-repeat;border:none;flex-grow:1;flex-shrink:1;height:25px}.swagger-ui .copy-to-clipboard:active{background:#5e626f}.swagger-ui .opblock-control-arrow{background:none;border:none;text-align:center}.swagger-ui .curl-command .copy-to-clipboard{bottom:5px;height:20px;right:10px;width:20px}.swagger-ui .curl-command .copy-to-clipboard button{height:18px}.swagger-ui .opblock .opblock-summary .view-line-link.copy-to-clipboard{height:26px;position:static}.swagger-ui select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#f7f7f7 url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" viewBox=\\\"0 0 20 20\\\"><path d=\\\"M13.418 7.859a.695.695 0 0 1 .978 0 .68.68 0 0 1 0 .969l-3.908 3.83a.697.697 0 0 1-.979 0l-3.908-3.83a.68.68 0 0 1 0-.969.695.695 0 0 1 .978 0L10 11z\\\"/></svg>\") right 10px center no-repeat;background-size:20px;border:2px solid #41444e;border-radius:4px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);color:#3b4151;font-family:sans-serif;font-size:14px;font-weight:700;padding:5px 40px 5px 10px}.swagger-ui select[multiple]{background:#f7f7f7;margin:5px 0;padding:5px}.swagger-ui select.invalid{animation:shake .4s 1;background:#feebeb;border-color:#f93e3e}.swagger-ui .opblock-body select{min-width:230px}@media(max-width:768px){.swagger-ui .opblock-body select{min-width:180px}}@media(max-width:640px){.swagger-ui .opblock-body select{min-width:100%;width:100%}}.swagger-ui label{color:#3b4151;font-family:sans-serif;font-size:12px;font-weight:700;margin:0 0 5px}.swagger-ui input[type=email],.swagger-ui input[type=file],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{line-height:1}@media(max-width:768px){.swagger-ui input[type=email],.swagger-ui input[type=file],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{max-width:175px}}.swagger-ui input[type=email],.swagger-ui input[type=file],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text],.swagger-ui textarea{background:#fff;border:1px solid #d9d9d9;border-radius:4px;margin:5px 0;min-width:100px;padding:8px 10px}.swagger-ui input[type=email].invalid,.swagger-ui input[type=file].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid,.swagger-ui textarea.invalid{animation:shake .4s 1;background:#feebeb;border-color:#f93e3e}.swagger-ui input[disabled],.swagger-ui select[disabled],.swagger-ui textarea[disabled]{background-color:#fafafa;color:#888;cursor:not-allowed}.swagger-ui select[disabled]{border-color:#888}.swagger-ui textarea[disabled]{background-color:#41444e;color:#fff}@keyframes shake{10%,90%{transform:translate3d(-1px,0,0)}20%,80%{transform:translate3d(2px,0,0)}30%,50%,70%{transform:translate3d(-4px,0,0)}40%,60%{transform:translate3d(4px,0,0)}}.swagger-ui textarea{background:hsla(0,0%,100%,.8);border:none;border-radius:4px;color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;min-height:280px;outline:none;padding:10px;width:100%}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{background:#41444e;border-radius:4px;color:#fff;font-family:monospace;font-size:12px;font-weight:600;margin:0;min-height:100px;padding:10px;resize:none}.swagger-ui .checkbox{color:#303030;padding:5px 0 10px;transition:opacity .5s}.swagger-ui .checkbox label{display:flex}.swagger-ui .checkbox p{color:#3b4151;font-family:monospace;font-style:italic;font-weight:400!important;font-weight:600;margin:0!important}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{background:#e8e8e8;border-radius:1px;box-shadow:0 0 0 2px #e8e8e8;cursor:pointer;display:inline-block;flex:none;height:16px;margin:0 8px 0 0;padding:5px;position:relative;top:3px;width:16px}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"10\\\" height=\\\"8\\\" viewBox=\\\"3 7 10 8\\\"><path fill=\\\"%2341474E\\\" fill-rule=\\\"evenodd\\\" d=\\\"M6.333 15 3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z\\\"/></svg>\") 50% no-repeat}.swagger-ui .dialog-ux{bottom:0;left:0;position:fixed;right:0;top:0;z-index:9999}.swagger-ui .dialog-ux .backdrop-ux{background:rgba(0,0,0,.8);bottom:0;left:0;position:fixed;right:0;top:0}.swagger-ui .dialog-ux .modal-ux{background:#fff;border:1px solid #ebebeb;border-radius:4px;box-shadow:0 10px 30px 0 rgba(0,0,0,.2);left:50%;max-width:650px;min-width:300px;position:absolute;top:50%;transform:translate(-50%,-50%);width:100%;z-index:9999}.swagger-ui .dialog-ux .modal-ux-content{max-height:540px;overflow-y:auto;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{color:#41444e;color:#3b4151;font-family:sans-serif;font-size:12px;margin:0 0 5px}.swagger-ui .dialog-ux .modal-ux-content h4{color:#3b4151;font-family:sans-serif;font-size:18px;font-weight:600;margin:15px 0 0}.swagger-ui .dialog-ux .modal-ux-header{align-items:center;border-bottom:1px solid #ebebeb;display:flex;padding:12px 0}.swagger-ui .dialog-ux .modal-ux-header .close-modal{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;padding:0 10px}.swagger-ui .dialog-ux .modal-ux-header h3{color:#3b4151;flex:1;font-family:sans-serif;font-size:20px;font-weight:600;margin:0;padding:0 20px}.swagger-ui .model{color:#3b4151;font-family:monospace;font-size:12px;font-weight:300;font-weight:600}.swagger-ui .model .deprecated span,.swagger-ui .model .deprecated td{color:#a0a0a0!important}.swagger-ui .model .deprecated>td:first-of-type{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .model-toggle{cursor:pointer;display:inline-block;font-size:10px;margin:auto .3em;position:relative;top:6px;transform:rotate(90deg);transform-origin:50% 50%;transition:transform .15s ease-in}.swagger-ui .model-toggle.collapsed{transform:rotate(0deg)}.swagger-ui .model-toggle:after{background:url(\"data:image/svg+xml;charset=utf-8,<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" width=\\\"24\\\" height=\\\"24\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\\\"/></svg>\") 50% no-repeat;background-size:100%;content:\"\";display:block;height:20px;width:20px}.swagger-ui .model-jump-to-path{cursor:pointer;position:relative}.swagger-ui .model-jump-to-path .view-line-link{cursor:pointer;position:absolute;top:-.4em}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{display:block}.swagger-ui .model-hint{background:rgba(0,0,0,.7);border-radius:4px;color:#ebebeb;display:none;padding:.1em .5em;position:absolute;top:-1.8em;white-space:nowrap}.swagger-ui .model p{margin:0 0 1em}.swagger-ui .model .property{color:#999;font-style:italic}.swagger-ui .model .property.primitive{color:#6b6b6b}.swagger-ui .model .property.primitive.extension{display:block}.swagger-ui .model .property.primitive.extension>td:first-child{padding-left:0;padding-right:0;width:auto}.swagger-ui .model .property.primitive.extension>td:first-child:after{content:\": \"}.swagger-ui .model .external-docs,.swagger-ui table.model tr.description{color:#666;font-weight:400}.swagger-ui table.model tr.description td:first-child,.swagger-ui table.model tr.property-row.required td:first-child{font-weight:700}.swagger-ui table.model tr.property-row td{vertical-align:top}.swagger-ui table.model tr.property-row td:first-child{padding-right:.2em}.swagger-ui table.model tr.property-row .star{color:red}.swagger-ui table.model tr.extension{color:#777}.swagger-ui table.model tr.extension td:last-child{vertical-align:top}.swagger-ui table.model tr.external-docs td:first-child{font-weight:700}.swagger-ui table.model tr .renderedMarkdown p:first-child{margin-top:0}.swagger-ui section.models{border:1px solid rgba(59,65,81,.3);border-radius:4px;margin:30px 0}.swagger-ui section.models .pointer{cursor:pointer}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{border-bottom:1px solid rgba(59,65,81,.3);margin:0 0 5px}.swagger-ui section.models h4{align-items:center;color:#606060;cursor:pointer;display:flex;font-family:sans-serif;font-size:16px;margin:0;padding:10px 20px 10px 10px;transition:all .2s}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{color:#707070;font-family:sans-serif;font-size:16px;margin:0 0 10px}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{background:rgba(0,0,0,.05);border-radius:4px;margin:0 20px 15px;position:relative;transition:all .5s}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-container .models-jump-to-path{opacity:.65;position:absolute;right:5px;top:8px}.swagger-ui section.models .model-box{background:none}.swagger-ui section.models .model-box:has(.model-box){overflow-x:auto;width:100%}.swagger-ui .model-box{background:rgba(0,0,0,.1);border-radius:4px;display:inline-block;padding:10px}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-box.deprecated{opacity:.5}.swagger-ui .model-title{color:#505050;font-family:sans-serif;font-size:16px}.swagger-ui .model-title img{bottom:0;margin-left:1em;position:relative}.swagger-ui .model-deprecated-warning{color:#f93e3e;font-family:sans-serif;font-size:16px;font-weight:600;margin-right:1em}.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-name{display:inline-block;margin-right:1em}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#606060}.swagger-ui .servers>label{color:#3b4151;font-family:sans-serif;font-size:12px;margin:-20px 15px 0 0}.swagger-ui .servers>label select{max-width:100%;min-width:130px;width:100%}.swagger-ui .servers h4.message{padding-bottom:2em}.swagger-ui .servers table tr{width:30em}.swagger-ui .servers table td{display:inline-block;max-width:15em;padding-bottom:10px;padding-top:10px;vertical-align:middle}.swagger-ui .servers table td:first-of-type{padding-right:1em}.swagger-ui .servers table td input{height:100%;width:100%}.swagger-ui .servers .computed-url{margin:2em 0}.swagger-ui .servers .computed-url code{display:inline-block;font-size:16px;margin:0 1em;padding:4px}.swagger-ui .servers-title{font-size:12px;font-weight:700}.swagger-ui .operation-servers h4.message{margin-bottom:2em}.swagger-ui table{border-collapse:collapse;padding:0 10px;width:100%}.swagger-ui table.model tbody tr td{padding:0 0 0 1em;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{padding:0 0 0 2em;width:174px}.swagger-ui table.headers td{color:#3b4151;font-family:monospace;font-size:12px;font-weight:300;font-weight:600;vertical-align:middle}.swagger-ui table.headers .header-example{color:#999;font-style:italic}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{min-width:6em;padding:10px 0}.swagger-ui table tbody tr td:has(.model-box){max-width:1px}.swagger-ui table thead tr td,.swagger-ui table thead tr th{border-bottom:1px solid rgba(59,65,81,.2);color:#3b4151;font-family:sans-serif;font-size:12px;font-weight:700;padding:12px 0;text-align:left}.swagger-ui .parameters-col_description{margin-bottom:2em;width:99%}.swagger-ui .parameters-col_description input{max-width:340px;width:100%}.swagger-ui .parameters-col_description select{border-width:1px}.swagger-ui .parameters-col_description .markdown p,.swagger-ui .parameters-col_description .renderedMarkdown p{margin:0}.swagger-ui .parameter__name{color:#3b4151;font-family:sans-serif;font-size:16px;font-weight:400;margin-right:.75em}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required span{color:red}.swagger-ui .parameter__name.required:after{color:rgba(255,0,0,.6);content:\"required\";font-size:10px;padding:5px;position:relative;top:-6px}.swagger-ui .parameter__extension,.swagger-ui .parameter__in{color:grey;font-family:monospace;font-size:12px;font-style:italic;font-weight:600}.swagger-ui .parameter__deprecated{color:red;font-family:monospace;font-size:12px;font-style:italic;font-weight:600}.swagger-ui .parameter__empty_value_toggle{display:block;font-size:13px;padding-bottom:12px;padding-top:5px}.swagger-ui .parameter__empty_value_toggle input{margin-right:7px;width:auto}.swagger-ui .parameter__empty_value_toggle.disabled{opacity:.7}.swagger-ui .table-container{padding:20px}.swagger-ui .response-col_description{width:99%}.swagger-ui .response-col_description .markdown p,.swagger-ui .response-col_description .renderedMarkdown p{margin:0}.swagger-ui .response-col_links{min-width:6em}.swagger-ui .response__extension{color:grey;font-family:monospace;font-size:12px;font-style:italic;font-weight:600}.swagger-ui .topbar{background-color:#1b1b1b;padding:10px 0}.swagger-ui .topbar .topbar-wrapper{align-items:center;display:flex;flex-wrap:wrap;gap:10px}@media(max-width:550px){.swagger-ui .topbar .topbar-wrapper{align-items:start;flex-direction:column}}.swagger-ui .topbar a{align-items:center;color:#fff;display:flex;flex:1;font-family:sans-serif;font-size:1.5em;font-weight:700;max-width:300px;-webkit-text-decoration:none;text-decoration:none}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:flex;flex:3;justify-content:flex-end}.swagger-ui .topbar .download-url-wrapper input[type=text]{border:2px solid #62a03f;border-radius:4px 0 0 4px;margin:0;max-width:100%;outline:none;width:100%}.swagger-ui .topbar .download-url-wrapper .select-label{align-items:center;color:#f0f0f0;display:flex;margin:0;max-width:600px;width:100%}.swagger-ui .topbar .download-url-wrapper .select-label span{flex:1;font-size:16px;padding:0 10px 0 0;text-align:right}.swagger-ui .topbar .download-url-wrapper .select-label select{border:2px solid #62a03f;box-shadow:none;flex:2;outline:none;width:100%}.swagger-ui .topbar .download-url-wrapper .download-url-button{background:#62a03f;border:none;border-radius:0 4px 4px 0;color:#fff;font-family:sans-serif;font-size:16px;font-weight:700;padding:4px 30px}@media(max-width:550px){.swagger-ui .topbar .download-url-wrapper{width:100%}}.swagger-ui .info{margin:50px 0}.swagger-ui .info.failed-config{margin-left:auto;margin-right:auto;max-width:880px;text-align:center}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info pre,.swagger-ui .info table{font-size:14px}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5,.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{color:#3b4151;font-family:sans-serif}.swagger-ui .info a{color:#4990e2;font-family:sans-serif;font-size:14px;transition:all .4s}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{color:#3b4151;font-family:monospace;font-size:12px;font-weight:300!important;font-weight:600;margin:0}.swagger-ui .info .title{color:#3b4151;font-family:sans-serif;font-size:36px;margin:0}.swagger-ui .info .title small{background:#7d8492;border-radius:57px;display:inline-block;font-size:10px;margin:0 0 0 5px;padding:2px 4px;position:relative;top:-5px;vertical-align:super}.swagger-ui .info .title small.version-stamp{background-color:#89bf04}.swagger-ui .info .title small pre{color:#fff;font-family:sans-serif;margin:0;padding:0}.swagger-ui .auth-btn-wrapper{display:flex;justify-content:center;padding:10px 0}.swagger-ui .auth-btn-wrapper .btn-done{margin-right:1em}.swagger-ui .auth-wrapper{display:flex;flex:1;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{margin-left:10px;margin-right:10px;padding-right:20px}.swagger-ui .auth-container{border-bottom:1px solid #ebebeb;margin:0 0 10px;padding:10px 20px}.swagger-ui .auth-container:last-of-type{border:0;margin:0;padding:10px 20px}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{background-color:#fee;border-radius:4px;color:red;color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;margin:1em;padding:10px}.swagger-ui .auth-container .errors b{margin-right:1em;text-transform:capitalize}.swagger-ui .scopes h2{color:#3b4151;font-family:sans-serif;font-size:14px}.swagger-ui .scopes h2 a{color:#4990e2;cursor:pointer;font-size:12px;padding-left:10px;-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{animation:scaleUp .5s;background:rgba(249,62,62,.1);border:2px solid #f93e3e;border-radius:4px;margin:20px;padding:10px 20px}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{color:#3b4151;font-family:monospace;font-size:14px;font-weight:600;margin:0}.swagger-ui .errors-wrapper .errors small{color:#606060}.swagger-ui .errors-wrapper .errors .message{white-space:pre-line}.swagger-ui .errors-wrapper .errors .message.thrown{max-width:100%}.swagger-ui .errors-wrapper .errors .error-line{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline}.swagger-ui .errors-wrapper hgroup{align-items:center;display:flex}.swagger-ui .errors-wrapper hgroup h4{color:#3b4151;flex:1;font-family:sans-serif;font-size:20px;margin:0}@keyframes scaleUp{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}.swagger-ui .Resizer.vertical.disabled{display:none}.swagger-ui .markdown p,.swagger-ui .markdown pre,.swagger-ui .renderedMarkdown p,.swagger-ui .renderedMarkdown pre{margin:1em auto;word-break:break-all;word-break:break-word}.swagger-ui .markdown pre,.swagger-ui .renderedMarkdown pre{background:none;color:#000;font-weight:400;padding:0;white-space:pre-wrap}.swagger-ui .markdown code,.swagger-ui .renderedMarkdown code{background:rgba(0,0,0,.05);border-radius:4px;color:#9012fe;font-family:monospace;font-size:14px;font-weight:600;padding:5px 7px}.swagger-ui .markdown pre>code,.swagger-ui .renderedMarkdown pre>code{display:block}.swagger-ui .json-schema-2020-12-keyword--\\$vocabulary ul{border-left:1px dashed rgba(0,0,0,.1);margin:0 0 0 20px}.swagger-ui .json-schema-2020-12-\\$vocabulary-uri{margin-left:35px}.swagger-ui .json-schema-2020-12-\\$vocabulary-uri--disabled{-webkit-text-decoration:line-through;text-decoration:line-through}.swagger-ui .json-schema-2020-12-keyword--const .json-schema-2020-12-json-viewer__name,.swagger-ui .json-schema-2020-12-keyword--const .json-schema-2020-12-json-viewer__value{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12__constraint{background-color:#805ad5;border-radius:4px;color:#3b4151;color:#fff;font-family:monospace;font-weight:600;line-height:1.5;margin-left:10px;padding:1px 3px}.swagger-ui .json-schema-2020-12__constraint--string{background-color:#d69e2e;color:#fff}.swagger-ui .json-schema-2020-12-keyword--default .json-schema-2020-12-json-viewer__name,.swagger-ui .json-schema-2020-12-keyword--default .json-schema-2020-12-json-viewer__value{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-keyword--dependentRequired>ul{display:inline-block;margin:0;padding:0}.swagger-ui .json-schema-2020-12-keyword--dependentRequired>ul li{display:inline;list-style-type:none}.swagger-ui .json-schema-2020-12-keyword--description{color:#6b6b6b;font-size:12px;margin-left:20px}.swagger-ui .json-schema-2020-12-keyword--description p{margin:0}.swagger-ui .json-schema-2020-12-keyword--enum .json-schema-2020-12-json-viewer__name,.swagger-ui .json-schema-2020-12-keyword--enum .json-schema-2020-12-json-viewer__value,.swagger-ui .json-schema-2020-12-keyword--examples .json-schema-2020-12-json-viewer__name,.swagger-ui .json-schema-2020-12-keyword--examples .json-schema-2020-12-json-viewer__value{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-json-viewer-extension-keyword .json-schema-2020-12-json-viewer__name,.swagger-ui .json-schema-2020-12-json-viewer-extension-keyword .json-schema-2020-12-json-viewer__value{color:#929292;font-style:italic}.swagger-ui .json-schema-2020-12-keyword--patternProperties ul{border:none;margin:0;padding:0}.swagger-ui .json-schema-2020-12-keyword--patternProperties .json-schema-2020-12__title:first-of-type:after,.swagger-ui .json-schema-2020-12-keyword--patternProperties .json-schema-2020-12__title:first-of-type:before{color:#55a;content:\"/\"}.swagger-ui .json-schema-2020-12-keyword--properties>ul{border:none;margin:0;padding:0}.swagger-ui .json-schema-2020-12-property{list-style-type:none}.swagger-ui .json-schema-2020-12-property--required>.json-schema-2020-12:first-of-type>.json-schema-2020-12-head .json-schema-2020-12__title:after{color:red;content:\"*\";font-weight:700}.swagger-ui .json-schema-2020-12__title{color:#505050;display:inline-block;font-family:sans-serif;font-size:12px;font-weight:700;line-height:normal}.swagger-ui .json-schema-2020-12__title .json-schema-2020-12-keyword__name{margin:0}.swagger-ui .json-schema-2020-12-property{margin:7px 0}.swagger-ui .json-schema-2020-12-property .json-schema-2020-12__title{color:#3b4151;font-family:monospace;font-size:12px;font-weight:600;vertical-align:middle}.swagger-ui .json-schema-2020-12-keyword{margin:5px 0}.swagger-ui .json-schema-2020-12-keyword__children{border-left:1px dashed rgba(0,0,0,.1);margin:0 0 0 20px;padding:0}.swagger-ui .json-schema-2020-12-keyword__children--collapsed{display:none}.swagger-ui .json-schema-2020-12-keyword__name{font-size:12px;font-weight:700;margin-left:20px}.swagger-ui .json-schema-2020-12-keyword__name--primary{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-keyword__name--secondary{color:#6b6b6b;font-style:italic}.swagger-ui .json-schema-2020-12-keyword__name--extension{color:#929292;font-style:italic}.swagger-ui .json-schema-2020-12-keyword__value{color:#6b6b6b;font-size:12px;font-style:italic;font-weight:400}.swagger-ui .json-schema-2020-12-keyword__value--primary{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-keyword__value--secondary{color:#6b6b6b;font-style:italic}.swagger-ui .json-schema-2020-12-keyword__value--extension{color:#929292;font-style:italic}.swagger-ui .json-schema-2020-12-keyword__value--warning{border:1px dashed red;border-radius:4px;color:#3b4151;color:red;display:inline-block;font-family:monospace;font-style:normal;font-weight:600;line-height:1.5;margin-left:10px;padding:1px 4px}.swagger-ui .json-schema-2020-12-keyword__name--secondary+.json-schema-2020-12-keyword__value--secondary:before{content:\"=\"}.swagger-ui .json-schema-2020-12__attribute{color:#3b4151;font-family:monospace;font-size:12px;padding-left:10px;text-transform:lowercase}.swagger-ui .json-schema-2020-12__attribute--primary{color:#55a}.swagger-ui .json-schema-2020-12__attribute--muted{color:gray}.swagger-ui .json-schema-2020-12__attribute--warning{color:red}.swagger-ui .json-schema-2020-12-json-viewer{margin:5px 0}.swagger-ui .json-schema-2020-12-json-viewer__children{border-left:1px dashed rgba(0,0,0,.1);margin:0 0 0 20px;padding:0}.swagger-ui .json-schema-2020-12-json-viewer__children--collapsed{display:none}.swagger-ui .json-schema-2020-12-json-viewer__name{font-size:12px;font-weight:700;margin-left:20px}.swagger-ui .json-schema-2020-12-json-viewer__name--primary{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-json-viewer__name--secondary{color:#6b6b6b;font-style:italic}.swagger-ui .json-schema-2020-12-json-viewer__name--extension{color:#929292;font-style:italic}.swagger-ui .json-schema-2020-12-json-viewer__value{color:#6b6b6b;font-size:12px;font-style:italic;font-weight:400}.swagger-ui .json-schema-2020-12-json-viewer__value--primary{color:#3b4151;font-style:normal}.swagger-ui .json-schema-2020-12-json-viewer__value--secondary{color:#6b6b6b;font-style:italic}.swagger-ui .json-schema-2020-12-json-viewer__value--extension{color:#929292;font-style:italic}.swagger-ui .json-schema-2020-12-json-viewer__value--warning{border:1px dashed red;border-radius:4px;color:#3b4151;color:red;display:inline-block;font-family:monospace;font-style:normal;font-weight:600;line-height:1.5;margin-left:10px;padding:1px 4px}.swagger-ui .json-schema-2020-12-json-viewer__name--secondary+.json-schema-2020-12-json-viewer__value--secondary:before{content:\"=\"}.swagger-ui .json-schema-2020-12{background-color:rgba(0,0,0,.05);border-radius:4px;margin:0 20px 15px;padding:12px 0 12px 20px}.swagger-ui .json-schema-2020-12:first-of-type{margin:20px}.swagger-ui .json-schema-2020-12:last-of-type{margin:0 20px}.swagger-ui .json-schema-2020-12--embedded{background-color:inherit;padding-bottom:0;padding-left:inherit;padding-right:inherit;padding-top:0}.swagger-ui .json-schema-2020-12-body{border-left:1px dashed rgba(0,0,0,.1);margin:2px 0}.swagger-ui .json-schema-2020-12-body--collapsed{display:none}.swagger-ui .json-schema-2020-12-accordion{border:none;outline:none;padding-left:0}.swagger-ui .json-schema-2020-12-accordion__children{display:inline-block}.swagger-ui .json-schema-2020-12-accordion__icon{display:inline-block;height:18px;vertical-align:bottom;width:18px}.swagger-ui .json-schema-2020-12-accordion__icon--expanded{transform:rotate(-90deg);transform-origin:50% 50%;transition:transform .15s ease-in}.swagger-ui .json-schema-2020-12-accordion__icon--collapsed{transform:rotate(0deg);transform-origin:50% 50%;transition:transform .15s ease-in}.swagger-ui .json-schema-2020-12-accordion__icon svg{height:20px;width:20px}.swagger-ui .json-schema-2020-12-expand-deep-button{border:none;color:#505050;color:#afaeae;font-family:sans-serif;font-size:12px;padding-right:0}.swagger-ui .model-box .json-schema-2020-12:not(.json-schema-2020-12--embedded)>.json-schema-2020-12-head .json-schema-2020-12__title:first-of-type{font-size:16px}.swagger-ui .model-box>.json-schema-2020-12{margin:0}.swagger-ui .model-box .json-schema-2020-12{background-color:transparent;padding:0}.swagger-ui .model-box .json-schema-2020-12-accordion,.swagger-ui .model-box .json-schema-2020-12-expand-deep-button{background-color:transparent}.swagger-ui .models .json-schema-2020-12:not(.json-schema-2020-12--embedded)>.json-schema-2020-12-head .json-schema-2020-12__title:first-of-type{font-size:16px}.swagger-ui .models .json-schema-2020-12:not(.json-schema-2020-12--embedded){overflow-x:auto;width:calc(100% - 40px)}\n\n/*# sourceMappingURL=swagger-ui.css.map*/"
  },
  {
    "path": "runner/server/docs/ui/swagger-ui.js",
    "content": "!function webpackUniversalModuleDefinition(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.SwaggerUICore=t():e.SwaggerUICore=t()}(this,(()=>(()=>{\"use strict\";var e={158:e=>{e.exports=require(\"buffer\")}},t={};function __webpack_require__(r){var a=t[r];if(void 0!==a)return a.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,__webpack_require__),n.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var r={};__webpack_require__.d(r,{default:()=>To});var a={};__webpack_require__.r(a),__webpack_require__.d(a,{CLEAR:()=>D,CLEAR_BY:()=>U,NEW_AUTH_ERR:()=>L,NEW_SPEC_ERR:()=>$,NEW_SPEC_ERR_BATCH:()=>V,NEW_THROWN_ERR:()=>R,NEW_THROWN_ERR_BATCH:()=>J,clear:()=>clear,clearBy:()=>clearBy,newAuthErr:()=>newAuthErr,newSpecErr:()=>newSpecErr,newSpecErrBatch:()=>newSpecErrBatch,newThrownErr:()=>newThrownErr,newThrownErrBatch:()=>newThrownErrBatch});var n={};__webpack_require__.r(n),__webpack_require__.d(n,{AUTHORIZE:()=>he,AUTHORIZE_OAUTH2:()=>ye,CONFIGURE_AUTH:()=>fe,LOGOUT:()=>ge,RESTORE_AUTHORIZATION:()=>Se,SHOW_AUTH_POPUP:()=>de,authPopup:()=>authPopup,authorize:()=>authorize,authorizeAccessCodeWithBasicAuthentication:()=>authorizeAccessCodeWithBasicAuthentication,authorizeAccessCodeWithFormParams:()=>authorizeAccessCodeWithFormParams,authorizeApplication:()=>authorizeApplication,authorizeOauth2:()=>authorizeOauth2,authorizeOauth2WithPersistOption:()=>authorizeOauth2WithPersistOption,authorizePassword:()=>authorizePassword,authorizeRequest:()=>authorizeRequest,authorizeWithPersistOption:()=>authorizeWithPersistOption,configureAuth:()=>configureAuth,logout:()=>logout,logoutWithPersistOption:()=>logoutWithPersistOption,persistAuthorizationIfNeeded:()=>persistAuthorizationIfNeeded,preAuthorizeImplicit:()=>preAuthorizeImplicit,restoreAuthorization:()=>restoreAuthorization,showDefinitions:()=>showDefinitions});var s={};__webpack_require__.r(s),__webpack_require__.d(s,{authorized:()=>be,definitionsForRequirements:()=>definitionsForRequirements,definitionsToAuthorize:()=>we,getConfigs:()=>Ce,getDefinitionsByNames:()=>getDefinitionsByNames,isAuthorized:()=>isAuthorized,selectAuthPath:()=>selectAuthPath,shownDefinitions:()=>ve});var o={};__webpack_require__.r(o),__webpack_require__.d(o,{TOGGLE_CONFIGS:()=>Me,UPDATE_CONFIGS:()=>Pe,downloadConfig:()=>downloadConfig,getConfigByUrl:()=>getConfigByUrl,loaded:()=>actions_loaded,toggle:()=>toggle,update:()=>update});var l={};__webpack_require__.r(l),__webpack_require__.d(l,{get:()=>get});var c={};__webpack_require__.r(c),__webpack_require__.d(c,{transform:()=>transform});var i={};__webpack_require__.r(i),__webpack_require__.d(i,{transform:()=>parameter_oneof_transform});var p={};__webpack_require__.r(p),__webpack_require__.d(p,{allErrors:()=>Xe,lastError:()=>Ge});var m={};__webpack_require__.r(m),__webpack_require__.d(m,{SHOW:()=>rt,UPDATE_FILTER:()=>et,UPDATE_LAYOUT:()=>Ze,UPDATE_MODE:()=>tt,changeMode:()=>changeMode,show:()=>actions_show,updateFilter:()=>updateFilter,updateLayout:()=>updateLayout});var u={};__webpack_require__.r(u),__webpack_require__.d(u,{current:()=>current,currentFilter:()=>currentFilter,isShown:()=>isShown,showSummary:()=>nt,whatMode:()=>whatMode});var d={};__webpack_require__.r(d),__webpack_require__.d(d,{taggedOperations:()=>taggedOperations});var h={};__webpack_require__.r(h),__webpack_require__.d(h,{getActiveLanguage:()=>lt,getDefaultExpanded:()=>ct,getGenerators:()=>ot,getSnippetGenerators:()=>getSnippetGenerators});var g={};__webpack_require__.r(g),__webpack_require__.d(g,{JsonSchemaArrayItemFile:()=>JsonSchemaArrayItemFile,JsonSchemaArrayItemText:()=>JsonSchemaArrayItemText,JsonSchemaForm:()=>JsonSchemaForm,JsonSchema_array:()=>JsonSchema_array,JsonSchema_boolean:()=>JsonSchema_boolean,JsonSchema_object:()=>JsonSchema_object,JsonSchema_string:()=>JsonSchema_string});var y={};__webpack_require__.r(y),__webpack_require__.d(y,{allowTryItOutFor:()=>allowTryItOutFor,basePath:()=>cr,canExecuteScheme:()=>canExecuteScheme,consumes:()=>ar,consumesOptionsFor:()=>consumesOptionsFor,contentTypeValues:()=>contentTypeValues,currentProducesFor:()=>currentProducesFor,definitions:()=>lr,externalDocs:()=>Yt,findDefinition:()=>findDefinition,getOAS3RequiredRequestBodyContentType:()=>getOAS3RequiredRequestBodyContentType,getParameter:()=>getParameter,hasHost:()=>fr,host:()=>ir,info:()=>Gt,isMediaTypeSchemaPropertiesEqual:()=>isMediaTypeSchemaPropertiesEqual,isOAS3:()=>Xt,lastError:()=>Dt,mutatedRequestFor:()=>mutatedRequestFor,mutatedRequests:()=>yr,operationScheme:()=>operationScheme,operationWithMeta:()=>operationWithMeta,operations:()=>rr,operationsWithRootInherited:()=>mr,operationsWithTags:()=>dr,parameterInclusionSettingFor:()=>parameterInclusionSettingFor,parameterValues:()=>parameterValues,parameterWithMeta:()=>parameterWithMeta,parameterWithMetaByIdentity:()=>parameterWithMetaByIdentity,parametersIncludeIn:()=>parametersIncludeIn,parametersIncludeType:()=>parametersIncludeType,paths:()=>er,produces:()=>nr,producesOptionsFor:()=>producesOptionsFor,requestFor:()=>requestFor,requests:()=>gr,responseFor:()=>responseFor,responses:()=>hr,schemes:()=>pr,security:()=>sr,securityDefinitions:()=>or,semver:()=>Zt,spec:()=>spec,specJS:()=>Ft,specJson:()=>Bt,specJsonWithResolvedSubtrees:()=>Ht,specResolved:()=>Wt,specResolvedSubtree:()=>specResolvedSubtree,specSource:()=>zt,specStr:()=>Kt,tagDetails:()=>tagDetails,taggedOperations:()=>selectors_taggedOperations,tags:()=>ur,url:()=>Ut,validOperationMethods:()=>tr,validateBeforeExecute:()=>validateBeforeExecute,validationErrors:()=>validationErrors,version:()=>Qt});var f={};__webpack_require__.r(f),__webpack_require__.d(f,{CLEAR_REQUEST:()=>Jr,CLEAR_RESPONSE:()=>Rr,CLEAR_VALIDATE_PARAMS:()=>$r,LOG_REQUEST:()=>Tr,SET_MUTATED_REQUEST:()=>Mr,SET_REQUEST:()=>Pr,SET_RESPONSE:()=>qr,SET_SCHEME:()=>Ur,UPDATE_EMPTY_PARAM_INCLUSION:()=>Ir,UPDATE_JSON:()=>kr,UPDATE_OPERATION_META_VALUE:()=>Vr,UPDATE_PARAM:()=>Ar,UPDATE_RESOLVED:()=>Lr,UPDATE_RESOLVED_SUBTREE:()=>Dr,UPDATE_SPEC:()=>Or,UPDATE_URL:()=>Nr,VALIDATE_PARAMS:()=>jr,changeConsumesValue:()=>changeConsumesValue,changeParam:()=>changeParam,changeParamByIdentity:()=>changeParamByIdentity,changeProducesValue:()=>changeProducesValue,clearRequest:()=>clearRequest,clearResponse:()=>clearResponse,clearValidateParams:()=>clearValidateParams,execute:()=>actions_execute,executeRequest:()=>executeRequest,invalidateResolvedSubtreeCache:()=>invalidateResolvedSubtreeCache,logRequest:()=>logRequest,parseToJson:()=>parseToJson,requestResolvedSubtree:()=>requestResolvedSubtree,resolveSpec:()=>resolveSpec,setMutatedRequest:()=>setMutatedRequest,setRequest:()=>setRequest,setResponse:()=>setResponse,setScheme:()=>setScheme,updateEmptyParamInclusion:()=>updateEmptyParamInclusion,updateJsonSpec:()=>updateJsonSpec,updateResolved:()=>updateResolved,updateResolvedSubtree:()=>updateResolvedSubtree,updateSpec:()=>updateSpec,updateUrl:()=>updateUrl,validateParams:()=>validateParams});var S={};__webpack_require__.r(S),__webpack_require__.d(S,{executeRequest:()=>wrap_actions_executeRequest,updateJsonSpec:()=>wrap_actions_updateJsonSpec,updateSpec:()=>wrap_actions_updateSpec,validateParams:()=>wrap_actions_validateParams});var E={};__webpack_require__.r(E),__webpack_require__.d(E,{Button:()=>Button,Col:()=>Col,Collapse:()=>Collapse,Container:()=>Container,Input:()=>Input,Link:()=>Link,Row:()=>Row,Select:()=>Select,TextArea:()=>TextArea});var _={};__webpack_require__.r(_),__webpack_require__.d(_,{basePath:()=>wn,consumes:()=>bn,definitions:()=>Sn,findDefinition:()=>fn,hasHost:()=>En,host:()=>vn,produces:()=>Cn,schemes:()=>xn,securityDefinitions:()=>_n,validOperationMethods:()=>wrap_selectors_validOperationMethods});var v={};__webpack_require__.r(v),__webpack_require__.d(v,{definitionsToAuthorize:()=>On});var w={};__webpack_require__.r(w),__webpack_require__.d(w,{callbacksOperations:()=>An,findSchema:()=>findSchema,isOAS3:()=>selectors_isOAS3,isOAS30:()=>selectors_isOAS30,isSwagger2:()=>selectors_isSwagger2,servers:()=>kn});var b={};__webpack_require__.r(b),__webpack_require__.d(b,{CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>Xn,CLEAR_REQUEST_BODY_VALUE:()=>Gn,SET_REQUEST_BODY_VALIDATE_ERROR:()=>Hn,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>zn,UPDATE_REQUEST_BODY_INCLUSION:()=>Kn,UPDATE_REQUEST_BODY_VALUE:()=>Dn,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>Un,UPDATE_REQUEST_CONTENT_TYPE:()=>Bn,UPDATE_RESPONSE_CONTENT_TYPE:()=>Fn,UPDATE_SELECTED_SERVER:()=>Ln,UPDATE_SERVER_VARIABLE_VALUE:()=>Wn,clearRequestBodyValidateError:()=>clearRequestBodyValidateError,clearRequestBodyValue:()=>clearRequestBodyValue,initRequestBodyValidateError:()=>initRequestBodyValidateError,setActiveExamplesMember:()=>setActiveExamplesMember,setRequestBodyInclusion:()=>setRequestBodyInclusion,setRequestBodyValidateError:()=>setRequestBodyValidateError,setRequestBodyValue:()=>setRequestBodyValue,setRequestContentType:()=>setRequestContentType,setResponseContentType:()=>setResponseContentType,setRetainRequestBodyValueFlag:()=>setRetainRequestBodyValueFlag,setSelectedServer:()=>setSelectedServer,setServerVariableValue:()=>setServerVariableValue});var C={};__webpack_require__.r(C),__webpack_require__.d(C,{activeExamplesMember:()=>ss,hasUserEditedBody:()=>rs,requestBodyErrors:()=>ns,requestBodyInclusionSetting:()=>as,requestBodyValue:()=>es,requestContentType:()=>os,responseContentType:()=>ls,selectDefaultRequestBodyValue:()=>selectDefaultRequestBodyValue,selectedServer:()=>Zn,serverEffectiveValue:()=>ps,serverVariableValue:()=>cs,serverVariables:()=>is,shouldRetainRequestBodyValue:()=>ts,validOperationMethods:()=>us,validateBeforeExecute:()=>ms,validateShallowRequired:()=>validateShallowRequired});const x=require(\"react\");var O=__webpack_require__.n(x);const N=require(\"redux\"),k=require(\"immutable\");var A=__webpack_require__.n(k);const I=require(\"deep-extend\");var j=__webpack_require__.n(I);const q=require(\"redux-immutable\"),P=require(\"serialize-error\"),M=require(\"lodash/merge\");var T=__webpack_require__.n(M);const R=\"err_new_thrown_err\",J=\"err_new_thrown_err_batch\",$=\"err_new_spec_err\",V=\"err_new_spec_err_batch\",L=\"err_new_auth_err\",D=\"err_clear\",U=\"err_clear_by\";function newThrownErr(e){return{type:R,payload:(0,P.serializeError)(e)}}function newThrownErrBatch(e){return{type:J,payload:e}}function newSpecErr(e){return{type:$,payload:e}}function newSpecErrBatch(e){return{type:V,payload:e}}function newAuthErr(e){return{type:L,payload:e}}function clear(e={}){return{type:D,payload:e}}function clearBy(e=()=>!0){return{type:U,payload:e}}const K=function makeWindow(){var e={location:{},history:{},open:()=>{},close:()=>{},File:function(){},FormData:function(){}};if(\"undefined\"==typeof window)return e;try{e=window;for(var t of[\"File\",\"Blob\",\"FormData\"])t in window&&(e[t]=window[t])}catch(e){console.error(e)}return e}(),z=(require(\"lodash/camelCase\"),require(\"lodash/upperFirst\"),require(\"lodash/memoize\"));var B=__webpack_require__.n(z);const F=require(\"lodash/find\");var W=__webpack_require__.n(F);const H=require(\"lodash/some\");var X=__webpack_require__.n(H);const G=require(\"lodash/eq\");var Y=__webpack_require__.n(G);const Q=require(\"lodash/isFunction\");var Z=__webpack_require__.n(Q);const ee=require(\"css.escape\");var te=__webpack_require__.n(ee);const re=require(\"randombytes\");var ae=__webpack_require__.n(re);const ne=require(\"sha.js\");var se=__webpack_require__.n(ne);const oe=A().Set.of(\"type\",\"format\",\"items\",\"default\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"enum\",\"multipleOf\");function getParameterSchema(e,{isOAS3:t}={}){if(!A().Map.isMap(e))return{schema:A().Map(),parameterContentMediaType:null};if(!t)return\"body\"===e.get(\"in\")?{schema:e.get(\"schema\",A().Map()),parameterContentMediaType:null}:{schema:e.filter(((e,t)=>oe.includes(t))),parameterContentMediaType:null};if(e.get(\"content\")){const t=e.get(\"content\",A().Map({})).keySeq().first();return{schema:e.getIn([\"content\",t,\"schema\"],A().Map()),parameterContentMediaType:t}}return{schema:e.get(\"schema\")?e.get(\"schema\",A().Map()):A().Map(),parameterContentMediaType:null}}var le=__webpack_require__(158).Buffer;const ce=\"default\",isImmutable=e=>A().Iterable.isIterable(e),immutableToJS=e=>isImmutable(e)?e.toJS():e;function objectify(e){return isObject(e)?immutableToJS(e):{}}function fromJSOrdered(e){if(isImmutable(e))return e;if(e instanceof K.File)return e;if(!isObject(e))return e;if(Array.isArray(e))return A().Seq(e).map(fromJSOrdered).toList();if(Z()(e.entries)){const t=function createObjWithHashedKeys(e){if(!Z()(e.entries))return e;const t={},r=\"_**[]\",a={};for(let n of e.entries())if(t[n[0]]||a[n[0]]&&a[n[0]].containsMultiple){if(!a[n[0]]){a[n[0]]={containsMultiple:!0,length:1},t[`${n[0]}${r}${a[n[0]].length}`]=t[n[0]],delete t[n[0]]}a[n[0]].length+=1,t[`${n[0]}${r}${a[n[0]].length}`]=n[1]}else t[n[0]]=n[1];return t}(e);return A().OrderedMap(t).map(fromJSOrdered)}return A().OrderedMap(e).map(fromJSOrdered)}function normalizeArray(e){return Array.isArray(e)?e:[e]}function isFn(e){return\"function\"==typeof e}function isObject(e){return!!e&&\"object\"==typeof e}function isFunc(e){return\"function\"==typeof e}function isArray(e){return Array.isArray(e)}const ie=B();function objMap(e,t){return Object.keys(e).reduce(((r,a)=>(r[a]=t(e[a],a),r)),{})}function objReduce(e,t){return Object.keys(e).reduce(((r,a)=>{let n=t(e[a],a);return n&&\"object\"==typeof n&&Object.assign(r,n),r}),{})}function systemThunkMiddleware(e){return({dispatch:t,getState:r})=>t=>r=>\"function\"==typeof r?r(e()):t(r)}function validateValueBySchema(e,t,r,a,n){if(!t)return[];let s=[],o=t.get(\"nullable\"),l=t.get(\"required\"),c=t.get(\"maximum\"),i=t.get(\"minimum\"),p=t.get(\"type\"),m=t.get(\"format\"),u=t.get(\"maxLength\"),d=t.get(\"minLength\"),h=t.get(\"uniqueItems\"),g=t.get(\"maxItems\"),y=t.get(\"minItems\"),f=t.get(\"pattern\");const S=r||!0===l,E=null!=e,_=S||E&&\"array\"===p||!(!S&&!E),v=o&&null===e;if(S&&!E&&!v&&!a&&!p)return s.push(\"Required field is not provided\"),s;if(v||!p||!_)return[];let w=\"string\"===p&&e,b=\"array\"===p&&Array.isArray(e)&&e.length,C=\"array\"===p&&A().List.isList(e)&&e.count();const x=[w,b,C,\"array\"===p&&\"string\"==typeof e&&e,\"file\"===p&&e instanceof K.File,\"boolean\"===p&&(e||!1===e),\"number\"===p&&(e||0===e),\"integer\"===p&&(e||0===e),\"object\"===p&&\"object\"==typeof e&&null!==e,\"object\"===p&&\"string\"==typeof e&&e].some((e=>!!e));if(S&&!x&&!a)return s.push(\"Required field is not provided\"),s;if(\"object\"===p&&(null===n||\"application/json\"===n)){let r=e;if(\"string\"==typeof e)try{r=JSON.parse(e)}catch(e){return s.push(\"Parameter string value must be valid JSON\"),s}t&&t.has(\"required\")&&isFunc(l.isList)&&l.isList()&&l.forEach((e=>{void 0===r[e]&&s.push({propKey:e,error:\"Required property not found\"})})),t&&t.has(\"properties\")&&t.get(\"properties\").forEach(((e,t)=>{const o=validateValueBySchema(r[t],e,!1,a,n);s.push(...o.map((e=>({propKey:t,error:e}))))}))}if(f){let t=((e,t)=>{if(!new RegExp(t).test(e))return\"Value must follow pattern \"+t})(e,f);t&&s.push(t)}if(y&&\"array\"===p){let t=((e,t)=>{if(!e&&t>=1||e&&e.length<t)return`Array must contain at least ${t} item${1===t?\"\":\"s\"}`})(e,y);t&&s.push(t)}if(g&&\"array\"===p){let t=((e,t)=>{if(e&&e.length>t)return`Array must not contain more then ${t} item${1===t?\"\":\"s\"}`})(e,g);t&&s.push({needRemove:!0,error:t})}if(h&&\"array\"===p){let t=((e,t)=>{if(e&&(\"true\"===t||!0===t)){const t=(0,k.fromJS)(e),r=t.toSet();if(e.length>r.size){let e=(0,k.Set)();if(t.forEach(((r,a)=>{t.filter((e=>isFunc(e.equals)?e.equals(r):e===r)).size>1&&(e=e.add(a))})),0!==e.size)return e.map((e=>({index:e,error:\"No duplicates allowed.\"}))).toArray()}}})(e,h);t&&s.push(...t)}if(u||0===u){let t=((e,t)=>{if(e.length>t)return`Value must be no longer than ${t} character${1!==t?\"s\":\"\"}`})(e,u);t&&s.push(t)}if(d){let t=((e,t)=>{if(e.length<t)return`Value must be at least ${t} character${1!==t?\"s\":\"\"}`})(e,d);t&&s.push(t)}if(c||0===c){let t=((e,t)=>{if(e>t)return`Value must be less than or equal to ${t}`})(e,c);t&&s.push(t)}if(i||0===i){let t=((e,t)=>{if(e<t)return`Value must be greater than or equal to ${t}`})(e,i);t&&s.push(t)}if(\"string\"===p){let t;if(t=\"date-time\"===m?(e=>{if(isNaN(Date.parse(e)))return\"Value must be a DateTime\"})(e):\"uuid\"===m?(e=>{if(e=e.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(e))return\"Value must be a Guid\"})(e):(e=>{if(e&&\"string\"!=typeof e)return\"Value must be a string\"})(e),!t)return s;s.push(t)}else if(\"boolean\"===p){let t=(e=>{if(\"true\"!==e&&\"false\"!==e&&!0!==e&&!1!==e)return\"Value must be a boolean\"})(e);if(!t)return s;s.push(t)}else if(\"number\"===p){let t=(e=>{if(!/^-?\\d+(\\.?\\d+)?$/.test(e))return\"Value must be a number\"})(e);if(!t)return s;s.push(t)}else if(\"integer\"===p){let t=(e=>{if(!/^-?\\d+$/.test(e))return\"Value must be an integer\"})(e);if(!t)return s;s.push(t)}else if(\"array\"===p){if(!b&&!C)return s;e&&e.forEach(((e,r)=>{const o=validateValueBySchema(e,t.get(\"items\"),!1,a,n);s.push(...o.map((e=>({index:r,error:e}))))}))}else if(\"file\"===p){let t=(e=>{if(e&&!(e instanceof K.File))return\"Value must be a file\"})(e);if(!t)return s;s.push(t)}return s}const btoa=e=>{let t;return t=e instanceof le?e:le.from(e.toString(),\"utf-8\"),t.toString(\"base64\")},pe={operationsSorter:{alpha:(e,t)=>e.get(\"path\").localeCompare(t.get(\"path\")),method:(e,t)=>e.get(\"method\").localeCompare(t.get(\"method\"))},tagsSorter:{alpha:(e,t)=>e.localeCompare(t)}},buildFormData=e=>{let t=[];for(let r in e){let a=e[r];void 0!==a&&\"\"!==a&&t.push([r,\"=\",encodeURIComponent(a).replace(/%20/g,\"+\")].join(\"\"))}return t.join(\"&\")},shallowEqualKeys=(e,t,r)=>!!W()(r,(r=>Y()(e[r],t[r])));function requiresValidationURL(e){return!(!e||e.indexOf(\"localhost\")>=0||e.indexOf(\"127.0.0.1\")>=0||\"none\"===e)}const createDeepLinkPath=e=>\"string\"==typeof e||e instanceof String?e.trim().replace(/\\s/g,\"%20\"):\"\",escapeDeepLinkPath=e=>te()(createDeepLinkPath(e).replace(/%20/g,\"_\")),getExtensions=e=>{const t=/^x-/;return k.Map.isMap(e)?e.filter(((e,r)=>t.test(r))):Object.keys(e).filter((e=>t.test(e)))},getCommonExtensions=e=>e.filter(((e,t)=>/^pattern|maxLength|minLength|maximum|minimum/.test(t)));function deeplyStripKey(e,t,r=()=>!0){if(\"object\"!=typeof e||Array.isArray(e)||null===e||!t)return e;const a=Object.assign({},e);return Object.keys(a).forEach((e=>{e===t&&r(a[e],e)?delete a[e]:a[e]=deeplyStripKey(a[e],t,r)})),a}function stringify(e){if(\"string\"==typeof e)return e;if(e&&e.toJS&&(e=e.toJS()),\"object\"==typeof e&&null!==e)try{return JSON.stringify(e,null,2)}catch(t){return String(e)}return null==e?\"\":e.toString()}function paramToIdentifier(e,{returnAll:t=!1,allowHashes:r=!0}={}){if(!A().Map.isMap(e))throw new Error(\"paramToIdentifier: received a non-Im.Map parameter as input\");const a=e.get(\"name\"),n=e.get(\"in\");let s=[];return e&&e.hashCode&&n&&a&&r&&s.push(`${n}.${a}.hash-${e.hashCode()}`),n&&a&&s.push(`${n}.${a}`),s.push(a),t?s:s[0]||\"\"}function paramToValue(e,t){return paramToIdentifier(e,{returnAll:!0}).map((e=>t[e])).filter((e=>void 0!==e))[0]}function b64toB64UrlEncoded(e){return e.replace(/\\+/g,\"-\").replace(/\\//g,\"_\").replace(/=/g,\"\")}const isEmptyValue=e=>!e||!(!isImmutable(e)||!e.isEmpty()),idFn=e=>e;class Store{constructor(e={}){j()(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},e),this.getSystem=this._getSystem.bind(this),this.store=function configureStore(e,t,r){return function createStoreWithMiddleware(e,t,r){let a=[systemThunkMiddleware(r)];const n=K.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||N.compose;return(0,N.createStore)(e,t,n((0,N.applyMiddleware)(...a)))}(e,t,r)}(idFn,(0,k.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(e,t=!0){var r=combinePlugins(e,this.getSystem());systemExtend(this.system,r),t&&this.buildSystem();callAfterLoad.call(this.system,e,this.getSystem())&&this.buildSystem()}buildSystem(e=!0){let t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getWrappedAndBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:A(),React:O()},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(e){this.system.configs=e}rebuildReducer(){this.store.replaceReducer(function buildReducer(e,t){return function allReducers(e,t){let r=Object.keys(e).reduce(((r,a)=>(r[a]=function makeReducer(e,t){return(r=new k.Map,a)=>{if(!e)return r;let n=e[a.type];if(n){const e=wrapWithTryCatch(n,t)(r,a);return null===e?r:e}return r}}(e[a],t),r)),{});if(!Object.keys(r).length)return idFn;return(0,q.combineReducers)(r)}(objMap(e,(e=>e.reducers)),t)}(this.system.statePlugins,this.getSystem))}getType(e){let t=e[0].toUpperCase()+e.slice(1);return objReduce(this.system.statePlugins,((r,a)=>{let n=r[e];if(n)return{[a+t]:n}}))}getSelectors(){return this.getType(\"selectors\")}getActions(){return objMap(this.getType(\"actions\"),(e=>objReduce(e,((e,t)=>{if(isFn(e))return{[t]:e}}))))}getWrappedAndBoundActions(e){return objMap(this.getBoundActions(e),((e,t)=>{let r=this.system.statePlugins[t.slice(0,-7)].wrapActions;return r?objMap(e,((e,t)=>{let a=r[t];return a?(Array.isArray(a)||(a=[a]),a.reduce(((e,t)=>{let newAction=(...r)=>t(e,this.getSystem())(...r);if(!isFn(newAction))throw new TypeError(\"wrapActions needs to return a function that returns a new function (ie the wrapped action)\");return wrapWithTryCatch(newAction,this.getSystem)}),e||Function.prototype)):e})):e}))}getWrappedAndBoundSelectors(e,t){return objMap(this.getBoundSelectors(e,t),((t,r)=>{let a=[r.slice(0,-9)],n=this.system.statePlugins[a].wrapSelectors;return n?objMap(t,((t,r)=>{let s=n[r];return s?(Array.isArray(s)||(s=[s]),s.reduce(((t,r)=>{let wrappedSelector=(...n)=>r(t,this.getSystem())(e().getIn(a),...n);if(!isFn(wrappedSelector))throw new TypeError(\"wrapSelector needs to return a function that returns a new function (ie the wrapped action)\");return wrappedSelector}),t||Function.prototype)):t})):t}))}getStates(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=e.get(r),t)),{})}getStateThunks(e){return Object.keys(this.system.statePlugins).reduce(((t,r)=>(t[r]=()=>e().get(r),t)),{})}getFn(){return{fn:this.system.fn}}getComponents(e){const t=this.system.components[e];return Array.isArray(t)?t.reduce(((e,t)=>t(e,this.getSystem()))):void 0!==e?this.system.components[e]:this.system.components}getBoundSelectors(e,t){return objMap(this.getSelectors(),((r,a)=>{let n=[a.slice(0,-9)];return objMap(r,(r=>(...a)=>{let s=wrapWithTryCatch(r,this.getSystem).apply(null,[e().getIn(n),...a]);return\"function\"==typeof s&&(s=wrapWithTryCatch(s,this.getSystem)(t())),s}))}))}getBoundActions(e){e=e||this.getStore().dispatch;const t=this.getActions(),process=e=>\"function\"!=typeof e?objMap(e,(e=>process(e))):(...t)=>{var r=null;try{r=e(...t)}catch(e){r={type:R,error:!0,payload:(0,P.serializeError)(e)}}finally{return r}};return objMap(t,(t=>(0,N.bindActionCreators)(process(t),e)))}getMapStateToProps(){return()=>Object.assign({},this.getSystem())}getMapDispatchToProps(e){return t=>j()({},this.getWrappedAndBoundActions(t),this.getFn(),e)}}function combinePlugins(e,t){return isObject(e)&&!isArray(e)?T()({},e):isFunc(e)?combinePlugins(e(t),t):isArray(e)?e.map((e=>combinePlugins(e,t))).reduce(systemExtend,{components:t.getComponents()}):{}}function callAfterLoad(e,t,{hasLoaded:r}={}){let a=r;return isObject(e)&&!isArray(e)&&\"function\"==typeof e.afterLoad&&(a=!0,wrapWithTryCatch(e.afterLoad,t.getSystem).call(this,t)),isFunc(e)?callAfterLoad.call(this,e(t),t,{hasLoaded:a}):isArray(e)?e.map((e=>callAfterLoad.call(this,e,t,{hasLoaded:a}))):a}function systemExtend(e={},t={}){if(!isObject(e))return{};if(!isObject(t))return e;t.wrapComponents&&(objMap(t.wrapComponents,((r,a)=>{const n=e.components&&e.components[a];n&&Array.isArray(n)?(e.components[a]=n.concat([r]),delete t.wrapComponents[a]):n&&(e.components[a]=[n,r],delete t.wrapComponents[a])})),Object.keys(t.wrapComponents).length||delete t.wrapComponents);const{statePlugins:r}=e;if(isObject(r))for(let e in r){const a=r[e];if(!isObject(a))continue;const{wrapActions:n,wrapSelectors:s}=a;if(isObject(n))for(let r in n){let a=n[r];Array.isArray(a)||(a=[a],n[r]=a),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapActions&&t.statePlugins[e].wrapActions[r]&&(t.statePlugins[e].wrapActions[r]=n[r].concat(t.statePlugins[e].wrapActions[r]))}if(isObject(s))for(let r in s){let a=s[r];Array.isArray(a)||(a=[a],s[r]=a),t&&t.statePlugins&&t.statePlugins[e]&&t.statePlugins[e].wrapSelectors&&t.statePlugins[e].wrapSelectors[r]&&(t.statePlugins[e].wrapSelectors[r]=s[r].concat(t.statePlugins[e].wrapSelectors[r]))}}return j()(e,t)}function wrapWithTryCatch(e,t,{logErrors:r=!0}={}){return\"function\"!=typeof e?e:function(...a){try{return e.call(this,...a)}catch(e){if(r){const{uncaughtExceptionHandler:r}=t().getConfigs();\"function\"==typeof r?r(e):console.error(e)}return null}}}const me=require(\"url-parse\");var ue=__webpack_require__.n(me);const de=\"show_popup\",he=\"authorize\",ge=\"logout\",ye=\"authorize_oauth2\",fe=\"configure_auth\",Se=\"restore_authorization\";function showDefinitions(e){return{type:de,payload:e}}function authorize(e){return{type:he,payload:e}}const authorizeWithPersistOption=e=>({authActions:t})=>{t.authorize(e),t.persistAuthorizationIfNeeded()};function logout(e){return{type:ge,payload:e}}const logoutWithPersistOption=e=>({authActions:t})=>{t.logout(e),t.persistAuthorizationIfNeeded()},preAuthorizeImplicit=e=>({authActions:t,errActions:r})=>{let{auth:a,token:n,isValid:s}=e,{schema:o,name:l}=a,c=o.get(\"flow\");delete K.swaggerUIRedirectOauth2,\"accessCode\"===c||s||r.newAuthErr({authId:l,source:\"auth\",level:\"warning\",message:\"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server\"}),n.error?r.newAuthErr({authId:l,source:\"auth\",level:\"error\",message:JSON.stringify(n)}):t.authorizeOauth2WithPersistOption({auth:a,token:n})};function authorizeOauth2(e){return{type:ye,payload:e}}const authorizeOauth2WithPersistOption=e=>({authActions:t})=>{t.authorizeOauth2(e),t.persistAuthorizationIfNeeded()},authorizePassword=e=>({authActions:t})=>{let{schema:r,name:a,username:n,password:s,passwordType:o,clientId:l,clientSecret:c}=e,i={grant_type:\"password\",scope:e.scopes.join(\" \"),username:n,password:s},p={};switch(o){case\"request-body\":!function setClientIdAndSecret(e,t,r){t&&Object.assign(e,{client_id:t});r&&Object.assign(e,{client_secret:r})}(i,l,c);break;case\"basic\":p.Authorization=\"Basic \"+btoa(l+\":\"+c);break;default:console.warn(`Warning: invalid passwordType ${o} was passed, not including client id and secret`)}return t.authorizeRequest({body:buildFormData(i),url:r.get(\"tokenUrl\"),name:a,headers:p,query:{},auth:e})};const authorizeApplication=e=>({authActions:t})=>{let{schema:r,scopes:a,name:n,clientId:s,clientSecret:o}=e,l={Authorization:\"Basic \"+btoa(s+\":\"+o)},c={grant_type:\"client_credentials\",scope:a.join(\" \")};return t.authorizeRequest({body:buildFormData(c),name:n,url:r.get(\"tokenUrl\"),auth:e,headers:l})},authorizeAccessCodeWithFormParams=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:a,name:n,clientId:s,clientSecret:o,codeVerifier:l}=e,c={grant_type:\"authorization_code\",code:e.code,client_id:s,client_secret:o,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(c),name:n,url:a.get(\"tokenUrl\"),auth:e})},authorizeAccessCodeWithBasicAuthentication=({auth:e,redirectUrl:t})=>({authActions:r})=>{let{schema:a,name:n,clientId:s,clientSecret:o,codeVerifier:l}=e,c={Authorization:\"Basic \"+btoa(s+\":\"+o)},i={grant_type:\"authorization_code\",code:e.code,client_id:s,redirect_uri:t,code_verifier:l};return r.authorizeRequest({body:buildFormData(i),name:n,url:a.get(\"tokenUrl\"),auth:e,headers:c})},authorizeRequest=e=>({fn:t,getConfigs:r,authActions:a,errActions:n,oas3Selectors:s,specSelectors:o,authSelectors:l})=>{let c,{body:i,query:p={},headers:m={},name:u,url:d,auth:h}=e,{additionalQueryStringParams:g}=l.getConfigs()||{};if(o.isOAS3()){let e=s.serverEffectiveValue(s.selectedServer());c=ue()(d,e,!0)}else c=ue()(d,o.url(),!0);\"object\"==typeof g&&(c.query=Object.assign({},c.query,g));const y=c.toString();let f=Object.assign({Accept:\"application/json, text/plain, */*\",\"Content-Type\":\"application/x-www-form-urlencoded\",\"X-Requested-With\":\"XMLHttpRequest\"},m);t.fetch({url:y,method:\"post\",headers:f,query:p,body:i,requestInterceptor:r().requestInterceptor,responseInterceptor:r().responseInterceptor}).then((function(e){let t=JSON.parse(e.data),r=t&&(t.error||\"\"),s=t&&(t.parseError||\"\");e.ok?r||s?n.newAuthErr({authId:u,level:\"error\",source:\"auth\",message:JSON.stringify(t)}):a.authorizeOauth2WithPersistOption({auth:h,token:t}):n.newAuthErr({authId:u,level:\"error\",source:\"auth\",message:e.statusText})})).catch((e=>{let t=new Error(e).message;if(e.response&&e.response.data){const r=e.response.data;try{const e=\"string\"==typeof r?JSON.parse(r):r;e.error&&(t+=`, error: ${e.error}`),e.error_description&&(t+=`, description: ${e.error_description}`)}catch(e){}}n.newAuthErr({authId:u,level:\"error\",source:\"auth\",message:t})}))};function configureAuth(e){return{type:fe,payload:e}}function restoreAuthorization(e){return{type:Se,payload:e}}const persistAuthorizationIfNeeded=()=>({authSelectors:e,getConfigs:t})=>{if(!t().persistAuthorization)return;const r=e.authorized().toJS();localStorage.setItem(\"authorized\",JSON.stringify(r))},authPopup=(e,t)=>()=>{K.swaggerUIRedirectOauth2=t,K.open(e)},Ee={[de]:(e,{payload:t})=>e.set(\"showDefinitions\",t),[he]:(e,{payload:t})=>{let r=(0,k.fromJS)(t),a=e.get(\"authorized\")||(0,k.Map)();return r.entrySeq().forEach((([t,r])=>{if(!isFunc(r.getIn))return e.set(\"authorized\",a);let n=r.getIn([\"schema\",\"type\"]);if(\"apiKey\"===n||\"http\"===n)a=a.set(t,r);else if(\"basic\"===n){let e=r.getIn([\"value\",\"username\"]),n=r.getIn([\"value\",\"password\"]);a=a.setIn([t,\"value\"],{username:e,header:\"Basic \"+btoa(e+\":\"+n)}),a=a.setIn([t,\"schema\"],r.get(\"schema\"))}})),e.set(\"authorized\",a)},[ye]:(e,{payload:t})=>{let r,{auth:a,token:n}=t;a.token=Object.assign({},n),r=(0,k.fromJS)(a);let s=e.get(\"authorized\")||(0,k.Map)();return s=s.set(r.get(\"name\"),r),e.set(\"authorized\",s)},[ge]:(e,{payload:t})=>{let r=e.get(\"authorized\").withMutations((e=>{t.forEach((t=>{e.delete(t)}))}));return e.set(\"authorized\",r)},[fe]:(e,{payload:t})=>e.set(\"configs\",t),[Se]:(e,{payload:t})=>e.set(\"authorized\",(0,k.fromJS)(t.authorized))},_e=require(\"reselect\"),state=e=>e,ve=(0,_e.createSelector)(state,(e=>e.get(\"showDefinitions\"))),we=(0,_e.createSelector)(state,(()=>({specSelectors:e})=>{let t=e.securityDefinitions()||(0,k.Map)({}),r=(0,k.List)();return t.entrySeq().forEach((([e,t])=>{let a=(0,k.Map)();a=a.set(e,t),r=r.push(a)})),r})),selectAuthPath=(e,t)=>({specSelectors:e})=>(0,k.List)(e.isOAS3()?[\"components\",\"securitySchemes\",t]:[\"securityDefinitions\",t]),getDefinitionsByNames=(e,t)=>({specSelectors:e})=>{console.warn(\"WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.\");let r=e.securityDefinitions(),a=(0,k.List)();return t.valueSeq().forEach((e=>{let t=(0,k.Map)();e.entrySeq().forEach((([e,a])=>{let n,s=r.get(e);\"oauth2\"===s.get(\"type\")&&a.size&&(n=s.get(\"scopes\"),n.keySeq().forEach((e=>{a.contains(e)||(n=n.delete(e))})),s=s.set(\"allowedScopes\",n)),t=t.set(e,s)})),a=a.push(t)})),a},definitionsForRequirements=(e,t=(0,k.List)())=>({authSelectors:e})=>{const r=e.definitionsToAuthorize()||(0,k.List)();let a=(0,k.List)();return r.forEach((e=>{let r=t.find((t=>t.get(e.keySeq().first())));r&&(e.forEach(((t,a)=>{if(\"oauth2\"===t.get(\"type\")){const n=r.get(a);let s=t.get(\"scopes\");k.List.isList(n)&&k.Map.isMap(s)&&(s.keySeq().forEach((e=>{n.contains(e)||(s=s.delete(e))})),e=e.set(a,t.set(\"scopes\",s)))}})),a=a.push(e))})),a},be=(0,_e.createSelector)(state,(e=>e.get(\"authorized\")||(0,k.Map)())),isAuthorized=(e,t)=>({authSelectors:e})=>{let r=e.authorized();return k.List.isList(t)?!!t.toJS().filter((e=>-1===Object.keys(e).map((e=>!!r.get(e))).indexOf(!1))).length:null},Ce=(0,_e.createSelector)(state,(e=>e.get(\"configs\"))),execute=(e,{authSelectors:t,specSelectors:r})=>({path:a,method:n,operation:s,extras:o})=>{let l={authorized:t.authorized()&&t.authorized().toJS(),definitions:r.securityDefinitions()&&r.securityDefinitions().toJS(),specSecurity:r.security()&&r.security().toJS()};return e({path:a,method:n,operation:s,securities:l,...o})},loaded=(e,t)=>r=>{const{getConfigs:a,authActions:n}=t,s=a();if(e(r),s.persistAuthorization){const e=localStorage.getItem(\"authorized\");e&&n.restoreAuthorization({authorized:JSON.parse(e)})}},wrap_actions_authorize=(e,t)=>r=>{e(r);if(t.getConfigs().persistAuthorization)try{const[{schema:e,value:t}]=Object.values(r),a=\"apiKey\"===e.get(\"type\"),n=\"cookie\"===e.get(\"in\");a&&n&&(document.cookie=`${e.get(\"name\")}=${t}; SameSite=None; Secure`)}catch(e){console.error(\"Error persisting cookie based apiKey in document.cookie.\",e)}},wrap_actions_logout=(e,t)=>r=>{const a=t.getConfigs(),n=t.authSelectors.authorized();try{a.persistAuthorization&&Array.isArray(r)&&r.forEach((e=>{const t=n.get(e,{}),r=\"apiKey\"===t.getIn([\"schema\",\"type\"]),a=\"cookie\"===t.getIn([\"schema\",\"in\"]);if(r&&a){const e=t.getIn([\"schema\",\"name\"]);document.cookie=`${e}=; Max-Age=-99999999`}}))}catch(e){console.error(\"Error deleting cookie based apiKey from document.cookie.\",e)}e(r)},xe=require(\"prop-types\");var Oe=__webpack_require__.n(xe);const Ne=require(\"lodash/omit\");var ke=__webpack_require__.n(Ne);class LockAuthIcon extends O().Component{mapStateToProps(e,t){return{state:e,ownProps:ke()(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"LockIcon\");return O().createElement(r,t)}}const Ae=LockAuthIcon;class UnlockAuthIcon extends O().Component{mapStateToProps(e,t){return{state:e,ownProps:ke()(t,Object.keys(t.getSystem()))}}render(){const{getComponent:e,ownProps:t}=this.props,r=e(\"UnlockIcon\");return O().createElement(r,t)}}const Ie=UnlockAuthIcon;function auth(){return{afterLoad(e){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=e.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=preauthorizeApiKey.bind(null,e),this.rootInjects.preauthorizeBasic=preauthorizeBasic.bind(null,e)},components:{LockAuthIcon:Ae,UnlockAuthIcon:Ie,LockAuthOperationIcon:Ae,UnlockAuthOperationIcon:Ie},statePlugins:{auth:{reducers:Ee,actions:n,selectors:s,wrapActions:{authorize:wrap_actions_authorize,logout:wrap_actions_logout}},configs:{wrapActions:{loaded}},spec:{wrapActions:{execute}}}}}function preauthorizeBasic(e,t,r,a){const{authActions:{authorize:n},specSelectors:{specJson:s,isOAS3:o}}=e,l=o()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],c=s().getIn([...l,t]);return c?n({[t]:{value:{username:r,password:a},schema:c.toJS()}}):null}function preauthorizeApiKey(e,t,r){const{authActions:{authorize:a},specSelectors:{specJson:n,isOAS3:s}}=e,o=s()?[\"components\",\"securitySchemes\"]:[\"securityDefinitions\"],l=n().getIn([...o,t]);return l?a({[t]:{value:r,schema:l.toJS()}}):null}const je=require(\"js-yaml\");var qe=__webpack_require__.n(je);const Pe=\"configs_update\",Me=\"configs_toggle\";function update(e,t){return{type:Pe,payload:{[e]:t}}}function toggle(e){return{type:Me,payload:e}}const actions_loaded=()=>()=>{},downloadConfig=e=>t=>{const{fn:{fetch:r}}=t;return r(e)},getConfigByUrl=(e,t)=>r=>{const{specActions:a,configsActions:n}=r;if(e)return n.downloadConfig(e).then(next,next);function next(n){n instanceof Error||n.status>=400?(a.updateLoadingStatus(\"failedConfig\"),a.updateLoadingStatus(\"failedConfig\"),a.updateUrl(\"\"),console.error(n.statusText+\" \"+e.url),t(null)):t(((e,t)=>{try{return qe().load(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}})(n.text,r))}},get=(e,t)=>e.getIn(Array.isArray(t)?t:[t]),Te={[Pe]:(e,t)=>e.merge((0,k.fromJS)(t.payload)),[Me]:(e,t)=>{const r=t.payload,a=e.get(r);return e.set(r,!a)}};function configsPlugin(){return{statePlugins:{configs:{reducers:Te,actions:o,selectors:l}}}}const setHash=e=>e?history.pushState(null,null,`#${e}`):window.location.hash=\"\",Re=require(\"zenscroll\");var Je=__webpack_require__.n(Re);const $e=\"layout_scroll_to\",Ve=\"layout_clear_scroll\";const Le={fn:{getScrollParent:function getScrollParent(e,t){const r=document.documentElement;let a=getComputedStyle(e);const n=\"absolute\"===a.position,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/;if(\"fixed\"===a.position)return r;for(let t=e;t=t.parentElement;)if(a=getComputedStyle(t),(!n||\"static\"!==a.position)&&s.test(a.overflow+a.overflowY+a.overflowX))return t;return r}},statePlugins:{layout:{actions:{scrollToElement:(e,t)=>r=>{try{t=t||r.fn.getScrollParent(e),Je().createScroller(t).to(e)}catch(e){console.error(e)}},scrollTo:e=>({type:$e,payload:Array.isArray(e)?e:[e]}),clearScrollTo:()=>({type:Ve}),readyToScroll:(e,t)=>r=>{const a=r.layoutSelectors.getScrollToKey();A().is(a,(0,k.fromJS)(e))&&(r.layoutActions.scrollToElement(t),r.layoutActions.clearScrollTo())},parseDeepLinkHash:e=>({layoutActions:t,layoutSelectors:r,getConfigs:a})=>{if(a().deepLinking&&e){let a=e.slice(1);\"!\"===a[0]&&(a=a.slice(1)),\"/\"===a[0]&&(a=a.slice(1));const n=a.split(\"/\").map((e=>e||\"\")),s=r.isShownKeyFromUrlHashArray(n),[o,l=\"\",c=\"\"]=s;if(\"operations\"===o){const e=r.isShownKeyFromUrlHashArray([l]);l.indexOf(\"_\")>-1&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(e.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(e,!0)}(l.indexOf(\"_\")>-1||c.indexOf(\"_\")>-1)&&(console.warn(\"Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead.\"),t.show(s.map((e=>e.replace(/_/g,\" \"))),!0)),t.show(s,!0),t.scrollTo(s)}}},selectors:{getScrollToKey:e=>e.get(\"scrollToKey\"),isShownKeyFromUrlHashArray(e,t){const[r,a]=t;return a?[\"operations\",r,a]:r?[\"operations-tag\",r]:[]},urlHashArrayFromIsShownKey(e,t){let[r,a,n]=t;return\"operations\"==r?[a,n]:\"operations-tag\"==r?[a]:[]}},reducers:{[$e]:(e,t)=>e.set(\"scrollToKey\",A().fromJS(t.payload)),[Ve]:e=>e.delete(\"scrollToKey\")},wrapActions:{show:(e,{getConfigs:t,layoutSelectors:r})=>(...a)=>{if(e(...a),t().deepLinking)try{let[e,t]=a;e=Array.isArray(e)?e:[e];const n=r.urlHashArrayFromIsShownKey(e);if(!n.length)return;const[s,o]=n;if(!t)return setHash(\"/\");2===n.length?setHash(createDeepLinkPath(`/${encodeURIComponent(s)}/${encodeURIComponent(o)}`)):1===n.length&&setHash(createDeepLinkPath(`/${encodeURIComponent(s)}`))}catch(e){console.error(e)}}}}}},De=require(\"react-immutable-proptypes\");var Ue=__webpack_require__.n(De);const operation_wrapper=(e,t)=>class OperationWrapper extends O().Component{onLoad=e=>{const{operation:r}=this.props,{tag:a,operationId:n}=r.toObject();let{isShownKey:s}=r.toObject();s=s||[\"operations\",a,n],t.layoutActions.readyToScroll(s,e)};render(){return O().createElement(\"span\",{ref:this.onLoad},O().createElement(e,this.props))}},operation_tag_wrapper=(e,t)=>class OperationTagWrapper extends O().Component{onLoad=e=>{const{tag:r}=this.props,a=[\"operations-tag\",r];t.layoutActions.readyToScroll(a,e)};render(){return O().createElement(\"span\",{ref:this.onLoad},O().createElement(e,this.props))}};function deep_linking(){return[Le,{statePlugins:{configs:{wrapActions:{loaded:(e,t)=>(...r)=>{e(...r);const a=decodeURIComponent(window.location.hash);t.layoutActions.parseDeepLinkHash(a)}}}},wrapComponents:{operation:operation_wrapper,OperationTag:operation_tag_wrapper}}]}const Ke=require(\"lodash/reduce\");var ze=__webpack_require__.n(Ke);function transform(e){return e.map((e=>{let t=\"is not of a type(s)\",r=e.get(\"message\").indexOf(t);if(r>-1){let t=e.get(\"message\").slice(r+19).split(\",\");return e.set(\"message\",e.get(\"message\").slice(0,r)+function makeNewMessage(e){return e.reduce(((e,t,r,a)=>r===a.length-1&&a.length>1?e+\"or \"+t:a[r+1]&&a.length>2?e+t+\", \":a[r+1]?e+t+\" \":e+t),\"should be a\")}(t))}return e}))}const Be=require(\"lodash/get\");var Fe=__webpack_require__.n(Be);function parameter_oneof_transform(e,{jsSpec:t}){return e}const We=[c,i];function transformErrors(e){let t={jsSpec:{}},r=ze()(We,((e,r)=>{try{return r.transform(e,t).filter((e=>!!e))}catch(t){return console.error(\"Transformer error:\",t),e}}),e);return r.filter((e=>!!e)).map((e=>(!e.get(\"line\")&&e.get(\"path\"),e)))}let He={line:0,level:\"error\",message:\"Unknown error\"};const Xe=(0,_e.createSelector)((e=>e),(e=>e.get(\"errors\",(0,k.List)()))),Ge=(0,_e.createSelector)(Xe,(e=>e.last()));function err(e){return{statePlugins:{err:{reducers:{[R]:(e,{payload:t})=>{let r=Object.assign(He,t,{type:\"thrown\"});return e.update(\"errors\",(e=>(e||(0,k.List)()).push((0,k.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[J]:(e,{payload:t})=>(t=t.map((e=>(0,k.fromJS)(Object.assign(He,e,{type:\"thrown\"})))),e.update(\"errors\",(e=>(e||(0,k.List)()).concat((0,k.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[$]:(e,{payload:t})=>{let r=(0,k.fromJS)(t);return r=r.set(\"type\",\"spec\"),e.update(\"errors\",(e=>(e||(0,k.List)()).push((0,k.fromJS)(r)).sortBy((e=>e.get(\"line\"))))).update(\"errors\",(e=>transformErrors(e)))},[V]:(e,{payload:t})=>(t=t.map((e=>(0,k.fromJS)(Object.assign(He,e,{type:\"spec\"})))),e.update(\"errors\",(e=>(e||(0,k.List)()).concat((0,k.fromJS)(t)))).update(\"errors\",(e=>transformErrors(e)))),[L]:(e,{payload:t})=>{let r=(0,k.fromJS)(Object.assign({},t));return r=r.set(\"type\",\"auth\"),e.update(\"errors\",(e=>(e||(0,k.List)()).push((0,k.fromJS)(r)))).update(\"errors\",(e=>transformErrors(e)))},[D]:(e,{payload:t})=>{if(!t||!e.get(\"errors\"))return e;let r=e.get(\"errors\").filter((e=>e.keySeq().every((r=>{const a=e.get(r),n=t[r];return!n||a!==n}))));return e.merge({errors:r})},[U]:(e,{payload:t})=>{if(!t||\"function\"!=typeof t)return e;let r=e.get(\"errors\").filter((e=>t(e)));return e.merge({errors:r})}},actions:a,selectors:p}}}}function opsFilter(e,t){return e.filter(((e,r)=>-1!==r.indexOf(t)))}function filter(){return{fn:{opsFilter}}}const Ye=require(\"@babel/runtime-corejs3/helpers/extends\");var Qe=__webpack_require__.n(Ye);const arrow_up=({className:e=null,width:t=20,height:r=20,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),arrow_down=({className:e=null,width:t=20,height:r=20,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),arrow=({className:e=null,width:t=20,height:r=20,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),components_close=({className:e=null,width:t=20,height:r=20,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),copy=({className:e=null,width:t=15,height:r=16,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 15 16\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"g\",{transform:\"translate(2, -1)\"},O().createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"}))),lock=({className:e=null,width:t=20,height:r=20,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),unlock=({className:e=null,width:t=20,height:r=20,...a})=>O().createElement(\"svg\",Qe()({xmlns:\"http://www.w3.org/2000/svg\",viewBox:\"0 0 20 20\",className:e,width:t,height:r,\"aria-hidden\":\"true\",focusable:\"false\"},a),O().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),icons=()=>({components:{ArrowUpIcon:arrow_up,ArrowDownIcon:arrow_down,ArrowIcon:arrow,CloseIcon:components_close,CopyIcon:copy,LockIcon:lock,UnlockIcon:unlock}}),Ze=\"layout_update_layout\",et=\"layout_update_filter\",tt=\"layout_update_mode\",rt=\"layout_show\";function updateLayout(e){return{type:Ze,payload:e}}function updateFilter(e){return{type:et,payload:e}}function actions_show(e,t=!0){return e=normalizeArray(e),{type:rt,payload:{thing:e,shown:t}}}function changeMode(e,t=\"\"){return e=normalizeArray(e),{type:tt,payload:{thing:e,mode:t}}}const at={[Ze]:(e,t)=>e.set(\"layout\",t.payload),[et]:(e,t)=>e.set(\"filter\",t.payload),[rt]:(e,t)=>{const r=t.payload.shown,a=(0,k.fromJS)(t.payload.thing);return e.update(\"shown\",(0,k.fromJS)({}),(e=>e.set(a,r)))},[tt]:(e,t)=>{let r=t.payload.thing,a=t.payload.mode;return e.setIn([\"modes\"].concat(r),(a||\"\")+\"\")}},current=e=>e.get(\"layout\"),currentFilter=e=>e.get(\"filter\"),isShown=(e,t,r)=>(t=normalizeArray(t),e.get(\"shown\",(0,k.fromJS)({})).get((0,k.fromJS)(t),r)),whatMode=(e,t,r=\"\")=>(t=normalizeArray(t),e.getIn([\"modes\",...t],r)),nt=(0,_e.createSelector)((e=>e),(e=>!isShown(e,\"editor\"))),taggedOperations=(e,t)=>(r,...a)=>{let n=e(r,...a);const{fn:s,layoutSelectors:o,getConfigs:l}=t.getSystem(),c=l(),{maxDisplayedTags:i}=c;let p=o.currentFilter();return p&&!0!==p&&(n=s.opsFilter(n,p)),i>=0&&(n=n.slice(0,i)),n};function plugins_layout(){return{statePlugins:{layout:{reducers:at,actions:m,selectors:u},spec:{wrapSelectors:d}}}}function logs({configs:e}){const t={debug:0,info:1,log:2,warn:3,error:4},getLevel=e=>t[e]||-1;let{logLevel:r}=e,a=getLevel(r);function log(e,...t){getLevel(e)>=a&&console[e](...t)}return log.warn=log.bind(null,\"warn\"),log.error=log.bind(null,\"error\"),log.info=log.bind(null,\"info\"),log.debug=log.bind(null,\"debug\"),{rootInjects:{log}}}let st=!1;function on_complete(){return{statePlugins:{spec:{wrapActions:{updateSpec:e=>(...t)=>(st=!0,e(...t)),updateJsonSpec:(e,t)=>(...r)=>{const a=t.getConfigs().onComplete;return st&&\"function\"==typeof a&&(setTimeout(a,0),st=!1),e(...r)}}}}}}const extractKey=e=>{const t=\"_**[]\";return e.indexOf(t)<0?e:e.split(t)[0].trim()},escapeShell=e=>\"-d \"===e||/^[_\\/-]/g.test(e)?e:\"'\"+e.replace(/'/g,\"'\\\\''\")+\"'\",escapeCMD=e=>\"-d \"===(e=e.replace(/\\^/g,\"^^\").replace(/\\\\\"/g,'\\\\\\\\\"').replace(/\"/g,'\"\"').replace(/\\n/g,\"^\\n\"))?e.replace(/-d /g,\"-d ^\\n\"):/^[_\\/-]/g.test(e)?e:'\"'+e+'\"',escapePowershell=e=>{if(\"-d \"===e)return e;if(/\\n/.test(e)){return`@\"\\n${e.replace(/`/g,\"``\").replace(/\\$/g,\"`$\")}\\n\"@`}if(!/^[_\\/-]/.test(e)){return`'${e.replace(/'/g,\"''\")}'`}return e};const curlify=(e,t,r,a=\"\")=>{let n=!1,s=\"\";const addWords=(...e)=>s+=\" \"+e.map(t).join(\" \"),addWordsWithoutLeadingSpace=(...e)=>s+=e.map(t).join(\" \"),addNewLine=()=>s+=` ${r}`,addIndent=(e=1)=>s+=\"  \".repeat(e);let o=e.get(\"headers\");s+=\"curl\"+a;const l=e.get(\"curlOptions\");if(k.List.isList(l)&&!l.isEmpty()&&addWords(...e.get(\"curlOptions\")),addWords(\"-X\",e.get(\"method\")),addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`${e.get(\"url\")}`),o&&o.size)for(let t of e.get(\"headers\").entries()){addNewLine(),addIndent();let[e,r]=t;addWordsWithoutLeadingSpace(\"-H\",`${e}: ${r}`),n=n||/^content-type$/i.test(e)&&/^multipart\\/form-data$/i.test(r)}const c=e.get(\"body\");if(c)if(n&&[\"POST\",\"PUT\",\"PATCH\"].includes(e.get(\"method\")))for(let[e,t]of c.entrySeq()){let r=extractKey(e);addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-F\"),t instanceof K.File&&\"string\"==typeof t.valueOf()?addWords(`${r}=${t.data}${t.type?`;type=${t.type}`:\"\"}`):t instanceof K.File?addWords(`${r}=@${t.name}${t.type?`;type=${t.type}`:\"\"}`):addWords(`${r}=${t}`)}else if(c instanceof K.File)addNewLine(),addIndent(),addWordsWithoutLeadingSpace(`--data-binary '@${c.name}'`);else{addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d \");let t=c;k.Map.isMap(t)?addWordsWithoutLeadingSpace(function getStringBodyOfMap(e){let t=[];for(let[r,a]of e.get(\"body\").entrySeq()){let e=extractKey(r);a instanceof K.File?t.push(`  \"${e}\": {\\n    \"name\": \"${a.name}\"${a.type?`,\\n    \"type\": \"${a.type}\"`:\"\"}\\n  }`):t.push(`  \"${e}\": ${JSON.stringify(a,null,2).replace(/(\\r\\n|\\r|\\n)/g,\"\\n  \")}`)}return`{\\n${t.join(\",\\n\")}\\n}`}(e)):(\"string\"!=typeof t&&(t=JSON.stringify(t)),addWordsWithoutLeadingSpace(t))}else c||\"POST\"!==e.get(\"method\")||(addNewLine(),addIndent(),addWordsWithoutLeadingSpace(\"-d ''\"));return s},requestSnippetGenerator_curl_powershell=e=>curlify(e,escapePowershell,\"`\\n\",\".exe\"),requestSnippetGenerator_curl_bash=e=>curlify(e,escapeShell,\"\\\\\\n\"),requestSnippetGenerator_curl_cmd=e=>curlify(e,escapeCMD,\"^\\n\"),request_snippets_selectors_state=e=>e||(0,k.Map)(),ot=(0,_e.createSelector)(request_snippets_selectors_state,(e=>{const t=e.get(\"languages\"),r=e.get(\"generators\",(0,k.Map)());return!t||t.isEmpty()?r:r.filter(((e,r)=>t.includes(r)))})),getSnippetGenerators=e=>({fn:t})=>ot(e).map(((e,r)=>{const a=(e=>t[`requestSnippetGenerator_${e}`])(r);return\"function\"!=typeof a?null:e.set(\"fn\",a)})).filter((e=>e)),lt=(0,_e.createSelector)(request_snippets_selectors_state,(e=>e.get(\"activeLanguage\"))),ct=(0,_e.createSelector)(request_snippets_selectors_state,(e=>e.get(\"defaultExpanded\"))),it=require(\"classnames\");var pt=__webpack_require__.n(it);const mt=require(\"react-copy-to-clipboard\"),ut={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(250, 250, 250)\",paddingBottom:\"0\",paddingTop:\"0\",border:\"1px solid rgb(51, 51, 51)\",borderRadius:\"4px 4px 0 0\",boxShadow:\"none\",borderBottom:\"none\"},dt={cursor:\"pointer\",lineHeight:1,display:\"inline-flex\",backgroundColor:\"rgb(51, 51, 51)\",boxShadow:\"none\",border:\"1px solid rgb(51, 51, 51)\",paddingBottom:\"0\",paddingTop:\"0\",borderRadius:\"4px 4px 0 0\",marginTop:\"-5px\",marginRight:\"-5px\",marginLeft:\"-5px\",zIndex:\"9999\",borderBottom:\"none\"},request_snippets=({request:e,requestSnippetsSelectors:t,getComponent:r})=>{const a=(0,x.useRef)(null),n=r(\"ArrowUpIcon\"),s=r(\"ArrowDownIcon\"),o=r(\"SyntaxHighlighter\",!0),[l,c]=(0,x.useState)(t.getSnippetGenerators()?.keySeq().first()),[i,p]=(0,x.useState)(t?.getDefaultExpanded()),m=t.getSnippetGenerators(),u=m.get(l),d=u.get(\"fn\")(e),handleSetIsExpanded=()=>{p(!i)},handleGetBtnStyle=e=>e===l?dt:ut,handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:a,offsetHeight:n,scrollTop:s}=t;a>n&&(0===s&&r<0||n+s>=a&&r>0)&&e.preventDefault()};return(0,x.useEffect)((()=>{}),[]),(0,x.useEffect)((()=>{const e=Array.from(a.current.childNodes).filter((e=>!!e.nodeType&&e.classList?.contains(\"curl-command\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[e]),O().createElement(\"div\",{className:\"request-snippets\",ref:a},O().createElement(\"div\",{style:{width:\"100%\",display:\"flex\",justifyContent:\"flex-start\",alignItems:\"center\",marginBottom:\"15px\"}},O().createElement(\"h4\",{onClick:()=>handleSetIsExpanded(),style:{cursor:\"pointer\"}},\"Snippets\"),O().createElement(\"button\",{onClick:()=>handleSetIsExpanded(),style:{border:\"none\",background:\"none\"},title:i?\"Collapse operation\":\"Expand operation\"},i?O().createElement(s,{className:\"arrow\",width:\"10\",height:\"10\"}):O().createElement(n,{className:\"arrow\",width:\"10\",height:\"10\"}))),i&&O().createElement(\"div\",{className:\"curl-command\"},O().createElement(\"div\",{style:{paddingLeft:\"15px\",paddingRight:\"10px\",width:\"100%\",display:\"flex\"}},m.entrySeq().map((([e,t])=>O().createElement(\"div\",{className:pt()(\"btn\",{active:e===l}),style:handleGetBtnStyle(e),key:e,onClick:()=>(e=>{l!==e&&c(e)})(e)},O().createElement(\"h4\",{style:e===l?{color:\"white\"}:{}},t.get(\"title\")))))),O().createElement(\"div\",{className:\"copy-to-clipboard\"},O().createElement(mt.CopyToClipboard,{text:d},O().createElement(\"button\",null))),O().createElement(\"div\",null,O().createElement(o,{language:u.get(\"syntax\"),className:\"curl microlight\",renderPlainText:({children:e,PlainTextViewer:t})=>O().createElement(t,{className:\"curl\"},e)},d))))},plugins_request_snippets=()=>({components:{RequestSnippets:request_snippets},fn:{requestSnippetGenerator_curl_bash,requestSnippetGenerator_curl_cmd,requestSnippetGenerator_curl_powershell},statePlugins:{requestSnippets:{selectors:h}}});class ModelCollapse extends x.Component{static defaultProps={collapsedContent:\"{...}\",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:A().List([])};constructor(e,t){super(e,t);let{expanded:r,collapsedContent:a}=this.props;this.state={expanded:r,collapsedContent:a||ModelCollapse.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:e,expanded:t,modelName:r}=this.props;e&&t&&this.props.onToggle(r,t)}UNSAFE_componentWillReceiveProps(e){this.props.expanded!==e.expanded&&this.setState({expanded:e.expanded})}toggleCollapsed=()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})};onLoad=e=>{if(e&&this.props.layoutSelectors){const t=this.props.layoutSelectors.getScrollToKey();A().is(t,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,e.parentElement)}};render(){const{title:e,classes:t}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?O().createElement(\"span\",{className:t||\"\"},this.props.children):O().createElement(\"span\",{className:t||\"\",ref:this.onLoad},O().createElement(\"button\",{\"aria-expanded\":this.state.expanded,className:\"model-box-control\",onClick:this.toggleCollapsed},e&&O().createElement(\"span\",{className:\"pointer\"},e),O().createElement(\"span\",{className:\"model-toggle\"+(this.state.expanded?\"\":\" collapsed\")}),!this.state.expanded&&O().createElement(\"span\",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}const useTabs=({initialTab:e,isExecute:t,schema:r,example:a})=>{const n=(0,x.useMemo)((()=>({example:\"example\",model:\"model\"})),[]),s=(0,x.useMemo)((()=>Object.keys(n)),[n]).includes(e)&&r&&!t?e:n.example,o=(e=>{const t=(0,x.useRef)();return(0,x.useEffect)((()=>{t.current=e})),t.current})(t),[l,c]=(0,x.useState)(s),i=(0,x.useCallback)((e=>{c(e.target.dataset.name)}),[]);return(0,x.useEffect)((()=>{o&&!t&&a&&c(n.example)}),[o,t,a]),{activeTab:l,onTabChange:i,tabs:n}},model_example=({schema:e,example:t,isExecute:r=!1,specPath:a,includeWriteOnly:n=!1,includeReadOnly:s=!1,getComponent:o,getConfigs:l,specSelectors:c})=>{const{defaultModelRendering:i,defaultModelExpandDepth:p}=l(),m=o(\"ModelWrapper\"),u=o(\"HighlightCode\",!0),d=ae()(5).toString(\"base64\"),h=ae()(5).toString(\"base64\"),g=ae()(5).toString(\"base64\"),y=ae()(5).toString(\"base64\"),f=c.isOAS3(),{activeTab:S,tabs:E,onTabChange:_}=useTabs({initialTab:i,isExecute:r,schema:e,example:t});return O().createElement(\"div\",{className:\"model-example\"},O().createElement(\"ul\",{className:\"tab\",role:\"tablist\"},O().createElement(\"li\",{className:pt()(\"tabitem\",{active:S===E.example}),role:\"presentation\"},O().createElement(\"button\",{\"aria-controls\":h,\"aria-selected\":S===E.example,className:\"tablinks\",\"data-name\":\"example\",id:d,onClick:_,role:\"tab\"},r?\"Edit Value\":\"Example Value\")),e&&O().createElement(\"li\",{className:pt()(\"tabitem\",{active:S===E.model}),role:\"presentation\"},O().createElement(\"button\",{\"aria-controls\":y,\"aria-selected\":S===E.model,className:pt()(\"tablinks\",{inactive:r}),\"data-name\":\"model\",id:g,onClick:_,role:\"tab\"},f?\"Schema\":\"Model\"))),S===E.example&&O().createElement(\"div\",{\"aria-hidden\":S!==E.example,\"aria-labelledby\":d,\"data-name\":\"examplePanel\",id:h,role:\"tabpanel\",tabIndex:\"0\"},t||O().createElement(u,null,\"(no example available\")),S===E.model&&O().createElement(\"div\",{className:\"model-container\",\"aria-hidden\":S===E.example,\"aria-labelledby\":g,\"data-name\":\"modelPanel\",id:y,role:\"tabpanel\",tabIndex:\"0\"},O().createElement(m,{schema:e,getComponent:o,getConfigs:l,specSelectors:c,expandDepth:p,specPath:a,includeReadOnly:s,includeWriteOnly:n})))};class ModelWrapper extends x.Component{onToggle=(e,t)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,t)};render(){let{getComponent:e,getConfigs:t}=this.props;const r=e(\"Model\");let a;return this.props.layoutSelectors&&(a=this.props.layoutSelectors.isShown(this.props.fullPath)),O().createElement(\"div\",{className:\"model-box\"},O().createElement(r,Qe()({},this.props,{getConfigs:t,expanded:a,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}const ht=require(\"react-immutable-pure-component\");var gt,yt=__webpack_require__.n(ht);function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},_extends.apply(null,arguments)}const rolling_load=e=>x.createElement(\"svg\",_extends({xmlns:\"http://www.w3.org/2000/svg\",width:200,height:200,className:\"rolling-load_svg__lds-rolling\",preserveAspectRatio:\"xMidYMid\",style:{backgroundImage:\"none\",backgroundPosition:\"initial initial\",backgroundRepeat:\"initial initial\"},viewBox:\"0 0 100 100\"},e),gt||(gt=x.createElement(\"circle\",{cx:50,cy:50,r:35,fill:\"none\",stroke:\"#555\",strokeDasharray:\"164.93361431346415 56.97787143782138\",strokeWidth:10},x.createElement(\"animateTransform\",{attributeName:\"transform\",begin:\"0s\",calcMode:\"linear\",dur:\"1s\",keyTimes:\"0;1\",repeatCount:\"indefinite\",type:\"rotate\",values:\"0 50 50;360 50 50\"})))),decodeRefName=e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}};class Model extends(yt()){static propTypes={schema:Ue().map.isRequired,getComponent:Oe().func.isRequired,getConfigs:Oe().func.isRequired,specSelectors:Oe().object.isRequired,name:Oe().string,displayName:Oe().string,isRef:Oe().bool,required:Oe().bool,expandDepth:Oe().number,depth:Oe().number,specPath:Ue().list.isRequired,includeReadOnly:Oe().bool,includeWriteOnly:Oe().bool};getModelName=e=>-1!==e.indexOf(\"#/definitions/\")?decodeRefName(e.replace(/^.*#\\/definitions\\//,\"\")):-1!==e.indexOf(\"#/components/schemas/\")?decodeRefName(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):void 0;getRefSchema=e=>{let{specSelectors:t}=this.props;return t.findDefinition(e)};render(){let{getComponent:e,getConfigs:t,specSelectors:r,schema:a,required:n,name:s,isRef:o,specPath:l,displayName:c,includeReadOnly:i,includeWriteOnly:p}=this.props;const m=e(\"ObjectModel\"),u=e(\"ArrayModel\"),d=e(\"PrimitiveModel\");let h=\"object\",g=a&&a.get(\"$$ref\"),y=a&&a.get(\"$ref\");if(!s&&g&&(s=this.getModelName(g)),y){const e=this.getModelName(y),t=this.getRefSchema(e);k.Map.isMap(t)?(a=t.mergeDeep(a),g||(a=a.set(\"$$ref\",y),g=y)):k.Map.isMap(a)&&1===a.size&&(a=null,s=y)}if(!a)return O().createElement(\"span\",{className:\"model model-title\"},O().createElement(\"span\",{className:\"model-title__text\"},c||s),!y&&O().createElement(rolling_load,{height:\"20px\",width:\"20px\"}));const f=r.isOAS3()&&a.get(\"deprecated\");switch(o=void 0!==o?o:!!g,h=a&&a.get(\"type\")||h,h){case\"object\":return O().createElement(m,Qe()({className:\"object\"},this.props,{specPath:l,getConfigs:t,schema:a,name:s,deprecated:f,isRef:o,includeReadOnly:i,includeWriteOnly:p}));case\"array\":return O().createElement(u,Qe()({className:\"array\"},this.props,{getConfigs:t,schema:a,name:s,deprecated:f,required:n,includeReadOnly:i,includeWriteOnly:p}));default:return O().createElement(d,Qe()({},this.props,{getComponent:e,getConfigs:t,schema:a,name:s,deprecated:f,required:n}))}}}class Models extends x.Component{getSchemaBasePath=()=>this.props.specSelectors.isOAS3()?[\"components\",\"schemas\"]:[\"definitions\"];getCollapsedContent=()=>\" \";handleToggle=(e,t)=>{const{layoutActions:r}=this.props;r.show([...this.getSchemaBasePath(),e],t),t&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),e])};onLoadModels=e=>{e&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),e)};onLoadModel=e=>{if(e){const t=e.getAttribute(\"data-name\");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),t],e)}};render(){let{specSelectors:e,getComponent:t,layoutSelectors:r,layoutActions:a,getConfigs:n}=this.props,s=e.definitions(),{docExpansion:o,defaultModelsExpandDepth:l}=n();if(!s.size||l<0)return null;const c=this.getSchemaBasePath();let i=r.isShown(c,l>0&&\"none\"!==o);const p=e.isOAS3(),m=t(\"ModelWrapper\"),u=t(\"Collapse\"),d=t(\"ModelCollapse\"),h=t(\"JumpToPath\",!0),g=t(\"ArrowUpIcon\"),y=t(\"ArrowDownIcon\");return O().createElement(\"section\",{className:i?\"models is-open\":\"models\",ref:this.onLoadModels},O().createElement(\"h4\",null,O().createElement(\"button\",{\"aria-expanded\":i,className:\"models-control\",onClick:()=>a.show(c,!i)},O().createElement(\"span\",null,p?\"Schemas\":\"Models\"),i?O().createElement(g,null):O().createElement(y,null))),O().createElement(u,{isOpened:i},s.entrySeq().map((([s])=>{const o=[...c,s],i=A().List(o),p=e.specResolvedSubtree(o),u=e.specJson().getIn(o),g=k.Map.isMap(p)?p:A().Map(),y=k.Map.isMap(u)?u:A().Map(),f=g.get(\"title\")||y.get(\"title\")||s,S=r.isShown(o,!1);S&&0===g.size&&y.size>0&&this.props.specActions.requestResolvedSubtree(o);const E=O().createElement(m,{name:s,expandDepth:l,schema:g||A().Map(),displayName:f,fullPath:o,specPath:i,getComponent:t,specSelectors:e,getConfigs:n,layoutSelectors:r,layoutActions:a,includeReadOnly:!0,includeWriteOnly:!0}),_=O().createElement(\"span\",{className:\"model-box\"},O().createElement(\"span\",{className:\"model model-title\"},f));return O().createElement(\"div\",{id:`model-${s}`,className:\"model-container\",key:`models-section-${s}`,\"data-name\":s,ref:this.onLoadModel},O().createElement(\"span\",{className:\"models-jump-to-path\"},O().createElement(h,{path:i})),O().createElement(d,{classes:\"model-box\",collapsedContent:this.getCollapsedContent(s),onToggle:this.handleToggle,title:_,displayName:f,modelName:s,specPath:i,layoutSelectors:r,layoutActions:a,hideSelfOnExpand:!0,expanded:l>0&&S},E))})).toArray()))}}const enum_model=({value:e,getComponent:t})=>{let r=t(\"ModelCollapse\"),a=O().createElement(\"span\",null,\"Array [ \",e.count(),\" ]\");return O().createElement(\"span\",{className:\"prop-enum\"},\"Enum:\",O().createElement(\"br\",null),O().createElement(r,{collapsedContent:a},\"[ \",e.map(String).join(\", \"),\" ]\"))};function isAbsoluteUrl(e){return e.match(/^(?:[a-z]+:)?\\/\\//i)}function buildBaseUrl(e,t){return e?isAbsoluteUrl(e)?function addProtocol(e){return e.match(/^\\/\\//i)?`${window.location.protocol}${e}`:e}(e):new URL(e,t).href:t}function safeBuildUrl(e,t,{selectedServer:r=\"\"}={}){try{return function buildUrl(e,t,{selectedServer:r=\"\"}={}){if(!e)return;if(isAbsoluteUrl(e))return e;const a=buildBaseUrl(r,t);return isAbsoluteUrl(a)?new URL(e,a).href:new URL(e,window.location.href).href}(e,t,{selectedServer:r})}catch{return}}function sanitizeUrl(e){if(\"string\"!=typeof e||\"\"===e.trim())return\"\";const t=e.trim(),r=\"about:blank\";try{const e=`https://base${String(Math.random()).slice(2)}`,a=new URL(t,e),n=a.protocol.slice(0,-1);return[\"javascript\",\"data\",\"vbscript\"].includes(n.toLowerCase())?r:a.origin===e?t.startsWith(\"/\")?`${a.pathname}${a.search}${a.hash}`:t.startsWith(\".\")?`.${a.pathname}${a.search}${a.hash}`:`${a.pathname.substring(1)}${a.search}${a.hash}`:String(a)}catch{return r}}class ObjectModel extends x.Component{render(){let{schema:e,name:t,displayName:r,isRef:a,getComponent:n,getConfigs:s,depth:o,onToggle:l,expanded:c,specPath:i,...p}=this.props,{specSelectors:m,expandDepth:u,includeReadOnly:d,includeWriteOnly:h}=p;const{isOAS3:g}=m,y=o>2||2===o&&\"items\"!==i.last();if(!e)return null;const{showExtensions:f}=s(),S=f?getExtensions(e):(0,k.List)();let E=e.get(\"description\"),_=e.get(\"properties\"),v=e.get(\"additionalProperties\"),w=e.get(\"title\")||r||t,b=e.get(\"required\"),C=e.filter(((e,t)=>-1!==[\"maxProperties\",\"minProperties\",\"nullable\",\"example\"].indexOf(t))),x=e.get(\"deprecated\"),N=e.getIn([\"externalDocs\",\"url\"]),A=e.getIn([\"externalDocs\",\"description\"]);const I=n(\"JumpToPath\",!0),j=n(\"Markdown\",!0),q=n(\"Model\"),P=n(\"ModelCollapse\"),M=n(\"Property\"),T=n(\"Link\"),R=n(\"ModelExtensions\"),JumpToPathSection=()=>O().createElement(\"span\",{className:\"model-jump-to-path\"},O().createElement(I,{path:i})),J=O().createElement(\"span\",null,O().createElement(\"span\",null,\"{\"),\"...\",O().createElement(\"span\",null,\"}\"),a?O().createElement(JumpToPathSection,null):\"\"),$=m.isOAS3()?e.get(\"allOf\"):null,V=m.isOAS3()?e.get(\"anyOf\"):null,L=m.isOAS3()?e.get(\"oneOf\"):null,D=m.isOAS3()?e.get(\"not\"):null,U=w&&O().createElement(\"span\",{className:\"model-title\"},a&&e.get(\"$$ref\")&&O().createElement(\"span\",{className:pt()(\"model-hint\",{\"model-hint--embedded\":y})},e.get(\"$$ref\")),O().createElement(\"span\",{className:\"model-title__text\"},w));return O().createElement(\"span\",{className:\"model\"},O().createElement(P,{modelName:t,title:U,onToggle:l,expanded:!!c||o<=u,collapsedContent:J},O().createElement(\"span\",{className:\"brace-open object\"},\"{\"),a?O().createElement(JumpToPathSection,null):null,O().createElement(\"span\",{className:\"inner-object\"},O().createElement(\"table\",{className:\"model\"},O().createElement(\"tbody\",null,E?O().createElement(\"tr\",{className:\"description\"},O().createElement(\"td\",null,\"description:\"),O().createElement(\"td\",null,O().createElement(j,{source:E}))):null,N&&O().createElement(\"tr\",{className:\"external-docs\"},O().createElement(\"td\",null,\"externalDocs:\"),O().createElement(\"td\",null,O().createElement(T,{target:\"_blank\",href:sanitizeUrl(N)},A||N))),x?O().createElement(\"tr\",{className:\"property\"},O().createElement(\"td\",null,\"deprecated:\"),O().createElement(\"td\",null,\"true\")):null,_&&_.size?_.entrySeq().filter((([,e])=>(!e.get(\"readOnly\")||d)&&(!e.get(\"writeOnly\")||h))).map((([e,r])=>{let a=g()&&r.get(\"deprecated\"),l=k.List.isList(b)&&b.contains(e),c=[\"property-row\"];return a&&c.push(\"deprecated\"),l&&c.push(\"required\"),O().createElement(\"tr\",{key:e,className:c.join(\" \")},O().createElement(\"td\",null,e,l&&O().createElement(\"span\",{className:\"star\"},\"*\")),O().createElement(\"td\",null,O().createElement(q,Qe()({key:`object-${t}-${e}_${r}`},p,{required:l,getComponent:n,specPath:i.push(\"properties\",e),getConfigs:s,schema:r,depth:o+1}))))})).toArray():null,0===S.size?null:O().createElement(O().Fragment,null,O().createElement(\"tr\",null,O().createElement(\"td\",null,\" \")),O().createElement(R,{extensions:S,propClass:\"extension\"})),v&&v.size?O().createElement(\"tr\",null,O().createElement(\"td\",null,\"< * >:\"),O().createElement(\"td\",null,O().createElement(q,Qe()({},p,{required:!1,getComponent:n,specPath:i.push(\"additionalProperties\"),getConfigs:s,schema:v,depth:o+1})))):null,$?O().createElement(\"tr\",null,O().createElement(\"td\",null,\"allOf ->\"),O().createElement(\"td\",null,$.map(((e,t)=>O().createElement(\"div\",{key:t},O().createElement(q,Qe()({},p,{required:!1,getComponent:n,specPath:i.push(\"allOf\",t),getConfigs:s,schema:e,depth:o+1}))))))):null,V?O().createElement(\"tr\",null,O().createElement(\"td\",null,\"anyOf ->\"),O().createElement(\"td\",null,V.map(((e,t)=>O().createElement(\"div\",{key:t},O().createElement(q,Qe()({},p,{required:!1,getComponent:n,specPath:i.push(\"anyOf\",t),getConfigs:s,schema:e,depth:o+1}))))))):null,L?O().createElement(\"tr\",null,O().createElement(\"td\",null,\"oneOf ->\"),O().createElement(\"td\",null,L.map(((e,t)=>O().createElement(\"div\",{key:t},O().createElement(q,Qe()({},p,{required:!1,getComponent:n,specPath:i.push(\"oneOf\",t),getConfigs:s,schema:e,depth:o+1}))))))):null,D?O().createElement(\"tr\",null,O().createElement(\"td\",null,\"not ->\"),O().createElement(\"td\",null,O().createElement(\"div\",null,O().createElement(q,Qe()({},p,{required:!1,getComponent:n,specPath:i.push(\"not\"),getConfigs:s,schema:D,depth:o+1}))))):null))),O().createElement(\"span\",{className:\"brace-close\"},\"}\")),C.size?C.entrySeq().map((([e,t])=>O().createElement(M,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null)}}class ArrayModel extends x.Component{render(){let{getComponent:e,getConfigs:t,schema:r,depth:a,expandDepth:n,name:s,displayName:o,specPath:l}=this.props,c=r.get(\"description\"),i=r.get(\"items\"),p=r.get(\"title\")||o||s,m=r.filter(((e,t)=>-1===[\"type\",\"items\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))),u=r.getIn([\"externalDocs\",\"url\"]),d=r.getIn([\"externalDocs\",\"description\"]);const h=e(\"Markdown\",!0),g=e(\"ModelCollapse\"),y=e(\"Model\"),f=e(\"Property\"),S=e(\"Link\"),E=p&&O().createElement(\"span\",{className:\"model-title\"},O().createElement(\"span\",{className:\"model-title__text\"},p));return O().createElement(\"span\",{className:\"model\"},O().createElement(g,{title:E,expanded:a<=n,collapsedContent:\"[...]\"},\"[\",m.size?m.entrySeq().map((([e,t])=>O().createElement(f,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:\"property\"}))):null,c?O().createElement(h,{source:c}):m.size?O().createElement(\"div\",{className:\"markdown\"}):null,u&&O().createElement(\"div\",{className:\"external-docs\"},O().createElement(S,{target:\"_blank\",href:sanitizeUrl(u)},d||u)),O().createElement(\"span\",null,O().createElement(y,Qe()({},this.props,{getConfigs:t,specPath:l.push(\"items\"),name:null,schema:i,required:!1,depth:a+1}))),\"]\"))}}const ft=\"property primitive\";class Primitive extends x.Component{render(){let{schema:e,getComponent:t,getConfigs:r,name:a,displayName:n,depth:s,expandDepth:o}=this.props;const{showExtensions:l}=r();if(!e||!e.get)return O().createElement(\"div\",null);let c=e.get(\"type\"),i=e.get(\"format\"),p=e.get(\"xml\"),m=e.get(\"enum\"),u=e.get(\"title\")||n||a,d=e.get(\"description\");const h=getExtensions(e);let g=e.filter(((e,t)=>-1===[\"enum\",\"type\",\"format\",\"description\",\"$$ref\",\"externalDocs\"].indexOf(t))).filterNot(((e,t)=>h.has(t))),y=e.getIn([\"externalDocs\",\"url\"]),f=e.getIn([\"externalDocs\",\"description\"]);const S=t(\"Markdown\",!0),E=t(\"EnumModel\"),_=t(\"Property\"),v=t(\"ModelCollapse\"),w=t(\"Link\"),b=t(\"ModelExtensions\"),C=u&&O().createElement(\"span\",{className:\"model-title\"},O().createElement(\"span\",{className:\"model-title__text\"},u));return O().createElement(\"span\",{className:\"model\"},O().createElement(v,{title:C,expanded:s<=o,collapsedContent:\"[...]\"},O().createElement(\"span\",{className:\"prop\"},a&&s>1&&O().createElement(\"span\",{className:\"prop-name\"},u),O().createElement(\"span\",{className:\"prop-type\"},c),i&&O().createElement(\"span\",{className:\"prop-format\"},\"($\",i,\")\"),g.size?g.entrySeq().map((([e,t])=>O().createElement(_,{key:`${e}-${t}`,propKey:e,propVal:t,propClass:ft}))):null,l&&h.size>0?O().createElement(b,{extensions:h,propClass:`${ft} extension`}):null,d?O().createElement(S,{source:d}):null,y&&O().createElement(\"div\",{className:\"external-docs\"},O().createElement(w,{target:\"_blank\",href:sanitizeUrl(y)},f||y)),p&&p.size?O().createElement(\"span\",null,O().createElement(\"br\",null),O().createElement(\"span\",{className:ft},\"xml:\"),p.entrySeq().map((([e,t])=>O().createElement(\"span\",{key:`${e}-${t}`,className:ft},O().createElement(\"br\",null),\"   \",e,\": \",String(t)))).toArray()):null,m&&O().createElement(E,{value:m,getComponent:t}))))}}class Schemes extends O().Component{UNSAFE_componentWillMount(){let{schemes:e}=this.props;this.setScheme(e.first())}UNSAFE_componentWillReceiveProps(e){this.props.currentScheme&&e.schemes.includes(this.props.currentScheme)||this.setScheme(e.schemes.first())}onChange=e=>{this.setScheme(e.target.value)};setScheme=e=>{let{path:t,method:r,specActions:a}=this.props;a.setScheme(e,t,r)};render(){let{schemes:e,currentScheme:t}=this.props;return O().createElement(\"label\",{htmlFor:\"schemes\"},O().createElement(\"span\",{className:\"schemes-title\"},\"Schemes\"),O().createElement(\"select\",{onChange:this.onChange,value:t,id:\"schemes\"},e.valueSeq().map((e=>O().createElement(\"option\",{value:e,key:e},e))).toArray()))}}class SchemesContainer extends O().Component{render(){const{specActions:e,specSelectors:t,getComponent:r}=this.props,a=t.operationScheme(),n=t.schemes(),s=r(\"schemes\");return n&&n.size?O().createElement(s,{currentScheme:a,schemes:n,specActions:e}):null}}const St=require(\"react-debounce-input\");var Et=__webpack_require__.n(St);const _t={value:\"\",onChange:()=>{},schema:{},keyName:\"\",required:!1,errors:(0,k.List)()};class JsonSchemaForm extends x.Component{static defaultProps=_t;componentDidMount(){const{dispatchInitialValue:e,value:t,onChange:r}=this.props;e?r(t):!1===e&&r(\"\")}render(){let{schema:e,errors:t,value:r,onChange:a,getComponent:n,fn:s,disabled:o}=this.props;const l=e&&e.get?e.get(\"format\"):null,c=e&&e.get?e.get(\"type\"):null,i=s.getSchemaObjectType(e),p=s.isFileUploadIntended(e);let getComponentSilently=e=>n(e,!1,{failSilently:!0}),m=c?getComponentSilently(l?`JsonSchema_${c}_${l}`:`JsonSchema_${c}`):n(\"JsonSchema_string\");return p||!k.List.isList(c)||\"array\"!==i&&\"object\"!==i||(m=n(\"JsonSchema_object\")),m||(m=n(\"JsonSchema_string\")),O().createElement(m,Qe()({},this.props,{errors:t,fn:s,getComponent:n,value:r,onChange:a,schema:e,disabled:o}))}}class JsonSchema_string extends x.Component{static defaultProps=_t;onChange=e=>{const t=this.props.schema&&\"file\"===this.props.schema.get(\"type\")?e.target.files[0]:e.target.value;this.props.onChange(t,this.props.keyName)};onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,schema:r,errors:a,required:n,description:s,disabled:o}=this.props;const l=r&&r.get?r.get(\"enum\"):null,c=r&&r.get?r.get(\"format\"):null,i=r&&r.get?r.get(\"type\"):null,p=r&&r.get?r.get(\"in\"):null;if(t?(isImmutable(t)||\"object\"==typeof t)&&(t=stringify(t)):t=\"\",a=a.toJS?a.toJS():[],l){const r=e(\"Select\");return O().createElement(r,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",allowedValues:[...l],value:t,allowEmptyValue:!n,disabled:o,onChange:this.onEnumChange})}const m=o||p&&\"formData\"===p&&!(\"FormData\"in window),u=e(\"Input\");return i&&\"file\"===i?O().createElement(u,{type:\"file\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",onChange:this.onChange,disabled:m}):O().createElement(Et(),{type:c&&\"password\"===c?\"password\":\"text\",className:a.length?\"invalid\":\"\",title:a.length?a:\"\",value:t,minLength:0,debounceTimeout:350,placeholder:s,onChange:this.onChange,disabled:m})}}class JsonSchema_array extends x.PureComponent{static defaultProps=_t;constructor(e,t){super(e,t),this.state={value:valueOrEmptyList(e.value),schema:e.schema}}UNSAFE_componentWillReceiveProps(e){const t=valueOrEmptyList(e.value);t!==this.state.value&&this.setState({value:t}),e.schema!==this.state.schema&&this.setState({schema:e.schema})}onChange=()=>{this.props.onChange(this.state.value)};onItemChange=(e,t)=>{this.setState((({value:r})=>({value:r.set(t,e)})),this.onChange)};removeItem=e=>{this.setState((({value:t})=>({value:t.delete(e)})),this.onChange)};addItem=()=>{const{fn:e}=this.props;let t=valueOrEmptyList(this.state.value);this.setState((()=>({value:t.push(e.getSampleSchema(this.state.schema.get(\"items\"),!1,{includeWriteOnly:!0}))})),this.onChange)};onEnumChange=e=>{this.setState((()=>({value:e})),this.onChange)};render(){let{getComponent:e,required:t,schema:r,errors:a,fn:n,disabled:s}=this.props;a=a.toJS?a.toJS():Array.isArray(a)?a:[];const o=a.filter((e=>\"string\"==typeof e)),l=a.filter((e=>void 0!==e.needRemove)).map((e=>e.error)),c=this.state.value,i=!!(c&&c.count&&c.count()>0),p=r.getIn([\"items\",\"enum\"]),m=r.get(\"items\"),u=n.getSchemaObjectType(m),d=n.getSchemaObjectTypeLabel(m),h=r.getIn([\"items\",\"format\"]),g=r.get(\"items\");let y,f=!1,S=\"file\"===u||\"string\"===u&&\"binary\"===h;if(u&&h?y=e(`JsonSchema_${u}_${h}`):\"boolean\"!==u&&\"array\"!==u&&\"object\"!==u||(y=e(`JsonSchema_${u}`)),!k.List.isList(m?.get(\"type\"))||\"array\"!==u&&\"object\"!==u||(y=e(\"JsonSchema_object\")),y||S||(f=!0),p){const r=e(\"Select\");return O().createElement(r,{className:a.length?\"invalid\":\"\",title:a.length?a:\"\",multiple:!0,value:c,disabled:s,allowedValues:p,allowEmptyValue:!t,onChange:this.onEnumChange})}const E=e(\"Button\");return O().createElement(\"div\",{className:\"json-schema-array\"},i?c.map(((t,r)=>{const o=(0,k.fromJS)([...a.filter((e=>e.index===r)).map((e=>e.error))]);return O().createElement(\"div\",{key:r,className:\"json-schema-form-item\"},S?O().createElement(JsonSchemaArrayItemFile,{value:t,onChange:e=>this.onItemChange(e,r),disabled:s,errors:o,getComponent:e}):f?O().createElement(JsonSchemaArrayItemText,{value:t,onChange:e=>this.onItemChange(e,r),disabled:s,errors:o}):O().createElement(y,Qe()({},this.props,{value:t,onChange:e=>this.onItemChange(e,r),disabled:s,errors:o,schema:g,getComponent:e,fn:n})),s?null:O().createElement(E,{className:`btn btn-sm json-schema-form-item-remove ${l.length?\"invalid\":null}`,title:l.length?l:\"\",onClick:()=>this.removeItem(r)},\" - \"))})):null,s?null:O().createElement(E,{className:`btn btn-sm json-schema-form-item-add ${o.length?\"invalid\":null}`,title:o.length?o:\"\",onClick:this.addItem},\"Add \",d,\" item\"))}}class JsonSchemaArrayItemText extends x.Component{static defaultProps=_t;onChange=e=>{const t=e.target.value;this.props.onChange(t,this.props.keyName)};render(){let{value:e,errors:t,description:r,disabled:a}=this.props;return e?(isImmutable(e)||\"object\"==typeof e)&&(e=stringify(e)):e=\"\",t=t.toJS?t.toJS():[],O().createElement(Et(),{type:\"text\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",value:e,minLength:0,debounceTimeout:350,placeholder:r,onChange:this.onChange,disabled:a})}}class JsonSchemaArrayItemFile extends x.Component{static defaultProps=_t;onFileChange=e=>{const t=e.target.files[0];this.props.onChange(t,this.props.keyName)};render(){let{getComponent:e,errors:t,disabled:r}=this.props;const a=e(\"Input\"),n=r||!(\"FormData\"in window);return O().createElement(a,{type:\"file\",className:t.length?\"invalid\":\"\",title:t.length?t:\"\",onChange:this.onFileChange,disabled:n})}}class JsonSchema_boolean extends x.Component{static defaultProps=_t;onEnumChange=e=>this.props.onChange(e);render(){let{getComponent:e,value:t,errors:r,schema:a,required:n,disabled:s}=this.props;r=r.toJS?r.toJS():[];let o=a&&a.get?a.get(\"enum\"):null,l=!o||!n,c=!o&&[\"true\",\"false\"];const i=e(\"Select\");return O().createElement(i,{className:r.length?\"invalid\":\"\",title:r.length?r:\"\",value:String(t),disabled:s,allowedValues:o?[...o]:c,allowEmptyValue:l,onChange:this.onEnumChange})}}const stringifyObjectErrors=e=>e.map((e=>{const t=void 0!==e.propKey?e.propKey:e.index;let r=\"string\"==typeof e?e:\"string\"==typeof e.error?e.error:null;if(!t&&r)return r;let a=e.error,n=`/${e.propKey}`;for(;\"object\"==typeof a;){const e=void 0!==a.propKey?a.propKey:a.index;if(void 0===e)break;if(n+=`/${e}`,!a.error)break;a=a.error}return`${n}: ${a}`}));class JsonSchema_object extends x.PureComponent{constructor(){super()}static defaultProps=_t;onChange=e=>{this.props.onChange(e)};handleOnChange=e=>{const t=e.target.value;this.onChange(t)};render(){let{getComponent:e,value:t,errors:r,disabled:a}=this.props;const n=e(\"TextArea\");return r=r.toJS?r.toJS():Array.isArray(r)?r:[],O().createElement(\"div\",null,O().createElement(n,{className:pt()({invalid:r.length}),title:r.length?stringifyObjectErrors(r).join(\", \"):\"\",value:stringify(t),disabled:a,onChange:this.handleOnChange}))}}function valueOrEmptyList(e){return k.List.isList(e)?e:Array.isArray(e)?(0,k.fromJS)(e):(0,k.List)()}const ModelExtensions=({extensions:e,propClass:t=\"\"})=>e.entrySeq().map((([e,r])=>{const a=immutableToJS(r)??null;return O().createElement(\"tr\",{key:e,className:t},O().createElement(\"td\",null,e),O().createElement(\"td\",null,JSON.stringify(a)))})).toArray(),vt=require(\"lodash/isPlainObject\");var wt=__webpack_require__.n(vt);const hasSchemaType=(e,t)=>{const r=k.Map.isMap(e);if(!r&&!wt()(e))return!1;const a=r?e.get(\"type\"):e.type;return t===a||Array.isArray(t)&&t.includes(a)},getType=(e,t=new WeakSet)=>{if(null==e)return\"any\";if(t.has(e))return\"any\";t.add(e);const{type:r,items:a}=e;return Object.hasOwn(e,\"items\")?(()=>{if(a)return`array<${getType(a,t)}>`;return\"array<any>\"})():r},getSchemaObjectTypeLabel=e=>getType(immutableToJS(e)),json_schema_5=()=>({components:{modelExample:model_example,ModelWrapper,ModelCollapse,Model,Models,EnumModel:enum_model,ObjectModel,ArrayModel,PrimitiveModel:Primitive,ModelExtensions,schemes:Schemes,SchemesContainer,...g},fn:{hasSchemaType,getSchemaObjectTypeLabel}}),bt=require(\"xml\");var Ct=__webpack_require__.n(bt);const xt=require(\"randexp\");var Ot=__webpack_require__.n(xt);const Nt=require(\"lodash/isEmpty\");var kt=__webpack_require__.n(Nt);const shallowArrayEquals=e=>t=>Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every(((e,r)=>e===t[r])),list=(...e)=>e;class Cache extends Map{delete(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.delete(t)}get(e){const t=Array.from(this.keys()).find(shallowArrayEquals(e));return super.get(t)}has(e){return-1!==Array.from(this.keys()).findIndex(shallowArrayEquals(e))}}const utils_memoizeN=(e,t=list)=>{const{Cache:r}=B();B().Cache=Cache;const a=B()(e,t);return B().Cache=r,a},At={string:e=>e.pattern?(e=>{try{const t=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,r=e.replace(t,\"100\"),a=new(Ot())(r);return a.max=100,a.gen()}catch(e){return\"string\"}})(e.pattern):\"string\",string_email:()=>\"user@example.com\",\"string_date-time\":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_time:()=>(new Date).toISOString().substring(11),string_uuid:()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",string_hostname:()=>\"example.com\",string_ipv4:()=>\"198.51.100.42\",string_ipv6:()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",number:()=>0,number_float:()=>0,integer:()=>0,boolean:e=>\"boolean\"!=typeof e.default||e.default},primitive=e=>{e=objectify(e);let{type:t,format:r}=e,a=At[`${t}_${r}`]||At[t];return isFunc(a)?a(e):\"Unknown Type: \"+e.type},sanitizeRef=e=>deeplyStripKey(e,\"$$ref\",(e=>\"string\"==typeof e&&e.indexOf(\"#\")>-1)),It=[\"maxProperties\",\"minProperties\"],jt=[\"minItems\",\"maxItems\"],qt=[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\"],Pt=[\"minLength\",\"maxLength\"],mergeJsonSchema=(e,t,r={})=>{const a={...e};if([\"example\",\"default\",\"enum\",\"xml\",\"type\",...It,...jt,...qt,...Pt].forEach((e=>(e=>{void 0===a[e]&&void 0!==t[e]&&(a[e]=t[e])})(e))),void 0!==t.required&&Array.isArray(t.required)&&(void 0!==a.required&&a.required.length||(a.required=[]),t.required.forEach((e=>{a.required.includes(e)||a.required.push(e)}))),t.properties){a.properties||(a.properties={});let e=objectify(t.properties);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]&&e[n].deprecated||e[n]&&e[n].readOnly&&!r.includeReadOnly||e[n]&&e[n].writeOnly&&!r.includeWriteOnly||a.properties[n]||(a.properties[n]=e[n],!t.required&&Array.isArray(t.required)&&-1!==t.required.indexOf(n)&&(a.required?a.required.push(n):a.required=[n])))}return t.items&&(a.items||(a.items={}),a.items=mergeJsonSchema(a.items,t.items,r)),a},sampleFromSchemaGeneric=(e,t={},r=void 0,a=!1)=>{e&&isFunc(e.toJS)&&(e=e.toJS());let n=void 0!==r||e&&void 0!==e.example||e&&void 0!==e.default;const s=!n&&e&&e.oneOf&&e.oneOf.length>0,o=!n&&e&&e.anyOf&&e.anyOf.length>0;if(!n&&(s||o)){const r=objectify(s?e.oneOf[0]:e.anyOf[0]);if(!(e=mergeJsonSchema(e,r,t)).xml&&r.xml&&(e.xml=r.xml),void 0!==e.example&&void 0!==r.example)n=!0;else if(r.properties){e.properties||(e.properties={});let a=objectify(r.properties);for(let n in a)Object.prototype.hasOwnProperty.call(a,n)&&(a[n]&&a[n].deprecated||a[n]&&a[n].readOnly&&!t.includeReadOnly||a[n]&&a[n].writeOnly&&!t.includeWriteOnly||e.properties[n]||(e.properties[n]=a[n],!r.required&&Array.isArray(r.required)&&-1!==r.required.indexOf(n)&&(e.required?e.required.push(n):e.required=[n])))}}const l={};let{xml:c,type:i,example:p,properties:m,additionalProperties:u,items:d}=e||{},{includeReadOnly:h,includeWriteOnly:g}=t;c=c||{};let y,{name:f,prefix:S,namespace:E}=c,_={};if(a&&(f=f||\"notagname\",y=(S?S+\":\":\"\")+f,E)){l[S?\"xmlns:\"+S:\"xmlns\"]=E}a&&(_[y]=[]);const schemaHasAny=t=>t.some((t=>Object.prototype.hasOwnProperty.call(e,t)));e&&!i&&(m||u||schemaHasAny(It)?i=\"object\":d||schemaHasAny(jt)?i=\"array\":schemaHasAny(qt)?(i=\"number\",e.type=\"number\"):n||e.enum||(i=\"string\",e.type=\"string\"));const handleMinMaxItems=t=>{if(null!=e?.maxItems&&(t=t.slice(0,e?.maxItems)),null!=e?.minItems){let r=0;for(;t.length<e?.minItems;)t.push(t[r++%t.length])}return t},v=objectify(m);let w,b=0;const hasExceededMaxProperties=()=>e&&null!==e.maxProperties&&void 0!==e.maxProperties&&b>=e.maxProperties,canAddProperty=t=>!e||null===e.maxProperties||void 0===e.maxProperties||!hasExceededMaxProperties()&&(!(t=>!(e&&e.required&&e.required.length&&e.required.includes(t)))(t)||e.maxProperties-b-(()=>{if(!e||!e.required)return 0;let t=0;return a?e.required.forEach((e=>t+=void 0===_[e]?0:1)):e.required.forEach((e=>t+=void 0===_[y]?.find((t=>void 0!==t[e]))?0:1)),e.required.length-t})()>0);if(w=a?(r,n=void 0)=>{if(e&&v[r]){if(v[r].xml=v[r].xml||{},v[r].xml.attribute){const e=Array.isArray(v[r].enum)?v[r].enum[0]:void 0,t=v[r].example,a=v[r].default;return void(l[v[r].xml.name||r]=void 0!==t?t:void 0!==a?a:void 0!==e?e:primitive(v[r]))}v[r].xml.name=v[r].xml.name||r}else v[r]||!1===u||(v[r]={xml:{name:r}});let s=sampleFromSchemaGeneric(e&&v[r]||void 0,t,n,a);canAddProperty(r)&&(b++,Array.isArray(s)?_[y]=_[y].concat(s):_[y].push(s))}:(r,n)=>{if(canAddProperty(r)){if(Object.prototype.hasOwnProperty.call(e,\"discriminator\")&&e.discriminator&&Object.prototype.hasOwnProperty.call(e.discriminator,\"mapping\")&&e.discriminator.mapping&&Object.prototype.hasOwnProperty.call(e,\"$$ref\")&&e.$$ref&&e.discriminator.propertyName===r){for(let t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){_[r]=t;break}}else _[r]=sampleFromSchemaGeneric(v[r],t,n,a);b++}},n){let n;if(n=sanitizeRef(void 0!==r?r:void 0!==p?p:e.default),!a){if(\"number\"==typeof n&&\"string\"===i)return`${n}`;if(\"string\"!=typeof n||\"string\"===i)return n;try{return JSON.parse(n)}catch(e){return n}}if(e||(i=Array.isArray(n)?\"array\":typeof n),\"array\"===i){if(!Array.isArray(n)){if(\"string\"==typeof n)return n;n=[n]}const r=e?e.items:void 0;r&&(r.xml=r.xml||c||{},r.xml.name=r.xml.name||c.name);let s=n.map((e=>sampleFromSchemaGeneric(r,t,e,a)));return s=handleMinMaxItems(s),c.wrapped?(_[y]=s,kt()(l)||_[y].push({_attr:l})):_=s,_}if(\"object\"===i){if(\"string\"==typeof n)return n;for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e&&v[t]&&v[t].readOnly&&!h||e&&v[t]&&v[t].writeOnly&&!g||(e&&v[t]&&v[t].xml&&v[t].xml.attribute?l[v[t].xml.name||t]=n[t]:w(t,n[t])));return kt()(l)||_[y].push({_attr:l}),_}return _[y]=kt()(l)?n:[{_attr:l},n],_}if(\"object\"===i){for(let e in v)Object.prototype.hasOwnProperty.call(v,e)&&(v[e]&&v[e].deprecated||v[e]&&v[e].readOnly&&!h||v[e]&&v[e].writeOnly&&!g||w(e));if(a&&l&&_[y].push({_attr:l}),hasExceededMaxProperties())return _;if(!0===u)a?_[y].push({additionalProp:\"Anything can be here\"}):_.additionalProp1={},b++;else if(u){const r=objectify(u),n=sampleFromSchemaGeneric(r,t,void 0,a);if(a&&r.xml&&r.xml.name&&\"notagname\"!==r.xml.name)_[y].push(n);else{const t=null!==e.minProperties&&void 0!==e.minProperties&&b<e.minProperties?e.minProperties-b:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return _;if(a){const t={};t[\"additionalProp\"+e]=n.notagname,_[y].push(t)}else _[\"additionalProp\"+e]=n;b++}}}return _}if(\"array\"===i){if(!d)return;let r;if(a&&(d.xml=d.xml||e?.xml||{},d.xml.name=d.xml.name||c.name),Array.isArray(d.anyOf))r=d.anyOf.map((e=>sampleFromSchemaGeneric(mergeJsonSchema(e,d,t),t,void 0,a)));else if(Array.isArray(d.oneOf))r=d.oneOf.map((e=>sampleFromSchemaGeneric(mergeJsonSchema(e,d,t),t,void 0,a)));else{if(!(!a||a&&c.wrapped))return sampleFromSchemaGeneric(d,t,void 0,a);r=[sampleFromSchemaGeneric(d,t,void 0,a)]}return r=handleMinMaxItems(r),a&&c.wrapped?(_[y]=r,kt()(l)||_[y].push({_attr:l}),_):r}let C;if(e&&Array.isArray(e.enum))C=normalizeArray(e.enum)[0];else{if(!e)return;if(C=primitive(e),\"number\"==typeof C){let t=e.minimum;null!=t&&(e.exclusiveMinimum&&t++,C=t);let r=e.maximum;null!=r&&(e.exclusiveMaximum&&r--,C=r)}if(\"string\"==typeof C&&(null!==e.maxLength&&void 0!==e.maxLength&&(C=C.slice(0,e.maxLength)),null!==e.minLength&&void 0!==e.minLength)){let t=0;for(;C.length<e.minLength;)C+=C[t++%C.length]}}if(\"file\"!==i)return a?(_[y]=kt()(l)?C:[{_attr:l},C],_):C},inferSchema=e=>(e.schema&&(e=e.schema),e.properties&&(e.type=\"object\"),e),createXMLExample=(e,t,r)=>{const a=sampleFromSchemaGeneric(e,t,r,!0);if(a)return\"string\"==typeof a?a:Ct()(a,{declaration:!0,indent:\"\\t\"})},sampleFromSchema=(e,t,r)=>sampleFromSchemaGeneric(e,t,r,!1),resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],Mt=utils_memoizeN(createXMLExample,resolver),Tt=utils_memoizeN(sampleFromSchema,resolver),getSchemaObjectType=e=>immutableToJS(e)?.type??\"string\",Rt=[{when:/json/,shouldStringifyTypes:[\"string\"]}],Jt=[\"object\"],get_json_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.memoizedSampleFromSchema(t,r,n),l=typeof o,c=Rt.reduce(((e,t)=>t.when.test(a)?[...e,...t.shouldStringifyTypes]:e),Jt);return X()(c,(e=>e===l))?JSON.stringify(o,null,2):o},get_yaml_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.getJsonSampleSchema(t,r,a,n);let l;try{l=qe().dump(qe().load(o),{lineWidth:-1},{schema:je.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")},get_xml_sample_schema=e=>(t,r,a)=>{const{fn:n}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return n.memoizedCreateXMLExample(t,r,a)},get_sample_schema=e=>(t,r=\"\",a={},n=void 0)=>{const{fn:s}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof n?.toJS&&(n=n.toJS()),/xml/.test(r)?s.getXmlSampleSchema(t,a,n):/(yaml|yml)/.test(r)?s.getYamlSampleSchema(t,a,r,n):s.getJsonSampleSchema(t,a,r,n)},json_schema_5_samples=({getSystem:e})=>{const t=get_json_sample_schema(e),r=get_yaml_sample_schema(e),a=get_xml_sample_schema(e),n=get_sample_schema(e);return{fn:{jsonSchema5:{inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Tt,memoizedCreateXMLExample:Mt,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:a,getSampleSchema:n,mergeJsonSchema},inferSchema,sampleFromSchema,sampleFromSchemaGeneric,createXMLExample,memoizedSampleFromSchema:Tt,memoizedCreateXMLExample:Mt,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:a,getSampleSchema:n,mergeJsonSchema,getSchemaObjectType}}},$t=require(\"lodash/constant\");var Vt=__webpack_require__.n($t);const Lt=[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],spec_selectors_state=e=>e||(0,k.Map)(),Dt=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"lastError\"))),Ut=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"url\"))),Kt=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"spec\")||\"\")),zt=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"specSource\")||\"not-editor\")),Bt=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"json\",(0,k.Map)()))),Ft=(0,_e.createSelector)(Bt,(e=>e.toJS())),Wt=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"resolved\",(0,k.Map)()))),specResolvedSubtree=(e,t)=>e.getIn([\"resolvedSubtrees\",...t],void 0),mergerFn=(e,t)=>k.Map.isMap(e)&&k.Map.isMap(t)?t.get(\"$$ref\")?t:(0,k.OrderedMap)().mergeWith(mergerFn,e,t):t,Ht=(0,_e.createSelector)(spec_selectors_state,(e=>(0,k.OrderedMap)().mergeWith(mergerFn,e.get(\"json\"),e.get(\"resolvedSubtrees\")))),spec=e=>Bt(e),Xt=(0,_e.createSelector)(spec,(()=>!1)),Gt=(0,_e.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"info\")))),Yt=(0,_e.createSelector)(spec,(e=>returnSelfOrNewMap(e&&e.get(\"externalDocs\")))),Qt=(0,_e.createSelector)(Gt,(e=>e&&e.get(\"version\"))),Zt=(0,_e.createSelector)(Qt,(e=>/v?([0-9]*)\\.([0-9]*)\\.([0-9]*)/i.exec(e).slice(1))),er=(0,_e.createSelector)(Ht,(e=>e.get(\"paths\"))),tr=Vt()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]),rr=(0,_e.createSelector)(er,(e=>{let t=(0,k.List)();return!k.Map.isMap(e)||e.isEmpty()||e.forEach(((e,r)=>{if(!e||!e.forEach)return{};e.forEach(((e,a)=>{Lt.indexOf(a)<0||(t=t.push((0,k.fromJS)({path:r,method:a,operation:e,id:`${a}-${r}`})))}))})),t})),ar=(0,_e.createSelector)(spec,(e=>(0,k.Set)(e.get(\"consumes\")))),nr=(0,_e.createSelector)(spec,(e=>(0,k.Set)(e.get(\"produces\")))),sr=(0,_e.createSelector)(spec,(e=>e.get(\"security\",(0,k.List)()))),or=(0,_e.createSelector)(spec,(e=>e.get(\"securityDefinitions\"))),findDefinition=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"definitions\",t],null),a=e.getIn([\"json\",\"definitions\",t],null);return r||a||null},lr=(0,_e.createSelector)(spec,(e=>{const t=e.get(\"definitions\");return k.Map.isMap(t)?t:(0,k.Map)()})),cr=(0,_e.createSelector)(spec,(e=>e.get(\"basePath\"))),ir=(0,_e.createSelector)(spec,(e=>e.get(\"host\"))),pr=(0,_e.createSelector)(spec,(e=>e.get(\"schemes\",(0,k.Map)()))),mr=(0,_e.createSelector)([rr,ar,nr],((e,t,r)=>e.map((e=>e.update(\"operation\",(e=>k.Map.isMap(e)?e.withMutations((e=>(e.get(\"consumes\")||e.update(\"consumes\",(e=>(0,k.Set)(e).merge(t))),e.get(\"produces\")||e.update(\"produces\",(e=>(0,k.Set)(e).merge(r))),e))):(0,k.Map)())))))),ur=(0,_e.createSelector)(spec,(e=>{const t=e.get(\"tags\",(0,k.List)());return k.List.isList(t)?t.filter((e=>k.Map.isMap(e))):(0,k.List)()})),tagDetails=(e,t)=>(ur(e)||(0,k.List)()).filter(k.Map.isMap).find((e=>e.get(\"name\")===t),(0,k.Map)()),dr=(0,_e.createSelector)(mr,ur,((e,t)=>e.reduce(((e,t)=>{let r=(0,k.Set)(t.getIn([\"operation\",\"tags\"]));return r.count()<1?e.update(\"default\",(0,k.List)(),(e=>e.push(t))):r.reduce(((e,r)=>e.update(r,(0,k.List)(),(e=>e.push(t)))),e)}),t.reduce(((e,t)=>e.set(t.get(\"name\"),(0,k.List)())),(0,k.OrderedMap)())))),selectors_taggedOperations=e=>({getConfigs:t})=>{let{tagsSorter:r,operationsSorter:a}=t();return dr(e).sortBy(((e,t)=>t),((e,t)=>{let a=\"function\"==typeof r?r:pe.tagsSorter[r];return a?a(e,t):null})).map(((t,r)=>{let n=\"function\"==typeof a?a:pe.operationsSorter[a],s=n?t.sort(n):t;return(0,k.Map)({tagDetails:tagDetails(e,r),operations:s})}))},hr=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"responses\",(0,k.Map)()))),gr=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"requests\",(0,k.Map)()))),yr=(0,_e.createSelector)(spec_selectors_state,(e=>e.get(\"mutatedRequests\",(0,k.Map)()))),responseFor=(e,t,r)=>hr(e).getIn([t,r],null),requestFor=(e,t,r)=>gr(e).getIn([t,r],null),mutatedRequestFor=(e,t,r)=>yr(e).getIn([t,r],null),allowTryItOutFor=()=>!0,parameterWithMetaByIdentity=(e,t,r)=>{const a=Ht(e).getIn([\"paths\",...t,\"parameters\"],(0,k.OrderedMap)()),n=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,k.OrderedMap)());return a.map((e=>{const t=n.get(`${r.get(\"in\")}.${r.get(\"name\")}`),a=n.get(`${r.get(\"in\")}.${r.get(\"name\")}.hash-${r.hashCode()}`);return(0,k.OrderedMap)().merge(e,t,a)})).find((e=>e.get(\"in\")===r.get(\"in\")&&e.get(\"name\")===r.get(\"name\")),(0,k.OrderedMap)())},parameterInclusionSettingFor=(e,t,r,a)=>{const n=`${a}.${r}`;return e.getIn([\"meta\",\"paths\",...t,\"parameter_inclusions\",n],!1)},parameterWithMeta=(e,t,r,a)=>{const n=Ht(e).getIn([\"paths\",...t,\"parameters\"],(0,k.OrderedMap)()).find((e=>e.get(\"in\")===a&&e.get(\"name\")===r),(0,k.OrderedMap)());return parameterWithMetaByIdentity(e,t,n)},operationWithMeta=(e,t,r)=>{const a=Ht(e).getIn([\"paths\",t,r],(0,k.OrderedMap)()),n=e.getIn([\"meta\",\"paths\",t,r],(0,k.OrderedMap)()),s=a.get(\"parameters\",(0,k.List)()).map((a=>parameterWithMetaByIdentity(e,[t,r],a)));return(0,k.OrderedMap)().merge(a,n).set(\"parameters\",s)};function getParameter(e,t,r,a){return t=t||[],e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,k.fromJS)([])).find((e=>k.Map.isMap(e)&&e.get(\"name\")===r&&e.get(\"in\")===a))||(0,k.Map)()}const fr=(0,_e.createSelector)(spec,(e=>{const t=e.get(\"host\");return\"string\"==typeof t&&t.length>0&&\"/\"!==t[0]}));function parameterValues(e,t,r){return t=t||[],operationWithMeta(e,...t).get(\"parameters\",(0,k.List)()).reduce(((e,t)=>{let a=r&&\"body\"===t.get(\"in\")?t.get(\"value_xml\"):t.get(\"value\");return k.List.isList(a)&&(a=a.filter((e=>\"\"!==e))),e.set(paramToIdentifier(t,{allowHashes:!1}),a)}),(0,k.fromJS)({}))}function parametersIncludeIn(e,t=\"\"){if(k.List.isList(e))return e.some((e=>k.Map.isMap(e)&&e.get(\"in\")===t))}function parametersIncludeType(e,t=\"\"){if(k.List.isList(e))return e.some((e=>k.Map.isMap(e)&&e.get(\"type\")===t))}function contentTypeValues(e,t){t=t||[];let r=Ht(e).getIn([\"paths\",...t],(0,k.fromJS)({})),a=e.getIn([\"meta\",\"paths\",...t],(0,k.fromJS)({})),n=currentProducesFor(e,t);const s=r.get(\"parameters\")||new k.List,o=a.get(\"consumes_value\")?a.get(\"consumes_value\"):parametersIncludeType(s,\"file\")?\"multipart/form-data\":parametersIncludeType(s,\"formData\")?\"application/x-www-form-urlencoded\":void 0;return(0,k.fromJS)({requestContentType:o,responseContentType:n})}function currentProducesFor(e,t){t=t||[];const r=Ht(e).getIn([\"paths\",...t],null);if(null===r)return;const a=e.getIn([\"meta\",\"paths\",...t,\"produces_value\"],null),n=r.getIn([\"produces\",0],null);return a||n||\"application/json\"}function producesOptionsFor(e,t){t=t||[];const r=Ht(e),a=r.getIn([\"paths\",...t],null);if(null===a)return;const[n]=t,s=a.get(\"produces\",null),o=r.getIn([\"paths\",n,\"produces\"],null),l=r.getIn([\"produces\"],null);return s||o||l}function consumesOptionsFor(e,t){t=t||[];const r=Ht(e),a=r.getIn([\"paths\",...t],null);if(null===a)return;const[n]=t,s=a.get(\"consumes\",null),o=r.getIn([\"paths\",n,\"consumes\"],null),l=r.getIn([\"consumes\"],null);return s||o||l}const operationScheme=(e,t,r)=>{let a=e.get(\"url\").match(/^([a-z][a-z0-9+\\-.]*):/),n=Array.isArray(a)?a[1]:null;return e.getIn([\"scheme\",t,r])||e.getIn([\"scheme\",\"_defaultScheme\"])||n||\"\"},canExecuteScheme=(e,t,r)=>[\"http\",\"https\"].indexOf(operationScheme(e,t,r))>-1,validationErrors=(e,t)=>{t=t||[];const r=e.getIn([\"meta\",\"paths\",...t,\"parameters\"],(0,k.fromJS)([])),a=[];if(0===r.length)return a;const getErrorsWithPaths=(e,t=[])=>{const getNestedErrorsWithPaths=(e,t)=>{const r=[...t,e.get(\"propKey\")||e.get(\"index\")];return k.Map.isMap(e.get(\"error\"))?getErrorsWithPaths(e.get(\"error\"),r):{error:e.get(\"error\"),path:r}};return k.List.isList(e)?e.map((e=>k.Map.isMap(e)?getNestedErrorsWithPaths(e,t):{error:e,path:t})):getNestedErrorsWithPaths(e,t)};return r.forEach(((e,t)=>{const r=t.split(\".\").slice(1,-1).join(\".\"),n=e.get(\"errors\");if(n&&n.count()){getErrorsWithPaths(n).forEach((({error:e,path:t})=>{a.push(((e,t,r)=>`For '${r}'${(t=t.reduce(((e,t)=>\"number\"==typeof t?`${e}[${t}]`:e?`${e}.${t}`:t),\"\"))?` at path '${t}'`:\"\"}: ${e}.`)(e,t,r))}))}})),a},validateBeforeExecute=(e,t)=>0===validationErrors(e,t).length,getOAS3RequiredRequestBodyContentType=(e,t)=>{let r={requestBody:!1,requestContentType:{}},a=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\"],(0,k.fromJS)([]));return a.size<1||(a.getIn([\"required\"])&&(r.requestBody=a.getIn([\"required\"])),a.getIn([\"content\"]).entrySeq().forEach((e=>{const t=e[0];if(e[1].getIn([\"schema\",\"required\"])){const a=e[1].getIn([\"schema\",\"required\"]).toJS();r.requestContentType[t]=a}}))),r},isMediaTypeSchemaPropertiesEqual=(e,t,r,a)=>{if((r||a)&&r===a)return!0;let n=e.getIn([\"resolvedSubtrees\",\"paths\",...t,\"requestBody\",\"content\"],(0,k.fromJS)([]));if(n.size<2||!r||!a)return!1;let s=n.getIn([r,\"schema\",\"properties\"],(0,k.fromJS)([])),o=n.getIn([a,\"schema\",\"properties\"],(0,k.fromJS)([]));return!!s.equals(o)};function returnSelfOrNewMap(e){return k.Map.isMap(e)?e:new k.Map}const Sr=require(\"lodash/isString\");var Er=__webpack_require__.n(Sr);const _r=require(\"lodash/debounce\");var vr=__webpack_require__.n(_r);const wr=require(\"lodash/set\");var br=__webpack_require__.n(wr);const Cr=require(\"lodash/fp/assocPath\");var xr=__webpack_require__.n(Cr);const Or=\"spec_update_spec\",Nr=\"spec_update_url\",kr=\"spec_update_json\",Ar=\"spec_update_param\",Ir=\"spec_update_empty_param_inclusion\",jr=\"spec_validate_param\",qr=\"spec_set_response\",Pr=\"spec_set_request\",Mr=\"spec_set_mutated_request\",Tr=\"spec_log_request\",Rr=\"spec_clear_response\",Jr=\"spec_clear_request\",$r=\"spec_clear_validate_param\",Vr=\"spec_update_operation_meta_value\",Lr=\"spec_update_resolved\",Dr=\"spec_update_resolved_subtree\",Ur=\"set_scheme\",toStr=e=>Er()(e)?e:\"\";function updateSpec(e){const t=toStr(e).replace(/\\t/g,\"  \");if(\"string\"==typeof e)return{type:Or,payload:t}}function updateResolved(e){return{type:Lr,payload:e}}function updateUrl(e){return{type:Nr,payload:e}}function updateJsonSpec(e){return{type:kr,payload:e}}const parseToJson=e=>({specActions:t,specSelectors:r,errActions:a})=>{let{specStr:n}=r,s=null;try{e=e||n(),a.clear({source:\"parser\"}),s=qe().load(e,{schema:je.JSON_SCHEMA})}catch(e){return console.error(e),a.newSpecErr({source:\"parser\",level:\"error\",message:e.reason,line:e.mark&&e.mark.line?e.mark.line+1:void 0})}return s&&\"object\"==typeof s?t.updateJsonSpec(s):t.updateJsonSpec({})};let Kr=!1;const resolveSpec=(e,t)=>({specActions:r,specSelectors:a,errActions:n,fn:{fetch:s,resolve:o,AST:l={}},getConfigs:c})=>{Kr||(console.warn(\"specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!\"),Kr=!0);const{modelPropertyMacro:i,parameterMacro:p,requestInterceptor:m,responseInterceptor:u}=c();void 0===e&&(e=a.specJson()),void 0===t&&(t=a.url());let d=l.getLineNumberForPath?l.getLineNumberForPath:()=>{},h=a.specStr();return o({fetch:s,spec:e,baseDoc:String(new URL(t,document.baseURI)),modelPropertyMacro:i,parameterMacro:p,requestInterceptor:m,responseInterceptor:u}).then((({spec:e,errors:t})=>{if(n.clear({type:\"thrown\"}),Array.isArray(t)&&t.length>0){let e=t.map((e=>(console.error(e),e.line=e.fullPath?d(h,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));n.newThrownErrBatch(e)}return r.updateResolved(e)}))};let zr=[];const Br=vr()((()=>{const e=zr.reduce(((e,{path:t,system:r})=>(e.has(r)||e.set(r,[]),e.get(r).push(t),e)),new Map);zr=[],e.forEach((async(e,t)=>{if(!t)return void console.error(\"debResolveSubtrees: don't have a system to operate on, aborting.\");if(!t.fn.resolveSubtree)return void console.error(\"Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.\");const{errActions:r,errSelectors:a,fn:{resolveSubtree:n,fetch:s,AST:o={}},specSelectors:l,specActions:c}=t,i=o.getLineNumberForPath??Vt()(void 0),p=l.specStr(),{modelPropertyMacro:m,parameterMacro:u,requestInterceptor:d,responseInterceptor:h}=t.getConfigs();try{const t=await e.reduce((async(e,t)=>{let{resultMap:o,specWithCurrentSubtrees:c}=await e;const{errors:g,spec:y}=await n(c,t,{baseDoc:String(new URL(l.url(),document.baseURI)),modelPropertyMacro:m,parameterMacro:u,requestInterceptor:d,responseInterceptor:h});if(a.allErrors().size&&r.clearBy((e=>\"thrown\"!==e.get(\"type\")||\"resolver\"!==e.get(\"source\")||!e.get(\"fullPath\")?.every(((e,r)=>e===t[r]||void 0===t[r])))),Array.isArray(g)&&g.length>0){let e=g.map((e=>(e.line=e.fullPath?i(p,e.fullPath):null,e.path=e.fullPath?e.fullPath.join(\".\"):null,e.level=\"error\",e.type=\"thrown\",e.source=\"resolver\",Object.defineProperty(e,\"message\",{enumerable:!0,value:e.message}),e)));r.newThrownErrBatch(e)}return y&&l.isOAS3()&&\"components\"===t[0]&&\"securitySchemes\"===t[1]&&await Promise.all(Object.values(y).filter((e=>\"openIdConnect\"===e?.type)).map((async e=>{const t={url:e.openIdConnectUrl,requestInterceptor:d,responseInterceptor:h};try{const r=await s(t);r instanceof Error||r.status>=400?console.error(r.statusText+\" \"+t.url):e.openIdConnectData=JSON.parse(r.text)}catch(e){console.error(e)}}))),br()(o,t,y),c=xr()(t,y,c),{resultMap:o,specWithCurrentSubtrees:c}}),Promise.resolve({resultMap:(l.specResolvedSubtree([])||(0,k.Map)()).toJS(),specWithCurrentSubtrees:l.specJS()}));c.updateResolvedSubtree([],t.resultMap)}catch(e){console.error(e)}}))}),35),requestResolvedSubtree=e=>t=>{zr.find((({path:r,system:a})=>a===t&&r.toString()===e.toString()))||(zr.push({path:e,system:t}),Br())};function changeParam(e,t,r,a,n){return{type:Ar,payload:{path:e,value:a,paramName:t,paramIn:r,isXml:n}}}function changeParamByIdentity(e,t,r,a){return{type:Ar,payload:{path:e,param:t,value:r,isXml:a}}}const updateResolvedSubtree=(e,t)=>({type:Dr,payload:{path:e,value:t}}),invalidateResolvedSubtreeCache=()=>({type:Dr,payload:{path:[],value:(0,k.Map)()}}),validateParams=(e,t)=>({type:jr,payload:{pathMethod:e,isOAS3:t}}),updateEmptyParamInclusion=(e,t,r,a)=>({type:Ir,payload:{pathMethod:e,paramName:t,paramIn:r,includeEmptyValue:a}});function clearValidateParams(e){return{type:$r,payload:{pathMethod:e}}}function changeConsumesValue(e,t){return{type:Vr,payload:{path:e,value:t,key:\"consumes_value\"}}}function changeProducesValue(e,t){return{type:Vr,payload:{path:e,value:t,key:\"produces_value\"}}}const setResponse=(e,t,r)=>({payload:{path:e,method:t,res:r},type:qr}),setRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:Pr}),setMutatedRequest=(e,t,r)=>({payload:{path:e,method:t,req:r},type:Mr}),logRequest=e=>({payload:e,type:Tr}),executeRequest=e=>({fn:t,specActions:r,specSelectors:a,getConfigs:n,oas3Selectors:s})=>{let{pathName:o,method:l,operation:c}=e,{requestInterceptor:i,responseInterceptor:p}=n(),m=c.toJS();if(c&&c.get(\"parameters\")&&c.get(\"parameters\").filter((e=>e&&!0===e.get(\"allowEmptyValue\"))).forEach((t=>{if(a.parameterInclusionSettingFor([o,l],t.get(\"name\"),t.get(\"in\"))){e.parameters=e.parameters||{};const r=paramToValue(t,e.parameters);(!r||r&&0===r.size)&&(e.parameters[t.get(\"name\")]=\"\")}})),e.contextUrl=ue()(a.url()).toString(),m&&m.operationId?e.operationId=m.operationId:m&&o&&l&&(e.operationId=t.opId(m,o,l)),a.isOAS3()){const t=`${o}:${l}`;e.server=s.selectedServer(t)||s.selectedServer();const r=s.serverVariables({server:e.server,namespace:t}).toJS(),a=s.serverVariables({server:e.server}).toJS();e.serverVariables=Object.keys(r).length?r:a,e.requestContentType=s.requestContentType(o,l),e.responseContentType=s.responseContentType(o,l)||\"*/*\";const n=s.requestBodyValue(o,l),c=s.requestBodyInclusionSetting(o,l);n&&n.toJS?e.requestBody=n.map((e=>k.Map.isMap(e)?e.get(\"value\"):e)).filter(((e,t)=>(Array.isArray(e)?0!==e.length:!isEmptyValue(e))||c.get(t))).toJS():e.requestBody=n}let u=Object.assign({},e);u=t.buildRequest(u),r.setRequest(e.pathName,e.method,u);e.requestInterceptor=async t=>{let a=await i.apply(void 0,[t]),n=Object.assign({},a);return r.setMutatedRequest(e.pathName,e.method,n),a},e.responseInterceptor=p;const d=Date.now();return t.execute(e).then((t=>{t.duration=Date.now()-d,r.setResponse(e.pathName,e.method,t)})).catch((t=>{\"Failed to fetch\"===t.message&&(t.name=\"\",t.message='**Failed to fetch.**  \\n**Possible Reasons:** \\n  - CORS \\n  - Network Failure \\n  - URL scheme must be \"http\" or \"https\" for CORS request.'),r.setResponse(e.pathName,e.method,{error:!0,err:t})}))},actions_execute=({path:e,method:t,...r}={})=>a=>{let{fn:{fetch:n},specSelectors:s,specActions:o}=a,l=s.specJsonWithResolvedSubtrees().toJS(),c=s.operationScheme(e,t),{requestContentType:i,responseContentType:p}=s.contentTypeValues([e,t]).toJS(),m=/xml/i.test(i),u=s.parameterValues([e,t],m).toJS();return o.executeRequest({...r,fetch:n,spec:l,pathName:e,method:t,parameters:u,requestContentType:i,scheme:c,responseContentType:p})};function clearResponse(e,t){return{type:Rr,payload:{path:e,method:t}}}function clearRequest(e,t){return{type:Jr,payload:{path:e,method:t}}}function setScheme(e,t,r){return{type:Ur,payload:{scheme:e,path:t,method:r}}}const Fr={[Or]:(e,t)=>\"string\"==typeof t.payload?e.set(\"spec\",t.payload):e,[Nr]:(e,t)=>e.set(\"url\",t.payload+\"\"),[kr]:(e,t)=>e.set(\"json\",fromJSOrdered(t.payload)),[Lr]:(e,t)=>e.setIn([\"resolved\"],fromJSOrdered(t.payload)),[Dr]:(e,t)=>{const{value:r,path:a}=t.payload;return e.setIn([\"resolvedSubtrees\",...a],fromJSOrdered(r))},[Ar]:(e,{payload:t})=>{let{path:r,paramName:a,paramIn:n,param:s,value:o,isXml:l}=t,c=s?paramToIdentifier(s):`${n}.${a}`;const i=l?\"value_xml\":\"value\";return e.setIn([\"meta\",\"paths\",...r,\"parameters\",c,i],(0,k.fromJS)(o))},[Ir]:(e,{payload:t})=>{let{pathMethod:r,paramName:a,paramIn:n,includeEmptyValue:s}=t;if(!a||!n)return console.warn(\"Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey.\"),e;const o=`${n}.${a}`;return e.setIn([\"meta\",\"paths\",...r,\"parameter_inclusions\",o],s)},[jr]:(e,{payload:{pathMethod:t,isOAS3:r}})=>{const a=Ht(e).getIn([\"paths\",...t]),n=parameterValues(e,t).toJS();return e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,k.fromJS)({}),(s=>a.get(\"parameters\",(0,k.List)()).reduce(((a,s)=>{const o=paramToValue(s,n),l=parameterInclusionSettingFor(e,t,s.get(\"name\"),s.get(\"in\")),c=((e,t,{isOAS3:r=!1,bypassRequiredCheck:a=!1}={})=>{let n=e.get(\"required\"),{schema:s,parameterContentMediaType:o}=getParameterSchema(e,{isOAS3:r});return validateValueBySchema(t,s,n,a,o)})(s,o,{bypassRequiredCheck:l,isOAS3:r});return a.setIn([paramToIdentifier(s),\"errors\"],(0,k.fromJS)(c))}),s)))},[$r]:(e,{payload:{pathMethod:t}})=>e.updateIn([\"meta\",\"paths\",...t,\"parameters\"],(0,k.fromJS)([]),(e=>e.map((e=>e.set(\"errors\",(0,k.fromJS)([])))))),[qr]:(e,{payload:{res:t,path:r,method:a}})=>{let n;n=t.error?Object.assign({error:!0,name:t.err.name,message:t.err.message,statusCode:t.err.statusCode},t.err.response):t,n.headers=n.headers||{};let s=e.setIn([\"responses\",r,a],fromJSOrdered(n));return K.Blob&&n.data instanceof K.Blob&&(s=s.setIn([\"responses\",r,a,\"text\"],n.data)),s},[Pr]:(e,{payload:{req:t,path:r,method:a}})=>e.setIn([\"requests\",r,a],fromJSOrdered(t)),[Mr]:(e,{payload:{req:t,path:r,method:a}})=>e.setIn([\"mutatedRequests\",r,a],fromJSOrdered(t)),[Vr]:(e,{payload:{path:t,value:r,key:a}})=>{let n=[\"paths\",...t],s=[\"meta\",\"paths\",...t];return e.getIn([\"json\",...n])||e.getIn([\"resolved\",...n])||e.getIn([\"resolvedSubtrees\",...n])?e.setIn([...s,a],(0,k.fromJS)(r)):e},[Rr]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"responses\",t,r]),[Jr]:(e,{payload:{path:t,method:r}})=>e.deleteIn([\"requests\",t,r]),[Ur]:(e,{payload:{scheme:t,path:r,method:a}})=>r&&a?e.setIn([\"scheme\",r,a],t):r||a?void 0:e.setIn([\"scheme\",\"_defaultScheme\"],t)},wrap_actions_updateSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.parseToJson(...r)},wrap_actions_updateJsonSpec=(e,{specActions:t})=>(...r)=>{e(...r),t.invalidateResolvedSubtreeCache();const[a]=r,n=Fe()(a,[\"paths\"])||{};Object.keys(n).forEach((e=>{const r=Fe()(n,[e]);wt()(r)&&r.$ref&&t.requestResolvedSubtree([\"paths\",e])})),t.requestResolvedSubtree([\"components\",\"securitySchemes\"])},wrap_actions_executeRequest=(e,{specActions:t})=>r=>(t.logRequest(r),e(r)),wrap_actions_validateParams=(e,{specSelectors:t})=>r=>e(r,t.isOAS3()),plugins_spec=()=>({statePlugins:{spec:{wrapActions:{...S},reducers:{...Fr},actions:{...f},selectors:{...y}}}}),Wr=require(\"swagger-client/es/resolver/strategies/generic\");var Hr=__webpack_require__.n(Wr);const Xr=require(\"swagger-client/es/resolver/strategies/openapi-2\");var Gr=__webpack_require__.n(Xr);const Yr=require(\"swagger-client/es/resolver/strategies/openapi-3-0\");var Qr=__webpack_require__.n(Yr);const Zr=require(\"swagger-client/es/resolver/strategies/openapi-3-1-apidom\");var ea=__webpack_require__.n(Zr);const ta=require(\"swagger-client/es/resolver\"),ra=require(\"swagger-client/es/execute\"),aa=require(\"swagger-client/es/http\");var na=__webpack_require__.n(aa);const sa=require(\"swagger-client/es/subtree-resolver\"),oa=require(\"swagger-client/es/helpers\"),configs_wrap_actions_loaded=(e,t)=>(...r)=>{e(...r);const a=t.getConfigs().withCredentials;t.fn.fetch.withCredentials=a};function swagger_client({configs:e,getConfigs:t}){return{fn:{fetch:(0,aa.makeHttp)(na(),e.preFetch,e.postFetch),buildRequest:ra.buildRequest,execute:ra.execute,resolve:(0,ta.makeResolve)({strategies:[ea(),Qr(),Gr(),Hr()]}),resolveSubtree:async(e,r,a={})=>{const n=t(),s={modelPropertyMacro:n.modelPropertyMacro,parameterMacro:n.parameterMacro,requestInterceptor:n.requestInterceptor,responseInterceptor:n.responseInterceptor,strategies:[ea(),Qr(),Gr(),Hr()]};return(0,sa.makeResolveSubtree)(s)(e,r,a)},serializeRes:aa.serializeRes,opId:oa.opId},statePlugins:{configs:{wrapActions:{loaded:configs_wrap_actions_loaded}}}}}function util(){return{fn:{shallowEqualKeys,sanitizeUrl}}}const la=require(\"react-dom\");var ca=__webpack_require__.n(la);const ia=require(\"react-redux\"),pa=require(\"lodash/identity\");var ma=__webpack_require__.n(pa);const withSystem=e=>t=>{const{fn:r}=e();class WithSystem extends x.Component{render(){return O().createElement(t,Qe()({},e(),this.props,this.context))}}return WithSystem.displayName=`WithSystem(${r.getDisplayName(t)})`,WithSystem},withRoot=(e,t)=>r=>{const{fn:a}=e();class WithRoot extends x.Component{render(){return O().createElement(ia.Provider,{store:t},O().createElement(r,Qe()({},this.props,this.context)))}}return WithRoot.displayName=`WithRoot(${a.getDisplayName(r)})`,WithRoot},withConnect=(e,t,r)=>(0,N.compose)(r?withRoot(e,r):ma(),(0,ia.connect)(((r,a)=>{const n={...a,...e()},s=t.prototype?.mapStateToProps||(e=>({state:e}));return s(r,n)})),withSystem(e))(t),handleProps=(e,t,r,a)=>{for(const n in t){const s=t[n];\"function\"==typeof s&&s(r[n],a[n],e())}},withMappedContainer=(e,t,r)=>(t,a)=>{const{fn:n}=e(),s=r(t,\"root\");class WithMappedContainer extends x.Component{constructor(t,r){super(t,r),handleProps(e,a,t,{})}UNSAFE_componentWillReceiveProps(t){handleProps(e,a,t,this.props)}render(){const e=ke()(this.props,a?Object.keys(a):[]);return O().createElement(s,e)}}return WithMappedContainer.displayName=`WithMappedContainer(${n.getDisplayName(s)})`,WithMappedContainer},render=(e,t,r,a)=>n=>{const s=r(e,t,a)(\"App\",\"root\"),{createRoot:o}=ca();o(n).render(O().createElement(s,null))},getComponent=(e,t,r)=>(a,n,s={})=>{if(\"string\"!=typeof a)throw new TypeError(\"Need a string, to fetch a component. Was given a \"+typeof a);const o=r(a);return o?n?\"root\"===n?withConnect(e,o,t()):withConnect(e,o):o:(s.failSilently||e().log.warn(\"Could not find component:\",a),null)},getDisplayName=e=>e.displayName||e.name||\"Component\",view=({getComponents:e,getStore:t,getSystem:r})=>{const a=(n=getComponent(r,t,e),ie(n,((...e)=>JSON.stringify(e))));var n;const s=(e=>utils_memoizeN(e,((...e)=>e)))(withMappedContainer(r,0,a));return{rootInjects:{getComponent:a,makeMappedContainer:s,render:render(r,t,getComponent,e)},fn:{getDisplayName}}},view_legacy=({React:e,getSystem:t,getStore:r,getComponents:a})=>{const n={},s=parseInt(e?.version,10);return s>=16&&s<18&&(n.render=((e,t,r,a)=>n=>{const s=r(e,t,a)(\"App\",\"root\");ca().render(O().createElement(s,null),n)})(t,r,getComponent,a)),{rootInjects:n}};function downloadUrlPlugin(e){let{fn:t}=e;const r={download:e=>({errActions:r,specSelectors:a,specActions:n,getConfigs:s})=>{let{fetch:o}=t;const l=s();function next(t){if(t instanceof Error||t.status>=400)return n.updateLoadingStatus(\"failed\"),r.newThrownErr(Object.assign(new Error((t.message||t.statusText)+\" \"+e),{source:\"fetch\"})),void(!t.status&&t instanceof Error&&function checkPossibleFailReasons(){try{let t;if(\"URL\"in K?t=new URL(e):(t=document.createElement(\"a\"),t.href=e),\"https:\"!==t.protocol&&\"https:\"===K.location.protocol){const e=Object.assign(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${t.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:\"fetch\"});return void r.newThrownErr(e)}if(t.origin!==K.location.origin){const e=Object.assign(new Error(`Possible cross-origin (CORS) issue? The URL origin (${t.origin}) does not match the page (${K.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:\"fetch\"});r.newThrownErr(e)}}catch(e){return}}());n.updateLoadingStatus(\"success\"),n.updateSpec(t.text),a.url()!==e&&n.updateUrl(e)}e=e||a.url(),n.updateLoadingStatus(\"loading\"),r.clear({source:\"fetch\"}),o({url:e,loadSpec:!0,requestInterceptor:l.requestInterceptor||(e=>e),responseInterceptor:l.responseInterceptor||(e=>e),credentials:\"same-origin\",headers:{Accept:\"application/json,*/*\"}}).then(next,next)},updateLoadingStatus:e=>{let t=[null,\"loading\",\"failed\",\"success\",\"failedConfig\"];return-1===t.indexOf(e)&&console.error(`Error: ${e} is not one of ${JSON.stringify(t)}`),{type:\"spec_update_loading_status\",payload:e}}};let a={loadingStatus:(0,_e.createSelector)((e=>e||(0,k.Map)()),(e=>e.get(\"loadingStatus\")||null))};return{statePlugins:{spec:{actions:r,reducers:{spec_update_loading_status:(e,t)=>\"string\"==typeof t.payload?e.set(\"loadingStatus\",t.payload):e},selectors:a}}}}const ua=require(\"react-syntax-highlighter/dist/esm/light\");var da=__webpack_require__.n(ua);const ha=require(\"react-syntax-highlighter/dist/esm/languages/hljs/javascript\");var ga=__webpack_require__.n(ha);const ya=require(\"react-syntax-highlighter/dist/esm/languages/hljs/json\");var fa=__webpack_require__.n(ya);const Sa=require(\"react-syntax-highlighter/dist/esm/languages/hljs/xml\");var Ea=__webpack_require__.n(Sa);const _a=require(\"react-syntax-highlighter/dist/esm/languages/hljs/bash\");var va=__webpack_require__.n(_a);const wa=require(\"react-syntax-highlighter/dist/esm/languages/hljs/yaml\");var ba=__webpack_require__.n(wa);const Ca=require(\"react-syntax-highlighter/dist/esm/languages/hljs/http\");var xa=__webpack_require__.n(Ca);const Oa=require(\"react-syntax-highlighter/dist/esm/languages/hljs/powershell\");var Na=__webpack_require__.n(Oa);const after_load=()=>{da().registerLanguage(\"json\",fa()),da().registerLanguage(\"js\",ga()),da().registerLanguage(\"xml\",Ea()),da().registerLanguage(\"yaml\",ba()),da().registerLanguage(\"http\",xa()),da().registerLanguage(\"bash\",va()),da().registerLanguage(\"powershell\",Na()),da().registerLanguage(\"javascript\",ga())},ka=require(\"react-syntax-highlighter/dist/esm/styles/hljs/agate\");var Aa=__webpack_require__.n(ka);const Ia=require(\"react-syntax-highlighter/dist/esm/styles/hljs/arta\");var ja=__webpack_require__.n(Ia);const qa=require(\"react-syntax-highlighter/dist/esm/styles/hljs/monokai\");var Pa=__webpack_require__.n(qa);const Ma=require(\"react-syntax-highlighter/dist/esm/styles/hljs/nord\");var Ta=__webpack_require__.n(Ma);const Ra=require(\"react-syntax-highlighter/dist/esm/styles/hljs/obsidian\");var Ja=__webpack_require__.n(Ra);const $a=require(\"react-syntax-highlighter/dist/esm/styles/hljs/tomorrow-night\");var Va=__webpack_require__.n($a);const La=require(\"react-syntax-highlighter/dist/esm/styles/hljs/idea\");var Da=__webpack_require__.n(La);const Ua={agate:Aa(),arta:ja(),monokai:Pa(),nord:Ta(),obsidian:Ja(),\"tomorrow-night\":Va(),idea:Da()},Ka=Aa(),components_SyntaxHighlighter=({language:e,className:t=\"\",getConfigs:r,syntaxHighlighting:a={},children:n=\"\"})=>{const s=r().syntaxHighlight.theme,{styles:o,defaultStyle:l}=a,c=o?.[s]??l;return O().createElement(da(),{language:e,className:t,style:c},n)},za=require(\"js-file-download\");var Ba=__webpack_require__.n(za);const components_HighlightCode=({fileName:e=\"response.txt\",className:t,downloadable:r,getComponent:a,canCopy:n,language:s,children:o})=>{const l=(0,x.useRef)(null),c=a(\"SyntaxHighlighter\",!0),handlePreventYScrollingBeyondElement=e=>{const{target:t,deltaY:r}=e,{scrollHeight:a,offsetHeight:n,scrollTop:s}=t;a>n&&(0===s&&r<0||n+s>=a&&r>0)&&e.preventDefault()};return(0,x.useEffect)((()=>{const e=Array.from(l.current.childNodes).filter((e=>!!e.nodeType&&e.classList.contains(\"microlight\")));return e.forEach((e=>e.addEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement,{passive:!1}))),()=>{e.forEach((e=>e.removeEventListener(\"mousewheel\",handlePreventYScrollingBeyondElement)))}}),[o,t,s]),O().createElement(\"div\",{className:\"highlight-code\",ref:l},n&&O().createElement(\"div\",{className:\"copy-to-clipboard\"},O().createElement(mt.CopyToClipboard,{text:o},O().createElement(\"button\",null))),r?O().createElement(\"button\",{className:\"download-contents\",onClick:()=>{Ba()(o,e)}},\"Download\"):null,O().createElement(c,{language:s,className:pt()(t,\"microlight\"),renderPlainText:({children:e,PlainTextViewer:r})=>O().createElement(r,{className:t},e)},o))},components_PlainTextViewer=({className:e=\"\",children:t})=>O().createElement(\"pre\",{className:pt()(\"microlight\",e)},t),wrap_components_SyntaxHighlighter=(e,t)=>({renderPlainText:r,children:a,...n})=>{const s=t.getConfigs().syntaxHighlight.activated,o=t.getComponent(\"PlainTextViewer\");return s||\"function\"!=typeof r?s?O().createElement(e,n,a):O().createElement(o,null,a):r({children:a,PlainTextViewer:o})},SyntaxHighlightingPlugin1=()=>({afterLoad:after_load,rootInjects:{syntaxHighlighting:{styles:Ua,defaultStyle:Ka}},components:{SyntaxHighlighter:components_SyntaxHighlighter,HighlightCode:components_HighlightCode,PlainTextViewer:components_PlainTextViewer}}),SyntaxHighlightingPlugin2=()=>({wrapComponents:{SyntaxHighlighter:wrap_components_SyntaxHighlighter}}),syntax_highlighting=()=>[SyntaxHighlightingPlugin1,SyntaxHighlightingPlugin2],versions_after_load=()=>{const{GIT_DIRTY:e,GIT_COMMIT:t,PACKAGE_VERSION:r,BUILD_TIME:a}={PACKAGE_VERSION:\"5.24.2\",GIT_COMMIT:\"gf714aff1\",GIT_DIRTY:!0,BUILD_TIME:\"Mon, 16 Jun 2025 12:49:08 GMT\"};K.versions=K.versions||{},K.versions.swaggerUI={version:r,gitRevision:t,gitDirty:e,buildTimestamp:a}},versions=()=>({afterLoad:versions_after_load}),Fa=require(\"lodash/zipObject\");var Wa=__webpack_require__.n(Fa);const Ha=console.error,withErrorBoundary=e=>t=>{const{getComponent:r,fn:a}=e(),n=r(\"ErrorBoundary\"),s=a.getDisplayName(t);class WithErrorBoundary extends x.Component{render(){return O().createElement(n,{targetName:s,getComponent:r,fn:a},O().createElement(t,Qe()({},this.props,this.context)))}}var o;return WithErrorBoundary.displayName=`WithErrorBoundary(${s})`,(o=t).prototype&&o.prototype.isReactComponent&&(WithErrorBoundary.prototype.mapStateToProps=t.prototype.mapStateToProps),WithErrorBoundary},fallback=({name:e})=>O().createElement(\"div\",{className:\"fallback\"},\"😱 \",O().createElement(\"i\",null,\"Could not render \",\"t\"===e?\"this component\":e,\", see the console.\"));class ErrorBoundary extends x.Component{static defaultProps={targetName:\"this component\",getComponent:()=>fallback,fn:{componentDidCatch:Ha},children:null};static getDerivedStateFromError(e){return{hasError:!0,error:e}}constructor(...e){super(...e),this.state={hasError:!1,error:null}}componentDidCatch(e,t){this.props.fn.componentDidCatch(e,t)}render(){const{getComponent:e,targetName:t,children:r}=this.props;if(this.state.hasError){const r=e(\"Fallback\");return O().createElement(r,{name:t})}return r}}const Xa=ErrorBoundary,safe_render=({componentList:e=[],fullOverride:t=!1}={})=>({getSystem:r})=>{const a=t?e:[\"App\",\"BaseLayout\",\"VersionPragmaFilter\",\"InfoContainer\",\"ServersContainer\",\"SchemesContainer\",\"AuthorizeBtnContainer\",\"FilterContainer\",\"Operations\",\"OperationContainer\",\"parameters\",\"responses\",\"OperationServers\",\"Models\",\"ModelWrapper\",...e],n=Wa()(a,Array(a.length).fill(((e,{fn:t})=>t.withErrorBoundary(e))));return{fn:{componentDidCatch:Ha,withErrorBoundary:withErrorBoundary(r)},components:{ErrorBoundary:Xa,Fallback:fallback},wrapComponents:n}};class App extends O().Component{getLayout(){const{getComponent:e,layoutSelectors:t}=this.props,r=t.current(),a=e(r,!0);return a||(()=>O().createElement(\"h1\",null,' No layout defined for \"',r,'\" '))}render(){const e=this.getLayout();return O().createElement(e,null)}}const Ga=App;class AuthorizationPopup extends O().Component{close=()=>{let{authActions:e}=this.props;e.showDefinitions(!1)};render(){let{authSelectors:e,authActions:t,getComponent:r,errSelectors:a,specSelectors:n,fn:{AST:s={}}}=this.props,o=e.shownDefinitions();const l=r(\"auths\"),c=r(\"CloseIcon\");return O().createElement(\"div\",{className:\"dialog-ux\"},O().createElement(\"div\",{className:\"backdrop-ux\"}),O().createElement(\"div\",{className:\"modal-ux\"},O().createElement(\"div\",{className:\"modal-dialog-ux\"},O().createElement(\"div\",{className:\"modal-ux-inner\"},O().createElement(\"div\",{className:\"modal-ux-header\"},O().createElement(\"h3\",null,\"Available authorizations\"),O().createElement(\"button\",{type:\"button\",className:\"close-modal\",onClick:this.close},O().createElement(c,null))),O().createElement(\"div\",{className:\"modal-ux-content\"},o.valueSeq().map(((o,c)=>O().createElement(l,{key:c,AST:s,definitions:o,getComponent:r,errSelectors:a,authSelectors:e,authActions:t,specSelectors:n}))))))))}}class AuthorizeBtn extends O().Component{render(){let{isAuthorized:e,showPopup:t,onClick:r,getComponent:a}=this.props;const n=a(\"authorizationPopup\",!0),s=a(\"LockAuthIcon\",!0),o=a(\"UnlockAuthIcon\",!0);return O().createElement(\"div\",{className:\"auth-wrapper\"},O().createElement(\"button\",{className:e?\"btn authorize locked\":\"btn authorize unlocked\",onClick:r},O().createElement(\"span\",null,\"Authorize\"),e?O().createElement(s,null):O().createElement(o,null)),t&&O().createElement(n,null))}}class AuthorizeBtnContainer extends O().Component{render(){const{authActions:e,authSelectors:t,specSelectors:r,getComponent:a}=this.props,n=r.securityDefinitions(),s=t.definitionsToAuthorize(),o=a(\"authorizeBtn\");return n?O().createElement(o,{onClick:()=>e.showDefinitions(s),isAuthorized:!!t.authorized().size,showPopup:!!t.shownDefinitions(),getComponent:a}):null}}class AuthorizeOperationBtn extends O().Component{onClick=e=>{e.stopPropagation();let{onClick:t}=this.props;t&&t()};render(){let{isAuthorized:e,getComponent:t}=this.props;const r=t(\"LockAuthOperationIcon\",!0),a=t(\"UnlockAuthOperationIcon\",!0);return O().createElement(\"button\",{className:\"authorization__btn\",\"aria-label\":e?\"authorization button locked\":\"authorization button unlocked\",onClick:this.onClick},e?O().createElement(r,{className:\"locked\"}):O().createElement(a,{className:\"unlocked\"}))}}class Auths extends O().Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,a=r.map(((e,t)=>t)).toArray();this.setState(a.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(a)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:a}=this.props;const n=t(\"AuthItem\"),s=t(\"oauth2\",!0),o=t(\"Button\");let l=r.authorized(),c=e.filter(((e,t)=>!!l.get(t))),i=e.filter((e=>\"oauth2\"!==e.get(\"type\"))),p=e.filter((e=>\"oauth2\"===e.get(\"type\")));return O().createElement(\"div\",{className:\"auth-container\"},!!i.size&&O().createElement(\"form\",{onSubmit:this.submitAuth},i.map(((e,s)=>O().createElement(n,{key:s,schema:e,name:s,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:a,authSelectors:r}))).toArray(),O().createElement(\"div\",{className:\"auth-btn-wrapper\"},i.size===c.size?O().createElement(o,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):O().createElement(o,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),O().createElement(o,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),p&&p.size?O().createElement(\"div\",null,O().createElement(\"div\",{className:\"scope-def\"},O().createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),O().createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>O().createElement(\"div\",{key:t},O().createElement(s,{authorized:l,schema:e,name:t})))).toArray()):null)}}class auth_item_Auths extends O().Component{render(){let{schema:e,name:t,getComponent:r,onAuthChange:a,authorized:n,errSelectors:s,authSelectors:o}=this.props;const l=r(\"apiKeyAuth\"),c=r(\"basicAuth\");let i;const p=e.get(\"type\");switch(p){case\"apiKey\":i=O().createElement(l,{key:t,schema:e,name:t,errSelectors:s,authorized:n,getComponent:r,onChange:a,authSelectors:o});break;case\"basic\":i=O().createElement(c,{key:t,schema:e,name:t,errSelectors:s,authorized:n,getComponent:r,onChange:a,authSelectors:o});break;default:i=O().createElement(\"div\",{key:t},\"Unknown security definition type \",p)}return O().createElement(\"div\",{key:`${t}-jump`},i)}}class AuthError extends O().Component{render(){let{error:e}=this.props,t=e.get(\"level\"),r=e.get(\"message\"),a=e.get(\"source\");return O().createElement(\"div\",{className:\"errors\"},O().createElement(\"b\",null,a,\" \",t),O().createElement(\"span\",null,r))}}class ApiKeyAuth extends O().Component{constructor(e,t){super(e,t);let{name:r,schema:a}=this.props,n=this.getValue();this.state={name:r,schema:a,value:n}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,r=e.target.value,a=Object.assign({},this.state,{value:r});this.setState(a),t(a)};render(){let{schema:e,getComponent:t,errSelectors:r,name:a,authSelectors:n}=this.props;const s=t(\"Input\"),o=t(\"Row\"),l=t(\"Col\"),c=t(\"authError\"),i=t(\"Markdown\",!0),p=t(\"JumpToPath\",!0),m=n.selectAuthPath(a);let u=this.getValue(),d=r.allErrors().filter((e=>e.get(\"authId\")===a));return O().createElement(\"div\",null,O().createElement(\"h4\",null,O().createElement(\"code\",null,a||e.get(\"name\")),\" (apiKey)\",O().createElement(p,{path:m})),u&&O().createElement(\"h6\",null,\"Authorized\"),O().createElement(o,null,O().createElement(i,{source:e.get(\"description\")})),O().createElement(o,null,O().createElement(\"p\",null,\"Name: \",O().createElement(\"code\",null,e.get(\"name\")))),O().createElement(o,null,O().createElement(\"p\",null,\"In: \",O().createElement(\"code\",null,e.get(\"in\")))),O().createElement(o,null,O().createElement(\"label\",{htmlFor:\"api_key_value\"},\"Value:\"),u?O().createElement(\"code\",null,\" ****** \"):O().createElement(l,null,O().createElement(s,{id:\"api_key_value\",type:\"text\",onChange:this.onChange,autoFocus:!0}))),d.valueSeq().map(((e,t)=>O().createElement(c,{error:e,key:t}))))}}class BasicAuth extends O().Component{constructor(e,t){super(e,t);let{schema:r,name:a}=this.props,n=this.getValue().username;this.state={name:a,schema:r,value:n?{username:n}:{}}}getValue(){let{authorized:e,name:t}=this.props;return e&&e.getIn([t,\"value\"])||{}}onChange=e=>{let{onChange:t}=this.props,{value:r,name:a}=e.target,n=this.state.value;n[a]=r,this.setState({value:n}),t(this.state)};render(){let{schema:e,getComponent:t,name:r,errSelectors:a,authSelectors:n}=this.props;const s=t(\"Input\"),o=t(\"Row\"),l=t(\"Col\"),c=t(\"authError\"),i=t(\"JumpToPath\",!0),p=t(\"Markdown\",!0),m=n.selectAuthPath(r);let u=this.getValue().username,d=a.allErrors().filter((e=>e.get(\"authId\")===r));return O().createElement(\"div\",null,O().createElement(\"h4\",null,\"Basic authorization\",O().createElement(i,{path:m})),u&&O().createElement(\"h6\",null,\"Authorized\"),O().createElement(o,null,O().createElement(p,{source:e.get(\"description\")})),O().createElement(o,null,O().createElement(\"label\",{htmlFor:\"auth_username\"},\"Username:\"),u?O().createElement(\"code\",null,\" \",u,\" \"):O().createElement(l,null,O().createElement(s,{id:\"auth_username\",type:\"text\",required:\"required\",name:\"username\",onChange:this.onChange,autoFocus:!0}))),O().createElement(o,null,O().createElement(\"label\",{htmlFor:\"auth_password\"},\"Password:\"),u?O().createElement(\"code\",null,\" ****** \"):O().createElement(l,null,O().createElement(s,{id:\"auth_password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",onChange:this.onChange}))),d.valueSeq().map(((e,t)=>O().createElement(c,{error:e,key:t}))))}}function Example(e){const{example:t,showValue:r,getComponent:a}=e,n=a(\"Markdown\",!0),s=a(\"HighlightCode\",!0);return t&&k.Map.isMap(t)?O().createElement(\"div\",{className:\"example\"},t.get(\"description\")?O().createElement(\"section\",{className:\"example__section\"},O().createElement(\"div\",{className:\"example__section-header\"},\"Example Description\"),O().createElement(\"p\",null,O().createElement(n,{source:t.get(\"description\")}))):null,r&&t.has(\"value\")?O().createElement(\"section\",{className:\"example__section\"},O().createElement(\"div\",{className:\"example__section-header\"},\"Example Value\"),O().createElement(s,null,stringify(t.get(\"value\")))):null):null}class ExamplesSelect extends O().PureComponent{static defaultProps={examples:(0,k.Map)({}),onSelect:(...e)=>console.log(\"DEBUG: ExamplesSelect was not given an onSelect callback\",...e),currentExampleKey:null,showLabels:!0};_onSelect=(e,{isSyntheticChange:t=!1}={})=>{\"function\"==typeof this.props.onSelect&&this.props.onSelect(e,{isSyntheticChange:t})};_onDomSelect=e=>{if(\"function\"==typeof this.props.onSelect){const t=e.target.selectedOptions[0].getAttribute(\"value\");this._onSelect(t,{isSyntheticChange:!1})}};getCurrentExample=()=>{const{examples:e,currentExampleKey:t}=this.props,r=e.get(t),a=e.keySeq().first(),n=e.get(a);return r||n||(0,k.Map)({})};componentDidMount(){const{onSelect:e,examples:t}=this.props;if(\"function\"==typeof e){const e=t.first(),r=t.keyOf(e);this._onSelect(r,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(e){const{currentExampleKey:t,examples:r}=e;if(r!==this.props.examples&&!r.has(t)){const e=r.first(),t=r.keyOf(e);this._onSelect(t,{isSyntheticChange:!0})}}render(){const{examples:e,currentExampleKey:t,isValueModified:r,isModifiedValueAvailable:a,showLabels:n}=this.props;return O().createElement(\"div\",{className:\"examples-select\"},n?O().createElement(\"span\",{className:\"examples-select__section-label\"},\"Examples: \"):null,O().createElement(\"select\",{className:\"examples-select-element\",onChange:this._onDomSelect,value:a&&r?\"__MODIFIED__VALUE__\":t||\"\"},a?O().createElement(\"option\",{value:\"__MODIFIED__VALUE__\"},\"[Modified value]\"):null,e.map(((e,t)=>O().createElement(\"option\",{key:t,value:t},k.Map.isMap(e)&&e.get(\"summary\")||t))).valueSeq()))}}const stringifyUnlessList=e=>k.List.isList(e)?e:stringify(e);class ExamplesSelectValueRetainer extends O().PureComponent{static defaultProps={userHasEditedBody:!1,examples:(0,k.Map)({}),currentNamespace:\"__DEFAULT__NAMESPACE__\",setRetainRequestBodyValueFlag:()=>{},onSelect:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `onSelect` function was provided\",...e),updateValue:(...e)=>console.log(\"ExamplesSelectValueRetainer: no `updateValue` function was provided\",...e)};constructor(e){super(e);const t=this._getCurrentExampleValue();this.state={[e.currentNamespace]:(0,k.Map)({lastUserEditedValue:this.props.currentUserInputValue,lastDownstreamValue:t,isModifiedValueSelected:this.props.userHasEditedBody||this.props.currentUserInputValue!==t})}}componentWillUnmount(){this.props.setRetainRequestBodyValueFlag(!1)}_getStateForCurrentNamespace=()=>{const{currentNamespace:e}=this.props;return(this.state[e]||(0,k.Map)()).toObject()};_setStateForCurrentNamespace=e=>{const{currentNamespace:t}=this.props;return this._setStateForNamespace(t,e)};_setStateForNamespace=(e,t)=>{const r=(this.state[e]||(0,k.Map)()).mergeDeep(t);return this.setState({[e]:r})};_isCurrentUserInputSameAsExampleValue=()=>{const{currentUserInputValue:e}=this.props;return this._getCurrentExampleValue()===e};_getValueForExample=(e,t)=>{const{examples:r}=t||this.props;return stringifyUnlessList((r||(0,k.Map)({})).getIn([e,\"value\"]))};_getCurrentExampleValue=e=>{const{currentKey:t}=e||this.props;return this._getValueForExample(t,e||this.props)};_onExamplesSelect=(e,{isSyntheticChange:t}={},...r)=>{const{onSelect:a,updateValue:n,currentUserInputValue:s,userHasEditedBody:o}=this.props,{lastUserEditedValue:l}=this._getStateForCurrentNamespace(),c=this._getValueForExample(e);if(\"__MODIFIED__VALUE__\"===e)return n(stringifyUnlessList(l)),this._setStateForCurrentNamespace({isModifiedValueSelected:!0});\"function\"==typeof a&&a(e,{isSyntheticChange:t},...r),this._setStateForCurrentNamespace({lastDownstreamValue:c,isModifiedValueSelected:t&&o||!!s&&s!==c}),t||\"function\"==typeof n&&n(stringifyUnlessList(c))};UNSAFE_componentWillReceiveProps(e){const{currentUserInputValue:t,examples:r,onSelect:a,userHasEditedBody:n}=e,{lastUserEditedValue:s,lastDownstreamValue:o}=this._getStateForCurrentNamespace(),l=this._getValueForExample(e.currentKey,e),c=r.filter((e=>k.Map.isMap(e)&&(e.get(\"value\")===t||stringify(e.get(\"value\"))===t)));if(c.size){let t;t=c.has(e.currentKey)?e.currentKey:c.keySeq().first(),a(t,{isSyntheticChange:!0})}else t!==this.props.currentUserInputValue&&t!==s&&t!==o&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(e.currentNamespace,{lastUserEditedValue:e.currentUserInputValue,isModifiedValueSelected:n||t!==l}))}render(){const{currentUserInputValue:e,examples:t,currentKey:r,getComponent:a,userHasEditedBody:n}=this.props,{lastDownstreamValue:s,lastUserEditedValue:o,isModifiedValueSelected:l}=this._getStateForCurrentNamespace(),c=a(\"ExamplesSelect\");return O().createElement(c,{examples:t,currentExampleKey:r,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!o&&o!==s,isValueModified:void 0!==e&&l&&e!==this._getCurrentExampleValue()||n})}}function oauth2_authorize_authorize({auth:e,authActions:t,errActions:r,configs:a,authConfigs:n={},currentServer:s}){let{schema:o,scopes:l,name:c,clientId:i}=e,p=o.get(\"flow\"),m=[];switch(p){case\"password\":return void t.authorizePassword(e);case\"application\":case\"clientCredentials\":case\"client_credentials\":return void t.authorizeApplication(e);case\"accessCode\":case\"authorizationCode\":case\"authorization_code\":m.push(\"response_type=code\");break;case\"implicit\":m.push(\"response_type=token\")}\"string\"==typeof i&&m.push(\"client_id=\"+encodeURIComponent(i));let u=a.oauth2RedirectUrl;if(void 0===u)return void r.newAuthErr({authId:c,source:\"validation\",level:\"error\",message:\"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed.\"});m.push(\"redirect_uri=\"+encodeURIComponent(u));let d=[];if(Array.isArray(l)?d=l:A().List.isList(l)&&(d=l.toArray()),d.length>0){let e=n.scopeSeparator||\" \";m.push(\"scope=\"+encodeURIComponent(d.join(e)))}let h=btoa(new Date);if(m.push(\"state=\"+encodeURIComponent(h)),void 0!==n.realm&&m.push(\"realm=\"+encodeURIComponent(n.realm)),(\"authorizationCode\"===p||\"authorization_code\"===p||\"accessCode\"===p)&&n.usePkceWithAuthorizationCodeGrant){const t=function generateCodeVerifier(){return b64toB64UrlEncoded(ae()(32).toString(\"base64\"))}(),r=function createCodeChallenge(e){return b64toB64UrlEncoded(se()(\"sha256\").update(e).digest(\"base64\"))}(t);m.push(\"code_challenge=\"+r),m.push(\"code_challenge_method=S256\"),e.codeVerifier=t}let{additionalQueryStringParams:g}=n;for(let e in g)void 0!==g[e]&&m.push([e,g[e]].map(encodeURIComponent).join(\"=\"));const y=o.get(\"authorizationUrl\");let f;f=s?ue()(sanitizeUrl(y),s,!0).toString():sanitizeUrl(y);let S,E=[f,m.join(\"&\")].join(\"string\"!=typeof y||y.includes(\"?\")?\"&\":\"?\");S=\"implicit\"===p?t.preAuthorizeImplicit:n.useBasicAuthenticationWithAccessCodeGrant?t.authorizeAccessCodeWithBasicAuthentication:t.authorizeAccessCodeWithFormParams,t.authPopup(E,{auth:e,state:h,redirectUrl:u,callback:S,errCb:r.newAuthErr})}class Oauth2 extends O().Component{constructor(e,t){super(e,t);let{name:r,schema:a,authorized:n,authSelectors:s}=this.props,o=n&&n.get(r),l=s.getConfigs()||{},c=o&&o.get(\"username\")||\"\",i=o&&o.get(\"clientId\")||l.clientId||\"\",p=o&&o.get(\"clientSecret\")||l.clientSecret||\"\",m=o&&o.get(\"passwordType\")||\"basic\",u=o&&o.get(\"scopes\")||l.scopes||[];\"string\"==typeof u&&(u=u.split(l.scopeSeparator||\" \")),this.state={appName:l.appName,name:r,schema:a,scopes:u,clientId:i,clientSecret:p,username:c,password:\"\",passwordType:m}}close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};authorize=()=>{let{authActions:e,errActions:t,getConfigs:r,authSelectors:a,oas3Selectors:n}=this.props,s=r(),o=a.getConfigs();t.clear({authId:name,type:\"auth\",source:\"auth\"}),oauth2_authorize_authorize({auth:this.state,currentServer:n.serverEffectiveValue(n.selectedServer()),authActions:e,errActions:t,configs:s,authConfigs:o})};onScopeChange=e=>{let{target:t}=e,{checked:r}=t,a=t.dataset.value;if(r&&-1===this.state.scopes.indexOf(a)){let e=this.state.scopes.concat([a]);this.setState({scopes:e})}else!r&&this.state.scopes.indexOf(a)>-1&&this.setState({scopes:this.state.scopes.filter((e=>e!==a))})};onInputChange=e=>{let{target:{dataset:{name:t},value:r}}=e,a={[t]:r};this.setState(a)};selectScopes=e=>{e.target.dataset.all?this.setState({scopes:Array.from((this.props.schema.get(\"allowedScopes\")||this.props.schema.get(\"scopes\")).keys())}):this.setState({scopes:[]})};logout=e=>{e.preventDefault();let{authActions:t,errActions:r,name:a}=this.props;r.clear({authId:a,type:\"auth\",source:\"auth\"}),t.logoutWithPersistOption([a])};render(){let{schema:e,getComponent:t,authSelectors:r,errSelectors:a,name:n,specSelectors:s}=this.props;const o=t(\"Input\"),l=t(\"Row\"),c=t(\"Col\"),i=t(\"Button\"),p=t(\"authError\"),m=t(\"JumpToPath\",!0),u=t(\"Markdown\",!0),d=t(\"InitializedInput\"),{isOAS3:h}=s;let g=h()?e.get(\"openIdConnectUrl\"):null;const y=\"implicit\",f=\"password\",S=h()?g?\"authorization_code\":\"authorizationCode\":\"accessCode\",E=h()?g?\"client_credentials\":\"clientCredentials\":\"application\",_=r.selectAuthPath(n);let v=!!(r.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,w=e.get(\"flow\"),b=w===S&&v?w+\" with PKCE\":w,C=e.get(\"allowedScopes\")||e.get(\"scopes\"),x=!!r.authorized().get(n),N=a.allErrors().filter((e=>e.get(\"authId\")===n)),k=!N.filter((e=>\"validation\"===e.get(\"source\"))).size,A=e.get(\"description\");return O().createElement(\"div\",null,O().createElement(\"h4\",null,n,\" (OAuth2, \",b,\") \",O().createElement(m,{path:_})),this.state.appName?O().createElement(\"h5\",null,\"Application: \",this.state.appName,\" \"):null,A&&O().createElement(u,{source:e.get(\"description\")}),x&&O().createElement(\"h6\",null,\"Authorized\"),g&&O().createElement(\"p\",null,\"OpenID Connect URL: \",O().createElement(\"code\",null,g)),(w===y||w===S)&&O().createElement(\"p\",null,\"Authorization URL: \",O().createElement(\"code\",null,e.get(\"authorizationUrl\"))),(w===f||w===S||w===E)&&O().createElement(\"p\",null,\"Token URL:\",O().createElement(\"code\",null,\" \",e.get(\"tokenUrl\"))),O().createElement(\"p\",{className:\"flow\"},\"Flow: \",O().createElement(\"code\",null,b)),w!==f?null:O().createElement(l,null,O().createElement(l,null,O().createElement(\"label\",{htmlFor:\"oauth_username\"},\"username:\"),x?O().createElement(\"code\",null,\" \",this.state.username,\" \"):O().createElement(c,{tablet:10,desktop:10},O().createElement(\"input\",{id:\"oauth_username\",type:\"text\",\"data-name\":\"username\",onChange:this.onInputChange,autoFocus:!0}))),O().createElement(l,null,O().createElement(\"label\",{htmlFor:\"oauth_password\"},\"password:\"),x?O().createElement(\"code\",null,\" ****** \"):O().createElement(c,{tablet:10,desktop:10},O().createElement(\"input\",{id:\"oauth_password\",type:\"password\",\"data-name\":\"password\",onChange:this.onInputChange}))),O().createElement(l,null,O().createElement(\"label\",{htmlFor:\"password_type\"},\"Client credentials location:\"),x?O().createElement(\"code\",null,\" \",this.state.passwordType,\" \"):O().createElement(c,{tablet:10,desktop:10},O().createElement(\"select\",{id:\"password_type\",\"data-name\":\"passwordType\",onChange:this.onInputChange},O().createElement(\"option\",{value:\"basic\"},\"Authorization header\"),O().createElement(\"option\",{value:\"request-body\"},\"Request body\"))))),(w===E||w===y||w===S||w===f)&&(!x||x&&this.state.clientId)&&O().createElement(l,null,O().createElement(\"label\",{htmlFor:`client_id_${w}`},\"client_id:\"),x?O().createElement(\"code\",null,\" ****** \"):O().createElement(c,{tablet:10,desktop:10},O().createElement(d,{id:`client_id_${w}`,type:\"text\",required:w===f,initialValue:this.state.clientId,\"data-name\":\"clientId\",onChange:this.onInputChange}))),(w===E||w===S||w===f)&&O().createElement(l,null,O().createElement(\"label\",{htmlFor:`client_secret_${w}`},\"client_secret:\"),x?O().createElement(\"code\",null,\" ****** \"):O().createElement(c,{tablet:10,desktop:10},O().createElement(d,{id:`client_secret_${w}`,initialValue:this.state.clientSecret,type:\"password\",\"data-name\":\"clientSecret\",onChange:this.onInputChange}))),!x&&C&&C.size?O().createElement(\"div\",{className:\"scopes\"},O().createElement(\"h2\",null,\"Scopes:\",O().createElement(\"a\",{onClick:this.selectScopes,\"data-all\":!0},\"select all\"),O().createElement(\"a\",{onClick:this.selectScopes},\"select none\")),C.map(((e,t)=>O().createElement(l,{key:t},O().createElement(\"div\",{className:\"checkbox\"},O().createElement(o,{\"data-value\":t,id:`${t}-${w}-checkbox-${this.state.name}`,disabled:x,checked:this.state.scopes.includes(t),type:\"checkbox\",onChange:this.onScopeChange}),O().createElement(\"label\",{htmlFor:`${t}-${w}-checkbox-${this.state.name}`},O().createElement(\"span\",{className:\"item\"}),O().createElement(\"div\",{className:\"text\"},O().createElement(\"p\",{className:\"name\"},t),O().createElement(\"p\",{className:\"description\"},e))))))).toArray()):null,N.valueSeq().map(((e,t)=>O().createElement(p,{error:e,key:t}))),O().createElement(\"div\",{className:\"auth-btn-wrapper\"},k&&(x?O().createElement(i,{className:\"btn modal-btn auth authorize\",onClick:this.logout,\"aria-label\":\"Remove authorization\"},\"Logout\"):O().createElement(i,{className:\"btn modal-btn auth authorize\",onClick:this.authorize,\"aria-label\":\"Apply given OAuth2 credentials\"},\"Authorize\")),O().createElement(i,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\")))}}class Clear extends x.Component{onClick=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearResponse(t,r),e.clearRequest(t,r)};render(){return O().createElement(\"button\",{className:\"btn btn-clear opblock-control__btn\",onClick:this.onClick},\"Clear\")}}const Headers=({headers:e})=>O().createElement(\"div\",null,O().createElement(\"h5\",null,\"Response headers\"),O().createElement(\"pre\",{className:\"microlight\"},e)),Duration=({duration:e})=>O().createElement(\"div\",null,O().createElement(\"h5\",null,\"Request duration\"),O().createElement(\"pre\",{className:\"microlight\"},e,\" ms\"));class LiveResponse extends O().Component{shouldComponentUpdate(e){return this.props.response!==e.response||this.props.path!==e.path||this.props.method!==e.method||this.props.displayRequestDuration!==e.displayRequestDuration}render(){const{response:e,getComponent:t,getConfigs:r,displayRequestDuration:a,specSelectors:n,path:s,method:o}=this.props,{showMutatedRequest:l,requestSnippetsEnabled:c}=r(),i=l?n.mutatedRequestFor(s,o):n.requestFor(s,o),p=e.get(\"status\"),m=i.get(\"url\"),u=e.get(\"headers\").toJS(),d=e.get(\"notDocumented\"),h=e.get(\"error\"),g=e.get(\"text\"),y=e.get(\"duration\"),f=Object.keys(u),S=u[\"content-type\"]||u[\"Content-Type\"],E=t(\"responseBody\"),_=f.map((e=>{var t=Array.isArray(u[e])?u[e].join():u[e];return O().createElement(\"span\",{className:\"headerline\",key:e},\" \",e,\": \",t,\" \")})),v=0!==_.length,w=t(\"Markdown\",!0),b=t(\"RequestSnippets\",!0),C=t(\"curl\",!0);return O().createElement(\"div\",null,i&&c?O().createElement(b,{request:i}):O().createElement(C,{request:i}),m&&O().createElement(\"div\",null,O().createElement(\"div\",{className:\"request-url\"},O().createElement(\"h4\",null,\"Request URL\"),O().createElement(\"pre\",{className:\"microlight\"},m))),O().createElement(\"h4\",null,\"Server response\"),O().createElement(\"table\",{className:\"responses-table live-responses-table\"},O().createElement(\"thead\",null,O().createElement(\"tr\",{className:\"responses-header\"},O().createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),O().createElement(\"td\",{className:\"col_header response-col_description\"},\"Details\"))),O().createElement(\"tbody\",null,O().createElement(\"tr\",{className:\"response\"},O().createElement(\"td\",{className:\"response-col_status\"},p,d?O().createElement(\"div\",{className:\"response-undocumented\"},O().createElement(\"i\",null,\" Undocumented \")):null),O().createElement(\"td\",{className:\"response-col_description\"},h?O().createElement(w,{source:`${\"\"!==e.get(\"name\")?`${e.get(\"name\")}: `:\"\"}${e.get(\"message\")}`}):null,g?O().createElement(E,{content:g,contentType:S,url:m,headers:u,getConfigs:r,getComponent:t}):null,v?O().createElement(Headers,{headers:_}):null,a&&y?O().createElement(Duration,{duration:y}):null)))))}}class OnlineValidatorBadge extends O().Component{constructor(e,t){super(e,t);let{getConfigs:r}=e,{validatorUrl:a}=r();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===a?\"https://validator.swagger.io/validator\":a}}getDefinitionUrl=()=>{let{specSelectors:e}=this.props;return new(ue())(e.url(),K.location).toString()};UNSAFE_componentWillReceiveProps(e){let{getConfigs:t}=e,{validatorUrl:r}=t();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===r?\"https://validator.swagger.io/validator\":r})}render(){let{getConfigs:e}=this.props,{spec:t}=e(),r=sanitizeUrl(this.state.validatorUrl);return\"object\"==typeof t&&Object.keys(t).length?null:this.state.url&&requiresValidationURL(this.state.validatorUrl)&&requiresValidationURL(this.state.url)?O().createElement(\"span\",{className:\"float-right\"},O().createElement(\"a\",{target:\"_blank\",rel:\"noopener noreferrer\",href:`${r}/debug?url=${encodeURIComponent(this.state.url)}`},O().createElement(ValidatorImage,{src:`${r}?url=${encodeURIComponent(this.state.url)}`,alt:\"Online validator badge\"}))):null}}class ValidatorImage extends O().Component{constructor(e){super(e),this.state={loaded:!1,error:!1}}componentDidMount(){const e=new Image;e.onload=()=>{this.setState({loaded:!0})},e.onerror=()=>{this.setState({error:!0})},e.src=this.props.src}UNSAFE_componentWillReceiveProps(e){if(e.src!==this.props.src){const t=new Image;t.onload=()=>{this.setState({loaded:!0})},t.onerror=()=>{this.setState({error:!0})},t.src=e.src}}render(){return this.state.error?O().createElement(\"img\",{alt:\"Error\"}):this.state.loaded?O().createElement(\"img\",{src:this.props.src,alt:this.props.alt}):null}}class Operations extends O().Component{render(){let{specSelectors:e}=this.props;const t=e.taggedOperations();return 0===t.size?O().createElement(\"h3\",null,\" No operations defined in spec!\"):O().createElement(\"div\",null,t.map(this.renderOperationTag).toArray(),t.size<1?O().createElement(\"h3\",null,\" No operations defined in spec! \"):null)}renderOperationTag=(e,t)=>{const{specSelectors:r,getComponent:a,oas3Selectors:n,layoutSelectors:s,layoutActions:o,getConfigs:l}=this.props,c=r.validOperationMethods(),i=a(\"OperationContainer\",!0),p=a(\"OperationTag\"),m=e.get(\"operations\");return O().createElement(p,{key:\"operation-\"+t,tagObj:e,tag:t,oas3Selectors:n,layoutSelectors:s,layoutActions:o,getConfigs:l,getComponent:a,specUrl:r.url()},O().createElement(\"div\",{className:\"operation-tag-content\"},m.map((e=>{const r=e.get(\"path\"),a=e.get(\"method\"),n=A().List([\"paths\",r,a]);return-1===c.indexOf(a)?null:O().createElement(i,{key:`${r}-${a}`,specPath:n,op:e,path:r,method:a,tag:t})})).toArray()))}}class OperationTag extends O().Component{static defaultProps={tagObj:A().fromJS({}),tag:\"\"};render(){const{tagObj:e,tag:t,children:r,oas3Selectors:a,layoutSelectors:n,layoutActions:s,getConfigs:o,getComponent:l,specUrl:c}=this.props;let{docExpansion:i,deepLinking:p}=o();const m=l(\"Collapse\"),u=l(\"Markdown\",!0),d=l(\"DeepLink\"),h=l(\"Link\"),g=l(\"ArrowUpIcon\"),y=l(\"ArrowDownIcon\");let f,S=e.getIn([\"tagDetails\",\"description\"],null),E=e.getIn([\"tagDetails\",\"externalDocs\",\"description\"]),_=e.getIn([\"tagDetails\",\"externalDocs\",\"url\"]);f=isFunc(a)&&isFunc(a.selectedServer)?safeBuildUrl(_,c,{selectedServer:a.selectedServer()}):_;let v=[\"operations-tag\",t],w=n.isShown(v,\"full\"===i||\"list\"===i);return O().createElement(\"div\",{className:w?\"opblock-tag-section is-open\":\"opblock-tag-section\"},O().createElement(\"h3\",{onClick:()=>s.show(v,!w),className:S?\"opblock-tag\":\"opblock-tag no-desc\",id:v.map((e=>escapeDeepLinkPath(e))).join(\"-\"),\"data-tag\":t,\"data-is-open\":w},O().createElement(d,{enabled:p,isShown:w,path:createDeepLinkPath(t),text:t}),S?O().createElement(\"small\",null,O().createElement(u,{source:S})):O().createElement(\"small\",null),f?O().createElement(\"div\",{className:\"info__externaldocs\"},O().createElement(\"small\",null,O().createElement(h,{href:sanitizeUrl(f),onClick:e=>e.stopPropagation(),target:\"_blank\"},E||f))):null,O().createElement(\"button\",{\"aria-expanded\":w,className:\"expand-operation\",title:w?\"Collapse operation\":\"Expand operation\",onClick:()=>s.show(v,!w)},w?O().createElement(g,{className:\"arrow\"}):O().createElement(y,{className:\"arrow\"}))),O().createElement(m,{isOpened:w},r))}}class Operation extends x.PureComponent{static defaultProps={operation:null,response:null,request:null,specPath:(0,k.List)(),summary:\"\"};render(){let{specPath:e,response:t,request:r,toggleShown:a,onTryoutClick:n,onResetClick:s,onCancelClick:o,onExecute:l,fn:c,getComponent:i,getConfigs:p,specActions:m,specSelectors:u,authActions:d,authSelectors:h,oas3Actions:g,oas3Selectors:y}=this.props,f=this.props.operation,{deprecated:S,isShown:E,path:_,method:v,op:w,tag:b,operationId:C,allowTryItOut:x,displayRequestDuration:N,tryItOutEnabled:k,executeInProgress:I}=f.toJS(),{description:j,externalDocs:q,schemes:P}=w;const M=q?safeBuildUrl(q.url,u.url(),{selectedServer:y.selectedServer()}):\"\";let T=f.getIn([\"op\"]),R=T.get(\"responses\"),J=function getList(e,t){if(!A().Iterable.isIterable(e))return A().List();let r=e.getIn(Array.isArray(t)?t:[t]);return A().List.isList(r)?r:A().List()}(T,[\"parameters\"]),$=u.operationScheme(_,v),V=[\"operations\",b,C],L=getExtensions(T);const D=i(\"responses\"),U=i(\"parameters\"),K=i(\"execute\"),z=i(\"clear\"),B=i(\"Collapse\"),F=i(\"Markdown\",!0),W=i(\"schemes\"),H=i(\"OperationServers\"),X=i(\"OperationExt\"),G=i(\"OperationSummary\"),Y=i(\"Link\"),{showExtensions:Q}=p();if(R&&t&&t.size>0){let e=!R.get(String(t.get(\"status\")))&&!R.get(\"default\");t=t.set(\"notDocumented\",e)}let Z=[_,v];const ee=u.validationErrors([_,v]);return O().createElement(\"div\",{className:S?\"opblock opblock-deprecated\":E?`opblock opblock-${v} is-open`:`opblock opblock-${v}`,id:escapeDeepLinkPath(V.join(\"-\"))},O().createElement(G,{operationProps:f,isShown:E,toggleShown:a,getComponent:i,authActions:d,authSelectors:h,specPath:e}),O().createElement(B,{isOpened:E},O().createElement(\"div\",{className:\"opblock-body\"},T&&T.size||null===T?null:O().createElement(rolling_load,{height:\"32px\",width:\"32px\",className:\"opblock-loading-animation\"}),S&&O().createElement(\"h4\",{className:\"opblock-title_normal\"},\" Warning: Deprecated\"),j&&O().createElement(\"div\",{className:\"opblock-description-wrapper\"},O().createElement(\"div\",{className:\"opblock-description\"},O().createElement(F,{source:j}))),M?O().createElement(\"div\",{className:\"opblock-external-docs-wrapper\"},O().createElement(\"h4\",{className:\"opblock-title_normal\"},\"Find more details\"),O().createElement(\"div\",{className:\"opblock-external-docs\"},q.description&&O().createElement(\"span\",{className:\"opblock-external-docs__description\"},O().createElement(F,{source:q.description})),O().createElement(Y,{target:\"_blank\",className:\"opblock-external-docs__link\",href:sanitizeUrl(M)},M))):null,T&&T.size?O().createElement(U,{parameters:J,specPath:e.push(\"parameters\"),operation:T,onChangeKey:Z,onTryoutClick:n,onResetClick:s,onCancelClick:o,tryItOutEnabled:k,allowTryItOut:x,fn:c,getComponent:i,specActions:m,specSelectors:u,pathMethod:[_,v],getConfigs:p,oas3Actions:g,oas3Selectors:y}):null,k?O().createElement(H,{getComponent:i,path:_,method:v,operationServers:T.get(\"servers\"),pathServers:u.paths().getIn([_,\"servers\"]),getSelectedServer:y.selectedServer,setSelectedServer:g.setSelectedServer,setServerVariableValue:g.setServerVariableValue,getServerVariable:y.serverVariableValue,getEffectiveServerValue:y.serverEffectiveValue}):null,k&&x&&P&&P.size?O().createElement(\"div\",{className:\"opblock-schemes\"},O().createElement(W,{schemes:P,path:_,method:v,specActions:m,currentScheme:$})):null,!k||!x||ee.length<=0?null:O().createElement(\"div\",{className:\"validation-errors errors-wrapper\"},\"Please correct the following validation errors and try again.\",O().createElement(\"ul\",null,ee.map(((e,t)=>O().createElement(\"li\",{key:t},\" \",e,\" \"))))),O().createElement(\"div\",{className:k&&t&&x?\"btn-group\":\"execute-wrapper\"},k&&x?O().createElement(K,{operation:T,specActions:m,specSelectors:u,oas3Selectors:y,oas3Actions:g,path:_,method:v,onExecute:l,disabled:I}):null,k&&t&&x?O().createElement(z,{specActions:m,path:_,method:v}):null),I?O().createElement(\"div\",{className:\"loading-container\"},O().createElement(\"div\",{className:\"loading\"})):null,R?O().createElement(D,{responses:R,request:r,tryItOutResponse:t,getComponent:i,getConfigs:p,specSelectors:u,oas3Actions:g,oas3Selectors:y,specActions:m,produces:u.producesOptionsFor([_,v]),producesValue:u.currentProducesFor([_,v]),specPath:e.push(\"responses\"),path:_,method:v,displayRequestDuration:N,fn:c}):null,Q&&L.size?O().createElement(X,{extensions:L,getComponent:i}):null)))}}class OperationContainer extends x.PureComponent{constructor(e,t){super(e,t);const{tryItOutEnabled:r}=e.getConfigs();this.state={tryItOutEnabled:r,executeInProgress:!1}}static defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1};mapStateToProps(e,t){const{op:r,layoutSelectors:a,getConfigs:n}=t,{docExpansion:s,deepLinking:o,displayOperationId:l,displayRequestDuration:c,supportedSubmitMethods:i}=n(),p=a.showSummary(),m=r.getIn([\"operation\",\"__originalOperationId\"])||r.getIn([\"operation\",\"operationId\"])||(0,oa.opId)(r.get(\"operation\"),t.path,t.method)||r.get(\"id\"),u=[\"operations\",t.tag,m],d=i.indexOf(t.method)>=0&&(void 0===t.allowTryItOut?t.specSelectors.allowTryItOutFor(t.path,t.method):t.allowTryItOut),h=r.getIn([\"operation\",\"security\"])||t.specSelectors.security();return{operationId:m,isDeepLinkingEnabled:o,showSummary:p,displayOperationId:l,displayRequestDuration:c,allowTryItOut:d,security:h,isAuthorized:t.authSelectors.isAuthorized(h),isShown:a.isShown(u,\"full\"===s),jumpToKey:`paths.${t.path}.${t.method}`,response:t.specSelectors.responseFor(t.path,t.method),request:t.specSelectors.requestFor(t.path,t.method)}}componentDidMount(){const{isShown:e}=this.props,t=this.getResolvedSubtree();e&&void 0===t&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(e){const{response:t,isShown:r}=e,a=this.getResolvedSubtree();t!==this.props.response&&this.setState({executeInProgress:!1}),r&&void 0===a&&this.requestResolvedSubtree()}toggleShown=()=>{let{layoutActions:e,tag:t,operationId:r,isShown:a}=this.props;const n=this.getResolvedSubtree();a||void 0!==n||this.requestResolvedSubtree(),e.show([\"operations\",t,r],!a)};onCancelClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onTryoutClick=()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})};onResetClick=e=>{const t=this.props.oas3Selectors.selectDefaultRequestBodyValue(...e);this.props.oas3Actions.setRequestBodyValue({value:t,pathMethod:e})};onExecute=()=>{this.setState({executeInProgress:!0})};getResolvedSubtree=()=>{const{specSelectors:e,path:t,method:r,specPath:a}=this.props;return a?e.specResolvedSubtree(a.toJS()):e.specResolvedSubtree([\"paths\",t,r])};requestResolvedSubtree=()=>{const{specActions:e,path:t,method:r,specPath:a}=this.props;return a?e.requestResolvedSubtree(a.toJS()):e.requestResolvedSubtree([\"paths\",t,r])};render(){let{op:e,tag:t,path:r,method:a,security:n,isAuthorized:s,operationId:o,showSummary:l,isShown:c,jumpToKey:i,allowTryItOut:p,response:m,request:u,displayOperationId:d,displayRequestDuration:h,isDeepLinkingEnabled:g,specPath:y,specSelectors:f,specActions:S,getComponent:E,getConfigs:_,layoutSelectors:v,layoutActions:w,authActions:b,authSelectors:C,oas3Actions:x,oas3Selectors:N,fn:A}=this.props;const I=E(\"operation\"),j=this.getResolvedSubtree()||(0,k.Map)(),q=(0,k.fromJS)({op:j,tag:t,path:r,summary:e.getIn([\"operation\",\"summary\"])||\"\",deprecated:j.get(\"deprecated\")||e.getIn([\"operation\",\"deprecated\"])||!1,method:a,security:n,isAuthorized:s,operationId:o,originalOperationId:j.getIn([\"operation\",\"__originalOperationId\"]),showSummary:l,isShown:c,jumpToKey:i,allowTryItOut:p,request:u,displayOperationId:d,displayRequestDuration:h,isDeepLinkingEnabled:g,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return O().createElement(I,{operation:q,response:m,request:u,isShown:c,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:y,specActions:S,specSelectors:f,oas3Actions:x,oas3Selectors:N,layoutActions:w,layoutSelectors:v,authActions:b,authSelectors:C,getComponent:E,getConfigs:_,fn:A})}}const Ya=require(\"lodash/toString\");var Qa=__webpack_require__.n(Ya);class OperationSummary extends x.PureComponent{static defaultProps={operationProps:null,specPath:(0,k.List)(),summary:\"\"};render(){let{isShown:e,toggleShown:t,getComponent:r,authActions:a,authSelectors:n,operationProps:s,specPath:o}=this.props,{summary:l,isAuthorized:c,method:i,op:p,showSummary:m,path:u,operationId:d,originalOperationId:h,displayOperationId:g}=s.toJS(),{summary:y}=p,f=s.get(\"security\");const S=r(\"authorizeOperationBtn\",!0),E=r(\"OperationSummaryMethod\"),_=r(\"OperationSummaryPath\"),v=r(\"JumpToPath\",!0),w=r(\"CopyToClipboardBtn\",!0),b=r(\"ArrowUpIcon\"),C=r(\"ArrowDownIcon\"),x=f&&!!f.count(),N=x&&1===f.size&&f.first().isEmpty(),k=!x||N;return O().createElement(\"div\",{className:`opblock-summary opblock-summary-${i}`},O().createElement(\"button\",{\"aria-expanded\":e,className:\"opblock-summary-control\",onClick:t},O().createElement(E,{method:i}),O().createElement(\"div\",{className:\"opblock-summary-path-description-wrapper\"},O().createElement(_,{getComponent:r,operationProps:s,specPath:o}),m?O().createElement(\"div\",{className:\"opblock-summary-description\"},Qa()(y||l)):null),g&&(h||d)?O().createElement(\"span\",{className:\"opblock-summary-operation-id\"},h||d):null),O().createElement(w,{textToCopy:`${o.get(1)}`}),k?null:O().createElement(S,{isAuthorized:c,onClick:()=>{const e=n.definitionsForRequirements(f);a.showDefinitions(e)}}),O().createElement(v,{path:o}),O().createElement(\"button\",{\"aria-label\":`${i} ${u.replace(/\\//g,\"​/\")}`,className:\"opblock-control-arrow\",\"aria-expanded\":e,tabIndex:\"-1\",onClick:t},e?O().createElement(b,{className:\"arrow\"}):O().createElement(C,{className:\"arrow\"})))}}class OperationSummaryMethod extends x.PureComponent{static defaultProps={operationProps:null};render(){let{method:e}=this.props;return O().createElement(\"span\",{className:\"opblock-summary-method\"},e.toUpperCase())}}class OperationSummaryPath extends x.PureComponent{render(){let{getComponent:e,operationProps:t}=this.props,{deprecated:r,isShown:a,path:n,tag:s,operationId:o,isDeepLinkingEnabled:l}=t.toJS();const c=n.split(/(?=\\/)/g);for(let e=1;e<c.length;e+=2)c.splice(e,0,O().createElement(\"wbr\",{key:e}));const i=e(\"DeepLink\");return O().createElement(\"span\",{className:r?\"opblock-summary-path__deprecated\":\"opblock-summary-path\",\"data-path\":n},O().createElement(i,{enabled:l,isShown:a,path:createDeepLinkPath(`${s}/${o}`),text:c}))}}const operation_extensions=({extensions:e,getComponent:t})=>{let r=t(\"OperationExtRow\");return O().createElement(\"div\",{className:\"opblock-section\"},O().createElement(\"div\",{className:\"opblock-section-header\"},O().createElement(\"h4\",null,\"Extensions\")),O().createElement(\"div\",{className:\"table-container\"},O().createElement(\"table\",null,O().createElement(\"thead\",null,O().createElement(\"tr\",null,O().createElement(\"td\",{className:\"col_header\"},\"Field\"),O().createElement(\"td\",{className:\"col_header\"},\"Value\"))),O().createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>O().createElement(r,{key:`${e}-${t}`,xKey:e,xVal:t})))))))},operation_extension_row=({xKey:e,xVal:t})=>{const r=t?t.toJS?t.toJS():t:null;return O().createElement(\"tr\",null,O().createElement(\"td\",null,e),O().createElement(\"td\",null,JSON.stringify(r)))};function createHtmlReadyId(e,t=\"_\"){return e.replace(/[^\\w-]/g,t)}class Responses extends O().Component{static defaultProps={tryItOutResponse:null,produces:(0,k.fromJS)([\"application/json\"]),displayRequestDuration:!1};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);onResponseContentTypeChange=({controlsAcceptHeader:e,value:t})=>{const{oas3Actions:r,path:a,method:n}=this.props;e&&r.setResponseContentType({value:t,path:a,method:n})};render(){let{responses:e,tryItOutResponse:t,getComponent:r,getConfigs:a,specSelectors:n,fn:s,producesValue:o,displayRequestDuration:l,specPath:c,path:i,method:p,oas3Selectors:m,oas3Actions:u}=this.props,d=function defaultStatusCode(e){let t=e.keySeq();return t.contains(ce)?ce:t.filter((e=>\"2\"===(e+\"\")[0])).sort().first()}(e);const h=r(\"contentType\"),g=r(\"liveResponse\"),y=r(\"response\");let f=this.props.produces&&this.props.produces.size?this.props.produces:Responses.defaultProps.produces;const S=n.isOAS3()?function getAcceptControllingResponse(e){if(!A().OrderedMap.isOrderedMap(e))return null;if(!e.size)return null;const t=e.find(((e,t)=>t.startsWith(\"2\")&&Object.keys(e.get(\"content\")||{}).length>0)),r=e.get(\"default\")||A().OrderedMap(),a=(r.get(\"content\")||A().OrderedMap()).keySeq().toJS().length?r:null;return t||a}(e):null,E=createHtmlReadyId(`${p}${i}_responses`),_=`${E}_select`;return O().createElement(\"div\",{className:\"responses-wrapper\"},O().createElement(\"div\",{className:\"opblock-section-header\"},O().createElement(\"h4\",null,\"Responses\"),n.isOAS3()?null:O().createElement(\"label\",{htmlFor:_},O().createElement(\"span\",null,\"Response content type\"),O().createElement(h,{value:o,ariaControls:E,ariaLabel:\"Response content type\",className:\"execute-content-type\",contentTypes:f,controlId:_,onChange:this.onChangeProducesWrapper}))),O().createElement(\"div\",{className:\"responses-inner\"},t?O().createElement(\"div\",null,O().createElement(g,{response:t,getComponent:r,getConfigs:a,specSelectors:n,path:this.props.path,method:this.props.method,displayRequestDuration:l}),O().createElement(\"h4\",null,\"Responses\")):null,O().createElement(\"table\",{\"aria-live\":\"polite\",className:\"responses-table\",id:E,role:\"region\"},O().createElement(\"thead\",null,O().createElement(\"tr\",{className:\"responses-header\"},O().createElement(\"td\",{className:\"col_header response-col_status\"},\"Code\"),O().createElement(\"td\",{className:\"col_header response-col_description\"},\"Description\"),n.isOAS3()?O().createElement(\"td\",{className:\"col col_header response-col_links\"},\"Links\"):null)),O().createElement(\"tbody\",null,e.entrySeq().map((([e,l])=>{let h=t&&t.get(\"status\")==e?\"response_current\":\"\";return O().createElement(y,{key:e,path:i,method:p,specPath:c.push(e),isDefault:d===e,fn:s,className:h,code:e,response:l,specSelectors:n,controlsAcceptHeader:l===S,onContentTypeChange:this.onResponseContentTypeChange,contentType:o,getConfigs:a,activeExamplesKey:m.activeExamplesMember(i,p,\"responses\",e),oas3Actions:u,getComponent:r})})).toArray()))))}}function getKnownSyntaxHighlighterLanguage(e){return function canJsonParse(e){try{return!!JSON.parse(e)}catch(e){return null}}(e)?\"json\":null}class Response extends O().Component{constructor(e,t){super(e,t),this.state={responseContentType:\"\"}}static defaultProps={response:(0,k.fromJS)({}),onContentTypeChange:()=>{}};_onContentTypeChange=e=>{const{onContentTypeChange:t,controlsAcceptHeader:r}=this.props;this.setState({responseContentType:e}),t({value:e,controlsAcceptHeader:r})};getTargetExamplesKey=()=>{const{response:e,contentType:t,activeExamplesKey:r}=this.props,a=this.state.responseContentType||t,n=e.getIn([\"content\",a],(0,k.Map)({})).get(\"examples\",null).keySeq().first();return r||n};render(){let{path:e,method:t,code:r,response:a,className:n,specPath:s,fn:o,getComponent:l,getConfigs:c,specSelectors:i,contentType:p,controlsAcceptHeader:m,oas3Actions:u}=this.props,{inferSchema:d,getSampleSchema:h}=o,g=i.isOAS3();const{showExtensions:y}=c();let f=y?getExtensions(a):null,S=a.get(\"headers\"),E=a.get(\"links\");const _=l(\"ResponseExtension\"),v=l(\"headers\"),w=l(\"HighlightCode\",!0),b=l(\"modelExample\"),C=l(\"Markdown\",!0),x=l(\"operationLink\"),N=l(\"contentType\"),A=l(\"ExamplesSelect\"),I=l(\"Example\");var j,q;const P=this.state.responseContentType||p,M=a.getIn([\"content\",P],(0,k.Map)({})),T=M.get(\"examples\",null);if(g){const e=M.get(\"schema\");j=e?d(e.toJS()):null,q=e?(0,k.List)([\"content\",this.state.responseContentType,\"schema\"]):s}else j=a.get(\"schema\"),q=a.has(\"schema\")?s.push(\"schema\"):s;let R,J,$=!1,V={includeReadOnly:!0};if(g)if(J=M.get(\"schema\")?.toJS(),k.Map.isMap(T)&&!T.isEmpty()){const e=this.getTargetExamplesKey(),getMediaTypeExample=e=>k.Map.isMap(e)?e.get(\"value\"):void 0;R=getMediaTypeExample(T.get(e,(0,k.Map)({}))),void 0===R&&(R=getMediaTypeExample(T.values().next().value)),$=!0}else void 0!==M.get(\"example\")&&(R=M.get(\"example\"),$=!0);else{J=j,V={...V,includeWriteOnly:!0};const e=a.getIn([\"examples\",P]);e&&(R=e,$=!0)}const L=((e,t)=>{if(null==e)return null;const r=getKnownSyntaxHighlighterLanguage(e)?\"json\":null;return O().createElement(\"div\",null,O().createElement(t,{className:\"example\",language:r},stringify(e)))})(h(J,P,V,$?R:void 0),w);return O().createElement(\"tr\",{className:\"response \"+(n||\"\"),\"data-code\":r},O().createElement(\"td\",{className:\"response-col_status\"},r),O().createElement(\"td\",{className:\"response-col_description\"},O().createElement(\"div\",{className:\"response-col_description__inner\"},O().createElement(C,{source:a.get(\"description\")})),y&&f.size?f.entrySeq().map((([e,t])=>O().createElement(_,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,g&&a.get(\"content\")?O().createElement(\"section\",{className:\"response-controls\"},O().createElement(\"div\",{className:pt()(\"response-control-media-type\",{\"response-control-media-type--accept-controller\":m})},O().createElement(\"small\",{className:\"response-control-media-type__title\"},\"Media type\"),O().createElement(N,{value:this.state.responseContentType,contentTypes:a.get(\"content\")?a.get(\"content\").keySeq():(0,k.Seq)(),onChange:this._onContentTypeChange,ariaLabel:\"Media Type\"}),m?O().createElement(\"small\",{className:\"response-control-media-type__accept-message\"},\"Controls \",O().createElement(\"code\",null,\"Accept\"),\" header.\"):null),k.Map.isMap(T)&&!T.isEmpty()?O().createElement(\"div\",{className:\"response-control-examples\"},O().createElement(\"small\",{className:\"response-control-examples__title\"},\"Examples\"),O().createElement(A,{examples:T,currentExampleKey:this.getTargetExamplesKey(),onSelect:a=>u.setActiveExamplesMember({name:a,pathMethod:[e,t],contextType:\"responses\",contextName:r}),showLabels:!1})):null):null,L||j?O().createElement(b,{specPath:q,getComponent:l,getConfigs:c,specSelectors:i,schema:fromJSOrdered(j),example:L,includeReadOnly:!0}):null,g&&T?O().createElement(I,{example:T.get(this.getTargetExamplesKey(),(0,k.Map)({})),getComponent:l,getConfigs:c,omitValue:!0}):null,S?O().createElement(v,{headers:S,getComponent:l}):null),g?O().createElement(\"td\",{className:\"response-col_links\"},E?E.toSeq().entrySeq().map((([e,t])=>O().createElement(x,{key:e,name:e,link:t,getComponent:l}))):O().createElement(\"i\",null,\"No links\")):null)}}const response_extension=({xKey:e,xVal:t})=>O().createElement(\"div\",{className:\"response__extension\"},e,\": \",String(t)),Za=require(\"xml-but-prettier\");var en=__webpack_require__.n(Za);const tn=require(\"lodash/toLower\");var rn=__webpack_require__.n(tn);class ResponseBody extends O().PureComponent{state={parsedContent:null};updateParsedContent=e=>{const{content:t}=this.props;if(e!==t)if(t&&t instanceof Blob){var r=new FileReader;r.onload=()=>{this.setState({parsedContent:r.result})},r.readAsText(t)}else this.setState({parsedContent:t.toString()})};componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(e){this.updateParsedContent(e.content)}render(){let{content:e,contentType:t,url:r,headers:a={},getComponent:n}=this.props;const{parsedContent:s}=this.state,o=n(\"HighlightCode\",!0),l=\"response_\"+(new Date).getTime();let c,i;if(r=r||\"\",(/^application\\/octet-stream/i.test(t)||a[\"Content-Disposition\"]&&/attachment/i.test(a[\"Content-Disposition\"])||a[\"content-disposition\"]&&/attachment/i.test(a[\"content-disposition\"])||a[\"Content-Description\"]&&/File Transfer/i.test(a[\"Content-Description\"])||a[\"content-description\"]&&/File Transfer/i.test(a[\"content-description\"]))&&(e.size>0||e.length>0))if(\"Blob\"in window){let n=t||\"text/html\",s=e instanceof Blob?e:new Blob([e],{type:n}),o=window.URL.createObjectURL(s),l=[n,r.substr(r.lastIndexOf(\"/\")+1),o].join(\":\"),c=a[\"content-disposition\"]||a[\"Content-Disposition\"];if(void 0!==c){let e=function extractFileNameFromContentDispositionHeader(e){let t;if([/filename\\*=[^']+'\\w*'\"([^\"]+)\";?/i,/filename\\*=[^']+'\\w*'([^;]+);?/i,/filename=\"([^;]*);?\"/i,/filename=([^;]*);?/i].some((r=>(t=r.exec(e),null!==t))),null!==t&&t.length>1)try{return decodeURIComponent(t[1])}catch(e){console.error(e)}return null}(c);null!==e&&(l=e)}i=K.navigator&&K.navigator.msSaveOrOpenBlob?O().createElement(\"div\",null,O().createElement(\"a\",{href:o,onClick:()=>K.navigator.msSaveOrOpenBlob(s,l)},\"Download file\")):O().createElement(\"div\",null,O().createElement(\"a\",{href:o,download:l},\"Download file\"))}else i=O().createElement(\"pre\",{className:\"microlight\"},\"Download headers detected but your browser does not support downloading binary via XHR (Blob).\");else if(/json/i.test(t)){let t=null;getKnownSyntaxHighlighterLanguage(e)&&(t=\"json\");try{c=JSON.stringify(JSON.parse(e),null,\"  \")}catch(t){c=\"can't parse JSON.  Raw result:\\n\\n\"+e}i=O().createElement(o,{language:t,downloadable:!0,fileName:`${l}.json`,canCopy:!0},c)}else/xml/i.test(t)?(c=en()(e,{textNodesOnSameLine:!0,indentor:\"  \"}),i=O().createElement(o,{downloadable:!0,fileName:`${l}.xml`,canCopy:!0},c)):i=\"text/html\"===rn()(t)||/text\\/plain/.test(t)?O().createElement(o,{downloadable:!0,fileName:`${l}.html`,canCopy:!0},e):\"text/csv\"===rn()(t)||/text\\/csv/.test(t)?O().createElement(o,{downloadable:!0,fileName:`${l}.csv`,canCopy:!0},e):/^image\\//i.test(t)?t.includes(\"svg\")?O().createElement(\"div\",null,\" \",e,\" \"):O().createElement(\"img\",{src:window.URL.createObjectURL(e)}):/^audio\\//i.test(t)?O().createElement(\"pre\",{className:\"microlight\"},O().createElement(\"audio\",{controls:!0,key:r},O().createElement(\"source\",{src:r,type:t}))):\"string\"==typeof e?O().createElement(o,{downloadable:!0,fileName:`${l}.txt`,canCopy:!0},e):e.size>0?s?O().createElement(\"div\",null,O().createElement(\"p\",{className:\"i\"},\"Unrecognized response type; displaying content as text.\"),O().createElement(o,{downloadable:!0,fileName:`${l}.txt`,canCopy:!0},s)):O().createElement(\"p\",{className:\"i\"},\"Unrecognized response type; unable to display.\"):null;return i?O().createElement(\"div\",null,O().createElement(\"h5\",null,\"Response body\"),i):null}}class Parameters extends x.Component{constructor(e){super(e),this.state={callbackVisible:!1,parametersVisible:!0}}static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]};onChange=(e,t,r)=>{let{specActions:{changeParamByIdentity:a},onChangeKey:n}=this.props;a(n,e,t,r)};onChangeConsumesWrapper=e=>{let{specActions:{changeConsumesValue:t},onChangeKey:r}=this.props;t(r,e)};toggleTab=e=>\"parameters\"===e?this.setState({parametersVisible:!0,callbackVisible:!1}):\"callbacks\"===e?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0;onChangeMediaType=({value:e,pathMethod:t})=>{let{specActions:r,oas3Selectors:a,oas3Actions:n}=this.props;const s=a.hasUserEditedBody(...t),o=a.shouldRetainRequestBodyValue(...t);n.setRequestContentType({value:e,pathMethod:t}),n.initRequestBodyValidateError({pathMethod:t}),s||(o||n.setRequestBodyValue({value:void 0,pathMethod:t}),r.clearResponse(...t),r.clearRequest(...t),r.clearValidateParams(t))};render(){let{onTryoutClick:e,onResetClick:t,parameters:r,allowTryItOut:a,tryItOutEnabled:n,specPath:s,fn:o,getComponent:l,getConfigs:c,specSelectors:i,specActions:p,pathMethod:m,oas3Actions:u,oas3Selectors:d,operation:h}=this.props;const g=l(\"parameterRow\"),y=l(\"TryItOutButton\"),f=l(\"contentType\"),S=l(\"Callbacks\",!0),E=l(\"RequestBody\",!0),_=n&&a,v=i.isOAS3(),w=`${createHtmlReadyId(`${m[1]}${m[0]}_requests`)}_select`,b=h.get(\"requestBody\"),C=Object.values(r.reduce(((e,t)=>{if(k.Map.isMap(t)){const r=t.get(\"in\");e[r]??=[],e[r].push(t)}return e}),{})).reduce(((e,t)=>e.concat(t)),[]);return O().createElement(\"div\",{className:\"opblock-section\"},O().createElement(\"div\",{className:\"opblock-section-header\"},v?O().createElement(\"div\",{className:\"tab-header\"},O().createElement(\"div\",{onClick:()=>this.toggleTab(\"parameters\"),className:`tab-item ${this.state.parametersVisible&&\"active\"}`},O().createElement(\"h4\",{className:\"opblock-title\"},O().createElement(\"span\",null,\"Parameters\"))),h.get(\"callbacks\")?O().createElement(\"div\",{onClick:()=>this.toggleTab(\"callbacks\"),className:`tab-item ${this.state.callbackVisible&&\"active\"}`},O().createElement(\"h4\",{className:\"opblock-title\"},O().createElement(\"span\",null,\"Callbacks\"))):null):O().createElement(\"div\",{className:\"tab-header\"},O().createElement(\"h4\",{className:\"opblock-title\"},\"Parameters\")),a?O().createElement(y,{isOAS3:i.isOAS3(),hasUserEditedBody:d.hasUserEditedBody(...m),enabled:n,onCancelClick:this.props.onCancelClick,onTryoutClick:e,onResetClick:()=>t(m)}):null),this.state.parametersVisible?O().createElement(\"div\",{className:\"parameters-container\"},C.length?O().createElement(\"div\",{className:\"table-container\"},O().createElement(\"table\",{className:\"parameters\"},O().createElement(\"thead\",null,O().createElement(\"tr\",null,O().createElement(\"th\",{className:\"col_header parameters-col_name\"},\"Name\"),O().createElement(\"th\",{className:\"col_header parameters-col_description\"},\"Description\"))),O().createElement(\"tbody\",null,C.map(((e,t)=>O().createElement(g,{fn:o,specPath:s.push(t.toString()),getComponent:l,getConfigs:c,rawParam:e,param:i.parameterWithMetaByIdentity(m,e),key:`${e.get(\"in\")}.${e.get(\"name\")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:i,specActions:p,oas3Actions:u,oas3Selectors:d,pathMethod:m,isExecute:_})))))):O().createElement(\"div\",{className:\"opblock-description-wrapper\"},O().createElement(\"p\",null,\"No parameters\"))):null,this.state.callbackVisible?O().createElement(\"div\",{className:\"callbacks-container opblock-description-wrapper\"},O().createElement(S,{callbacks:(0,k.Map)(h.get(\"callbacks\")),specPath:s.slice(0,-1).push(\"callbacks\")})):null,v&&b&&this.state.parametersVisible&&O().createElement(\"div\",{className:\"opblock-section opblock-section-request-body\"},O().createElement(\"div\",{className:\"opblock-section-header\"},O().createElement(\"h4\",{className:`opblock-title parameter__name ${b.get(\"required\")&&\"required\"}`},\"Request body\"),O().createElement(\"label\",{id:w},O().createElement(f,{value:d.requestContentType(...m),contentTypes:b.get(\"content\",(0,k.List)()).keySeq(),onChange:e=>{this.onChangeMediaType({value:e,pathMethod:m})},className:\"body-param-content-type\",ariaLabel:\"Request content type\",controlId:w}))),O().createElement(\"div\",{className:\"opblock-description-wrapper\"},O().createElement(E,{setRetainRequestBodyValueFlag:e=>u.setRetainRequestBodyValueFlag({value:e,pathMethod:m}),userHasEditedBody:d.hasUserEditedBody(...m),specPath:s.slice(0,-1).push(\"requestBody\"),requestBody:b,requestBodyValue:d.requestBodyValue(...m),requestBodyInclusionSetting:d.requestBodyInclusionSetting(...m),requestBodyErrors:d.requestBodyErrors(...m),isExecute:_,getConfigs:c,activeExamplesKey:d.activeExamplesMember(...m,\"requestBody\",\"requestBody\"),updateActiveExamplesKey:e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"requestBody\",contextName:\"requestBody\"})},onChange:(e,t)=>{if(t){const r=d.requestBodyValue(...m),a=k.Map.isMap(r)?r:(0,k.Map)();return u.setRequestBodyValue({pathMethod:m,value:a.setIn(t,e)})}u.setRequestBodyValue({value:e,pathMethod:m})},onChangeIncludeEmpty:(e,t)=>{u.setRequestBodyInclusion({pathMethod:m,value:t,name:e})},contentType:d.requestContentType(...m)}))))}}const parameter_extension=({xKey:e,xVal:t})=>O().createElement(\"div\",{className:\"parameter__extension\"},e,\": \",String(t)),an={onChange:()=>{},isIncludedOptions:{}};class ParameterIncludeEmpty extends x.Component{static defaultProps=an;componentDidMount(){const{isIncludedOptions:e,onChange:t}=this.props,{shouldDispatchInit:r,defaultValue:a}=e;r&&t(a)}onCheckboxChange=e=>{const{onChange:t}=this.props;t(e.target.checked)};render(){let{isIncluded:e,isDisabled:t}=this.props;return O().createElement(\"div\",null,O().createElement(\"label\",{htmlFor:\"include_empty_value\",className:pt()(\"parameter__empty_value_toggle\",{disabled:t})},O().createElement(\"input\",{id:\"include_empty_value\",type:\"checkbox\",disabled:t,checked:!t&&e,onChange:this.onCheckboxChange}),\"Send empty value\"))}}class ParameterRow extends x.Component{constructor(e,t){super(e,t),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(e){let t,{specSelectors:r,pathMethod:a,rawParam:n}=e,s=r.isOAS3(),o=r.parameterWithMetaByIdentity(a,n)||new k.Map;if(o=o.isEmpty()?n:o,s){let{schema:e}=getParameterSchema(o,{isOAS3:s});t=e?e.get(\"enum\"):void 0}else t=o?o.get(\"enum\"):void 0;let l,c=o?o.get(\"value\"):void 0;void 0!==c?l=c:n.get(\"required\")&&t&&t.size&&(l=t.first()),void 0!==l&&l!==c&&this.onChangeWrapper(function numberToString(e){return\"number\"==typeof e?e.toString():e}(l)),this.setDefaultValue()}onChangeWrapper=(e,t=!1)=>{let r,{onChange:a,rawParam:n}=this.props;return r=\"\"===e||e&&0===e.size?null:e,a(n,r,t)};_onExampleSelect=e=>{this.props.oas3Actions.setActiveExamplesMember({name:e,pathMethod:this.props.pathMethod,contextType:\"parameters\",contextName:this.getParamKey()})};onChangeIncludeEmpty=e=>{let{specActions:t,param:r,pathMethod:a}=this.props;const n=r.get(\"name\"),s=r.get(\"in\");return t.updateEmptyParamInclusion(a,n,s,e)};setDefaultValue=()=>{let{specSelectors:e,pathMethod:t,rawParam:r,oas3Selectors:a,fn:n}=this.props;const s=e.parameterWithMetaByIdentity(t,r)||(0,k.Map)();let{schema:o}=getParameterSchema(s,{isOAS3:e.isOAS3()});const l=s.get(\"content\",(0,k.Map)()).keySeq().first(),c=o?n.getSampleSchema(o.toJS(),l,{includeWriteOnly:!0}):null;if(s&&void 0===s.get(\"value\")&&\"body\"!==s.get(\"in\")){let r;if(e.isSwagger2())r=void 0!==s.get(\"x-example\")?s.get(\"x-example\"):void 0!==s.getIn([\"schema\",\"example\"])?s.getIn([\"schema\",\"example\"]):o&&o.getIn([\"default\"]);else if(e.isOAS3()){o=this.composeJsonSchema(o);const e=a.activeExamplesMember(...t,\"parameters\",this.getParamKey());r=void 0!==s.getIn([\"examples\",e,\"value\"])?s.getIn([\"examples\",e,\"value\"]):void 0!==s.getIn([\"content\",l,\"example\"])?s.getIn([\"content\",l,\"example\"]):void 0!==s.get(\"example\")?s.get(\"example\"):void 0!==(o&&o.get(\"example\"))?o&&o.get(\"example\"):void 0!==(o&&o.get(\"default\"))?o&&o.get(\"default\"):s.get(\"default\")}void 0===r||k.List.isList(r)||(r=stringify(r));const i=n.getSchemaObjectType(o),p=n.getSchemaObjectType(o?.get(\"items\"));void 0!==r?this.onChangeWrapper(r):\"object\"===i&&c&&!s.get(\"examples\")?this.onChangeWrapper(k.List.isList(c)?c:stringify(c)):\"array\"===i&&\"object\"===p&&c&&!s.get(\"examples\")&&this.onChangeWrapper(k.List.isList(c)?c:(0,k.List)(JSON.parse(c)))}};getParamKey(){const{param:e}=this.props;return e?`${e.get(\"name\")}-${e.get(\"in\")}`:null}composeJsonSchema(e){const{fn:t}=this.props,r=e.get(\"oneOf\")?.get(0)?.toJS(),a=e.get(\"anyOf\")?.get(0)?.toJS();return(0,k.fromJS)(t.mergeJsonSchema(e.toJS(),r??a??{}))}render(){let{param:e,rawParam:t,getComponent:r,getConfigs:a,isExecute:n,fn:s,onChangeConsumes:o,specSelectors:l,pathMethod:c,specPath:i,oas3Selectors:p}=this.props,m=l.isOAS3();const{showExtensions:u,showCommonExtensions:d}=a();if(e||(e=t),!t)return null;const h=r(\"JsonSchemaForm\"),g=r(\"ParamBody\");let y=e.get(\"in\"),f=\"body\"!==y?null:O().createElement(g,{getComponent:r,getConfigs:a,fn:s,param:e,consumes:l.consumesOptionsFor(c),consumesValue:l.contentTypeValues(c).get(\"requestContentType\"),onChange:this.onChangeWrapper,onChangeConsumes:o,isExecute:n,specSelectors:l,pathMethod:c});const S=r(\"modelExample\"),E=r(\"Markdown\",!0),_=r(\"ParameterExt\"),v=r(\"ParameterIncludeEmpty\"),w=r(\"ExamplesSelectValueRetainer\"),b=r(\"Example\");let{schema:C}=getParameterSchema(e,{isOAS3:m}),x=l.parameterWithMetaByIdentity(c,t)||(0,k.Map)();m&&(C=this.composeJsonSchema(C));let N=C?C.get(\"format\"):null,A=\"formData\"===y,I=\"FormData\"in K,j=e.get(\"required\");const q=s.getSchemaObjectType(C),P=s.getSchemaObjectType(C?.get(\"items\")),M=s.getSchemaObjectTypeLabel(C),T=!f&&\"object\"===q,R=!f&&\"object\"===P;let J,$,V,L,D=x?x.get(\"value\"):\"\",U=d?getCommonExtensions(C):null,z=u?getExtensions(e):null,B=!1;void 0!==e&&C&&(J=C.get(\"items\")),void 0!==J?($=J.get(\"enum\"),V=J.get(\"default\")):C&&($=C.get(\"enum\")),$&&$.size&&$.size>0&&(B=!0),void 0!==e&&(C&&(V=C.get(\"default\")),void 0===V&&(V=e.get(\"default\")),L=e.get(\"example\"),void 0===L&&(L=e.get(\"x-example\")));const F=f?null:O().createElement(h,{fn:s,getComponent:r,value:D,required:j,disabled:!n,description:e.get(\"name\"),onChange:this.onChangeWrapper,errors:x.get(\"errors\"),schema:C});return O().createElement(\"tr\",{\"data-param-name\":e.get(\"name\"),\"data-param-in\":e.get(\"in\")},O().createElement(\"td\",{className:\"parameters-col_name\"},O().createElement(\"div\",{className:j?\"parameter__name required\":\"parameter__name\"},e.get(\"name\"),j?O().createElement(\"span\",null,\" *\"):null),O().createElement(\"div\",{className:\"parameter__type\"},M,N&&O().createElement(\"span\",{className:\"prop-format\"},\"($\",N,\")\")),O().createElement(\"div\",{className:\"parameter__deprecated\"},m&&e.get(\"deprecated\")?\"deprecated\":null),O().createElement(\"div\",{className:\"parameter__in\"},\"(\",e.get(\"in\"),\")\")),O().createElement(\"td\",{className:\"parameters-col_description\"},e.get(\"description\")?O().createElement(E,{source:e.get(\"description\")}):null,!f&&n||!B?null:O().createElement(E,{className:\"parameter__enum\",source:\"<i>Available values</i> : \"+$.map((function(e){return e})).toArray().map(String).join(\", \")}),!f&&n||void 0===V?null:O().createElement(E,{className:\"parameter__default\",source:\"<i>Default value</i> : \"+V}),!f&&n||void 0===L?null:O().createElement(E,{source:\"<i>Example</i> : \"+L}),A&&!I&&O().createElement(\"div\",null,\"Error: your browser does not support FormData\"),m&&e.get(\"examples\")?O().createElement(\"section\",{className:\"parameter-controls\"},O().createElement(w,{examples:e.get(\"examples\"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:r,defaultToFirstExample:!0,currentKey:p.activeExamplesMember(...c,\"parameters\",this.getParamKey()),currentUserInputValue:D})):null,T||R?O().createElement(S,{getComponent:r,specPath:i.push(\"schema\"),getConfigs:a,isExecute:n,specSelectors:l,schema:C,example:F}):F,f&&C?O().createElement(S,{getComponent:r,specPath:i.push(\"schema\"),getConfigs:a,isExecute:n,specSelectors:l,schema:C,example:f,includeWriteOnly:!0}):null,!f&&n&&e.get(\"allowEmptyValue\")?O().createElement(v,{onChange:this.onChangeIncludeEmpty,isIncluded:l.parameterInclusionSettingFor(c,e.get(\"name\"),e.get(\"in\")),isDisabled:!isEmptyValue(D)}):null,m&&e.get(\"examples\")?O().createElement(b,{example:e.getIn([\"examples\",p.activeExamplesMember(...c,\"parameters\",this.getParamKey())]),getComponent:r,getConfigs:a}):null,d&&U.size?U.entrySeq().map((([e,t])=>O().createElement(_,{key:`${e}-${t}`,xKey:e,xVal:t}))):null,u&&z.size?z.entrySeq().map((([e,t])=>O().createElement(_,{key:`${e}-${t}`,xKey:e,xVal:t}))):null))}}class Execute extends x.Component{handleValidateParameters=()=>{let{specSelectors:e,specActions:t,path:r,method:a}=this.props;return t.validateParams([r,a]),e.validateBeforeExecute([r,a])};handleValidateRequestBody=()=>{let{path:e,method:t,specSelectors:r,oas3Selectors:a,oas3Actions:n}=this.props,s={missingBodyValue:!1,missingRequiredKeys:[]};n.clearRequestBodyValidateError({path:e,method:t});let o=r.getOAS3RequiredRequestBodyContentType([e,t]),l=a.requestBodyValue(e,t),c=a.validateBeforeExecute([e,t]),i=a.requestContentType(e,t);if(!c)return s.missingBodyValue=!0,n.setRequestBodyValidateError({path:e,method:t,validationErrors:s}),!1;if(!o)return!0;let p=a.validateShallowRequired({oas3RequiredRequestBodyContentType:o,oas3RequestContentType:i,oas3RequestBodyValue:l});return!p||p.length<1||(p.forEach((e=>{s.missingRequiredKeys.push(e)})),n.setRequestBodyValidateError({path:e,method:t,validationErrors:s}),!1)};handleValidationResultPass=()=>{let{specActions:e,operation:t,path:r,method:a}=this.props;this.props.onExecute&&this.props.onExecute(),e.execute({operation:t,path:r,method:a})};handleValidationResultFail=()=>{let{specActions:e,path:t,method:r}=this.props;e.clearValidateParams([t,r]),setTimeout((()=>{e.validateParams([t,r])}),40)};handleValidationResult=e=>{e?this.handleValidationResultPass():this.handleValidationResultFail()};onClick=()=>{let e=this.handleValidateParameters(),t=this.handleValidateRequestBody(),r=e&&t;this.handleValidationResult(r)};onChangeProducesWrapper=e=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],e);render(){const{disabled:e}=this.props;return O().createElement(\"button\",{className:\"btn execute opblock-control__btn\",onClick:this.onClick,disabled:e},\"Execute\")}}class headers_Headers extends O().Component{render(){let{headers:e,getComponent:t}=this.props;const r=t(\"Property\"),a=t(\"Markdown\",!0);return e&&e.size?O().createElement(\"div\",{className:\"headers-wrapper\"},O().createElement(\"h4\",{className:\"headers__title\"},\"Headers:\"),O().createElement(\"table\",{className:\"headers\"},O().createElement(\"thead\",null,O().createElement(\"tr\",{className:\"header-row\"},O().createElement(\"th\",{className:\"header-col\"},\"Name\"),O().createElement(\"th\",{className:\"header-col\"},\"Description\"),O().createElement(\"th\",{className:\"header-col\"},\"Type\"))),O().createElement(\"tbody\",null,e.entrySeq().map((([e,t])=>{if(!A().Map.isMap(t))return null;const n=t.get(\"description\"),s=t.getIn([\"schema\"])?t.getIn([\"schema\",\"type\"]):t.getIn([\"type\"]),o=t.getIn([\"schema\",\"example\"]);return O().createElement(\"tr\",{key:e},O().createElement(\"td\",{className:\"header-col\"},e),O().createElement(\"td\",{className:\"header-col\"},n?O().createElement(a,{source:n}):null),O().createElement(\"td\",{className:\"header-col\"},s,\" \",o?O().createElement(r,{propKey:\"Example\",propVal:o,propClass:\"header-example\"}):null))})).toArray()))):null}}class Errors extends O().Component{render(){let{editorActions:e,errSelectors:t,layoutSelectors:r,layoutActions:a,getComponent:n}=this.props;const s=n(\"Collapse\");if(e&&e.jumpToLine)var o=e.jumpToLine;let l=t.allErrors().filter((e=>\"thrown\"===e.get(\"type\")||\"error\"===e.get(\"level\")));if(!l||l.count()<1)return null;let c=r.isShown([\"errorPane\"],!0),i=l.sortBy((e=>e.get(\"line\")));return O().createElement(\"pre\",{className:\"errors-wrapper\"},O().createElement(\"hgroup\",{className:\"error\"},O().createElement(\"h4\",{className:\"errors__title\"},\"Errors\"),O().createElement(\"button\",{className:\"btn errors__clear-btn\",onClick:()=>a.show([\"errorPane\"],!c)},c?\"Hide\":\"Show\")),O().createElement(s,{isOpened:c,animated:!0},O().createElement(\"div\",{className:\"errors\"},i.map(((e,t)=>{let r=e.get(\"type\");return\"thrown\"===r||\"auth\"===r?O().createElement(ThrownErrorItem,{key:t,error:e.get(\"error\")||e,jumpToLine:o}):\"spec\"===r?O().createElement(SpecErrorItem,{key:t,error:e,jumpToLine:o}):void 0})))))}}const ThrownErrorItem=({error:e,jumpToLine:t})=>{if(!e)return null;let r=e.get(\"line\");return O().createElement(\"div\",{className:\"error-wrapper\"},e?O().createElement(\"div\",null,O().createElement(\"h4\",null,e.get(\"source\")&&e.get(\"level\")?toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"):\"\",e.get(\"path\")?O().createElement(\"small\",null,\" at \",e.get(\"path\")):null),O().createElement(\"span\",{className:\"message thrown\"},e.get(\"message\")),O().createElement(\"div\",{className:\"error-line\"},r&&t?O().createElement(\"a\",{onClick:t.bind(null,r)},\"Jump to line \",r):null)):null)},SpecErrorItem=({error:e,jumpToLine:t=null})=>{let r=null;return e.get(\"path\")?r=k.List.isList(e.get(\"path\"))?O().createElement(\"small\",null,\"at \",e.get(\"path\").join(\".\")):O().createElement(\"small\",null,\"at \",e.get(\"path\")):e.get(\"line\")&&!t&&(r=O().createElement(\"small\",null,\"on line \",e.get(\"line\"))),O().createElement(\"div\",{className:\"error-wrapper\"},e?O().createElement(\"div\",null,O().createElement(\"h4\",null,toTitleCase(e.get(\"source\"))+\" \"+e.get(\"level\"),\" \",r),O().createElement(\"span\",{className:\"message\"},e.get(\"message\")),O().createElement(\"div\",{className:\"error-line\"},t?O().createElement(\"a\",{onClick:t.bind(null,e.get(\"line\"))},\"Jump to line \",e.get(\"line\")):null)):null)};function toTitleCase(e){return(e||\"\").split(\" \").map((e=>e[0].toUpperCase()+e.slice(1))).join(\" \")}const content_type_noop=()=>{};class ContentType extends O().Component{static defaultProps={onChange:content_type_noop,value:null,contentTypes:(0,k.fromJS)([\"application/json\"])};componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(e){e.contentTypes&&e.contentTypes.size&&(e.contentTypes.includes(e.value)||e.onChange(e.contentTypes.first()))}onChangeWrapper=e=>this.props.onChange(e.target.value);render(){let{ariaControls:e,ariaLabel:t,className:r,contentTypes:a,controlId:n,value:s}=this.props;return a&&a.size?O().createElement(\"div\",{className:\"content-type-wrapper \"+(r||\"\")},O().createElement(\"select\",{\"aria-controls\":e,\"aria-label\":t,className:\"content-type\",id:n,onChange:this.onChangeWrapper,value:s||\"\"},a.map((e=>O().createElement(\"option\",{key:e,value:e},e))).toArray())):null}}function xclass(...e){return e.filter((e=>!!e)).join(\" \").trim()}class Container extends O().Component{render(){let{fullscreen:e,full:t,...r}=this.props;if(e)return O().createElement(\"section\",r);let a=\"swagger-container\"+(t?\"-full\":\"\");return O().createElement(\"section\",Qe()({},r,{className:xclass(r.className,a)}))}}const nn={mobile:\"\",tablet:\"-tablet\",desktop:\"-desktop\",large:\"-hd\"};class Col extends O().Component{render(){const{hide:e,keepContents:t,mobile:r,tablet:a,desktop:n,large:s,...o}=this.props;if(e&&!t)return O().createElement(\"span\",null);let l=[];for(let e in nn){if(!Object.prototype.hasOwnProperty.call(nn,e))continue;let t=nn[e];if(e in this.props){let r=this.props[e];if(r<1){l.push(\"none\"+t);continue}l.push(\"block\"+t),l.push(\"col-\"+r+t)}}e&&l.push(\"hidden\");let c=xclass(o.className,...l);return O().createElement(\"section\",Qe()({},o,{className:c}))}}class Row extends O().Component{render(){return O().createElement(\"div\",Qe()({},this.props,{className:xclass(this.props.className,\"wrapper\")}))}}class Button extends O().Component{static defaultProps={className:\"\"};render(){return O().createElement(\"button\",Qe()({},this.props,{className:xclass(this.props.className,\"button\")}))}}const TextArea=e=>O().createElement(\"textarea\",e),Input=e=>O().createElement(\"input\",e);class Select extends O().Component{static defaultProps={multiple:!1,allowEmptyValue:!0};constructor(e,t){let r;super(e,t),r=e.value?e.value:e.multiple?[\"\"]:\"\",this.state={value:r}}onChange=e=>{let t,{onChange:r,multiple:a}=this.props,n=[].slice.call(e.target.options);t=a?n.filter((function(e){return e.selected})).map((function(e){return e.value})):e.target.value,this.setState({value:t}),r&&r(t)};UNSAFE_componentWillReceiveProps(e){e.value!==this.props.value&&this.setState({value:e.value})}render(){let{allowedValues:e,multiple:t,allowEmptyValue:r,disabled:a}=this.props,n=this.state.value?.toJS?.()||this.state.value;return O().createElement(\"select\",{className:this.props.className,multiple:t,value:n,onChange:this.onChange,disabled:a},r?O().createElement(\"option\",{value:\"\"},\"--\"):null,e.map((function(e,t){return O().createElement(\"option\",{key:t,value:String(e)},String(e))})))}}class Link extends O().Component{render(){return O().createElement(\"a\",Qe()({},this.props,{rel:\"noopener noreferrer\",className:xclass(this.props.className,\"link\")}))}}const NoMargin=({children:e})=>O().createElement(\"div\",{className:\"no-margin\"},\" \",e,\" \");class Collapse extends O().Component{static defaultProps={isOpened:!1,animated:!1};renderNotAnimated(){return this.props.isOpened?O().createElement(NoMargin,null,this.props.children):O().createElement(\"noscript\",null)}render(){let{animated:e,isOpened:t,children:r}=this.props;return e?(r=t?r:null,O().createElement(NoMargin,null,r)):this.renderNotAnimated()}}class Overview extends O().Component{constructor(...e){super(...e),this.setTagShown=this._setTagShown.bind(this)}_setTagShown(e,t){this.props.layoutActions.show(e,t)}showOp(e,t){let{layoutActions:r}=this.props;r.show(e,t)}render(){let{specSelectors:e,layoutSelectors:t,layoutActions:r,getComponent:a}=this.props,n=e.taggedOperations();const s=a(\"Collapse\");return O().createElement(\"div\",null,O().createElement(\"h4\",{className:\"overview-title\"},\"Overview\"),n.map(((e,a)=>{let n=e.get(\"operations\"),o=[\"overview-tags\",a],l=t.isShown(o,!0);return O().createElement(\"div\",{key:\"overview-\"+a},O().createElement(\"h4\",{onClick:()=>r.show(o,!l),className:\"link overview-tag\"},\" \",l?\"-\":\"+\",a),O().createElement(s,{isOpened:l,animated:!0},n.map((e=>{let{path:a,method:n,id:s}=e.toObject(),o=\"operations\",l=s,c=t.isShown([o,l]);return O().createElement(OperationLink,{key:s,path:a,method:n,id:a+\"-\"+n,shown:c,showOpId:l,showOpIdPrefix:o,href:`#operation-${l}`,onClick:r.show})})).toArray()))})).toArray(),n.size<1&&O().createElement(\"h3\",null,\" No operations defined in spec! \"))}}class OperationLink extends O().Component{constructor(e){super(e),this.onClick=this._onClick.bind(this)}_onClick(){let{showOpId:e,showOpIdPrefix:t,onClick:r,shown:a}=this.props;r([t,e],!a)}render(){let{id:e,method:t,shown:r,href:a}=this.props;return O().createElement(Link,{href:a,onClick:this.onClick,className:\"block opblock-link \"+(r?\"shown\":\"\")},O().createElement(\"div\",null,O().createElement(\"small\",{className:`bold-label-${t}`},t.toUpperCase()),O().createElement(\"span\",{className:\"bold-label\"},e)))}}class InitializedInput extends O().Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:e,defaultValue:t,initialValue:r,...a}=this.props;return O().createElement(\"input\",Qe()({},a,{ref:e=>this.inputRef=e}))}}class InfoBasePath extends O().Component{render(){const{host:e,basePath:t}=this.props;return O().createElement(\"pre\",{className:\"base-url\"},\"[ Base URL: \",e,t,\" ]\")}}class InfoUrl extends O().PureComponent{render(){const{url:e,getComponent:t}=this.props,r=t(\"Link\");return O().createElement(r,{target:\"_blank\",href:sanitizeUrl(e)},O().createElement(\"span\",{className:\"url\"},\" \",e))}}class Info extends O().Component{render(){const{info:e,url:t,host:r,basePath:a,getComponent:n,externalDocs:s,selectedServer:o,url:l}=this.props,c=e.get(\"version\"),i=e.get(\"description\"),p=e.get(\"title\"),m=safeBuildUrl(e.get(\"termsOfService\"),l,{selectedServer:o}),u=e.get(\"contact\"),d=e.get(\"license\"),h=safeBuildUrl(s&&s.get(\"url\"),l,{selectedServer:o}),g=s&&s.get(\"description\"),y=n(\"Markdown\",!0),f=n(\"Link\"),S=n(\"VersionStamp\"),E=n(\"OpenAPIVersion\"),_=n(\"InfoUrl\"),v=n(\"InfoBasePath\"),w=n(\"License\"),b=n(\"Contact\");return O().createElement(\"div\",{className:\"info\"},O().createElement(\"hgroup\",{className:\"main\"},O().createElement(\"h2\",{className:\"title\"},p,O().createElement(\"span\",null,c&&O().createElement(S,{version:c}),O().createElement(E,{oasVersion:\"2.0\"}))),r||a?O().createElement(v,{host:r,basePath:a}):null,t&&O().createElement(_,{getComponent:n,url:t})),O().createElement(\"div\",{className:\"description\"},O().createElement(y,{source:i})),m&&O().createElement(\"div\",{className:\"info__tos\"},O().createElement(f,{target:\"_blank\",href:sanitizeUrl(m)},\"Terms of service\")),u?.size>0&&O().createElement(b,{getComponent:n,data:u,selectedServer:o,url:t}),d?.size>0&&O().createElement(w,{getComponent:n,license:d,selectedServer:o,url:t}),h?O().createElement(f,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(h)},g||h):null)}}const sn=Info;class InfoContainer extends O().Component{render(){const{specSelectors:e,getComponent:t,oas3Selectors:r}=this.props,a=e.info(),n=e.url(),s=e.basePath(),o=e.host(),l=e.externalDocs(),c=r.selectedServer(),i=t(\"info\");return O().createElement(\"div\",null,a&&a.count()?O().createElement(i,{info:a,url:n,host:o,basePath:s,externalDocs:l,getComponent:t,selectedServer:c}):null)}}class Contact extends O().Component{render(){const{data:e,getComponent:t,selectedServer:r,url:a}=this.props,n=e.get(\"name\",\"the developer\"),s=safeBuildUrl(e.get(\"url\"),a,{selectedServer:r}),o=e.get(\"email\"),l=t(\"Link\");return O().createElement(\"div\",{className:\"info__contact\"},s&&O().createElement(\"div\",null,O().createElement(l,{href:sanitizeUrl(s),target:\"_blank\"},n,\" - Website\")),o&&O().createElement(l,{href:sanitizeUrl(`mailto:${o}`)},s?`Send email to ${n}`:`Contact ${n}`))}}const on=Contact;class License extends O().Component{render(){const{license:e,getComponent:t,selectedServer:r,url:a}=this.props,n=e.get(\"name\",\"License\"),s=safeBuildUrl(e.get(\"url\"),a,{selectedServer:r}),o=t(\"Link\");return O().createElement(\"div\",{className:\"info__license\"},s?O().createElement(\"div\",{className:\"info__license__url\"},O().createElement(o,{target:\"_blank\",href:sanitizeUrl(s)},n)):O().createElement(\"span\",null,n))}}const ln=License;class JumpToPath extends O().Component{render(){return null}}class CopyToClipboardBtn extends O().Component{render(){let{getComponent:e}=this.props;const t=e(\"CopyIcon\");return O().createElement(\"div\",{className:\"view-line-link copy-to-clipboard\",title:\"Copy to clipboard\"},O().createElement(mt.CopyToClipboard,{text:this.props.textToCopy},O().createElement(t,null)))}}class Footer extends O().Component{render(){return O().createElement(\"div\",{className:\"footer\"})}}class FilterContainer extends O().Component{onFilterChange=e=>{const{target:{value:t}}=e;this.props.layoutActions.updateFilter(t)};render(){const{specSelectors:e,layoutSelectors:t,getComponent:r}=this.props,a=r(\"Col\"),n=\"loading\"===e.loadingStatus(),s=\"failed\"===e.loadingStatus(),o=t.currentFilter(),l=[\"operation-filter-input\"];return s&&l.push(\"failed\"),n&&l.push(\"loading\"),O().createElement(\"div\",null,!1===o?null:O().createElement(\"div\",{className:\"filter-container\"},O().createElement(a,{className:\"filter wrapper\",mobile:12},O().createElement(\"input\",{className:l.join(\" \"),placeholder:\"Filter by tag\",type:\"text\",onChange:this.onFilterChange,value:\"string\"==typeof o?o:\"\",disabled:n}))))}}const cn=Function.prototype;class ParamBody extends x.PureComponent{static defaultProp={consumes:(0,k.fromJS)([\"application/json\"]),param:(0,k.fromJS)({}),onChange:cn,onChangeConsumes:cn};constructor(e,t){super(e,t),this.state={isEditBox:!1,value:\"\"}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(e){this.updateValues.call(this,e)}updateValues=e=>{let{param:t,isExecute:r,consumesValue:a=\"\"}=e,n=/xml/i.test(a),s=/json/i.test(a),o=n?t.get(\"value_xml\"):t.get(\"value\");if(void 0!==o){let e=!o&&s?\"{}\":o;this.setState({value:e}),this.onChange(e,{isXml:n,isEditBox:r})}else n?this.onChange(this.sample(\"xml\"),{isXml:n,isEditBox:r}):this.onChange(this.sample(),{isEditBox:r})};sample=e=>{let{param:t,fn:r}=this.props,a=r.inferSchema(t.toJS());return r.getSampleSchema(a,e,{includeWriteOnly:!0})};onChange=(e,{isEditBox:t,isXml:r})=>{this.setState({value:e,isEditBox:t}),this._onChange(e,r)};_onChange=(e,t)=>{(this.props.onChange||cn)(e,t)};handleOnChange=e=>{const{consumesValue:t}=this.props,r=/xml/i.test(t),a=e.target.value;this.onChange(a,{isXml:r,isEditBox:this.state.isEditBox})};toggleIsEditBox=()=>this.setState((e=>({isEditBox:!e.isEditBox})));render(){let{onChangeConsumes:e,param:t,isExecute:r,specSelectors:a,pathMethod:n,getComponent:s}=this.props;const o=s(\"Button\"),l=s(\"TextArea\"),c=s(\"HighlightCode\",!0),i=s(\"contentType\");let p=(a?a.parameterWithMetaByIdentity(n,t):t).get(\"errors\",(0,k.List)()),m=a.contentTypeValues(n).get(\"requestContentType\"),u=this.props.consumes&&this.props.consumes.size?this.props.consumes:ParamBody.defaultProp.consumes,{value:d,isEditBox:h}=this.state,g=null;getKnownSyntaxHighlighterLanguage(d)&&(g=\"json\");const y=`${createHtmlReadyId(`${n[1]}${n[0]}_parameters`)}_select`;return O().createElement(\"div\",{className:\"body-param\",\"data-param-name\":t.get(\"name\"),\"data-param-in\":t.get(\"in\")},h&&r?O().createElement(l,{className:\"body-param__text\"+(p.count()?\" invalid\":\"\"),value:d,onChange:this.handleOnChange}):d&&O().createElement(c,{className:\"body-param__example\",language:g},d),O().createElement(\"div\",{className:\"body-param-options\"},r?O().createElement(\"div\",{className:\"body-param-edit\"},O().createElement(o,{className:h?\"btn cancel body-param__example-edit\":\"btn edit body-param__example-edit\",onClick:this.toggleIsEditBox},h?\"Cancel\":\"Edit\")):null,O().createElement(\"label\",{htmlFor:y},O().createElement(\"span\",null,\"Parameter content type\"),O().createElement(i,{value:m,contentTypes:u,onChange:e,className:\"body-param-content-type\",ariaLabel:\"Parameter content type\",controlId:y}))))}}class Curl extends O().Component{render(){const{request:e,getComponent:t}=this.props,r=requestSnippetGenerator_curl_bash(e),a=t(\"SyntaxHighlighter\",!0);return O().createElement(\"div\",{className:\"curl-command\"},O().createElement(\"h4\",null,\"Curl\"),O().createElement(\"div\",{className:\"copy-to-clipboard\"},O().createElement(mt.CopyToClipboard,{text:r},O().createElement(\"button\",null))),O().createElement(\"div\",null,O().createElement(a,{language:\"bash\",className:\"curl microlight\",renderPlainText:({children:e,PlainTextViewer:t})=>O().createElement(t,{className:\"curl\"},e)},r)))}}const property=({propKey:e,propVal:t,propClass:r})=>O().createElement(\"span\",{className:r},O().createElement(\"br\",null),e,\": \",String(t));class TryItOutButton extends O().Component{static defaultProps={onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1};render(){const{onTryoutClick:e,onCancelClick:t,onResetClick:r,enabled:a,hasUserEditedBody:n,isOAS3:s}=this.props,o=s&&n;return O().createElement(\"div\",{className:o?\"try-out btn-group\":\"try-out\"},a?O().createElement(\"button\",{className:\"btn try-out__btn cancel\",onClick:t},\"Cancel\"):O().createElement(\"button\",{className:\"btn try-out__btn\",onClick:e},\"Try it out \"),o&&O().createElement(\"button\",{className:\"btn try-out__btn reset\",onClick:r},\"Reset\"))}}class VersionPragmaFilter extends O().PureComponent{static defaultProps={alsoShow:null,children:null,bypass:!1};render(){const{bypass:e,isSwagger2:t,isOAS3:r,alsoShow:a}=this.props;return e?O().createElement(\"div\",null,this.props.children):t&&r?O().createElement(\"div\",{className:\"version-pragma\"},a,O().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},O().createElement(\"div\",null,O().createElement(\"h3\",null,\"Unable to render this definition\"),O().createElement(\"p\",null,O().createElement(\"code\",null,\"swagger\"),\" and \",O().createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),O().createElement(\"p\",null,\"Supported version fields are \",O().createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",O().createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",O().createElement(\"code\",null,\"openapi: 3.0.4\"),\").\")))):t||r?O().createElement(\"div\",null,this.props.children):O().createElement(\"div\",{className:\"version-pragma\"},a,O().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},O().createElement(\"div\",null,O().createElement(\"h3\",null,\"Unable to render this definition\"),O().createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),O().createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",O().createElement(\"code\",null,\"swagger: \",'\"2.0\"'),\" and those that match \",O().createElement(\"code\",null,\"openapi: 3.0.n\"),\" (for example, \",O().createElement(\"code\",null,\"openapi: 3.0.4\"),\").\"))))}}const version_stamp=({version:e})=>O().createElement(\"small\",null,O().createElement(\"pre\",{className:\"version\"},\" \",e,\" \")),openapi_version=({oasVersion:e})=>O().createElement(\"small\",{className:\"version-stamp\"},O().createElement(\"pre\",{className:\"version\"},\"OAS \",e)),deep_link=({enabled:e,path:t,text:r})=>O().createElement(\"a\",{className:\"nostyle\",onClick:e?e=>e.preventDefault():null,href:e?`#/${t}`:null},O().createElement(\"span\",null,r)),svg_assets=()=>O().createElement(\"div\",null,O().createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",xmlnsXlink:\"http://www.w3.org/1999/xlink\",className:\"svg-assets\"},O().createElement(\"defs\",null,O().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"unlocked\"},O().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"locked\"},O().createElement(\"path\",{d:\"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"close\"},O().createElement(\"path\",{d:\"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow\"},O().createElement(\"path\",{d:\"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-down\"},O().createElement(\"path\",{d:\"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 20 20\",id:\"large-arrow-up\"},O().createElement(\"path\",{d:\"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"jump-to\"},O().createElement(\"path\",{d:\"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 24 24\",id:\"expand\"},O().createElement(\"path\",{d:\"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z\"})),O().createElement(\"symbol\",{viewBox:\"0 0 15 16\",id:\"copy\"},O().createElement(\"g\",{transform:\"translate(2, -1)\"},O().createElement(\"path\",{fill:\"#ffffff\",fillRule:\"evenodd\",d:\"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z\"})))))),pn=require(\"remarkable\"),mn=require(\"remarkable/linkify\"),un=require(\"dompurify\");var dn=__webpack_require__.n(un);dn().addHook&&dn().addHook(\"beforeSanitizeElements\",(function(e){return e.href&&e.setAttribute(\"rel\",\"noopener noreferrer\"),e}));const hn=function Markdown({source:e,className:t=\"\",getConfigs:r=()=>({useUnsafeMarkdown:!1})}){if(\"string\"!=typeof e)return null;const a=new pn.Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:\"_blank\"}).use(mn.linkify);a.core.ruler.disable([\"replacements\",\"smartquotes\"]);const{useUnsafeMarkdown:n}=r(),s=a.render(e),o=sanitizer(s,{useUnsafeMarkdown:n});return e&&s&&o?O().createElement(\"div\",{className:pt()(t,\"markdown\"),dangerouslySetInnerHTML:{__html:o}}):null};function sanitizer(e,{useUnsafeMarkdown:t=!1}={}){const r=t,a=t?[]:[\"style\",\"class\"];return t&&!sanitizer.hasWarnedAboutDeprecation&&(console.warn(\"useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0.\"),sanitizer.hasWarnedAboutDeprecation=!0),dn().sanitize(e,{ADD_ATTR:[\"target\"],FORBID_TAGS:[\"style\",\"form\"],ALLOW_DATA_ATTR:r,FORBID_ATTR:a})}sanitizer.hasWarnedAboutDeprecation=!1;class BaseLayout extends O().Component{render(){const{errSelectors:e,specSelectors:t,getComponent:r}=this.props,a=r(\"SvgAssets\"),n=r(\"InfoContainer\",!0),s=r(\"VersionPragmaFilter\"),o=r(\"operations\",!0),l=r(\"Models\",!0),c=r(\"Webhooks\",!0),i=r(\"Row\"),p=r(\"Col\"),m=r(\"errors\",!0),u=r(\"ServersContainer\",!0),d=r(\"SchemesContainer\",!0),h=r(\"AuthorizeBtnContainer\",!0),g=r(\"FilterContainer\",!0),y=t.isSwagger2(),f=t.isOAS3(),S=t.isOAS31(),E=!t.specStr(),_=t.loadingStatus();let v=null;if(\"loading\"===_&&(v=O().createElement(\"div\",{className:\"info\"},O().createElement(\"div\",{className:\"loading-container\"},O().createElement(\"div\",{className:\"loading\"})))),\"failed\"===_&&(v=O().createElement(\"div\",{className:\"info\"},O().createElement(\"div\",{className:\"loading-container\"},O().createElement(\"h4\",{className:\"title\"},\"Failed to load API definition.\"),O().createElement(m,null)))),\"failedConfig\"===_){const t=e.lastError(),r=t?t.get(\"message\"):\"\";v=O().createElement(\"div\",{className:\"info failed-config\"},O().createElement(\"div\",{className:\"loading-container\"},O().createElement(\"h4\",{className:\"title\"},\"Failed to load remote configuration.\"),O().createElement(\"p\",null,r)))}if(!v&&E&&(v=O().createElement(\"h4\",null,\"No API definition provided.\")),v)return O().createElement(\"div\",{className:\"swagger-ui\"},O().createElement(\"div\",{className:\"loading-container\"},v));const w=t.servers(),b=t.schemes(),C=w&&w.size,x=b&&b.size,N=!!t.securityDefinitions();return O().createElement(\"div\",{className:\"swagger-ui\"},O().createElement(a,null),O().createElement(s,{isSwagger2:y,isOAS3:f,alsoShow:O().createElement(m,null)},O().createElement(m,null),O().createElement(i,{className:\"information-container\"},O().createElement(p,{mobile:12},O().createElement(n,null))),C||x||N?O().createElement(\"div\",{className:\"scheme-container\"},O().createElement(p,{className:\"schemes wrapper\",mobile:12},C||x?O().createElement(\"div\",{className:\"schemes-server-container\"},C?O().createElement(u,null):null,x?O().createElement(d,null):null):null,N?O().createElement(h,null):null)):null,O().createElement(g,null),O().createElement(i,null,O().createElement(p,{mobile:12,desktop:12},O().createElement(o,null))),S&&O().createElement(i,{className:\"webhooks-container\"},O().createElement(p,{mobile:12,desktop:12},O().createElement(c,null))),O().createElement(i,null,O().createElement(p,{mobile:12,desktop:12},O().createElement(l,null)))))}}const core_components=()=>({components:{App:Ga,authorizationPopup:AuthorizationPopup,authorizeBtn:AuthorizeBtn,AuthorizeBtnContainer,authorizeOperationBtn:AuthorizeOperationBtn,auths:Auths,AuthItem:auth_item_Auths,authError:AuthError,oauth2:Oauth2,apiKeyAuth:ApiKeyAuth,basicAuth:BasicAuth,clear:Clear,liveResponse:LiveResponse,InitializedInput,info:sn,InfoContainer,InfoUrl,InfoBasePath,Contact:on,License:ln,JumpToPath,CopyToClipboardBtn,onlineValidatorBadge:OnlineValidatorBadge,operations:Operations,operation:Operation,OperationSummary,OperationSummaryMethod,OperationSummaryPath,responses:Responses,response:Response,ResponseExtension:response_extension,responseBody:ResponseBody,parameters:Parameters,parameterRow:ParameterRow,execute:Execute,headers:headers_Headers,errors:Errors,contentType:ContentType,overview:Overview,footer:Footer,FilterContainer,ParamBody,curl:Curl,Property:property,TryItOutButton,Markdown:hn,BaseLayout,VersionPragmaFilter,VersionStamp:version_stamp,OperationExt:operation_extensions,OperationExtRow:operation_extension_row,ParameterExt:parameter_extension,ParameterIncludeEmpty,OperationTag,OperationContainer,OpenAPIVersion:openapi_version,DeepLink:deep_link,SvgAssets:svg_assets,Example,ExamplesSelect,ExamplesSelectValueRetainer}}),form_components=()=>({components:{...E}}),base=()=>[configsPlugin,util,logs,view,view_legacy,plugins_spec,err,icons,plugins_layout,json_schema_5,json_schema_5_samples,core_components,form_components,swagger_client,auth,downloadUrlPlugin,deep_linking,filter,on_complete,plugins_request_snippets,syntax_highlighting,versions,safe_render()],gn=(0,k.Map)();function onlyOAS3(e){return(t,r)=>(...a)=>{if(r.getSystem().specSelectors.isOAS3()){const t=e(...a);return\"function\"==typeof t?t(r):t}return t(...a)}}const yn=onlyOAS3(Vt()(null)),fn=onlyOAS3(((e,t)=>e=>e.getSystem().specSelectors.findSchema(t))),Sn=onlyOAS3((()=>e=>{const t=e.getSystem().specSelectors.specJson().getIn([\"components\",\"schemas\"]);return k.Map.isMap(t)?t:gn})),En=onlyOAS3((()=>e=>e.getSystem().specSelectors.specJson().hasIn([\"servers\",0]))),_n=onlyOAS3((0,_e.createSelector)(Ht,(e=>e.getIn([\"components\",\"securitySchemes\"])||null))),wrap_selectors_validOperationMethods=(e,t)=>(r,...a)=>t.specSelectors.isOAS3()?t.oas3Selectors.validOperationMethods():e(...a),vn=yn,wn=yn,bn=yn,Cn=yn,xn=yn;const On=function wrap_selectors_onlyOAS3(e){return(t,r)=>(...a)=>{if(r.getSystem().specSelectors.isOAS3()){let t=r.getState().getIn([\"spec\",\"resolvedSubtrees\",\"components\",\"securitySchemes\"]);return e(r,t,...a)}return t(...a)}}((0,_e.createSelector)((e=>e),(({specSelectors:e})=>e.securityDefinitions()),((e,t)=>{let r=(0,k.List)();return t?(t.entrySeq().forEach((([e,t])=>{const a=t?.get(\"type\");if(\"oauth2\"===a&&t.get(\"flows\").entrySeq().forEach((([a,n])=>{let s=(0,k.fromJS)({flow:a,authorizationUrl:n.get(\"authorizationUrl\"),tokenUrl:n.get(\"tokenUrl\"),scopes:n.get(\"scopes\"),type:t.get(\"type\"),description:t.get(\"description\")});r=r.push(new k.Map({[e]:s.filter((e=>void 0!==e))}))})),\"http\"!==a&&\"apiKey\"!==a||(r=r.push(new k.Map({[e]:t}))),\"openIdConnect\"===a&&t.get(\"openIdConnectData\")){let a=t.get(\"openIdConnectData\");(a.get(\"grant_types_supported\")||[\"authorization_code\",\"implicit\"]).forEach((n=>{let s=a.get(\"scopes_supported\")&&a.get(\"scopes_supported\").reduce(((e,t)=>e.set(t,\"\")),new k.Map),o=(0,k.fromJS)({flow:n,authorizationUrl:a.get(\"authorization_endpoint\"),tokenUrl:a.get(\"token_endpoint\"),scopes:s,type:\"oauth2\",openIdConnectUrl:t.get(\"openIdConnectUrl\")});r=r.push(new k.Map({[e]:o.filter((e=>void 0!==e))}))}))}})),r):r})));function OAS3ComponentWrapFactory(e){return(t,r)=>a=>\"function\"==typeof r.specSelectors?.isOAS3?r.specSelectors.isOAS3()?O().createElement(e,Qe()({},a,r,{Ori:t})):O().createElement(t,a):(console.warn(\"OAS3 wrapper: couldn't get spec\"),null)}const Nn=(0,k.Map)(),selectors_isSwagger2=()=>e=>function isSwagger2(e){const t=e.get(\"swagger\");return\"string\"==typeof t&&\"2.0\"===t}(e.getSystem().specSelectors.specJson()),selectors_isOAS30=()=>e=>function isOAS30(e){const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.0\\.(?:[1-9]\\d*|0)$/.test(t)}(e.getSystem().specSelectors.specJson()),selectors_isOAS3=()=>e=>e.getSystem().specSelectors.isOAS30();function selectors_onlyOAS3(e){return(t,...r)=>a=>{if(a.specSelectors.isOAS3()){const n=e(t,...r);return\"function\"==typeof n?n(a):n}return null}}const kn=selectors_onlyOAS3((()=>e=>e.specSelectors.specJson().get(\"servers\",Nn))),findSchema=(e,t)=>{const r=e.getIn([\"resolvedSubtrees\",\"components\",\"schemas\",t],null),a=e.getIn([\"json\",\"components\",\"schemas\",t],null);return r||a||null},An=selectors_onlyOAS3(((e,{callbacks:t,specPath:r})=>e=>{const a=e.specSelectors.validOperationMethods();return k.Map.isMap(t)?t.reduce(((e,t,n)=>{if(!k.Map.isMap(t))return e;const s=t.reduce(((e,t,s)=>{if(!k.Map.isMap(t))return e;const o=t.entrySeq().filter((([e])=>a.includes(e))).map((([e,t])=>({operation:(0,k.Map)({operation:t}),method:e,path:s,callbackName:n,specPath:r.concat([n,s,e])})));return e.concat(o)}),(0,k.List)());return e.concat(s)}),(0,k.List)()).groupBy((e=>e.callbackName)).map((e=>e.toArray())).toObject():{}})),callbacks=({callbacks:e,specPath:t,specSelectors:r,getComponent:a})=>{const n=r.callbacksOperations({callbacks:e,specPath:t}),s=Object.keys(n),o=a(\"OperationContainer\",!0);return 0===s.length?O().createElement(\"span\",null,\"No callbacks\"):O().createElement(\"div\",null,s.map((e=>O().createElement(\"div\",{key:`${e}`},O().createElement(\"h2\",null,e),n[e].map((t=>O().createElement(o,{key:`${e}-${t.path}-${t.method}`,op:t.operation,tag:\"callbacks\",method:t.method,path:t.path,specPath:t.specPath,allowTryItOut:!1})))))))},getDefaultRequestBodyValue=(e,t,r,a)=>{const n=e.getIn([\"content\",t])??(0,k.OrderedMap)(),s=n.get(\"schema\",(0,k.OrderedMap)()).toJS(),o=void 0!==n.get(\"examples\"),l=n.get(\"example\"),c=o?n.getIn([\"examples\",r,\"value\"]):l;return stringify(a.getSampleSchema(s,t,{includeWriteOnly:!0},c))},request_body=({userHasEditedBody:e,requestBody:t,requestBodyValue:r,requestBodyInclusionSetting:a,requestBodyErrors:n,getComponent:s,getConfigs:o,specSelectors:l,fn:c,contentType:i,isExecute:p,specPath:m,onChange:u,onChangeIncludeEmpty:d,activeExamplesKey:h,updateActiveExamplesKey:g,setRetainRequestBodyValueFlag:y})=>{const handleFile=e=>{u(e.target.files[0])},setIsIncludedOptions=e=>{let t={key:e,shouldDispatchInit:!1,defaultValue:!0};return\"no value\"===a.get(e,\"no value\")&&(t.shouldDispatchInit=!0),t},f=s(\"Markdown\",!0),S=s(\"modelExample\"),E=s(\"RequestBodyEditor\"),_=s(\"HighlightCode\",!0),v=s(\"ExamplesSelectValueRetainer\"),w=s(\"Example\"),b=s(\"ParameterIncludeEmpty\"),{showCommonExtensions:C}=o(),x=t?.get(\"description\")??null,N=t?.get(\"content\")??new k.OrderedMap;i=i||N.keySeq().first()||\"\";const A=N.get(i)??(0,k.OrderedMap)(),I=A.get(\"schema\",(0,k.OrderedMap)()),j=A.get(\"examples\",null),q=j?.map(((e,r)=>{const a=e?.get(\"value\",null);return a&&(e=e.set(\"value\",getDefaultRequestBodyValue(t,i,r,c),a)),e}));n=k.List.isList(n)?n:(0,k.List)();if(c.isFileUploadIntended(A?.get(\"schema\"),i)){const e=s(\"Input\");return p?O().createElement(e,{type:\"file\",onChange:handleFile}):O().createElement(\"i\",null,\"Example values are not available for \",O().createElement(\"code\",null,i),\" media types.\")}if(!A.size)return null;if(c.hasSchemaType(A.get(\"schema\"),\"object\")&&(\"application/x-www-form-urlencoded\"===i||0===i.indexOf(\"multipart/\"))&&I.get(\"properties\",(0,k.OrderedMap)()).size>0){const e=s(\"JsonSchemaForm\"),t=s(\"ParameterExt\"),i=I.get(\"properties\",(0,k.OrderedMap)());return r=k.Map.isMap(r)?r:(0,k.OrderedMap)(),O().createElement(\"div\",{className:\"table-container\"},x&&O().createElement(f,{source:x}),O().createElement(\"table\",null,O().createElement(\"tbody\",null,k.Map.isMap(i)&&i.entrySeq().map((([i,h])=>{if(h.get(\"readOnly\"))return;const g=h.get(\"oneOf\")?.get(0)?.toJS(),y=h.get(\"anyOf\")?.get(0)?.toJS();h=(0,k.fromJS)(c.mergeJsonSchema(h.toJS(),g??y??{}));let E=C?getCommonExtensions(h):null;const _=I.get(\"required\",(0,k.List)()).includes(i),v=c.getSchemaObjectType(h),w=c.getSchemaObjectTypeLabel(h),x=c.getSchemaObjectType(h?.get(\"items\")),N=h.get(\"format\"),A=h.get(\"description\"),j=r.getIn([i,\"value\"]),q=r.getIn([i,\"errors\"])||n,P=a.get(i)||!1;let M=c.getSampleSchema(h,!1,{includeWriteOnly:!0});!1===M&&(M=\"false\"),0===M&&(M=\"0\"),\"string\"!=typeof M&&\"object\"===v&&(M=stringify(M)),\"string\"==typeof M&&\"array\"===v&&(M=JSON.parse(M));const T=c.isFileUploadIntended(h),R=O().createElement(e,{fn:c,dispatchInitialValue:!T,schema:h,description:i,getComponent:s,value:void 0===j?M:j,required:_,errors:q,onChange:e=>{u(e,[i])}});return O().createElement(\"tr\",{key:i,className:\"parameters\",\"data-property-name\":i},O().createElement(\"td\",{className:\"parameters-col_name\"},O().createElement(\"div\",{className:_?\"parameter__name required\":\"parameter__name\"},i,_?O().createElement(\"span\",null,\" *\"):null),O().createElement(\"div\",{className:\"parameter__type\"},w,N&&O().createElement(\"span\",{className:\"prop-format\"},\"($\",N,\")\"),C&&E.size?E.entrySeq().map((([e,r])=>O().createElement(t,{key:`${e}-${r}`,xKey:e,xVal:r}))):null),O().createElement(\"div\",{className:\"parameter__deprecated\"},h.get(\"deprecated\")?\"deprecated\":null)),O().createElement(\"td\",{className:\"parameters-col_description\"},O().createElement(f,{source:A}),p?O().createElement(\"div\",null,\"object\"===v||\"object\"===x?O().createElement(S,{getComponent:s,specPath:m.push(\"schema\"),getConfigs:o,isExecute:p,specSelectors:l,schema:h,example:R}):R,_?null:O().createElement(b,{onChange:e=>d(i,e),isIncluded:P,isIncludedOptions:setIsIncludedOptions(i),isDisabled:Array.isArray(j)?0!==j.length:!isEmptyValue(j)})):null))})))))}const P=getDefaultRequestBodyValue(t,i,h,c);let M=null;getKnownSyntaxHighlighterLanguage(P)&&(M=\"json\");const T=p?O().createElement(E,{value:r,errors:n,defaultValue:P,onChange:u,getComponent:s}):O().createElement(_,{className:\"body-param__example\",language:M},stringify(r)||P);return O().createElement(\"div\",null,x&&O().createElement(f,{source:x}),q?O().createElement(v,{userHasEditedBody:e,examples:q,currentKey:h,currentUserInputValue:r,onSelect:e=>{g(e)},updateValue:u,defaultToFirstExample:!0,getComponent:s,setRetainRequestBodyValueFlag:y}):null,O().createElement(S,{getComponent:s,getConfigs:o,specSelectors:l,expandDepth:1,isExecute:p,schema:A.get(\"schema\"),specPath:m.push(\"content\",i),example:T,includeWriteOnly:!0}),q?O().createElement(w,{example:q.get(h),getComponent:s,getConfigs:o}):null)};class operation_link_OperationLink extends x.Component{render(){const{link:e,name:t,getComponent:r}=this.props,a=r(\"Markdown\",!0);let n=e.get(\"operationId\")||e.get(\"operationRef\"),s=e.get(\"parameters\")&&e.get(\"parameters\").toJS(),o=e.get(\"description\");return O().createElement(\"div\",{className:\"operation-link\"},O().createElement(\"div\",{className:\"description\"},O().createElement(\"b\",null,O().createElement(\"code\",null,t)),o?O().createElement(a,{source:o}):null),O().createElement(\"pre\",null,\"Operation `\",n,\"`\",O().createElement(\"br\",null),O().createElement(\"br\",null),\"Parameters \",function padString(e,t){if(\"string\"!=typeof t)return\"\";return t.split(\"\\n\").map(((t,r)=>r>0?Array(e+1).join(\" \")+t:t)).join(\"\\n\")}(0,JSON.stringify(s,null,2))||\"{}\",O().createElement(\"br\",null)))}}const In=operation_link_OperationLink,components_servers=({servers:e,currentServer:t,setSelectedServer:r,setServerVariableValue:a,getServerVariable:n,getEffectiveServerValue:s})=>{const o=(e.find((e=>e.get(\"url\")===t))||(0,k.OrderedMap)()).get(\"variables\")||(0,k.OrderedMap)(),l=0!==o.size;(0,x.useEffect)((()=>{t||r(e.first()?.get(\"url\"))}),[]),(0,x.useEffect)((()=>{const n=e.find((e=>e.get(\"url\")===t));if(!n)return void r(e.first().get(\"url\"));(n.get(\"variables\")||(0,k.OrderedMap)()).map(((e,r)=>{a({server:t,key:r,val:e.get(\"default\")||\"\"})}))}),[t,e]);const c=(0,x.useCallback)((e=>{r(e.target.value)}),[r]),i=(0,x.useCallback)((e=>{const r=e.target.getAttribute(\"data-variable\"),n=e.target.value;a({server:t,key:r,val:n})}),[a,t]);return O().createElement(\"div\",{className:\"servers\"},O().createElement(\"label\",{htmlFor:\"servers\"},O().createElement(\"select\",{onChange:c,value:t,id:\"servers\"},e.valueSeq().map((e=>O().createElement(\"option\",{value:e.get(\"url\"),key:e.get(\"url\")},e.get(\"url\"),e.get(\"description\")&&` - ${e.get(\"description\")}`))).toArray())),l&&O().createElement(\"div\",null,O().createElement(\"div\",{className:\"computed-url\"},\"Computed URL:\",O().createElement(\"code\",null,s(t))),O().createElement(\"h4\",null,\"Server variables\"),O().createElement(\"table\",null,O().createElement(\"tbody\",null,o.entrySeq().map((([e,r])=>O().createElement(\"tr\",{key:e},O().createElement(\"td\",null,e),O().createElement(\"td\",null,r.get(\"enum\")?O().createElement(\"select\",{\"data-variable\":e,onChange:i},r.get(\"enum\").map((r=>O().createElement(\"option\",{selected:r===n(t,e),key:r,value:r},r)))):O().createElement(\"input\",{type:\"text\",value:n(t,e)||\"\",onChange:i,\"data-variable\":e})))))))))};class ServersContainer extends O().Component{render(){const{specSelectors:e,oas3Selectors:t,oas3Actions:r,getComponent:a}=this.props,n=e.servers(),s=a(\"Servers\");return n&&n.size?O().createElement(\"div\",null,O().createElement(\"span\",{className:\"servers-title\"},\"Servers\"),O().createElement(s,{servers:n,currentServer:t.selectedServer(),setSelectedServer:r.setSelectedServer,setServerVariableValue:r.setServerVariableValue,getServerVariable:t.serverVariableValue,getEffectiveServerValue:t.serverEffectiveValue})):null}}const jn=Function.prototype;class RequestBodyEditor extends x.PureComponent{static defaultProps={onChange:jn,userHasEditedBody:!1};constructor(e,t){super(e,t),this.state={value:stringify(e.value)||e.defaultValue},e.onChange(e.value)}applyDefaultValue=e=>{const{onChange:t,defaultValue:r}=e||this.props;return this.setState({value:r}),t(r)};onChange=e=>{this.props.onChange(stringify(e))};onDomChange=e=>{const t=e.target.value;this.setState({value:t},(()=>this.onChange(t)))};UNSAFE_componentWillReceiveProps(e){this.props.value!==e.value&&e.value!==this.state.value&&this.setState({value:stringify(e.value)}),!e.value&&e.defaultValue&&this.state.value&&this.applyDefaultValue(e)}render(){let{getComponent:e,errors:t}=this.props,{value:r}=this.state,a=t.size>0;const n=e(\"TextArea\");return O().createElement(\"div\",{className:\"body-param\"},O().createElement(n,{className:pt()(\"body-param__text\",{invalid:a}),title:t.size?t.join(\", \"):\"\",value:r,onChange:this.onDomChange}))}}class HttpAuth extends O().Component{constructor(e,t){super(e,t);let{name:r,schema:a}=this.props,n=this.getValue();this.state={name:r,schema:a,value:n}}getValue(){let{name:e,authorized:t}=this.props;return t&&t.getIn([e,\"value\"])}onChange=e=>{let{onChange:t}=this.props,{value:r,name:a}=e.target,n=Object.assign({},this.state.value);a?n[a]=r:n=r,this.setState({value:n},(()=>t(this.state)))};render(){let{schema:e,getComponent:t,errSelectors:r,name:a,authSelectors:n}=this.props;const s=t(\"Input\"),o=t(\"Row\"),l=t(\"Col\"),c=t(\"authError\"),i=t(\"Markdown\",!0),p=t(\"JumpToPath\",!0),m=(e.get(\"scheme\")||\"\").toLowerCase(),u=n.selectAuthPath(a);let d=this.getValue(),h=r.allErrors().filter((e=>e.get(\"authId\")===a));if(\"basic\"===m){let t=d?d.get(\"username\"):null;return O().createElement(\"div\",null,O().createElement(\"h4\",null,O().createElement(\"code\",null,a),\"  (http, Basic)\",O().createElement(p,{path:u})),t&&O().createElement(\"h6\",null,\"Authorized\"),O().createElement(o,null,O().createElement(i,{source:e.get(\"description\")})),O().createElement(o,null,O().createElement(\"label\",{htmlFor:\"auth-basic-username\"},\"Username:\"),t?O().createElement(\"code\",null,\" \",t,\" \"):O().createElement(l,null,O().createElement(s,{id:\"auth-basic-username\",type:\"text\",required:\"required\",name:\"username\",\"aria-label\":\"auth-basic-username\",onChange:this.onChange,autoFocus:!0}))),O().createElement(o,null,O().createElement(\"label\",{htmlFor:\"auth-basic-password\"},\"Password:\"),t?O().createElement(\"code\",null,\" ****** \"):O().createElement(l,null,O().createElement(s,{id:\"auth-basic-password\",autoComplete:\"new-password\",name:\"password\",type:\"password\",\"aria-label\":\"auth-basic-password\",onChange:this.onChange}))),h.valueSeq().map(((e,t)=>O().createElement(c,{error:e,key:t}))))}return\"bearer\"===m?O().createElement(\"div\",null,O().createElement(\"h4\",null,O().createElement(\"code\",null,a),\"  (http, Bearer)\",O().createElement(p,{path:u})),d&&O().createElement(\"h6\",null,\"Authorized\"),O().createElement(o,null,O().createElement(i,{source:e.get(\"description\")})),O().createElement(o,null,O().createElement(\"label\",{htmlFor:\"auth-bearer-value\"},\"Value:\"),d?O().createElement(\"code\",null,\" ****** \"):O().createElement(l,null,O().createElement(s,{id:\"auth-bearer-value\",type:\"text\",\"aria-label\":\"auth-bearer-value\",onChange:this.onChange,autoFocus:!0}))),h.valueSeq().map(((e,t)=>O().createElement(c,{error:e,key:t})))):O().createElement(\"div\",null,O().createElement(\"em\",null,O().createElement(\"b\",null,a),\" HTTP authentication: unsupported scheme \",`'${m}'`))}}class OperationServers extends O().Component{setSelectedServer=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setSelectedServer(e,`${t}:${r}`)};setServerVariableValue=e=>{const{path:t,method:r}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...e,namespace:`${t}:${r}`})};getSelectedServer=()=>{const{path:e,method:t}=this.props;return this.props.getSelectedServer(`${e}:${t}`)};getServerVariable=(e,t)=>{const{path:r,method:a}=this.props;return this.props.getServerVariable({namespace:`${r}:${a}`,server:e},t)};getEffectiveServerValue=e=>{const{path:t,method:r}=this.props;return this.props.getEffectiveServerValue({server:e,namespace:`${t}:${r}`})};render(){const{operationServers:e,pathServers:t,getComponent:r}=this.props;if(!e&&!t)return null;const a=r(\"Servers\"),n=e||t,s=e?\"operation\":\"path\";return O().createElement(\"div\",{className:\"opblock-section operation-servers\"},O().createElement(\"div\",{className:\"opblock-section-header\"},O().createElement(\"div\",{className:\"tab-header\"},O().createElement(\"h4\",{className:\"opblock-title\"},\"Servers\"))),O().createElement(\"div\",{className:\"opblock-description-wrapper\"},O().createElement(\"h4\",{className:\"message\"},\"These \",s,\"-level options override the global server options.\"),O().createElement(a,{servers:n,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}const qn={Callbacks:callbacks,HttpAuth,RequestBody:request_body,Servers:components_servers,ServersContainer,RequestBodyEditor,OperationServers,operationLink:In},Pn=new pn.Remarkable(\"commonmark\");Pn.block.ruler.enable([\"table\"]),Pn.set({linkTarget:\"_blank\"});const Mn=OAS3ComponentWrapFactory((({source:e,className:t=\"\",getConfigs:r=()=>({useUnsafeMarkdown:!1})})=>{if(\"string\"!=typeof e)return null;if(e){const{useUnsafeMarkdown:a}=r(),n=sanitizer(Pn.render(e),{useUnsafeMarkdown:a});let s;return\"string\"==typeof n&&(s=n.trim()),O().createElement(\"div\",{dangerouslySetInnerHTML:{__html:s},className:pt()(t,\"renderedMarkdown\")})}return null})),Tn=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:a,errSelectors:n,authorized:s,onAuthChange:o,name:l,authSelectors:c}=t,i=a(\"HttpAuth\");return\"http\"===r.get(\"type\")?O().createElement(i,{key:l,schema:r,name:l,errSelectors:n,authorized:s,getComponent:a,onChange:o,authSelectors:c}):O().createElement(e,t)})),Rn=OAS3ComponentWrapFactory(OnlineValidatorBadge);class ModelComponent extends x.Component{render(){let{getConfigs:e,schema:t,Ori:r}=this.props,a=[\"model-box\"],n=null;return!0===t.get(\"deprecated\")&&(a.push(\"deprecated\"),n=O().createElement(\"span\",{className:\"model-deprecated-warning\"},\"Deprecated:\")),O().createElement(\"div\",{className:a.join(\" \")},n,O().createElement(r,Qe()({},this.props,{getConfigs:e,depth:1,expandDepth:this.props.expandDepth||0})))}}const Jn=OAS3ComponentWrapFactory(ModelComponent),$n=OAS3ComponentWrapFactory((({Ori:e,...t})=>{const{schema:r,getComponent:a,errors:n,onChange:s,fn:o}=t,l=o.isFileUploadIntended(r),c=a(\"Input\");return l?O().createElement(c,{type:\"file\",className:n.length?\"invalid\":\"\",title:n.length?n:\"\",onChange:e=>{s(e.target.files[0])},disabled:e.isDisabled}):O().createElement(e,t)})),Vn={Markdown:Mn,AuthItem:Tn,OpenAPIVersion:function OAS30ComponentWrapFactory(e){return(t,r)=>a=>\"function\"==typeof r.specSelectors?.isOAS30?r.specSelectors.isOAS30()?O().createElement(e,Qe()({},a,r,{Ori:t})):O().createElement(t,a):(console.warn(\"OAS30 wrapper: couldn't get spec\"),null)}((e=>{const{Ori:t}=e;return O().createElement(t,{oasVersion:\"3.0\"})})),JsonSchema_string:$n,model:Jn,onlineValidatorBadge:Rn},Ln=\"oas3_set_servers\",Dn=\"oas3_set_request_body_value\",Un=\"oas3_set_request_body_retain_flag\",Kn=\"oas3_set_request_body_inclusion\",zn=\"oas3_set_active_examples_member\",Bn=\"oas3_set_request_content_type\",Fn=\"oas3_set_response_content_type\",Wn=\"oas3_set_server_variable_value\",Hn=\"oas3_set_request_body_validate_error\",Xn=\"oas3_clear_request_body_validate_error\",Gn=\"oas3_clear_request_body_value\";function setSelectedServer(e,t){return{type:Ln,payload:{selectedServerUrl:e,namespace:t}}}function setRequestBodyValue({value:e,pathMethod:t}){return{type:Dn,payload:{value:e,pathMethod:t}}}const setRetainRequestBodyValueFlag=({value:e,pathMethod:t})=>({type:Un,payload:{value:e,pathMethod:t}});function setRequestBodyInclusion({value:e,pathMethod:t,name:r}){return{type:Kn,payload:{value:e,pathMethod:t,name:r}}}function setActiveExamplesMember({name:e,pathMethod:t,contextType:r,contextName:a}){return{type:zn,payload:{name:e,pathMethod:t,contextType:r,contextName:a}}}function setRequestContentType({value:e,pathMethod:t}){return{type:Bn,payload:{value:e,pathMethod:t}}}function setResponseContentType({value:e,path:t,method:r}){return{type:Fn,payload:{value:e,path:t,method:r}}}function setServerVariableValue({server:e,namespace:t,key:r,val:a}){return{type:Wn,payload:{server:e,namespace:t,key:r,val:a}}}const setRequestBodyValidateError=({path:e,method:t,validationErrors:r})=>({type:Hn,payload:{path:e,method:t,validationErrors:r}}),clearRequestBodyValidateError=({path:e,method:t})=>({type:Xn,payload:{path:e,method:t}}),initRequestBodyValidateError=({pathMethod:e})=>({type:Xn,payload:{path:e[0],method:e[1]}}),clearRequestBodyValue=({pathMethod:e})=>({type:Gn,payload:{pathMethod:e}}),Yn=require(\"lodash/escapeRegExp\");var Qn=__webpack_require__.n(Yn);const oas3_selectors_onlyOAS3=e=>(t,...r)=>a=>{if(a.getSystem().specSelectors.isOAS3()){const n=e(t,...r);return\"function\"==typeof n?n(a):n}return null};const Zn=oas3_selectors_onlyOAS3(((e,t)=>{const r=t?[t,\"selectedServer\"]:[\"selectedServer\"];return e.getIn(r)||\"\"})),es=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyValue\"])||null)),ts=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"retainBodyValue\"])||!1)),selectDefaultRequestBodyValue=(e,t,r)=>e=>{const{oas3Selectors:a,specSelectors:n,fn:s}=e.getSystem();if(n.isOAS3()){const e=a.requestContentType(t,r);if(e)return getDefaultRequestBodyValue(n.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]),e,a.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),s)}return null},rs=oas3_selectors_onlyOAS3(((e,t,r)=>e=>{const{oas3Selectors:a,specSelectors:n,fn:s}=e;let o=!1;const l=a.requestContentType(t,r);let c=a.requestBodyValue(t,r);const i=n.specResolvedSubtree([\"paths\",t,r,\"requestBody\"]);if(!i)return!1;if(k.Map.isMap(c)&&(c=stringify(c.mapEntries((e=>k.Map.isMap(e[1])?[e[0],e[1].get(\"value\")]:e)).toJS())),k.List.isList(c)&&(c=stringify(c)),l){const e=getDefaultRequestBodyValue(i,l,a.activeExamplesMember(t,r,\"requestBody\",\"requestBody\"),s);o=!!c&&c!==e}return o})),as=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"bodyInclusion\"])||(0,k.Map)())),ns=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"errors\"])||null)),ss=oas3_selectors_onlyOAS3(((e,t,r,a,n)=>e.getIn([\"examples\",t,r,a,n,\"activeExample\"])||null)),os=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"requestContentType\"])||null)),ls=oas3_selectors_onlyOAS3(((e,t,r)=>e.getIn([\"requestData\",t,r,\"responseContentType\"])||null)),cs=oas3_selectors_onlyOAS3(((e,t,r)=>{let a;if(\"string\"!=typeof t){const{server:e,namespace:n}=t;a=n?[n,\"serverVariableValues\",e,r]:[\"serverVariableValues\",e,r]}else{a=[\"serverVariableValues\",t,r]}return e.getIn(a)||null})),is=oas3_selectors_onlyOAS3(((e,t)=>{let r;if(\"string\"!=typeof t){const{server:e,namespace:a}=t;r=a?[a,\"serverVariableValues\",e]:[\"serverVariableValues\",e]}else{r=[\"serverVariableValues\",t]}return e.getIn(r)||(0,k.OrderedMap)()})),ps=oas3_selectors_onlyOAS3(((e,t)=>{var r,a;if(\"string\"!=typeof t){const{server:n,namespace:s}=t;a=n,r=s?e.getIn([s,\"serverVariableValues\",a]):e.getIn([\"serverVariableValues\",a])}else a=t,r=e.getIn([\"serverVariableValues\",a]);r=r||(0,k.OrderedMap)();let n=a;return r.map(((e,t)=>{n=n.replace(new RegExp(`{${Qn()(t)}}`,\"g\"),e)})),n})),ms=function validateRequestBodyIsRequired(e){return(...t)=>r=>{const a=r.getSystem().specSelectors.specJson();let n=[...t][1]||[];return!a.getIn([\"paths\",...n,\"requestBody\",\"required\"])||e(...t)}}(((e,t)=>((e,t)=>(t=t||[],!!e.getIn([\"requestData\",...t,\"bodyValue\"])))(e,t))),validateShallowRequired=(e,{oas3RequiredRequestBodyContentType:t,oas3RequestContentType:r,oas3RequestBodyValue:a})=>{let n=[];if(!k.Map.isMap(a))return n;let s=[];return Object.keys(t.requestContentType).forEach((e=>{if(e===r){t.requestContentType[e].forEach((e=>{s.indexOf(e)<0&&s.push(e)}))}})),s.forEach((e=>{a.getIn([e,\"value\"])||n.push(e)})),n},us=Vt()([\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"]),ds={[Ln]:(e,{payload:{selectedServerUrl:t,namespace:r}})=>{const a=r?[r,\"selectedServer\"]:[\"selectedServer\"];return e.setIn(a,t)},[Dn]:(e,{payload:{value:t,pathMethod:r}})=>{let[a,n]=r;if(!k.Map.isMap(t))return e.setIn([\"requestData\",a,n,\"bodyValue\"],t);let s,o=e.getIn([\"requestData\",a,n,\"bodyValue\"])||(0,k.Map)();k.Map.isMap(o)||(o=(0,k.Map)());const[...l]=t.keys();return l.forEach((e=>{let r=t.getIn([e]);o.has(e)&&k.Map.isMap(r)||(s=o.setIn([e,\"value\"],r))})),e.setIn([\"requestData\",a,n,\"bodyValue\"],s)},[Un]:(e,{payload:{value:t,pathMethod:r}})=>{let[a,n]=r;return e.setIn([\"requestData\",a,n,\"retainBodyValue\"],t)},[Kn]:(e,{payload:{value:t,pathMethod:r,name:a}})=>{let[n,s]=r;return e.setIn([\"requestData\",n,s,\"bodyInclusion\",a],t)},[zn]:(e,{payload:{name:t,pathMethod:r,contextType:a,contextName:n}})=>{let[s,o]=r;return e.setIn([\"examples\",s,o,a,n,\"activeExample\"],t)},[Bn]:(e,{payload:{value:t,pathMethod:r}})=>{let[a,n]=r;return e.setIn([\"requestData\",a,n,\"requestContentType\"],t)},[Fn]:(e,{payload:{value:t,path:r,method:a}})=>e.setIn([\"requestData\",r,a,\"responseContentType\"],t),[Wn]:(e,{payload:{server:t,namespace:r,key:a,val:n}})=>{const s=r?[r,\"serverVariableValues\",t,a]:[\"serverVariableValues\",t,a];return e.setIn(s,n)},[Hn]:(e,{payload:{path:t,method:r,validationErrors:a}})=>{let n=[];if(n.push(\"Required field is not provided\"),a.missingBodyValue)return e.setIn([\"requestData\",t,r,\"errors\"],(0,k.fromJS)(n));if(a.missingRequiredKeys&&a.missingRequiredKeys.length>0){const{missingRequiredKeys:s}=a;return e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,k.fromJS)({}),(e=>s.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,k.fromJS)(n))),e)))}return console.warn(\"unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR\"),e},[Xn]:(e,{payload:{path:t,method:r}})=>{const a=e.getIn([\"requestData\",t,r,\"bodyValue\"]);if(!k.Map.isMap(a))return e.setIn([\"requestData\",t,r,\"errors\"],(0,k.fromJS)([]));const[...n]=a.keys();return n?e.updateIn([\"requestData\",t,r,\"bodyValue\"],(0,k.fromJS)({}),(e=>n.reduce(((e,t)=>e.setIn([t,\"errors\"],(0,k.fromJS)([]))),e))):e},[Gn]:(e,{payload:{pathMethod:t}})=>{let[r,a]=t;const n=e.getIn([\"requestData\",r,a,\"bodyValue\"]);return n?k.Map.isMap(n)?e.setIn([\"requestData\",r,a,\"bodyValue\"],(0,k.Map)()):e.setIn([\"requestData\",r,a,\"bodyValue\"],\"\"):e}};function oas3({getSystem:e}){const t=(e=>(t,r=null)=>{const{getConfigs:a,fn:n}=e(),{fileUploadMediaTypes:s}=a();if(\"string\"==typeof r&&s.some((e=>r.startsWith(e))))return!0;const o=k.Map.isMap(t);if(!o&&!wt()(t))return!1;const l=o?t.get(\"format\"):t.format;return n.hasSchemaType(t,\"string\")&&[\"binary\",\"byte\"].includes(l)})(e);return{components:qn,wrapComponents:Vn,statePlugins:{spec:{wrapSelectors:_,selectors:w},auth:{wrapSelectors:v},oas3:{actions:{...b},reducers:ds,selectors:{...C}}},fn:{isFileUploadIntended:t,isFileUploadIntendedOAS30:t}}}const webhooks=({specSelectors:e,getComponent:t})=>{const r=e.selectWebhooksOperations(),a=Object.keys(r),n=t(\"OperationContainer\",!0);return 0===a.length?null:O().createElement(\"div\",{className:\"webhooks\"},O().createElement(\"h2\",null,\"Webhooks\"),a.map((e=>O().createElement(\"div\",{key:`${e}-webhook`},r[e].map((t=>O().createElement(n,{key:`${e}-${t.method}-webhook`,op:t.operation,tag:\"webhooks\",method:t.method,path:e,specPath:(0,k.List)(t.specPath),allowTryItOut:!1})))))))},components_license=({getComponent:e,specSelectors:t})=>{const r=t.selectLicenseNameField(),a=t.selectLicenseUrl(),n=e(\"Link\");return O().createElement(\"div\",{className:\"info__license\"},a?O().createElement(\"div\",{className:\"info__license__url\"},O().createElement(n,{target:\"_blank\",href:sanitizeUrl(a)},r)):O().createElement(\"span\",null,r))},components_contact=({getComponent:e,specSelectors:t})=>{const r=t.selectContactNameField(),a=t.selectContactUrl(),n=t.selectContactEmailField(),s=e(\"Link\");return O().createElement(\"div\",{className:\"info__contact\"},a&&O().createElement(\"div\",null,O().createElement(s,{href:sanitizeUrl(a),target:\"_blank\"},r,\" - Website\")),n&&O().createElement(s,{href:sanitizeUrl(`mailto:${n}`)},a?`Send email to ${r}`:`Contact ${r}`))},oas31_components_info=({getComponent:e,specSelectors:t})=>{const r=t.version(),a=t.url(),n=t.basePath(),s=t.host(),o=t.selectInfoSummaryField(),l=t.selectInfoDescriptionField(),c=t.selectInfoTitleField(),i=t.selectInfoTermsOfServiceUrl(),p=t.selectExternalDocsUrl(),m=t.selectExternalDocsDescriptionField(),u=t.contact(),d=t.license(),h=e(\"Markdown\",!0),g=e(\"Link\"),y=e(\"VersionStamp\"),f=e(\"OpenAPIVersion\"),S=e(\"InfoUrl\"),E=e(\"InfoBasePath\"),_=e(\"License\",!0),v=e(\"Contact\",!0),w=e(\"JsonSchemaDialect\",!0);return O().createElement(\"div\",{className:\"info\"},O().createElement(\"hgroup\",{className:\"main\"},O().createElement(\"h2\",{className:\"title\"},c,O().createElement(\"span\",null,r&&O().createElement(y,{version:r}),O().createElement(f,{oasVersion:\"3.1\"}))),(s||n)&&O().createElement(E,{host:s,basePath:n}),a&&O().createElement(S,{getComponent:e,url:a})),o&&O().createElement(\"p\",{className:\"info__summary\"},o),O().createElement(\"div\",{className:\"info__description description\"},O().createElement(h,{source:l})),i&&O().createElement(\"div\",{className:\"info__tos\"},O().createElement(g,{target:\"_blank\",href:sanitizeUrl(i)},\"Terms of service\")),u.size>0&&O().createElement(v,null),d.size>0&&O().createElement(_,null),p&&O().createElement(g,{className:\"info__extdocs\",target:\"_blank\",href:sanitizeUrl(p)},m||p),O().createElement(w,null))},json_schema_dialect=({getComponent:e,specSelectors:t})=>{const r=t.selectJsonSchemaDialectField(),a=t.selectJsonSchemaDialectDefault(),n=e(\"Link\");return O().createElement(O().Fragment,null,r&&r===a&&O().createElement(\"p\",{className:\"info__jsonschemadialect\"},\"JSON Schema dialect:\",\" \",O().createElement(n,{target:\"_blank\",href:sanitizeUrl(r)},r)),r&&r!==a&&O().createElement(\"div\",{className:\"error-wrapper\"},O().createElement(\"div\",{className:\"no-margin\"},O().createElement(\"div\",{className:\"errors\"},O().createElement(\"div\",{className:\"errors-wrapper\"},O().createElement(\"h4\",{className:\"center\"},\"Warning\"),O().createElement(\"p\",{className:\"message\"},O().createElement(\"strong\",null,\"OpenAPI.jsonSchemaDialect\"),\" field contains a value different from the default value of\",\" \",O().createElement(n,{target:\"_blank\",href:a},a),\". Values different from the default one are currently not supported. Please either omit the field or provide it with the default value.\"))))))},version_pragma_filter=({bypass:e,isSwagger2:t,isOAS3:r,isOAS31:a,alsoShow:n,children:s})=>e?O().createElement(\"div\",null,s):t&&(r||a)?O().createElement(\"div\",{className:\"version-pragma\"},n,O().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--ambiguous\"},O().createElement(\"div\",null,O().createElement(\"h3\",null,\"Unable to render this definition\"),O().createElement(\"p\",null,O().createElement(\"code\",null,\"swagger\"),\" and \",O().createElement(\"code\",null,\"openapi\"),\" fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields.\"),O().createElement(\"p\",null,\"Supported version fields are \",O().createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",O().createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",O().createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))):t||r||a?O().createElement(\"div\",null,s):O().createElement(\"div\",{className:\"version-pragma\"},n,O().createElement(\"div\",{className:\"version-pragma__message version-pragma__message--missing\"},O().createElement(\"div\",null,O().createElement(\"h3\",null,\"Unable to render this definition\"),O().createElement(\"p\",null,\"The provided definition does not specify a valid version field.\"),O().createElement(\"p\",null,\"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are \",O().createElement(\"code\",null,'swagger: \"2.0\"'),\" and those that match \",O().createElement(\"code\",null,\"openapi: 3.x.y\"),\" (for example,\",\" \",O().createElement(\"code\",null,\"openapi: 3.1.0\"),\").\")))),getModelName=e=>\"string\"==typeof e&&e.includes(\"#/components/schemas/\")?(e=>{const t=e.replace(/~1/g,\"/\").replace(/~0/g,\"~\");try{return decodeURIComponent(t)}catch{return t}})(e.replace(/^.*#\\/components\\/schemas\\//,\"\")):null,hs=(0,x.forwardRef)((({schema:e,getComponent:t,onToggle:r=()=>{},specPath:a},n)=>{const s=t(\"JSONSchema202012\"),o=getModelName(e.get(\"$$ref\")),l=(0,x.useCallback)(((e,t)=>{r(o,t)}),[o,r]);return O().createElement(s,{name:o,schema:e.toJS(),ref:n,onExpand:l,identifier:a.toJS().join(\"_\")})})),gs=hs,models=({specActions:e,specSelectors:t,layoutSelectors:r,layoutActions:a,getComponent:n,getConfigs:s,fn:o})=>{const l=t.selectSchemas(),c=Object.keys(l).length>0,i=[\"components\",\"schemas\"],{docExpansion:p,defaultModelsExpandDepth:m}=s(),u=m>0&&\"none\"!==p,d=r.isShown(i,u),h=n(\"Collapse\"),g=n(\"JSONSchema202012\"),y=n(\"ArrowUpIcon\"),f=n(\"ArrowDownIcon\"),{getTitle:S}=o.jsonSchema202012.useFn();(0,x.useEffect)((()=>{const r=d&&m>1,a=null!=t.specResolvedSubtree(i);r&&!a&&e.requestResolvedSubtree(i)}),[d,m]);const E=(0,x.useCallback)((()=>{a.show(i,!d)}),[d]),_=(0,x.useCallback)((e=>{null!==e&&a.readyToScroll(i,e)}),[]),handleJSONSchema202012Ref=e=>t=>{null!==t&&a.readyToScroll([...i,e],t)},handleJSONSchema202012Expand=r=>(a,n)=>{if(n){const a=[...i,r];null!=t.specResolvedSubtree(a)||e.requestResolvedSubtree([...i,r])}};return!c||m<0?null:O().createElement(\"section\",{className:pt()(\"models\",{\"is-open\":d}),ref:_},O().createElement(\"h4\",null,O().createElement(\"button\",{\"aria-expanded\":d,className:\"models-control\",onClick:E},O().createElement(\"span\",null,\"Schemas\"),d?O().createElement(y,null):O().createElement(f,null))),O().createElement(h,{isOpened:d},Object.entries(l).map((([e,t])=>{const r=S(t,{lookup:\"basic\"})||e;return O().createElement(g,{key:e,ref:handleJSONSchema202012Ref(e),schema:t,name:r,onExpand:handleJSONSchema202012Expand(e)})}))))},mutual_tls_auth=({schema:e,getComponent:t,name:r,authSelectors:a})=>{const n=t(\"JumpToPath\",!0),s=a.selectAuthPath(r);return O().createElement(\"div\",null,O().createElement(\"h4\",null,r,\" (mutualTLS) \",O().createElement(n,{path:s})),O().createElement(\"p\",null,\"Mutual TLS is required by this API/Operation. Certificates are managed via your Operating System and/or your browser.\"),O().createElement(\"p\",null,e.get(\"description\")))};class auths_Auths extends O().Component{constructor(e,t){super(e,t),this.state={}}onAuthChange=e=>{let{name:t}=e;this.setState({[t]:e})};submitAuth=e=>{e.preventDefault();let{authActions:t}=this.props;t.authorizeWithPersistOption(this.state)};logoutClick=e=>{e.preventDefault();let{authActions:t,definitions:r}=this.props,a=r.map(((e,t)=>t)).toArray();this.setState(a.reduce(((e,t)=>(e[t]=\"\",e)),{})),t.logoutWithPersistOption(a)};close=e=>{e.preventDefault();let{authActions:t}=this.props;t.showDefinitions(!1)};render(){let{definitions:e,getComponent:t,authSelectors:r,errSelectors:a}=this.props;const n=t(\"AuthItem\"),s=t(\"oauth2\",!0),o=t(\"Button\"),l=r.authorized(),c=e.filter(((e,t)=>!!l.get(t))),i=e.filter((e=>\"oauth2\"!==e.get(\"type\")&&\"mutualTLS\"!==e.get(\"type\"))),p=e.filter((e=>\"oauth2\"===e.get(\"type\"))),m=e.filter((e=>\"mutualTLS\"===e.get(\"type\")));return O().createElement(\"div\",{className:\"auth-container\"},i.size>0&&O().createElement(\"form\",{onSubmit:this.submitAuth},i.map(((e,s)=>O().createElement(n,{key:s,schema:e,name:s,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:a,authSelectors:r}))).toArray(),O().createElement(\"div\",{className:\"auth-btn-wrapper\"},i.size===c.size?O().createElement(o,{className:\"btn modal-btn auth\",onClick:this.logoutClick,\"aria-label\":\"Remove authorization\"},\"Logout\"):O().createElement(o,{type:\"submit\",className:\"btn modal-btn auth authorize\",\"aria-label\":\"Apply credentials\"},\"Authorize\"),O().createElement(o,{className:\"btn modal-btn auth btn-done\",onClick:this.close},\"Close\"))),p.size>0?O().createElement(\"div\",null,O().createElement(\"div\",{className:\"scope-def\"},O().createElement(\"p\",null,\"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\"),O().createElement(\"p\",null,\"API requires the following scopes. Select which ones you want to grant to Swagger UI.\")),e.filter((e=>\"oauth2\"===e.get(\"type\"))).map(((e,t)=>O().createElement(\"div\",{key:t},O().createElement(s,{authorized:l,schema:e,name:t})))).toArray()):null,m.size>0&&O().createElement(\"div\",null,m.map(((e,s)=>O().createElement(n,{key:s,schema:e,name:s,getComponent:t,onAuthChange:this.onAuthChange,authorized:l,errSelectors:a,authSelectors:r}))).toArray()))}}const ys=auths_Auths,isOAS31=e=>{const t=e.get(\"openapi\");return\"string\"==typeof t&&/^3\\.1\\.(?:[1-9]\\d*|0)$/.test(t)},fn_createOnlyOAS31Selector=e=>(t,...r)=>a=>{if(a.getSystem().specSelectors.isOAS31()){const n=e(t,...r);return\"function\"==typeof n?n(a):n}return null},createOnlyOAS31SelectorWrapper=e=>(t,r)=>(a,...n)=>{if(r.getSystem().specSelectors.isOAS31()){const s=e(a,...n);return\"function\"==typeof s?s(t,r):s}return t(...n)},fn_createSystemSelector=e=>(t,...r)=>a=>{const n=e(t,a,...r);return\"function\"==typeof n?n(a):n},createOnlyOAS31ComponentWrapper=e=>(t,r)=>a=>r.specSelectors.isOAS31()?O().createElement(e,Qe()({},a,{originalComponent:t,getSystem:r.getSystem})):O().createElement(t,a),wrapOAS31Fn=(e,t)=>{const{fn:r,specSelectors:a}=t;return Object.fromEntries(Object.entries(e).map((([e,t])=>{const n=r[e];return[e,(...e)=>a.isOAS31()?t(...e):\"function\"==typeof n?n(...e):void 0]})))},fs=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31License\",!0);return O().createElement(t,null)})),Ss=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Contact\",!0);return O().createElement(t,null)})),Es=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const t=e().getComponent(\"OAS31Info\",!0);return O().createElement(t,null)})),getProperties=(e,{includeReadOnly:t,includeWriteOnly:r})=>{if(!e?.properties)return{};const a=Object.entries(e.properties).filter((([,e])=>(!(!0===e?.readOnly)||t)&&(!(!0===e?.writeOnly)||r)));return Object.fromEntries(a)},makeGetSchemaKeywords=e=>{if(\"function\"!=typeof e)return null;const t=e();return()=>[...t,\"discriminator\",\"xml\",\"externalDocs\",\"example\",\"$$ref\"]},_s=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e(),{getComponent:a,fn:n,getConfigs:s}=r,o=s(),l=a(\"OAS31Model\"),c=a(\"withJSONSchema202012SystemContext\");return _s.ModelWithJSONSchemaContext??=c(l,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:o.defaultModelExpandDepth,includeReadOnly:t.includeReadOnly,includeWriteOnly:t.includeWriteOnly},fn:{getProperties:n.jsonSchema202012.getProperties,isExpandable:n.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(n.jsonSchema202012.getSchemaKeywords)}}),O().createElement(_s.ModelWithJSONSchemaContext,t)})),vs=_s,ws=createOnlyOAS31ComponentWrapper((({getSystem:e})=>{const{getComponent:t,fn:r,getConfigs:a}=e(),n=a();if(ws.ModelsWithJSONSchemaContext)return O().createElement(ws.ModelsWithJSONSchemaContext,null);const s=t(\"OAS31Models\",!0),o=t(\"withJSONSchema202012SystemContext\");return ws.ModelsWithJSONSchemaContext??=o(s,{config:{default$schema:\"https://spec.openapis.org/oas/3.1/dialect/base\",defaultExpandedLevels:n.defaultModelsExpandDepth-1,includeReadOnly:!0,includeWriteOnly:!0},fn:{getProperties:r.jsonSchema202012.getProperties,isExpandable:r.jsonSchema202012.isExpandable,getSchemaKeywords:makeGetSchemaKeywords(r.jsonSchema202012.getSchemaKeywords)}}),O().createElement(ws.ModelsWithJSONSchemaContext,null)}));ws.ModelsWithJSONSchemaContext=null;const bs=ws,wrap_components_version_pragma_filter=(e,t)=>e=>{const r=t.specSelectors.isOAS31(),a=t.getComponent(\"OAS31VersionPragmaFilter\");return O().createElement(a,Qe()({isOAS31:r},e))},Cs=createOnlyOAS31ComponentWrapper((({originalComponent:e,...t})=>{const{getComponent:r,schema:a,name:n}=t,s=r(\"MutualTLSAuth\",!0);return\"mutualTLS\"===a.get(\"type\")?O().createElement(s,{schema:a,name:n}):O().createElement(e,t)})),xs=Cs,Os=createOnlyOAS31ComponentWrapper((({getSystem:e,...t})=>{const r=e().getComponent(\"OAS31Auths\",!0);return O().createElement(r,t)})),Ns=(0,k.Map)(),ks=(0,_e.createSelector)(((e,t)=>t.specSelectors.specJson()),isOAS31),selectors_webhooks=()=>e=>{const t=e.specSelectors.specJson().get(\"webhooks\");return k.Map.isMap(t)?t:Ns},As=(0,_e.createSelector)([(e,t)=>t.specSelectors.webhooks(),(e,t)=>t.specSelectors.validOperationMethods(),(e,t)=>t.specSelectors.specResolvedSubtree([\"webhooks\"])],((e,t)=>e.reduce(((e,r,a)=>{if(!k.Map.isMap(r))return e;const n=r.entrySeq().filter((([e])=>t.includes(e))).map((([e,t])=>({operation:(0,k.Map)({operation:t}),method:e,path:a,specPath:[\"webhooks\",a,e]})));return e.concat(n)}),(0,k.List)()).groupBy((e=>e.path)).map((e=>e.toArray())).toObject())),selectors_license=()=>e=>{const t=e.specSelectors.info().get(\"license\");return k.Map.isMap(t)?t:Ns},selectLicenseNameField=()=>e=>e.specSelectors.license().get(\"name\",\"License\"),selectLicenseUrlField=()=>e=>e.specSelectors.license().get(\"url\"),Is=(0,_e.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectLicenseIdentifierField=()=>e=>e.specSelectors.license().get(\"identifier\"),selectors_contact=()=>e=>{const t=e.specSelectors.info().get(\"contact\");return k.Map.isMap(t)?t:Ns},selectContactNameField=()=>e=>e.specSelectors.contact().get(\"name\",\"the developer\"),selectContactEmailField=()=>e=>e.specSelectors.contact().get(\"email\"),selectContactUrlField=()=>e=>e.specSelectors.contact().get(\"url\"),js=(0,_e.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectContactUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectInfoTitleField=()=>e=>e.specSelectors.info().get(\"title\"),selectInfoSummaryField=()=>e=>e.specSelectors.info().get(\"summary\"),selectInfoDescriptionField=()=>e=>e.specSelectors.info().get(\"description\"),selectInfoTermsOfServiceField=()=>e=>e.specSelectors.info().get(\"termsOfService\"),qs=(0,_e.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectInfoTermsOfServiceField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectExternalDocsDescriptionField=()=>e=>e.specSelectors.externalDocs().get(\"description\"),selectExternalDocsUrlField=()=>e=>e.specSelectors.externalDocs().get(\"url\"),Ps=(0,_e.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectExternalDocsUrlField()],((e,t,r)=>{if(r)return safeBuildUrl(r,e,{selectedServer:t})})),selectJsonSchemaDialectField=()=>e=>e.specSelectors.specJson().get(\"jsonSchemaDialect\"),selectJsonSchemaDialectDefault=()=>\"https://spec.openapis.org/oas/3.1/dialect/base\",Ms=(0,_e.createSelector)(((e,t)=>t.specSelectors.definitions()),((e,t)=>t.specSelectors.specResolvedSubtree([\"components\",\"schemas\"])),((e,t)=>k.Map.isMap(e)?k.Map.isMap(t)?Object.entries(e.toJS()).reduce(((e,[r,a])=>{const n=t.get(r);return e[r]=n?.toJS()||a,e}),{}):e.toJS():{})),wrap_selectors_isOAS3=(e,t)=>(r,...a)=>t.specSelectors.isOAS31()||e(...a),Ts=createOnlyOAS31SelectorWrapper((()=>(e,t)=>t.oas31Selectors.selectLicenseUrl())),Rs=createOnlyOAS31SelectorWrapper((()=>(e,t)=>{const r=t.specSelectors.securityDefinitions();let a=e();return r?(r.entrySeq().forEach((([e,t])=>{const r=t?.get(\"type\");\"mutualTLS\"===r&&(a=a.push(new k.Map({[e]:t})))})),a):a})),Js=(0,_e.createSelector)([(e,t)=>t.specSelectors.url(),(e,t)=>t.oas3Selectors.selectedServer(),(e,t)=>t.specSelectors.selectLicenseUrlField(),(e,t)=>t.specSelectors.selectLicenseIdentifierField()],((e,t,r,a)=>r?safeBuildUrl(r,e,{selectedServer:t}):a?`https://spdx.org/licenses/${a}.html`:void 0)),keywords_Example=({schema:e,getSystem:t})=>{const{fn:r,getComponent:a}=t(),{hasKeyword:n}=r.jsonSchema202012.useFn(),s=a(\"JSONSchema202012JSONViewer\");return n(e,\"example\")?O().createElement(s,{name:\"Example\",value:e.example,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--example\"}):null},keywords_Xml=({schema:e,getSystem:t})=>{const r=e?.xml||{},{fn:a,getComponent:n,getConfigs:s}=t(),{showExtensions:o}=s(),{useComponent:l,useIsExpanded:c,usePath:i,useLevel:p}=a.jsonSchema202012,{path:m}=i(\"xml\"),{isExpanded:u,setExpanded:d,setCollapsed:h}=c(\"xml\"),[g,y]=p(),f=o?getExtensions(r):[],S=!!(r.name||r.namespace||r.prefix||f.length>0),E=l(\"Accordion\"),_=l(\"ExpandDeepButton\"),v=n(\"OpenAPI31Extensions\"),w=n(\"JSONSchema202012PathContext\")(),b=n(\"JSONSchema202012LevelContext\")(),C=(0,x.useCallback)((()=>{u?h():d()}),[u,d,h]),N=(0,x.useCallback)(((e,t)=>{t?d({deep:!0}):h({deep:!0})}),[d,h]);return 0===Object.keys(r).length?null:O().createElement(w.Provider,{value:m},O().createElement(b.Provider,{value:y},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--xml\",\"data-json-schema-level\":g},S?O().createElement(O().Fragment,null,O().createElement(E,{expanded:u,onChange:C},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\")),O().createElement(_,{expanded:u,onClick:N})):O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"XML\"),!0===r.attribute&&O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"attribute\"),!0===r.wrapped&&O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"wrapped\"),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!u})},u&&O().createElement(O().Fragment,null,r.name&&O().createElement(\"li\",{className:\"json-schema-2020-12-property\"},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"name\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.name))),r.namespace&&O().createElement(\"li\",{className:\"json-schema-2020-12-property\"},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"namespace\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.namespace))),r.prefix&&O().createElement(\"li\",{className:\"json-schema-2020-12-property\"},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"prefix\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},r.prefix)))),f.length>0&&O().createElement(v,{openAPISpecObj:r,openAPIExtensions:f,getSystem:t})))))},Discriminator_DiscriminatorMapping=({discriminator:e})=>{const t=e?.mapping||{};return 0===Object.keys(t).length?null:Object.entries(t).map((([e,t])=>O().createElement(\"div\",{key:`${e}-${t}`,className:\"json-schema-2020-12-keyword\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},e),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},t))))},Discriminator_Discriminator=({schema:e,getSystem:t})=>{const r=e?.discriminator||{},{fn:a,getComponent:n,getConfigs:s}=t(),{showExtensions:o}=s(),{useComponent:l,useIsExpanded:c,usePath:i,useLevel:p}=a.jsonSchema202012,m=\"discriminator\",{path:u}=i(m),{isExpanded:d,setExpanded:h,setCollapsed:g}=c(m),[y,f]=p(),S=o?getExtensions(r):[],E=!!(r.mapping||S.length>0),_=l(\"Accordion\"),v=l(\"ExpandDeepButton\"),w=n(\"OpenAPI31Extensions\"),b=n(\"JSONSchema202012PathContext\")(),C=n(\"JSONSchema202012LevelContext\")(),N=(0,x.useCallback)((()=>{d?g():h()}),[d,h,g]),k=(0,x.useCallback)(((e,t)=>{t?h({deep:!0}):g({deep:!0})}),[h,g]);return 0===Object.keys(r).length?null:O().createElement(b.Provider,{value:u},O().createElement(C.Provider,{value:f},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--discriminator\",\"data-json-schema-level\":y},E?O().createElement(O().Fragment,null,O().createElement(_,{expanded:d,onChange:N},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\")),O().createElement(v,{expanded:d,onClick:k})):O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"Discriminator\"),r.propertyName&&O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},r.propertyName),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!d})},d&&O().createElement(\"li\",{className:\"json-schema-2020-12-property\"},O().createElement(Discriminator_DiscriminatorMapping,{discriminator:r})),S.length>0&&O().createElement(w,{openAPISpecObj:r,openAPIExtensions:S,getSystem:t})))))},keywords_OpenAPIExtensions=({openAPISpecObj:e,getSystem:t,openAPIExtensions:r})=>{const{fn:a}=t(),{useComponent:n}=a.jsonSchema202012,s=n(\"JSONViewer\");return r.map((t=>O().createElement(s,{key:t,name:t,value:e[t],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))},keywords_ExternalDocs=({schema:e,getSystem:t})=>{const r=e?.externalDocs||{},{fn:a,getComponent:n,getConfigs:s}=t(),{showExtensions:o}=s(),{useComponent:l,useIsExpanded:c,usePath:i,useLevel:p}=a.jsonSchema202012,m=\"externalDocs\",{path:u}=i(m),{isExpanded:d,setExpanded:h,setCollapsed:g}=c(m),[y,f]=p(),S=o?getExtensions(r):[],E=!!(r.description||r.url||S.length>0),_=l(\"Accordion\"),v=l(\"ExpandDeepButton\"),w=n(\"JSONSchema202012KeywordDescription\"),b=n(\"Link\"),C=n(\"OpenAPI31Extensions\"),N=n(\"JSONSchema202012PathContext\")(),k=n(\"JSONSchema202012LevelContext\")(),A=(0,x.useCallback)((()=>{d?g():h()}),[d,h,g]),I=(0,x.useCallback)(((e,t)=>{t?h({deep:!0}):g({deep:!0})}),[h,g]);return 0===Object.keys(r).length?null:O().createElement(N.Provider,{value:u},O().createElement(k.Provider,{value:f},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--externalDocs\",\"data-json-schema-level\":y},E?O().createElement(O().Fragment,null,O().createElement(_,{expanded:d,onChange:A},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\")),O().createElement(v,{expanded:d,onClick:I})):O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"External documentation\"),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!d})},d&&O().createElement(O().Fragment,null,r.description&&O().createElement(\"li\",{className:\"json-schema-2020-12-property\"},O().createElement(w,{schema:r,getSystem:t})),r.url&&O().createElement(\"li\",{className:\"json-schema-2020-12-property\"},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"url\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},O().createElement(b,{target:\"_blank\",href:sanitizeUrl(r.url)},r.url))))),S.length>0&&O().createElement(C,{openAPISpecObj:r,openAPIExtensions:S,getSystem:t})))))},keywords_Description=({schema:e,getSystem:t})=>{if(!e?.description)return null;const{getComponent:r}=t(),a=r(\"Markdown\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},O().createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},O().createElement(a,{source:e.description})))},$s=createOnlyOAS31ComponentWrapper(keywords_Description),Vs=createOnlyOAS31ComponentWrapper((({schema:e,getSystem:t,originalComponent:r})=>{const{getComponent:a}=t(),n=a(\"JSONSchema202012KeywordDiscriminator\"),s=a(\"JSONSchema202012KeywordXml\"),o=a(\"JSONSchema202012KeywordExample\"),l=a(\"JSONSchema202012KeywordExternalDocs\");return O().createElement(O().Fragment,null,O().createElement(r,{schema:e}),O().createElement(n,{schema:e,getSystem:t}),O().createElement(s,{schema:e,getSystem:t}),O().createElement(l,{schema:e,getSystem:t}),O().createElement(o,{schema:e,getSystem:t}))})),Ls=Vs,keywords_Properties=({schema:e,getSystem:t})=>{const{fn:r,getComponent:a}=t(),{useComponent:n,usePath:s}=r.jsonSchema202012,{getDependentRequired:o,getProperties:l}=r.jsonSchema202012.useFn(),c=r.jsonSchema202012.useConfig(),i=Array.isArray(e?.required)?e.required:[],{path:p}=s(\"properties\"),m=n(\"JSONSchema\"),u=a(\"JSONSchema202012PathContext\")(),d=l(e,c);return 0===Object.keys(d).length?null:O().createElement(u.Provider,{value:p},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},O().createElement(\"ul\",null,Object.entries(d).map((([t,r])=>{const a=i.includes(t),n=o(t,e);return O().createElement(\"li\",{key:t,className:pt()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":a})},O().createElement(m,{name:t,schema:r,dependentRequired:n}))})))))},Ds=createOnlyOAS31ComponentWrapper(keywords_Properties);const Us=function oas31_after_load_afterLoad({fn:e,getSystem:t}){if(e.jsonSchema202012){const r=((e,t)=>{const{fn:r}=t();if(\"function\"!=typeof e)return null;const{hasKeyword:a}=r.jsonSchema202012;return t=>e(t)||a(t,\"example\")||t?.xml||t?.discriminator||t?.externalDocs})(e.jsonSchema202012.isExpandable,t);Object.assign(this.fn.jsonSchema202012,{isExpandable:r,getProperties})}if(\"function\"==typeof e.sampleFromSchema&&e.jsonSchema202012){const r=wrapOAS31Fn({sampleFromSchema:e.jsonSchema202012.sampleFromSchema,sampleFromSchemaGeneric:e.jsonSchema202012.sampleFromSchemaGeneric,createXMLExample:e.jsonSchema202012.createXMLExample,memoizedSampleFromSchema:e.jsonSchema202012.memoizedSampleFromSchema,memoizedCreateXMLExample:e.jsonSchema202012.memoizedCreateXMLExample,getJsonSampleSchema:e.jsonSchema202012.getJsonSampleSchema,getYamlSampleSchema:e.jsonSchema202012.getYamlSampleSchema,getXmlSampleSchema:e.jsonSchema202012.getXmlSampleSchema,getSampleSchema:e.jsonSchema202012.getSampleSchema,mergeJsonSchema:e.jsonSchema202012.mergeJsonSchema,getSchemaObjectTypeLabel:t=>e.jsonSchema202012.getType(immutableToJS(t)),getSchemaObjectType:t=>e.jsonSchema202012.foldType(immutableToJS(t)?.type)},t());Object.assign(this.fn,r)}const r=(e=>(t,r=null)=>{const{fn:a}=e();if(a.isFileUploadIntendedOAS30(t,r))return!0;const n=k.Map.isMap(t);if(!n&&!wt()(t))return!1;const s=n?t.get(\"contentMediaType\"):t.contentMediaType,o=n?t.get(\"contentEncoding\"):t.contentEncoding;return\"string\"==typeof s&&\"\"!==s||\"string\"==typeof o&&\"\"!==o})(t),{isFileUploadIntended:a}=wrapOAS31Fn({isFileUploadIntended:r},t());if(this.fn.isFileUploadIntended=a,this.fn.isFileUploadIntendedOAS31=r,e.jsonSchema202012){const{hasSchemaType:r}=wrapOAS31Fn({hasSchemaType:e.jsonSchema202012.hasSchemaType},t());this.fn.hasSchemaType=r}},oas31=({fn:e})=>{const t=e.createSystemSelector||fn_createSystemSelector,r=e.createOnlyOAS31Selector||fn_createOnlyOAS31Selector;return{afterLoad:Us,fn:{isOAS31,createSystemSelector:fn_createSystemSelector,createOnlyOAS31Selector:fn_createOnlyOAS31Selector},components:{Webhooks:webhooks,JsonSchemaDialect:json_schema_dialect,MutualTLSAuth:mutual_tls_auth,OAS31Info:oas31_components_info,OAS31License:components_license,OAS31Contact:components_contact,OAS31VersionPragmaFilter:version_pragma_filter,OAS31Model:gs,OAS31Models:models,OAS31Auths:ys,JSONSchema202012KeywordExample:keywords_Example,JSONSchema202012KeywordXml:keywords_Xml,JSONSchema202012KeywordDiscriminator:Discriminator_Discriminator,JSONSchema202012KeywordExternalDocs:keywords_ExternalDocs,OpenAPI31Extensions:keywords_OpenAPIExtensions},wrapComponents:{InfoContainer:Es,License:fs,Contact:Ss,VersionPragmaFilter:wrap_components_version_pragma_filter,Model:vs,Models:bs,AuthItem:xs,auths:Os,JSONSchema202012KeywordDescription:$s,JSONSchema202012KeywordExamples:Ls,JSONSchema202012KeywordProperties:Ds},statePlugins:{auth:{wrapSelectors:{definitionsToAuthorize:Rs}},spec:{selectors:{isOAS31:t(ks),license:selectors_license,selectLicenseNameField,selectLicenseUrlField,selectLicenseIdentifierField:r(selectLicenseIdentifierField),selectLicenseUrl:t(Is),contact:selectors_contact,selectContactNameField,selectContactEmailField,selectContactUrlField,selectContactUrl:t(js),selectInfoTitleField,selectInfoSummaryField:r(selectInfoSummaryField),selectInfoDescriptionField,selectInfoTermsOfServiceField,selectInfoTermsOfServiceUrl:t(qs),selectExternalDocsDescriptionField,selectExternalDocsUrlField,selectExternalDocsUrl:t(Ps),webhooks:r(selectors_webhooks),selectWebhooksOperations:r(t(As)),selectJsonSchemaDialectField,selectJsonSchemaDialectDefault,selectSchemas:t(Ms)},wrapSelectors:{isOAS3:wrap_selectors_isOAS3,selectLicenseUrl:Ts}},oas31:{selectors:{selectLicenseUrl:r(t(Js))}}}}},Ks=Oe().object,zs=Oe().bool,Bs=(Oe().oneOfType([Ks,zs]),(0,x.createContext)(null));Bs.displayName=\"JSONSchemaContext\";const Fs=(0,x.createContext)(0);Fs.displayName=\"JSONSchemaLevelContext\";const Ws=(0,x.createContext)(new Set),Hs=(0,x.createContext)([]);class JSONSchemaIsExpandedState{static Collapsed=\"collapsed\";static Expanded=\"expanded\";static DeeplyExpanded=\"deeply-expanded\"}const useConfig=()=>{const{config:e}=(0,x.useContext)(Bs);return e},useComponent=e=>{const{components:t}=(0,x.useContext)(Bs);return t[e]||null},useFn=(e=void 0)=>{const{fn:t}=(0,x.useContext)(Bs);return void 0!==e?t[e]:t},useJSONSchemaContextState=()=>{const[,e]=(0,x.useState)(null),{state:t}=(0,x.useContext)(Bs);return{state:t,setState:r=>{r(t),e({})}}},useLevel=()=>{const e=(0,x.useContext)(Fs);return[e,e+1]},usePath=e=>{const t=(0,x.useContext)(Hs),{setState:r}=useJSONSchemaContextState(),a=\"string\"==typeof e?[...t,e]:t;return{path:a,pathMutator:(e,t={deep:!1})=>{const n=a.toString(),updateFn=t=>{t.paths[n]=e,e===JSONSchemaIsExpandedState.Collapsed&&Object.keys(t.paths).forEach((e=>{e.startsWith(n)&&t.paths[e]===JSONSchemaIsExpandedState.DeeplyExpanded&&(t.paths[e]=JSONSchemaIsExpandedState.Expanded)}))},updateDeepFn=t=>{Object.keys(t.paths).forEach((r=>{r.startsWith(n)&&(t.paths[r]=e)}))};t.deep?r(updateDeepFn):r(updateFn)}}},useIsExpanded=e=>{const[t]=useLevel(),{defaultExpandedLevels:r}=useConfig(),{path:a,pathMutator:n}=usePath(e),{path:s}=usePath(),{state:o}=useJSONSchemaContextState(),l=o.paths[a.toString()],c=o.paths[s.toString()]??o.paths[s.slice(0,-1).toString()],i=l??(r-t>0?JSONSchemaIsExpandedState.Expanded:JSONSchemaIsExpandedState.Collapsed),p=i!==JSONSchemaIsExpandedState.Collapsed;(0,x.useEffect)((()=>{n(c===JSONSchemaIsExpandedState.DeeplyExpanded?JSONSchemaIsExpandedState.DeeplyExpanded:i)}),[c]);return{isExpanded:p,setExpanded:(0,x.useCallback)(((e={deep:!1})=>{n(e.deep?JSONSchemaIsExpandedState.DeeplyExpanded:JSONSchemaIsExpandedState.Expanded)}),[]),setCollapsed:(0,x.useCallback)(((e={deep:!1})=>{n(JSONSchemaIsExpandedState.Collapsed,e)}),[])}},useRenderedSchemas=(e=void 0)=>{if(void 0===e)return(0,x.useContext)(Ws);const t=(0,x.useContext)(Ws);return new Set([...t,e])},Xs=(0,x.forwardRef)((({schema:e,name:t=\"\",dependentRequired:r=[],onExpand:a=()=>{},identifier:n=\"\"},s)=>{const o=useFn(),l=n||e?.$id||t,{path:c}=usePath(l),{isExpanded:i,setExpanded:p,setCollapsed:m}=useIsExpanded(l),[u,d]=useLevel(),h=(()=>{const[e]=useLevel();return e>0})(),g=o.isExpandable(e)||r.length>0,y=(e=>useRenderedSchemas().has(e))(e),f=useRenderedSchemas(e),S=o.stringifyConstraints(e),E=useComponent(\"Accordion\"),_=useComponent(\"Keyword$schema\"),v=useComponent(\"Keyword$vocabulary\"),w=useComponent(\"Keyword$id\"),b=useComponent(\"Keyword$anchor\"),C=useComponent(\"Keyword$dynamicAnchor\"),N=useComponent(\"Keyword$ref\"),k=useComponent(\"Keyword$dynamicRef\"),A=useComponent(\"Keyword$defs\"),I=useComponent(\"Keyword$comment\"),j=useComponent(\"KeywordAllOf\"),q=useComponent(\"KeywordAnyOf\"),P=useComponent(\"KeywordOneOf\"),M=useComponent(\"KeywordNot\"),T=useComponent(\"KeywordIf\"),R=useComponent(\"KeywordThen\"),J=useComponent(\"KeywordElse\"),$=useComponent(\"KeywordDependentSchemas\"),V=useComponent(\"KeywordPrefixItems\"),L=useComponent(\"KeywordItems\"),D=useComponent(\"KeywordContains\"),U=useComponent(\"KeywordProperties\"),K=useComponent(\"KeywordPatternProperties\"),z=useComponent(\"KeywordAdditionalProperties\"),B=useComponent(\"KeywordPropertyNames\"),F=useComponent(\"KeywordUnevaluatedItems\"),W=useComponent(\"KeywordUnevaluatedProperties\"),H=useComponent(\"KeywordType\"),X=useComponent(\"KeywordEnum\"),G=useComponent(\"KeywordConst\"),Y=useComponent(\"KeywordConstraint\"),Q=useComponent(\"KeywordDependentRequired\"),Z=useComponent(\"KeywordContentSchema\"),ee=useComponent(\"KeywordTitle\"),te=useComponent(\"KeywordDescription\"),re=useComponent(\"KeywordDefault\"),ae=useComponent(\"KeywordDeprecated\"),ne=useComponent(\"KeywordReadOnly\"),se=useComponent(\"KeywordWriteOnly\"),oe=useComponent(\"KeywordExamples\"),le=useComponent(\"ExtensionKeywords\"),ce=useComponent(\"ExpandDeepButton\"),ie=(0,x.useCallback)(((e,t)=>{t?p():m(),a(e,t,!1)}),[a,p,m]),pe=(0,x.useCallback)(((e,t)=>{t?p({deep:!0}):m({deep:!0}),a(e,t,!0)}),[a,p,m]);return O().createElement(Hs.Provider,{value:c},O().createElement(Fs.Provider,{value:d},O().createElement(Ws.Provider,{value:f},O().createElement(\"article\",{ref:s,\"data-json-schema-level\":u,className:pt()(\"json-schema-2020-12\",{\"json-schema-2020-12--embedded\":h,\"json-schema-2020-12--circular\":y})},O().createElement(\"div\",{className:\"json-schema-2020-12-head\"},g&&!y?O().createElement(O().Fragment,null,O().createElement(E,{expanded:i,onChange:ie},O().createElement(ee,{title:t,schema:e})),O().createElement(ce,{expanded:i,onClick:pe})):O().createElement(ee,{title:t,schema:e}),O().createElement(ae,{schema:e}),O().createElement(ne,{schema:e}),O().createElement(se,{schema:e}),O().createElement(H,{schema:e,isCircular:y}),S.length>0&&S.map((e=>O().createElement(Y,{key:`${e.scope}-${e.value}`,constraint:e})))),O().createElement(\"div\",{className:pt()(\"json-schema-2020-12-body\",{\"json-schema-2020-12-body--collapsed\":!i})},i&&O().createElement(O().Fragment,null,O().createElement(te,{schema:e}),!y&&g&&O().createElement(O().Fragment,null,O().createElement(U,{schema:e}),O().createElement(K,{schema:e}),O().createElement(z,{schema:e}),O().createElement(W,{schema:e}),O().createElement(B,{schema:e}),O().createElement(j,{schema:e}),O().createElement(q,{schema:e}),O().createElement(P,{schema:e}),O().createElement(M,{schema:e}),O().createElement(T,{schema:e}),O().createElement(R,{schema:e}),O().createElement(J,{schema:e}),O().createElement($,{schema:e}),O().createElement(V,{schema:e}),O().createElement(L,{schema:e}),O().createElement(F,{schema:e}),O().createElement(D,{schema:e}),O().createElement(Z,{schema:e})),O().createElement(X,{schema:e}),O().createElement(G,{schema:e}),O().createElement(Q,{schema:e,dependentRequired:r}),O().createElement(re,{schema:e}),O().createElement(oe,{schema:e}),O().createElement(_,{schema:e}),O().createElement(v,{schema:e}),O().createElement(w,{schema:e}),O().createElement(b,{schema:e}),O().createElement(C,{schema:e}),O().createElement(N,{schema:e}),!y&&g&&O().createElement(A,{schema:e}),O().createElement(k,{schema:e}),O().createElement(I,{schema:e}),O().createElement(le,{schema:e})))))))})),Gs=Xs,keywords_$schema=({schema:e})=>e?.$schema?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$schema\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$schema\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$schema)):null,$vocabulary_$vocabulary=({schema:e})=>{const t=\"$vocabulary\",{path:r}=usePath(t),{isExpanded:a,setExpanded:n,setCollapsed:s}=useIsExpanded(t),o=useComponent(\"Accordion\"),l=(0,x.useCallback)((()=>{a?s():n()}),[a,n,s]);return e?.$vocabulary?\"object\"!=typeof e.$vocabulary?null:O().createElement(Hs.Provider,{value:r},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$vocabulary\"},O().createElement(o,{expanded:a,onChange:l},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$vocabulary\")),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),O().createElement(\"ul\",null,a&&Object.entries(e.$vocabulary).map((([e,t])=>O().createElement(\"li\",{key:e,className:pt()(\"json-schema-2020-12-$vocabulary-uri\",{\"json-schema-2020-12-$vocabulary-uri--disabled\":!t})},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e))))))):null},keywords_$id=({schema:e})=>e?.$id?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$id\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$id\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$id)):null,keywords_$anchor=({schema:e})=>e?.$anchor?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$anchor\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$anchor\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$anchor)):null,keywords_$dynamicAnchor=({schema:e})=>e?.$dynamicAnchor?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicAnchor\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicAnchor\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicAnchor)):null,keywords_$ref=({schema:e})=>e?.$ref?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$ref\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$ref\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$ref)):null,keywords_$dynamicRef=({schema:e})=>e?.$dynamicRef?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$dynamicRef\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$dynamicRef\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$dynamicRef)):null,keywords_$defs=({schema:e})=>{const t=e?.$defs||{},r=\"$defs\",{path:a}=usePath(r),{isExpanded:n,setExpanded:s,setCollapsed:o}=useIsExpanded(r),[l,c]=useLevel(),i=useComponent(\"Accordion\"),p=useComponent(\"ExpandDeepButton\"),m=useComponent(\"JSONSchema\"),u=(0,x.useCallback)((()=>{n?o():s()}),[n,s,o]),d=(0,x.useCallback)(((e,t)=>{t?s({deep:!0}):o({deep:!0})}),[s,o]);return 0===Object.keys(t).length?null:O().createElement(Hs.Provider,{value:a},O().createElement(Fs.Provider,{value:c},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$defs\",\"data-json-schema-level\":l},O().createElement(i,{expanded:n,onChange:u},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$defs\")),O().createElement(p,{expanded:n,onClick:d}),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!n})},n&&O().createElement(O().Fragment,null,Object.entries(t).map((([e,t])=>O().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},O().createElement(m,{name:e,schema:t})))))))))},keywords_$comment=({schema:e})=>e?.$comment?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--$comment\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--secondary\"},\"$comment\"),O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--secondary\"},e.$comment)):null,keywords_AllOf=({schema:e})=>{const t=e?.allOf||[],r=useFn(),a=\"allOf\",{path:n}=usePath(a),{isExpanded:s,setExpanded:o,setCollapsed:l}=useIsExpanded(a),[c,i]=useLevel(),p=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),u=useComponent(\"JSONSchema\"),d=useComponent(\"KeywordType\"),h=(0,x.useCallback)((()=>{s?l():o()}),[s,o,l]),g=(0,x.useCallback)(((e,t)=>{t?o({deep:!0}):l({deep:!0})}),[o,l]);return Array.isArray(t)&&0!==t.length?O().createElement(Hs.Provider,{value:n},O().createElement(Fs.Provider,{value:i},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--allOf\",\"data-json-schema-level\":c},O().createElement(p,{expanded:s,onChange:h},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"All of\")),O().createElement(m,{expanded:s,onClick:g}),O().createElement(d,{schema:{allOf:t}}),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&O().createElement(O().Fragment,null,t.map(((e,t)=>O().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},O().createElement(u,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null},keywords_AnyOf=({schema:e})=>{const t=e?.anyOf||[],r=useFn(),a=\"anyOf\",{path:n}=usePath(a),{isExpanded:s,setExpanded:o,setCollapsed:l}=useIsExpanded(a),[c,i]=useLevel(),p=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),u=useComponent(\"JSONSchema\"),d=useComponent(\"KeywordType\"),h=(0,x.useCallback)((()=>{s?l():o()}),[s,o,l]),g=(0,x.useCallback)(((e,t)=>{t?o({deep:!0}):l({deep:!0})}),[o,l]);return Array.isArray(t)&&0!==t.length?O().createElement(Hs.Provider,{value:n},O().createElement(Fs.Provider,{value:i},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--anyOf\",\"data-json-schema-level\":c},O().createElement(p,{expanded:s,onChange:h},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Any of\")),O().createElement(m,{expanded:s,onClick:g}),O().createElement(d,{schema:{anyOf:t}}),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&O().createElement(O().Fragment,null,t.map(((e,t)=>O().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},O().createElement(u,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null},keywords_OneOf=({schema:e})=>{const t=e?.oneOf||[],r=useFn(),a=\"oneOf\",{path:n}=usePath(a),{isExpanded:s,setExpanded:o,setCollapsed:l}=useIsExpanded(a),[c,i]=useLevel(),p=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),u=useComponent(\"JSONSchema\"),d=useComponent(\"KeywordType\"),h=(0,x.useCallback)((()=>{s?l():o()}),[s,o,l]),g=(0,x.useCallback)(((e,t)=>{t?o({deep:!0}):l({deep:!0})}),[o,l]);return Array.isArray(t)&&0!==t.length?O().createElement(Hs.Provider,{value:n},O().createElement(Fs.Provider,{value:i},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--oneOf\",\"data-json-schema-level\":c},O().createElement(p,{expanded:s,onChange:h},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"One of\")),O().createElement(m,{expanded:s,onClick:g}),O().createElement(d,{schema:{oneOf:t}}),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&O().createElement(O().Fragment,null,t.map(((e,t)=>O().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},O().createElement(u,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null},keywords_Not=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"not\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Not\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--not\"},O().createElement(r,{name:a,schema:e.not,identifier:\"not\"}))},keywords_If=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"if\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"If\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},O().createElement(r,{name:a,schema:e.if,identifier:\"if\"}))},keywords_Then=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"then\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Then\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--then\"},O().createElement(r,{name:a,schema:e.then,identifier:\"then\"}))},keywords_Else=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"else\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Else\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--if\"},O().createElement(r,{name:a,schema:e.else,identifier:\"else\"}))},keywords_DependentSchemas=({schema:e})=>{const t=e?.dependentSchemas||[],r=\"dependentSchemas\",{path:a}=usePath(r),{isExpanded:n,setExpanded:s,setCollapsed:o}=useIsExpanded(r),[l,c]=useLevel(),i=useComponent(\"Accordion\"),p=useComponent(\"ExpandDeepButton\"),m=useComponent(\"JSONSchema\"),u=(0,x.useCallback)((()=>{n?o():s()}),[n,s,o]),d=(0,x.useCallback)(((e,t)=>{t?s({deep:!0}):o({deep:!0})}),[s,o]);return\"object\"!=typeof t||0===Object.keys(t).length?null:O().createElement(Hs.Provider,{value:a},O().createElement(Fs.Provider,{value:c},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentSchemas\",\"data-json-schema-level\":l},O().createElement(i,{expanded:n,onChange:u},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Dependent schemas\")),O().createElement(p,{expanded:n,onClick:d}),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"object\"),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!n})},n&&O().createElement(O().Fragment,null,Object.entries(t).map((([e,t])=>O().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},O().createElement(m,{name:e,schema:t})))))))))},keywords_PrefixItems=({schema:e})=>{const t=e?.prefixItems||[],r=useFn(),a=\"prefixItems\",{path:n}=usePath(a),{isExpanded:s,setExpanded:o,setCollapsed:l}=useIsExpanded(a),[c,i]=useLevel(),p=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),u=useComponent(\"JSONSchema\"),d=useComponent(\"KeywordType\"),h=(0,x.useCallback)((()=>{s?l():o()}),[s,o,l]),g=(0,x.useCallback)(((e,t)=>{t?o({deep:!0}):l({deep:!0})}),[o,l]);return Array.isArray(t)&&0!==t.length?O().createElement(Hs.Provider,{value:n},O().createElement(Fs.Provider,{value:i},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--prefixItems\",\"data-json-schema-level\":c},O().createElement(p,{expanded:s,onChange:h},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Prefix items\")),O().createElement(m,{expanded:s,onClick:g}),O().createElement(d,{schema:{prefixItems:t}}),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!s})},s&&O().createElement(O().Fragment,null,t.map(((e,t)=>O().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},O().createElement(u,{name:`#${t} ${r.getTitle(e)}`,schema:e}))))))))):null},keywords_Items=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"items\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Items\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--items\"},O().createElement(r,{name:a,schema:e.items,identifier:\"items\"}))},keywords_Contains=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contains\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Contains\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contains\"},O().createElement(r,{name:a,schema:e.contains,identifier:\"contains\"}))},keywords_Properties_Properties=({schema:e})=>{const t=useFn(),r=e?.properties||{},a=Array.isArray(e?.required)?e.required:[],n=useComponent(\"JSONSchema\"),{path:s}=usePath(\"properties\");return 0===Object.keys(r).length?null:O().createElement(Hs.Provider,{value:s},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--properties\"},O().createElement(\"ul\",null,Object.entries(r).map((([r,s])=>{const o=a.includes(r),l=t.getDependentRequired(r,e);return O().createElement(\"li\",{key:r,className:pt()(\"json-schema-2020-12-property\",{\"json-schema-2020-12-property--required\":o})},O().createElement(n,{name:r,schema:s,dependentRequired:l}))})))))},PatternProperties_PatternProperties=({schema:e})=>{const t=e?.patternProperties||{},r=useComponent(\"JSONSchema\"),{path:a}=usePath(\"patternProperties\");return 0===Object.keys(t).length?null:O().createElement(Hs.Provider,{value:a},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--patternProperties\"},O().createElement(\"ul\",null,Object.entries(t).map((([e,t])=>O().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},O().createElement(r,{name:e,schema:t})))))))},keywords_AdditionalProperties=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"additionalProperties\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Additional properties\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--additionalProperties\"},!0===e.additionalProperties?O().createElement(O().Fragment,null,a,O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"allowed\")):!1===e.additionalProperties?O().createElement(O().Fragment,null,a,O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},\"forbidden\")):O().createElement(r,{name:a,schema:e.additionalProperties,identifier:\"additionalProperties\"}))},keywords_PropertyNames=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\"),a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Property names\");return t.hasKeyword(e,\"propertyNames\")?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--propertyNames\"},O().createElement(r,{name:a,schema:e.propertyNames,identifier:\"propertyNames\"})):null},keywords_UnevaluatedItems=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedItems\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated items\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedItems\"},O().createElement(r,{name:a,schema:e.unevaluatedItems,identifier:\"unevaluatedItems\"}))},keywords_UnevaluatedProperties=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"unevaluatedProperties\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Unevaluated properties\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--unevaluatedProperties\"},O().createElement(r,{name:a,schema:e.unevaluatedProperties,identifier:\"unevaluatedProperties\"}))},keywords_Type=({schema:e,isCircular:t=!1})=>{const r=useFn().getType(e),a=t?\" [circular]\":\"\";return O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},`${r}${a}`)},Enum_Enum=({schema:e})=>{const t=useComponent(\"JSONViewer\");return Array.isArray(e?.enum)?O().createElement(t,{name:\"Enum\",value:e.enum,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--enum\"}):null},Const_Const=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONViewer\");return t.hasKeyword(e,\"const\")?O().createElement(r,{name:\"Const\",value:e.const,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--const\"}):null},fn_upperFirst=e=>\"string\"==typeof e?`${e.charAt(0).toUpperCase()}${e.slice(1)}`:e,makeGetTitle=e=>(t,{lookup:r=\"extended\"}={})=>{const a=e();if(null!=t?.title)return a.upperFirst(String(t.title));if(\"extended\"===r){if(null!=t?.$anchor)return a.upperFirst(String(t.$anchor));if(null!=t?.$id)return String(t.$id)}return\"\"},makeGetType=e=>{const getType=(t,r=new WeakSet)=>{const a=e();if(null==t)return\"any\";if(a.isBooleanJSONSchema(t))return t?\"any\":\"never\";if(\"object\"!=typeof t)return\"any\";if(r.has(t))return\"any\";r.add(t);const{type:n,prefixItems:s,items:o}=t,getArrayType=()=>{if(Array.isArray(s)){const e=s.map((e=>getType(e,r))),t=o?getType(o,r):\"any\";return`array<[${e.join(\", \")}], ${t}>`}if(o){return`array<${getType(o,r)}>`}return\"array<any>\"};if(t.not&&\"any\"===getType(t.not))return\"never\";const handleCombiningKeywords=(e,a)=>{if(Array.isArray(t[e])){return`(${t[e].map((e=>getType(e,r))).join(a)})`}return null},l=[Array.isArray(n)?n.map((e=>\"array\"===e?getArrayType():e)).join(\" | \"):\"array\"===n?getArrayType():[\"null\",\"boolean\",\"object\",\"array\",\"number\",\"integer\",\"string\"].includes(n)?n:(()=>{if(Object.hasOwn(t,\"prefixItems\")||Object.hasOwn(t,\"items\")||Object.hasOwn(t,\"contains\"))return getArrayType();if(Object.hasOwn(t,\"properties\")||Object.hasOwn(t,\"additionalProperties\")||Object.hasOwn(t,\"patternProperties\"))return\"object\";if([\"int32\",\"int64\"].includes(t.format))return\"integer\";if([\"float\",\"double\"].includes(t.format))return\"number\";if(Object.hasOwn(t,\"minimum\")||Object.hasOwn(t,\"maximum\")||Object.hasOwn(t,\"exclusiveMinimum\")||Object.hasOwn(t,\"exclusiveMaximum\")||Object.hasOwn(t,\"multipleOf\"))return\"number | integer\";if(Object.hasOwn(t,\"pattern\")||Object.hasOwn(t,\"format\")||Object.hasOwn(t,\"minLength\")||Object.hasOwn(t,\"maxLength\")||Object.hasOwn(t,\"contentEncoding\")||Object.hasOwn(t,\"contentMediaType\"))return\"string\";if(void 0!==t.const){if(null===t.const)return\"null\";if(\"boolean\"==typeof t.const)return\"boolean\";if(\"number\"==typeof t.const)return Number.isInteger(t.const)?\"integer\":\"number\";if(\"string\"==typeof t.const)return\"string\";if(Array.isArray(t.const))return\"array<any>\";if(\"object\"==typeof t.const)return\"object\"}return null})(),handleCombiningKeywords(\"oneOf\",\" | \"),handleCombiningKeywords(\"anyOf\",\" | \"),handleCombiningKeywords(\"allOf\",\" & \")].filter(Boolean).join(\" | \");return r.delete(t),l||\"any\"};return getType},isBooleanJSONSchema=e=>\"boolean\"==typeof e,hasKeyword=(e,t)=>null!==e&&\"object\"==typeof e&&Object.hasOwn(e,t),fn_makeIsExpandable=e=>t=>{const r=e();return t?.$schema||t?.$vocabulary||t?.$id||t?.$anchor||t?.$dynamicAnchor||t?.$ref||t?.$dynamicRef||t?.$defs||t?.$comment||t?.allOf||t?.anyOf||t?.oneOf||r.hasKeyword(t,\"not\")||r.hasKeyword(t,\"if\")||r.hasKeyword(t,\"then\")||r.hasKeyword(t,\"else\")||t?.dependentSchemas||t?.prefixItems||r.hasKeyword(t,\"items\")||r.hasKeyword(t,\"contains\")||t?.properties||t?.patternProperties||r.hasKeyword(t,\"additionalProperties\")||r.hasKeyword(t,\"propertyNames\")||r.hasKeyword(t,\"unevaluatedItems\")||r.hasKeyword(t,\"unevaluatedProperties\")||t?.description||t?.enum||r.hasKeyword(t,\"const\")||r.hasKeyword(t,\"contentSchema\")||r.hasKeyword(t,\"default\")||t?.examples||r.getExtensionKeywords(t).length>0},fn_stringify=e=>null===e||[\"number\",\"bigint\",\"boolean\"].includes(typeof e)?String(e):Array.isArray(e)?`[${e.map(fn_stringify).join(\", \")}]`:JSON.stringify(e),stringifyConstraintRange=(e,t,r)=>{const a=\"number\"==typeof t,n=\"number\"==typeof r;return a&&n?t===r?`${t} ${e}`:`[${t}, ${r}] ${e}`:a?`≥ ${t} ${e}`:n?`≤ ${r} ${e}`:null},stringifyConstraints=e=>{const t=[],r=(e=>{if(\"number\"!=typeof e?.multipleOf)return null;if(e.multipleOf<=0)return null;if(1===e.multipleOf)return null;const{multipleOf:t}=e;if(Number.isInteger(t))return`multiple of ${t}`;const r=10**t.toString().split(\".\")[1].length;return`multiple of ${t*r}/${r}`})(e);null!==r&&t.push({scope:\"number\",value:r});const a=(e=>{const t=e?.minimum,r=e?.maximum,a=e?.exclusiveMinimum,n=e?.exclusiveMaximum,s=\"number\"==typeof t,o=\"number\"==typeof r,l=\"number\"==typeof a,c=\"number\"==typeof n,i=l&&(!s||t<a),p=c&&(!o||r>n);if((s||l)&&(o||c))return`${i?\"(\":\"[\"}${i?a:t}, ${p?n:r}${p?\")\":\"]\"}`;if(s||l)return`${i?\">\":\"≥\"} ${i?a:t}`;if(o||c)return`${p?\"<\":\"≤\"} ${p?n:r}`;return null})(e);null!==a&&t.push({scope:\"number\",value:a}),e?.format&&t.push({scope:\"string\",value:e.format});const n=stringifyConstraintRange(\"characters\",e?.minLength,e?.maxLength);null!==n&&t.push({scope:\"string\",value:n}),e?.pattern&&t.push({scope:\"string\",value:`matches ${e?.pattern}`}),e?.contentMediaType&&t.push({scope:\"string\",value:`media type: ${e.contentMediaType}`}),e?.contentEncoding&&t.push({scope:\"string\",value:`encoding: ${e.contentEncoding}`});const s=stringifyConstraintRange(e?.uniqueItems?\"unique items\":\"items\",e?.minItems,e?.maxItems);null!==s&&t.push({scope:\"array\",value:s}),e?.uniqueItems&&!s&&t.push({scope:\"array\",value:\"unique\"});const o=stringifyConstraintRange(\"contained items\",e?.minContains,e?.maxContains);null!==o&&t.push({scope:\"array\",value:o});const l=stringifyConstraintRange(\"properties\",e?.minProperties,e?.maxProperties);return null!==l&&t.push({scope:\"object\",value:l}),t},getDependentRequired=(e,t)=>t?.dependentRequired?Array.from(Object.entries(t.dependentRequired).reduce(((t,[r,a])=>Array.isArray(a)&&a.includes(e)?(t.add(r),t):t),new Set)):[],isPlainObject=e=>\"object\"==typeof e&&null!==e&&!Array.isArray(e)&&(null===Object.getPrototypeOf(e)||Object.getPrototypeOf(e)===Object.prototype),getSchemaKeywords=()=>[\"$schema\",\"$vocabulary\",\"$id\",\"$anchor\",\"$dynamicAnchor\",\"$dynamicRef\",\"$ref\",\"$defs\",\"$comment\",\"allOf\",\"anyOf\",\"oneOf\",\"not\",\"if\",\"then\",\"else\",\"dependentSchemas\",\"prefixItems\",\"items\",\"contains\",\"properties\",\"patternProperties\",\"additionalProperties\",\"propertyNames\",\"unevaluatedItems\",\"unevaluatedProperties\",\"type\",\"enum\",\"const\",\"multipleOf\",\"maximum\",\"exclusiveMaximum\",\"minimum\",\"exclusiveMinimum\",\"maxLength\",\"minLength\",\"pattern\",\"maxItems\",\"minItems\",\"uniqueItems\",\"maxContains\",\"minContains\",\"maxProperties\",\"minProperties\",\"required\",\"dependentRequired\",\"title\",\"description\",\"default\",\"deprecated\",\"readOnly\",\"writeOnly\",\"examples\",\"format\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],makeGetExtensionKeywords=e=>t=>{const r=e().getSchemaKeywords();return isPlainObject(t)?((e,t)=>{const r=new Set(t);return e.filter((e=>!r.has(e)))})(Object.keys(t),r):[]},fn_hasSchemaType=(e,t)=>{const r=k.Map.isMap(e);if(!r&&!isPlainObject(e))return!1;const hasType=e=>t===e||Array.isArray(t)&&t.includes(e),a=r?e.get(\"type\"):e.type;return k.List.isList(a)||Array.isArray(a)?a.some((e=>hasType(e))):hasType(a)},Constraint=({constraint:e})=>isPlainObject(e)&&\"string\"==typeof e.scope&&\"string\"==typeof e.value?O().createElement(\"span\",{className:`json-schema-2020-12__constraint json-schema-2020-12__constraint--${e.scope}`},e.value):null,Ys=O().memo(Constraint),DependentRequired_DependentRequired=({dependentRequired:e})=>Array.isArray(e)&&0!==e.length?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--dependentRequired\"},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Required when defined\"),O().createElement(\"ul\",null,e.map((e=>O().createElement(\"li\",{key:e},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__value json-schema-2020-12-keyword__value--warning\"},e)))))):null,keywords_ContentSchema=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONSchema\");if(!t.hasKeyword(e,\"contentSchema\"))return null;const a=O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--primary\"},\"Content schema\");return O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--contentSchema\"},O().createElement(r,{name:a,schema:e.contentSchema,identifier:\"contentSchema\"}))},Title_Title=({title:e=\"\",schema:t})=>{const r=useFn(),a=e||r.getTitle(t);return a?O().createElement(\"div\",{className:\"json-schema-2020-12__title\"},a):null},keywords_Description_Description=({schema:e})=>e?.description?O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--description\"},O().createElement(\"div\",{className:\"json-schema-2020-12-core-keyword__value json-schema-2020-12-core-keyword__value--secondary\"},e.description)):null,Default_Default=({schema:e})=>{const t=useFn(),r=useComponent(\"JSONViewer\");return t.hasKeyword(e,\"default\")?O().createElement(r,{name:\"Default\",value:e.default,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--default\"}):null},keywords_Deprecated=({schema:e})=>!0!==e?.deprecated?null:O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--warning\"},\"deprecated\"),keywords_ReadOnly=({schema:e})=>!0!==e?.readOnly?null:O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"read-only\"),keywords_WriteOnly=({schema:e})=>!0!==e?.writeOnly?null:O().createElement(\"span\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--muted\"},\"write-only\"),keywords_Examples_Examples=({schema:e})=>{const t=e?.examples||[],r=useComponent(\"JSONViewer\");return Array.isArray(t)&&0!==t.length?O().createElement(r,{name:\"Examples\",value:e.examples,className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--examples\"}):null},ExtensionKeywords_ExtensionKeywords=({schema:e})=>{const t=useFn(),r=\"ExtensionKeywords\",{path:a}=usePath(r),{isExpanded:n,setExpanded:s,setCollapsed:o}=useIsExpanded(r),[l,c]=useLevel(),i=useComponent(\"Accordion\"),p=useComponent(\"ExpandDeepButton\"),m=useComponent(\"JSONViewer\"),{showExtensionKeywords:u}=useConfig(),d=t.getExtensionKeywords(e),h=(0,x.useCallback)((()=>{n?o():s()}),[n,s,o]),g=(0,x.useCallback)(((e,t)=>{t?s({deep:!0}):o({deep:!0})}),[s,o]);return u&&0!==d.length?O().createElement(Hs.Provider,{value:a},O().createElement(Fs.Provider,{value:c},O().createElement(\"div\",{className:\"json-schema-2020-12-keyword json-schema-2020-12-keyword--extension-keywords\",\"data-json-schema-level\":l},O().createElement(i,{expanded:n,onChange:h},O().createElement(\"span\",{className:\"json-schema-2020-12-keyword__name json-schema-2020-12-keyword__name--extension\"},\"Extension Keywords\")),O().createElement(p,{expanded:n,onClick:g}),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-keyword__children\",{\"json-schema-2020-12-keyword__children--collapsed\":!n})},n&&O().createElement(O().Fragment,null,d.map((t=>O().createElement(m,{key:t,name:t,value:e[t],className:\"json-schema-2020-12-json-viewer-extension-keyword\"})))))))):null},JSONViewer=({name:e,value:t,className:r})=>{const a=useFn(),{path:n}=usePath(e),{isExpanded:s,setExpanded:o,setCollapsed:l}=useIsExpanded(e),[c,i]=useLevel(),p=useComponent(\"Accordion\"),m=useComponent(\"ExpandDeepButton\"),u=\"string\"==typeof t||\"number\"==typeof t||\"bigint\"==typeof t||\"boolean\"==typeof t||\"symbol\"==typeof t||null==t,d=(e=>isPlainObject(e)&&0===Object.keys(e).length)(t)||(e=>Array.isArray(e)&&0===e.length)(t),h=(0,x.useCallback)((()=>{s?l():o()}),[s,o,l]),g=(0,x.useCallback)(((e,t)=>{t?o({deep:!0}):l({deep:!0})}),[o,l]);return u?O().createElement(\"div\",{className:pt()(\"json-schema-2020-12-json-viewer\",r)},O().createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},e),O().createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__value json-schema-2020-12-json-viewer__value--secondary\"},a.stringify(t))):d?O().createElement(\"div\",{className:pt()(\"json-schema-2020-12-json-viewer\",r)},O().createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},e),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(t)?\"empty array\":\"empty object\")):O().createElement(Hs.Provider,{value:n},O().createElement(Fs.Provider,{value:i},O().createElement(\"div\",{className:pt()(\"json-schema-2020-12-json-viewer\",r),\"data-json-schema-level\":c},O().createElement(p,{expanded:s,onChange:h},O().createElement(\"span\",{className:\"json-schema-2020-12-json-viewer__name json-schema-2020-12-json-viewer__name--secondary\"},e)),O().createElement(m,{expanded:s,onClick:g}),O().createElement(\"strong\",{className:\"json-schema-2020-12__attribute json-schema-2020-12__attribute--primary\"},Array.isArray(t)?\"array\":\"object\"),O().createElement(\"ul\",{className:pt()(\"json-schema-2020-12-json-viewer__children\",{\"json-schema-2020-12-json-viewer__children--collapsed\":!s})},s&&O().createElement(O().Fragment,null,Array.isArray(t)?t.map(((e,t)=>O().createElement(\"li\",{key:`#${t}`,className:\"json-schema-2020-12-property\"},O().createElement(JSONViewer,{name:`#${t}`,value:e,className:r})))):Object.entries(t).map((([e,t])=>O().createElement(\"li\",{key:e,className:\"json-schema-2020-12-property\"},O().createElement(JSONViewer,{name:e,value:t,className:r})))))))))},Qs=JSONViewer,Accordion_Accordion=({expanded:e=!1,children:t,onChange:r})=>{const a=useComponent(\"ChevronRightIcon\"),n=(0,x.useCallback)((t=>{r(t,!e)}),[e,r]);return O().createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-accordion\",onClick:n},O().createElement(\"div\",{className:\"json-schema-2020-12-accordion__children\"},t),O().createElement(\"span\",{className:pt()(\"json-schema-2020-12-accordion__icon\",{\"json-schema-2020-12-accordion__icon--expanded\":e,\"json-schema-2020-12-accordion__icon--collapsed\":!e})},O().createElement(a,null)))},ExpandDeepButton_ExpandDeepButton=({expanded:e,onClick:t})=>{const r=(0,x.useCallback)((r=>{t(r,!e)}),[e,t]);return O().createElement(\"button\",{type:\"button\",className:\"json-schema-2020-12-expand-deep-button\",onClick:r},e?\"Collapse all\":\"Expand all\")},icons_ChevronRight=()=>O().createElement(\"svg\",{xmlns:\"http://www.w3.org/2000/svg\",width:\"24\",height:\"24\",viewBox:\"0 0 24 24\"},O().createElement(\"path\",{d:\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"})),withJSONSchemaContext=(e,t={})=>{const r={components:{JSONSchema:Gs,Keyword$schema:keywords_$schema,Keyword$vocabulary:$vocabulary_$vocabulary,Keyword$id:keywords_$id,Keyword$anchor:keywords_$anchor,Keyword$dynamicAnchor:keywords_$dynamicAnchor,Keyword$ref:keywords_$ref,Keyword$dynamicRef:keywords_$dynamicRef,Keyword$defs:keywords_$defs,Keyword$comment:keywords_$comment,KeywordAllOf:keywords_AllOf,KeywordAnyOf:keywords_AnyOf,KeywordOneOf:keywords_OneOf,KeywordNot:keywords_Not,KeywordIf:keywords_If,KeywordThen:keywords_Then,KeywordElse:keywords_Else,KeywordDependentSchemas:keywords_DependentSchemas,KeywordPrefixItems:keywords_PrefixItems,KeywordItems:keywords_Items,KeywordContains:keywords_Contains,KeywordProperties:keywords_Properties_Properties,KeywordPatternProperties:PatternProperties_PatternProperties,KeywordAdditionalProperties:keywords_AdditionalProperties,KeywordPropertyNames:keywords_PropertyNames,KeywordUnevaluatedItems:keywords_UnevaluatedItems,KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,KeywordType:keywords_Type,KeywordEnum:Enum_Enum,KeywordConst:Const_Const,KeywordConstraint:Ys,KeywordDependentRequired:DependentRequired_DependentRequired,KeywordContentSchema:keywords_ContentSchema,KeywordTitle:Title_Title,KeywordDescription:keywords_Description_Description,KeywordDefault:Default_Default,KeywordDeprecated:keywords_Deprecated,KeywordReadOnly:keywords_ReadOnly,KeywordWriteOnly:keywords_WriteOnly,KeywordExamples:keywords_Examples_Examples,ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONViewer:Qs,Accordion:Accordion_Accordion,ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,ChevronRightIcon:icons_ChevronRight,...t.components},config:{default$schema:\"https://json-schema.org/draft/2020-12/schema\",defaultExpandedLevels:0,showExtensionKeywords:!0,...t.config},fn:{upperFirst:fn_upperFirst,getTitle:makeGetTitle(useFn),getType:makeGetType(useFn),isBooleanJSONSchema,hasKeyword,isExpandable:fn_makeIsExpandable(useFn),stringify:fn_stringify,stringifyConstraints,getDependentRequired,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(useFn),...t.fn},state:{paths:{}}},HOC=t=>O().createElement(Bs.Provider,{value:r},O().createElement(e,t));return HOC.contexts={JSONSchemaContext:Bs},HOC.displayName=e.displayName,HOC},makeWithJSONSchemaSystemContext=({getSystem:e})=>(t,r={})=>{const{getComponent:a,getConfigs:n}=e(),s=n(),o=a(\"JSONSchema202012\"),l=a(\"JSONSchema202012Keyword$schema\"),c=a(\"JSONSchema202012Keyword$vocabulary\"),i=a(\"JSONSchema202012Keyword$id\"),p=a(\"JSONSchema202012Keyword$anchor\"),m=a(\"JSONSchema202012Keyword$dynamicAnchor\"),u=a(\"JSONSchema202012Keyword$ref\"),d=a(\"JSONSchema202012Keyword$dynamicRef\"),h=a(\"JSONSchema202012Keyword$defs\"),g=a(\"JSONSchema202012Keyword$comment\"),y=a(\"JSONSchema202012KeywordAllOf\"),f=a(\"JSONSchema202012KeywordAnyOf\"),S=a(\"JSONSchema202012KeywordOneOf\"),E=a(\"JSONSchema202012KeywordNot\"),_=a(\"JSONSchema202012KeywordIf\"),v=a(\"JSONSchema202012KeywordThen\"),w=a(\"JSONSchema202012KeywordElse\"),b=a(\"JSONSchema202012KeywordDependentSchemas\"),C=a(\"JSONSchema202012KeywordPrefixItems\"),x=a(\"JSONSchema202012KeywordItems\"),O=a(\"JSONSchema202012KeywordContains\"),N=a(\"JSONSchema202012KeywordProperties\"),k=a(\"JSONSchema202012KeywordPatternProperties\"),A=a(\"JSONSchema202012KeywordAdditionalProperties\"),I=a(\"JSONSchema202012KeywordPropertyNames\"),j=a(\"JSONSchema202012KeywordUnevaluatedItems\"),q=a(\"JSONSchema202012KeywordUnevaluatedProperties\"),P=a(\"JSONSchema202012KeywordType\"),M=a(\"JSONSchema202012KeywordEnum\"),T=a(\"JSONSchema202012KeywordConst\"),R=a(\"JSONSchema202012KeywordConstraint\"),J=a(\"JSONSchema202012KeywordDependentRequired\"),$=a(\"JSONSchema202012KeywordContentSchema\"),V=a(\"JSONSchema202012KeywordTitle\"),L=a(\"JSONSchema202012KeywordDescription\"),D=a(\"JSONSchema202012KeywordDefault\"),U=a(\"JSONSchema202012KeywordDeprecated\"),K=a(\"JSONSchema202012KeywordReadOnly\"),z=a(\"JSONSchema202012KeywordWriteOnly\"),B=a(\"JSONSchema202012KeywordExamples\"),F=a(\"JSONSchema202012ExtensionKeywords\"),W=a(\"JSONSchema202012JSONViewer\"),H=a(\"JSONSchema202012Accordion\"),X=a(\"JSONSchema202012ExpandDeepButton\"),G=a(\"JSONSchema202012ChevronRightIcon\");return withJSONSchemaContext(t,{components:{JSONSchema:o,Keyword$schema:l,Keyword$vocabulary:c,Keyword$id:i,Keyword$anchor:p,Keyword$dynamicAnchor:m,Keyword$ref:u,Keyword$dynamicRef:d,Keyword$defs:h,Keyword$comment:g,KeywordAllOf:y,KeywordAnyOf:f,KeywordOneOf:S,KeywordNot:E,KeywordIf:_,KeywordThen:v,KeywordElse:w,KeywordDependentSchemas:b,KeywordPrefixItems:C,KeywordItems:x,KeywordContains:O,KeywordProperties:N,KeywordPatternProperties:k,KeywordAdditionalProperties:A,KeywordPropertyNames:I,KeywordUnevaluatedItems:j,KeywordUnevaluatedProperties:q,KeywordType:P,KeywordEnum:M,KeywordConst:T,KeywordConstraint:R,KeywordDependentRequired:J,KeywordContentSchema:$,KeywordTitle:V,KeywordDescription:L,KeywordDefault:D,KeywordDeprecated:U,KeywordReadOnly:K,KeywordWriteOnly:z,KeywordExamples:B,ExtensionKeywords:F,JSONViewer:W,Accordion:H,ExpandDeepButton:X,ChevronRightIcon:G,...r.components},config:{showExtensionKeywords:s.showExtensions,...r.config},fn:{...r.fn}})},json_schema_2020_12=({getSystem:e,fn:t})=>{const fnAccessor=()=>({upperFirst:t.upperFirst,...t.jsonSchema202012});return{components:{JSONSchema202012:Gs,JSONSchema202012Keyword$schema:keywords_$schema,JSONSchema202012Keyword$vocabulary:$vocabulary_$vocabulary,JSONSchema202012Keyword$id:keywords_$id,JSONSchema202012Keyword$anchor:keywords_$anchor,JSONSchema202012Keyword$dynamicAnchor:keywords_$dynamicAnchor,JSONSchema202012Keyword$ref:keywords_$ref,JSONSchema202012Keyword$dynamicRef:keywords_$dynamicRef,JSONSchema202012Keyword$defs:keywords_$defs,JSONSchema202012Keyword$comment:keywords_$comment,JSONSchema202012KeywordAllOf:keywords_AllOf,JSONSchema202012KeywordAnyOf:keywords_AnyOf,JSONSchema202012KeywordOneOf:keywords_OneOf,JSONSchema202012KeywordNot:keywords_Not,JSONSchema202012KeywordIf:keywords_If,JSONSchema202012KeywordThen:keywords_Then,JSONSchema202012KeywordElse:keywords_Else,JSONSchema202012KeywordDependentSchemas:keywords_DependentSchemas,JSONSchema202012KeywordPrefixItems:keywords_PrefixItems,JSONSchema202012KeywordItems:keywords_Items,JSONSchema202012KeywordContains:keywords_Contains,JSONSchema202012KeywordProperties:keywords_Properties_Properties,JSONSchema202012KeywordPatternProperties:PatternProperties_PatternProperties,JSONSchema202012KeywordAdditionalProperties:keywords_AdditionalProperties,JSONSchema202012KeywordPropertyNames:keywords_PropertyNames,JSONSchema202012KeywordUnevaluatedItems:keywords_UnevaluatedItems,JSONSchema202012KeywordUnevaluatedProperties:keywords_UnevaluatedProperties,JSONSchema202012KeywordType:keywords_Type,JSONSchema202012KeywordEnum:Enum_Enum,JSONSchema202012KeywordConst:Const_Const,JSONSchema202012KeywordConstraint:Ys,JSONSchema202012KeywordDependentRequired:DependentRequired_DependentRequired,JSONSchema202012KeywordContentSchema:keywords_ContentSchema,JSONSchema202012KeywordTitle:Title_Title,JSONSchema202012KeywordDescription:keywords_Description_Description,JSONSchema202012KeywordDefault:Default_Default,JSONSchema202012KeywordDeprecated:keywords_Deprecated,JSONSchema202012KeywordReadOnly:keywords_ReadOnly,JSONSchema202012KeywordWriteOnly:keywords_WriteOnly,JSONSchema202012KeywordExamples:keywords_Examples_Examples,JSONSchema202012ExtensionKeywords:ExtensionKeywords_ExtensionKeywords,JSONSchema202012JSONViewer:Qs,JSONSchema202012Accordion:Accordion_Accordion,JSONSchema202012ExpandDeepButton:ExpandDeepButton_ExpandDeepButton,JSONSchema202012ChevronRightIcon:icons_ChevronRight,withJSONSchema202012Context:withJSONSchemaContext,withJSONSchema202012SystemContext:makeWithJSONSchemaSystemContext(e()),JSONSchema202012PathContext:()=>Hs,JSONSchema202012LevelContext:()=>Fs},fn:{upperFirst:fn_upperFirst,jsonSchema202012:{getTitle:makeGetTitle(fnAccessor),getType:makeGetType(fnAccessor),isExpandable:fn_makeIsExpandable(fnAccessor),isBooleanJSONSchema,hasKeyword,useFn,useConfig,useComponent,useIsExpanded,usePath,useLevel,getSchemaKeywords,getExtensionKeywords:makeGetExtensionKeywords(fnAccessor),hasSchemaType:fn_hasSchemaType}}}},array=(e,{sample:t=[]}={})=>((e,t={})=>{const{minItems:r,maxItems:a,uniqueItems:n}=t,{contains:s,minContains:o,maxContains:l}=t;let c=[...e];if(null!=s&&\"object\"==typeof s){if(Number.isInteger(o)&&o>1){const e=c.at(0);for(let t=1;t<o;t+=1)c.unshift(e)}Number.isInteger(l)}if(Number.isInteger(a)&&a>0&&(c=e.slice(0,a)),Number.isInteger(r)&&r>0)for(let e=0;c.length<r;e+=1)c.push(c[e%c.length]);return!0===n&&(c=Array.from(new Set(c))),c})(t,e),object=()=>{throw new Error(\"Not implemented\")},bytes=e=>ae()(e),pick=e=>e.at(0),predicates_isBooleanJSONSchema=e=>\"boolean\"==typeof e,isJSONSchemaObject=e=>wt()(e),isJSONSchema=e=>predicates_isBooleanJSONSchema(e)||isJSONSchemaObject(e);const Zs=class Registry{data={};register(e,t){this.data[e]=t}unregister(e){void 0===e?this.data={}:delete this.data[e]}get(e){return this.data[e]}},int32=()=>0,int64=()=>0,generators_float=()=>.1,generators_double=()=>.1,email=()=>\"user@example.com\",idn_email=()=>\"실례@example.com\",hostname=()=>\"example.com\",idn_hostname=()=>\"실례.com\",ipv4=()=>\"198.51.100.42\",ipv6=()=>\"2001:0db8:5b96:0000:0000:426f:8e17:642a\",uri=()=>\"https://example.com/\",uri_reference=()=>\"path/index.html\",iri=()=>\"https://실례.com/\",iri_reference=()=>\"path/실례.html\",uuid=()=>\"3fa85f64-5717-4562-b3fc-2c963f66afa6\",uri_template=()=>\"https://example.com/dictionary/{term:1}/{term}\",json_pointer=()=>\"/a/b/c\",relative_json_pointer=()=>\"1/0\",date_time=()=>(new Date).toISOString(),date=()=>(new Date).toISOString().substring(0,10),time=()=>(new Date).toISOString().substring(11),duration=()=>\"P3D\",generators_password=()=>\"********\",regex=()=>\"^[a-z]+$\";const eo=new class FormatRegistry extends Zs{#e={int32,int64,float:generators_float,double:generators_double,email,\"idn-email\":idn_email,hostname,\"idn-hostname\":idn_hostname,ipv4,ipv6,uri,\"uri-reference\":uri_reference,iri,\"iri-reference\":iri_reference,uuid,\"uri-template\":uri_template,\"json-pointer\":json_pointer,\"relative-json-pointer\":relative_json_pointer,\"date-time\":date_time,date,time,duration,password:generators_password,regex};data={...this.#e};get defaults(){return{...this.#e}}},formatAPI=(e,t)=>\"function\"==typeof t?eo.register(e,t):null===t?eo.unregister(e):eo.get(e);formatAPI.getDefaults=()=>eo.defaults;const to=formatAPI;var ro=__webpack_require__(158).Buffer;const _7bit=e=>ro.from(e).toString(\"ascii\");var ao=__webpack_require__(158).Buffer;const _8bit=e=>ao.from(e).toString(\"utf8\");var no=__webpack_require__(158).Buffer;const binary=e=>no.from(e).toString(\"binary\"),quoted_printable=e=>{let t=\"\";for(let r=0;r<e.length;r++){const a=e.charCodeAt(r);if(61===a)t+=\"=3D\";else if(a>=33&&a<=60||a>=62&&a<=126||9===a||32===a)t+=e.charAt(r);else if(13===a||10===a)t+=\"\\r\\n\";else if(a>126){const a=unescape(encodeURIComponent(e.charAt(r)));for(let e=0;e<a.length;e++)t+=\"=\"+(\"0\"+a.charCodeAt(e).toString(16)).slice(-2).toUpperCase()}else t+=\"=\"+(\"0\"+a.toString(16)).slice(-2).toUpperCase()}return t};var so=__webpack_require__(158).Buffer;const base16=e=>so.from(e).toString(\"hex\");var oo=__webpack_require__(158).Buffer;const base32=e=>{const t=oo.from(e).toString(\"utf8\"),r=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";let a=0,n=\"\",s=0,o=0;for(let e=0;e<t.length;e++)for(s=s<<8|t.charCodeAt(e),o+=8;o>=5;)n+=r.charAt(s>>>o-5&31),o-=5;o>0&&(n+=r.charAt(s<<5-o&31),a=(8-8*t.length%5)%5);for(let e=0;e<a;e++)n+=\"=\";return n};var lo=__webpack_require__(158).Buffer;const base64=e=>lo.from(e).toString(\"base64\");var co=__webpack_require__(158).Buffer;const base64url=e=>co.from(e).toString(\"base64url\");const io=new class EncoderRegistry extends Zs{#e={\"7bit\":_7bit,\"8bit\":_8bit,binary,\"quoted-printable\":quoted_printable,base16,base32,base64,base64url};data={...this.#e};get defaults(){return{...this.#e}}},encoderAPI=(e,t)=>\"function\"==typeof t?io.register(e,t):null===t?io.unregister(e):io.get(e);encoderAPI.getDefaults=()=>io.defaults;const po=encoderAPI,mo={\"text/plain\":()=>\"string\",\"text/css\":()=>\".selector { border: 1px solid red }\",\"text/csv\":()=>\"value1,value2,value3\",\"text/html\":()=>\"<p>content</p>\",\"text/calendar\":()=>\"BEGIN:VCALENDAR\",\"text/javascript\":()=>\"console.dir('Hello world!');\",\"text/xml\":()=>'<person age=\"30\">John Doe</person>',\"text/*\":()=>\"string\"},uo={\"image/*\":()=>bytes(25).toString(\"binary\")},ho={\"audio/*\":()=>bytes(25).toString(\"binary\")},go={\"video/*\":()=>bytes(25).toString(\"binary\")},yo={\"application/json\":()=>'{\"key\":\"value\"}',\"application/ld+json\":()=>'{\"name\": \"John Doe\"}',\"application/x-httpd-php\":()=>\"<?php echo '<p>Hello World!</p>'; ?>\",\"application/rtf\":()=>String.raw`{\\rtf1\\adeflang1025\\ansi\\ansicpg1252\\uc1`,\"application/x-sh\":()=>'echo \"Hello World!\"',\"application/xhtml+xml\":()=>\"<p>content</p>\",\"application/*\":()=>bytes(25).toString(\"binary\")};const fo=new class MediaTypeRegistry extends Zs{#e={...mo,...uo,...ho,...go,...yo};data={...this.#e};get defaults(){return{...this.#e}}},mediaTypeAPI=(e,t)=>{if(\"function\"==typeof t)return fo.register(e,t);if(null===t)return fo.unregister(e);const r=e.split(\";\").at(0),a=`${r.split(\"/\").at(0)}/*`;return fo.get(e)||fo.get(r)||fo.get(a)};mediaTypeAPI.getDefaults=()=>fo.defaults;const So=mediaTypeAPI,applyStringConstraints=(e,t={})=>{const{maxLength:r,minLength:a}=t;let n=e;if(Number.isInteger(r)&&r>0&&(n=n.slice(0,r)),Number.isInteger(a)&&a>0){let e=0;for(;n.length<a;)n+=n[e++%n.length]}return n},types_string=(e,{sample:t}={})=>{const{contentEncoding:r,contentMediaType:a,contentSchema:n}=e,{pattern:s,format:o}=e,l=po(r)||ma();let c;return c=\"string\"==typeof s?applyStringConstraints((e=>{try{const t=/(?<=(?<!\\\\)\\{)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{\\d*,)(\\d{3,})(?=\\})|(?<=(?<!\\\\)\\{)(\\d{3,})(?=,\\d*\\})/g,r=e.replace(t,\"100\"),a=new(Ot())(r);return a.max=100,a.gen()}catch{return\"string\"}})(s),e):\"string\"==typeof o?(e=>{const{format:t}=e,r=to(t);return\"function\"==typeof r?r(e):\"string\"})(e):isJSONSchema(n)&&\"string\"==typeof a&&void 0!==t?Array.isArray(t)||\"object\"==typeof t?JSON.stringify(t):applyStringConstraints(String(t),e):\"string\"==typeof a?(e=>{const{contentMediaType:t}=e,r=So(t);return\"function\"==typeof r?r(e):\"string\"})(e):applyStringConstraints(\"string\",e),l(c)},applyNumberConstraints=(e,t={})=>{const{minimum:r,maximum:a,exclusiveMinimum:n,exclusiveMaximum:s}=t,{multipleOf:o}=t,l=Number.isInteger(e)?1:Number.EPSILON;let c=\"number\"==typeof r?r:null,i=\"number\"==typeof a?a:null,p=e;if(\"number\"==typeof n&&(c=null!==c?Math.max(c,n+l):n+l),\"number\"==typeof s&&(i=null!==i?Math.min(i,s-l):s-l),p=c>i&&e||c||i||p,\"number\"==typeof o&&o>0){const e=p%o;p=0===e?p:p+o-e}return p},types_number=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=to(t);return\"function\"==typeof r?r(e):0})(e):0,applyNumberConstraints(r,e)},types_integer=e=>{const{format:t}=e;let r;return r=\"string\"==typeof t?(e=>{const{format:t}=e,r=to(t);if(\"function\"==typeof r)return r(e);switch(t){case\"int32\":return int32();case\"int64\":return int64()}return 0})(e):0,applyNumberConstraints(r,e)},types_boolean=e=>\"boolean\"!=typeof e.default||e.default,Eo=new Proxy({array,object,string:types_string,number:types_number,integer:types_integer,boolean:types_boolean,null:()=>null},{get:(e,t)=>\"string\"==typeof t&&Object.hasOwn(e,t)?e[t]:()=>`Unknown Type: ${t}`}),_o=[\"array\",\"object\",\"number\",\"integer\",\"string\",\"boolean\",\"null\"],hasExample=e=>{if(!isJSONSchemaObject(e))return!1;const{examples:t,example:r,default:a}=e;return!!(Array.isArray(t)&&t.length>=1)||(void 0!==a||void 0!==r)},extractExample=e=>{if(!isJSONSchemaObject(e))return null;const{examples:t,example:r,default:a}=e;return Array.isArray(t)&&t.length>=1?t.at(0):void 0!==a?a:void 0!==r?r:void 0},vo={array:[\"items\",\"prefixItems\",\"contains\",\"maxContains\",\"minContains\",\"maxItems\",\"minItems\",\"uniqueItems\",\"unevaluatedItems\"],object:[\"properties\",\"additionalProperties\",\"patternProperties\",\"propertyNames\",\"minProperties\",\"maxProperties\",\"required\",\"dependentSchemas\",\"dependentRequired\",\"unevaluatedProperties\"],string:[\"pattern\",\"format\",\"minLength\",\"maxLength\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\"],integer:[\"minimum\",\"maximum\",\"exclusiveMinimum\",\"exclusiveMaximum\",\"multipleOf\"]};vo.number=vo.integer;const wo=\"string\",inferTypeFromValue=e=>void 0===e?null:null===e?\"null\":Array.isArray(e)?\"array\":Number.isInteger(e)?\"integer\":typeof e,foldType=e=>{if(Array.isArray(e)&&e.length>=1){if(e.includes(\"array\"))return\"array\";if(e.includes(\"object\"))return\"object\";{const t=e.filter((e=>\"null\"!==e)),r=pick(t.length>0?t:e);if(_o.includes(r))return r}}return _o.includes(e)?e:null},inferType=(e,t=new WeakSet)=>{if(!isJSONSchemaObject(e))return wo;if(t.has(e))return wo;t.add(e);let{type:r,const:a}=e;if(r=foldType(r),\"string\"!=typeof r){const t=Object.keys(vo);e:for(let a=0;a<t.length;a+=1){const n=t[a],s=vo[n];for(let t=0;t<s.length;t+=1){const a=s[t];if(Object.hasOwn(e,a)){r=n;break e}}}}if(\"string\"!=typeof r&&void 0!==a){const e=inferTypeFromValue(a);r=\"string\"==typeof e?e:r}if(\"string\"!=typeof r){const combineTypes=r=>{if(Array.isArray(e[r])){const a=e[r].map((e=>inferType(e,t)));return foldType(a)}return null},a=combineTypes(\"allOf\"),n=combineTypes(\"anyOf\"),s=combineTypes(\"oneOf\"),o=e.not?inferType(e.not,t):null;(a||n||s||o)&&(r=foldType([a,n,s,o].filter(Boolean)))}if(\"string\"!=typeof r&&hasExample(e)){const t=extractExample(e),a=inferTypeFromValue(t);r=\"string\"==typeof a?a:r}return t.delete(e),r||wo},type_getType=e=>inferType(e),typeCast=e=>predicates_isBooleanJSONSchema(e)?(e=>!1===e?{not:{}}:{})(e):isJSONSchemaObject(e)?e:{},merge=(e,t,r={})=>{if(predicates_isBooleanJSONSchema(e)&&!0===e)return!0;if(predicates_isBooleanJSONSchema(e)&&!1===e)return!1;if(predicates_isBooleanJSONSchema(t)&&!0===t)return!0;if(predicates_isBooleanJSONSchema(t)&&!1===t)return!1;if(!isJSONSchema(e))return t;if(!isJSONSchema(t))return e;const a={...t,...e};if(t.type&&e.type&&Array.isArray(t.type)&&\"string\"==typeof t.type){const r=normalizeArray(t.type).concat(e.type);a.type=Array.from(new Set(r))}if(Array.isArray(t.required)&&Array.isArray(e.required)&&(a.required=[...new Set([...e.required,...t.required])]),t.properties&&e.properties){const n=new Set([...Object.keys(t.properties),...Object.keys(e.properties)]);a.properties={};for(const s of n){const n=t.properties[s]||{},o=e.properties[s]||{};n.readOnly&&!r.includeReadOnly||n.writeOnly&&!r.includeWriteOnly?a.required=(a.required||[]).filter((e=>e!==s)):a.properties[s]=merge(o,n,r)}}return isJSONSchema(t.items)&&isJSONSchema(e.items)&&(a.items=merge(e.items,t.items,r)),isJSONSchema(t.contains)&&isJSONSchema(e.contains)&&(a.contains=merge(e.contains,t.contains,r)),isJSONSchema(t.contentSchema)&&isJSONSchema(e.contentSchema)&&(a.contentSchema=merge(e.contentSchema,t.contentSchema,r)),a},bo=merge,main_sampleFromSchemaGeneric=(e,t={},r=void 0,a=!1)=>{if(null==e&&void 0===r)return;\"function\"==typeof e?.toJS&&(e=e.toJS()),e=typeCast(e);let n=void 0!==r||hasExample(e);const s=!n&&Array.isArray(e.oneOf)&&e.oneOf.length>0,o=!n&&Array.isArray(e.anyOf)&&e.anyOf.length>0;if(!n&&(s||o)){const r=typeCast(pick(s?e.oneOf:e.anyOf));!(e=bo(e,r,t)).xml&&r.xml&&(e.xml=r.xml),hasExample(e)&&hasExample(r)&&(n=!0)}const l={};let{xml:c,properties:i,additionalProperties:p,items:m,contains:u}=e||{},d=type_getType(e),{includeReadOnly:h,includeWriteOnly:g}=t;c=c||{};let y,{name:f,prefix:S,namespace:E}=c,_={};if(Object.hasOwn(e,\"type\")||(e.type=d),a&&(f=f||\"notagname\",y=(S?`${S}:`:\"\")+f,E)){l[S?`xmlns:${S}`:\"xmlns\"]=E}a&&(_[y]=[]);const v=objectify(i);let w,b=0;const hasExceededMaxProperties=()=>Number.isInteger(e.maxProperties)&&e.maxProperties>0&&b>=e.maxProperties,canAddProperty=t=>!(Number.isInteger(e.maxProperties)&&e.maxProperties>0)||!hasExceededMaxProperties()&&(!(t=>!Array.isArray(e.required)||0===e.required.length||!e.required.includes(t))(t)||e.maxProperties-b-(()=>{if(!Array.isArray(e.required)||0===e.required.length)return 0;let t=0;return a?e.required.forEach((e=>t+=void 0===_[e]?0:1)):e.required.forEach((e=>{t+=void 0===_[y]?.find((t=>void 0!==t[e]))?0:1})),e.required.length-t})()>0);if(w=a?(r,n=void 0)=>{if(e&&v[r]){if(v[r].xml=v[r].xml||{},v[r].xml.attribute){const e=Array.isArray(v[r].enum)?pick(v[r].enum):void 0;if(hasExample(v[r]))l[v[r].xml.name||r]=extractExample(v[r]);else if(void 0!==e)l[v[r].xml.name||r]=e;else{const e=typeCast(v[r]),a=type_getType(e),s=v[r].xml.name||r;if(\"array\"===a){const e=main_sampleFromSchemaGeneric(v[r],t,n,!1);l[s]=e.map((e=>wt()(e)?\"UnknownTypeObject\":Array.isArray(e)?\"UnknownTypeArray\":e)).join(\" \")}else l[s]=\"object\"===a?\"UnknownTypeObject\":Eo[a](e)}return}v[r].xml.name=v[r].xml.name||r}else v[r]||!1===p||(v[r]={xml:{name:r}});let s=main_sampleFromSchemaGeneric(v[r],t,n,a);canAddProperty(r)&&(b++,Array.isArray(s)?_[y]=_[y].concat(s):_[y].push(s))}:(r,n)=>{if(canAddProperty(r)){if(wt()(e.discriminator?.mapping)&&e.discriminator.propertyName===r&&\"string\"==typeof e.$$ref){for(const t in e.discriminator.mapping)if(-1!==e.$$ref.search(e.discriminator.mapping[t])){_[r]=t;break}}else _[r]=main_sampleFromSchemaGeneric(v[r],t,n,a);b++}},n){let n;if(n=void 0!==r?r:extractExample(e),!a){if(\"number\"==typeof n&&\"string\"===d)return`${n}`;if(\"string\"!=typeof n||\"string\"===d)return n;try{return JSON.parse(n)}catch{return n}}if(\"array\"===d){if(!Array.isArray(n)){if(\"string\"==typeof n)return n;n=[n]}let r=[];return isJSONSchemaObject(m)&&(m.xml=m.xml||c||{},m.xml.name=m.xml.name||c.name,r=n.map((e=>main_sampleFromSchemaGeneric(m,t,e,a)))),isJSONSchemaObject(u)&&(u.xml=u.xml||c||{},u.xml.name=u.xml.name||c.name,r=[main_sampleFromSchemaGeneric(u,t,void 0,a),...r]),r=Eo.array(e,{sample:r}),c.wrapped?(_[y]=r,kt()(l)||_[y].push({_attr:l})):_=r,_}if(\"object\"===d){if(\"string\"==typeof n)return n;for(const e in n)Object.hasOwn(n,e)&&(v[e]?.readOnly&&!h||v[e]?.writeOnly&&!g||(v[e]?.xml?.attribute?l[v[e].xml.name||e]=n[e]:w(e,n[e])));return kt()(l)||_[y].push({_attr:l}),_}return _[y]=kt()(l)?n:[{_attr:l},n],_}if(\"array\"===d){let r=[];if(isJSONSchemaObject(u))if(a&&(u.xml=u.xml||e.xml||{},u.xml.name=u.xml.name||c.name),Array.isArray(u.anyOf)){const{anyOf:e,...n}=m;r.push(...u.anyOf.map((e=>main_sampleFromSchemaGeneric(bo(e,n,t),t,void 0,a))))}else if(Array.isArray(u.oneOf)){const{oneOf:e,...n}=m;r.push(...u.oneOf.map((e=>main_sampleFromSchemaGeneric(bo(e,n,t),t,void 0,a))))}else{if(!(!a||a&&c.wrapped))return main_sampleFromSchemaGeneric(u,t,void 0,a);r.push(main_sampleFromSchemaGeneric(u,t,void 0,a))}if(isJSONSchemaObject(m))if(a&&(m.xml=m.xml||e.xml||{},m.xml.name=m.xml.name||c.name),Array.isArray(m.anyOf)){const{anyOf:e,...n}=m;r.push(...m.anyOf.map((e=>main_sampleFromSchemaGeneric(bo(e,n,t),t,void 0,a))))}else if(Array.isArray(m.oneOf)){const{oneOf:e,...n}=m;r.push(...m.oneOf.map((e=>main_sampleFromSchemaGeneric(bo(e,n,t),t,void 0,a))))}else{if(!(!a||a&&c.wrapped))return main_sampleFromSchemaGeneric(m,t,void 0,a);r.push(main_sampleFromSchemaGeneric(m,t,void 0,a))}return r=Eo.array(e,{sample:r}),a&&c.wrapped?(_[y]=r,kt()(l)||_[y].push({_attr:l}),_):r}if(\"object\"===d){for(let e in v)Object.hasOwn(v,e)&&(v[e]?.deprecated||v[e]?.readOnly&&!h||v[e]?.writeOnly&&!g||w(e));if(a&&l&&_[y].push({_attr:l}),hasExceededMaxProperties())return _;if(predicates_isBooleanJSONSchema(p)&&p)a?_[y].push({additionalProp:\"Anything can be here\"}):_.additionalProp1={},b++;else if(isJSONSchemaObject(p)){const r=p,n=main_sampleFromSchemaGeneric(r,t,void 0,a);if(a&&\"string\"==typeof r?.xml?.name&&\"notagname\"!==r?.xml?.name)_[y].push(n);else{const t=Number.isInteger(e.minProperties)&&e.minProperties>0&&b<e.minProperties?e.minProperties-b:3;for(let e=1;e<=t;e++){if(hasExceededMaxProperties())return _;if(a){const t={};t[\"additionalProp\"+e]=n.notagname,_[y].push(t)}else _[\"additionalProp\"+e]=n;b++}}}return _}let C;if(void 0!==e.const)C=e.const;else if(e&&Array.isArray(e.enum))C=pick(normalizeArray(e.enum));else{const r=isJSONSchemaObject(e.contentSchema)?main_sampleFromSchemaGeneric(e.contentSchema,t,void 0,a):void 0;C=Eo[d](e,{sample:r})}return a?(_[y]=kt()(l)?C:[{_attr:l},C],_):C},main_createXMLExample=(e,t,r)=>{const a=main_sampleFromSchemaGeneric(e,t,r,!0);if(a)return\"string\"==typeof a?a:Ct()(a,{declaration:!0,indent:\"\\t\"})},main_sampleFromSchema=(e,t,r)=>main_sampleFromSchemaGeneric(e,t,r,!1),main_resolver=(e,t,r)=>[e,JSON.stringify(t),JSON.stringify(r)],Co=utils_memoizeN(main_createXMLExample,main_resolver),xo=utils_memoizeN(main_sampleFromSchema,main_resolver);const Oo=new class OptionRegistry extends Zs{#e={};data={...this.#e};get defaults(){return{...this.#e}}},api_optionAPI=(e,t)=>(void 0!==t&&Oo.register(e,t),Oo.get(e)),No=[{when:/json/,shouldStringifyTypes:[\"string\"]}],ko=[\"object\"],fn_get_json_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.jsonSchema202012.memoizedSampleFromSchema(t,r,n),l=typeof o,c=No.reduce(((e,t)=>t.when.test(a)?[...e,...t.shouldStringifyTypes]:e),ko);return X()(c,(e=>e===l))?JSON.stringify(o,null,2):o},fn_get_yaml_sample_schema=e=>(t,r,a,n)=>{const{fn:s}=e(),o=s.jsonSchema202012.getJsonSampleSchema(t,r,a,n);let l;try{l=qe().dump(qe().load(o),{lineWidth:-1},{schema:je.JSON_SCHEMA}),\"\\n\"===l[l.length-1]&&(l=l.slice(0,l.length-1))}catch(e){return console.error(e),\"error: could not generate yaml example\"}return l.replace(/\\t/g,\"  \")},fn_get_xml_sample_schema=e=>(t,r,a)=>{const{fn:n}=e();if(t&&!t.xml&&(t.xml={}),t&&!t.xml.name){if(!t.$$ref&&(t.type||t.items||t.properties||t.additionalProperties))return'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\\n\\x3c!-- XML example cannot be generated; root element name is undefined --\\x3e';if(t.$$ref){let e=t.$$ref.match(/\\S*\\/(\\S+)$/);t.xml.name=e[1]}}return n.jsonSchema202012.memoizedCreateXMLExample(t,r,a)},fn_get_sample_schema=e=>(t,r=\"\",a={},n=void 0)=>{const{fn:s}=e();return\"function\"==typeof t?.toJS&&(t=t.toJS()),\"function\"==typeof n?.toJS&&(n=n.toJS()),/xml/.test(r)?s.jsonSchema202012.getXmlSampleSchema(t,a,n):/(yaml|yml)/.test(r)?s.jsonSchema202012.getYamlSampleSchema(t,a,r,n):s.jsonSchema202012.getJsonSampleSchema(t,a,r,n)},json_schema_2020_12_samples=({getSystem:e})=>{const t=fn_get_json_sample_schema(e),r=fn_get_yaml_sample_schema(e),a=fn_get_xml_sample_schema(e),n=fn_get_sample_schema(e);return{fn:{jsonSchema202012:{sampleFromSchema:main_sampleFromSchema,sampleFromSchemaGeneric:main_sampleFromSchemaGeneric,sampleOptionAPI:api_optionAPI,sampleEncoderAPI:po,sampleFormatAPI:to,sampleMediaTypeAPI:So,createXMLExample:main_createXMLExample,memoizedSampleFromSchema:xo,memoizedCreateXMLExample:Co,getJsonSampleSchema:t,getYamlSampleSchema:r,getXmlSampleSchema:a,getSampleSchema:n,mergeJsonSchema:bo,foldType}}}};function PresetApis(){return[base,oas3,json_schema_2020_12,json_schema_2020_12_samples,oas31]}const inline_plugin=e=>()=>({fn:e.fn,components:e.components}),factorization_system=e=>{const t=j()({layout:{layout:e.layout,filter:e.filter},spec:{spec:\"\",url:e.url},requestSnippets:e.requestSnippets},e.initialState);if(e.initialState)for(const[r,a]of Object.entries(e.initialState))void 0===a&&delete t[r];return{system:{configs:e.configs},plugins:e.presets,state:t}},query=()=>e=>{const t=e.queryConfigEnabled?(()=>{const e=new URLSearchParams(K.location.search);return Object.fromEntries(e)})():{};return Object.entries(t).reduce(((e,[t,r])=>(\"config\"===t?e.configUrl=r:\"urls.primaryName\"===t?e[t]=r:e=br()(e,t,r),e)),{})},sources_url=({url:e,system:t})=>async r=>{if(!e)return{};if(\"function\"!=typeof t.configsActions?.getConfigByUrl)return{};const a=(()=>{const e={};return e.promise=new Promise(((t,r)=>{e.resolve=t,e.reject=r})),e})();return t.configsActions.getConfigByUrl({url:e,loadRemoteConfig:!0,requestInterceptor:r.requestInterceptor,responseInterceptor:r.responseInterceptor},(e=>{a.resolve(e)})),a.promise},runtime=()=>()=>{const e={};return globalThis.location&&(e.oauth2RedirectUrl=`${globalThis.location.protocol}//${globalThis.location.host}${globalThis.location.pathname.substring(0,globalThis.location.pathname.lastIndexOf(\"/\"))}/oauth2-redirect.html`),e},Ao=Object.freeze({dom_id:null,domNode:null,spec:{},url:\"\",urls:null,configUrl:null,layout:\"BaseLayout\",docExpansion:\"list\",maxDisplayedTags:-1,filter:!1,validatorUrl:\"https://validator.swagger.io/validator\",oauth2RedirectUrl:void 0,persistAuthorization:!1,configs:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:e=>(e.curlOptions=[],e),responseInterceptor:e=>e,showMutatedRequest:!0,defaultModelRendering:\"example\",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:!1,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:\"cURL (bash)\",syntax:\"bash\"},curl_powershell:{title:\"cURL (PowerShell)\",syntax:\"powershell\"},curl_cmd:{title:\"cURL (CMD)\",syntax:\"bash\"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\",\"trace\"],queryConfigEnabled:!1,presets:[PresetApis],plugins:[],initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:\"agate\"},operationsSorter:null,tagsSorter:null,onComplete:null,modelPropertyMacro:null,parameterMacro:null,fileUploadMediaTypes:[\"application/octet-stream\",\"image/\",\"audio/\",\"video/\"],uncaughtExceptionHandler:null}),Io=require(\"lodash/has\");var jo=__webpack_require__.n(Io);const qo=require(\"lodash/fp/set\");var Po=__webpack_require__.n(qo);const type_casters_array=(e,t=[])=>Array.isArray(e)?e:t,type_casters_boolean=(e,t=!1)=>!0===e||\"true\"===e||1===e||\"1\"===e||!1!==e&&\"false\"!==e&&0!==e&&\"0\"!==e&&t,dom_node=e=>null===e||\"null\"===e?null:e,type_casters_filter=e=>{const t=String(e);return type_casters_boolean(e,t)},type_casters_function=(e,t)=>\"function\"==typeof e?e:t,nullable_array=e=>Array.isArray(e)?e:null,nullable_function=e=>\"function\"==typeof e?e:null,nullable_string=e=>null===e||\"null\"===e?null:String(e),type_casters_number=(e,t=-1)=>{const r=parseInt(e,10);return Number.isNaN(r)?t:r},type_casters_object=(e,t={})=>wt()(e)?e:t,sorter=e=>\"function\"==typeof e||\"string\"==typeof e?e:null,type_casters_string=e=>String(e),syntax_highlight=(e,t)=>wt()(e)?e:!1===e||\"false\"===e||0===e||\"0\"===e?{activated:!1}:t,undefined_string=e=>void 0===e||\"undefined\"===e?void 0:String(e),Mo={components:{typeCaster:type_casters_object},configs:{typeCaster:type_casters_object},configUrl:{typeCaster:nullable_string},deepLinking:{typeCaster:type_casters_boolean,defaultValue:Ao.deepLinking},defaultModelExpandDepth:{typeCaster:type_casters_number,defaultValue:Ao.defaultModelExpandDepth},defaultModelRendering:{typeCaster:type_casters_string},defaultModelsExpandDepth:{typeCaster:type_casters_number,defaultValue:Ao.defaultModelsExpandDepth},displayOperationId:{typeCaster:type_casters_boolean,defaultValue:Ao.displayOperationId},displayRequestDuration:{typeCaster:type_casters_boolean,defaultValue:Ao.displayRequestDuration},docExpansion:{typeCaster:type_casters_string},dom_id:{typeCaster:nullable_string},domNode:{typeCaster:dom_node},fileUploadMediaTypes:{typeCaster:type_casters_array,defaultValue:Ao.fileUploadMediaTypes},filter:{typeCaster:type_casters_filter},fn:{typeCaster:type_casters_object},initialState:{typeCaster:type_casters_object},layout:{typeCaster:type_casters_string},maxDisplayedTags:{typeCaster:type_casters_number,defaultValue:Ao.maxDisplayedTags},modelPropertyMacro:{typeCaster:nullable_function},oauth2RedirectUrl:{typeCaster:undefined_string},onComplete:{typeCaster:nullable_function},operationsSorter:{typeCaster:sorter},paramaterMacro:{typeCaster:nullable_function},persistAuthorization:{typeCaster:type_casters_boolean,defaultValue:Ao.persistAuthorization},plugins:{typeCaster:type_casters_array,defaultValue:Ao.plugins},presets:{typeCaster:type_casters_array,defaultValue:Ao.presets},requestInterceptor:{typeCaster:type_casters_function,defaultValue:Ao.requestInterceptor},requestSnippets:{typeCaster:type_casters_object,defaultValue:Ao.requestSnippets},requestSnippetsEnabled:{typeCaster:type_casters_boolean,defaultValue:Ao.requestSnippetsEnabled},responseInterceptor:{typeCaster:type_casters_function,defaultValue:Ao.responseInterceptor},showCommonExtensions:{typeCaster:type_casters_boolean,defaultValue:Ao.showCommonExtensions},showExtensions:{typeCaster:type_casters_boolean,defaultValue:Ao.showExtensions},showMutatedRequest:{typeCaster:type_casters_boolean,defaultValue:Ao.showMutatedRequest},spec:{typeCaster:type_casters_object,defaultValue:Ao.spec},supportedSubmitMethods:{typeCaster:type_casters_array,defaultValue:Ao.supportedSubmitMethods},syntaxHighlight:{typeCaster:syntax_highlight,defaultValue:Ao.syntaxHighlight},\"syntaxHighlight.activated\":{typeCaster:type_casters_boolean,defaultValue:Ao.syntaxHighlight.activated},\"syntaxHighlight.theme\":{typeCaster:type_casters_string},tagsSorter:{typeCaster:sorter},tryItOutEnabled:{typeCaster:type_casters_boolean,defaultValue:Ao.tryItOutEnabled},url:{typeCaster:type_casters_string},urls:{typeCaster:nullable_array},\"urls.primaryName\":{typeCaster:type_casters_string},validatorUrl:{typeCaster:nullable_string},withCredentials:{typeCaster:type_casters_boolean,defaultValue:Ao.withCredentials},uncaughtExceptionHandler:{typeCaster:nullable_function}},type_cast=e=>Object.entries(Mo).reduce(((e,[t,{typeCaster:r,defaultValue:a}])=>{if(jo()(e,t)){const n=r(Fe()(e,t),a);e=Po()(t,n,e)}return e}),{...e}),config_merge=(e,...t)=>{let r=Symbol.for(\"domNode\"),a=Symbol.for(\"primaryName\");const n=[];for(const e of t){const t={...e};Object.hasOwn(t,\"domNode\")&&(r=t.domNode,delete t.domNode),Object.hasOwn(t,\"urls.primaryName\")?(a=t[\"urls.primaryName\"],delete t[\"urls.primaryName\"]):Array.isArray(t.urls)&&Object.hasOwn(t.urls,\"primaryName\")&&(a=t.urls.primaryName,delete t.urls.primaryName),n.push(t)}const s=j()(e,...n);return r!==Symbol.for(\"domNode\")&&(s.domNode=r),a!==Symbol.for(\"primaryName\")&&Array.isArray(s.urls)&&(s.urls.primaryName=a),type_cast(s)};function SwaggerUI(e){const t=query()(e),r=runtime()(),a=SwaggerUI.config.merge({},SwaggerUI.config.defaults,r,e,t),n=factorization_system(a),s=inline_plugin(a),o=new Store(n);o.register([a.plugins,s]);const l=o.getSystem(),persistConfigs=e=>{o.setConfigs(e),l.configsActions.loaded()},updateSpec=e=>{!t.url&&\"object\"==typeof e.spec&&Object.keys(e.spec).length>0?(l.specActions.updateUrl(\"\"),l.specActions.updateLoadingStatus(\"success\"),l.specActions.updateSpec(JSON.stringify(e.spec))):\"function\"==typeof l.specActions.download&&e.url&&!e.urls&&(l.specActions.updateUrl(e.url),l.specActions.download(e.url))},render=e=>{if(e.domNode)l.render(e.domNode,\"App\");else if(e.dom_id){const t=document.querySelector(e.dom_id);l.render(t,\"App\")}else null===e.dom_id||null===e.domNode||console.error(\"Skipped rendering: no `dom_id` or `domNode` was specified\")};return a.configUrl?((async()=>{const{configUrl:e}=a,r=await sources_url({url:e,system:l})(a),n=SwaggerUI.config.merge({},a,r,t);persistConfigs(n),null!==r&&updateSpec(n),render(n)})(),l):(persistConfigs(a),updateSpec(a),render(a),l)}SwaggerUI.System=Store,SwaggerUI.config={defaults:Ao,merge:config_merge,typeCast:type_cast,typeCastMappings:Mo},SwaggerUI.presets={base,apis:PresetApis},SwaggerUI.plugins={Auth:auth,Configs:configsPlugin,DeepLining:deep_linking,Err:err,Filter:filter,Icons:icons,JSONSchema5:json_schema_5,JSONSchema5Samples:json_schema_5_samples,JSONSchema202012:json_schema_2020_12,JSONSchema202012Samples:json_schema_2020_12_samples,Layout:plugins_layout,Logs:logs,OpenAPI30:oas3,OpenAPI31:oas3,OnComplete:on_complete,RequestSnippets:plugins_request_snippets,Spec:plugins_spec,SwaggerClient:swagger_client,Util:util,View:view,ViewLegacy:view_legacy,DownloadUrl:downloadUrlPlugin,SyntaxHighlighting:syntax_highlighting,Versions:versions,SafeRender:safe_render};const To=SwaggerUI;return r=r.default})()));\n//# sourceMappingURL=swagger-ui.js.map"
  },
  {
    "path": "runner/server/handler/audio.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"os\"\n\t\"path\"\n\t\"time\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/utils\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/openai/openai-go/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n)\n\nconst speechSSEChunkSize = 4096\n\nfunc Speech(c *gin.Context) {\n\tparam := openai.AudioSpeechNewParams{}\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\tif param.Speed.Value == 0 {\n\t\tparam.Speed.Value = 1.0\n\t}\n\tslog.Info(\"Speech request received\",\n\t\t\"model\", param.Model,\n\t\t\"input\", param.Input,\n\t\t\"voice\", param.Voice,\n\t\t\"speed\", param.Speed,\n\t\t\"stream_format\", param.StreamFormat,\n\t)\n\n\taudioSpeech, err := service.KeepAliveGet[nexa_sdk.TTS](\n\t\tparam.Model,\n\t\ttypes.ModelParam{},\n\t\tc.GetHeader(\"Nexa-KeepCache\") != \"true\",\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\tif param.Input == \"\" {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\toutputPath := fmt.Sprintf(\"audio_speech_output_%d.wav\", time.Now().UnixNano())\n\tdefer os.Remove(outputPath)\n\tout, err := audioSpeech.Synthesize(\n\t\tnexa_sdk.TtsSynthesizeInput{\n\t\t\tTextUTF8: param.Input,\n\t\t\tConfig: &nexa_sdk.TTSConfig{\n\t\t\t\tVoice: string(param.Voice),\n\t\t\t\tSpeed: float32(param.Speed.Value),\n\t\t\t},\n\t\t\tOutputPath: outputPath,\n\t\t})\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\tif param.StreamFormat == openai.AudioSpeechNewParamsStreamFormatSSE {\n\t\tspeechStreamSSE(c, outputPath, out.ProfileData)\n\t\treturn\n\t}\n\tc.File(outputPath)\n}\n\nfunc speechStreamSSE(c *gin.Context, audioPath string, profile nexa_sdk.ProfileData) {\n\tf, err := os.Open(audioPath)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\tdefer f.Close()\n\n\tc.Header(\"Content-Type\", \"text/event-stream\")\n\tc.Header(\"Cache-Control\", \"no-cache\")\n\tc.Header(\"Connection\", \"keep-alive\")\n\n\tbuf := make([]byte, speechSSEChunkSize)\n\tfor {\n\t\tn, err := f.Read(buf)\n\t\tif n > 0 {\n\t\t\tchunk := map[string]string{\n\t\t\t\t\"type\":  \"speech.audio.delta\",\n\t\t\t\t\"audio\": base64.StdEncoding.EncodeToString(buf[:n]),\n\t\t\t}\n\t\t\tc.SSEvent(\"\", chunk)\n\t\t\tc.Writer.Flush()\n\t\t}\n\t\tif err == io.EOF {\n\t\t\tbreak\n\t\t}\n\t\tif err != nil {\n\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error()})\n\t\t\treturn\n\t\t}\n\t}\n\n\tdone := map[string]any{\n\t\t\"type\": \"speech.audio.done\",\n\t\t\"usage\": map[string]int64{\n\t\t\t\"input_tokens\":  profile.PromptTokens,\n\t\t\t\"output_tokens\": profile.GeneratedTokens,\n\t\t\t\"total_tokens\":  profile.TotalTokens(),\n\t\t},\n\t}\n\tc.SSEvent(\"\", done)\n\tc.Writer.Flush()\n}\n\nfunc Transcriptions(c *gin.Context) {\n\tparam := openai.AudioTranscriptionNewParams{}\n\tparam.Model = c.PostForm(\"model\")\n\tstream := c.PostForm(\"stream\")\n\n\tif stream == \"true\" {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"streaming not supported\"})\n\t\treturn\n\t}\n\n\tslog.Info(\"Transcriptions request received\",\n\t\t\"model\", param.Model,\n\t\t\"stream\", stream,\n\t)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.ASR](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{},\n\t\tfalse,\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\t// retrieve file from form data\n\tfile, err := c.FormFile(\"file\")\n\tif err != nil {\n\t\tif err == http.ErrMissingFile {\n\t\t\t// warm up\n\t\t\tc.JSON(http.StatusOK, nil)\n\t\t\treturn\n\t\t}\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"failed to get file: \" + err.Error()})\n\t\treturn\n\t}\n\tparam.File, err = file.Open()\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"failed to open file: \" + err.Error()})\n\t\treturn\n\t}\n\tdata, err := io.ReadAll(param.File)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"failed to read file: \" + err.Error()})\n\t\treturn\n\t}\n\n\t// write data to a temp file\n\ttmpFile, err := os.CreateTemp(\"\", \"uri-*\"+path.Ext(file.Filename))\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": \"failed to create temp file: \" + err.Error()})\n\t\treturn\n\t}\n\t_, err = tmpFile.Write(data)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": \"failed to write temp file: \" + err.Error()})\n\t\treturn\n\t}\n\ttmpFile.Close()\n\tdefer os.Remove(tmpFile.Name())\n\n\tres, err := p.Transcribe(nexa_sdk.AsrTranscribeInput{\n\t\tAudioPath: tmpFile.Name(),\n\t})\n\tresult := openai.Transcription{\n\t\tText: res.Result.Transcript,\n\t}\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t} else {\n\t\tc.JSON(http.StatusOK, result)\n\t}\n}\n\ntype DiarizeRequest struct {\n\tModel string `json:\"model\" binding:\"required\"`\n\tAudio string `json:\"audio\"`\n}\n\nfunc Diarize(c *gin.Context) {\n\tparam := DiarizeRequest{}\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tslog.Info(\"Diarize request received\",\n\t\t\"model\", param.Model,\n\t\t\"audio\", param.Audio,\n\t)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.Diarize](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{},\n\t\tfalse,\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\t// warm up\n\tif param.Audio == \"\" {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\tfile, err := utils.SaveURIToTempFile(param.Audio)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"failed to save audio: \" + err.Error()})\n\t\treturn\n\t}\n\tdefer os.Remove(file)\n\tres, err := p.Infer(nexa_sdk.DiarizeInferInput{\n\t\tAudioPath: file,\n\t})\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t} else {\n\t\tc.JSON(http.StatusOK, res)\n\t}\n}\n"
  },
  {
    "path": "runner/server/handler/audio_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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 language governing permissions and\n// limitations under the License.\n\npackage handler\n\nimport (\n\t\"encoding/base64\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc TestSpeechStreamSSE(t *testing.T) {\n\tgin.SetMode(gin.TestMode)\n\n\tf, err := os.CreateTemp(\"\", \"audio_*.raw\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefer os.Remove(f.Name())\n\tconst payload = \"fake-audio-bytes\"\n\tif _, err := f.Write([]byte(payload)); err != nil {\n\t\tt.Fatal(err)\n\t}\n\tf.Close()\n\n\tw := httptest.NewRecorder()\n\tc, _ := gin.CreateTestContext(w)\n\tprofile := nexa_sdk.ProfileData{\n\t\tPromptTokens:    10,\n\t\tGeneratedTokens: 20,\n\t}\n\n\tspeechStreamSSE(c, f.Name(), profile)\n\n\tif !strings.HasPrefix(w.Header().Get(\"Content-Type\"), \"text/event-stream\") {\n\t\tt.Errorf(\"Content-Type: got %s\", w.Header().Get(\"Content-Type\"))\n\t}\n\tbody := w.Body.String()\n\tif !strings.Contains(body, \"speech.audio.delta\") {\n\t\tt.Error(\"response missing speech.audio.delta\")\n\t}\n\tif !strings.Contains(body, \"speech.audio.done\") {\n\t\tt.Error(\"response missing speech.audio.done\")\n\t}\n\tif !strings.Contains(body, \"input_tokens\") || !strings.Contains(body, \"output_tokens\") {\n\t\tt.Error(\"response missing usage fields\")\n\t}\n\tb64Payload := base64.StdEncoding.EncodeToString([]byte(payload))\n\tif !strings.Contains(body, b64Payload) {\n\t\tt.Errorf(\"response should contain base64 of audio chunk %q\", b64Payload)\n\t}\n}\n\nfunc TestSpeechStreamSSE_FileNotFound(t *testing.T) {\n\tgin.SetMode(gin.TestMode)\n\tw := httptest.NewRecorder()\n\tc, _ := gin.CreateTestContext(w)\n\n\tspeechStreamSSE(c, \"/nonexistent/path.wav\", nexa_sdk.ProfileData{})\n\n\tif w.Code != 500 {\n\t\tt.Errorf(\"expected 500, got %d\", w.Code)\n\t}\n\tif !strings.Contains(w.Body.String(), \"error\") {\n\t\tt.Error(\"expected error in body\")\n\t}\n}\n"
  },
  {
    "path": "runner/server/handler/chat.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"log/slog\"\n\t\"math/rand/v2\"\n\t\"net/http\"\n\t\"os\"\n\t\"regexp\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"github.com/bytedance/sonic/ast\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/openai/openai-go/v3\"\n\t\"github.com/openai/openai-go/v3/packages/param\"\n\t\"github.com/openai/openai-go/v3/shared/constant\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/utils\"\n)\n\ntype ChatCompletionNewParams openai.ChatCompletionNewParams\n\ntype ChatCompletionRequest struct {\n\tChatCompletionNewParams\n\tStream bool `json:\"stream\"`\n\n\tEnableThink bool  `json:\"enable_think\"`\n\tNCtx        int32 `json:\"nctx\"`\n\tNgl         int32 `json:\"ngl\"`\n\n\tImageMaxLength int32 `json:\"image_max_length\"`\n\n\tTopK              int32   `json:\"top_k\"`\n\tMinP              float32 `json:\"min_p\"`\n\tRepetitionPenalty float32 `json:\"repetition_penalty\"`\n\tGrammarPath       string  `json:\"grammar_path\"`\n\tGrammarString     string  `json:\"grammar_string\"`\n\tEnableJson        bool    `json:\"enable_json\"`\n}\n\nfunc defaultChatCompletionRequest() ChatCompletionRequest {\n\treturn ChatCompletionRequest{\n\t\tChatCompletionNewParams: ChatCompletionNewParams{\n\t\t\tMaxCompletionTokens: param.NewOpt[int64](2048),\n\t\t},\n\t\tStream: false,\n\n\t\tEnableThink:       true,\n\t\tNCtx:              4096,\n\t\tNgl:               999,\n\t\tImageMaxLength:    512,\n\t\tTopK:              0,\n\t\tMinP:              0.0,\n\t\tRepetitionPenalty: 1.0,\n\t\tGrammarPath:       \"\",\n\t\tGrammarString:     \"\",\n\t\tEnableJson:        false,\n\t}\n}\n\nfunc isWarmupRequest(param ChatCompletionRequest) bool {\n\tif len(param.Messages) == 0 {\n\t\treturn true\n\t}\n\tif len(param.Messages) != 1 {\n\t\treturn false\n\t}\n\tr := param.Messages[0].GetRole()\n\treturn r != nil && *r == \"system\"\n}\n\nfunc ChatCompletions(c *gin.Context) {\n\tparam := defaultChatCompletionRequest()\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tslog.Error(\"Failed to bind JSON\", \"error\", err)\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\t// Automatically adjust NCtx if MaxCompletionTokens is larger\n\tif param.NCtx < int32(param.MaxCompletionTokens.Value) {\n\t\tslog.Debug(\"Adjust NCtx to MaxCompletionTokens\", \"from\", param.NCtx, \"to\", param.MaxCompletionTokens.Value)\n\t\tparam.NCtx = int32(param.MaxCompletionTokens.Value)\n\t}\n\n\tslog.Info(\"ChatCompletions\", \"param\", param)\n\ts := store.Get()\n\tname, _ := utils.NormalizeModelName(param.Model)\n\tmanifest, err := s.GetManifest(name)\n\tif err != nil {\n\t\tslog.Error(\"Failed to get model manifest\", \"model\", param.Model, \"error\", err)\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tswitch manifest.ModelType {\n\tcase types.ModelTypeLLM:\n\t\tchatCompletionsLLM(c, param)\n\tcase types.ModelTypeVLM:\n\t\tchatCompletionsVLM(c, param)\n\tdefault:\n\t\tslog.Error(\"Model type not support\", \"model_type\", manifest.ModelType)\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"model type not support\"})\n\t\treturn\n\t}\n}\n\nfunc chatCompletionsLLM(c *gin.Context, param ChatCompletionRequest) {\n\tmessages := make([]nexa_sdk.LlmChatMessage, 0, len(param.Messages))\n\tfor _, msg := range param.Messages {\n\t\tif toolCalls := msg.GetToolCalls(); len(toolCalls) > 0 {\n\t\t\tfor _, tc := range toolCalls {\n\t\t\t\tmessages = append(messages, nexa_sdk.LlmChatMessage{\n\t\t\t\t\tRole: nexa_sdk.LLMRole(*msg.GetRole()),\n\t\t\t\t\tContent: fmt.Sprintf(`<tool_call>{\"name\":\"%s\",\"arguments\":\"%s\"}</tool_call>`,\n\t\t\t\t\t\ttc.GetFunction().Name, tc.GetFunction().Arguments),\n\t\t\t\t})\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif toolResp := msg.GetToolCallID(); toolResp != nil {\n\t\t\tmessages = append(messages, nexa_sdk.LlmChatMessage{\n\t\t\t\tRole:    nexa_sdk.LLMRole(*msg.GetRole()),\n\t\t\t\tContent: *msg.GetContent().AsAny().(*string),\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\n\t\tswitch content := msg.GetContent().AsAny().(type) {\n\t\tcase *string:\n\t\t\tmessages = append(messages, nexa_sdk.LlmChatMessage{\n\t\t\t\tRole:    nexa_sdk.LLMRole(*msg.GetRole()),\n\t\t\t\tContent: *content,\n\t\t\t})\n\n\t\tcase *[]openai.ChatCompletionContentPartTextParam:\n\t\t\tfor _, ct := range *content {\n\t\t\t\tmessages = append(messages, nexa_sdk.LlmChatMessage{\n\t\t\t\t\tRole:    nexa_sdk.LLMRole(*msg.GetRole()),\n\t\t\t\t\tContent: ct.Text,\n\t\t\t\t})\n\t\t\t}\n\t\tcase *[]openai.ChatCompletionContentPartUnionParam:\n\t\t\tfor _, ct := range *content {\n\t\t\t\tswitch *ct.GetType() {\n\t\t\t\tcase \"text\":\n\t\t\t\t\tmessages = append(messages, nexa_sdk.LlmChatMessage{\n\t\t\t\t\t\tRole:    nexa_sdk.LLMRole(*msg.GetRole()),\n\t\t\t\t\t\tContent: *ct.GetText(),\n\t\t\t\t\t})\n\t\t\t\tdefault:\n\t\t\t\t\tslog.Error(\"Not support content part type\", \"type\", *ct.GetType())\n\t\t\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"not support content part type\"})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\tcase *[]openai.ChatCompletionAssistantMessageParamContentArrayOfContentPartUnion:\n\t\t\tfor _, ct := range *content {\n\t\t\t\tswitch *ct.GetType() {\n\t\t\t\tcase \"text\":\n\t\t\t\t\tmessages = append(messages, nexa_sdk.LlmChatMessage{\n\t\t\t\t\t\tRole:    nexa_sdk.LLMRole(*msg.GetRole()),\n\t\t\t\t\t\tContent: *ct.GetText(),\n\t\t\t\t\t})\n\t\t\t\tdefault:\n\t\t\t\t\tslog.Error(\"Not support content part type\", \"type\", *ct.GetType())\n\t\t\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"not support content part type\"})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\tdefault:\n\t\t\tslog.Error(\"Unknown content type in message\", \"content_type\", fmt.Sprintf(\"%T\", content))\n\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"unknown content type\"})\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Prepare tools if provided\n\tparseTool, tools, err := parseTools(param)\n\tif err != nil {\n\t\tslog.Error(\"Failed to parse tools\", \"error\", err)\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tsamplerConfig := parseSamplerConfig(param)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.LLM](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{NCtx: param.NCtx, NGpuLayers: param.Ngl},\n\t\tc.GetHeader(\"Nexa-KeepCache\") != \"true\",\n\t)\n\tif errors.Is(err, os.ErrNotExist) {\n\t\tc.JSON(http.StatusNotFound, map[string]any{\"error\": \"model not found\"})\n\t\treturn\n\t} else if err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\tif isWarmupRequest(param) {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\tformatted, err := p.ApplyChatTemplate(nexa_sdk.LlmApplyChatTemplateInput{\n\t\tMessages:            messages,\n\t\tTools:               tools,\n\t\tEnableThink:         param.EnableThink,\n\t\tAddGenerationPrompt: true,\n\t})\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\tif param.Stream {\n\t\t// Streaming response mode\n\t\tstopGen := false\n\t\tdataCh := make(chan string)\n\n\t\tvar (\n\t\t\tres   nexa_sdk.LlmGenerateOutput\n\t\t\terr   error\n\t\t\tresWg sync.WaitGroup\n\t\t)\n\n\t\tresWg.Add(1)\n\t\tgo func() {\n\t\t\tdefer resWg.Done()\n\t\t\tres, err = p.Generate(nexa_sdk.LlmGenerateInput{\n\t\t\t\tPromptUTF8: formatted.FormattedText,\n\t\t\t\tOnToken: func(token string) bool {\n\t\t\t\t\tif stopGen {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tdataCh <- token\n\t\t\t\t\treturn true\n\t\t\t\t},\n\t\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\t\tMaxTokens:     int32(param.MaxCompletionTokens.Value),\n\t\t\t\t\tSamplerConfig: samplerConfig,\n\t\t\t\t},\n\t\t\t})\n\t\t\tclose(dataCh)\n\t\t}()\n\n\t\tif !parseTool {\n\t\t\tc.Stream(func(w io.Writer) bool {\n\t\t\t\tr, ok := <-dataCh\n\t\t\t\tif ok {\n\t\t\t\t\tchunk := openai.ChatCompletionChunk{}\n\t\t\t\t\tchunk.Choices = append(chunk.Choices, openai.ChatCompletionChunkChoice{\n\t\t\t\t\t\tDelta: openai.ChatCompletionChunkChoiceDelta{\n\t\t\t\t\t\t\tContent: r,\n\t\t\t\t\t\t\tRole:    string(openai.MessageRoleAssistant),\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\n\t\t\t\t\tc.SSEvent(\"\", chunk)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\tresWg.Wait()\n\n\t\t\t\tif err != nil {\n\t\t\t\t\tc.SSEvent(\"\", map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tif param.StreamOptions.IncludeUsage.Value {\n\t\t\t\t\tc.SSEvent(\"\", openai.ChatCompletionChunk{\n\t\t\t\t\t\tChoices: []openai.ChatCompletionChunkChoice{},\n\t\t\t\t\t\tUsage:   profile2Usage(res.ProfileData),\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tc.SSEvent(\"\", \"[DONE]\")\n\n\t\t\t\treturn false\n\t\t\t})\n\t\t} else {\n\t\t\tbuffer := strings.Builder{}\n\t\t\tc.Stream(func(w io.Writer) bool {\n\t\t\t\tr, ok := <-dataCh\n\t\t\t\tif ok {\n\t\t\t\t\tbuffer.WriteString(r)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\tresWg.Wait()\n\n\t\t\t\tif err != nil {\n\t\t\t\t\tslog.Error(\"Generation error\", \"error\", err)\n\t\t\t\t\tc.SSEvent(\"\", map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\ttoolCall, err := parseToolCalls(buffer.String())\n\t\t\t\tif err != nil {\n\t\t\t\t\tslog.Warn(\"Tool call parse error, fallback to text\", \"error\", err)\n\n\t\t\t\t\tchunk := openai.ChatCompletionChunk{}\n\t\t\t\t\tchunk.Choices = append(chunk.Choices, openai.ChatCompletionChunkChoice{\n\t\t\t\t\t\tDelta: openai.ChatCompletionChunkChoiceDelta{\n\t\t\t\t\t\t\tContent: buffer.String(),\n\t\t\t\t\t\t\tRole:    string(openai.MessageRoleAssistant),\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\n\t\t\t\t\tc.SSEvent(\"\", chunk)\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tc.SSEvent(\"\", openai.ChatCompletionChunk{\n\t\t\t\t\tChoices: []openai.ChatCompletionChunkChoice{{\n\t\t\t\t\t\tDelta: openai.ChatCompletionChunkChoiceDelta{\n\t\t\t\t\t\t\tToolCalls: []openai.ChatCompletionChunkChoiceDeltaToolCall{{\n\t\t\t\t\t\t\t\tID: fmt.Sprintf(\"call_%d\", rand.Uint32()),\n\t\t\t\t\t\t\t\tFunction: openai.ChatCompletionChunkChoiceDeltaToolCallFunction{\n\t\t\t\t\t\t\t\t\tName:      toolCall.Name,\n\t\t\t\t\t\t\t\t\tArguments: toolCall.Arguments,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t},\n\t\t\t\t\t}},\n\t\t\t\t})\n\n\t\t\t\tif param.StreamOptions.IncludeUsage.Value {\n\t\t\t\t\tc.SSEvent(\"\", openai.ChatCompletionChunk{\n\t\t\t\t\t\tChoices: []openai.ChatCompletionChunkChoice{},\n\t\t\t\t\t\tUsage:   profile2Usage(res.ProfileData),\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tc.SSEvent(\"\", \"[DONE]\")\n\n\t\t\t\treturn false\n\t\t\t})\n\t\t}\n\n\t\tstopGen = true\n\t\tfor range dataCh {\n\t\t}\n\n\t} else {\n\t\t// Blocking response mode\n\t\tgenOut, err := p.Generate(nexa_sdk.LlmGenerateInput{\n\t\t\tPromptUTF8: formatted.FormattedText,\n\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\tMaxTokens:     int32(param.MaxCompletionTokens.Value),\n\t\t\t\tSamplerConfig: samplerConfig,\n\t\t\t},\n\t\t},\n\t\t)\n\t\tif err != nil {\n\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\treturn\n\t\t}\n\n\t\tif parseTool {\n\t\t\ttoolCall, err := parseToolCalls(genOut.FullText)\n\t\t\tif err == nil {\n\t\t\t\tchoice := openai.ChatCompletionChoice{}\n\t\t\t\tchoice.Message.Role = constant.Assistant(openai.MessageRoleAssistant)\n\t\t\t\tchoice.Message.ToolCalls = []openai.ChatCompletionMessageToolCallUnion{{Function: toolCall}}\n\t\t\t\tres := openai.ChatCompletion{\n\t\t\t\t\tID:      fmt.Sprintf(\"call_%d\", rand.Uint32()),\n\t\t\t\t\tChoices: []openai.ChatCompletionChoice{choice},\n\t\t\t\t\tUsage:   profile2Usage(genOut.ProfileData),\n\t\t\t\t}\n\t\t\t\tc.JSON(http.StatusOK, res)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tslog.Warn(\"Tool call parse error, fallback to text\", \"error\", err)\n\t\t}\n\n\t\tchoice := openai.ChatCompletionChoice{}\n\t\tchoice.Message.Role = constant.Assistant(openai.MessageRoleAssistant)\n\t\tchoice.Message.Content = genOut.FullText\n\t\tres := openai.ChatCompletion{\n\t\t\tChoices: []openai.ChatCompletionChoice{choice},\n\t\t\tUsage:   profile2Usage(genOut.ProfileData),\n\t\t}\n\t\tc.JSON(http.StatusOK, res)\n\t\treturn\n\t}\n}\n\nfunc chatCompletionsVLM(c *gin.Context, param ChatCompletionRequest) {\n\tmessages := make([]nexa_sdk.VlmChatMessage, 0, len(param.Messages))\n\tfor _, msg := range param.Messages {\n\t\tif toolCalls := msg.GetToolCalls(); len(toolCalls) > 0 {\n\t\t\tcontents := make([]nexa_sdk.VlmContent, 0, len(toolCalls))\n\t\t\tfor _, tc := range toolCalls {\n\t\t\t\tcontents = append(contents, nexa_sdk.VlmContent{\n\t\t\t\t\tType: nexa_sdk.VlmContentTypeText,\n\t\t\t\t\tText: fmt.Sprintf(`<tool_call>{\"name\":\"%s\",\"arguments\":\"%s\"}</tool_call>`,\n\t\t\t\t\t\ttc.GetFunction().Name, tc.GetFunction().Arguments),\n\t\t\t\t})\n\t\t\t}\n\t\t\tmessages = append(messages, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole:     nexa_sdk.VlmRole(*msg.GetRole()),\n\t\t\t\tContents: contents,\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\n\t\tif toolResp := msg.GetToolCallID(); toolResp != nil {\n\t\t\tmessages = append(messages, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole: nexa_sdk.VlmRole(*msg.GetRole()),\n\t\t\t\tContents: []nexa_sdk.VlmContent{{\n\t\t\t\t\tType: nexa_sdk.VlmContentTypeText,\n\t\t\t\t\tText: *msg.GetContent().AsAny().(*string),\n\t\t\t\t}},\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\n\t\tswitch content := msg.GetContent().AsAny().(type) {\n\t\tcase *string:\n\t\t\tmessages = append(messages, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole: nexa_sdk.VlmRole(*msg.GetRole()),\n\t\t\t\tContents: []nexa_sdk.VlmContent{\n\t\t\t\t\t{Type: nexa_sdk.VlmContentTypeText, Text: *msg.GetContent().AsAny().(*string)},\n\t\t\t\t},\n\t\t\t})\n\n\t\tcase *[]openai.ChatCompletionContentPartTextParam:\n\t\t\tcontents := make([]nexa_sdk.VlmContent, 0, len(*content))\n\t\t\tfor _, ct := range *content {\n\t\t\t\tcontents = append(contents, nexa_sdk.VlmContent{\n\t\t\t\t\tType: nexa_sdk.VlmContentTypeText,\n\t\t\t\t\tText: ct.Text,\n\t\t\t\t})\n\t\t\t}\n\t\t\tmessages = append(messages, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole:     nexa_sdk.VlmRole(*msg.GetRole()),\n\t\t\t\tContents: contents,\n\t\t\t})\n\n\t\tcase *[]openai.ChatCompletionContentPartUnionParam:\n\t\t\tcontents := make([]nexa_sdk.VlmContent, 0, len(*content))\n\t\t\tfor _, ct := range *content {\n\t\t\t\tswitch *ct.GetType() {\n\t\t\t\tcase \"text\":\n\t\t\t\t\tcontents = append(contents, nexa_sdk.VlmContent{\n\t\t\t\t\t\tType: nexa_sdk.VlmContentTypeText,\n\t\t\t\t\t\tText: *ct.GetText(),\n\t\t\t\t\t})\n\t\t\t\tcase \"image_url\":\n\t\t\t\t\tfile, err := utils.SaveURIToTempFile(ct.GetImageURL().URL)\n\t\t\t\t\tslog.Debug(\"Saved image file\", \"file\", file)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error()})\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tdefer os.Remove(file)\n\t\t\t\t\tcontents = append(contents, nexa_sdk.VlmContent{\n\t\t\t\t\t\tType: nexa_sdk.VlmContentTypeImage,\n\t\t\t\t\t\tText: file,\n\t\t\t\t\t})\n\t\t\t\tcase \"input_audio\":\n\t\t\t\t\tfile, err := utils.SaveURIToTempFile(ct.GetInputAudio().Data)\n\t\t\t\t\tslog.Debug(\"Saved audio file\", \"file\", file)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error()})\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tdefer os.Remove(file)\n\t\t\t\t\tcontents = append(contents, nexa_sdk.VlmContent{\n\t\t\t\t\t\tType: nexa_sdk.VlmContentTypeAudio,\n\t\t\t\t\t\tText: file,\n\t\t\t\t\t})\n\t\t\t\tdefault:\n\t\t\t\t\tslog.Error(\"Not support content part type\", \"type\", *ct.GetType())\n\t\t\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"not support content part type\"})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\tmessages = append(messages, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole:     nexa_sdk.VlmRole(*msg.GetRole()),\n\t\t\t\tContents: contents,\n\t\t\t})\n\n\t\tcase *[]openai.ChatCompletionAssistantMessageParamContentArrayOfContentPartUnion:\n\t\t\tcontents := make([]nexa_sdk.VlmContent, 0, len(*content))\n\t\t\tfor _, ct := range *content {\n\t\t\t\tswitch *ct.GetType() {\n\t\t\t\tcase \"text\":\n\t\t\t\t\tcontents = append(contents, nexa_sdk.VlmContent{\n\t\t\t\t\t\tType: nexa_sdk.VlmContentTypeText,\n\t\t\t\t\t\tText: *ct.GetText(),\n\t\t\t\t\t})\n\t\t\t\tdefault:\n\t\t\t\t\tslog.Error(\"Not support content part type\", \"type\", *ct.GetType())\n\t\t\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"not support content part type\"})\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tmessages = append(messages, nexa_sdk.VlmChatMessage{\n\t\t\t\tRole:     nexa_sdk.VlmRole(*msg.GetRole()),\n\t\t\t\tContents: contents,\n\t\t\t})\n\n\t\tdefault:\n\t\t\tslog.Error(\"Unknown content type in message\")\n\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"unknown content type\"})\n\t\t\treturn\n\t\t}\n\t}\n\n\t// Prepare tools if provided\n\tparseTool, tools, err := parseTools(param)\n\tif err != nil {\n\t\tslog.Error(\"Failed to parse tools\", \"error\", err)\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tsamplerConfig := parseSamplerConfig(param)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.VLM](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{NCtx: param.NCtx, NGpuLayers: param.Ngl},\n\t\tc.GetHeader(\"Nexa-KeepCache\") != \"true\",\n\t)\n\tif errors.Is(err, os.ErrNotExist) {\n\t\tc.JSON(http.StatusNotFound, map[string]any{\"error\": \"model not found\"})\n\t\treturn\n\t} else if err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\tif isWarmupRequest(param) {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\t// Format prompt using VLM chat template\n\tformatted, err := p.ApplyChatTemplate(nexa_sdk.VlmApplyChatTemplateInput{\n\t\tMessages:    messages,\n\t\tTools:       tools,\n\t\tEnableThink: param.EnableThink,\n\t})\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\timages := make([]string, 0)\n\taudios := make([]string, 0)\n\tfor _, content := range messages[len(messages)-1].Contents {\n\t\tswitch content.Type {\n\t\tcase nexa_sdk.VlmContentTypeImage:\n\t\t\timages = append(images, content.Text)\n\t\tcase nexa_sdk.VlmContentTypeAudio:\n\t\t\taudios = append(audios, content.Text)\n\t\t}\n\t}\n\n\tif param.Stream {\n\t\t// Streaming response mode\n\t\tstopGen := false\n\t\tdataCh := make(chan string)\n\n\t\tvar (\n\t\t\tres   *nexa_sdk.VlmGenerateOutput\n\t\t\terr   error\n\t\t\tresWg sync.WaitGroup\n\t\t)\n\n\t\tresWg.Add(1)\n\t\tgo func() {\n\t\t\tdefer resWg.Done()\n\t\t\tres, err = p.Generate(nexa_sdk.VlmGenerateInput{\n\t\t\t\tPromptUTF8: formatted.FormattedText,\n\t\t\t\tOnToken: func(token string) bool {\n\t\t\t\t\tif stopGen {\n\t\t\t\t\t\treturn false\n\t\t\t\t\t}\n\t\t\t\t\tdataCh <- token\n\t\t\t\t\treturn true\n\t\t\t\t},\n\t\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\t\tMaxTokens:      int32(param.MaxCompletionTokens.Value),\n\t\t\t\t\tSamplerConfig:  samplerConfig,\n\t\t\t\t\tImagePaths:     images,\n\t\t\t\t\tAudioPaths:     audios,\n\t\t\t\t\tImageMaxLength: param.ImageMaxLength,\n\t\t\t\t},\n\t\t\t})\n\n\t\t\tclose(dataCh)\n\t\t}()\n\n\t\tif !parseTool {\n\t\t\tc.Stream(func(w io.Writer) bool {\n\t\t\t\tr, ok := <-dataCh\n\t\t\t\tif ok {\n\t\t\t\t\tchunk := openai.ChatCompletionChunk{}\n\t\t\t\t\tchunk.Choices = append(chunk.Choices, openai.ChatCompletionChunkChoice{\n\t\t\t\t\t\tDelta: openai.ChatCompletionChunkChoiceDelta{\n\t\t\t\t\t\t\tContent: r,\n\t\t\t\t\t\t\tRole:    string(openai.MessageRoleAssistant),\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\n\t\t\t\t\tc.SSEvent(\"\", chunk)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\tresWg.Wait()\n\n\t\t\t\tif err != nil {\n\t\t\t\t\tc.SSEvent(\"\", map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tif param.StreamOptions.IncludeUsage.Value {\n\t\t\t\t\tc.SSEvent(\"\", openai.ChatCompletionChunk{\n\t\t\t\t\t\tChoices: []openai.ChatCompletionChunkChoice{},\n\t\t\t\t\t\tUsage:   profile2Usage(res.ProfileData),\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tc.SSEvent(\"\", \"[DONE]\")\n\n\t\t\t\treturn false\n\t\t\t})\n\t\t} else {\n\t\t\tbuffer := strings.Builder{}\n\t\t\tc.Stream(func(w io.Writer) bool {\n\t\t\t\tr, ok := <-dataCh\n\t\t\t\tif ok {\n\t\t\t\t\tbuffer.WriteString(r)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\tresWg.Wait()\n\n\t\t\t\tif err != nil {\n\t\t\t\t\tslog.Error(\"Generation error\", \"error\", err)\n\t\t\t\t\tc.SSEvent(\"\", map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\ttoolCall, err := parseToolCalls(buffer.String())\n\t\t\t\tif err != nil {\n\t\t\t\t\tslog.Warn(\"Tool call parse error, fallback to text\", \"error\", err)\n\n\t\t\t\t\tchunk := openai.ChatCompletionChunk{}\n\t\t\t\t\tchunk.Choices = append(chunk.Choices, openai.ChatCompletionChunkChoice{\n\t\t\t\t\t\tDelta: openai.ChatCompletionChunkChoiceDelta{\n\t\t\t\t\t\t\tContent: buffer.String(),\n\t\t\t\t\t\t\tRole:    string(openai.MessageRoleAssistant),\n\t\t\t\t\t\t},\n\t\t\t\t\t})\n\n\t\t\t\t\tc.SSEvent(\"\", chunk)\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tc.SSEvent(\"\", openai.ChatCompletionChunk{\n\t\t\t\t\tChoices: []openai.ChatCompletionChunkChoice{{\n\t\t\t\t\t\tDelta: openai.ChatCompletionChunkChoiceDelta{\n\t\t\t\t\t\t\tToolCalls: []openai.ChatCompletionChunkChoiceDeltaToolCall{{\n\t\t\t\t\t\t\t\tID: fmt.Sprintf(\"call_%d\", rand.Uint32()),\n\t\t\t\t\t\t\t\tFunction: openai.ChatCompletionChunkChoiceDeltaToolCallFunction{\n\t\t\t\t\t\t\t\t\tName:      toolCall.Name,\n\t\t\t\t\t\t\t\t\tArguments: toolCall.Arguments,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t},\n\t\t\t\t\t}},\n\t\t\t\t})\n\n\t\t\t\tif param.StreamOptions.IncludeUsage.Value {\n\t\t\t\t\tc.SSEvent(\"\", openai.ChatCompletionChunk{\n\t\t\t\t\t\tChoices: []openai.ChatCompletionChunkChoice{},\n\t\t\t\t\t\tUsage:   profile2Usage(res.ProfileData),\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t\tc.SSEvent(\"\", \"[DONE]\")\n\n\t\t\t\treturn false\n\t\t\t})\n\t\t}\n\n\t\tstopGen = true\n\t\tfor range dataCh {\n\t\t}\n\n\t} else {\n\t\t// Blocking response mode\n\t\tgenOut, err := p.Generate(nexa_sdk.VlmGenerateInput{\n\t\t\tPromptUTF8: formatted.FormattedText,\n\t\t\tConfig: &nexa_sdk.GenerationConfig{\n\t\t\t\tMaxTokens:      int32(param.MaxCompletionTokens.Value),\n\t\t\t\tSamplerConfig:  samplerConfig,\n\t\t\t\tImagePaths:     images,\n\t\t\t\tAudioPaths:     audios,\n\t\t\t\tImageMaxLength: param.ImageMaxLength,\n\t\t\t},\n\t\t},\n\t\t)\n\t\tif err != nil {\n\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\treturn\n\t\t}\n\n\t\tif parseTool {\n\t\t\ttoolCall, err := parseToolCalls(genOut.FullText)\n\t\t\tif err == nil {\n\t\t\t\tchoice := openai.ChatCompletionChoice{}\n\t\t\t\tchoice.Message.Role = constant.Assistant(openai.MessageRoleAssistant)\n\t\t\t\tchoice.Message.ToolCalls = []openai.ChatCompletionMessageToolCallUnion{{Function: toolCall}}\n\t\t\t\tres := openai.ChatCompletion{\n\t\t\t\t\tID:      fmt.Sprintf(\"call_%d\", rand.Uint32()),\n\t\t\t\t\tChoices: []openai.ChatCompletionChoice{choice},\n\t\t\t\t\tUsage:   profile2Usage(genOut.ProfileData),\n\t\t\t\t}\n\t\t\t\tc.JSON(http.StatusOK, res)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tslog.Warn(\"Tool call parse error, fallback to text\", \"error\", err)\n\t\t}\n\n\t\tchoice := openai.ChatCompletionChoice{}\n\t\tchoice.Message.Role = constant.Assistant(openai.MessageRoleAssistant)\n\t\tchoice.Message.Content = genOut.FullText\n\t\tres := openai.ChatCompletion{\n\t\t\tChoices: []openai.ChatCompletionChoice{choice},\n\t\t\tUsage:   profile2Usage(genOut.ProfileData),\n\t\t}\n\t\tc.JSON(http.StatusOK, res)\n\t\treturn\n\t}\n}\n\nfunc profile2Usage(p nexa_sdk.ProfileData) openai.CompletionUsage {\n\treturn openai.CompletionUsage{\n\t\tCompletionTokens: p.GeneratedTokens,\n\t\tPromptTokens:     p.PromptTokens,\n\t\tTotalTokens:      p.TotalTokens(),\n\t}\n}\n\nfunc parseSamplerConfig(param ChatCompletionRequest) *nexa_sdk.SamplerConfig {\n\t// parse sampling parameters\n\tsamplerConfig := &nexa_sdk.SamplerConfig{\n\t\tTemperature:       float32(param.Temperature.Value),\n\t\tTopP:              float32(param.TopP.Value),\n\t\tTopK:              param.TopK,\n\t\tMinP:              param.MinP,\n\t\tRepetitionPenalty: param.RepetitionPenalty,\n\t\tPresencePenalty:   float32(param.PresencePenalty.Value),\n\t\tFrequencyPenalty:  float32(param.FrequencyPenalty.Value),\n\t\tSeed:              int32(param.Seed.Value),\n\t\tEnableJson:        param.EnableJson,\n\t}\n\treturn samplerConfig\n}\n\nfunc parseTools(param ChatCompletionRequest) (bool, string, error) {\n\tif len(param.Tools) == 0 {\n\t\treturn false, \"\", nil\n\t}\n\n\ttools, err := sonic.MarshalString(param.Tools)\n\treturn true, tools, err\n}\n\nvar toolCallRegex = regexp.MustCompile(`<tool_call>([\\s\\S]+)<\\/tool_call>` + \"|\" + \"```json([\\\\s\\\\S]+)```\")\n\nfunc parseToolCalls(resp string) (openai.ChatCompletionMessageFunctionToolCallFunction, error) {\n\tmatch := toolCallRegex.FindStringSubmatch(resp)\n\tif len(match) <= 1 {\n\t\treturn openai.ChatCompletionMessageFunctionToolCallFunction{}, errors.New(\"tool call not match\")\n\t}\n\tmatched := match[1]\n\tif matched == \"\" && len(match) > 2 {\n\t\tmatched = match[2]\n\t}\n\n\tslog.Debug(\"Tool call matched\", \"matched\", matched)\n\n\tname, err := sonic.GetFromString(matched, \"name\")\n\ttoolCall := openai.ChatCompletionMessageFunctionToolCallFunction{}\n\tif err != nil {\n\t\treturn openai.ChatCompletionMessageFunctionToolCallFunction{}, err\n\t}\n\ttoolCall.Name, err = name.String()\n\tif err != nil {\n\t\treturn openai.ChatCompletionMessageFunctionToolCallFunction{}, err\n\t}\n\n\targuments, err := sonic.GetFromString(matched, \"arguments\")\n\tif err != nil {\n\t\treturn openai.ChatCompletionMessageFunctionToolCallFunction{}, err\n\t}\n\tswitch arguments.TypeSafe() {\n\tcase ast.V_OBJECT:\n\t\ttoolCall.Arguments, _ = arguments.Raw()\n\tcase ast.V_STRING:\n\t\ttoolCall.Arguments, _ = arguments.String()\n\tdefault:\n\t\treturn openai.ChatCompletionMessageFunctionToolCallFunction{}, errors.New(\"unknown arguments type\")\n\t}\n\n\tslog.Debug(\"Parsed tool call\", \"tool_call\", toolCall)\n\n\treturn toolCall, nil\n}\n"
  },
  {
    "path": "runner/server/handler/cv.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"log/slog\"\n\t\"net/http\"\n\t\"os\"\n\n\t\"github.com/gin-gonic/gin\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/utils\"\n)\n\ntype CVRequest struct {\n\tModel string `json:\"model\" binding:\"required\"`\n\tImage string `json:\"image\"`\n}\n\ntype CVResponse struct {\n\tResults []nexa_sdk.CVResult `json:\"results\"`\n}\n\nfunc CV(c *gin.Context) {\n\tparam := CVRequest{}\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tslog.Info(\"CV request received\",\n\t\t\"model\", param.Model,\n\t\t\"image\", param.Image,\n\t)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.CV](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{},\n\t\tfalse,\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\t// warm up\n\tif param.Image == \"\" {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\tfile, err := utils.SaveURIToTempFile(param.Image)\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"failed to save image: \" + err.Error()})\n\t\treturn\n\t}\n\tdefer os.Remove(file)\n\tres, err := p.Infer(nexa_sdk.CVInferInput{\n\t\tInputImagePath: file,\n\t})\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t} else {\n\t\tc.JSON(http.StatusOK, CVResponse{Results: res.Results})\n\t}\n}\n"
  },
  {
    "path": "runner/server/handler/embeddings.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"log/slog\"\n\t\"net/http\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/openai/openai-go/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n)\n\ntype EmbeddingNewParams openai.EmbeddingNewParams\n\ntype EmbeddingRequest struct {\n\tEmbeddingNewParams\n\n\tTaskType string `json:\"task_type\"`\n}\n\nfunc defaultEmbeddingRequest() EmbeddingRequest {\n\treturn EmbeddingRequest{\n\t\tTaskType: \"default\",\n\t}\n}\n\nfunc Embeddings(c *gin.Context) {\n\tparam := defaultEmbeddingRequest()\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tslog.Info(\"Embeddings request received\", \"param\", param)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.Embedder](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{},\n\t\tfalse,\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\t// Convert input to the format expected by the embedder\n\tvar texts []string\n\tswitch {\n\tcase param.Input.OfString.Value != \"\":\n\t\ttexts = []string{param.Input.OfString.String()}\n\tcase param.Input.OfArrayOfStrings != nil:\n\t\ttexts = param.Input.OfArrayOfStrings\n\tdefault:\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"input must be a string or an array of strings\"})\n\t\treturn\n\t}\n\n\tslog.Debug(\"Embeddings called\", \"model\", param.Model, \"num_texts\", len(texts))\n\tif len(texts) == 0 {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\t// Create embedder input\n\tembedInput := nexa_sdk.EmbedderEmbedInput{\n\t\tTexts:    texts,\n\t\tConfig:   &nexa_sdk.EmbeddingConfig{},\n\t\tTaskType: param.TaskType,\n\t}\n\n\tres, err := p.Embed(embedInput)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\tembeddings := make([]openai.Embedding, len(texts))\n\tif len(res.Embeddings) != len(texts) {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": \"embedding count mismatch\"})\n\t\treturn\n\t}\n\n\t// Convert embeddings to the format expected by OpenAI API\n\tfor i := range len(texts) {\n\t\tembeddingSlice := res.Embeddings[i]\n\n\t\t// Convert float32 to float64 for OpenAI API compatibility\n\t\tembeddingFloat64 := make([]float64, len(embeddingSlice))\n\t\tfor j, val := range embeddingSlice {\n\t\t\tembeddingFloat64[j] = float64(val)\n\t\t}\n\n\t\tembeddings[i] = openai.Embedding{\n\t\t\tEmbedding: embeddingFloat64,\n\t\t\tIndex:     int64(i),\n\t\t}\n\t}\n\n\tresponse := openai.CreateEmbeddingResponse{\n\t\tData:  embeddings,\n\t\tModel: param.Model,\n\t\tUsage: openai.CreateEmbeddingResponseUsage{\n\t\t\tPromptTokens: res.ProfileData.PromptTokens,\n\t\t\tTotalTokens:  res.ProfileData.TotalTokens(),\n\t\t},\n\t}\n\n\tc.JSON(http.StatusOK, response)\n}\n"
  },
  {
    "path": "runner/server/handler/images.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"log/slog\"\n\t\"net/http\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/openai/openai-go/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n)\n\nfunc ImageGenerations(c *gin.Context) {\n\tparam := openai.ImageGenerateParams{}\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tslog.Error(\"Failed to bind JSON request\", \"error\", err)\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tslog.Info(\"Image generation request received\",\n\t\t\"model\", param.Model,\n\t\t\"prompt_length\", len(param.Prompt),\n\t\t\"n\", param.N,\n\t\t\"size\", param.Size)\n\n\tif param.N.Value == 0 {\n\t\tparam.N.Value = 1\n\t}\n\tif param.Size == \"\" {\n\t\tparam.Size = openai.ImageGenerateParamsSize256x256\n\t}\n\tif param.ResponseFormat != \"\" && param.ResponseFormat != openai.ImageGenerateParamsResponseFormatB64JSON {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"only 'b64_json' response format is supported\"})\n\t\treturn\n\t}\n\n\timageGen, err := service.KeepAliveGet[nexa_sdk.ImageGen](\n\t\tparam.Model,\n\t\ttypes.ModelParam{},\n\t\tc.GetHeader(\"Nexa-KeepCache\") != \"true\",\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\t// warm up\n\tif param.Prompt == \"\" {\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\twidth, height, err := parseImageSize(string(param.Size))\n\tif err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tvar imageData []openai.Image\n\tslog.Info(\"Starting image generation\", \"count\", param.N.Value, \"size\", string(param.Size))\n\tfor i := range param.N.Value {\n\t\toutputPath := fmt.Sprintf(\"imagegen_output_%d.png\", time.Now().UnixNano())\n\t\tdefer os.Remove(outputPath)\n\t\tslog.Debug(\"Generating image\", \"index\", i, \"output_path\", outputPath)\n\n\t\tconfig := &nexa_sdk.ImageGenerationConfig{\n\t\t\tPrompts:         []string{param.Prompt},\n\t\t\tNegativePrompts: []string{\"blurry, low quality, distorted, low resolution\"},\n\t\t\tHeight:          height,\n\t\t\tWidth:           width,\n\t\t\tSamplerConfig: nexa_sdk.ImageSamplerConfig{\n\t\t\t\tMethod:        \"ddim\",\n\t\t\t\tSteps:         20,\n\t\t\t\tGuidanceScale: 7.5,\n\t\t\t\tEta:           0.0,\n\t\t\t\tSeed:          int32(time.Now().UnixNano() % 1000000),\n\t\t\t},\n\t\t\tSchedulerConfig: nexa_sdk.SchedulerConfig{\n\t\t\t\tType:              \"ddim\",\n\t\t\t\tNumTrainTimesteps: 1000,\n\t\t\t\tStepsOffset:       1,\n\t\t\t\tBetaStart:         0.00085,\n\t\t\t\tBetaEnd:           0.012,\n\t\t\t\tBetaSchedule:      \"scaled_linear\",\n\t\t\t\tPredictionType:    \"epsilon\",\n\t\t\t\tTimestepType:      \"discrete\",\n\t\t\t\tTimestepSpacing:   \"leading\",\n\t\t\t\tInterpolationType: \"linear\",\n\t\t\t\tConfigPath:        \"\",\n\t\t\t},\n\t\t\tStrength: 1.0,\n\t\t}\n\n\t\tresult, err := imageGen.Txt2Img(nexa_sdk.ImageGenTxt2ImgInput{\n\t\t\tPromptUTF8: param.Prompt,\n\t\t\tConfig:     config,\n\t\t\tOutputPath: outputPath,\n\t\t})\n\t\tif err != nil {\n\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": fmt.Sprintf(\"image generation failed: %v\", err), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\t\treturn\n\t\t}\n\n\t\tdata := openai.Image{\n\t\t\tRevisedPrompt: param.Prompt,\n\t\t}\n\n\t\tb64Data, err := encodeImageToBase64(result.OutputImagePath)\n\t\tif err != nil {\n\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": fmt.Sprintf(\"failed to encode image: %v\", err)})\n\t\t\treturn\n\t\t}\n\t\tdata.B64JSON = b64Data\n\n\t\timageData = append(imageData, data)\n\t\tslog.Info(\"Image generated successfully\", \"index\", i, \"output_path\", result.OutputImagePath)\n\t}\n\n\tresponse := openai.ImagesResponse{\n\t\tCreated: time.Now().Unix(),\n\t\tData:    imageData,\n\t}\n\n\tslog.Info(\"Image generation completed successfully\", \"total_images\", len(imageData))\n\tc.JSON(http.StatusOK, response)\n}\n\nfunc parseImageSize(size string) (int32, int32, error) {\n\tparts := strings.Split(size, \"x\")\n\tif len(parts) != 2 {\n\t\treturn 0, 0, errors.New(\"invalid size format\")\n\t}\n\n\twidth, err := strconv.Atoi(parts[0])\n\tif err != nil {\n\t\treturn 0, 0, errors.New(\"invalid width\")\n\t}\n\n\theight, err := strconv.Atoi(parts[1])\n\tif err != nil {\n\t\treturn 0, 0, errors.New(\"invalid height\")\n\t}\n\n\treturn int32(width), int32(height), nil\n}\n\nfunc encodeImageToBase64(imagePath string) (string, error) {\n\timageData, err := os.ReadFile(imagePath)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to read image file: %v\", err)\n\t}\n\tmimeType := http.DetectContentType(imageData)\n\tbase64String := base64.StdEncoding.EncodeToString(imageData)\n\treturn fmt.Sprintf(\"data:%s;base64,%s\", mimeType, base64String), nil\n}\n"
  },
  {
    "path": "runner/server/handler/model.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/bytedance/sonic\"\n\t\"github.com/gin-gonic/gin\"\n\t\"github.com/openai/openai-go/v3\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/utils\"\n)\n\nfunc ListModels(c *gin.Context) {\n\ts := store.Get()\n\n\tmodels, err := s.List()\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tres := make([]openai.Model, 0, len(models))\n\tfor _, m := range models {\n\t\tfor q, f := range m.ModelFile {\n\t\t\tif !f.Downloaded {\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tid := m.Name\n\t\t\tif q != \"N/A\" {\n\t\t\t\tid += \":\" + q\n\t\t\t}\n\t\t\tres = append(res, openai.Model{\n\t\t\t\tID:      id,\n\t\t\t\tOwnedBy: strings.Split(m.Name, \"/\")[0],\n\t\t\t})\n\t\t}\n\t}\n\n\tc.JSON(http.StatusOK, map[string]any{\n\t\t\"object\": \"list\",\n\t\t\"data\":   res,\n\t})\n}\n\nfunc RetrieveModel(c *gin.Context) {\n\tname := strings.TrimPrefix(c.Param(\"model\"), \"/\")\n\tname, quant := utils.NormalizeModelName(name)\n\n\t// check model exist\n\ts := store.Get()\n\tmanifest, err := s.GetManifest(name)\n\tif err != nil {\n\t\tif errors.Is(err, os.ErrNotExist) {\n\t\t\tc.JSON(http.StatusNotFound, nil)\n\t\t} else {\n\t\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error()})\n\t\t}\n\t\treturn\n\t}\n\n\t// fill quant if not specified\n\tif quant == \"\" {\n\t\tquants := make([]string, 0, len(manifest.ModelFile))\n\t\tfor quant, v := range manifest.ModelFile {\n\t\t\tif v.Downloaded {\n\t\t\t\tquants = append(quants, quant)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tslices.Sort(quants)\n\t\tquant = quants[0]\n\t}\n\n\t// check quant exist\n\tif _, ok := manifest.ModelFile[quant]; !ok {\n\t\tc.JSON(http.StatusNotFound, nil)\n\t\treturn\n\t}\n\n\t// compact with openai format\n\tvar res map[string]any\n\tms, _ := sonic.Marshal(manifest)\n\t_ = sonic.Unmarshal(ms, &res)\n\tmodel := openai.Model{}\n\tmodel.ID = name\n\tif quant != \"N/A\" {\n\t\tmodel.ID += \":\" + quant\n\t}\n\tmodel.OwnedBy = strings.Split(manifest.Name, \"/\")[0]\n\tms, _ = sonic.Marshal(model)\n\t_ = sonic.Unmarshal(ms, &res)\n\n\tc.JSON(http.StatusOK, res)\n}\n"
  },
  {
    "path": "runner/server/handler/reranking.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage handler\n\nimport (\n\t\"log/slog\"\n\t\"net/http\"\n\n\t\"github.com/gin-gonic/gin\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n)\n\ntype RerankingRequest struct {\n\tModel           string   `json:\"model\" binding:\"required\"`\n\tQuery           string   `json:\"query\"`\n\tDocuments       []string `json:\"documents\"`\n\tBatchSize       int32    `json:\"batch_size\"`\n\tNormalizeMethod string   `json:\"normalize_method\"`\n\tNormalize       bool     `json:\"normalize\"`\n}\n\ntype RerankResponse struct {\n\tResult []float32 `json:\"result\"`\n}\n\nfunc Reranking(c *gin.Context) {\n\tparam := RerankingRequest{}\n\tif err := c.ShouldBindJSON(&param); err != nil {\n\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": err.Error()})\n\t\treturn\n\t}\n\n\tslog.Info(\"Reranking request received\",\n\t\t\"model\", param.Model,\n\t\t\"query\", param.Query,\n\t\t\"documents\", param.Documents,\n\t)\n\n\tp, err := service.KeepAliveGet[nexa_sdk.Reranker](\n\t\tstring(param.Model),\n\t\ttypes.ModelParam{},\n\t\tfalse,\n\t)\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t\treturn\n\t}\n\n\tif param.Query == \"\" || len(param.Documents) == 0 {\n\t\tif param.Query != \"\" || len(param.Documents) != 0 {\n\t\t\tc.JSON(http.StatusBadRequest, map[string]any{\"error\": \"both query and documents must be provided\"})\n\t\t\treturn\n\t\t}\n\t\tc.JSON(http.StatusOK, nil)\n\t\treturn\n\t}\n\n\tres, err := p.Rerank(nexa_sdk.RerankerRerankInput{\n\t\tQuery:     param.Query,\n\t\tDocuments: param.Documents,\n\t\tConfig: &nexa_sdk.RerankConfig{\n\t\t\tBatchSize:       param.BatchSize,\n\t\t\tNormalize:       param.Normalize,\n\t\t\tNormalizeMethod: param.NormalizeMethod,\n\t\t},\n\t})\n\tif err != nil {\n\t\tc.JSON(http.StatusInternalServerError, map[string]any{\"error\": err.Error(), \"code\": nexa_sdk.SDKErrorCode(err)})\n\t} else {\n\t\tc.JSON(http.StatusOK, RerankResponse{Result: res.Scores})\n\t}\n}\n"
  },
  {
    "path": "runner/server/middleware/auth.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage middleware\n"
  },
  {
    "path": "runner/server/middleware/cors.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage middleware\n\nimport (\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc CORS(c *gin.Context) {\n\th := c.Writer.Header()\n\th.Set(\"Access-Control-Allow-Origin\", config.Get().Origins)\n\th.Set(\"Access-Control-Allow-Methods\", \"OPTIONS, GET, POST\")\n\th.Set(\"Access-Control-Allow-Headers\", \"Content-Type, Nexa-KeepCache\")\n\th.Set(\"Access-Control-Allow-Credentials\", \"true\")\n\th.Set(\"Access-Control-Max-Age\", \"86400\")\n\n\tif c.Request.Method == \"OPTIONS\" {\n\t\tc.AbortWithStatus(204)\n\t\treturn\n\t}\n\n\tc.Next()\n}\n"
  },
  {
    "path": "runner/server/middleware/gil.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage middleware\n\nimport (\n\t\"sync\"\n\n\t\"github.com/gin-gonic/gin\"\n)\n\nvar lock sync.Mutex\n\nfunc GIL(c *gin.Context) {\n\t// Block and wait for lock instead of immediately failing\n\t// This prevents 429 errors when requests queue up briefly\n\tlock.Lock()\n\tdefer lock.Unlock()\n\n\tc.Next()\n}\n"
  },
  {
    "path": "runner/server/route.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage server\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gin-gonic/gin\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/server/docs\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/handler\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/middleware\"\n)\n\nfunc RegisterRoot(r *gin.Engine) {\n\tr.Use(middleware.CORS)\n\tr.GET(\"/\", func(c *gin.Context) {\n\t\tc.String(200, \"Nexa SDK is running\")\n\t})\n}\n\n// http://localhost:18181/docs/ui/\nfunc RegisterSwagger(r *gin.Engine) {\n\tg := r.Group(\"/docs\")\n\tg.GET(\"/swagger.yaml\", docs.SwaggerYAMLHandler())\n\tg.StaticFS(\"/ui\", docs.FS)\n}\n\nfunc RegisterAPIv1(r *gin.Engine) {\n\tg := r.Group(\"/v1\")\n\tg.Use(middleware.CORS, middleware.GIL)\n\n\t// ==== legacy ====\n\tg.POST(\"/completions\", func(c *gin.Context) {\n\t\tc.JSON(http.StatusGone, map[string]any{\"error\": \"this endpoint is deprecated, please use /chat/completions instead\"})\n\t})\n\n\t// ==== openai compatible ====\n\tg.POST(\"/chat/completions\", handler.ChatCompletions)\n\tg.POST(\"/embeddings\", handler.Embeddings)\n\tg.POST(\"/audio/speech\", handler.Speech)\n\tg.POST(\"/audio/transcriptions\", handler.Transcriptions)\n\tg.POST(\"/images/generations\", handler.ImageGenerations)\n\t// ==== nexa specific ====\n\tg.POST(\"/audio/diarize\", handler.Diarize)\n\tg.POST(\"/reranking\", handler.Reranking)\n\tg.POST(\"/cv\", handler.CV)\n\n\t// ==== model management ====\n\tg.GET(\"/models/*model\", handler.RetrieveModel)\n\tg.GET(\"/models\", handler.ListModels)\n}\n"
  },
  {
    "path": "runner/server/server.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage server\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/gin-gonic/gin\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/render\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/service\"\n)\n\n// @Title\t\tNexa AI Server\n// @Version\t0.0.0\n// @BasePath\t/v1\nfunc Serve() {\n\tservice.Init()\n\tdefer service.DeInit()\n\n\tgin.SetMode(gin.ReleaseMode)\n\tengine := gin.Default()\n\n\tRegisterRoot(engine)\n\tRegisterAPIv1(engine)\n\tRegisterSwagger(engine)\n\n\tcfg := config.Get()\n\tvar err error\n\n\t// Determine whether to serve over HTTPS\n\tif cfg.HTTPS {\n\t\tcertFile := cfg.CertFile\n\t\tkeyFile := cfg.KeyFile\n\n\t\t// Verify that certificate and key files exist\n\t\tif _, err := os.Stat(certFile); os.IsNotExist(err) {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"HTTPS Certificate file not found: %s\", certFile))\n\t\t\treturn\n\t\t}\n\t\tif _, err := os.Stat(keyFile); os.IsNotExist(err) {\n\t\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"HTTPS Key file not found: %s\", keyFile))\n\t\t\treturn\n\t\t}\n\n\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"HTTPS enabled: cert=%s key=%s\", certFile, keyFile))\n\t\t// fmt.Println(render.GetTheme().Info.Sprintf(\"Localhosting on https://%s/docs/ui\", cfg.Host))\n\t\terr = engine.RunTLS(cfg.Host, certFile, keyFile)\n\t} else {\n\t\tfmt.Println(render.GetTheme().Info.Sprintf(\"Localhosting on http://%s/docs/ui\", cfg.Host))\n\t\terr = engine.Run(cfg.Host)\n\t}\n\n\tif err != nil {\n\t\tfmt.Println(render.GetTheme().Error.Sprintf(\"HTTP/HTTPS Server Error: %v\", err))\n\t}\n}\n"
  },
  {
    "path": "runner/server/service/keepalive.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage service\n\nimport (\n\t\"fmt\"\n\t\"log/slog\"\n\t\"reflect\"\n\t\"slices\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/config\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/store\"\n\t\"github.com/NexaAI/nexa-sdk/runner/internal/types\"\n\tnexa_sdk \"github.com/NexaAI/nexa-sdk/runner/nexa-sdk\"\n\t\"github.com/NexaAI/nexa-sdk/runner/server/utils\"\n)\n\n// KeepAliveGet retrieves a model from the keepalive cache or creates it if not found\n// This avoids the overhead of repeatedly loading/unloading models from disk\nfunc KeepAliveGet[T any](name string, param types.ModelParam, reset bool) (*T, error) {\n\tt, err := keepAliveGet[T](name, param, reset)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn t.(*T), nil\n}\n\nvar keepAlive keepAliveService\n\n// current only support keepalive one model\ntype keepAliveService struct {\n\tmodels map[string]*modelKeepInfo // Map of model name to model info\n\tstopCh chan struct{}             // Channel to stop the cleanup goroutine\n\n\tsync.Mutex // Protects concurrent access to models map\n}\n\n// modelKeepInfo holds metadata for a cached model instance\ntype modelKeepInfo struct {\n\tmodel    keepable\n\tparam    types.ModelParam\n\tlastTime time.Time\n}\n\n// keepable interface defines objects that can be managed by the keepalive service\n// Objects must support cleanup and reset operations\ntype keepable interface {\n\tDestroy() error\n}\n\ntype keepResetable interface {\n\tkeepable\n\tReset() error\n}\n\n// start begins the background cleanup process that removes unused models\n// Runs a ticker every 5 seconds to check for models that exceed the keepalive timeout\nfunc (keepAlive *keepAliveService) start() {\n\tkeepAlive.models = make(map[string]*modelKeepInfo)\n\tkeepAlive.stopCh = make(chan struct{})\n\n\tgo func() {\n\t\tt := time.NewTicker(5 * time.Second)\n\t\tfor {\n\t\t\tselect {\n\t\t\t// Stop signal received - cleanup all models and exit\n\t\t\tcase <-keepAlive.stopCh:\n\t\t\t\tkeepAlive.Lock()\n\t\t\t\tfor name, model := range keepAlive.models {\n\t\t\t\t\tmodel.model.Destroy()\n\t\t\t\t\tdelete(keepAlive.models, name)\n\t\t\t\t}\n\t\t\t\tkeepAlive.Unlock()\n\t\t\t\treturn\n\n\t\t\t// Periodic cleanup - remove models that haven't been used recently\n\t\t\tcase <-t.C:\n\t\t\t\tkeepAlive.Lock()\n\t\t\t\tfor name, model := range keepAlive.models {\n\t\t\t\t\tif time.Since(model.lastTime).Milliseconds()/1000 > config.Get().KeepAlive {\n\t\t\t\t\t\tmodel.model.Destroy()\n\t\t\t\t\t\tdelete(keepAlive.models, name)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tkeepAlive.Unlock()\n\t\t\t}\n\t\t}\n\t}()\n}\n\n// keepAliveGet retrieves a cached model or creates a new one if not found\n// Ensures only one model is kept in memory at a time by clearing others\nfunc keepAliveGet[T any](name string, param types.ModelParam, reset bool) (any, error) {\n\tkeepAlive.Lock()\n\tdefer keepAlive.Unlock()\n\n\tname, quant := utils.NormalizeModelName(name)\n\tslog.Debug(\"KeepAliveGet\", \"name\", name, \"quant\", quant, \"param\", param)\n\n\ts := store.Get()\n\n\tmanifest, err := s.GetManifest(name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar modelfile string\n\tif quant != \"\" {\n\t\tif fileinfo, exists := manifest.ModelFile[quant]; !exists {\n\t\t\treturn nil, fmt.Errorf(\"quantization %s not found for model %s\", quant, name)\n\t\t} else if !fileinfo.Downloaded {\n\t\t\treturn nil, fmt.Errorf(\"quantization %s not downloaded for model %s\", quant, name)\n\t\t} else {\n\t\t\tmodelfile = s.ModelfilePath(manifest.Name, fileinfo.Name)\n\t\t}\n\t} else {\n\t\t// fallback to first downloaded model file\n\t\tquants := make([]string, 0, len(manifest.ModelFile))\n\t\tfor quant, v := range manifest.ModelFile {\n\t\t\tif v.Downloaded {\n\t\t\t\tquants = append(quants, quant)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tquant = slices.Min(quants)\n\t\tslog.Debug(\"KeepAliveGet quant fallback\", \"quant\", quant)\n\t\tmodelfile = s.ModelfilePath(manifest.Name, manifest.ModelFile[quant].Name) // at least one is downloaded\n\t}\n\n\t// Check if model already exists in cache\n\tmodel, ok := keepAlive.models[name+\":\"+quant]\n\tif ok && reflect.DeepEqual(model.param, param) {\n\t\tif reset {\n\t\t\tif r, ok := model.model.(keepResetable); ok {\n\t\t\t\tr.Reset()\n\t\t\t}\n\t\t}\n\t\tmodel.lastTime = time.Now()\n\t\treturn model.model, nil\n\t}\n\n\t// Clear existing models to ensure only one is in memory\n\t// This prevents memory overflow but limits to single model usage\n\t// TODO: unload model due to free ram/vram\n\tfor name, model := range keepAlive.models {\n\t\tmodel.model.Destroy()\n\t\tdelete(keepAlive.models, name)\n\t}\n\n\tvar t keepable\n\tvar e error\n\tswitch reflect.TypeFor[T]() {\n\tcase reflect.TypeFor[nexa_sdk.LLM]():\n\t\tt, e = nexa_sdk.NewLLM(nexa_sdk.LlmCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelfile,\n\t\t\tConfig: nexa_sdk.ModelConfig{\n\t\t\t\tNCtx:       param.NCtx,\n\t\t\t\tNGpuLayers: param.NGpuLayers,\n\t\t\t},\n\t\t\tPluginID: manifest.PluginId,\n\t\t\tDeviceID: manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.VLM]():\n\t\tvar mmproj string\n\t\tif manifest.MMProjFile.Name != \"\" {\n\t\t\tmmproj = s.ModelfilePath(manifest.Name, manifest.MMProjFile.Name)\n\t\t}\n\t\tvar tokenizer string\n\t\tif manifest.TokenizerFile.Name != \"\" {\n\t\t\ttokenizer = s.ModelfilePath(manifest.Name, manifest.TokenizerFile.Name)\n\t\t}\n\t\tt, e = nexa_sdk.NewVLM(nexa_sdk.VlmCreateInput{\n\t\t\tModelName:     manifest.ModelName,\n\t\t\tModelPath:     modelfile,\n\t\t\tMmprojPath:    mmproj,\n\t\t\tTokenizerPath: tokenizer,\n\t\t\tConfig: nexa_sdk.ModelConfig{\n\t\t\t\tNCtx:       param.NCtx,\n\t\t\t\tNGpuLayers: param.NGpuLayers,\n\t\t\t},\n\t\t\tPluginID: manifest.PluginId,\n\t\t\tDeviceID: manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.Embedder]():\n\t\tt, e = nexa_sdk.NewEmbedder(nexa_sdk.EmbedderCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelfile,\n\t\t\tPluginID:  manifest.PluginId,\n\t\t\tDeviceID:  manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.Reranker]():\n\t\tt, e = nexa_sdk.NewReranker(nexa_sdk.RerankerCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelfile,\n\t\t\tPluginID:  manifest.PluginId,\n\t\t\tDeviceID:  manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.TTS]():\n\t\tt, e = nexa_sdk.NewTTS(nexa_sdk.TtsCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelfile,\n\t\t\tPluginID:  manifest.PluginId,\n\t\t\tDeviceID:  manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.ASR]():\n\t\tt, e = nexa_sdk.NewASR(nexa_sdk.AsrCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelfile,\n\t\t\tConfig: nexa_sdk.ASRModelConfig{\n\t\t\t\tNCtx:       param.NCtx,\n\t\t\t\tNGpuLayers: param.NGpuLayers,\n\t\t\t},\n\t\t\tPluginID: manifest.PluginId,\n\t\t\tDeviceID: manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.Diarize]():\n\t\tt, e = nexa_sdk.NewDiarize(nexa_sdk.DiarizeCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelfile,\n\t\t\tConfig: nexa_sdk.DiarizeModelConfig{\n\t\t\t\tNCtx:       param.NCtx,\n\t\t\t\tNGpuLayers: param.NGpuLayers,\n\t\t\t},\n\t\t\tPluginID: manifest.PluginId,\n\t\t\tDeviceID: manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.CV]():\n\t\tt, e = nexa_sdk.NewCV(nexa_sdk.CVCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tConfig: nexa_sdk.CVModelConfig{\n\t\t\t\tDetModelPath: modelfile,\n\t\t\t\tRecModelPath: modelfile,\n\t\t\t},\n\t\t\tPluginID: manifest.PluginId,\n\t\t\tDeviceID: manifest.DeviceId,\n\t\t})\n\tcase reflect.TypeFor[nexa_sdk.ImageGen]():\n\t\t// For image generation models, use the model directory path instead of specific file\n\t\tmodelDir := s.ModelfilePath(manifest.Name, \"\")\n\t\tt, e = nexa_sdk.NewImageGen(nexa_sdk.ImageGenCreateInput{\n\t\t\tModelName: manifest.ModelName,\n\t\t\tModelPath: modelDir,\n\t\t\tPluginID:  manifest.PluginId,\n\t\t\tDeviceID:  manifest.DeviceId,\n\t\t})\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"not support type: %+#v\", t))\n\t}\n\tif e != nil {\n\t\treturn nil, e\n\t}\n\tmodel = &modelKeepInfo{\n\t\tmodel:    t,\n\t\tparam:    param,\n\t\tlastTime: time.Now(),\n\t}\n\tkeepAlive.models[name+\":\"+quant] = model\n\n\treturn model.model, nil\n}\n\n// stop signals the cleanup goroutine to terminate\nfunc (keepAlive *keepAliveService) stop() {\n\tkeepAlive.stopCh <- struct{}{}\n}\n"
  },
  {
    "path": "runner/server/service/service.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage service\n\nfunc Init() {\n\tkeepAlive.start()\n}\n\nfunc DeInit() {\n\tkeepAlive.stop()\n}\n"
  },
  {
    "path": "runner/server/utils/common.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage utils\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"image\"\n\t\"image/png\"\n\t\"io\"\n\t\"mime\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n\t\"strings\"\n\n\t_ \"golang.org/x/image/webp\"\n)\n\nfunc SaveURIToTempFile(uri string) (string, error) {\n\tu, err := url.Parse(uri)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tvar data []byte\n\t// windows drive letter\n\tif len(u.Scheme) == 1 && (u.Scheme[0] >= 'a' && u.Scheme[0] <= 'z' || u.Scheme[0] >= 'A' && u.Scheme[0] <= 'Z') {\n\t\tu.Scheme = \"file\"\n\t\tu.Path = uri\n\t}\n\tswitch u.Scheme {\n\tcase \"http\", \"https\":\n\t\tresp, err := http.Get(uri)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\tdefer resp.Body.Close()\n\t\tif resp.StatusCode != http.StatusOK {\n\t\t\treturn \"\", errors.New(\"http download failed: \" + resp.Status)\n\t\t}\n\t\tdata, err = io.ReadAll(resp.Body)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\tcase \"data\":\n\t\tparts := strings.SplitN(u.Opaque, \",\", 2)\n\t\tif len(parts) != 2 {\n\t\t\treturn \"\", errors.New(\"invalid data URI format\")\n\t\t}\n\t\t// format: data:[<mediatype>][;base64],<data>\n\t\tif strings.Contains(parts[0], \";base64\") {\n\t\t\tdata, err = base64.StdEncoding.DecodeString(parts[1])\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\n\t\t} else {\n\t\t\t// format: data:[<mediatype>],<data>\n\t\t\tdecoded, err := url.QueryUnescape(parts[1])\n\t\t\tif err != nil {\n\t\t\t\treturn \"\", err\n\t\t\t}\n\t\t\tdata = []byte(decoded)\n\t\t}\n\tcase \"file\", \"\":\n\t\tdata, err = os.ReadFile(u.Path)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\tdefault:\n\n\t\treturn \"\", errors.New(\"unsupported scheme: \" + u.Scheme)\n\t}\n\n\t// Detect content type\n\tcontentType := http.DetectContentType(data)\n\n\t// Convert WebP to PNG for compatibility with native SDK\n\tif strings.HasPrefix(contentType, \"image/webp\") || strings.HasSuffix(strings.ToLower(u.Path), \".webp\") {\n\t\timg, _, err := image.Decode(bytes.NewReader(data))\n\t\tif err != nil {\n\t\t\treturn \"\", errors.New(\"failed to decode WebP image: \" + err.Error())\n\t\t}\n\n\t\tvar buf bytes.Buffer\n\t\tif err := png.Encode(&buf, img); err != nil {\n\t\t\treturn \"\", errors.New(\"failed to encode image as PNG: \" + err.Error())\n\t\t}\n\n\t\tdata = buf.Bytes()\n\t\tcontentType = \"image/png\"\n\t}\n\n\tfileExt := \"\"\n\tif exts, err := mime.ExtensionsByType(contentType); err == nil && len(exts) > 0 {\n\t\tfileExt = exts[0]\n\t}\n\n\ttmpFile, err := os.CreateTemp(\"\", \"uri-*\"+fileExt)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer tmpFile.Close()\n\n\t_, err = tmpFile.Write(data)\n\tif err != nil {\n\t\tos.Remove(tmpFile.Name())\n\t\treturn \"\", err\n\t}\n\treturn tmpFile.Name(), nil\n}\n\nfunc NormalizeModelName(name string) (string, string) {\n\tif strings.Contains(name, \":\") {\n\t\tparts := strings.SplitN(name, \":\", 2)\n\t\treturn parts[0], parts[1]\n\t}\n\treturn name, \"\"\n}\n"
  },
  {
    "path": "runner/server/utils/common_test.go",
    "content": "// Copyright 2024-2026 Nexa AI, Inc.\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\npackage utils\n\nimport (\n\t\"bytes\"\n\t\"encoding/base64\"\n\t\"image\"\n\t\"image/color\"\n\t\"image/png\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n)\n\n// TestSaveURIToTempFile_WebP tests WebP to PNG conversion\nfunc TestSaveURIToTempFile_WebP(t *testing.T) {\n\t// Create a simple test WebP image (1x1 red pixel)\n\t// Note: This is a minimal valid WebP file in base64\n\twebpData := \"UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAQAcJaQAA3AA/v3AgAA=\"\n\n\twebpBytes, err := base64.StdEncoding.DecodeString(webpData)\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to decode test WebP data: %v\", err)\n\t}\n\n\t// Create temp WebP file\n\ttmpWebP, err := os.CreateTemp(\"\", \"test-*.webp\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp WebP file: %v\", err)\n\t}\n\tdefer os.Remove(tmpWebP.Name())\n\n\tif _, err := tmpWebP.Write(webpBytes); err != nil {\n\t\tt.Fatalf(\"Failed to write WebP data: %v\", err)\n\t}\n\ttmpWebP.Close()\n\n\t// Test conversion via file path\n\tresultPath, err := SaveURIToTempFile(\"file://\" + tmpWebP.Name())\n\tif err != nil {\n\t\tt.Fatalf(\"SaveURIToTempFile failed: %v\", err)\n\t}\n\tdefer os.Remove(resultPath)\n\n\t// Verify output is PNG\n\tif !strings.HasSuffix(resultPath, \".png\") {\n\t\tt.Errorf(\"Expected PNG extension, got: %s\", resultPath)\n\t}\n\n\t// Verify the file can be decoded as PNG\n\tresultFile, err := os.Open(resultPath)\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to open result file: %v\", err)\n\t}\n\tdefer resultFile.Close()\n\n\t_, err = png.Decode(resultFile)\n\tif err != nil {\n\t\tt.Errorf(\"Failed to decode result as PNG: %v\", err)\n\t}\n}\n\n// TestSaveURIToTempFile_WebP_DataURI tests WebP conversion from data URI\nfunc TestSaveURIToTempFile_WebP_DataURI(t *testing.T) {\n\t// Minimal valid WebP as data URI\n\twebpData := \"UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAQAcJaQAA3AA/v3AgAA=\"\n\tdataURI := \"data:image/webp;base64,\" + webpData\n\n\tresultPath, err := SaveURIToTempFile(dataURI)\n\tif err != nil {\n\t\tt.Fatalf(\"SaveURIToTempFile failed for data URI: %v\", err)\n\t}\n\tdefer os.Remove(resultPath)\n\n\t// Verify it's converted to PNG\n\tif !strings.HasSuffix(resultPath, \".png\") {\n\t\tt.Errorf(\"Expected PNG extension for converted WebP, got: %s\", resultPath)\n\t}\n}\n\n// TestSaveURIToTempFile_PNG tests that PNG files are not converted\nfunc TestSaveURIToTempFile_PNG(t *testing.T) {\n\t// Create a simple PNG image\n\timg := image.NewRGBA(image.Rect(0, 0, 1, 1))\n\timg.Set(0, 0, color.RGBA{255, 0, 0, 255})\n\n\tvar buf bytes.Buffer\n\tif err := png.Encode(&buf, img); err != nil {\n\t\tt.Fatalf(\"Failed to encode test PNG: %v\", err)\n\t}\n\n\t// Create temp PNG file\n\ttmpPNG, err := os.CreateTemp(\"\", \"test-*.png\")\n\tif err != nil {\n\t\tt.Fatalf(\"Failed to create temp PNG file: %v\", err)\n\t}\n\tdefer os.Remove(tmpPNG.Name())\n\n\tif _, err := tmpPNG.Write(buf.Bytes()); err != nil {\n\t\tt.Fatalf(\"Failed to write PNG data: %v\", err)\n\t}\n\ttmpPNG.Close()\n\n\t// Test that PNG is saved without conversion\n\tresultPath, err := SaveURIToTempFile(\"file://\" + tmpPNG.Name())\n\tif err != nil {\n\t\tt.Fatalf(\"SaveURIToTempFile failed for PNG: %v\", err)\n\t}\n\tdefer os.Remove(resultPath)\n\n\t// Verify output is still PNG\n\tif !strings.HasSuffix(resultPath, \".png\") {\n\t\tt.Errorf(\"Expected PNG extension, got: %s\", resultPath)\n\t}\n}\n"
  },
  {
    "path": "runner/tests/.gitattributes",
    "content": "assets/* filter=lfs diff=lfs merge=lfs -text\n"
  },
  {
    "path": "runner/tests/cases/__init__.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom .asr import ASR\nfrom .audio_multi_round import AudioMultiRound\nfrom .base import BaseCase\nfrom .cv import OCR, ImageRecognition\nfrom .image_multi_round import ImageMultiRound\nfrom .multi_round import MultiRound\nfrom .reranker import QueryDocument\nfrom .single_round import SingleRound\n\n__all__ = [\n    'BaseCase', 'SingleRound', 'MultiRound', 'ImageMultiRound', 'AudioMultiRound', 'OCR', 'ImageRecognition', 'ASR',\n    'QueryDocument'\n]\n"
  },
  {
    "path": "runner/tests/cases/asr.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass ASR(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return ['-i', './assets/storytelling.wav']\n"
  },
  {
    "path": "runner/tests/cases/audio_multi_round.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass AudioMultiRound(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return [\n            '-p',\n            'transcribe the audio ./assets/osr_us.wav',\n            '-p',\n            'transcribe the audio ./assets/osr_us.wav',\n        ]\n"
  },
  {
    "path": "runner/tests/cases/base.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import Any\n\n\nclass BaseCase:\n\n    def name(self) -> str:\n        return self.__class__.__name__\n\n    def param(self) -> list[str]:\n        raise NotImplementedError\n\n    def check(self, res: Any) -> bool:  # pyright: ignore[reportUnusedParameter]\n        '''\n        Optional check function to verify the result.\n        '''\n        return True\n"
  },
  {
    "path": "runner/tests/cases/cv.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass ImageRecognition(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return ['-i', './assets/cat.png']\n\n\n@final\nclass OCR(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return ['-i', './assets/text.jpeg']\n"
  },
  {
    "path": "runner/tests/cases/image_multi_round.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass ImageMultiRound(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return [\n            '-p',\n            'describe the image ./assets/text.jpeg',\n            '-p',\n            'compare the two images ./assets/text.jpeg and ./assets/cat.png',\n        ]\n"
  },
  {
    "path": "runner/tests/cases/multi_round.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import Any, final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass MultiRound(BaseCase):\n\n    def __init__(self) -> None:\n        self.round = 0\n\n    @override\n    def param(self) -> list[str]:\n        return ['-p', 'i am RemiliaForever', '-p', 'who am i', '-p', 'tell me a story']\n\n    @override\n    def check(self, res: Any) -> bool:\n        self.round += 1\n        return [\n            lambda: True,  # round 1\n            lambda: self.check_contain(res['Output']),  # round 2 \n            lambda: True,  # round 3\n        ][self.round - 1]()\n\n    def check_contain(self, output: str) -> bool:\n        return 'remilia' in output.lower()\n"
  },
  {
    "path": "runner/tests/cases/reranker.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass QueryDocument(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return [\n            '-q',\n            'What is the capital of France?',\n            '-d',\n            'Paris is the capital of France. It is known for its art, culture, and history.',\n            '-d',\n            'London is the capital of the United Kingdom. It is famous for its landmarks and museums.',\n            '-d',\n            'Berlin is the capital of Germany. It has a rich history and vibrant culture.',\n        ]\n"
  },
  {
    "path": "runner/tests/cases/single_round.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nfrom typing import final, override\n\nfrom .base import BaseCase\n\n\n@final\nclass SingleRound(BaseCase):\n\n    @override\n    def param(self) -> list[str]:\n        return [\n            '-p',\n            'hi, how are you today?',\n        ]\n"
  },
  {
    "path": "runner/tests/run.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n#!/usr/bin/env python3\n\nimport json\nimport os\nimport pathlib\nimport subprocess\nimport sys\nimport traceback\n\nimport psutil\nfrom cases import BaseCase\nfrom scripts import config, log, utils\n\n# plugin, model, testcases\ntestcases: list[config.case]\n\n\ndef init_benchmark():\n    global testcases\n    log.print('========= Init Benchmark =========')\n\n    plugins = config.get_plugins()\n    log.print(f'Plugins: {plugins}')\n    if len(plugins) == 0:\n        raise Exception('No supported plugins found')\n\n    testcases = config.get_testcases(plugins)\n    # count total Testcases\n    log.print(f'Found {len(testcases)} Models with {sum(len(tc[2]) for tc in testcases)} TestCases')\n    if len(testcases) == 0:\n        raise Exception('No TestCases found')\n\n\ndef check_models():\n    global testcases\n    log.print('========== Check Models ==========')\n\n    res = utils.execute_nexa(['list'])\n    if res.returncode != 0:\n        for line in res.stdout.splitlines():\n            log.print(line)\n        for line in res.stderr.splitlines():\n            log.print(line)\n        raise RuntimeError(f'Non-zero exit code: {res.returncode}')\n\n    exist_models: set[str] = set()\n    for line in res.stdout.splitlines():\n        log.print(line)\n        fields = line.split('│')\n        if len(fields) < 5:\n            continue\n        name = fields[1].strip()\n        quant = fields[3].strip()\n        if quant == '':\n            exist_models.add(name)\n        else:\n            for quant in quant.split(','):\n                exist_models.add(f'{name}:{quant.strip()}')\n\n    for i, (_, model, type, _) in enumerate(testcases):\n        mp = f'{i + 1:0{len(str(len(testcases)))}}/{len(testcases)}'\n\n        if model in exist_models:\n            log.print(f'  --> [{mp}] {model} already exists, skip download')\n            continue\n        log.print(f'  --> [{mp}] {model} not found, downloading...')\n        res = utils.execute_nexa(\n            [\n                'pull',\n                model,\n                '--model-type',\n                type,\n            ],\n            timeout=3600,\n            stdout=sys.stdout,\n            stderr=sys.stderr,\n        )\n        if res.returncode != 0:\n            raise RuntimeError(f'Failed to download model {model}, exit code: {res.returncode}')\n\n\ndef _parse_stderr(stderr: str) -> tuple[list[str], list[str]]:\n    out: list[str] = []\n    err: list[str] = []\n    for line in stderr.splitlines():\n        try:\n            json.loads(line)\n        except Exception:\n            out.append(line)\n        else:\n            err.append(line)\n    return out, err\n\n\ndef _do_case(type: str, model: str, tc: BaseCase, tc_log: pathlib.Path) -> None | str:\n    of = None\n    try:\n        of = open(f'{tc_log}.{type}.log', 'w', encoding='utf-8')\n        of.write('===== Output Log =====\\n')\n        of.flush()\n        p = utils.start_nexa([type, model] + tc.param(), debug_log=True, stdout=of)\n        _, stderr = p.communicate(timeout=600)\n\n        stdout, stderr = _parse_stderr(stderr)\n        of.write('\\n====== Debug Log ======\\n')\n        for line in stdout:\n            of.write(f'{line}\\n')\n\n        if p.returncode != 0:\n            raise RuntimeError(f'Non-zero exit code: {p.returncode}')\n\n        of.write('\\n====== Json Log =======\\n')\n        failed = False\n        for line in stderr:\n            of.write(f'{line}\\n')\n            if tc.check(json.loads(line)):\n                of.write('  --> Passed\\n')\n                continue\n            else:\n                of.write('  --> Failed\\n')\n                failed = True\n\n        if failed:\n            return 'Check Failed'\n        else:\n            return None\n\n    except Exception as _:\n        if of is not None:\n            of.write('\\n====== Exception Log =======\\n')\n            of.write(traceback.format_exc())\n        return 'Execution Failed'\n\n    finally:\n        if of is not None:\n            of.close()\n\n\ndef _start_server(tc_log: pathlib.Path):\n    of = None\n    try:\n        of = open(f'{tc_log}.serve.log', 'w', encoding='utf-8')\n        of.write('===== Output Log =====\\n')\n        of.flush()\n        return utils.start_nexa(['serve'], debug_log=True, stdout=of, stderr=of)\n\n    except Exception as _:\n        if of is not None:\n            of.write('\\n====== Exception Log =======\\n')\n            of.write(traceback.format_exc())\n            of.close()\n        return 'Serve Failed'\n\n\ndef _stop_server():\n    for proc in psutil.process_iter():  # pyright: ignore[reportUnknownMemberType]\n        if 'nexa-cli' in proc.name() and 'serve' in proc.cmdline():\n            try:\n                proc.terminate()\n                proc.wait(timeout=10)\n            except Exception:\n                proc.kill()\n                proc.wait()\n\n\ndef run_benchmark():\n    log.print('========== Run Benchmark =========')\n\n    # plugin, model, tc, reason, log_file\n    failed_cases: list[tuple[str, str, str, str, str]] = []\n\n    for i, (plugin, model, _, tcs) in enumerate(testcases):\n        os.makedirs(log.log_dir / plugin, exist_ok=True)\n        mp = f'{i + 1:0{len(str(len(testcases)))}}/{len(testcases)}'\n        log.print(f'==> [{mp}] Plugin: {plugin}, Model: {model}')\n\n        for j, tcc in enumerate(tcs):\n            tc = tcc()\n            tcp = f'{j + 1:0{len(str(len(tcs)))}}/{len(tcs)}'\n            tc_log = (\n                log.log_dir\n                / plugin\n                / f'{mp.split(\"/\")[0]}-{tcp.split(\"/\")[0]}-{model.replace(\"/\", \"-\").replace(\":\", \"-\")}-{tc.name()}'\n            )\n\n            res = _do_case('infer', model, tc, tc_log)\n            if res is None:\n                log.print(f'  --> [{mp}][{tcp}] {tc.name()} Infer: Success')\n            else:\n                log.print(f'  --> [{mp}][{tcp}] {tc.name()} Infer: {res}')\n                failed_cases.append((plugin, model, tc.name(), res, str(tc_log) + '.infer.log'))\n\n            # use finally to ensure server is stopped\n            tc = tcc()\n            try:\n                serve = _start_server(tc_log)\n                if not isinstance(serve, subprocess.Popen):\n                    log.print(f'  --> [{mp}][{tcp}] {tc.name()} Run: {serve}')\n                    failed_cases.append((plugin, model, tc.name(), serve, str(tc_log) + '.serve.log'))\n                    continue\n\n                res = _do_case('run', model, tc, tc_log)\n                if res is None:\n                    log.print(f'  --> [{mp}][{tcp}] {tc.name()} Run: Success')\n                else:\n                    log.print(f'  --> [{mp}][{tcp}] {tc.name()} Run: {res}')\n                    failed_cases.append((plugin, model, tc.name(), res, str(tc_log) + '.run.log'))\n            finally:\n                _stop_server()\n\n    log.print('======== Benchmark Result ========')\n    if len(failed_cases) == 0:\n        log.print('All TestCases passed')\n    else:\n        for plugin, model, tc, reason, log_file in failed_cases:\n            log.print(f'==> {reason}: [{plugin}] [{model}] [{tc}] {log_file}')\n    log.print(f'Logs saved to {log.log_dir}')\n\n\ndef main():\n    log.init()\n    init_benchmark()\n    check_models()\n    run_benchmark()\n\n\nif __name__ == '__main__':\n    main()\n"
  },
  {
    "path": "runner/tests/scripts/__init__.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n\n"
  },
  {
    "path": "runner/tests/scripts/config.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nimport platform\nfrom typing import TypeAlias\n\nfrom cases import *\n\nPLUGIN_MAP = {\n    'Linux': {\n        'x86_64': ['cpu_gpu', 'nexaml'],\n        'arm64': ['cpu_gpu'],\n    },\n    'Windows': {\n        'x86_64': ['cpu_gpu'],\n        'arm64': ['cpu_gpu', 'npu', 'nexaml'],\n    },\n    'Darwin': {\n        'x86_64': ['cpu_gpu'],\n        'arm64': ['cpu_gpu', 'metal'],\n    },\n}\n\n# (plugin, model_id, cases)\nTESTCASE_MAP: dict[str, dict[str, dict[str, list[type[BaseCase]]]]] = {\n    'cpu_gpu': {\n        'llm': {\n            'Qwen/Qwen3-1.7B-GGUF:Q8_0': [MultiRound],\n            # 'ggml-org/gemma-3-4b-it-GGUF:F16': [MultiRound, ImageMultiRound],\n            'ggml-org/Qwen2.5-Omni-3B-GGUF:Q4_K_M': [MultiRound, AudioMultiRound],\n        },\n        'vlm': {},\n        'embedder': {\n            'djuna/jina-embeddings-v2-small-en-Q5_K_M-GGUF:Q5_K_M': [SingleRound],\n        },\n        'reranker': {},\n        'tts': {},\n        'asr': {},\n        'diarize': {},\n        'cv': {},\n        'image_gen': {},\n    },\n    'npu': {\n        'llm': {\n            'NexaAI/Granite-4-Micro-NPU': [MultiRound],\n            'NexaAI/phi4-mini-npu-turbo': [MultiRound],\n            'NexaAI/Qwen3-4B-Instruct-2507-npu': [MultiRound],\n            'NexaAI/Qwen3-4B-Thinking-2507-npu': [MultiRound],\n            'NexaAI/Llama3.2-3B-NPU-Turbo': [MultiRound],\n            'NexaAI/jan-v1-4B-npu': [MultiRound],\n            'NexaAI/qwen3-4B-npu': [MultiRound],\n            'NexaAI/phi3.5-mini-npu': [MultiRound],\n        },\n        'vlm': {\n            'NexaAI/Qwen3-VL-4B-Instruct-NPU': [MultiRound, ImageMultiRound],\n            'NexaAI/OmniNeural-4B': [MultiRound, ImageMultiRound, AudioMultiRound],\n            'NexaAI/LFM2-1.2B-npu': [MultiRound],\n        },\n        'embedder': {\n            'NexaAI/embeddinggemma-300m-npu': [SingleRound],\n        },\n        'asr': {\n            'NexaAI/parakeet-tdt-0.6b-v3-npu': [ASR],\n        },\n        'cv': {\n            'NexaAI/convnext-tiny-npu': [ImageRecognition],\n            'NexaAI/paddleocr-npu': [OCR],\n            'NexaAI/yolov12-npu': [ImageRecognition],\n        },\n        'reranker': {\n            'NexaAI/jina-v2-rerank-npu': [QueryDocument],\n        },\n    },\n    'nexaml': {\n        'vlm': {\n            'NexaAI/Qwen3-VL-4B-Instruct-GGUF:Q4_0': [MultiRound, ImageMultiRound],\n            'NexaAI/Qwen3-VL-4B-Thinking-GGUF:Q4_0': [MultiRound, ImageMultiRound],\n        }\n    },\n}\n\n\ndef get_plugins() -> list[str]:\n    system = platform.system()\n    machine = platform.machine()\n    return PLUGIN_MAP.get(system, {}).get(machine.lower(), [])\n\n\ncase: TypeAlias = tuple[str, str, str, list[type[BaseCase]]]\n\n\ndef get_testcases(plugins: list[str]) -> list[case]:\n    res: list[case] = []\n    for plugin in TESTCASE_MAP:\n        if plugin not in plugins:\n            continue\n        for modal, model_cases in TESTCASE_MAP[plugin].items():\n            for model, cases in model_cases.items():\n                res.append((plugin, model, modal, cases))\n\n    return res\n"
  },
  {
    "path": "runner/tests/scripts/log.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nimport builtins\nimport os\nimport platform\nimport sys\nfrom datetime import datetime\nfrom io import TextIOWrapper\nfrom pathlib import Path\n\nfrom . import utils\n\nlog_dir = Path('bench-' + datetime.now().strftime('%Y%m%d-%H%M%S'))\nlog_file: TextIOWrapper\n\n\ndef init():\n    global log_file\n\n    os.makedirs(log_dir, exist_ok=True)\n\n    log_file = open(os.path.join(log_dir, 'environment'), 'w', encoding='utf-8')\n    print('========== Environment ===========')\n    print(f'OS: {platform.system()}')\n    print(f'Arch: {platform.machine()}')\n    print(f'Python version: {sys.version}')\n    res = utils.execute_nexa(['version'])\n    if res.returncode != 0:\n        raise RuntimeError('Failed to get nexa version')\n    for line in res.stdout.strip().splitlines():\n        print(line)\n    log_file.close()\n\n    log_file = open(log_dir / 'bench.log', 'w', encoding='utf-8')\n\n\ndef print(msg: str):\n    global log_file\n\n    ts = datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')\n    data = f'[{ts}] {msg}'\n    builtins.print(data)\n    log_file.write(data)\n    log_file.write('\\n')\n    log_file.flush()\n"
  },
  {
    "path": "runner/tests/scripts/utils.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\nimport os\nimport platform\nimport shutil\nimport subprocess\nfrom pathlib import Path\nfrom typing import Any\n\nnexa_path = None\n\n\ndef _search_nexa() -> str:\n    search_dirs = [\n        '../build',\n        './build',\n        './runner/build',\n    ]\n    for d in search_dirs:\n        exe = 'nexa' if platform.system() != 'Windows' else 'nexa.exe'\n        path = Path(d) / exe\n        if path.exists() and os.access(path, os.X_OK):\n            return str(path.resolve())\n\n    global_nexa = shutil.which('nexa')\n    if global_nexa is not None:\n        return global_nexa\n\n    raise FileNotFoundError('nexa command not found')\n\n\ndef start_nexa(\n    args: list[str],\n    debug_log: bool = False,\n    stdout: Any = subprocess.PIPE,\n    stderr: Any = subprocess.PIPE,\n    **kwargs: Any,\n) -> subprocess.Popen[str]:\n    global nexa_path\n\n    if nexa_path is None:\n        nexa_path = _search_nexa()\n\n    env = os.environ.copy()\n    env['NEXA_LOG'] = 'trace' if debug_log else ''\n    env['NO_COLOR'] = '1'\n\n    return subprocess.Popen(\n        [nexa_path, '--test-mode', '--skip-update'] + args,\n        text=True,\n        encoding='utf-8',\n        cwd=Path(__file__).parent.parent,\n        env=env,\n        stdout=stdout,\n        stderr=stderr,\n        **kwargs,\n    )\n\n\ndef execute_nexa(\n    args: list[str],\n    debug_log: bool = False,\n    timeout: int | None = None,\n    **kwargs: Any,\n) -> subprocess.CompletedProcess[str]:\n    proc = start_nexa(args, debug_log=debug_log, **kwargs)\n    stdout, stderr = proc.communicate(timeout=timeout)\n    return subprocess.CompletedProcess(proc.args, proc.returncode, stdout, stderr)\n"
  },
  {
    "path": "solutions/README.md",
    "content": "# NexaSDK Enterprise Solutions\n\n## EmbedNeural – NPU-Native Multimodal Search for Mobile, IoT and PC\n\n<p align=\"center\">\n  <img src=\"./embedneural/images/embedneural.png\" alt=\"EmbedNeural overview\" width=\"100%\">\n</p>\n\n- 📖 **[Blog Post](https://nexa.ai/blogs/EmbedNeural)**\n- 🎬 **[Demo on Qualcomm](https://youtu.be/iy2X6bJHl1E)**\n- 🎬 **[Demo on Apple](https://youtu.be/W077X06ypPQ)**\n\n> **EmbedNeural** is an NPU-native multimodal embedding model designed for on-device image and text search, optimized for **Apple and Qualcomm NPUs**. It enables efficient, privacy-preserving semantic search directly on mobile, IoT, and PC devices—no cloud required.\n\nFor more details, please refer to [EmbedNeural README](./embedneural/README.md).\n"
  },
  {
    "path": "solutions/embedneural/README.md",
    "content": "# EmbedNeural – NPU-Native Multimodal Search for Mobile, IoT and PC\r\n\r\n<p align=\"center\">\r\n  <img src=\"./images/embedneural.png\" alt=\"EmbedNeural overview\" width=\"100%\">\r\n</p>\r\n\r\n- 📖 **[Blog Post](https://nexa.ai/blogs/EmbedNeural)**\r\n- 🎬 **[Demo on Qualcomm](https://youtu.be/iy2X6bJHl1E)**\r\n- 🎬 **[Demo on Apple](https://youtu.be/W077X06ypPQ)**\r\n\r\n> **EmbedNeural** is an NPU-native multimodal embedding model designed for on-device image and text search, optimized for **Apple and Qualcomm NPUs**. It enables efficient, privacy-preserving semantic search directly on mobile, IoT, and PC devices—no cloud required.\r\n\r\n### ✨ Key Features\r\n\r\n- **NPU-native architecture** – Purpose-built for Apple Neural Engine and Qualcomm Hexagon NPU, maximizing hardware efficiency.\r\n- **Multimodal search** – Supports searching across text, images, and audio with unified embeddings.\r\n- **Privacy-preserving** – All processing happens locally on-device, ensuring data never leaves the user's hardware.\r\n- **Cross-platform support** – Runs on mobile (iOS/Android), IoT devices, and PC with Apple Silicon or Qualcomm chips.\r\n- **Low latency** – Optimized quantization and NPU-friendly operators deliver real-time search performance.\r\n\r\n---\r\n\r\n## 📚 Table of Contents\r\n\r\n- [Use Cases](#-use-cases)\r\n- [Quickstart](#-quickstart)\r\n\r\n---\r\n\r\n## 🎯 Use Case Examples\r\n\r\n### Phone: Meme Library Search\r\n\r\nYour embarrassing screenshots, personal photos, and saved designs never touch the cloud. Visual search runs 100% locally.\r\n\r\n<p align=\"center\">\r\n  <img src=\"./images/embedneural_mobile.png\" alt=\"EmbedNeural on Mobile\" width=\"600\">\r\n</p>\r\n\r\n### Laptop: Visual Reference Library\r\n\r\nEmbedNeural turns your chaotic image library into an instantly searchable visual database—without compromising speed, privacy, or battery life.\r\n\r\n<p align=\"center\">\r\n  <img src=\"./images/embedneural_pc.png\" alt=\"EmbedNeural on PC\" width=\"600\">\r\n</p>\r\n\r\n---\r\n\r\n## 🚀 Quickstart\r\n\r\n> ⚠️ **Hardware Requirement:** EmbedNeural is optimized for **Apple Neural Engine** and **Qualcomm Hexagon NPU**.\r\n\r\n### Step 1: Pull the Model\r\n\r\n```bash\r\nnexa pull NexaAI/EmbedNeural\r\n```\r\n\r\n### Step 2: Start Nexa Serve\r\n\r\n```bash\r\nnexa serve\r\n```\r\n\r\n### Step 3: Install Dependencies\r\n\r\n```bash\r\npip install gradio\r\npip install -r requirements.txt\r\n```\r\n\r\n### Step 4: Launch the Demo\r\n\r\n```bash\r\npython gradio_ui.py\r\n```\r\n"
  },
  {
    "path": "solutions/embedneural/gradio_ui.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\n# !/usr/bin/env python3\r\n\r\nimport html\r\nimport os\r\nimport gradio as gr\r\nfrom typing import List\r\n\r\n# Import ViewModel and related classes/constants\r\nfrom viewmodel import (\r\n    ViewModel, SearchResult, metrics\r\n)\r\n\r\nfrom style import css\r\n\r\n\r\nvm = ViewModel()\r\n\r\n##############################\r\n# events handlers\r\n##############################\r\n\r\ndef on_files_chage(files):\r\n    \"\"\"Handle file upload event.\"\"\"\r\n    if files is None or len(files) == 0:\r\n        vm.files = []\r\n        return gr.update(interactive=False)\r\n    else:\r\n        vm.files = [file.name for file in files]\r\n        return gr.update(interactive=True)\r\n\r\ndef on_index_click():\r\n    \"\"\"Handle index button click event.\"\"\"\r\n    try:\r\n        vm.index_files()\r\n        return (\r\n            gr.update(value=\"Index\", interactive=True),\r\n            gr.update(visible=False, value=100)\r\n        )\r\n    except Exception as e:\r\n        print(f\"Error during indexing: {e}\")\r\n        return (\r\n            gr.update(value=\"Index\", interactive=True),\r\n            gr.update(visible=False, value=0)\r\n        )\r\n\r\ndef on_search_click(query: str):\r\n    \"\"\"Handle search button click event.\"\"\"\r\n    try:\r\n        (_, images, search_time) = vm.search(query)\r\n        return (\r\n                gr.update(visible=False),\r\n                gr.update(visible=False),\r\n                gr.update(visible=True),\r\n                render_items(images),\r\n                gr.update(label=f\"Images({len(images)})\"),\r\n                gr.update(visible=True, value=f\"{search_time:.3f}s\"),\r\n            )\r\n    except Exception as e:\r\n        return (\r\n                gr.update(visible=True, value=f\"<div align='center'><h3>{e}</h3></div>\"),\r\n                gr.update(visible=False),\r\n                gr.update(visible=False),\r\n                render_items([]),\r\n                gr.update(label=f\"Images(0)\"),\r\n                gr.update(visible=False, value=\"\"),\r\n            )\r\n\r\ndef get_image_base64(url: str):\r\n    with open(url, 'rb') as f:\r\n        import base64\r\n        data = base64.b64encode(f.read()).decode()\r\n        return f\"data:image/png;base64,{data}\"\r\n\r\n# Build Gradio UI\r\ndef render_items(items: List[SearchResult]):\r\n    # Renders search results as HTML cards for images\r\n    if(items is None or len(items) == 0): \r\n        return f\"<div class='gallery-container'>No images found</div>\"\r\n    html_items = \"\"\r\n    for item in items:\r\n        # Get base64 encoded image data\r\n        base64_data = get_image_base64(item.url)\r\n        # Render image card without score overlay\r\n        html_items += f\"\"\"\r\n        <div class=\"card\" style=\"background-image: url('{base64_data}');\">\r\n        </div>\r\n        \"\"\"\r\n    return f\"<div class='gallery-container'>{html_items}</div>\"\r\n\r\n\r\n# main interface\r\nwith gr.Blocks(title=\"Image Search\", fill_height=True, css=css) as demo:\r\n    with gr.Row():\r\n        with gr.Column():\r\n            uploader = gr.Files(\r\n                label=\"Upload images (png, jpg, jpeg)\",\r\n                file_types=['.png', '.jpg', '.jpeg'],\r\n                file_count=\"multiple\",\r\n                height=500,\r\n            )\r\n            index_btn = gr.Button(\"Index\", elem_classes=\"custom-btn2\", min_width=400, interactive=False)\r\n            index_progress = gr.Slider(minimum=0, maximum=100, interactive=False, label=\"Indexing progress\", value=0, visible=False)\r\n            \r\n        with gr.Column(scale=8, elem_id='search-column'):\r\n            placeholder = gr.Markdown(\"<div align='center'><h3>Please import files and click Index before starting your search.</h3></div>\", visible=True, height=500)\r\n            searching_box = gr.Markdown(\"### 🔍 Searching...\", visible=False, height=500)\r\n            \r\n            # Results display (images only)\r\n            with gr.Tabs(visible=False) as result_tabs:\r\n                with gr.Tab(f\"Images\") as img_tab:\r\n                    images_tab = gr.HTML(min_height=500, max_height=500)\r\n\r\n            with gr.Row(elem_id='input-row'):\r\n                chat_input = gr.Textbox(show_label=False, container=False, placeholder=\"Search item...\", lines=1, elem_id=\"chat_input\")\r\n                send_btn = gr.Button(value=\"\", icon=\"images/button-bg.png\", elem_classes=\"custom-btn\", min_width=30, scale=0)\r\n        \r\n        with gr.Column(min_width=200):\r\n            with gr.Group():\r\n                top_k = gr.Number(label=\"Top-K\", value=2, step=1, minimum=1, interactive=True)\r\n                matric = gr.Dropdown(metrics, label=\"Metric\", value=metrics[0], container=True, interactive=True)\r\n            \r\n            search_time = gr.Textbox(label=\"Search Time (s)\", value=\"\", interactive=False, lines=1, visible=False)\r\n      \r\n    \r\n    top_k.change(\r\n        fn=lambda value: vm.update_top_k(int(value)),\r\n        inputs=[top_k],\r\n        outputs=[]\r\n    )\r\n\r\n    matric.change(\r\n        fn=lambda value: vm.update_metric(value),\r\n        inputs=[matric],\r\n        outputs=[]\r\n    )\r\n    \r\n    # File upload handler\r\n    uploader.change(fn=on_files_chage, inputs=[uploader], outputs=[index_btn])\r\n    \r\n    # Index button click handler\r\n    index_btn.click(\r\n        fn=lambda: (gr.update(value=\"Indexing...\", interactive=False), gr.update(visible=True, value=0)),\r\n        outputs=[index_btn, index_progress]\r\n    ).then(\r\n        fn=on_index_click,\r\n        inputs=[],\r\n        outputs=[index_btn, index_progress]\r\n    )\r\n    \r\n    # Chat input submit handler\r\n    chat_input.submit(\r\n        fn=lambda: (gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)),\r\n        outputs=[placeholder, searching_box, result_tabs, search_time],\r\n    ).then(\r\n        fn=on_search_click,\r\n        inputs=[chat_input],\r\n        outputs=[placeholder, searching_box, result_tabs, images_tab, img_tab, search_time]\r\n    )\r\n    \r\n    # Send button click handler\r\n    send_btn.click(\r\n        fn=lambda: (gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)),\r\n        outputs=[placeholder, searching_box, result_tabs, search_time],\r\n    ).then(\r\n        fn=on_search_click,\r\n        inputs=[chat_input],\r\n        outputs=[placeholder, searching_box, result_tabs, images_tab, img_tab, search_time]\r\n    )\r\n    \r\nif __name__ == \"__main__\":\r\n\timport os\r\n\t# Enable hot reload by setting environment variable or using watch parameter\r\n\t# You can also run: python gradio_ui.py --reload (if supported)\r\n\tdemo.launch(allowed_paths=[\"./images/button-bg.png\"])\r\n\r\n"
  },
  {
    "path": "solutions/embedneural/nexa_client.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# !/usr/bin/env python3\n\nfrom typing import Union, List\nfrom openai import OpenAI\n\n\nclass NexaClient:\n    \"\"\"Client for Nexa serve OpenAI-compatible API.\"\"\"\n    \n    def __init__(self, base_url: str = \"http://localhost:18181\", model: str = \"NexaAI/EmbedNeural\"):\n        \"\"\"\n        Initialize Nexa client.\n        \n        Args:\n            base_url: Base URL of nexa serve API (should include /v1 if needed)\n            model: Model name to use for embeddings\n        \"\"\"\n        # Ensure base_url ends with /v1 for OpenAI-compatible API\n        if not base_url.endswith('/v1'):\n            if base_url.endswith('/'):\n                base_url = base_url + 'v1'\n            else:\n                base_url = base_url + '/v1'\n        self.client = OpenAI(base_url=base_url, api_key=\"not-needed\")\n        self.model = model\n    \n    def get_embedding(self, input: Union[str, List[str]]):\n        \"\"\"\n        Get embedding for text or image path(s).\n        \n        Args:\n            input: Single text string, image path, or list of texts/image paths\n            \n        Returns:\n            list of embeddings. If single input, returns 1D list.\n            If list input, returns 2D list with shape (len(input), embedding_dim).\n        \"\"\"\n        if isinstance(input, str):\n            input_list = [input]\n            single_input = True\n        else:\n            input_list = input\n            single_input = False\n        \n        try:\n            response = self.client.embeddings.create(\n                model=self.model,\n                input=input_list,\n                encoding_format=\"float\"\n            )\n            \n            embeddings = [item.embedding for item in response.data]\n            \n            if single_input:\n                return embeddings[0]\n            return embeddings\n            \n        except Exception as e:\n            raise RuntimeError(f\"Failed to get embedding from Nexa API: {e}\")\n\n"
  },
  {
    "path": "solutions/embedneural/requirements.txt",
    "content": "openai\n\n"
  },
  {
    "path": "solutions/embedneural/search.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\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\n# !/usr/bin/env python3\n\nfrom dataclasses import dataclass\nfrom typing import List\nfrom pathlib import Path\n\nfrom nexa_client import NexaClient\n\nIMAGE_EXTENSIONS = {'.jpg', '.jpeg', '.png', '.gif', '.bmp', '.webp', '.tiff', '.tif'}\n\n\n@dataclass\nclass ImageSearchResult:\n    \"\"\"Result of image search.\"\"\"\n    path: str\n    score: float\n\n\nclass NexaImageSearch:\n    \"\"\"Image search using Nexa API with L2 distance.\"\"\"\n    \n    def __init__(self, base_url: str = \"http://localhost:18181\", model: str = \"NexaAI/EmbedNeural\"):\n        \"\"\"\n        Initialize Nexa image search.\n        \n        Args:\n            base_url: Base URL of nexa serve API\n            model: Model name to use for embeddings\n        \"\"\"\n        self.client = NexaClient(base_url=base_url, model=model)\n        self._image_embeddings = {}  # Cache: {image_path: embedding_vector}\n    \n    def index_images(self, image_paths: List[str]) -> None:\n        \"\"\"\n        Calculate and cache embeddings for all images.\n        \n        Args:\n            image_paths: List of image file paths\n        \"\"\"\n        if not image_paths:\n            return\n        \n        print(f\"Indexing {len(image_paths)} images...\")\n        \n        # Clear old cache before indexing new images\n        self._image_embeddings = {}\n        \n        # Filter to only image files\n        valid_image_paths = [\n            path for path in image_paths \n            if Path(path).suffix.lower() in IMAGE_EXTENSIONS\n        ]\n        \n        if not valid_image_paths:\n            print(\"No valid image files found.\")\n            return\n        \n        # Calculate embeddings for all images (one at a time)\n        try:\n            for i, image_path in enumerate(valid_image_paths):\n                print(f\"Indexing image {i+1}/{len(valid_image_paths)}: {image_path}\")\n                # Request embedding for single image (API only supports one at a time)\n                embedding = self.client.get_embedding(image_path)\n                self._image_embeddings[image_path] = embedding\n            \n            print(f\"✓ Successfully indexed {len(valid_image_paths)} images\")\n            \n        except Exception as e:\n            print(f\"✗ Error indexing images: {e}\")\n            raise\n    \n    def search(self, query: str, metric: str = \"l2\", k: int = 5) -> List[ImageSearchResult]:\n        \"\"\"\n        Search images using text query with L2 distance.\n        \n        Args:\n            query: Text query string\n            metric: Distance metric (only \"l2\" is supported for now)\n            k: Number of top results to return\n            \n        Returns:\n            List of ImageSearchResult sorted by similarity (best first)\n        \"\"\"\n        if not self._image_embeddings:\n            raise ValueError(\"No images indexed. Please index images first.\")\n        \n        if not query or not query.strip():\n            raise ValueError(\"Query cannot be empty.\")\n        \n        # Calculate query embedding\n        print(f\"Calculating embedding for query: {query}\")\n        query_embedding = self.client.get_embedding(query)\n        \n        distances = []\n        for image_path, image_embedding in self._image_embeddings.items():\n            if metric == \"l2\":\n                distance = sum((q - i) ** 2 for q, i in zip(query_embedding, image_embedding)) ** 0.5\n            else:\n                raise ValueError(f\"Unsupported metric: {metric}. Only 'l2' is supported.\")\n            \n            distances.append((image_path, distance))\n        \n        # Sort by distance (smaller is better) and get top-k\n        distances.sort(key=lambda x: x[1])\n        top_k_results = distances[:k]\n        \n        # Convert to ImageSearchResult (use negative distance as score for consistency with UI)\n        results = [\n            ImageSearchResult(path=path, score=-distance)\n            for path, distance in top_k_results\n        ]\n        \n        return results\n    \n    def clear_cache(self):\n        \"\"\"Clear cached embeddings.\"\"\"\n        self._image_embeddings = {}\n\n"
  },
  {
    "path": "solutions/embedneural/style.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\n# !/usr/bin/env python3\r\n\r\ncss = \"\"\"\r\n.gallery-container {\r\n    display: flex;\r\n    flex-wrap: wrap;\r\n    gap: 14px;\r\n    justify-content: flex-start;\r\n}\r\n\r\n.card {\r\n    position: relative;\r\n    width: 150px;\r\n    height: 150px;\r\n    background-size: cover;\r\n    background-position: center;\r\n    border-radius: 12px;\r\n    overflow: hidden;\r\n    cursor: pointer;\r\n    transition: transform 0.25s ease, box-shadow 0.25s ease;\r\n    box-shadow: 0 2px 6px rgba(0,0,0,0.15);\r\n}\r\n\r\n.card:hover {\r\n    transform: translateY(-4px) scale(1.03);\r\n    box-shadow: 0 4px 12px rgba(0,0,0,0.25);\r\n}\r\n\r\n.video-card video {\r\n    position: absolute;\r\n    inset: 0;\r\n    width: 100%;\r\n    height: 100%;\r\n    object-fit: cover;\r\n}\r\n\r\n.overlay-video-duration {\r\n    position: absolute;\r\n    top: 8px;\r\n    left: 8px;\r\n    display: flex;\r\n    flex-direction: column;\r\n    gap: 2px;\r\n    background: rgba(0,0,0,0.45);\r\n    color: #fff;\r\n    padding: 4px 10px;\r\n    border-radius: 6px;\r\n    font-size: 13px;\r\n    font-weight: 400;\r\n    text-align: right;\r\n    max-width: 80%;\r\n    white-space: nowrap;\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n}\r\n\r\n.overlay-info {\r\n    position: absolute;\r\n    top: 8px;\r\n    right: 8px;\r\n    display: flex;\r\n    flex-direction: column;\r\n    gap: 2px;\r\n    background: rgba(0,0,0,0.45);\r\n    color: #fff;\r\n    padding: 4px 10px;\r\n    border-radius: 6px;\r\n    font-size: 13px;\r\n    font-weight: 400;\r\n    text-align: right;\r\n    max-width: 80%;\r\n    white-space: nowrap;\r\n    text-overflow: ellipsis;\r\n    overflow: hidden;\r\n}\r\n\r\n.info-line {\r\n    line-height: 1.2;\r\n}\r\n\r\n#header-row {\r\n    background-color: #F5F7F2;\r\n    padding: 10px;\r\n}\r\n\r\n#input-row {\r\n    align-items: center;\r\n    border: 1px solid #e0e0e0;\r\n    border-radius: 6px;\r\n    padding: 8px;\r\n}\r\n\r\n#chat_input {\r\n    border: none !important;\r\n    outline: none !important; \r\n    box-shadow: none !important;  \r\n    background: transparent; \r\n}\r\n\r\n#chat_input textarea::-webkit-scrollbar { \r\n    display: none;\r\n}\r\n\r\n#model-dropdown {\r\n    border: none !important;\r\n    outline: none !important; \r\n    box-shadow: none !important;  \r\n    background-color: transparent !important; \r\n}\r\n\r\n#search-column {\r\n    border: 1px solid #e0e0e0;\r\n    border-radius: 6px;\r\n    padding: 8px;\r\n}\r\n\r\n#send-btn {\r\n    background-color: transparent;\r\n    width: 40px;    \r\n    height: 40px; \r\n    padding: 0;   \r\n    margin: 0; \r\n}\r\n\r\n.custom-btn {\r\n    background-color: transparent !important;\r\n    width: 30px !important;\r\n    height: 30px !important;\r\n    margin: 0 !important;\r\n    padding: 0 !important;\r\n}\r\n\r\n.custom-btn2 {\r\n    border-radius: 12px;\r\n    border: 1px solid #454545;\r\n    background-color: #FCFCFC !important;\r\n    width: 30px !important;\r\n    padding: 8px;\r\n    font-size: 14px;\r\n    font-style: normal;\r\n    font-weight: 400;\r\n    line-height: 20px; /* 142.857% */\r\n    letter-spacing: 0.15px;\r\n}\r\n\r\n\"\"\"\r\n\r\n"
  },
  {
    "path": "solutions/embedneural/viewmodel.py",
    "content": "# Copyright 2024-2026 Nexa AI, Inc.\r\n#\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n#\r\n#     http://www.apache.org/licenses/LICENSE-2.0\r\n#\r\n# Unless required by applicable law or agreed to in writing, software\r\n# distributed under the License is distributed on an \"AS IS\" BASIS,\r\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n# See the License for the specific language governing permissions and\r\n# limitations under the License.\r\n\r\n# !/usr/bin/env python3\r\n\r\nfrom dataclasses import dataclass\r\nfrom typing import Tuple, List\r\nfrom pathlib import Path\r\n\r\nfrom search import NexaImageSearch, IMAGE_EXTENSIONS\r\n\r\n# Metrics for distance calculation\r\nmetrics = [\"l2\"]\r\n\r\n@dataclass\r\nclass SearchResult:\r\n    url: str\r\n    score: float = 0.0\r\n    start: float = 0.0\r\n    end: float = 0.0\r\n    is_image: bool = True\r\n\r\n\r\nclass ViewModel:\r\n    \"\"\"ViewModel for image search using Nexa API.\"\"\"\r\n    \r\n    def __init__(self, base_url: str = \"http://localhost:18181\", model: str = \"NexaAI/EmbedNeural\"):\r\n        \"\"\"\r\n        Initialize ViewModel.\r\n        \r\n        Args:\r\n            base_url: Base URL of nexa serve API\r\n            model: Model name to use for embeddings\r\n        \"\"\"\r\n        self._files = []\r\n        self._top_k = 2  # Default Top-K value\r\n        self._metric = metrics[0]\r\n        self._searcher = NexaImageSearch(base_url=base_url, model=model)\r\n    \r\n    @property\r\n    def files(self):\r\n        return self._files\r\n\r\n    @files.setter\r\n    def files(self, value):\r\n        # Clear cache when files change to avoid stale results\r\n        if value != self._files:\r\n            self._searcher.clear_cache()\r\n        self._files = value\r\n        \r\n    def index_files(self) -> None:\r\n        \"\"\"\r\n        Calculate embeddings for all image files.\r\n        This should be called when user clicks the Index button.\r\n        \"\"\"\r\n        if not self._files:\r\n            print(\"No files to index.\")\r\n            return\r\n        \r\n        # Filter to only image files\r\n        image_paths = [\r\n            f for f in self._files \r\n            if Path(f).suffix.lower() in IMAGE_EXTENSIONS\r\n        ]\r\n        \r\n        if not image_paths:\r\n            print(\"No image files found to index.\")\r\n            return\r\n        \r\n        print(f\"Indexing {len(image_paths)} image files...\")\r\n        self._searcher.index_images(image_paths)\r\n        \r\n    def search(self, query: str) -> Tuple[List[SearchResult], List[SearchResult], float]:\r\n        \"\"\"\r\n        Search images using text query.\r\n        \r\n        Args:\r\n            query: Text query string\r\n            \r\n        Returns:\r\n            Tuple of (empty_list, images, search_time)\r\n            First element is kept for compatibility but always empty\r\n        \"\"\"\r\n        import time\r\n        \r\n        if query is None or query.strip() == \"\":\r\n            raise ValueError(\"Query cannot be empty.\")\r\n        \r\n        if not self._searcher._image_embeddings:\r\n            raise ValueError(\"No images indexed. Please index images first.\")\r\n        \r\n        # Perform search\r\n        search_start = time.time()\r\n        results = self._searcher.search(\r\n            query=query,\r\n            metric=self._metric,\r\n            k=self._top_k\r\n        )\r\n        search_time = time.time() - search_start\r\n        \r\n        # Convert to SearchResult format\r\n        images = [\r\n            SearchResult(url=result.path, score=result.score)\r\n            for result in results\r\n        ]\r\n        \r\n        return [], images, search_time\r\n    \r\n    def update_top_k(self, top_k: int):\r\n        \"\"\"Update top-k value for search results.\"\"\"\r\n        self._top_k = top_k\r\n        \r\n    def update_metric(self, metric: str):\r\n        \"\"\"Update distance metric.\"\"\"\r\n        if metric not in metrics:\r\n            raise ValueError(f\"Unsupported metric: {metric}. Supported: {metrics}\")\r\n        self._metric = metric\r\n\r\n"
  }
]